react-native-stripe-payments
react-native-stripe-payments copied to clipboard
App crashes without giving any error on confirmPayment
stripe.confirmPayment('key', cardDetails) .then(result => { console.log('strip payment responce ', result) }) .catch(err =>{ console.log('strip error', err) } )
Hey! What does the cash log say? I believe you should see stack of native crash log (either on iOS or Android)
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.
but I am using valid key
can I use my client secret from my strip account in app directly ? or backend developer will give me through API ?
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.
ok ill try in coming hours will let you know shortly thanks for your response
I can confirm that this still happens. I have used both publishable and secret keys and this crash/error still happens
Can you provide crash log?