Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
requestyandex.php
1<?php
2
4
6use Bitrix\Seo\Engine\Bitrix as EngineBitrix;
7
14{
15 const TYPE_CODE = 'yandex';
16
24 public function query(array $params = array())
25 {
26 $methodName = 'checkout.yandex.'.$params['methodName'];
27 $parameters = isset($params['parameters']) ? $params['parameters'] : [];
28 $engine = new EngineBitrix();
29 if (!$engine->isRegistered())
30 {
31 return false;
32 }
33
34 $response = $engine->getInterface()->getTransport()->call($methodName, $parameters);
35 return ((isset($response['result']['RESULT']) && $response['result']['RESULT'])
36 ? $response['result']['RESULT']
37 : []
38 );
39 }
40}