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 crashes without giving any error on confirmPayment #18

Open
Ahmad5448 opened this issue Jan 4, 2021 · 8 comments
Open

App crashes without giving any error on confirmPayment #18

Ahmad5448 opened this issue Jan 4, 2021 · 8 comments

Comments

@Ahmad5448
Copy link

stripe.confirmPayment('key', cardDetails)
.then(result => {
console.log('strip payment responce ', result)
})
.catch(err =>{
console.log('strip error', err)
}
)

@viktorasl
Copy link
Member

Hey! What does the cash log say? I believe you should see stack of native crash log (either on iOS or Android)

@Ahmad5448
Copy link
Author

2021-01-05 22:54:36.399 24195-24323/com.desider.hayatiffy E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
Process: com.desider.hayatiffy, PID: 24195
java.lang.IllegalArgumentException: Invalid client secret: sk_test_51HiwWFF6nhJo*************************
at com.stripe.android.model.PaymentIntent$ClientSecret.(PaymentIntent.kt:266)
at com.stripe.android.StripeApiRepository.confirmPaymentIntent(StripeApiRepository.kt:111)
at com.stripe.android.StripePaymentController$ConfirmStripeIntentTask.getResult$stripe_release(StripePaymentController.kt:529)
at com.stripe.android.ApiOperation$execute$1.invokeSuspend(ApiOperation.kt:23)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

@Ahmad5448
Copy link
Author

but I am using valid key

@Ahmad5448
Copy link
Author

can I use my client secret from my strip account in app directly ? or backend developer will give me through API ?

@viktorasl
Copy link
Member

Please use publishable key (https://stripe.com/docs/keys). You should not use secret key on app.
It's fair though that library should not cause an app to crash but return error instead.

@Ahmad5448
Copy link
Author

ok ill try in coming hours
will let you know shortly
thanks for your response

@Billmike
Copy link

I can confirm that this still happens. I have used both publishable and secret keys and this crash/error still happens

@viktorasl
Copy link
Member

Can you provide crash log?

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

3 participants