I am using Laraval v5.4.35 & following the lessons for 'How to Accept Payments'.
The issue is ' ReferenceError: StripeCheckout is not defined'.
Here's my code & thanks for any help
Chris
<button type="submit" class="btn btn-primary" @click.prevent="buy">Subscribe</button>
</form>
export default {
data(){
return {
stripeEmail: '',
stripeToken: ''
}
},
created(){
this.stripe = StripeCheckout.configure({
key: Gcnvars.stripeKey,
image: "https://stripe.com/img/documentation/checkout/marketplace.png",
locale: "auto",
token: (token) => {
this.stripeEmail = token.email;
this.stripeToken = token.id;
axios.post('/subscription/create', this.$data)
.then(response => alert('Complete! Thanks for you payment!'));
}
})
},
methods: {
buy() {
this.stripe.open ({
name: 'Get Connected.Network',
description: 'GCN 12mth subscription',
zipCode: true,
amount: 8700
});
}
},
}