Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/general/ |
Upload File : |
<? /** * CSalePaySystemTarif * Abstract class for counting the pay system service's price etc. */ abstract class CSalePaySystemTarif { private static $arItems = array(); /** * getPrice * Calculate price for pay system service * @return float */ abstract public static function getPrice(&$arPaySystem, $orderPrice, $deliveryPrice, $buyerLocationId); /** * getStructure * Describe tarif params structure * @return array */ abstract public static function getStructure($psId, $persId); /** * checkCompability * Check if we can use this pay system * @return bool */ abstract public static function checkCompability(&$arOrder, $orderPrice, $deliveryPrice, $buyerLocationId); public static function extractFromField($strFieldContent) { return unserialize($strFieldContent, ['allowed_classes' => false]); } public static function prepareToField($arTarif) { return serialize($arTarif); } /** * getByPaySystemId * returns saved tarif's values * @return array */ protected static function getValuesByPSAId($psaId) { $arResult = array(); if(isset(self::$arItems[$psaId])) { $arResult = self::$arItems[$psaId]; } else { $psa = CSalePaySystemAction::GetByID($psaId); if(is_array($psa) && isset($psa['TARIF']) && is_array($psa['TARIF'])) $arResult = self::$arItems[$psaId] = unserialize($psa['TARIF'], ['allowed_classes' => false]); } return $arResult; } } ?>