Registering a ShopTopUp Buyer

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="register-btn">Register</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("register-btn").addEventListener("click", function(){
  shopCheckout.register({
  // predefined user attributes
    agentId: 'fhj50tgoonoo',
    firstName: 'chisom',
    lastName: 'onwuegbuzie',
    phoneNumber: '+2348066379681',
    countryCode: 'NG',
    company: 'Goldtek Ventures',
    latitude: 3.134555,
    longitude: 3.058585,
    address: '259 etim inyang crescent'
    });
  }, false);

Open Cart

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="open-cart-btn">Open Cart</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("open-cart-btn").addEventListener("click", function(){
	shopCheckout.openCart();
}, false);

Open Transaction

Input the following command into your index.html file in your www/ folder to create a button for the function

<p><button id="open-transaction-btn">Open Transaction</button></p>

The button should call the following function in your index.js file in your www/ folder

document.getElementById("open-transaction-btn").addEventListener("click", function(){
        shopCheckout.openTransaction();
      }, false);
    },

Sample App

Please find the sample app in the below link


What’s Next