• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/manager.php
  • Класс: BitrixSaleCashboxManager
  • Вызов: Manager::getConnectionLink
static function getConnectionLink()
{
	$context = MainApplication::getInstance()->getContext();
	$scheme = $context->getRequest()->isHttps() ? 'https' : 'http';
	$server = $context->getServer();
	$domain = $server->getServerName();

	if (preg_match('/^(?.+):(?d+)$/', $domain, $matches))
	{
		$domain = $matches['domain'];
		$port   = $matches['port'];
	}
	else
	{
		$port = $server->getServerPort();
	}
	$port = in_array($port, array(80, 443)) ? '' : ':'.$port;

	return sprintf('%s://%s%s/bitrix/tools/sale_check_print.php?hash=%s', $scheme, $domain, $port, static::generateHash());
}