#deepraj-terminal-node
1 messages · Page 1 of 1 (latest)
hi
Which SDK are you using?
Gotcha
So you will want something on your own application that indicates you should call stripe.terminal.readers.processPaymentIntent
At that point, the Reader will indicate it is ready to collect a card
So in terms of "waiting"... this is totally up to you.
stripe.terminal.readers.processPaymentIntent(
terminalID,
{ payment_intent: paymentIntentID },
function(error, result) {....}
this is the code I am using
can you please correct me if I am wrong
Yep that looks good
so in that case, will the application wait for the response from terminal.
Yes by calling that method the Reader will indicate it is ready to collect a payment method on the screen. Then, once the card has been collected by the reader the payment will actually be processed.
great. one more thing. Since I am using the simulated version of terminal, I call the method below
stripe.testHelpers.terminal.readers.presentPaymentMethod(
terminalID,
{
type: 'card_present',
card_present: {
number: globalConstants.stripeSimulatedCardNumber()
}
},
function(paymentError, paymentResult) {
so when I push code to live environment, is there any code to replace for this one or the callback function of processPaymentIntent will handle it
Yep when you go live you just remove that. See: https://stripe.com/docs/terminal/payments/collect-payment?terminal-sdk-platform=server-driven&reader=wpe#process-payment
I do recommend though testing with your actual reader in testmode before pushing to production
great that clears my query
Let me know if I can help any further!
thanks for your assistance
Sure thing!