#jimmy_begins
1 messages · Page 1 of 1 (latest)
We are using Stripe Elements in a React App and we have largely followed the dev guide for this.
We were using this guide: https://stripe.com/docs/stripe-js/elements/payment-request-button
The bug was that after the Google Pay or Apple Pay modal has launched, if 3DS was triggered, we did not handle the this part correctly. So the customer always ended up stuck unable to complete payment.
When using PRB, you shouldn't worry about 3DS as it's handled by Stripe. What were you trying to do?
But the handling of the 3DS is different, isn't it? On our side that is. In the normal flow we handle actions ourselves, but with 3DS we PRB we have to initially not handle the actions then subsequently do so. As described here: https://stripe.com/docs/payments/3d-secure?locale=en-GB#confirm-payment-intent
I don't see that there's a need to do this manually when using Payment Request Button.
So is this where we are going wrong? In the place where we set up the digital wallet we add the listener with handleActions: false. We should just complete as normal?
Overall though, the issue is being unable to test this flow
Because of this in the docs:
'{{PAYMENT_INTENT_CLIENT_SECRET}}',
{
payment_method: {card: cardElement},
return_url: 'https://example.com/return_url'
},
// Disable the default next action
handling.
{handleActions: false}
).then(function(result) {
// Handle result.error or result.paymentIntent
// More details in Step 2.
});```
Hey! Taking over for my colleague. That part of the doc is for the case you want to handle your self the 3DS. Is there a particular reason why you want to handle 3DS with the the PRB by your self ?
No not really. We just had issues with it without that. I believe we were advised here to do this. But really, if there is a way to test this locally, we can work out the issue. We have this implementation working well on our sister site, so we just need to find a way to test locally
What is the issue exactly ? do you have a sample PaymentIntent Id ?
I don't have one to hand, no
I invite you to try reproducing the issue on your end first without handling manually the 3DS (unless you have a specific need for it)
Don't hesitate to come back if you have a PaymentIntent example Id.
That is what we are trying to do locally. Hence my initial query.
How've you noticed that there was a bug ? there must be some Stripe Object Ids in the flow if it's actually related to Stripe.
Here is one we create when we had the site live: pi_3NQsVNAzzqzdaRDE2PmiM1nz
Ideally, we want to be able to test these issues without having to deploy code all the way to production and try again. Obviously, that is a very poor development cycle. We test 3DS locally then deploy when we are confident it is working well, for example.
Thanks for sharing this. According to that PaymentIntent, the payment went through 3DS successfully, here is the final request Id req_FfoCoVKRHcGnMT. The only issue I'm seeing is there was a refund failure request, which request is this one req_8vrlWvRwmThkgI
The issue is that you are passing a refund request for a 0 amount, you need to pass a value greater or equal to 1.
I don't see any issue related to the request payment button.
So if you look at the timeline the initial 3DS failed (this was the Gpay test). There was no 3DS modal and the payment failed. We thought it might be an issue with the card issuer rejecting the payment, but when we saw it wasn't we tested completing without GPay and we got the 3DS modal and completed as normal.
The refund request was for a different bug we were testing which we have now resolved
Basically this bug was raised as a ticket and I am now picking it up. I just wondered if there is a way to test the issue locally as my person flow as a dev is to try to recreate the issue locally. Without this, it is very hard to work on the issue.
There was no 3DS modal and the payment failed.
Where are you seeing this? the payment is succeeded:
https://dashboard.stripe.com/payments/pi_3NQsVNAzzqzdaRDE2PmiM1nz
The customer managed to complete the 3DS flow successfully.
this was the Gpay test
When you tested with Gpay what was the output ? is there a particular error log? maybe it's a Google Pay issue with that card
The second from bottom event is the failure. This was 3DS using GPay
We tried that same card on our sister site and it worked fine
But honestly, none of this is the issue. I just want to know if you can test locally with GPay and 3DS
That should be this request Id req_T9QgJnwS2YZjq6 and it was successfull request, for Stripe Side I'm not seeing an issue honestly... mayebe this is something hapened with Google Pay checkout flow...
No, in order to test Google Pay with Stripe you need to have a valid card added to your wallet. There isn't a way to trigger 3DS with GPay in test mode
Such a frustrating limitation that Google/Apple put on this service. Thanks for your help