#iffa_unexpected

1 messages Β· Page 1 of 1 (latest)

echo bearBOT
#

πŸ‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

πŸ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1417444214966452245

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

dire mica
#

πŸ‘‹ happy to help

#

it seems you're using the PlatformPayButton instead

#

would you mind sharing the PaymentIntent ID that failed with requires_action?

limber smelt
dire mica
#

you should create the PaymetnIntent and confirm on the frontend instead of confirming on the backend

#

would you mind sharing the PI ID that is working on the web?

limber smelt
#

pi_3S7vXDHZBAnLXGDV1FSdd4rK

dire mica
#

ok I see

#

so in the web version of your code you're using the confirmationToken which has all the information about the PaymentMethod and it's a different flow then the one you're using in your RN implementation

limber smelt
#

Yeah we have two different flows because the RN SDK doesn't provide a similar flow to web at all. the RN platform payment button "validate payment method on server" flow is also seemingly different from the RN payment sheet one

limber smelt
dire mica
#

I do think that you should create the PaymentMethod first, create the PaymentIntent, then send the secret and confirm on the RN app

#

that's the best option to avoid 3DS

limber smelt
#

so create with confirm: false, return the secret, then call confirmPlatformPayPayment?

dire mica
#

you don't need to pass confirm: false you just omit it

#

and yes then call confrimPlatformPayPayment

limber smelt
#

i can test it but i'm worried that'll lead into us showing the native platform payment sheet twice

#

since i believe it will have closed in-between

dire mica
#

no it will only show the 3DS

limber smelt
#

hmm ok, i will test this quickly

limber smelt
dire mica
#

would you mind sharing your code please?

echo bearBOT
coral spoke
limber smelt
coral spoke
#

Can you share the PaymentIntent Id ?

coral spoke
limber smelt
# dire mica can you use the `confirmPayment` instead of `confirmPlatformPayPayment`? https:/...

This worked for a standard Gpay payment without 3DS, but if i use a card that requires 3DS, it fails:

 LOG  Payment method created using createPlatformPayPaymentMethod, calling API pm_1S7wfDHZBAnLXGDV5bjLTXgX
 LOG  Received payment intent client secret, calling confirmPayment {"paymentIntentStatus": "requires_confirmation"}
 LOG  Received confirmPayment result {"error": {"code": "Failed", "declineCode": "authentication_required", "localizedMessage": "Your card was declined. This transaction requires authentication.", "message": "Your card was declined. This transaction requires authentication.", "stripeErrorCode": "authentication_required", "type": "card_error"}}
coral spoke
#

For the PaymentIntent pi_3S7v58HZBAnLXGDV1rMHxdsL, the bank issuer declined the payment (no 3DS action required), so the customer need to provide another payment method or re-collect it from scratch

#

That's a difference case from the PaymentIntent pi_3S7vXDHZBAnLXGDV1FSdd4rK (which requested a 3DS)

limber smelt
#

Well I don't know what is happening behind the scenes but here's what I do know:

  • I try to pay using Google Pay and with "3DS OTP" card selected

This works on the web (3DS is initiated) but fails in React Native (authentication_required) when calling confirmPayment with the PI client secret (or with confirm=true in the backend)

coral spoke
#

Well I don't know what is happening behind the scenes but here's what I do know:
You need to adapt your integration to handle both use cases

#

After you create the PaymentIntent:

  • If the request succeeded and the PaymentIntent is in requires action status => you call the handleNextAction or confirmPayment on the frontend
  • If the request fails with a (bank issue) decline, you ask the customer to use another saved card or re-collect a new PaymentMethod
limber smelt
#

Why is the same GPay card getting requires action status from the web but requires confirmation from RN? that's what i'm not understanding atm

gritty sequoia
#

hi! I'm taking over this thread.

#

it's up to the bank to decide what to do with the payment, that's not something you can control. so as mentioned above, you need to handle both scenarios.

#

different cards/users/country/device will have different behaviors.

limber smelt
#

I understand that, and am now wondering about the difference in functionality between web & mobile/RN for the exact same test card in GPay.

#

Since it seems I cannot initiate the 3DS flow for testing at all on mobile, but I can just fine on web
(And I need to test 3DS with GPay on mobile because we've had feedback in production from some of our customers that they cannot pay using GPay)

#

pi_3S7vXDHZBAnLXGDV1FSdd4rK this PI is for a GPay test card with 3DS, and initiated 3DS on the web
pi_3S7v58HZBAnLXGDV1rMHxdsLthis PI is for the exact same GPay test card, but on mobile, and does not initiate 3DS (just fails, no matter what wrangling I perform and where)

And here's a payment intent using GPay in production that initiated 3DS (via our mobile app): pi_3S7fAWHZBAnLXGDV1AowfnyR but for whatever reason either due to an implementation issue in our app, or a bug somewhere, no 3DS confirmation ever starts. <- I cannot reproduce this in test mode because I cannot get the payment into such a state.

gritty sequoia
#

thanks for the clarification. I recommend creating a support case, so that our team can look into this more deeply.

echo bearBOT
#

Hello @limber smelt, we have sent you a direct message, please check it at https://discord.com/channels/@me/1417477643917594645

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
limber smelt
#

Opened support case, thanks for the help anyways

echo bearBOT
gritty sequoia
#

Thanks, we'll get back to you shortly by email.

echo bearBOT
echo bearBOT