#mrelliot69

1 messages · Page 1 of 1 (latest)

woeful prismBOT
grizzled eagle
#

Go ahead!

#

im using currently to test bbpos wise e, but i saw on the docs that the correct aproach to implement with this type of terminal its server driven one ( why is that?)
Server-driven is the recommended approach for Terminal now yes (where available). It's generally more reliable as you don't need to persist a Bluetooth connection from your front-end/POS to the reader as it communicates directly with the API.
would like to understand what the action processPayment with reader actually does
Initiates the payment method collection flow on the reader to complete the payment.
how i can handle errrors,
Bit of a vague question, anything more specific?
what should i do when a user simply leaves the checkout?
Checkout in what context? Terminal is for in-person flows, so you'd just have something in your POS/UI that calls cancel_action on the reader.
at which point is the money removed from the client bank ? when i processPayment in stripe hold x amount from their bank account? how to release it in case of erros/abandon cart
I don't understand the quesrion

woeful prismBOT
drifting barn
#

how i can handle the time of wait in order to then propertly capture the payment
I'm not sure what that means

what its the recomend seconds to wait for the user to tap in/tap out, in order to cancel action or capture the payment, that its the flow of this that im not understanding
there's no recommendation, you don't "wait" a certain number of seconds. You use webhooks and get a notification that way to tell you when the payment is complete, that's when you can do next steps like capturing the PaymentIntent.

#

there's no reason for your UI to be blocked.

#

I'm not sure how else I can answer, there are multiple approaches in that doc. I'd suggest writing some code and trying it out and it will make more sense.

#

there's no timeout in the Terminal JS SDK, the Promise just waits to resolve when the reader has communicated back

#

if you're using the serverdriven integration, functions immediately return(so your UI really can't be 'blocked') and async you know when its's done because you get a webhook or you poll an object's status

#

yeah, so you keep trying

#

like polling means, you set up something like setTimeout to run a function every couple of seconds to make the check

#

until it completes

#

and set some reasonable maximum according to your own desire

#

I don't know, make it 3 minutes? however long you think is reasonable to wait for someone to tap a card

#

sure

#

no

#

you're not looking at the right tab then

#

make sure you're looking at the server-driven tab

#

I don't understand the question, what is "the stripe code"?

#

I see. What does it mean to "get it via curl"

#

you're not going to call this API directly yourself, you'd use a real programming language and one of our libraries, and the examples for each language show how to catch the error

#

what SDK are you using?

#

well first I'd suggest updating to the latest version

#

but if you're using that old version, it's because you have to catch \Stripe\Error\InvalidRequestException instead of \Stripe\Exception\InvalidRequestException

#

you'd have to balance that against developer velocity since all our docs assume the use of our latest SDK, and some features might not be available

#

yeah exactly, as you say you don't have the server-driven endpoints in that SDK

#

the correct course is to upgrade, writing your own code to try and call the API is just wasted work and could introduce subtle bugs

#

in the link I posted above

#

that change came later as one of the releases during v7, the migration guide is also linked on the page I shared if you look at the sidebar on the right

#

I'd recommend using the absolutely latest version of the library, the current release

#

in the github page , the CHANGELOG.MD, the migration guides in the wiki

#

sorry but you need to do your own research a bit and stop asking me

#

I wish I knew why you feel the need to delete your messages

#

guess I'll close the thread then @unkempt shoal ?