#weretaco-terminal
1 messages ยท Page 1 of 1 (latest)
Hello! Give me a few minutes to dig into this a bit more
What kind of reader and which SDK are you working with?
gotcha - and do you also have an example of this happening recently? if you give the reader serial number and a general time range I can look for logs on my end
๐ let me take a look
if you're in a position to quickly test something out - what happens when you attempt an additional call from the disconnected reader? Is the onUnexpectedReaderDisconnect callback triggered then?
no
just get the error that it's lost it's authentication
and i know it's disconnected at that point because i do a check before attempting to submit a paymentintent
Hmmm... okay give me a bit to test some things out
hrm...
you're right
calls the unexpected
when i try and do something
then i'm seeing this for an error
when i call collectpaymentmethod
it calls the unexpectedDisconnect
oh nice! So I believe that's expected then - we don't trigger the onUnexpectedReaderDisconnect callback as soon as the reader gets connected to a different POS. It's when the original POS attempts to use the connection that we trigger it
so if i want to maintain status the user can see, i'll have to poll the reader periodically
feel free to submit a user request to have onConnectionStatusChange called when it's disconnected ๐
if you really want to maintain that status then yes, you'd have to poll the reader periodically
from my understanding of how the smart readers work, we're not maintaining a consistent connection - so the POS can't know immediately when the connection is broken
ah ok.. so it'll likely be the same when i change to use the server side as well
it basically just has the current auth token to talk to the reader and not a persistent connection and when someone new connects, the auth token changes so it's no longer valid?
yup!
ok, thanks for checking
i assume during actual payment collection it's different so i can rely on the fail_if_in_use flag?
Depends on what you mean be it being different - if you're talking about wanting to ensure the connection with the original POS + reader is maintained during the payment process (not allowing a different POS to connect) then yes, setting fail_if_in_use: true will do the trick
The table here (https://stripe.com/docs/terminal/payments/connect-reader?terminal-sdk-platform=js&reader-type=internet#multiple-connections) has a nice break down of this
yes
just want to make sure it can't disconnect during payment and will do the standard documented behavior
๐ yup! If you're seeing otherwise let us know