• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/paysystem/restservice.php
  • Класс: BitrixSalePaySystemRestService
  • Вызов: RestService::checkParamsBeforeSettingsGet
static function checkParamsBeforeSettingsGet($params)
{
	if (!isset($params['PERSON_TYPE_ID']))
	{
		throw new RestException('Parameter PERSON_TYPE_ID is not defined', self::ERROR_CHECK_FAILURE);
	}

	if (!isset($params['ID']))
	{
		throw new RestException('Parameter ID is not defined', self::ERROR_CHECK_FAILURE);
	}

	$item = Manager::getById($params['ID']);
	if (!$item)
	{
		throw new RestException('Pay system not found', static::ERROR_CHECK_FAILURE);
	}

	if (!self::hasAccessToPaySystem($item, $params['APP_ID']))
	{
		throw new AccessException();
	}
}