9namespace Bitrix\Sender\Integration\Sender\WebHook;
11use Bitrix\Main\Localization\Loc;
12use Bitrix\Main\Web\HttpClient;
13use Bitrix\Main\Web\Json;
15use Bitrix\Sender\Message;
16use Bitrix\Sender\Transport;
17use Bitrix\Sender\Recipient;
19Loc::loadMessages(__FILE__);
27 const CODE = self::CODE_WEB_HOOK;
61 return Loc::getMessage(
'SENDER_INTEGRATION_WEBHOOK_TRANSPORT_NAME');
109 $clientOptions =
array(
110 'waitResponse' =>
true,
111 'socketTimeout' => 5,
113 $this->httpClient =
new HttpClient($clientOptions);
114 $this->httpClient->setTimeout(5);
133 foreach ($types as
$type)
143 if (
$count >= self::MAX_BUFFER_SIZE)
167 foreach ($types as
$type)
175 if (!$this->
buffer[
'uri'])
186 $this->httpClient->post($this->
buffer[
'uri'],
array(
187 'list' => Json::encode($this->
buffer[
'list']),
209 if ($this->limiter ===
null)
212 ->withName(
'web_hook')
215 ->withUnitName(Loc::getMessage(
'SENDER_INTEGRATION_WEBHOOK_TRANSPORT_LIMIT_PER_DAY'));
getSupportedRecipientTypes()
send(Message\Adapter $message)
getLimiters(Message\iBase $message=null)
saveConfiguration(Message\Configuration $configuration)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"