1
0
mirror of synced 2024-11-22 13:26:10 +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;
}
}