lib/GestPayCryptHS.php
protected function _httpGetResponse($type, $a, $b)
    {
        if (extension_loaded("openssl")) {
            return parent::_httpGetResponse($type, $a, $b);
        } elseif (extension_loaded("curl")) {
            $uri = $this->getScriptType($type) . "?a=" . $a . "&b=" . $b;

            $curl = curl_init("https://" . $this->getDomainName() . $uri);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            $tmp = curl_exec($curl);
            curl_close($curl);

            $lines = explode("\n", $tmp);

            return $lines[0];
        } else {
            $uri = $this->getScriptType($type) . "?a=" . $a . "&b=" . $b;

            $exec_str = $this->getCurlBin() . " -s -m 120 -L " .
                        escapeshellarg("https://" . $this->getDomainName() . $uri);

            exec($exec_str, $ret_arr, $ret_num);

            if ($ret_num != 0) {
                $this->setError('9999', 'Error while executing: ' . $exec_str);
                return -1;
            }

            if (!is_array($ret_arr)) {
                $this->setError('9999', 'Error while executing: ' . $exec_str. ' - $ret_arr is not an array');
                return -1;
            }

            return $ret_arr[0];
        }
    }
protected function _httpGetResponse($type, $a, $b)
    {
        if (extension_loaded("openssl")) {
            return parent::_httpGetResponse($type, $a, $b);
        } elseif (extension_loaded("curl")) {
            $uri = $this->getScriptType($type) . "?a=" . $a . "&b=" . $b;

            $curl = curl_init("https://" . $this->getDomainName() . $uri);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            $tmp = curl_exec($curl);
            curl_close($curl);

            $lines = explode("\n", $tmp);

            return $lines[0];
        } else {
            $uri = $this->getScriptType($type) . "?a=" . $a . "&b=" . $b;

            $exec_str = $this->getCurlBin() . " -s -m 120 -L " .
                        escapeshellarg("https://" . $this->getDomainName() . $uri);

            exec($exec_str, $ret_arr, $ret_num);

            if ($ret_num != 0) {
                $this->setError('9999', 'Error while executing: ' . $exec_str);
                return -1;
            }

            if (!is_array($ret_arr)) {
                $this->setError('9999', 'Error while executing: ' . $exec_str. ' - $ret_arr is not an array');
                return -1;
            }

            return $ret_arr[0];
        }
    }
{@inheritdoc}