• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/paysystem/manager.php
  • Класс: BitrixSalePaySystemManager
  • Вызов: Manager::getInnerPaySystemId
static function getInnerPaySystemId() : int
{
	$id = 0;
	$cacheManager = Application::getInstance()->getManagedCache();

	if ($cacheManager->read(self::TTL, self::CACHE_ID))
	{
		$id = $cacheManager->get(self::CACHE_ID);
	}

	if ($id <= 0)
	{
		$data = PaySystemActionTable::getRow(
			[
				'select' => ['ID'],
				'filter' => ['ACTION_FILE' => 'inner']
			]
		);
		if ($data === null)
		{
			$id = self::createInnerPaySystem();
		}
		else
		{
			$id = $data['ID'];
		}

		$cacheManager->set(self::CACHE_ID, $id);
	}

	return (int)$id;
}