-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 3ds window not opening on Android when using payment intent #9659
Comments
No it didn't go. Still the same. If I try to repeat a payment having a user secret I see screen 3ds check starting and then have a fail event as a response. @Composable
actual fun ThreeDSScreen(
publishableKey: String,
secret: String,
onSuccess: () -> Unit,
onCancel: () -> Unit,
onFail: () -> Unit,
) {
val paymentLauncher = rememberPaymentLauncher(
publishableKey = publishableKey,
stripeAccountId = null,
callback = PaymentResultCallback(
onSuccess = onSuccess,
onCancel = onCancel,
onFail = onFail
)
)
LaunchedEffect(secret) {
delay(300)
paymentLauncher.confirm(
ConfirmPaymentIntentParams.create(
clientSecret = secret,
paymentMethodType = PaymentMethod.Type.Card
)
)
}
}
class PaymentResultCallback(
private val onSuccess: () -> Unit,
private val onCancel: () -> Unit,
private val onFail: () -> Unit,
) : PaymentLauncher.PaymentResultCallback {
override fun onPaymentResult(paymentResult: PaymentResult) {
when (paymentResult) {
is PaymentResult.Completed -> {
onSuccess()
}
is PaymentResult.Canceled -> {
onCancel()
}
is PaymentResult.Failed -> {
onFail()
}
}
}
} |
@derynia Can you try one of these test cards? https://docs.stripe.com/testing?locale=en-GB#3d-secure-mobile-challenge-flows The |
Used this one The 3ds screen is different but the behaviour is the same. The same issue. I'd also want too point out that I'm using this all not on pure Android app but in KMP app. But the 3ds test screen runs normally when I'm making a payment intent and at once trying to run 3ds confirmation. But it doesn't work when I try to confirm payment when I'm already having client secret. I thought maybe the problem is that I'm entering Composable function two times. But no I tested in debugger I enter it only one time. |
Summary
I have the following problem, processing payment with 3ds card. My app uses Jetpack compose I have a payment screen. So I create a payment intent with new or saved card. Then I check if I need 3ds and start 3ds processing the following way:
Code to reproduce
So everything works if I'm doing it first time. I create a card or use saved, I create a payment intent and get it's secret and then I call this code above. And the screen works fine.
But then I'm stopping app on 3ds confirmation screen. I rerun app and go to the Store menu in my app. When starting it checks payment intent and if it exists and requires confirmation I ask user whether he wants to retry. User press yes and stripe confirmation window starts opening and closes at once.
I'm getting Fail from Stripe. So I'm trying to cancel intent. In my example cancelling didn't succeeded. So I entered my store once again. Again it checks for pending payment intents. It asked again if I want to retry and from the second attempt Stripe confirmation window opened successfully.
Android version
All versions
Impacted devices
All deviices
Installation method
Build from Android studio
Dependency Versions
21.0.1
SDK classes
all SDK
Video
https://drive.google.com/file/d/1utr0448QR_-Qp8xJYFz5FjNnXyzx4yIo/view?usp=sharing
Other information
I use stripe test card 4000 0025 0000 3155
The text was updated successfully, but these errors were encountered: