• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/paysystem/restservice.php
  • Класс: BitrixSalePaySystemRestService
  • Вызов: RestService::checkParamsBeforeSettingsUpdate
static function checkParamsBeforeSettingsUpdate($params)
{
	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 (!isset($params['SETTINGS']) || empty($params['SETTINGS']))
	{
		throw new RestException('Parameter SETTINGS is not defined or empty', self::ERROR_HANDLER_NOT_FOUND);
	}

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