#monove - Terminaly

1 messages · Page 1 of 1 (latest)

astral belfry
#

Hi 👋

main bloom
#

hi

astral belfry
#

Can you reference what exactly you mean by

is a table
the 3rd possibility

main bloom
#

do you see the 3 possibilities of errors?

#

the third possibility

astral belfry
#

Please tell me where in the document you are looking

main bloom
#

Handling Processing Failures

#

because in the sample code, you've done else if (result.paymentIntent):

  if (result.error) {
    // Placeholder for handling result.error
  } else if (result.paymentIntent) {
    // Placeholder for notifying your backend to capture result.paymentIntent.id
  }
});```
without explaining what the `else` of that could be
#
  if (result.error) {
    // Placeholder for handling result.error
  } else if (result.paymentIntent) {
    // Placeholder for notifying your backend to capture result.paymentIntent.id
  } else {
    // ???
  }
});```
#

so ... PaymentIntent is nil
is referring to

  1. when data.error.payment_intent is null or undefined
    or
  2. when data.error is null but data.paymentIntent is null or undefined
    ?
astral belfry
#

It is referring to any reason the payment intent was not returned

#

Which is entirely up to your server-side integration

main bloom
#

ok, so what does this mean "Retry processing the original PaymentIntent. Don’t create a new one, as that could result in multiple authorizations for the cardholder."

#

what does that word mean

#

which function should be called next and with what data

#

we get back sometimes:

  "error": {
    "type": "card_error",
    "code": "card_declined",
    "decline_code": "generic_decline",
    "doc_url": "https://stripe.com/docs/error-codes/card-declined",
    "message": "Your card was declined.",
    "param": ""
  }
}```
surely, calling `processPayment` again would be futile
#

ie there was no payment_intent field in data.error so suggesting to "Retry processing the original PaymentIntent" means what?

#

do you mean to call collectPaymentMethod with the same token?

astral belfry
#

You would want to collect a new payment method but use the original payment intent to do it

main bloom
#

ok. please consider rewording the resolution to be the same as the resolution for the first possibilit

#

y

astral belfry
#

Yes, I've been building my own terminal integration from scratch using our docs and it's highlighted plenty of places the wording could be better. I will pass along your feedback

main bloom
#

thnaks

#

because we didn't have access to that error data until bugs flowed in and we could analyze the error data we had no idea that it meant to collectPaymentMethod and this caused us significant issues in that we re-ran processPayment

#

significant i mean 2 years of issues

#

at 50+ locations with high volume traffic

astral belfry
#

because we didn't have access to that error data
I'm not sure what you mean here? Wouldn't your server return an error message if the Payment Intent failed to generate?

main bloom
#

our server generates payment intents smoothly

#

collectPaymentMethod works

#

processPayment sometimes fails. our code was built following your docs. if data.error.payment_itent was empty we ran processPayment again

#

because under cause you wrote 'Request to Stripe timed out, unknown PaymentIntent status'

#

you = Stripe

#

Retry processing the original PaymentIntent. Don’t create a new one, as that could result in multiple authorizations for the cardholder.

#

that doesnt sound anything like "Try collecting a different payment method by calling collectPaymentMethod again with the same PaymentIntent."

astral belfry
#

Well that depends on the type of error returned

main bloom
#

we know that now