1.0.4 • Published 5 years ago

kurepay-gateway-node v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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)
})
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago