0.0.12 • Published 4 years ago
nuxt-paystack v0.0.12
Table of Contents
Requirements
- npm
- NuxtJS
- NodeJS
Install
# npm
$ npm install nuxt-paystack
# yarn
$ yarn add nuxt-paystackUsage
Add 'nuxt-paystack' to the modules section of your nuxt.config.js file.
{
modules: ['nuxt-paystack']
}this.$paystack is now available and can be used in your components.
{
...
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.
License
This project is licensed under MIT