#himesh-paymentsheet
1 messages ยท Page 1 of 1 (latest)
Add a card detail from the UI which will be presented when we call presentPaymentSheet()
Screenshot_2022-09-07_at_5.01.22_PM.png
this card number and all so after that i can call the paymentintent api for finally charge the customer.
after entering card details and click on continue button then i get below object
Why do you need the card details though? Submitting on the Payment Sheet will confirm/complete the payment
See i just did the submit only with the card details then it show incomplete payment in stripe dashboard
can you post the ID pi_xxx of the PaymentIntent?
ok. so no logs on our side. What did the console.logs and Alert in the code snippet you posted print?
this is the log they print after clicking on continue button
I don't know what that is, looks like you tried to post an image on Discord and it didn't work
can you share the complete code?
see
like what is that presentPaymentSheet function?
i just filled out card details and then i clicked continue button
on click off Checkout button i call presentPaymentSheet() function which shows me Add a card UI.
when do you call confirmPayment?
Ohh i don't call that method actually ๐ฆ
can you tell me when am i suppose to call that method please ?
well that's the problem then
ah no, I'm wrong, you don't have to
presenting should work. So we're back to, what is the full code you have?
where is initializePaymentSheet called from?
am not sure which stripe api i need to call to confirm the final payment when that add card UI is showed
ah ok you use this customFlow thing
that's why. Was there are a reason you're using that?
is it coz of that customFlow props ?
if you remove it then this will work as expected
yes, you are using customFlow:true which implies you want to do https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-flowcontroller but you don't have of the extra code for that approach (you'd have to call confirmPaymentSheetPayment as mentioned there, which you don't do in your code right now)
so either remove customFlow or, if you are using it, integrate it correctly using the guide above
I removed cutomFlow but still it gave me above result ๐ฆ
make sure you saved the file and are running the latest version of the app
and then, share the exact full code again, and the PaymentIntent ID pi_xxxx again, for the fresh attempt after triple-checking it on your side
okay let me run it again and let you know
Amazing it worked ๐
Thank you so muchhhhh
๐
awesome!
๐คฉ