0.2.0 • Published 1 year ago

paystack-gateway v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

npm

Paystack Gateway

This 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

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: "ezrqnkemboi@gmail.com",
   amount: 20000,
   currency: "ZAR"
}
const initializedTransaction = await paystackInstance.transactions.initialize({ bodyParams: bodyParams })

Contributors

License

MIT