0.0.2 • Published 1 year ago

@togtokh.dev/hipay v0.0.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
1 year ago

HIPAY

Example

    import HIPAY from "@togtokh.dev/HIPAY";

    HIPAY.auth
      .TOKEN("staging", {
        entityId: "sellerte",
        token: "FQ5ByAS79LwoVtDT3UyDPp",
      })
      .then(async (r) => {
        console.log(r);
        const invoice = await HIPAY.payment.eCommerce.CREATE({
          entityId: "sellerte",
          amount: 100,
          currency: "MNT",
        });
        if (invoice.success && invoice.data) {
          const payment = await HIPAY.payment.eCommerce.PAYMENT({
            checkoutId: invoice.data?.checkoutId,
            shopperResultUrl: "https://developers.hipay.mn/",
            shopperCancelUrl: "https://developers.hipay.mn/",
            lang: "mn",
          });
          console.log(payment);
          const check = await HIPAY.payment.eCommerce.CHECKOUT(
            invoice.data?.checkoutId
          );
          console.log(check);
        }
      })
      .catch((e) => {
        console.log(e);
      });
0.0.2

1 year ago

0.0.1

1 year ago