#newtreyes_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ 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/1250010057043742731
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi @tepid hearth
Hi @outer stump
we don't really support flutter in this channel
Ok. The issue is we've had cases where the user kills the app after collectSetupIntentPaymentMethod() is called. When that happens, we lose the Cancelable reference. And when the user restarts the app, it tries to reconnect to the reader and it fails because it tells us that the process is still running.
why don't you cancel the Cancelable on app close?
It's not always possible to do so. The OS kills the app and the app receives no warning about what's going to happen.
We can kill the process if the app is detached or paused though
but it would be great if on restart, we could query the status (is it scanning for readers? Is it waiting for the CC to be read?) and react to that.
hmmm, let me think about that for a second
Thank you
I think the only possible solution here is to use the FailIfInUse parameter when connecting to the reader
Right. But then the only way to recover is to ask the user to restart the reader completely, right?
no
when you connect with this flag on
When failIfInUse is true, an error will be returned when attempting to connect to a reader that is already collecting a payment
which means you need to set failIfInUse to false
and then this would cancel the existing action on the terminal
Nice!!!
It would be great if that usage scenario would be detailed in the docs
I was not considering that
let me check but I should hope so
it seems it was documented ๐คฆ my bad ๐
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!