0.0.5 • Published 8 months ago

@togtokh.dev/tokipay v0.0.5

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
8 months ago

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 {
      }
    };
0.0.5

8 months ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago