stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Stripe UI 3DS failing repeatedly for UK customer

Open MatthewCallery opened this issue 2 years ago • 1 comments

Summary

We are using Stripe's PaymentSheet UI for users to add their card details.

For a UK customer, inputting their card details (for a UK card provider) repeatedly fails on the 3DS step.

  • Customer inputs their card details into Stripe's PaymentSheet UI
  • The 3DS window appears asking the user to approve in their banking app
  • The user opens their banking app to approve
  • When they return to our app, the 3DS window has disappeared but their card details have not been added
  • last_setup_error is setup_intent_authentication_failure
  • Setup Intent ID is seti_1NmzcjHXJIEmyvuGpgR48i9O
  • Their card provider is the Royal Bank of Scotland

IllegalArgumentException Failed to retrieve a PaymentSheetResult.

com.stripe.android.paymentsheet.PaymentSheetContractV2 in parseResult at line 30
com.stripe.android.paymentsheet.PaymentSheetContractV2 in parseResult at line 13
androidx.activity.result.ActivityResultRegistry in dispatchResult
androidx.activity.result.ActivityResultRegistry in doDispatch at line 418
androidx.activity.result.ActivityResultRegistry in dispatchResult at line 375
androidx.activity.ComponentActivity in onActivityResult
android.app.Activity in dispatchActivityResult at line 8951
android.app.ActivityThread in deliverResults at line 5987
android.app.ActivityThread in handleSendResult at line 6033
android.app.servertransaction.ActivityResultItem in execute at line 67
android.app.servertransaction.ActivityTransactionItem in execute at line 45
android.app.servertransaction.TransactionExecutor in executeCallbacks at line 135
android.app.servertransaction.TransactionExecutor in execute at line 95
android.app.ActivityThread$H in handleMessage at line 2574
android.os.Handler in dispatchMessage at line 106
android.os.Looper in loopOnce at line 226
android.os.Looper in loop at line 313
android.app.ActivityThread in main at line 8757
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 604
com.android.internal.os.ZygoteInit in main at line 1067

Code to reproduce

val stripeLauncher = rememberLauncherForActivityResult(
    contract = PaymentSheetContract(),
    onResult = viewModel::handleSetupResult
)

stripeLauncher.launch(
    PaymentSheetContract.Args.createSetupIntentArgs(
        clientSecret = secret,
        config = PaymentSheet.Configuration(
            merchantDisplayName = "App name",
            appearance = stripeAppearance,
        )
    )
)

Android version

Android 13

Impacted devices

Samsung Galaxy S23 Ultra

Installation method

gradle plugin

Dependency Versions

kotlin 1.8.22 stripe-android 20.27.2 Android Gradle Plugin 8.1.0 Gradle: 8.0

SDK classes

PaymentSheetContract

Video

Other information

MatthewCallery avatar Sep 05 '23 14:09 MatthewCallery

Hi @MatthewCallery, I tried to reproduce your issue with the sample code you provided, but was unsuccessful. Do you have more detailed repro steps? Like how did the user relaunch the app? Do you have a video so that I can observe what is happening?

Additionally, the PaymentSheetContract that you are using is deprecated, we recommend that you use rememberPaymentSheet. Can you try refactoring your code to use rememberPaymentSheet and report back here?

jameswoo-stripe avatar Sep 12 '23 18:09 jameswoo-stripe