diff --git a/lib/Paymentwall/HttpAction.php b/lib/Paymentwall/HttpAction.php index dd820d2..5e0daf5 100644 --- a/lib/Paymentwall/HttpAction.php +++ b/lib/Paymentwall/HttpAction.php @@ -83,15 +83,15 @@ protected function request($httpVerb = '', $url = '', $params = array(), $custom } if (!empty($params)) { - curl_setopt($curl, CURLOPT_POSTFIELDS, $params); + curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params)); + } + + // CURL_SSLVERSION_TLSv1_2 is defined in libcurl version 7.34 or later + // but unless PHP has been compiled with the correct libcurl headers it + // won't be defined in your PHP instance. PHP > 5.5.19 or > 5.6.3 + if (! defined('CURL_SSLVERSION_TLSv1_2')) { + define('CURL_SSLVERSION_TLSv1_2', 6); } - - // CURL_SSLVERSION_TLSv1_2 is defined in libcurl version 7.34 or later - // but unless PHP has been compiled with the correct libcurl headers it - // won't be defined in your PHP instance. PHP > 5.5.19 or > 5.6.3 - if (! defined('CURL_SSLVERSION_TLSv1_2')) { - define('CURL_SSLVERSION_TLSv1_2', 6); - } curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2); curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);