• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ads/pixel/conversioneventtriggers/paymenttrigger.php
  • Класс: Bitrix\Crm\Ads\Pixel\ConversionEventTriggers\PaymentTrigger
  • Вызов: PaymentTrigger::getUserData
public function getUserData(): array
		{
			$userData = [];

			if (($order = $this->payment->getOrder()) && $order instanceof Order)
			{
				$binding = $order->getEntityBinding();
				if (
					$binding
					&& $binding->getOwnerTypeId() === \CCrmOwnerType::Deal
				)
				{
					$userData = $this->getDealUserData($this->getDeal($binding->getOwnerId()));
				}
				elseif ($collection = $order->getContactCompanyCollection())
				{
					if (
						($company = $collection->getPrimaryCompany()) &&
						!empty($data = $this->getCompanyUserData($company->getId()))
					)
					{
						$userData[] = $data;
					}
					if (
						($contact = $collection->getPrimaryContact()) &&
						!empty($data = $this->getContactUserData($contact->getId()))
					)
					{
						$userData[] = $data;
					}
				}
			}

			return $userData;
		}