You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While integrating paypal, i try to simulate a case where the host api.sandbox.checkout.com is down by putting an unreachable ip in the host file.
I want to manage the case if checkout is down, the call for a paymentRequest should not impact our payment page.
The execption is a GuzzleHttp\Exception\ConnectException but there is an error in the CheckoutApiException file
Expected behavior
The invoke method in ApiClient should return a CheckoutApiException
Current behavior
A FatalThrowableError from the method from in CheckoutApiException.
The response is null in a ConnectException
ConnectException {#4544 ▼
-request: Request {[#4547 ▶](https://mywebsite.com)}
-response: null
-handlerContext: array:30 [▶]
#message: "cURL error 7: Failed to connect to api.sandbox.checkout.com port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)"
#code: 0
#file: "/srv/app/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php"
#line: 200
trace: {▶}
}
Error on Class CheckoutApiException (line 25)
Call to a member function getBody() on null
public static function from(RequestException $requestException)
{
$body = json_decode($requestException->getResponse()->getBody()->getContents(), true);
$ex = new CheckoutApiException(sprintf(
"The API response status code (%s) does not indicate success.",
...
Steps to reproduce
put 0.0.0.0 on the host api.sandbox.checkout.com on host file
Possible solution
Just manage differently the ConnectException in class CheckoutApiException
The text was updated successfully, but these errors were encountered:
Environment
Description
While integrating paypal, i try to simulate a case where the host api.sandbox.checkout.com is down by putting an unreachable ip in the host file.
I want to manage the case if checkout is down, the call for a paymentRequest should not impact our payment page.
The execption is a GuzzleHttp\Exception\ConnectException but there is an error in the CheckoutApiException file
Expected behavior
The invoke method in ApiClient should return a CheckoutApiException
Current behavior
A FatalThrowableError from the method from in CheckoutApiException.
The response is null in a ConnectException
Error on Class CheckoutApiException (line 25)
Call to a member function getBody() on null
Steps to reproduce
put 0.0.0.0 on the host api.sandbox.checkout.com on host file
Possible solution
Just manage differently the ConnectException in class CheckoutApiException
The text was updated successfully, but these errors were encountered: