4.0.7 • Published 10 months ago

intasend-inlinejs-sdk v4.0.7

Weekly downloads
63
License
MIT
Repository
github
Last release
10 months ago

IntaSend Inline Payment SDK

WebSdk plugin for IntaSend Payments Button. IntaSend enables you to easily add payments to your website with a few lines of code.

Follow the instruction below to install and get started.

Visit our sandbox/developers test for your publishable API. More information is available on the IntaSend Documentation.

Install locally

yarn add intasend-inlinejs-sdk

CDN option

Setup inline mode

Define the container where you want the payment component to appear

<div id="checkoutElement" style="padding: 40;width: 400px; height: 100vh; background: #cacaca; overflow-y: auto;"></div>

Instantiate the checkout element. Include this before closing your body tag

<script type="text/javascript" src="https://unpkg.com/intasend-inlinejs-sdk@4.0.0/build/intasend-inline.js"></script>
<script>
    function openInlineCheckout() {
            const intasendObj = window.IntaSend({
                publicAPIKey: "ISPubKey_test_91ffc81a-8ac4-419e-8008-7091caa8d73f",
                redirectURL: "http://intasend.com",
                live: false,
                mode: "inline",
                inlineContainer: "checkoutElement"
            })
            .on("COMPLETE", () => alert("COMPLETE"))
            .on("FAILED", () => alert("FAILED"))
            .on("IN-PROGRESS", () => console.log("INPROGRESS ..."))

            intasendObj.run({
                amount: 10,
                currency: "USD",
                api_ref: "123",
                email: "felix-inline@intasend.com"
            })
    }
    openInlineCheckout()
</script>

Setup popup mode 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@4.0.0/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>
4.0.7

10 months ago

4.0.5

12 months ago

4.0.4

12 months ago

4.0.6

12 months ago

4.0.3

12 months ago

4.0.2

12 months ago

4.0.1

1 year ago

4.0.0

1 year ago

3.0.4

4 years ago

3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

3.0.0-beta-2

4 years ago

3.0.0-betax

4 years ago

3.0.0-beta

4 years ago

3.0.0-alpha

4 years ago

3.0.0-alpha2

4 years ago

2.0.8

4 years ago

2.0.8-d

4 years ago

2.0.8-c

4 years ago

2.0.8-b

4 years ago

2.0.8-a

4 years ago

2.0.7

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

1.0.2

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

2.0.0

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.10.6

5 years ago

1.0.0

5 years ago