#deepraj-terminal-node

1 messages · Page 1 of 1 (latest)

azure merlin
#

Hi there!

quartz folio
#

hi

azure merlin
#

Which SDK are you using?

quartz folio
#

I am using stripe package in node

#

right now I am in dev mode

azure merlin
#

Are you using the Server-driven integration?

#

Or JS SDK?

quartz folio
#

not moved to live

#

yes I am using server-driven integration

azure merlin
#

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.

quartz folio
#

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

azure merlin
#

Yep that looks good

quartz folio
#

so in that case, will the application wait for the response from terminal.

azure merlin
#

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.

quartz folio
#

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

azure merlin
#

I do recommend though testing with your actual reader in testmode before pushing to production

quartz folio
#

great that clears my query

azure merlin
#

Let me know if I can help any further!

quartz folio
#

thanks for your assistance

azure merlin
#

Sure thing!

quartz folio
#

really appreciate

#

sure will get in touch if there is anything I need help with

#

thanks once again and have a nice day