Catch additional errors for checkout.com

This commit is contained in:
David Bomba 2023-11-24 22:46:23 +11:00
parent 52b24e0fab
commit 689d27cda3

View File

@ -263,6 +263,16 @@ class CreditCard implements MethodInterface
if (is_array($error_details)) { if (is_array($error_details)) {
$error_details = end($e->error_details['error_codes']); $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); $this->checkout->unWindGatewayFees($this->checkout->payment_hash);
@ -294,7 +304,7 @@ class CreditCard implements MethodInterface
); );
return new PaymentFailed($e->getMessage(), $e->getCode()); return new PaymentFailed($e->getMessage(), $e->getCode());
// return $this->checkout->processInternallyFailedPayment($this->checkout, $human_exception);
} catch (CheckoutAuthorizationException $e) { } catch (CheckoutAuthorizationException $e) {
// Bad Invalid authorization // Bad Invalid authorization