Payeer payment gateway API for Node.js
npm install payeer-node
- Generate payment page url:
import { Payeer } from 'payeer-node'
import { Money } from 'ts-money'
const payeer = new Payeer({
shopId: process.env.PAYEER_SHOP_ID,
secretKey: process.env.PAYEER_SECRET_KEY,
callbackUrls: {
success_url: 'https://your-website.com/success',
fail_url: 'https://your-website.com/fail',
status_url: 'https://your-website.com/status'
}
})
// ID generated by your system
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.
git clone
npm install
npm test