#TootLips

1 messages · Page 1 of 1 (latest)

tawny skiffBOT
untold yacht
#

Interesting, are you trying to manually trigger the 3DS flow?
Is there a guide you're following for this?

stray warren
tawny skiffBOT
stray warren
#

the first attempt at using the client secret works correctly and the 3ds webview is shown.

However, if a user terminates the mobile app while viewing the 3ds auth web view, the app will attempt to use the same same clientSecret to show the 3ds promp again. Using the same clientSecret a second time, gives us the error stating that JSON payload could not be parsed

normal atlas
#

Stepping in and catching up

untold yacht
#

Can you share the code that calls handleNextAction ?

stray warren
#

self.stripePaymentHandler.handleNextAction(forPayment: secret, with: context, returnURL: nil)
secret is the clientSecret and context is an objcet that adheres to STPAuthenticationContext

untold yacht
#

Gotcha. We don't typically see folks using the function directly as PaymentSheet & flowcontroller flow supports 3DS natively.

Is this something that used to work before but broke recently?

stray warren
#

no, this has been broken for some time now, but addressing payment errors has become a priority recently for us

stray warren
#

same error with the new function

untold yacht
#

Interesting..

stray warren
#

so, when using a brand new clientSecret https://api.stripe.com/v1/3ds2/authenticate returns

  "id": "threeds2_1Mz4ejJjI7oqAmtifF9rzbAP",
  "object": "three_d_secure_2",
  "ares": null,
  "created": 1682024681,
  "creq": null,
  "error": null,
  "fallback_redirect_url": "https://hooks.stripe.com/3d_secure_2/hosted/payatt_3Mz4eeJjI7oqAmti1OkSMOnV?merchant=acct_1FbucmJjI7oqAmti&payment_intent=pi_3Mz4eeJjI7oqAmti1iMsqYUe&payment_intent_client_secret=pi_3Mz4eeJjI7oqAmti1iMsqYUe_secret_Vg8eDlZ3kzoe2YxuLHHlTB7aI&publishable_key=pk_test_2Zxs26AlTZezW9XlnyvmAsAY00NpoSuGI9&source=payatt_3Mz4eeJjI7oqAmti1OkSMOnV",
  "livemode": false,
  "source": "payatt_3Mz4eeJjI7oqAmti1OkSMOnV",
  "state": null
}```
This json is valid, and the 3ds prompt is shown
untold yacht
#

How exactly are you attempting to use the same clientSecret?
Are you retrieving it again OR have you stored it locally?

stray warren
#

We get the clientSecret from our backend which has webhooks to wait for a response for 3ds.

untold yacht
#

yeah, quitting the app fails the 3DS challenge so a new challenge is required.

stray warren
#

this same flow works for 3ds1 cards

#

but not 3ds2

untold yacht
stray warren
#

ok, give me a second

#

retrievePaymentIntent(withClientSecret returns the same clientSecret

untold yacht
#

Right but I am curious to see if it presents a new challenge instead

#

If that doesn't work, a quick fix would be to cancel the previous PaymentIntent and create a new one when your user relaunches the app

stray warren
#

i get same error after getting the payment intent again

untold yacht
#

Ah that's a bummer

stray warren
#

is this potentially a stripe iOS SDK bug? not being able to parse json seems like an unexpected scenario

untold yacht
#

Could be. We'll need to reproduce this behavior on our end to make sure we havent' missed anything.

#

Would you mind writing into our support team via
https://support.stripe.com/?contact=true

Providing as much details as you can about your integration such as SDK version, sample code etc.
If you can share a minimal sample app that can help us reproduce this on our end, that'd be awesome too.

#

Make sure to mention you spoke with Hanzo on discord

#

Let us know once you write in so that our team can pull the ticket

#

In the meantime, following should definitely work as an alternative

If that doesn't work, a quick fix would be to cancel the previous PaymentIntent and create a new one when your user relaunches the app

stray warren
#

ok, thanks for the help