A lightweight and customizable payment API for the Kainure framework, designed to simplify in‑game product handling using MySQL.
Place api-mercadopago.js inside:
Kainure/includes/
Then inside that same folder, run:
npm installDone — the API is ready to use.
import { vynixc_connectDB } from "./VynixC.js";
await vynixc_connectDB({
host: "localhost",
user: "root",
password: "",
database: "gamemode_db"
});import { vynixc_registerLogic } from "./VynixC.js";
vynixc_registerLogic({
onDeliver: async (purchase) => {
console.log("Delivering:", purchase.product_id);
}
});await vynixc_addProduct({ name: "VIP Gold", price: 25 });await vynixc_createPurchase(userId, productId);await vynixc_checkPurchase(purchaseId);await vynixc_deliver(purchaseId);MIT — Developed by VynixC.