sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

HttpClient needs to accept options

Open peledies opened this issue 7 years ago • 2 comments

sdk-php/lib/net/authorize/util/HttpClient.php is not configurable from what I can tell.

it would be nice to be able to add curl options to the request, specifically to specify the ssl version.

curl_setopt($curl_request, CURLOPT_SSL_VERIFYHOST, 2);

Similar to the way the Stripe SDK works, Example:

\Stripe\ApiRequestor::setHttpClient(
    new \Stripe\HttpClient\CurlClient(
        [ CURLOPT_SSLVERSION => CURL_SSLVERSION_TLSv1_2 ]
    )
);

peledies avatar Dec 11 '17 16:12 peledies

Agreed that this would be nice to have. Updating linux might not be able to happen in some cases.

britbarn avatar Feb 08 '18 16:02 britbarn

Thanks @peledies, this looks like a good feature to have. We can have a look into adding this configuration in the SDK.

ashtru avatar Mar 26 '18 13:03 ashtru