public static function GetPaySystems($personTypeId) { if (!CModule::IncludeModule('sale')) { return false; } if (self::$paySystems === null) { $arPersonTypes = self::getPersonTypeIDs(); if (!isset($arPersonTypes['COMPANY']) || !isset($arPersonTypes['CONTACT']) || $arPersonTypes['COMPANY'] <= 0 || $arPersonTypes['CONTACT'] <= 0) { return false; } $companyPaySystems = CSalePaySystem::DoLoadPaySystems($arPersonTypes['COMPANY']); $contactPaySystems = CSalePaySystem::DoLoadPaySystems($arPersonTypes['CONTACT']); self::$paySystems = array($arPersonTypes['COMPANY'] => $companyPaySystems, $arPersonTypes['CONTACT'] => $contactPaySystems); } if (!in_array($personTypeId, array_keys(self::$paySystems))) { return false; } return self::$paySystems[$personTypeId]; }