Closed ibarral closed 6 years ago
Hello,
If you've meant to say if that's possible to retrieve the code like card_declined
, then yes, that's possible.
Example:
try {
$charge = Stripe::charges()->create([
'currency' => 'USD',
'amount' => 123,45,
'card' => 'some-token',
]);
} catch (\Exception $e) {
$errorCode = $e->getErrorCode();
}
If that's not what you're looking for, please elaborate a bit better.
Hope it helps!
Hello,
If a card issuer declines a payment, Stripe provides some decline codes:
https://stripe.com/docs/declines/codes
Is there any way to get that codes?
Thanks!