How to use the software

STEP 1:

First, you will need to include libraries that the software depends on, these are

  • Jquery version 3.1.1
  • Bootstrap version 4.5.3 or higher

The following code snippet is an example of the Jquery version and the bootstrap version required

     <link rel="stylesheet" href="./src/plugins/bootstrap-4.5.3-dist/css/bootstrap.min.css">
        <script src="./src/jquery/jquery.js"></script>
        <script src="./src/plugins/bootstrap-4.5.3-dist/js/bootstrap.bundle.min. js"></script>

STEP 2:

Include the jambopay checkout script file at the head of your html page

<script type="text/javascript" defer src="https://checkout.jambopay.com/jambopay-js-checkout.min.js"></script>

This is the live version and should only be used when your site is in production.

<link rel="stylesheet" href="https://checkout.jambopay.com/jambopay-styles-checkout.min.css" />

Also include the stylesheet at the head of your HTML page

STEP 3:

Design a button that will be used to initiate the checkout process

<button id="jambopay-checkout-btn" class="border-0 m-2 rounded p-1">PAY</button>

STEP 4:

Create a new JavaScript file or use an existing file that will be used to initiate the checking out process, ensure that the Javascript file is linked to the page that you just created.

STEP 5:

Inside the JS file, add an event listener to the checkout button, the listener should invoke a function that prepares your transaction details then calls the jambopayCheckout function with the details as parameters.

The following code snippet is a sample of an event listener (click)

$(document).ready(function () {
            const getRandomOrderNumber = () => {
                const rand = Math.floor(Math.random() * 10000) + 1000
                console.log(rand);
                return rand;
            }

$("#jambopay-checkout-btn").click(() => {
//jambopayCheckout({});

    }
}
Untitled