#smartkiparis

1 messages · Page 1 of 1 (latest)

tall irisBOT
stable lagoon
#

Hi
You can check in the error object if you get a decline code:
https://stripe.com/docs/api/errors#errors-decline_code if you have one then it's a payment error, you can also monitor the status of the response, for example if it's an incorrect parameters of a query, you'll get a 400 http status

unkempt pumice
#

So for example

#

If I catch ApiErrorException ($e), I can access decline code with $e->getJsonBody() and then use 'decline_code' as a key in a returned array?

stable lagoon
tall irisBOT