1.0.9 • Published 1 year ago

wayaquick-payment v1.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago