please i need your help. I am trying to call this to access a variable that i have in my data object in vuejs but this returns undefined
Here is my code
let response = ''
let self = this
response = WePay.credit_card.create({
"client_id": 118711,
"user_name": this.cardDetails.name,
"email": this.cardDetails.email,
"cc_number": this.cardDetails.number,
"cvv": this.cardDetails.cvc,
"expiration_month": this.cardDetails.month,
"expiration_year": this.cardDetails.year,
"address": {
"postal_code": this.cardDetails.zipcode
}
}, function(data, self) {
if (data.error) {
// self.loader = false
console.log(window)
this.loader = false
this.emitErrorNotify({message: data.error_description})
// handle error response
} else {
console.log(data)
// call your own app's API to save the token inside the data;
// show a success page
}
})
Please can anyone help me how it's done? Thanks and regards.