• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/integration/imconnector/telegram.php
  • Класс: Bitrix\Crm\Integration\ImConnector\Telegram
  • Вызов: Telegram::sendPaymentPaidNotification
public function sendPaymentPaidNotification(Crm\Order\Payment $payment): void
{
	if (!$payment->isPaid())
	{
		return;
	}

	$order = $payment->getOrder();

	$message = Main\Localization\Loc::getMessage(
		'CRM_IMCONNECTOR_TELEGRAM_PAYMENT_PAID',
		[
			'#ORDER_ID#' => $order->getField('ACCOUNT_NUMBER'),
			'#DATE#' => $this->getFormattedDate($order->getDateInsert()),
			'#SUM_WITH_CURRENCY#' => $this->getSumWithCurrency($order->getPrice(), $order->getCurrency()),
		]
	);

	$contact = $this->getPrimaryContact($order);
	if ($contact)
	{
		$this->sendMessage($message, $contact);
	}
}