Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/momi-foundation-coding/paystack-gateway
Paystack API Gateway wrapper for all API in Paystack
https://github.com/momi-foundation-coding/paystack-gateway
Last synced: 2 months ago
JSON representation
Paystack API Gateway wrapper for all API in Paystack
- Host: GitHub
- URL: https://github.com/momi-foundation-coding/paystack-gateway
- Owner: momi-foundation-coding
- License: mit
- Created: 2022-10-24T13:17:20.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-21T10:45:21.000Z (about 2 years ago)
- Last Synced: 2024-11-03T21:32:31.614Z (2 months ago)
- Language: JavaScript
- Size: 103 KB
- Stars: 10
- Watchers: 0
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![npm](https://img.shields.io/npm/dt/paystack-gateway?style=for-the-badge)
# Paystack GatewayThis is a wrapper that is used to make it easy to interface with Paystack API.
# How To Use
npm
`npm i paystack-gateway`
yarn
`yarn add paystack-gateway`
# Sample Code
Apart from the example below, other examples can be found inside `real-sample`
```js
import Paystack from "paystack-gateway-test"const paystackInstance = new Paystack(process.env.SECRET_KEY) // secret key should be passed
// Get transactions
const queryParams = {
perPage: 20
}const transactions = await paystackInstance.transactions.list({ queryParams })
// Initialize transactions
const bodyParams = {
email: "[email protected]",
amount: 20000,
currency: "ZAR"
}
const initializedTransaction = await paystackInstance.transactions.initialize({ bodyParams: bodyParams })```
# License
[MIT](https://github.com/momi-foundation-coding/paystack-gateway/blob/main/LICENSE)