intasend-inlinejs-sdk

Plugin for IntaSend integration

Usage no npm install needed!

<script type="module">
  import intasendInlinejsSdk from 'https://cdn.skypack.dev/intasend-inlinejs-sdk';
</script>

README

IntaSend Inline Payment SDK

Install locally

yarn add intasend-inlinejs-sdk

CDN option

Setup for website

<button class="intaSendPayButton" data-api_ref="payment-link" data-phone-number="254xxxxxxxx"
    data-email="example@intasend.com" data-amount="100">
    Pay Now
</button>

Include this before closing your body tag

<script src="https://unpkg.com/intasend-inlinejs-sdk@3.0.2/build/intasend-inline.js"></script>
<script>
    let isObj = new window.IntaSend({
        publicAPIKey: "<YOUR-API-KEY>",
        redirectURL: "<YOUR-REDIRECT-URL>",
        live: true //or false for sandbox environment
    })
    .on("COMPLETE", (response) => { console.log("COMPLETE:", response) })
    .on("FAILED", (response) => { console.log("FAILED", response) })
    .on("IN-PROGRESS", () => { console.log("INPROGRESS ...") })
</script>