#weretaco-terminal

1 messages ยท Page 1 of 1 (latest)

signal tide
#

Hello! Give me a few minutes to dig into this a bit more

#

What kind of reader and which SDK are you working with?

lethal trail
#

i'm using a the wisepos

#

and the javascript sdk

signal tide
#

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

lethal trail
#

was just testing with 1 here before i sent the message

#

serial: wsc513104000792

signal tide
#

๐Ÿ‘ 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?

lethal trail
#

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

signal tide
#

Hmmm... okay give me a bit to test some things out

lethal trail
#

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

signal tide
#

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

lethal trail
#

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 ๐Ÿ™‚

signal tide
#

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

lethal trail
#

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?

signal tide
#

yup!

lethal trail
#

ok, thanks for checking

#

i assume during actual payment collection it's different so i can rely on the fail_if_in_use flag?

signal tide
#

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

lethal trail
#

yes

#

just want to make sure it can't disconnect during payment and will do the standard documented behavior

signal tide
#

๐Ÿ‘ yup! If you're seeing otherwise let us know

lethal trail
#

thanks again

#

so just doing some testing on this polling

#

it doesn't look like getConnectionStatus actually polls the reader/tests it

#

it stays connected until i do something like collectpaymentmethod

signal tide
#

Ah dang it - I didn't realize that getConnectionStatus() wouldn't be an accurate reflection of the connection

#

I can file this as feedback!