@bolaxdd/paydisini
v0.0.5
Published
Pay Disini is A Digital Payment gateway (free to use and register with passport)
Downloads
620
Readme
Payment gateway
Easy request to PayDisini
Install
npm install @bolaxdd/paydisini
Usage
import { PayDisini } from "@bolaxdd/paydisini";
// Only ESM
// unsupported EJS
const apikey = "abcd";
const pd = new PayDisini(apikey);
(async function () {
const res1 = await pd.profile();
console.log(res1);
})();
(async function () {
/**
Urutan Argument pada method newTransaction
[
merchant_id,
unique_code,
service,
amount,
note,
valid_time,
payment_guide,
ewallet_phone,
customer_email,
type_fee,
callback_count,
return_url
]
*/
const res1 = await pd.newTransaction(
undefined,
"Payment12345678",
11,
1000,
"Membayar Tip Makanan",
3600,
false,
undefined,
undefined,
1,
undefined,
undefined
);
console.log(res1);
})();
(async function () {
const res1 = await pd.statusTransaction("Payment12345678"); // unique_code
console.log(res1);
})();
(async function () {
const res1 = await pd.cancelTransaction("Payment12345678"); // unique_code
console.log(res1);
})();
(async function () {
const res1 = await pd.paymentChannel();
console.log(res1);
})();
(async function () {
const res1 = await pd.paymentGuide("1"); // service
console.log(res1);
})();