Vue Paystack Component for Vue 2.x.
npm install vue-paystack#### NPM
```
npm install vue vue-paystack --save
#### Javascript via CDN
`javascript 1.8`
#### Via NPM
###### my-compnent.vue sample
`vue
:email="email"
:paystackkey="paystackkey"
:reference="reference"
:callback="callback"
:close="close"
:embed="false"
>
Make Payment
``
Usage Example via NPM or Yarn
#### via CDNjavascript 1.8
new Vue({
el: '#app',
components:{
'paystack': VuePaystack.default
},
computed: {
reference(){
let text = "";
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for( let i=0; i < 10; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
},
methods: {
callback: function(response){
console.log(response)
},
close: function(){
console.log("Payment closed")
}
},
data: {
paystackkey: "pk_test_xxxxxxxxxxxxxxxxxxxxxx", //paystack public key
email: "foobar@example.com", // Customer email
amount: 1000000, // in kobo
}
});
`
Usage Example via CDN
Please checkout Paystack Documentation for other available options you can add to the
3. Commit your changes: git commit -am 'Some commit message'
4. Push to the branch: git push origin feature-name`Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or Any Social Media? Spread the word!
Don't forget to follow me on twitter!
Thanks!
Ayeni Olusegun.