1
0
mirror of synced 2024-11-25 06:46:08 +03:00
bitrix-module/intaro.retailcrm/lib/service/currencyservice.php

36 lines
777 B
PHP

<?php
/**
* @category Integration
* @package Intaro\RetailCrm\Service
* @author RetailCRM <integration@retailcrm.ru>
* @license MIT
* @link http://retailcrm.ru
* @see http://retailcrm.ru/docs
*/
namespace Intaro\RetailCrm\Service;
/**
* Class CurrencyService
*
* @package Intaro\RetailCrm\Service
*/
class CurrencyService
{
public static function validateCurrency($cmsCurrency, $crmCurrency): string
{
$errorCode = '';
if ($cmsCurrency === null) {
$errorCode = 'ERR_CMS_CURRENCY';
} elseif ($crmCurrency === null) {
$errorCode = 'ERR_CRM_CURRENCY';
} elseif ($cmsCurrency !== $crmCurrency) {
$errorCode = 'ERR_CURRENCY_SITES';
}
return $errorCode;
}
}