#mzzay_terminal

1 messages ยท Page 1 of 1 (latest)

patent ironBOT
#

๐Ÿ‘‹ 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.

gritty hedgeBOT
twin depot
#

Hello! What specifically would you like to discuss?

hushed dove
#

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.

twin depot
#

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)

hushed dove
#

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 ?

twin depot
#

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

Prepare your application and backend to collect payments using Stripe Terminal.

patent ironBOT
#

mzzay_terminal

hushed dove
#

I'm using webhook, I will explain my implementation bellow

gritty hedgeBOT
hushed dove
#

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.

calm storm
#

Hi ๐Ÿ‘‹

My colleague has to go so I'm stepping in. Give me a minute to catch up.

hushed dove
#

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 !

calm storm
#

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?

hushed dove
#

Yes, it's the current integration

#

The product is already in testing on some sales points

calm storm
#

Okay so now, the Kiosk is the POS system, correct?

hushed dove
#

The kiosk is the whole device machine

#

So a display and the POS

calm storm
#

Both the POS and the reader, right?

hushed dove
#

I'm not sure to have the correct translsation of POS, give me a minute'

hushed dove
calm storm
#

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.

hushed dove
#

So adding a button ?

#

Or every 3 seconds send a request to check the payment status

#

That's what you are suggesting ?

calm storm
#

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.

hushed dove
#

What is the "reader polling solution" ? I don't understand

calm storm
#

Or every 3 seconds send a request to check the payment status
SOrry I meant API polling. Checking the payment status

hushed dove
#

Ok !

#

I'll use that, thanks !

#

Have a nice day