Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubk/payeer-node
Payeer payment gateway API for Node.js
https://github.com/kubk/payeer-node
node payeer
Last synced: 25 days ago
JSON representation
Payeer payment gateway API for Node.js
- Host: GitHub
- URL: https://github.com/kubk/payeer-node
- Owner: kubk
- Created: 2019-05-30T18:50:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-12T08:48:54.000Z (over 1 year ago)
- Last Synced: 2024-10-06T02:09:19.225Z (about 1 month ago)
- Topics: node, payeer
- Language: TypeScript
- Size: 52.7 KB
- Stars: 9
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## payeer-node [![Build Status](https://travis-ci.org/kubk/algoholizm.svg?branch=master)](https://travis-ci.org/kubk/payeer-node) [![npm version](https://badge.fury.io/js/payeer-node.svg)](https://badge.fury.io/js/payeer-node)
[Payeer](https://payeer.com/en/) payment gateway API for Node.js
### Installation
- `npm install payeer-node`### Examples
1. Generate payment page url:
```javascript
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')
)
```2. Process Payeer webhook:
```javascript
const callback = payeer.parsePaymentCallback(request.body);expect(callback.orderId).toEqual(50);
expect(callback.isPaymentSuccess).toBeTruthy();
```Please refer [tests](https://github.com/kubk/payeer-node/blob/master/test/payeer.test.ts) for details.
### Contribution
- `git clone`
- `npm install`
- `npm test`