• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/services/paysystem/restrictions/price.php
  • Класс: BitrixSaleServicesPaySystemRestrictionsPrice
  • Вызов: Price::check
static function check($params, array $restrictionParams, $serviceId = 0)
{
	$maxValue = static::getPrice($params, $restrictionParams['MAX_VALUE']);
	$minValue = static::getPrice($params, $restrictionParams['MIN_VALUE']);
	$price = (float)$params['PRICE_PAYMENT'];

	if ($maxValue > 0 && $minValue > 0)
	{
		return ($maxValue >= $price) && ($minValue <= $price);
	}

	if ($maxValue > 0)
	{
		return $maxValue >= $price;
	}

	if ($minValue >= 0)
	{
		return $minValue <= $price;
	}

	return false;
}