#eli_unexpected

1 messages · Page 1 of 1 (latest)

lethal pebbleBOT
#

👋 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.

hollow hearthBOT
#

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.

deep spire
#

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

narrow thicket
#

Hello! Can you share the code you're using to try and display the Apple Pay sheet?

deep spire
#

It's in the other thread I'll repost

narrow thicket
#

You haven't changed the code since then?

deep spire
#

Well yeah I did but only error handling

narrow thicket
#

Can you please share the current version of the code?

#

Seeing the actual code with the error handling is important.

deep spire
narrow thicket
#

Does line 56 run when this code is run?

#

If so, what does it log?

deep spire
#

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

narrow thicket
#

Can you run the code on an actual device in debug mode while connected to your computer?

deep spire
#

I don't have an iPhone ... I'm planning on using my mom's but it would be tomorrow then

narrow thicket
#

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.

deep spire
#

Okay I'm going to move the error reporting to send even cancels

narrow thicket
#

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.

deep spire
#

Yeah I realize now

deep spire
#

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)

narrow thicket
#

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?

deep spire
#

never appears

narrow thicket
#

Is it possible some other part of your app is canceling the sheet?

deep spire
#

how though

#

I'll send my full code here too

narrow thicket
#

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.

deep spire
narrow thicket
#

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.

deep spire
#

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

hollow hearthBOT
narrow thicket
deep spire
#

ephemeral secret?

wheat gate
#

Yes, and the customer id

narrow thicket
#

I'm taking off, but Orakaro can help you with any other questions you have!

deep spire
#

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?

wheat gate
#

Yeah sounds good. When you look at the PI after paid, you should see the customer field with your customer id

deep spire
#

great. just curious, in what cases is ephemeral secret used then?

wheat gate
#

That’s when initializing the PaymentSheet and before confirmation. Take a look at the Doc!