From 689d27cda3839658bbbef949df5d23ee7aadd3f9 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 24 Nov 2023 22:46:23 +1100 Subject: [PATCH] Catch additional errors for checkout.com --- app/PaymentDrivers/CheckoutCom/CreditCard.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 5436ce35ba1e..a55f53855645 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -263,6 +263,16 @@ class CreditCard implements MethodInterface if (is_array($error_details)) { $error_details = end($e->error_details['error_codes']); + + SystemLogger::dispatch( + $error_details, + SystemLog::CATEGORY_GATEWAY_RESPONSE, + SystemLog::EVENT_GATEWAY_ERROR, + SystemLog::TYPE_CHECKOUT, + $this->checkout->client, + $this->checkout->client->company, + ); + } $this->checkout->unWindGatewayFees($this->checkout->payment_hash); @@ -294,7 +304,7 @@ class CreditCard implements MethodInterface ); return new PaymentFailed($e->getMessage(), $e->getCode()); - // return $this->checkout->processInternallyFailedPayment($this->checkout, $human_exception); + } catch (CheckoutAuthorizationException $e) { // Bad Invalid authorization