Paystack payment gateway integration for Nuxt.js
npm install nuxt-paystackPaystack payment gateway integration for Nuxt.js
- ✨ Requirements
- ✨ Install
- ✨ Usage
- 📖 License
- npm
- NuxtJS
- NodeJS
``bashnpm
$ npm install 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.This project is licensed under MIT