#.zvenko
1 messages · Page 1 of 1 (latest)
This is Express Checkout Button?
payment request button
As my colleague mentioned earlier today, I think it's an issue managed by Google Pay. Normally it shouldn't require 3DS.
In your code do you call ev.complete('success'); and ev.complete('fail'); based on whether or not confirming the payment produced an error? In that screenshot it looks like the google pay sheet and the 3DS modal are open at the same time and calling that ev.complete method should hide the sheet
yes, i do
and it's weird because i don't get any errors to treat when the request timeout occurs, in that time i am waiting for stripe.handleNextAction to finish
the user can still verify the transaction even after google pay shows the error and it works fine, the 3ds dialog is hidden and the user redirected, but the google pay dialog remains the same and i can't close it
if (setupIntent.status === 'requires_action') {
const {
error: handleNextActionError,
setupIntent: handleNextActionSetupIntent,
} = await stripe.handleNextAction({
clientSecret,
})
if (handleNextActionError) {
console.log('handleNextActionError', handleNextActionError)
event.complete('fail')
return
}
}
And to be clear right before that if statement, you are calling ev.complete('success')?
Yes you should, that function dismisses the sheet. It needs to happen so the next action can actually be handled, otherwise the 3DS modal will show up behind the sheet and not be completable.
Our sample code actually shows this in our payment request button doc https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-complete-payment
hmm, interesting, i missed that part
and if i understant correctly, after i call the complete('success'), i should not call the complete method again, right?
not even with fail
Correct, that method just relates to the sheet here.
Of course, let me know if that doesn't work. I can look in to other things that this may be but this looks very similar to an error I ran in to before from that same line of code being code
worked great, thank you @gleaming harness