The PayPal IPN API requires the use of HTTP1.1, so on my Drupal Commerce-based site I had to use CHR in order to delegate a Commerce PayPal drupal_http_request call to the IPN validation interface to cURL. Furthermore, the PayPal IPN API requires TLS1.2. Not seeing any way to set CURLOPT_SSLVERSION to 6 (TLS1.2), I had to patch the call in the Commerce PayPal module to pass in the 'curl_opts' option to be passed onto chr_curl_http_request. i.e. I changed:

$response = drupal_http_request($host, array('method' => 'POST', 'data' => implode('&', $variables)));

to:

$response = drupal_http_request($host, array('method' => 'POST', 'data' => implode('&', $variables), 'curl_opts' => array(CURLOPT_SSLVERSION => 6)));

It would be nice if the CURLOPT_SSLVERSION could be made a configurable parameter in CHR.

Comments

ShaunLaws created an issue.