#eli_unexpected
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ 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!
⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
🔗 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/1215084255634399294
📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- eli_unexpected, 2 days ago, 23 messages
- eli_unexpected, 5 days ago, 4 messages
This is a continuation of the previous thread. I added error handling and it seems like stripe either thinks that the user cancelled or returned true
Because my code that will send me an email only runs on an error that isn't a cancel and it is not hitting
Hello! Can you share the code you're using to try and display the Apple Pay sheet?
It's in the other thread I'll repost
You haven't changed the code since then?
Can you please share the current version of the code?
Seeing the actual code with the error handling is important.
Lien 56 would only log cancelled and I don't know how to check logs when I don't have an iPhone and the code works on simulator
Not sure what the error code would be
Can you run the code on an actual device in debug mode while connected to your computer?
I don't have an iPhone ... I'm planning on using my mom's but it would be tomorrow then
The key to solving this is getting the full content of the error that's thrown. To do that you either need to have the code in the app running on a real device relay that information to your server or you need to debug it on a real device.
Okay I'm going to move the error reporting to send even cancels
If you do adjust your logging code you should serialize the entire error object and send the whole thing to your server instead of just parts of it.
Yeah I realize now
I got two messages
{
"where": "openApplePay",
"error.code": "Canceled",
"error.message": "The payment has been canceled"
}
and
{
"where": "startPayment !paymentSucc",
"what": "payment failed without throwing error"
}
which comes because of the previous one (added this one in)
Canceled usually indicates the payment sheet was canceled by the user, but it can also mean something in your app canceled it. What happens on the device's screen when this happens? Does the sheet appear and dismiss itself? Does the sheet never appear? Something else?
never appears
Is it possible some other part of your app is canceling the sheet?
I can't go through all of your code. It's going to be extremely hard to debug this if you're not able to reproduce the issue on demand and debug it when it happens.
Server snippet
Being able to place a breakpoint, for example, and see what the call stack looks like when the payment sheet is canceled would be extremely helpful.
I guess I would also like to know what's the eastiest way that avoids the user from re-entering their card info on their next purchase, assuming that I have apple pay disabled
If you initialize the Payment Sheet with a Customer's ephemeral secret it should show their saved Payment Methods: https://stripe.dev/stripe-react-native/api-reference/index.html#initPaymentSheet
ephemeral secret?
Yes, and the customer id
okay so what I did was add a customer and attached the customer id to the user as well as the payment intent and then set SetupFutureUsage = "off_session". Is that good enough?
Yeah sounds good. When you look at the PI after paid, you should see the customer field with your customer id
great. just curious, in what cases is ephemeral secret used then?
That’s when initializing the PaymentSheet and before confirmation. Take a look at the Doc!