• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/services/paysystem/restrictions/manager.php
  • Класс: BitrixSaleServicesPaySystemRestrictionsManager
  • Вызов: Manager::getPriceRange
static function getPriceRange(Payment $payment, $paySystemId)
{
	$result = array();

	$classes = array(
		'BitrixSaleServicesPaySystemRestrictionsPercentPrice',
		'BitrixSaleServicesPaySystemRestrictionsPrice'
	);

	$params = array(
		'select' => array('CLASS_NAME', 'PARAMS'),
		'filter' => array(
			'SERVICE_ID' => $paySystemId,
			'=CLASS_NAME' => $classes
		)
	);

	$dbRes = Manager::getList($params);
	while ($data = $dbRes->fetch())
	{
		$range = $data['CLASS_NAME']::getRange($payment, $data['PARAMS']);

		if (!$result['MAX'] || $range['MAX'] < $result['MAX'])
			$result['MAX'] = $range['MAX'];

		if (!$result['MIN'] || $range['MIN'] > $result['MIN'])
			$result['MIN'] = $range['MIN'];
	}

	return $result;
}