#ryon_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1212272292160081972
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!
I also opened a GitHub issue that provides a little more context (I am a little desperate trying for so long, i'll take any help) - https://github.com/stripe/stripe-react-native/issues/1617
async function fetchData() {
try {
const response = await fetch(
"https://api.stripe.com/v1/payment_intents",
{
method: "POST",
headers: {
Authorization:
"Bearer sk_test_xxx",
"Content-Type": "application/x-www-form-urlencoded",
},
Looking at this code, is this your React Native code?
It doesn't look right. This should be backend code. Only backend should use the Secret Key to create PaymentIntent
Yes. Its just my test and I included it all for your convenience. It's not my real code
Eventhough you shouldn't share your sk_test_xxx value to any published site
But okie let's say that's a backend endpoint
Ah fair!
Okie, so on the 2nd time when it failed with 4242, did you notice the request to create PaymentIntent on backend?
https://dashboard.stripe.com/test/logs for the requests log
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Generally it should generate a new Payment Method (pm_xxx) and try to create new PaymentIntent pi_xxx
Actually the payment sheet even displays the error "BEFORE" the create payment intent completes. The backend is still running while the payment sheet throws the error. It just sorta crashes
You mean create the payment method server side? I didn't do that, and I am not sure how I would since the library creates the payment method and returns the ID. That is sent to create the intent server-side
No creating on RN, but it should be recorded in Dashboard log too
Can you just try again now and provide the first PI Id pi_xxx, I could try to trace them down
Ooooh. I didn't check that. Testing now, with the same code on the pastebin. 1 moment
First Attempt: pi_3Oog8GJgUVsS8tQc09gQRmVf
Second Attempt: pi_3Oog93JgUVsS8tQc1W9kAabC
Yea. The UI in the app just says "Something went wrong" as soon as I click the pay button in the payment sheet. I does not wait or anything.
Alright that sounds like an UI bug. Only happen on Android?
Github Issue is a good place to get the team attention ๐ We will ping the team internally too. Have you written to Support before?
Yea. Seems fine on iOS. I could test on there again if you want.
I have been writing to support for over 3 months. I started here first actually, but my actual code is bit... unconventional and maybe the devs didn't get what I was doing, or I couldnt explain correctly. That's why I whipped up a simple implementation this time around.
Sure can you share the email you used? Will check the Support convo
The closest I got to a fix was to reuse the same old payment intent instead of using a new one. The bug still happened on the 2nd attempt but would work the third time, occasionally a few tries later as well. Support also recommended I attach the payment method to the customer with the attach endpoint before creating the intent, but that didn't work either - seems like a weird solution.
email: ryon@sitepact.com
Thanks for the email. I see the conversation now. It looks like we already in touch with the Mobile team and they will be reviewing your feedback yesterday
The issue is, even when you try to attach the Payment Method, the UI in the app is already displaying "Your card is declined", correct?
Yeah I see. I will leave a note on the convo and let the team know, but that's the best I can do ๐ We would go to the same route, but you already have a case being handling