https://github.com/ecj222/nuxt-paystack
Paystack module for Nuxt.js
https://github.com/ecj222/nuxt-paystack
nuxt nuxt-module payment-gateway paystack
Last synced: 7 months ago
JSON representation
Paystack module for Nuxt.js
- Host: GitHub
- URL: https://github.com/ecj222/nuxt-paystack
- Owner: ECJ222
- License: mit
- Created: 2021-07-04T16:09:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-12T21:33:36.000Z (over 4 years ago)
- Last Synced: 2025-05-25T19:07:21.462Z (8 months ago)
- Topics: nuxt, nuxt-module, payment-gateway, paystack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/nuxt-paystack
- Size: 1.61 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
💳 Nuxt-Paystack
Paystack payment gateway integration for Nuxt.js
## Table of Contents
- [✨  Requirements](#requirements)
- [✨  Install](#install)
- [✨  Usage](#usage)
- [📖  License](#license)
## Requirements
- npm
- NuxtJS
- NodeJS
## Install
```bash
# npm
$ npm install nuxt-paystack
# yarn
$ yarn add nuxt-paystack
```
## Usage
Add `'nuxt-paystack'` to the `modules` section of your `nuxt.config.js` file.
```js
{
modules: ['nuxt-paystack']
}
```
`this.$paystack` is now available and can be used in your components.
```js
{
...
methods: {
initializePaystack() {
this.$paystack({
key: '', // Replace with your public key.
email: '',
amount: 0,
ref: '',
currency: '',
callback: () => {
// Do something.
},
onClose: () => {
// Do something.
}
})
}
}
...
}
```
**Note:** that `$paystack` is a `function` which takes in an `object` as its argument with your paystack details in it, for more information on this you can check [here](https://paystack.com/docs/payments/accept-payments/#collect-customer-information).
## License
This project is licensed under [MIT](./LICENSE)