1.0.13 • Published 10 months ago

@busha/commerce-js v1.0.13

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

Busha commerce-js

Receive crypto payments with busha commerce js

 

Installation

Browser

<script src="https://cdn.jsdelivr.net/npm/@busha/commerce-js@1.0.12/dist/index.min.js"></script>

<script>
    const BushaCommerce = window.BushaCommerce
</script>

Node

yarn add @busha/commerce-js

# OR

npm i @busha/commerce-js
import BushaCommerce from "@busha/commerce-js";

 

Usage

  const payload = {
        reference: `ref_${new Date().getTime()}`, // optional, will be auto-generated if nothing's passed
        public_key: "[YOUR PUBLISHABLE KEY]",
        local_amount: 2000,
        local_currency: "NGN", // "USD"
        meta: {email: "email@example.com", name: "Busha" } // optional customer info
        onClose: (d) => {
            console.log("Payment cancelled!", d);
        },
        onSuccess: (d) => {
            console.log(d);
        }
    }

    BushaCommerce(payload)

Can't find your publishable key ?

Publishable key

1.0.13

10 months ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago