1.0.8 • Published 3 years ago

payunitjs v1.0.8

Weekly downloads
11
License
ISC
Repository
-
Last release
3 years ago

Payunit SDK for Javascript applications.

This SDK is designed to support applications developed in vanilla Javascript and some popular frontend frameworks like React and VueJs. However, If you develop applications using the angular framework, you may consider using our angular sdk for Payunit.

Installation

In the terminal, run

npm install payunitjs

Usage

In your checkout js file, do as follows;

 import { PayUnit } from "node_modules/payunitjs/dist/payunit.min.js";
  PayUnit(
    {
      apiUsername: "",
      apiPassword: "",
      x_api_key: "",
      mode: "",
    },
    {
      return_url: " ",
      notify_url: " ",
      description: "",
      purchaseRef: "",
      total_amount: "",
      name: "",
      currency: "XAF"
    }
  );

Using the sdk from its official CDN

<script type="module">
  import { PayUnit } from "https://cdn.jsdelivr.net/npm/payunitjs@1.0.8/dist/payunit.min.js";
  PayUnit(
    {
      apiUsername: "",
      apiPassword: "",
      x_api_key: "",
      mode: "",
    },
    {
      return_url: " ",
      notify_url: " ",
      description: "",
      purchaseRef: "",
      total_amount: "",
      name: "",
      currency: "XAF"
    }
  );
</script>

In the template or html file, type the following

  <button id = "payunit-pay"> Pay </button>

After successfully integrating and testing in sandbox, to go live, you simply need to change to live credentials and the mode to live mode.

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago