Skip to content
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

App crash on android when initPaymentSheet with customFlow #1815

Open
helloprakass opened this issue Jan 24, 2025 · 0 comments
Open

App crash on android when initPaymentSheet with customFlow #1815

helloprakass opened this issue Jan 24, 2025 · 0 comments

Comments

@helloprakass
Copy link

helloprakass commented Jan 24, 2025

Describe the bug
We are integrated mobile pay payment through stripe using this @stripe/stripe-react-native

To Reproduce
Steps to reproduce the behavior:

  1. Using stripe provider to initialize stripe sdk

  2. Payment initiate code

  3. const { error, ...rest }: any = await initPaymentSheet({ merchantDisplayName: "Example, Inc.", customerId: customer, customerEphemeralKeySecret: ephemeralKey, paymentIntentClientSecret: paymentIntent, defaultBillingDetails: { name: "Jane Doe", }, customFlow: true, returnURL: Linking.createURL(mobilpayment, { queryParams: { ...data, amount: amount, paymentMethod: type, }, }), style: "alwaysLight", });

  4. after getting credentials from above flow
    const { error: errors } = await confirmPaymentSheetPayment();

we open confirm paymentSheet.

  1. See error
    Your app just crashed. See the error below. java.lang.IllegalStateException: Attempting to confirm intent for invalid payment selection: null com.stripe.android.paymentsheet.IntentConfirmationInterceptorKtxKt.intercept(IntentConfirmationInterceptorKtx.kt:31) com.stripe.android.paymentsheet.flowcontroller.DefaultFlowController$confirmPaymentSelection$1.invokeSuspend(DefaultFlowController.kt:353) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) android.os.Handler.handleCallback(Handler.java:942) android.os.Handler.dispatchMessage(Handler.java:99) android.os.Looper.loopOnce(Looper.java:211) android.os.Looper.loop(Looper.java:300) android.app.ActivityThread.main(ActivityThread.java:8503) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)

Expected behavior
Expected to complete flow with stripe

but it get crash due to payment options is undefined.

it is working perfectly on iOS

Smartphone (please complete the following information):

  • Device:Redmi Note 11 pro 5G
  • OS: 1.0.12.0.TKCMIXM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant