payeer-node
v1.0.1
Published
Payeer payment gateway API for Node.js
Downloads
7
Readme
payeer-node
Payeer payment gateway API for Node.js
Installation
npm install payeer-node
Examples
- Generate payment page url:
const payeer = new Payeer({
shopId: process.env.PAYEER_SHOP_ID,
secretKey: process.env.PAYEER_SECRET_KEY,
callbackUrls: {
success_url: 'https://test.com/success',
fail_url: 'https://test.com/fail',
status_url: 'https://test.com/status'
}
});
const orderId = '12345';
const url = payeer.generatePaymentPageUrl(
orderId,
Money.fromDecimal(500, 'EUR')
);
- Process Payeer webhook:
const callback = payeer.parsePaymentCallback(request.body);
expect(callback.orderId).toEqual(50);
expect(callback.isPaymentSuccess).toBeTruthy();
Please refer tests for details.
Contribution
git clone
npm install
npm test