#mzzay_terminal
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/1213186687916843139
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Hello! What specifically would you like to discuss?
I would like to know if my implementation is correct or if it's better to try to use the JS sdk
The thing is, I have to save in a simple array all the current open connection of each current kiosk which is currently processing a payment, then when I receive a payment_sucess event, I search for the corresponding kiosk, and send him a response.
I think it could be better to use the js sdk but I'm not sure.
Generally the server-driven integration is better (since you don't have to worry about connection issues between the point of sale device and the reader)
Actually the connection between my server and the point of sale is the issue
I have to update the current state to show different screens
So maybe my implementation is not the best one, do you have any suggestions ?
Can you give me a bit more detail on what about your integration isn't ideal? Generally we do recommend using webhook events (see https://docs.stripe.com/terminal/payments/collect-payment?terminal-sdk-platform=server-driven&process=immediately#webhooks) but if you don't want to go that route you could add a "check status" button to your point of sale UI to poll stripe's API or your own DB to know when to continue on to the next screen
mzzay_terminal
Adding this button is the best solution but the kiosk is directly used by client, so it's not the thing that they prefer
I'm using webhook, I will explain my implementation bellow
Kiosk = sale point device btw
So the user select the price of what he wants to buy, then the kiosk is sending an https request to my server to create the payment, the reader update is status and is waiting for a payment. Server side, I saved the res of the http request in a list , it's called http polling (I think), it's like websocket, I'm keeping the connection open between the kiosk and my server. Then when I receive a webhook for a successfull payment, I search in the previous listand send a response.
Hi ๐
My colleague has to go so I'm stepping in. Give me a minute to catch up.
But some clients are telling me that sometime, when the webhook is received by my server, nothing is updated on the kiosk, so maybe the connection was closed because of the duration or something else
Ok perfect now you have the full context !
Hi, yes no problem, thanks !
Thank you!
The server driven itegration would still be a much better solution. The JS integration relies on communicating over the local network (WiFi or LAN) and it can be impossible to debug if you don't have direct access to the network routers.
So can we agree using the server driven integration first?
Yes, it's the current integration
The product is already in testing on some sales points
Okay so now, the Kiosk is the POS system, correct?
Both the POS and the reader, right?
I'm not sure to have the correct translsation of POS, give me a minute'
Ok yes that's right
Great! Okay so the reader polling solution you described earlier is what we would recommend, if triggering the update from the Kiosk is not a valid option.
So adding a button ?
Or every 3 seconds send a request to check the payment status
That's what you are suggesting ?
Adding a "refresh" button is a good option and the first one we recommend. But if you cannot rely on the client to use the button properly, it would make sense ti implement the reader polling solution.
What is the "reader polling solution" ? I don't understand
Or every 3 seconds send a request to check the payment status
SOrry I meant API polling. Checking the payment status