$context = Application::getInstance()->getContext();
$request = $context->getRequest();
$item = PaySystem\Manager::searchByRequest($request);
$params = [
"get" => $_GET,
"post" => $_POST,
"files" => $_FILES,
"cookie" => $_COOKIE,
"server" => $_SERVER,
];
$server = new \Bitrix\Main\Server($params['server']);
$request = new \Bitrix\Main\HttpRequest(
$server,
$params['get'],
$params['post'],
$params['files'],
$params['cookie']
);