#.zvenko

1 messages · Page 1 of 1 (latest)

worn topazBOT
glossy geyser
#

Hi! Let me help you with this.

#

What's the error you see in the console?

ionic comet
glossy geyser
#

This is Express Checkout Button?

ionic comet
#

payment request button

worn topazBOT
glossy geyser
#

As my colleague mentioned earlier today, I think it's an issue managed by Google Pay. Normally it shouldn't require 3DS.

gleaming harness
#

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

ionic comet
#

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
    }
  }
gleaming harness
#

And to be clear right before that if statement, you are calling ev.complete('success')?

ionic comet
#

no, should i?

#

before the authorisation is complete?

gleaming harness
#

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.

ionic comet
#

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

gleaming harness
#

Correct, that method just relates to the sheet here.

ionic comet
#

oh, ok

#

thank you for your help

gleaming harness
#

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

ionic comet
#

worked great, thank you @gleaming harness