npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bizgem-sdk-node

v1.0.3

Published

The Official NodeJS Library For Bizgem APIs

Downloads

7

Readme

Bizgem NodeJS Library

npm NPM

How to use with Nodejs SDK

npm install bizgem-sdk-node

import { BPG } from 'bizgem-sdk-node';

For staging, Use TEST API Keys and for production, use LIVE API KEYS. You can get your PUBLIC_KEY and SECRET_KEY from the Bizgem dashboard.

Go here to get your API Keys.

Turn on Sandbox to get TEST API KEYS and Turn off Sandbox to get LIVE API KEYS

Bizgem Services exposed by the library

1. COLLECTION

  • Payment by transfer

For more information on the services listed above, visit the Bizgem website

COLLECTION

payment by transfer

This describes how to collect payment by transfer on bizgem.

import { BPG } from 'bizgem-sdk-node';

function generateUUID() {
    let d = new Date().getTime();
    let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c) {
        let r = (d + Math.random()*16)%16 | 0;
        d = Math.floor(d/16);
        return (c==='x' ? r : (r&0x7|0x8)).toString(16);
    });
    return 'BZIGEM-'+uuid.toUpperCase();
}

function onCancel(data){
    console.log('Transaction Cancelled',data)
}
function onSuccess(data){
    console.log('Transaction Succeeded',data)
}
function onFailure(data){
    console.log('Transaction Failed',data)
}

function payWithBankTransfer() {
    BPG.pay({
        publicKey:"PK-00000001110000000111-PROD-E9CCA968BEEFD98089D3CDAC4053FE49FA422B92F290FQWWEFEFRF", //(required) your public key, this is gotten from dashboard
        fullName:"Anthony Morah", //(required) name of the person paying
        email:"[email protected]", //(required) email of the person paying
        phoneNumber:"09049957786", //(required) phone number of the person paying
        amount:"100", //(required) the transaction amount
        narration:"Test Sdk Example",//(required) description of the transaction
        reference:generateUUID(), //(optional) unique transaction identifier
        logo:null, // (optional) logo url
        redirectUrl:"http://localhost:63343/", // (optional) when the value is null it assumes the current url
        onCancel:onCancel, // (optional) the function to be triggered on a cancelled transaction
        onSuccess:onSuccess, // (optional) the function to be triggered on a successful transaction
        onFailure:onFailure // (optional) the function to be triggered on a failed transaction
    })
}

payWithBankTransfer()

How to use with CDN

<script src="https://cdn.bizgem.io/sdk/1.0.2/bpg-sdk.min.js"></script>

COLLECTION

payment by transfer

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bizgem.io/sdk/1.0.2/bpg-sdk.min.js"></script>
</head>
<body>
  <button onclick="payWithBankTransfer()">Pay With Bank Transfer</button>
  <script>
      function generateUUID() {
          let d = new Date().getTime();
          let uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c) {
              let r = (d + Math.random()*16)%16 | 0;
              d = Math.floor(d/16);
              return (c==='x' ? r : (r&0x7|0x8)).toString(16);
          });
          return uuid.toUpperCase();
      }

      let reference = generateUUID()

      function payWithBankTransfer() {
          console.log(">>>>>>")
          BPG.pay({
              publicKey:"PK-00000001110000000111-PROD-E9CCA968BEEFD98089D3CDAC4053FE49FA422B92F290FQWWEFEFRF", //(required) your public key, this is gotten from dashboard
              fullName:"Anthony Morah", //(required) name of the person paying
              email:"[email protected]", //(required) email of the person paying
              phoneNumber:"09049957786", //(required) phone number of the person paying
              amount:"100", //(required) the transaction amount
              narration:"Test Sdk Example",//(required) description of the transaction
              reference:generateUUID(), //(optional) unique transaction identifier
              logo:null, // (optional) logo url
              redirectUrl:"http://localhost:63343/", // (optional) when the value is null it assumes the current url
              onCancel:onCancel, // (optional) the function to be triggered on a cancelled transaction
              onSuccess:onSuccess, // (optional) the function to be triggered on a successful transaction
              onFailure:onFailure // (optional) the function to be triggered on a failed transaction
          })
      }
      function onCancel(data){
          console.log('Transaction Cancelled',data)
      }
      function onSuccess(data){
          console.log('Transaction Succeeded',data)
      }
      function onFailure(data){
          console.log('Transaction Failed',data)
      }
  </script>
</body>
</html>