• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/cashbox/cashboxrest.php
  • Класс: BitrixSaleCashboxCashboxRest
  • Вызов: CashboxRest::buildCheckQuery
public function buildCheckQuery(Check $check): array
{
	$data = $check->getDataForCheck();

	$data["uuid"] = static::buildUuid(static::UUID_TYPE_CHECK, $data['unique_id']);

	/** @var MainTypeDateTime $dateTime */
	$dateTime = $data["date_create"];
	$dateTimestamp = $dateTime->getTimestamp();
	$data["date_create"] = $dateTimestamp;

	$data["operation"] = $check::getCalculatedSign();

	$checkTypeMap = self::getCheckTypeMap();
	if (is_array($data["items"])) {
		foreach ($data["items"] as $index => $item) {
			$data["items"][$index]['payment_method'] = $checkTypeMap[$check::getType()];
		}
	}

	$data["number_kkm"] = $this->getField('NUMBER_KKM');
	$data["service_email"] = $this->getField('EMAIL');
	$cashboxParams = $this->getField("SETTINGS");

	// there's no need to pass our REST configuration (i.e. the handler code) to the application
	unset($cashboxParams["REST"]);
	$data["cashbox_params"] = $cashboxParams;

	return $data;
}