Paranoia\Payment\Adapter\AdapterAbstract::sendRequest PHP Method

sendRequest() protected method

Makes http request to remote host.
protected sendRequest ( string $url, mixed $data, array $options = null ) : mixed
$url string
$data mixed
$options array
return mixed
    protected function sendRequest($url, $data, $options = null)
    {
        $client = new HttpClient();
        $client->setConfig(array('curl.options' => array(CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false)));
        $request = $client->post($url, null, $data);
        try {
            return $request->send()->getBody();
        } catch (RequestException $e) {
            throw new CommunicationError('Communication failed: ' . $url);
        }
    }