intuit/PHP-Payments-SDK

TCP connection reset by peer, can I adjusting the cURL Timeout?

Closed this issue · 1 comments

Unfortunately my Server is in a remote location connected by satellites. I get this error Randomly reminiscently from weather patterns. Is there a way to adjust the Timeout period?

RuntimeException
cURL error during making API call. cURL Error Number:[35] with error:[TCP connection reset by peer]

1. in /var/www/badgeApp/vendor/quickbooks/payments-sdk/src/HttpClients/core/HttpCurlClient.php at line 73
 throw new \RuntimeException("cURL error during making API call. cURL Error Number:[" . $errorNumber . "] with error:[" . $errorMsg . "]");

2. in /var/www/badgeApp/vendor/quickbooks/payments-sdk/src/HttpClients/core/HttpCurlClient.php at line 54 – QuickBooksOnline\Payments\HttpClients\core\HttpCurlClient::handleCurlErrors()
 $this->handleCurlErrors();

3. in /var/www/badgeApp/vendor/quickbooks/payments-sdk/src/PaymentClient.php at line 95 – QuickBooksOnline\Payments\HttpClients\core\HttpCurlClient::send()
 $response = $this->httpClient->send($request);

4. in /var/www/badgeApp/backend/views/payment/process.php at line 61 – QuickBooksOnline\Payments\PaymentClient::charge()
 $response = $client->charge($charge);

@sharkbit Thanks for bringing this to our attention. A Configurable value for timeout can help with this error. I will create a JIRA for us to work on, but feel free to send a PR.