Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/biggaji/pay-lib
A test nodejs demo payment library for disbursing payouts to family or friends
https://github.com/biggaji/pay-lib
biggaji demo payment payment-library tobi-ajibade
Last synced: about 20 hours ago
JSON representation
A test nodejs demo payment library for disbursing payouts to family or friends
- Host: GitHub
- URL: https://github.com/biggaji/pay-lib
- Owner: biggaji
- Created: 2022-01-07T15:16:40.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2022-01-21T16:33:23.000Z (almost 3 years ago)
- Last Synced: 2024-09-05T08:49:05.596Z (2 months ago)
- Topics: biggaji, demo, payment, payment-library, tobi-ajibade
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/pay-lib
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pay-lib
A test nodejs demo payment library for disbursing payouts to family or friends## Requirements
Node 8, 10 or higher
## Installation
Install the package with:
```javascript
npm install --save pay-lib
# or
yarn add pay-lib
```
# Usage```javascript
const payLib = require("pay-lib");
``````javascript
//Create an array of object receipents, even if it is just a receipentconst receipents = [
{
name: "Tobi",
amount: 9000000000
},
{
name: "Prosper",
amount: 4000000000
},
{
name: "Ire",
amount: 4000000000
}
];//Now pass the receipents array to the send method of the paylib disburse property
let paymentIntents = payLib.disburse.send(receipents);
//You can choose to display the response anyhow, here i will log it to the console
console.log(paymentIntents);
```
This would return a array objects containing details of each /receipent transactions
### Example response
```javascript
[
{
"name": "Tobi",
"amount": 9000000000,
"isSent": true,
"sentAt": 1641746707977,
"id": "PAYLIB-ID2198635",
"message": "Transaction successful"
},
{
"name": "Prosper",
"amount": 4000000000,
"isSent": true,
"sentAt": 1641746707977,
"id": "PAYLIB-ID7381044",
"message": "Transaction successful"
},
{
"name": "Ire",
"amount": 4000000000,
"isSent": true,
"sentAt": 1641746707978,
"id": "PAYLIB-ID9864517",
"message": "Transaction successful"
}
]```
## Usage
Live test project link coming