AuthorizeNet / sdk-php

PHP SDK for Authorize.Net API
Other
426 stars 400 forks source link

HttpClient needs to accept options #276

Open peledies opened 6 years ago

peledies commented 6 years ago

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 ]
    )
);
britbarn commented 6 years ago

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

ashtru commented 6 years ago

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