iamraphson / vue-paystack

Paystack Vue Plugin for Vue 2.X

Home Page:https://www.npmjs.com/package/vue-paystack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having issue implementing paystack in vue

Tahywoh opened this issue · comments

Haven followed the documentation on iamraphson/vue-paystack. I am still receiving please use a valid public key.

How do i resolve this please?

Here is my code:

:amount="amount" :email="email" :paystackkey="paystackkey" :reference="reference" :callback="callback" :close="close" :embed="false"
<script> import Paystack from 'vue-paystack' export default { components: {Paystack}, data () { return { paystackBtnText: 'Pay me!', paystackkey: 'pk_test_240fd9cf97c3a8a8e4c2178f6c80619127b35895', // paystack public key email: 'a.taiwoquadri@gmail.com', // Customer email amount: 100 // in kobo } }, 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 (response) { console.log({response}) alert('Payment is a success with response:', JSON.stringify(response)) }, close () { console.log('Payment closed') } } } </script>

@Tahywoh can you format your code well, please?

@Tahywoh, can we close this?