#Madalina oiegas-RN-paymentsheet
1 messages ยท Page 1 of 1 (latest)
Gotcha, so you're launching the paymentSheet, completing the payment process, and once the sheet is dismissed you're seeing that paymentOptions is still undefined?
yes
๐ gotcha, and what payment method are using during your testing?
Visa credit card
if the second response object(paymentOption ) from presentPaymentSheet is undefined, then what is the value of error instead?
it's not returned. This is all I get from presentPaymentSheet
fair enough, let me check some things and get back to you in a little while
yeah I tested this and looked at the code a bit and it seems like this never gets set, or at least it's not consistent. We don't use it in any of our examples.
so I would say to just not use this paymentOption since it's not really returned in a consistent way.
What are you really trying to do?
as far as I know this field only really gets returned when you're using the more complex customFlow integration(https://stripe.com/docs/payments/accept-a-payment?platform=react-native#react-native-flowcontroller), in the normal usage of the PaymentSheet it's usually undefined. So I would just ignore it for now.
then the backend should handle the response of the /setup_intens/${id}/confirm ?that can be visible on Stripe Dashboard?
well your backend gets a webhook about this, or you could send a request to it from your app.
you know the setup succeeded because there was no error returned so you can let your server know
you can call https://stripe.dev/stripe-react-native/api-reference/modules.html#retrieveSetupIntent at this point in the app as well and read the details of the card used, I think. ; it's not returned as a response from calling presentPaymentSheet, as you probably expected.
tried to call this but the app crashes withpout any error returned. I will investigate it further
hmm it shouldn't just crash, so I'm sure there's something simple that's slightly wrong there then!