3namespace Bitrix\Sale\Cashbox;
7use Bitrix\Sale\BusinessValue;
18 private const TTL = 31536000;
43 $supportedKkmModels = [];
50 while ($paySystemItem = $paySystemIterator->fetch())
54 $paySystemService->isSupportPrintCheck()
55 && $paySystemService->getCashboxClass() ===
'\\'.static::class
58 $supportedKkmModels[] = static::getKkmValue($paySystemService);
62 $supportedKkmModels = array_unique(array_merge(...$supportedKkmModels));
65 foreach ($supportedKkmModels as $supportedKkm)
68 'NAME' => $supportedKkm
98 if (!
$service->isSupportPrintCheck())
103 'SALE_CASHBOX_PAYSYSTEM_PAYSYSTEM_NOT_SUPPORT_PRINT_CHECK',
105 '#PAY_SYSTEM_NAME#' =>
$service->getField(
'NAME')
117 'SALE_CASHBOX_PAYSYSTEM_PAYSYSTEM_CANT_PRINT_CHECK_SELF',
119 '#PAY_SYSTEM_NAME#' =>
$service->getField(
'NAME')
130 Main\
Localization\Loc::getMessage(
'SALE_CASHBOX_PAYSYSTEM_PAYMENT_NOT_FOUND')
148 if (!$checkParamsResult->isSuccess())
150 $result->addErrors($checkParamsResult->getErrors());
161 Main\
Localization\Loc::getMessage(
'SALE_CASHBOX_PAYSYSTEM_PAYMENT_NOT_FOUND')
171 if ($sendResult->isSuccess())
174 if ($processPrintResult->isSuccess())
176 $result->setData($processPrintResult->getData());
180 $result->addErrors($processPrintResult->getErrors());
185 $result->addErrors($sendResult->getErrors());
200 $isShipmentEntity = (bool)array_filter(
201 $check->getEntities(),
231 if (!$checkParamsResult->isSuccess())
233 $result->addErrors($checkParamsResult->getErrors());
242 Main\
Localization\Loc::getMessage(
'SALE_CASHBOX_PAYSYSTEM_PAYMENT_NOT_FOUND')
252 $sendResult = $this->
send($url,
$payment, $fields, $sendMethod);
253 if (!$sendResult->isSuccess())
255 $result->addErrors($sendResult->getErrors());
260 if ($processCheckResult->isSuccess())
263 if (!$onAfterProcessCheckResult->isSuccess())
265 $result->addErrors($onAfterProcessCheckResult->getErrors());
270 $result->addErrors($processCheckResult->getErrors());
281 return self::SEND_METHOD_HTTP_POST;
298 $paySystemCodeForKkm = static::getPaySystemCodeForKkm();
304 return $supportedKkmModels;
static loadMessages($file)
static getValuesByCode(string $consumerName, string $code)
buildCheckQuery(Check $check)
send(string $url, Sale\Payment $payment, array $fields, string $method=self::SEND_METHOD_HTTP_POST)
static getPaySystemCodeForKkm()
onAfterProcessCheck(Sale\Result $result, Sale\Payment $payment)
const SEND_METHOD_HTTP_POST
getPaySystemSetting(Sale\Payment $payment, string $code)
needPrintCheck(Check $check)
static isOfdSettingsNeeded()
checkParams(Check $check)
getDataForCheck(Sale\Payment $payment)
static getSupportedKkmModels()
static getKkmValue(Sale\PaySystem\Service $service)
printImmediately(Check $check)
processCheckResult(Sale\Result $result)
const SEND_METHOD_HTTP_GET
processPrintResult(Sale\Result $result)
static getPaymentByCheck(Check $check)
static getList(array $params=array())
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']