#guizhong_10139
1 messages · Page 1 of 1 (latest)
Something went wrong and Google Pay cannot be displayed. Please select another payment method and try again.
This error is reported when canceling Google Pay
Hi
You are using Stripe Element in your case right ?
yes
this.xElements = stripe.elements({
mode: 'payment',
paymentMethodCreation: 'manual',
locale: _lang,
amount: this.oOrder.payment_total,
currency: this.oOrder.currency.toLowerCase(),
appearance: appearance
})
this.cardElement4 = this.xElements.create('payment', options)
this.cardElement4.mount('#payment-element')
Could you inspect the network and see what API is sending back that message?
Or if your code source is returning that popup message
this.stripex.createPaymentMethod({
elements: this.xElements,
params: {
billing_details: bAddress
}
}).then((methodResult) => {
if (methodResult.error) {
this.$message.error(methodResult.error.message)
}
})
The red popup message doesn't seems a Stripe UI component
createPaymentMethod()
The error message returned by this api
What API ?
stripe.createPaymentMethod()
this.stripex.createPaymentMethod({
elements: this.xElements,
params: {
billing_details: bAddress
}
}).then((methodResult) => {
if (methodResult.error) {
//Error returns here
this.$message.error(methodResult.error.message)
}
})
If you cancel Google Pay, why you are calling this method?
You are following what guide ?
I have a little inspiration, wait a minute and I will change this logic
In order to accept payment using Stripe ELement, you shoul dbe following this guide:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
I used this document https://stripe.com/docs/payments/build-a-two-step-confirmation
Is there any particular reason for that ?
ok , i solved it,the reason here
Cool! Happy to help!
Thanks😀