diff --git a/Trustly/Api/api.php b/Trustly/Api/api.php index c9fee7d..09e0160 100644 --- a/Trustly/Api/api.php +++ b/Trustly/Api/api.php @@ -295,13 +295,13 @@ public function post($url=NULL, $postdata=NULL) { curl_setopt($curl, CURLOPT_PORT, $this->api_port); if($this->api_is_https) { - if(@CURLOPT_PROTOCOLS != 'CURLOPT_PROTOCOLS') { + if(defined('CURLOPT_PROTOCOLS')) { curl_setopt($curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS); } curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE); } else { - if(@CURLOPT_PROTOCOLS != 'CURLOPT_PROTOCOLS') { + if(defined('CURLOPT_PROTOCOLS')) { curl_setopt($curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP); } }