Sender::prepareOrderAdditionalFields

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. Sender
  4. prepareOrderAdditionalFields
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/activity/provider/sms/sender.php
  • Класс: Bitrix\Crm\Activity\Provider\Sms\Sender
  • Вызов: Sender::prepareOrderAdditionalFields
private function prepareOrderAdditionalFields(&$additionalFields, &$bindings): void
{
	if (
		$this->paymentId
		&& $this->source === mb_strtolower(\CCrmOwnerType::OrderName)
		&& preg_match('/(?:https?):\/\//', $this->message->body)
		&& Loader::includeModule('sale')
	)
	{
		$payment = PaymentRepository::getInstance()->getById($this->paymentId);
		if (!$payment)
		{
			return;
		}

		$bindings = array_merge($bindings, ActivityBindingsMaker::makeByPayment($payment));

		$additionalFields['ENTITIES'] = [
			'ORDER' => $payment->getOrder(),
			'PAYMENT' => $payment,
			'SHIPMENT' => $this->shipmentId ? ShipmentRepository::getInstance()->getById($this->shipmentId) : null,
		];
	}
}

Добавить комментарий