Skip to content

VynixC/api-mercadopago

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VynixC Payment API – Kainure Integration

A lightweight and customizable payment API for the Kainure framework, designed to simplify in‑game product handling using MySQL.


📦 Installation

Place api-mercadopago.js inside:

Kainure/includes/

Then inside that same folder, run:

npm install

Done — the API is ready to use.


🧩 Usage

Connect to MySQL

import { vynixc_connectDB } from "./VynixC.js";

await vynixc_connectDB({
    host: "localhost",
    user: "root",
    password: "",
    database: "gamemode_db"
});

Register Custom Logic

import { vynixc_registerLogic } from "./VynixC.js";

vynixc_registerLogic({
    onDeliver: async (purchase) => {
        console.log("Delivering:", purchase.product_id);
    }
});

Add Product

await vynixc_addProduct({ name: "VIP Gold", price: 25 });

Create Purchase

await vynixc_createPurchase(userId, productId);

Check Purchase

await vynixc_checkPurchase(purchaseId);

Deliver Purchase

await vynixc_deliver(purchaseId);

📄 License

MIT — Developed by VynixC.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors