2.0.1 β€’ Published 12 months ago

uni-pay-web v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Payment Gateway Library Crafted by the UNICODE Team.

A lightweight library for processing online payments and generating invoices with Moyasar, providing seamless payment info retrieval as well (πŸ‡ΈπŸ‡¦πŸ’™πŸ‡§πŸ‡©β€οΈπŸ‡ͺπŸ‡¬).

Features support

  • Apple Pay
  • Card support (Mada, Visa, AMEX and Mastercard)
  • stc pay

Getting started and make your payment using the gateway.

UniPay.makePayment({
  config: new UniPayConfig({
    sKey: "sk_test_key",
    environment: UniPayEnv.staging,
    locale: UniPayLocale.ar,
  }),
  paymentData: new UniPayInvoiceDTO({
    amount: 150.99 * 100, // (150.99 * 100) because 1 sr == 100 Halala's.
    currency: UniPayCurrency.sar,
    description: "Test payment",
    expiredAt: "expiredAt - optional",
    successUrl: "https://your-website.com/success",
    backUrl: "https://your-website.com/back",
    metadata: {
      product_name: "your-product-name",
      product_id: "abc123",
    },
  }),
});

Get payment transaction details from Moyasar using the paymentId or transactionId

UniPay.getPaymentTransactionById({
  config: new UniPayConfig({ sKey: "sk_test_key" }),
  transactionId: "abc12345",
});

Verify transaction from the callback url using the query-params, by your own if needed.

UniPay.verifyPaymentByQueryParams({
  config: new UniPayConfig({
    sKey: "sk_test_key",
    urlSearchParams:
      "Optional: you can provide your own query-params, otherwise it will use the current url as default.",
  }),
});

If you enjoyed it, then give it a star ⭐️ and like πŸ‘πŸ» and for more arts & crafts 🎨 from our team kindly visit here Team UNICODE. Until next time, keep coding and stay awesome πŸ˜‰

2.0.1

12 months ago

2.0.0

12 months ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago