@bolaxdd/paydisini

0.0.5 • Public • Published

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);
})();

Readme

Keywords

none

Package Sidebar

Install

npm i @bolaxdd/paydisini

Weekly Downloads

132

Version

0.0.5

License

ISC

Unpacked Size

6.24 kB

Total Files

4

Last publish

Collaborators

  • bolaxdd