mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Exception handling for checkout
This commit is contained in:
parent
2a6cded07d
commit
8dbf1b238f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user