@togtokh.dev/tokipay
v0.0.4
Published
tokipay is a library for qpay payment gateway. It is a wrapper for axios and https module. It is a simple and easy-to-use library for tokipay payment gateway. It is a wrapper for axios and https module. It is a simple and easy-to-use library for tokipay p
Downloads
139
Readme
TOKIPAY
Example
import TOKIPAY from "@togtokh.dev/tokipay";
TOKIPAY.auth
.TOKEN("staging", {
username: "",
password: "",
merchant_id: "63355157543e6b7d9e7ba95b",
third_party_token: "---",
spose_token: "",
})
.then(async (r) => {
const res = await TOKIPAY.invoice.CREATE.QR({
callback: "http://www.google.com",
orderId: "25772338780",
amount: 4,
notes: "dpp",
});
console.log(res);
// const res = await TOKIPAY.invoice.CREATE.DEEP_LINK({
// callback: "http://www.google.com",
// orderId: "25772338780",
// amount: 4,
// notes: "dpp",
// });
// console.log(res);
})
.catch((e) => {
console.log(e);
});
CALLBACK
export const callback = async (req: Request, res: Response) => {
const {
orderID,
orderId,
transactionID,
status,
statusCode,
transRequestId,
token,
amount,
requestId,
} = req.body;
console.log(req.body);
if (requestId) {
} else {
}
};