Подскажите, как называется?
$http = new Http();
$http->setOption('transport.curl', array(
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0
));
$response = (in_array($method, array('createTouristPayment'))) ?
$http->post($url, $data, $headers, $timeout) : $http->get($url, $headers, $timeout);
if (((new Version())->isCompatible('4.0')))
{
$body = $response->body;
$context = (!empty($body)) ? new Registry($response->body) : false;
}
else
{
$context = (!empty($response->body)) ? new Registry($response->body) : false;
}
if ($response->code !== 200 || !$context)
{
$message = ($context) ? $context->get('error')
: preg_replace('#^[0-9]*\s#', '', $response->headers['Status']);
$code = $response->code;
if (in_array((int) $code, array(404, 422))) break;
sleep(5);
}