Socket
Book a DemoInstallSign in
Socket

wayaquick-payment

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wayaquick-payment

WayaQuick Payment Gateway Rest API

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

WayaPay

WAYA-PAY REST CLIENT NODEJS LIBRARY

Installation

To install the API, you need to type the following command in your terminal:

npm install --save wayaquick-payment

Usage

const WayaPayRestClient = require('wayaquick-payment');

const merchantId = "MER_qZaVZ1645265780823HOaZW";
const publicKey = "WAYAPUBK_TEST_0x3442f06c8fa6454e90c5b1a518758c70";
const environment = process.env.NODE_ENV;

const wayapay = new WayaPayRestClient(merchantId, publicKey, environment);

Initialize Payment

wayapay.initializePayment({
    amount: '157.00',
    narration: 'Airtime Purchase',
    firstName: 'John',
    lastName: 'Doe',
    email: 'johndoe@gmail.com',
    phoneNumber: '09087654321',
    currency: 'NGN'
}).then((result)=> {
	console.log(result);
}).catch((error)=> {
	console.log(error);
});

Verify Payment

tranId (transaction Id gotten from initialize payment)

wayapay.verifyPayment(tranId)
.then((result)=> {
	console.log(result);
}).catch((error)=> {
	console.log(error);
});

License

MIT

Keywords

Api

FAQs

Package last updated on 13 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts