@togtokh.dev/tokipay
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @togtokh.dev/tokipay

Weekly Downloads

15

Version

0.0.4

License

ISC

Unpacked Size

17.2 kB

Total Files

9

Last publish

Collaborators

  • togtokh.dev