perfectbiller_node

1.0.1 • Public • Published

Welcome to perfectbiller_node

install using npm i perfectbiller_node or yarn add perfectbiller_node

secret_key: Login to your Perfect Biller dashboard and click on Api Keystore Menu to obtain your secret key, but for the purpose of testing, you can use PB-DEMO-SECRET as your secret key.

Verifying Transaction Using Transaction Reference:
new Perfectbiller_node("key").verify("transactionToken")
  .then(()=> {
  //  this will return a response object
  //   {
  //     status: "success",
  //       resp: "Approved",
  //     successful_verifications : 1,
  //     transaction_ref: "PB-1559445533",
  //     transaction_datetime: "2019-06-02 04:21:14",
  //  see full response below
  }).catch(()=> {
    // This will return error response
})
Response:
{
    "status": "success",
    "resp": "Approved",
    "successful_verifications" : 1,
    "transaction_ref": "PB-1559445533",
    "transaction_datetime": "2019-06-02 04:21:14",
    "transaction_details": {
        "merchant_id": "PB-DEMO",
        "total": "6800",
        "cur": "NGN",
        "notify_url":"http://www.mywebsite.com/notify",
        "customer_email": "email@domain.com",
        "customer_phone": "2348012345678",
        "merchant_ref":  "ABCD-1234",
        "ip": "192.168.54.2",
        "memo":"Payment for Oz-Stores",
        "items": [
                {
                    "name": "Fancy Beautiful handbag",
                    "description": "zena handbag 78S",
                    "price": "1800"
                },
                {
                    "name": "Donzim Shoes",
                    "description": "Italian male shoe",
                    "price": "5000"
                }
            ]
    }

}

Package Sidebar

Install

npm i perfectbiller_node

Weekly Downloads

0

Version

1.0.1

License

Jamasoft

Unpacked Size

3.97 kB

Total Files

8

Last publish

Collaborators

  • perfectbiller