curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, MERCHANT_CONFIG_PATH.'/cacert.pem');
curl_setopt($ch, CURLOPT_SSLVERSION, 'CURL_SSLVERSION_TLSv1');
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');
if ($username !== NULL)
{
curl_setopt($ch, CURLOPT_USERPWD, $username.':'.$password);
}
if ( ! empty($extra_headers))
{
curl_setopt($ch, CURLOPT_HTTPHEADER, $extra_headers);
}