Easy request to PayDisini
npm install @bolaxdd/paydisini
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);
})();