Having issue implementing paystack in vue
Tahywoh opened this issue · comments
TAIWO ADESHINA commented
Haven followed the documentation on iamraphson/vue-paystack. I am still receiving please use a valid public key.
How do i resolve this please?
TAIWO ADESHINA commented
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>Olusegun Ayeni commented
@Tahywoh can you format your code well, please?
Olusegun Ayeni commented
@Tahywoh, can we close this?
TAIWO ADESHINA commented
Yes, we are good to do that since it's been resolved now.
…On Tue, Oct 16, 2018 at 4:17 PM Ayeni Olusegun ***@***.***> wrote:
@Tahywoh <https://github.com/Tahywoh>, can we close this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AUOWfc7TQwDrJ95g4zpbj67ZWxrsmjvUks5ulfiGgaJpZM4Upa1O>
.