diff --git a/app/PaymentDrivers/CheckoutComPaymentDriver.php b/app/PaymentDrivers/CheckoutComPaymentDriver.php index 2a7a9e94518b..07a2c6f77906 100644 --- a/app/PaymentDrivers/CheckoutComPaymentDriver.php +++ b/app/PaymentDrivers/CheckoutComPaymentDriver.php @@ -306,13 +306,10 @@ class CheckoutComPaymentDriver extends BaseDriver try { $response = $this->gateway->getCustomersClient()->create($request); - } catch (CheckoutApiException $e) { + } catch (\Exception $e) { // API error - $error_details = $e->error_details; - $http_status_code = isset($e->http_metadata) ? $e->http_metadata->getStatusCode() : null; - } catch (CheckoutAuthorizationException $e) { - // Bad Invalid authorization - } + throw new PaymentFailed($e->getMessage(), $e->getCode()); + } return $response; }