3namespace Bitrix\Sale\Services\PaySystem\Restrictions;
5use Bitrix\Main\ArgumentTypeException;
6use Bitrix\Main\Localization\Loc;
7use Bitrix\Sale\Internals\Entity;
9use Bitrix\Sale\PaymentCollection;
10use Bitrix\Sale\Services\Base;
11use Bitrix\Sale\Payment;
13Loc::loadMessages(__FILE__);
25 $maxValue = static::getPrice(
$params, $restrictionParams[
'MAX_VALUE']);
26 $minValue = static::getPrice(
$params, $restrictionParams[
'MIN_VALUE']);
27 $price = (float)
$params[
'PRICE_PAYMENT'];
29 if ($maxValue > 0 && $minValue > 0)
31 return ($maxValue >= $price) && ($minValue <= $price);
36 return $maxValue >= $price;
41 return $minValue <= $price;
59 $collection =
$entity->getCollection();
61 $order = $collection->getOrder();
63 $orderPrice =
$order->getPrice();
64 $paymentPrice =
$entity->getField(
'SUM');
68 'PRICE_PAYMENT' => $paymentPrice,
69 'PRICE_ORDER' => $orderPrice,
78 protected static function getPrice($entityParams, $paramValue)
80 return (
float)$paramValue;
88 return Loc::getMessage(
'SALE_PS_RESTRICTIONS_BY_PRICE');
96 return Loc::getMessage(
'SALE_PS_RESTRICTIONS_BY_PRICE_DESC');
101 return Loc::getMessage(
'SALE_PS_RESTRICTIONS_BY_PRICE_ON_APPLY_ERROR_MSG');
112 "MIN_VALUE" =>
array(
115 'LABEL' => Loc::getMessage(
"SALE_PS_RESTRICTIONS_BY_PRICE_TYPE_MORE")
117 "MAX_VALUE" =>
array(
120 'LABEL' => Loc::getMessage(
"SALE_PS_RESTRICTIONS_BY_PRICE_TYPE_LESS")
137 'MAX' => static::getPrice(
$p,
$params[
'MAX_VALUE']),
138 'MIN' => static::getPrice(
$p,
$params[
'MIN_VALUE']),
static check($params, array $restrictionParams, $serviceId=0)
static getClassDescription()
static getPrice($entityParams, $paramValue)
static getOnApplyErrorMessage()
static getRange(Payment $payment, $params)
static getParamsStructure($entityId=0)
static getSeverity($mode)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']