From: fomichev Date: Tue, 28 Jan 2025 06:24:45 +0000 (+0300) Subject: Кнопки на сообщения в ТГ X-Git-Tag: 1.7~38^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0d025aa74233f3e69f23cb1d66bcb48cb7c72c07;p=erp24_rep%2Fyii-erp24%2F.git Кнопки на сообщения в ТГ --- diff --git a/erp24/services/TelegramService.php b/erp24/services/TelegramService.php index eaf28c5c..4cfb70bc 100644 --- a/erp24/services/TelegramService.php +++ b/erp24/services/TelegramService.php @@ -4,6 +4,7 @@ namespace yii_app\services; use GuzzleHttp\Client; use Yii; +use yii\helpers\Json; use yii_app\records\UsersTelegramMessage; class TelegramService @@ -94,6 +95,18 @@ class TelegramService 'chat_id' => $chatId, 'text' => $message, 'parse_mode' => 'MarkdownV2', + 'reply_markup' => Json::encode([ + "inline_keyboard" => [ + [ + ['text' => "Наш сайт", "url" => "https://bazacvetov24.ru/"], + ['text' => "Адреса салонов", "url" => "https://bazacvetov24.ru/contacts/"], + ], + [ + ['text' => "1000 руб. забрать", "url" => "https://bazacvetov24.ru/akcii/"], + ['text' => 'Списание бонусов', 'url' => 'https://bazacvetov24.ru/bonuses/'] + ] + ] + ]), ], ]);