Skip to content

v8.16.0

Choose a tag to compare

@gocardless-ci-robot gocardless-ci-robot released this 26 Oct 10:53
· 16 commits to master since this release
77cbcda

Features

Time out requests after 60 seconds by default

The timeout client option already existed, but defaulted to 0, which waits indefinitely, so a stalled connection could hang forever. It now defaults to 60 seconds. If you rely on requests taking longer than that, pass a larger timeout, or 0 to restore the old behaviour:

$client = new \GoCardlessPro\Client([
  'access_token' => $access_token,
  'environment'  => \GoCardlessPro\Environment::SANDBOX,
  'timeout'      => 10
]);

Timed out requests are retried automatically before an ApiConnectionException is raised, so the total time before an error can exceed timeout. The timeout option is not applied if you supply your own http_client.