kurepay-gateway-node

1.0.4 • Public • Published

Kurepay Gateway Node

Installation

npm install kurepay-gateway-node

or

yarn add kurepay-gateway-node

import {KurepayGateway} from 'kurepay-gateway-node'

or

const {KurepayGateway} = require('kurepay-gateway-node')

Create a transaction Initiate the library first

KurepayGateway.init(PUBLIC_KEY);

KurepayGateway.initiateTransaction(email, amount, reference, fullname, phoneNumber, {productId: 123}).then((redirectUrl) => {
    /* Redirect the user to this url to complete his payment
    After payment the user is redirected back to the url that was saved in your admin
     */
}).catch((error) => {
    //An error occurred
    console.log(error)
})

Verify Transaction

KurepayGateway.verifyTransaction(reference).then((transactionDetails) => {
    //Payment was successful
}).catch((error) => {
    //An error occurred
    console.log(error)
})

/kurepay-gateway-node/

    Package Sidebar

    Install

    npm i kurepay-gateway-node

    Weekly Downloads

    5

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    118 kB

    Total Files

    7

    Last publish

    Collaborators

    • osinakayah