diff --git a/src/Client.php b/src/Client.php index baddab7..b87920c 100644 --- a/src/Client.php +++ b/src/Client.php @@ -199,6 +199,11 @@ protected function restCall($apiUrl, $verb, $guzzleParams, $apiversion='',$heade $guzzleParams['connect_timeout'] = 1200; } + //Set TLS version to 1.2 because Avartax is discontinuing support TLS 1.0 & 1.1 + if (version_compare(PHP_VERSION, '5.6.3', '>=')) { + $guzzleParams['curl'][CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1_2; + } + // Contact the server try { $response = $this->client->request($verb, $apiUrl, $guzzleParams); @@ -241,4 +246,4 @@ protected function restCall($apiUrl, $verb, $guzzleParams, $apiversion='',$heade return $e->getResponse()->getBody()->getContents(); } } -} +} \ No newline at end of file