payeer-node
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

payeer-node Build Status

Payeer payment gateway API for Node.js

Installation

  • npm install payeer-node

Examples

  1. 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')
);
  1. 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

/payeer-node/

    Package Sidebar

    Install

    npm i payeer-node

    Weekly Downloads

    1

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    7.59 kB

    Total Files

    11

    Last publish

    Collaborators

    • kubk