{"id":444499,"date":"2025-01-09T09:52:35","date_gmt":"2025-01-09T09:52:35","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=444499"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=444499","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 Telegram \u0431\u043e\u0442\u0435-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u0445<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u0440\u0443\u0437\u044c\u044f, \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e!<\/p>\n<p>\u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043a \u0442\u0435\u043c\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432 Telegram-\u0431\u043e\u0442\u043e\u0432, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Aiogram, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u044b, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044b.<\/p>\n<h3>\u0420\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/h3>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Telegram-\u0431\u043e\u0442\u0430 \u043d\u0430 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLAlchemy 2 \u0438 Aiogram 3. \u042d\u0442\u043e\u0442 \u0431\u043e\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u043b:<\/p>\n<ul>\n<li>\n<p><strong>\u0410\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0442\u043e\u0432\u0430\u0440\u043e\u0432<\/strong> \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u042e\u041a\u0430\u0441\u0441\u0430 \u0431\u0435\u0437 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/strong>, \u0433\u0434\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0431\u043e\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/676edb60c3f6e0d78c08a4e1\" data-style=\"\" id=\"676edb60c3f6e0d78c08a4e1\" width=\"\"><\/div>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: <a href=\"https:\/\/t.me\/DigitalMarketAiogramBot\">https:\/\/t.me\/DigitalMarketAiogramBot<\/a> (\u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c)<\/p>\n<p>\u041a\u0430\u043a \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f Telegram-\u0431\u043e\u0442\u043e\u0432, \u043f\u0440\u043e\u0434\u0430\u044e\u0449\u0438\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043b\u0430\u0442\u044b <strong>Telegram Stars<\/strong>. \u0425\u043e\u0442\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u044b \u043b\u0438\u0447\u043d\u043e \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Telegram Stars \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 BotFather \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 <strong>Robokassa<\/strong>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u043c Telegram Stars \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Robokassa \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u0441 \u043b\u043e\u043d\u0433-\u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043b\u0430\u043d \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043f\u043b\u0430\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<h4>1. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043b\u043e\u043d\u0433-\u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0438<\/h4>\n<p>\u0412\u0435\u0431\u0445\u0443\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c Telegram \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043d\u0430\u0441 \u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439.<\/p>\n<h4>2. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Telegram Stars<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043b\u0430\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043d\u043e\u0432\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c Telegram.<\/p>\n<h4>3. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Robokassa<\/h4>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c Robokassa \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<h4>4. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435<\/h4>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043c \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b.<\/p>\n<h4>5. \u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0434\u0435\u043f\u043b\u043e\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043e\u043c\u0435\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTTPS.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u0442\u0430\u043a\u0438\u0445 \u0431\u043e\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1: VPS-\u0441\u0435\u0440\u0432\u0435\u0440<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043a\u0443\u043f\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 VPS.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (NGINX\/APACHE).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 HTTPS.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2: \u0425\u043e\u0441\u0442\u0438\u043d\u0433 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <\/strong><a href=\"https:\/\/amvera.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=yakvenalex_digital_market_bot_part_two\"><strong>Amvera Cloud<\/strong><\/a><strong>)<\/strong><\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442 \u0438\u043b\u0438 Git.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435, \u044f \u0431\u0443\u0434\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Amvera Cloud.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u0438 \u0432 \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430?<\/h3>\n<p>\u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0438 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Telegram-\u0431\u043e\u0442\u043e\u0432, \u043d\u043e \u0438 \u0432 \u043c\u0438\u0440\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<h4>\u041f\u043e\u043b\u043b\u0438\u043d\u0433<\/h4>\n<p>\u0421\u0443\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u043c\u0438 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0442 \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<ul>\n<li>\n<p><strong>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433:<\/strong> \u0431\u043e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Telegram \u043e \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u043b \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041c\u043e\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438\u00bb), \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0431\u043e\u0442\u0443: \u00ab\u0415\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 ID 123456 \u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443\u00bb. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u043e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0443\u0436\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0430\u0436\u0435 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433:<\/strong> \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u0432\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u00ab\u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043e\u00bb, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u0435\u0431\u0445\u0443\u043a\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u0412\u0435\u0431\u0445\u0443\u043a \u2014 \u044d\u0442\u043e URL-\u0430\u0434\u0440\u0435\u0441, \u043a\u0443\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438:<\/strong> \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440 Telegram \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443), \u043e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0431\u0445\u0443\u043a. \u0411\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430:<\/strong> \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0430\u043c\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a. \u0412\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/h4>\n<ul>\n<li>\n<p><strong>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/strong> \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/strong> \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439:<\/strong> \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043b\u0438\u043d\u0433: \u0432\u044b \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0430: \u00ab\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e?\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431\u0445\u0443\u043a: \u0434\u0440\u0443\u0433 \u0441\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0432\u0430\u043c \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u041a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439<\/a> \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c:<\/p>\n<ol>\n<li>\n<p><strong>\u0422\u043e\u043a\u0435\u043d Telegram-\u0431\u043e\u0442\u0430<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u043f\u043b\u0430\u0442\u044b \u042e\u041a\u0430\u0441\u0441\u0430 \u043a \u0431\u043e\u0442\u0443<\/strong>,  \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a> (Provider token).<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0433\u0434\u0435 \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0431\u043e\u0442\u0430 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u042e\u041a\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u043c\u0438, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c.<\/p>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Aiohttp<\/strong>. \u042d\u0442\u0430 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 Telegram-\u0431\u043e\u0442\u0430\u0445. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Aiohttp \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u043c\u0438\u043d\u0438-\u0441\u0430\u0439\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0445\u0443\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>NGROK<\/strong> \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b.<\/p>\n<h4>\u0421\u0432\u044f\u0437\u043a\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<ol>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 8000).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, NGROK) \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0430\u0448 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 Telegram \u0438\u043b\u0438 Robokassa \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0432\u0430\u043c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/841616\/\">\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0441 HTTPS \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439: \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043d\u0430 Flask<\/a>&#187; \u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0442\u0443\u043d\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043e\u0442 <a href=\"https:\/\/amvera.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=yakvenalex_digital_market_bot_part_two\"><strong>Amvera Cloud<\/strong><\/a>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 HTTPS.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 NGROK<\/h4>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/ngrok.com\">NGROK<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u0438 \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Windows).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u2014 \u043e\u043d\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 NGROK \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>ngrok http 8000<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c <code>8000<\/code> \u2014 \u043f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 NGROK \u0432\u044b\u0434\u0430\u0441\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u0432\u0438\u0434\u0430 <code>https:\/\/&lt;\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d&gt;.ngrok.io<\/code>. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0451 \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0431\u043e\u0442\u0435<\/h4>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Robokassa \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.robokassa.ru\">Robokassa<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u00ab\u041c\u0430\u0433\u0430\u0437\u0438\u043d\u00bb \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432\u0430\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0414\u0432\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0445\u044d\u0448\u0430 \u2014 MD5 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0445\u0443\u043a\u0430).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/27a\/660\/d96\/27a660d96250d9301fd71226177063ab.png\" alt=\" \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u041a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u00bb\" title=\" \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u041a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u00bb\" width=\"722\" height=\"774\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/27a\/660\/d96\/27a660d96250d9301fd71226177063ab.png\"\/><\/p>\n<div><figcaption> \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u041a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u00bb<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e8f\/096\/d7e\/e8f096d7ea91606732418a4fbfb9721f.png\" alt=\" \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb\" title=\" \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb\" width=\"802\" height=\"816\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e8f\/096\/d7e\/e8f096d7ea91606732418a4fbfb9721f.png\"\/><\/p>\n<div><figcaption> \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb<\/figcaption><\/div>\n<\/figure>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p><strong>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/strong><\/p>\n<pre><code class=\"bash\">git clone https:\/\/githu\u0439b.com\/Yakvenalex\/DigitalMarketBot.git<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0432\u0435\u0437\u0434\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/strong><\/p>\n<pre><code class=\"bash\">cd DigitalMarketBot<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<pre><code class=\"bash\">python -m venv venv source venv\/bin\/activate  # \u0414\u043b\u044f Windows: venv\\Scripts\\activate<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/strong><\/p>\n<pre><code class=\"bash\">pip install -r requirements.txt<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <\/strong><code>.env<\/code><strong> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<\/strong><\/p>\n<pre><code class=\"1c\">BOT_TOKEN=\u0412\u0410\u0428_\u0422\u041e\u041a\u0415\u041d ADMIN_IDS=[ADMIN_TG1, ADMIN_TG2, ADMIN_TG3] PROVIDER_TOKEN=\u0422\u041e\u041a\u0415\u041d_\u042e_\u041a\u0410\u0421\u0421\u042b SITE_URL=\u0412\u0415\u0411_\u0421\u0410\u0419\u0422_\u0414\u041b\u042f_\u0425\u0423\u041a\u041e\u0412 SITE_HOST=0.0.0.0 SITE_PORT=8000 MRH_LOGIN=\u041b\u041e\u0413\u0418\u041d_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b MRH_PASS_1=\u041f\u0410\u0420\u041e\u041b\u042c_1_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b MRH_PASS_2=\u041f\u0410\u0420\u041e\u041b\u042c_2_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b IN_TEST=1<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 <code>.env<\/code>:<\/p>\n<ol>\n<li>\n<p><strong>BOT_TOKEN<\/strong>: \u0422\u043e\u043a\u0435\u043d \u0432\u0430\u0448\u0435\u0433\u043e Telegram-\u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 @BotFather. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u043e\u0442\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Telegram.<\/p>\n<\/li>\n<li>\n<p><strong>ADMIN_IDS<\/strong>: \u0421\u043f\u0438\u0441\u043e\u043a ID \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u0442\u043e\u043c. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u0430: <code>[ID1, ID2, ID3]<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>PROVIDER_TOKEN<\/strong>: \u0422\u043e\u043a\u0435\u043d \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u042e\u041a\u0430\u0441\u0441\u0430, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 @BotFather. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_URL<\/strong>: \u041f\u043e\u043b\u043d\u044b\u0439 URL \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043e\u0442 NGROK.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_HOST<\/strong>: \u0425\u043e\u0441\u0442 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>0.0.0.0<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_PORT<\/strong>: \u041f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0440\u0442 <code>8000<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_LOGIN<\/strong>: \u041b\u043e\u0433\u0438\u043d \u043e\u0442 Robokassa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_PASS_1<\/strong>: \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u044d\u0448\u0430 \u043f\u0440\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_PASS_2<\/strong>: \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>IN_TEST<\/strong>: \u0424\u043b\u0430\u0433 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>1<\/code> \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0438 \u0432 <code>0<\/code> \u0434\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u043e\u0442\u043e\u0432 \u043a \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435!<\/p>\n<h3>\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0431\u043e\u0442\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0445\u0443\u043a\u0438<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0432\u0435\u0431-\u0445\u0443\u043a\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e Telegram-\u0431\u043e\u0442\u0430, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433 \u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Aiohttp.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b bot\/config.py \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043d\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043a\u043b\u0430\u0441\u0441 Settings:<\/p>\n<pre><code class=\"python\">class Settings(BaseSettings):     BOT_TOKEN: str     ADMIN_IDS: List[int]     PROVIDER_TOKEN: str     FORMAT_LOG: str = \"{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}\"     LOG_ROTATION: str = \"10 MB\"     DB_URL: str = 'sqlite+aiosqlite:\/\/\/data\/db.sqlite3'     SITE_URL: str     SITE_HOST: str     SITE_PORT: int     MRH_LOGIN: str     MRH_PASS_1: str     MRH_PASS_2: str     IN_TEST: int     model_config = SettingsConfigDict(         env_file=os.path.join(os.path.dirname(os.path.abspath(__file__)), \"..\", \".env\")     )      @property     def get_webhook_url(self) -&gt; str:         \"\"\"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0438 URL \u0441\u0430\u0439\u0442\u0430.\"\"\"         return f\"{self.SITE_URL}\/{self.BOT_TOKEN}\"      @property     def get_provider_hook_url(self) -&gt; str:         \"\"\"\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0438 URL \u0441\u0430\u0439\u0442\u0430.\"\"\"         return f\"{self.SITE_URL}\/robokassa\"<\/code><\/pre>\n<p><strong>\u041d\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/strong><\/p>\n<ul>\n<li>\n<p><code>SITE_URL<\/code>, <code>SITE_HOST<\/code>, <code>SITE_PORT<\/code> \u2014 \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<\/li>\n<li>\n<p><code>MRH_LOGIN<\/code>, <code>MRH_PASS_1<\/code>, <code>MRH_PASS_2<\/code> \u2014 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 RoboKassa (\u043f\u043e\u0437\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043d\u043e).<\/p>\n<\/li>\n<li>\n<p><code>IN_TEST<\/code> \u2014 \u0440\u0435\u0436\u0438\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>get_webhook_url<\/code> \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 URL \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438.<\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0412 \u043f\u0430\u043f\u043a\u0435 <code>bot<\/code> \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043a\u0435\u0442 <code>app<\/code> \u0441 \u0444\u0430\u0439\u043b\u043e\u043c <code>__init__.py<\/code>. \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430:<\/p>\n<pre><code class=\"css\">app\/     __init__.py     app.py    # \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0434\u043b\u044f Aiohttp     utils.py  # \u0423\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/code><\/pre>\n<h4>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/h4>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>app.py<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432:<\/p>\n<pre><code class=\"python\">from aiohttp import web from aiogram.types import Update from loguru import logger from bot.config import bot, dp, settings<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a:<\/p>\n<pre><code class=\"python\">async def handle_webhook(request: web.Request):     try:         update = Update(**await request.json())         await dp.feed_update(bot, update)         return web.Response(status=200)     except Exception as e:         logger.error(f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0430: {e}\")         return web.Response(status=500)<\/code><\/pre>\n<p><strong>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 Telegram \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 <code>Update<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 (<code>dp<\/code>) \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 <code>feed_update<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0443\u0441 200 (\u0443\u0441\u043f\u0435\u0448\u043d\u043e), \u0430 \u043f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u2014 \u0441\u0442\u0430\u0442\u0443\u0441 500.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>dp.feed_update<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Telegram-\u0431\u043e\u0442\u043e\u0432 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u2014 \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f (Update) \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0435 (Dispatcher), \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0447\u0435\u043c \u043c\u044b \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u0441\u043a\u043e\u0440\u043e.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 HTML \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>\u0414\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Aiohttp \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0440\u0435\u043d\u0434\u0435\u0440 HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b:<\/p>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 async def home_page(request: web.Request) -&gt; web.Response:     \"\"\"     \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0435.     \"\"\"     current_time = datetime.datetime.now().strftime(\"%Y-%m-%d %H:%M:%S\")      html_content = f\"\"\"     &lt;!DOCTYPE html&gt;     &lt;html lang=\"ru\"&gt;     &lt;head&gt;         &lt;meta charset=\"UTF-8\"&gt;         &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;         &lt;title&gt;aiohttp \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f&lt;\/title&gt;         &lt;style&gt;             body {{ font-family: Arial, sans-serif; line-height: 1.6; padding: 20px; max-width: 800px; margin: 0 auto; }}             h1 {{ color: #333; }}             .info {{ background-color: #f4f4f4; padding: 15px; border-radius: 5px; margin-top: 20px; }}         &lt;\/style&gt;     &lt;\/head&gt;     &lt;body&gt;         &lt;h1&gt;\u041f\u0440\u0438\u0432\u0435\u0442, \u044d\u0442\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f Aiohttp&lt;\/h1&gt;         &lt;p&gt;\u042d\u0442\u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442:&lt;\/p&gt;         &lt;ul&gt;             &lt;li&gt;\u0425\u0443\u043a\u0438 \u043e\u0442 Telegram-\u0431\u043e\u0442\u0430&lt;\/li&gt;             &lt;li&gt;\u0425\u0443\u043a\u0438 \u043e\u0442 RoboKassa&lt;\/li&gt;         &lt;\/ul&gt;         &lt;p&gt;\u0422\u0435\u043a\u0443\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430: {current_time}&lt;\/p&gt;     &lt;\/body&gt;     &lt;\/html&gt;     \"\"\"     return web.Response(text=html_content, content_type='text\/html')<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e Aiohttp \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u044c HTML-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441\u0440\u0430\u0432\u043d\u0438\u043c\u043e \u0441 Flask.<\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u043d\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (bot\/main.py)<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 main-\u0444\u0430\u0439\u043b (\u0444\u0430\u0439\u043b <code>bot\/main.py<\/code>) \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0435\u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u043e\u0432\u044b\u0435. \u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u044b:<\/p>\n<pre><code class=\"python\">from aiogram.webhook.aiohttp_server import setup_application from aiohttp import web from aiogram.types import BotCommand, BotCommandScopeDefault from loguru import logger from bot.app.app import handle_webhook, robokassa_result, robokassa_fail, home_page from bot.config import bot, admins, dp, settings from bot.dao.database_middleware import DatabaseMiddlewareWithoutCommit, DatabaseMiddlewareWithCommit from bot.admin.admin import admin_router from bot.user.user_router import user_router from bot.user.catalog_router import catalog_router <\/code><\/pre>\n<p>\u0418\u0437 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043d\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u2014 \u044d\u0442\u043e \u0438\u043c\u043f\u043e\u0440\u0442 <code>setup_application<\/code> \u0438 \u0438\u043c\u043f\u043e\u0440\u0442 <code>from aiohttp import web<\/code> \u0441 \u044d\u0442\u0438\u043c \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h4>\u0420\u0430\u0437\u0431\u043e\u0440 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432<\/h4>\n<ol>\n<li>\n<p><code>from aiogram.webhook.aiohttp_server import setup_application<\/code><strong>:<\/strong><\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>setup_application<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 (<code>Dispatcher<\/code>) \u0438 \u0431\u043e\u0442\u0430 (<code>Bot<\/code>) \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c Aiohttp.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0430 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 Aiohttp \u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 Telegram, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0437 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430 \u0440\u0435\u0430\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<pre><code class=\"python\">setup_application(app, dp, bot=bot)<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440 Aiohttp \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 Telegram, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440 \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><code>from aiohttp import web<\/code><strong>:<\/strong><\/p>\n<ul>\n<li>\n<p>\u042d\u0442\u043e\u0442 \u0438\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 Aiohttp, \u0432\u043a\u043b\u044e\u0447\u0430\u044f:<\/p>\n<ul>\n<li>\n<p><code>web.Application<\/code> \u2014 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code>web.Request<\/code> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><code>web.Response<\/code> \u2014 \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Aiohttp \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u0435\u0431\u0445\u0443\u043a\u0438 Telegram, \u0442\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u0412 \u0441\u043e\u0432\u043e\u043a\u0443\u043f\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Telegram, \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Aiohttp \u0438 \u0431\u043e\u0442\u043e\u043c, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0447\u0435\u0440\u0435\u0437 Aiogram.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0440\u044f\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 \u0438\u0437 \u043f\u0430\u043f\u043a\u0435\u0442\u0430 app. \u041c\u0435\u0442\u043e\u0434 handle_webhook \u0438 home_page \u043c\u044b \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u043a\u043e\u0434\u0443. \u0422\u0430\u043c \u0433\u0434\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043a\u043e\u0434\u0435. \u041c\u0435\u0441\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435:<\/p>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0431\u043e\u0442\u0430 async def set_default_commands():     \"\"\"     \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0431\u043e\u0442\u0430.     \"\"\"     commands = [BotCommand(command='start', description='\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u0442\u0430')]     await bot.set_my_commands(commands, BotCommandScopeDefault())<\/code><\/pre>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0431\u043e\u0442\u0430 async def on_startup(app):     \"\"\"     \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.     \"\"\"     await set_default_commands()     await bot.set_webhook(settings.get_webhook_url)     for admin_id in admins:         try:             await bot.send_message(admin_id, '\u0411\u043e\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d \ud83e\udd73.')         except Exception as e:             logger.error(f\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0443 {admin_id}: {e}\")     logger.info(\"\u0411\u043e\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d.\")<\/code><\/pre>\n<p>\u0422\u0443\u0442 \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0438\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 start_bot \u0441 <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>. \u0418\u0437 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0441\u0442\u0440\u043e\u043a\u0430 <code>await bot.set_webhook(settings.get_webhook_url)<\/code>.<\/p>\n<p>\u0421\u0442\u0440\u043e\u043a\u0430 <code>await bot.set_webhook(settings.get_webhook_url)<\/code> \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 URL \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0434\u043b\u044f \u0431\u043e\u0442\u0430 \u0432 Telegram. \u042d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 Telegram, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f) \u2014 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 (<code>settings.get_webhook_url<\/code>). <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Telegram \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<pre><code class=\"python\">async def on_shutdown(app):     \"\"\"     \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.     \"\"\"     for admin_id in admins:         try:             await bot.send_message(admin_id, '\u0411\u043e\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d. \u041f\u043e\u0447\u0435\u043c\u0443? \ud83d\ude14')         except Exception as e:             logger.error(f\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0443 {admin_id}: {e}\")     await bot.delete_webhook(drop_pending_updates=True)     await bot.session.close()     logger.error(\"\u0411\u043e\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d!\")<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0432\u0438\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f stop_bot \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u0418\u0437 \u043d\u043e\u0432\u043e\u0433\u043e \u2014 \u044f \u0432\u044b\u043d\u0435\u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u043d\u0435 \u0432 \u0431\u043b\u043e\u043a Try Except, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<pre><code class=\"python\"># \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0435\u0439 \u0438 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432 def register_middlewares():     \"\"\"     \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0438 \u0434\u043b\u044f \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430.     \"\"\"     dp.update.middleware.register(DatabaseMiddlewareWithoutCommit())     dp.update.middleware.register(DatabaseMiddlewareWithCommit())       def register_routers():     \"\"\"     \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0434\u043b\u044f \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430.     \"\"\"     dp.include_router(catalog_router)     dp.include_router(user_router)     dp.include_router(admin_router)<\/code><\/pre>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0435\u0439 \u0438 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432) \u0431\u043e\u0442\u0430 \u0432\u044b\u043d\u0435\u0441 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Aiohttp (\u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430)<\/p>\n<pre><code class=\"python\"># \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f aiohttp def create_app():     \"\"\"     \u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 aiohttp.     \"\"\"     # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435     app = web.Application()      # \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432     app.router.add_post(f\"\/{settings.BOT_TOKEN}\", handle_webhook)     app.router.add_post(\"\/robokassa\/result\/\", robokassa_result)     app.router.add_get(\"\/robokassa\/fail\/\", robokassa_fail)     app.router.add_get(\"\/\", home_page)      # \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u043e\u043c \u0438 \u0431\u043e\u0442\u043e\u043c     setup_application(app, dp, bot=bot)      # \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438     app.on_startup.append(on_startup)     app.on_shutdown.append(on_shutdown)      return app<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 <code>create_app:<\/code><\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Aiohttp (web.Application).<\/p>\n<\/li>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 Telegram, Robokassa \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0430 \u0438 \u0431\u043e\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 <code>setup_application<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 (<code>on_startup<\/code>) \u0438 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 (<code>on_shutdown<\/code>).<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u0418\u043c\u0435\u043d\u043d\u043e \u043e\u043d \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\"># \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f def main():     \"\"\"     \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.     \"\"\"     # \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0435\u0439 \u0438 \u0440\u043e\u0443\u0442\u0435\u0440\u043e\u0432     register_middlewares()     register_routers()      # \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e     app = create_app()     web.run_app(app, host=settings.SITE_HOST, port=settings.SITE_PORT)<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043c\u0438\u0434\u043b\u0432\u0430\u0440\u0438 \u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 Aiohttp \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e. \u0421\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u0445\u043e\u0441\u0442\u0435 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 <code>0.0.0.0<\/code>) \u0438 \u043f\u043e\u0440\u0442\u0435, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c NGINX.<\/p>\n<p>\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c:<\/p>\n<pre><code class=\"python\">if __name__ == \"__main__\":     main()<\/code><\/pre>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0431\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438, \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u044f\u0441\u044c \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430. \u041d\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u043d\u043e\u0432\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10\u201315 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0431\u043e\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441 \u043a\u043e\u0440\u043d\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"bash\">python -m bot.main<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0411\u043e\u0442, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c, \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0445\u0443\u0436\u0435 \u0447\u0435\u043c \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433.<\/p>\n<p>\u0414\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043f\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u043c\u0443 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u043c\u0435\u043d\u0438, \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0430\u0439\u0442\u0430. \u0422\u0430\u043c \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/445\/913\/a3a\/445913a3a89d7a55f8419ffba351b404.png\" alt=\"\u0418\u043b\u0438 \u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442, \u0447\u0442\u043e \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438.\" title=\"\u0418\u043b\u0438 \u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442, \u0447\u0442\u043e \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438.\" width=\"1060\" height=\"508\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/445\/913\/a3a\/445913a3a89d7a55f8419ffba351b404.png\"\/><\/p>\n<div><figcaption>\u0418\u043b\u0438 \u0442\u043e\u0442 \u0442\u0435\u043a\u0441\u0442, \u0447\u0442\u043e \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438.<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0442\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u0432\u0430\u0441 \u0432 \u0441\u0432\u043e\u0435 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u00ab<a href=\"https:\/\/t.me\/PythonPathMaster\">\u041b\u0435\u0433\u043a\u0438\u0439 \u043f\u0443\u0442\u044c \u0432 Python<\/a>\u00bb. \u0422\u0430\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0432 \u0441\u0432\u043e\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445, \u043d\u043e \u0438 \u044d\u043a\u0441\u043a\u043b\u044e\u0437\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0432 \u0431\u043e\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 Telegram Stars (\u0437\u0432\u0435\u0437\u0434\u044b) \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0430\u0440\u044b\u0439 \u043a\u043e\u0434<\/h3>\n<p>\u041d\u0430\u0448 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0432\u0435\u0431-\u0445\u0443\u043a\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439. \u042d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u042e\u043a\u0430\u0441\u0441\u043e\u0439 (\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 BotFather) \u0438 Telegram Stars \u2014 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0432 Telegram \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 Robocassa \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u0435\u0431-\u0445\u0443\u043a \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u043c \u043d\u0430 Aiohttp.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e, \u043c\u044b \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u041d\u0430\u043f\u043e\u043c\u043d\u044e, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u044d\u0442\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432 Telegram:<\/p>\n<pre><code class=\"python\">@catalog_router.message(F.content_type == ContentType.SUCCESSFUL_PAYMENT) <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Robocassa \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u043a \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u0438 \u0433\u0438\u0431\u043a\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 <code>bot\/user<\/code> \u0444\u0430\u0439\u043b <code>utils.py<\/code> \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">from aiogram import Bot from loguru import logger from sqlalchemy.ext.asyncio import AsyncSession from bot.config import settings from bot.dao.dao import PurchaseDao, ProductDao from bot.user.kbs import main_user_kb from bot.user.schemas import PaymentData   async def successful_payment_logic(session: AsyncSession, payment_data, currency, user_tg_id, bot: Bot):     product_id = int(payment_data.get(\"product_id\"))     price = payment_data.get(\"price\")     payment_type = payment_data.get(\"payment_type\")     payment_id = payment_data.get(\"payment_id\")     user_id = payment_data.get(\"user_id\")     await PurchaseDao.add(session=session, values=PaymentData(**payment_data))     product_data = await ProductDao.find_one_or_none_by_id(session=session,                                                            data_id=product_id)      # \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c     for admin_id in settings.ADMIN_IDS:         try:             await bot.send_message(                 chat_id=admin_id,                 text=(                     f\"\ud83d\udcb2 \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c c ID {user_id} \u043a\u0443\u043f\u0438\u043b \u0442\u043e\u0432\u0430\u0440 &lt;b&gt;{product_data.name}&lt;\/b&gt; (ID: {product_id}) \"                     f\"\u0437\u0430 &lt;b&gt;{price} {currency}&lt;\/b&gt;.\"                 )             )         except Exception as e:             logger.error(f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430\u043c: {e}\")      # \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e     file_text = \"\ud83d\udce6 &lt;b&gt;\u0422\u043e\u0432\u0430\u0440 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u0430\u0439\u043b:&lt;\/b&gt;\" if product_data.file_id else \"\ud83d\udcc4 &lt;b&gt;\u0422\u043e\u0432\u0430\u0440 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0444\u0430\u0439\u043b\u044b:&lt;\/b&gt;\"     product_text = (         f\"\ud83c\udf89 &lt;b&gt;\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443!&lt;\/b&gt;\\n\\n\"         f\"\ud83d\uded2 &lt;b&gt;\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u0430\u0448\u0435\u043c \u0442\u043e\u0432\u0430\u0440\u0435:&lt;\/b&gt;\\n\"         f\"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\"         f\"\ud83d\udd39 &lt;b&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435:&lt;\/b&gt; &lt;b&gt;{product_data.name}&lt;\/b&gt;\\n\"         f\"\ud83d\udd39 &lt;b&gt;\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:&lt;\/b&gt;\\n&lt;i&gt;{product_data.description}&lt;\/i&gt;\\n\"         f\"\ud83d\udd39 &lt;b&gt;\u0426\u0435\u043d\u0430:&lt;\/b&gt; &lt;b&gt;{price} {currency}&lt;\/b&gt;\\n\"         f\"\ud83d\udd39 &lt;b&gt;\u0417\u0430\u043a\u0440\u044b\u0442\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:&lt;\/b&gt;\\n&lt;i&gt;{product_data.hidden_content}&lt;\/i&gt;\\n\"         f\"\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\\n\"         f\"{file_text}\\n\\n\"         f\"\u2139\ufe0f &lt;b&gt;\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0432\u0441\u0435\u0445 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u043a\u0443\u043f\u043a\u0430\u0445 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0435.&lt;\/b&gt;\"     )      if product_data.file_id:         await bot.send_document(document=product_data.file_id,                                 chat_id=user_tg_id,                                 caption=product_text, reply_markup=main_user_kb(user_tg_id))      else:         await bot.send_message(chat_id=user_tg_id, text=product_text, reply_markup=main_user_kb(user_tg_id))      # \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0437\u0432\u0435\u0437\u0434 \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443     if payment_type == 'stars':         await bot.refund_star_payment(user_id=user_tg_id, telegram_payment_charge_id=payment_id)<\/code><\/pre>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u0447\u0438\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e<\/a>, \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0443 \u0432\u0430\u0441 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u2014 \u044f \u0437\u0430\u043c\u0435\u043d\u0438\u043b \u043f\u0440\u044f\u043c\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Message<\/code> \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u042d\u0442\u043e\u0442 \u0448\u0430\u0433 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u043c \u0441\u0435\u0439\u0447\u0430\u0441, \u043d\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u0438 \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0434\u043b\u044f Robocassa. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0418\u0437 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u2014 \u044d\u0442\u043e \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">if payment_type == 'stars':         await bot.refund_star_payment(user_id=user_tg_id, telegram_payment_charge_id=payment_id)<\/code><\/pre>\n<p>\u041e\u043d\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438, \u0435\u0441\u043b\u0438 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0442\u0430\u043a\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u043f\u043b\u0430\u0442\u044b, \u0437\u0432\u0435\u0437\u0434\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c \u043d\u0430 \u0441\u0447\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0441\u0430\u043c\u043e\u0435 \u0442\u043e.<\/p>\n<p>\u0421\u0430\u043c \u043c\u0435\u0442\u043e\u0434 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439. \u0412 \u043d\u0435\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0430\u0439\u0434\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 <code>telegram_payment_charge_id<\/code>. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0443\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u043a\u0430\u043a \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440.<\/p>\n<p>\u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0432\u0451\u0437\u0434, \u0442\u043e \u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0446\u0435\u043d\u0443 \u0432 10 \u0437\u0432\u0451\u0437\u0434 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u042d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0438 \u043c\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0443\u0447\u0435\u0431\u043d\u044b\u0439. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p>\u0412 \u0430\u0434\u043c\u0438\u043d\u043a\u0435, \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0446\u0435\u043d\u0443 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0443\u0431\u043b\u044f\u0445, \u043d\u043e \u0438 \u0432 \u0437\u0432\u0451\u0437\u0434\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p>\u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0430 \u0431\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u0437\u0432\u0451\u0437\u0434 \u043a \u0440\u0443\u0431\u043b\u044e.<\/p>\n<\/li>\n<\/ol>\n<p>\u042f \u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0446\u0435\u043d\u0443 \u0432 10 \u0437\u0432\u0451\u0437\u0434.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u043c\u0438 (\u0444\u0430\u0439\u043b <code>user\/kbs.py<\/code>).<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u043f\u043b\u0430\u0442\u044b \u2014 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044b\u0433\u0440\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430\u043c\u0438.<\/p>\n<p>\u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043c\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">def product_kb(product_id, price, stars_price) -&gt; InlineKeyboardMarkup:     kb = InlineKeyboardBuilder()     kb.button(text=\"\ud83d\udcb3 \u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u042e\u041a\u0430\u0441\u0441\u0430\", callback_data=f\"buy_yukassa_{product_id}_{price}\")     kb.button(text=\"\ud83d\udcb3 \u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c Robocassa\", callback_data=f\"buy_robocassa_{product_id}_{price}\")     kb.button(text=\"\u2b50 \u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438\", callback_data=f\"buy_stars_{product_id}_{stars_price}\")     kb.button(text=\"\ud83d\udecd \u041d\u0430\u0437\u0430\u0434\", callback_data=\"catalog\")     kb.button(text=\"\ud83c\udfe0 \u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e\", callback_data=\"home\")     kb.adjust(2)     return kb.as_markup()   <\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c50\/dc6\/53c\/c50dc653c0168dadaf94b87f10a797ff.png\" width=\"523\" height=\"325\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c50\/dc6\/53c\/c50dc653c0168dadaf94b87f10a797ff.png\"\/><\/figure>\n<p>\u0422\u0443\u0442 \u043b\u043e\u0433\u0438\u043a\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0434\u0432\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438: \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438 \u0438 \u043e\u043f\u043b\u0430\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 Robocassa.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b \u0438 \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0447\u0442\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043e\u043f\u043b\u0430\u0442\u044b \u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u043f\u043b\u0430\u0442\u044b. \u0412\u043e\u0442 \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<\/p>\n<pre><code class=\"python\">def get_product_buy_youkassa(price) -&gt; InlineKeyboardMarkup:     return InlineKeyboardMarkup(inline_keyboard=[         [InlineKeyboardButton(text=f'\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c {price}\u20bd', pay=True)],         [InlineKeyboardButton(text='\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c', callback_data='home')]     ])   def get_product_buy_robocassa(price: int, payment_link: str) -&gt; InlineKeyboardMarkup:     return InlineKeyboardMarkup(inline_keyboard=[         [InlineKeyboardButton(             text=f'\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c {price}\u20bd',             web_app=WebAppInfo(url=payment_link)         )],         [InlineKeyboardButton(text='\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c', callback_data='home')]     ])   def get_product_buy_stars(price) -&gt; InlineKeyboardMarkup:     return InlineKeyboardMarkup(inline_keyboard=[         [InlineKeyboardButton(text=f\"\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c {price} \u2b50\", pay=True)],         [InlineKeyboardButton(text='\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c', callback_data='home')]     ]) <\/code><\/pre>\n<blockquote>\n<p>\u041a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u043f\u043e\u0434 Robokassa \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0434\u0430\u043b\u0435\u0435, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0435\u043c \u043d\u0430 \u043d\u0435\u0439 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/blockquote>\n<p>\u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0447\u0442\u043e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b Telegram Stars \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u043e\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u042e\u043a\u0430\u0441\u0441\u0443. \u042d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0412\u0441\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0438 Telegram, \u0432\u043a\u043b\u044e\u0447\u0430\u044f Telegram Stars \u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 BotFather, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u043e\u0439. \u042d\u0442\u043e\u0442 \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438, \u0434\u0435\u043b\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b \u0441 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u043c (\u043f\u0440\u043e\u0434\u0430\u0436\u0430\u043c\u0438). \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0444\u0430\u0439\u043b\u043e\u043c: <code>bot\/user\/catalog_router.py.<\/code><\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 callback-\u0434\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043d\u0430 buy_. \u0412 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"python\">@catalog_router.callback_query(F.data.startswith('buy_')) async def process_about(call: CallbackQuery, session_without_commit: AsyncSession):     user_info = await UserDAO.find_one_or_none(         session=session_without_commit,         filters=TelegramIDModel(telegram_id=call.from_user.id)     )     _, payment_type, product_id, price = call.data.split('_')      if payment_type == 'yukassa':         await send_yukassa_invoice(call, user_info, product_id, price)     elif payment_type == 'stars':         await send_stars_invoice(call, user_info, product_id, 10)     elif payment_type == 'robocassa':         await send_robocassa_invoice(call, user_info, product_id, price, session_without_commit)      await call.message.delete() <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u043e\u043f\u043b\u0430\u0442\u044b, \u043c\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u043b\u044f \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 (\u0438\u043d\u0432\u043e\u0439\u0441\u0430).<\/p>\n<p>\u0414\u043b\u044f \u042e\u043a\u0430\u0441\u0441\u044b \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438:<\/p>\n<pre><code class=\"python\">async def send_yukassa_invoice(call, user_info, product_id, price):     await bot.send_invoice(         chat_id=call.from_user.id,         title=f'\u041e\u043f\u043b\u0430\u0442\u0430 \ud83d\udc49 {price}\u20bd',         description=f'\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 {price}\u20bd, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.',         payload=f\"yukassa_{user_info.id}_{product_id}\",         provider_token=settings.PROVIDER_TOKEN,         currency='RUB\u2019         prices=[LabeledPrice(             label=f'\u041e\u043f\u043b\u0430\u0442\u0430 {price}',             amount=int(price) * 100         )],         reply_markup=get_product_buy_youkassa(price)     ) <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0451\u0442\u0430 \u0441\u043e \u0437\u0432\u0451\u0437\u0434\u0430\u043c\u0438 \u043f\u043e\u0447\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u042e\u043a\u0430\u0441\u0441\u0443, \u0438 \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435 \u043f\u043e\u0447\u0435\u043c\u0443.<\/p>\n<pre><code class=\"python\">async def send_stars_invoice(call, user_info, product_id, stars_price):     await bot.send_invoice(         chat_id=call.from_user.id,         title=f'\u041e\u043f\u043b\u0430\u0442\u0430 \ud83d\udc49 {stars_price} \u2b50',         description=f'\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 {stars_price} \u0437\u0432\u0435\u0437\u0434, '                     f'\u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.',         payload=f\"stars_{user_info.id}_{product_id}\",         provider_token=\"\",         currency='XTR',         prices=[LabeledPrice(             label=f'\u041e\u043f\u043b\u0430\u0442\u0430 {stars_price} \u2b50',             amount=int(stars_price)         )],         reply_markup=get_product_buy_stars(stars_price)     ) <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u043e\u0442\u043b\u0438\u0447\u0438\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043b\u0430\u0442\u044b \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>provider_token<\/code> \u043f\u0443\u0441\u0442\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u044d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>\u0418 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u0430\u043b\u044e\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u00ab<code>XTR<\/code>\u00bb, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0433\u043e \u00ab<code>RUB<\/code>\u00bb.<\/p>\n<p>\u041b\u043e\u0433\u0438\u043a\u0443 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 \u043d\u0430 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u0443 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>\u0420\u0430\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u043a\u0430\u043a \u043e\u043f\u043b\u0430\u0442\u0430 \u0447\u0435\u0440\u0435\u0437 \u042e\u043a\u0430\u0441\u0441\u0443, \u0442\u0430\u043a \u0438 \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u043c Telegram. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 Aiogram 3. \u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0441 \u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u0447\u0435\u0440\u0435\u0437 \u042e\u043a\u0430\u0441\u0441\u0443, \u0442\u0430\u043a \u0438 \u0441 \u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">@catalog_router.pre_checkout_query(lambda query: True) async def pre_checkout_query(pre_checkout_q: PreCheckoutQuery):     await bot.answer_pre_checkout_query(pre_checkout_q.id, ok=True)   @catalog_router.message(F.content_type == ContentType.SUCCESSFUL_PAYMENT) async def successful_payment(message: Message, session_with_commit: AsyncSession):     payment_info = message.successful_payment     payment_type, user_id, product_id = payment_info.invoice_payload.split('_')      if payment_type == 'stars':         price = payment_info.total_amount         currency = '\u2b50'     else:         price = payment_info.total_amount \/ 100         currency = '\u20bd'      payment_data = {         'user_id': int(user_id),         'payment_id': payment_info.telegram_payment_charge_id,         'price': price,         'product_id': int(product_id),         'payment_type': payment_type     }      await successful_payment_logic(session=session_with_commit,                                    payment_data=payment_data, currency=currency,                                    user_tg_id=message.from_user.id, bot=bot) <\/code><\/pre>\n<p>\u0412 \u0431\u043b\u043e\u043a\u0435 \u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0430\u0434\u0430\u043f\u0442\u0430\u0446\u0438\u044e \u043f\u043e\u0434 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 (<code>successful_payment_logic<\/code>).<\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0431\u043e\u0442\u0430 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/877\/91f\/a5c\/87791fa5ce6b74c7e41ca1a7c918e00d.png\" alt=\" \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442\" title=\" \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442\" width=\"517\" height=\"188\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/877\/91f\/a5c\/87791fa5ce6b74c7e41ca1a7c918e00d.png\"\/><\/p>\n<div><figcaption> \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ae0\/197\/57e\/ae019757e77047a7819bfdb1790ddfac.png\" alt=\" \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u044b.\" title=\" \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u044b.\" width=\"572\" height=\"508\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ae0\/197\/57e\/ae019757e77047a7819bfdb1790ddfac.png\"\/><\/p>\n<div><figcaption> \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u044b.<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u043d\u0430\u0441 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u0441\u0430\u043b\u044e\u0442 (\u0432 \u043a\u043e\u043d\u0446\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u043e-\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f) \u0438 \u0431\u043e\u0442 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0443\u043c\u043c\u0430 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 10-\u0442\u0438 \u0437\u0432\u0435\u0437\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/238\/e75\/66d\/238e7566defdcfb98f858210b1d071db.png\" width=\"522\" height=\"86\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/238\/e75\/66d\/238e7566defdcfb98f858210b1d071db.png\"\/><\/figure>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0437\u0432\u0451\u0437\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0438 \u0432 \u0420\u043e\u0441\u0441\u0438\u0438. \u0412\u0447\u0435\u0440\u0430 \u044f \u043a\u0443\u043f\u0438\u043b \u0438\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u041c\u0418\u0420. \u0427\u0442\u043e\u0431\u044b \u043a\u0443\u043f\u0438\u0442\u044c \u0437\u0432\u0451\u0437\u0434\u044b, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 Telegram \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u00ab\u041c\u043e\u0438 \u0437\u0432\u0451\u0437\u0434\u044b\u00bb.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a40\/ecd\/7cf\/a40ecd7cf7ca2288c9653239af850212.png\" width=\"398\" height=\"712\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a40\/ecd\/7cf\/a40ecd7cf7ca2288c9653239af850212.png\"\/><\/figure>\n<p>\u041a\u043b\u0438\u043a\u043d\u0443\u0432 \u043d\u0430 \u044d\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0443, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0432\u0435\u0437\u0434 \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043f\u043e \u0437\u0432\u0435\u0437\u0434\u0430\u043c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4e1\/2da\/ca2\/4e12daca2030d0d1158ecbbce80f44b3.png\" width=\"397\" height=\"718\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4e1\/2da\/ca2\/4e12daca2030d0d1158ecbbce80f44b3.png\"\/><\/figure>\n<p>\u0418\u0442\u0430\u043a, \u0431\u043b\u043e\u043a \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 Telegram Stars \u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043d. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u044d\u0442\u0430\u043f\u0443 \u2014 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 Robocassa. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c.<\/p>\n<h3>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u0443 Robocassa c \u0432\u0435\u0431-\u0445\u0443\u043a\u043e\u043c<\/h3>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Robokassa \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0431\u043e\u0440 \u0443\u0442\u0438\u043b\u0438\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0441\u0441\u044b\u043b\u043e\u043a. \u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <code>bot\/app\/utils.py<\/code>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u044b<\/p>\n<pre><code class=\"python\">import hashlib from urllib import parse from urllib.parse import urlparse from bot.config import settings <\/code><\/pre>\n<p>\u041c\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c (hashlib) \u0438 URL (urllib), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 settings.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0439\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441, \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c, \u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044e \u0435\u0433\u043e \u043a\u0430\u043a \u0435\u0441\u0442\u044c, \u0430 \u0434\u0430\u043b\u0435\u0435, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0434\u0430\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c. \u0422\u0430\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0443\u0442\u0438\u043b\u0438\u0442:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">def calculate_signature(login, cost, inv_id, password, user_id, user_telegram_id, product_id, is_result=False):     if is_result:         base_string = f\"{cost}:{inv_id}:{password}\"  # \u0414\u043b\u044f Result URL     else:         base_string = f\"{login}:{cost}:{inv_id}:{password}\"  # \u0414\u043b\u044f initital URL \u0438 Success URL      additional_params = {         'Shp_user_id': user_id,         'Shp_user_telegram_id': user_telegram_id,         'Shp_product_id': product_id     }     for key, value in sorted(additional_params.items()):         base_string += f\":{key}={value}\"      return hashlib.md5(base_string.encode('utf-8')).hexdigest()   def generate_payment_link(cost: float, number: int, description: str,                           user_id: int, user_telegram_id: int, product_id: int,                           is_test=1, robokassa_payment_url='https:\/\/auth.robokassa.ru\/Merchant\/Index.aspx') -&gt; str:     \"\"\"     \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 Robokassa \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438.      :param cost: \u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u043e\u0432\u0430\u0440\u0430     :param number: \u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430     :param description: \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043a\u0430\u0437\u0430     :param user_id: ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     :param user_telegram_id: Telegram ID \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f     :param product_id: ID \u0442\u043e\u0432\u0430\u0440\u0430     :param is_test: \u0424\u043b\u0430\u0433 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 (1 - \u0442\u0435\u0441\u0442, 0 - \u0431\u043e\u0435\u0432\u043e\u0439 \u0440\u0435\u0436\u0438\u043c)     :param robokassa_payment_url: URL \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b Robokassa     :return: \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043e\u043f\u043b\u0430\u0442\u044b     \"\"\"     signature = calculate_signature(         settings.MRH_LOGIN,         cost,         number,         settings.MRH_PASS_1,         user_id,         user_telegram_id,         product_id     )      data = {         'MerchantLogin': settings.MRH_LOGIN,         'OutSum': cost,         'InvId': number,         'Description': description,         'SignatureValue': signature,         'IsTest': is_test,         'Shp_user_id': user_id,         'Shp_user_telegram_id': user_telegram_id,         'Shp_product_id': product_id     }      return f'{robokassa_payment_url}?{parse.urlencode(data)}'   def parse_response(request: str) -&gt; dict:     \"\"\"     \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.      :param request: \u0421\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     :return: \u0421\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438     \"\"\"     return dict(parse.parse_qsl(urlparse(request).query))   def check_signature_result(out_sum, inv_id, received_signature, password, user_id, user_telegram_id, product_id) -&gt; bool:     signature = calculate_signature(         settings.MRH_LOGIN,         out_sum,         inv_id,         password,         user_id,         user_telegram_id,         product_id,         is_result=True  # \u0412\u0430\u0436\u043d\u044b\u0439 \u0444\u043b\u0430\u0433 \u0434\u043b\u044f Result URL     )     return signature.lower() == received_signature.lower()   def result_payment(request: str) -&gt; str:     \"\"\"     \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u043b\u0430\u0442\u044b (ResultURL).      :param request: \u0421\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043e\u043f\u043b\u0430\u0442\u044b     :return: 'OK' + \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430, \u0435\u0441\u043b\u0438 \u043e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 'bad sign'     \"\"\"     params = parse_response(request)     out_sum = params['OutSum']     inv_id = params['InvId']     signature = params['SignatureValue']     user_id = params['Shp_user_id']     user_telegram_id = params['Shp_user_telegram_id']     product_id = params['Shp_product_id']      if check_signature_result(out_sum, inv_id, signature, settings.MRH_PASS_2, user_id, user_telegram_id, product_id):         return f'OK{inv_id}'     return \"bad sign\"   def check_success_payment(request: str) -&gt; str:     \"\"\"     \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u044b (SuccessURL).      :param request: \u0421\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043e\u043f\u043b\u0430\u0442\u044b     :return: \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435 \u0438\u043b\u0438 'bad sign' \u043f\u0440\u0438 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438     \"\"\"     params = parse_response(request)     out_sum = params['OutSum']     inv_id = params['InvId']     signature = params['SignatureValue']     user_id = params['Shp_user_id']     user_telegram_id = params['Shp_user_telegram_id']     product_id = params['Shp_product_id']      if check_signature_result(out_sum, inv_id, signature, settings.MRH_PASS_1, user_id, user_telegram_id, product_id):         return \"Thank you for using our service\"     return \"bad sign\" <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h4>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/h4>\n<pre><code class=\"python\">def calculate_signature(login, cost, inv_id, password, user_id, user_telegram_id, product_id, is_result=False): <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (<code>login<\/code>, <code>cost<\/code>, <code>inv_id<\/code> \u0438 \u0442.\u0434.) \u0438 \u0445\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 MD5. \u042d\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0448\u0435\u043b \u043e\u0442 Robokassa \u0438 \u043d\u0435 \u0431\u044b\u043b \u043f\u043e\u0434\u0434\u0435\u043b\u0430\u043d.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 MD5?<\/strong> \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 API Robokassa \u0438 \u043c\u044b \u0441\u0430\u043c\u0438 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u044d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0445\u044d\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b<\/h4>\n<pre><code class=\"python\">def generate_payment_link(cost, number, description, user_id, user_telegram_id, product_id, is_test=1, robokassa_payment_url='https:\/\/auth.robokassa.ru\/Merchant\/Index.aspx'): <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u0435\u0442 URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b. \u041c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b: \u0441\u0443\u043c\u043c\u0443, \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0412 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0431\u043e\u0442\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0442\u0440\u044e\u043a \u0441 \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 Robokassa \u0434\u043b\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e?<\/strong> \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 URL.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0420\u0430\u0437\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h4>\n<pre><code class=\"python\">def parse_response(request): <\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, URL \u0438\u0437 \u0432\u0435\u0431-\u0445\u0443\u043a\u0430) \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f.<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 Robokassa.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u0441\u043b\u043e\u0432\u0430\u0440\u044c?<\/strong> \u0423\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/h4>\n<pre><code class=\"python\">def check_signature_result(out_sum, inv_id, received_signature, password, user_id, user_telegram_id, product_id): <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u043e\u0442 Robokassa, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0435\u0435 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0440\u0430\u0441\u0447\u0435\u0442\u043d\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e.<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e?<\/strong> \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u043c.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u043f\u043b\u0430\u0442\u044b (ResultURL)<\/h4>\n<pre><code class=\"python\">def result_payment(request): <\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041e\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>OK<\/code> \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435, \u0438\u043d\u0430\u0447\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0435.<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0442 Robokassa \u043e \u0441\u0442\u0430\u0442\u0443\u0441\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u0432\u0430\u0436\u043d\u043e?<\/strong> \u0422\u0430\u043a \u043c\u044b \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u043b \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u043b\u0430\u0442\u044b (SuccessURL)<\/h4>\n<pre><code class=\"python\">def check_success_payment(request): <\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u044b, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043d\u0430\u0448 \u0441\u0430\u0439\u0442 \u043f\u043e\u0441\u043b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u0417\u0434\u0435\u0441\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u043d\u043e\u0441\u0442\u044c.<\/p>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0447\u0435\u043c?<\/strong> \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0447\u0435\u043c\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u044c?<\/strong> \u042d\u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0434\u0435\u0436\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Robokassa. \u041e\u043d\u0438 \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430\u0445. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043e\u0442 Robokassa \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0432 \u0444\u0430\u0439\u043b\u0435 <code>bot\/app\/app.py<\/code><\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432:<\/p>\n<pre><code class=\"python\">import datetime  from aiohttp import web from aiogram.types import Update from loguru import logger from bot.app.utils import check_signature_result from bot.config import bot, dp, settings from bot.dao.database import async_session_maker from bot.user.utils import successful_payment_logic <\/code><\/pre>\n<ul>\n<li>\n<p><code>aiohttp.web<\/code>: \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c.<\/p>\n<\/li>\n<li>\n<p><code>loguru<\/code>: \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code>check_signature_result<\/code>: \u0423\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<li>\n<p><code>async_session_maker<\/code>: \u0424\u0430\u0431\u0440\u0438\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p><code>successful_payment_logic<\/code>: \u041b\u043e\u0433\u0438\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430:<\/p>\n<pre><code class=\"python\">async def robokassa_result(request: web.Request) -&gt; web.Response:     \"\"\"     \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u044b \u043d\u0430 ResultURL.      :param request: HTTP-\u0437\u0430\u043f\u0440\u043e\u0441     :return: \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438     \"\"\"     logger.success(\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u044b!\")     data = await request.post()      # \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u0430     signature = data.get('SignatureValue')     out_sum = data.get('OutSum')     inv_id = data.get('InvId')     user_id = data.get('Shp_user_id')     user_telegram_id = data.get('Shp_user_telegram_id')     product_id = data.get('Shp_product_id')      # \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c     if check_signature_result(         out_sum=out_sum,         inv_id=inv_id,         received_signature=signature,         password=settings.MRH_PASS_2,         user_id=user_id,         user_telegram_id=user_telegram_id,         product_id=product_id     ):         result = f\"OK{inv_id}\"         logger.info(f\"\u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f InvId: {inv_id}\")          payment_data = {             'user_id': int(user_id),             'payment_id': signature,             'price': int(out_sum),             'product_id': int(product_id),             'payment_type': \"robocassa\"         }         async with async_session_maker() as session:             await successful_payment_logic(                 session=session,                 payment_data=payment_data,                 currency=\"\u20bd\",                 user_tg_id=int(user_telegram_id),                 bot=bot             )             await session.commit()     else:         result = \"bad sign\"         logger.warning(f\"\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u044f InvId: {inv_id}\")      logger.info(f\"\u041e\u0442\u0432\u0435\u0442: {result}\")     return web.Response(text=result) <\/code><\/pre>\n<h4>\u0420\u0430\u0437\u0431\u043e\u0440 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: robokassa_result<\/h4>\n<pre><code class=\"python\">async def robokassa_result(request: web.Request) -&gt; web.Response: <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442 Robokassa \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 <strong>ResultURL<\/strong>.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 Robocassa \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bed\/e6c\/044\/bede6c0442802b369a81d1bec70f7c77.png\" width=\"753\" height=\"125\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bed\/e6c\/044\/bede6c0442802b369a81d1bec70f7c77.png\"\/><\/figure>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 bot\/main.py \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430:<\/p>\n<pre><code class=\"python\">app.router.add_post(\"\/robokassa\/result\/\", robokassa_result) <\/code><\/pre>\n<p>\u042d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441 Robocassa \u0441 \u043d\u0430\u0448\u0438\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<h3>1. \u041b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h3>\n<pre><code class=\"python\">logger.success(\"\u041f\u043e\u043b\u0443\u0447\u0435\u043d \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0420\u043e\u0431\u043e\u043a\u0430\u0441\u0441\u044b!\") data = await request.post() <\/code><\/pre>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043b\u043e\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u043a\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0437\u0430\u0442\u0435\u043c \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>POST<\/code>.<\/p>\n<h3>2. \u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h3>\n<pre><code class=\"python\">signature = data.get('SignatureValue') out_sum = data.get('OutSum') inv_id = data.get('InvId') user_id = data.get('Shp_user_id') user_telegram_id = data.get('Shp_user_telegram_id') product_id = data.get('Shp_product_id') <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0442\u0441\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><code>SignatureValue<\/code>: \u0426\u0438\u0444\u0440\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p><code>OutSum<\/code>: \u0421\u0443\u043c\u043c\u0430 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><code>InvId<\/code>: \u041d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430.<\/p>\n<\/li>\n<li>\n<p><code>Shp_user_id<\/code>, <code>Shp_user_telegram_id<\/code>, <code>Shp_product_id<\/code>: \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c\u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430.<\/p>\n<\/li>\n<\/ul>\n<h3>3. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/h3>\n<pre><code class=\"python\">if check_signature_result(     out_sum=out_sum,     inv_id=inv_id,     received_signature=signature,     password=settings.MRH_PASS_2,     user_id=user_id,     user_telegram_id=user_telegram_id,     product_id=product_id ): <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b <code>check_signature_result<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u042d\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0448\u0435\u043b \u043e\u0442 Robokassa.<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0441\u043f\u0435\u0445<\/strong>: \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0432\u0435\u0440\u043d\u0430, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u0443\u044e \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p><strong>\u041e\u0448\u0438\u0431\u043a\u0430<\/strong>: \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442, \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441.<\/p>\n<\/li>\n<\/ul>\n<h3>4. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b<\/h3>\n<pre><code class=\"python\">result = f\"OK{inv_id}\" logger.info(f\"\u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f InvId: {inv_id}\")  payment_data = {     'user_id': int(user_id),     'payment_id': signature,     'price': int(out_sum),     'product_id': int(product_id),     'payment_type': \"robocassa\" } <\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 purchases \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044c \u043a\u043e\u043b\u043e\u043d\u043a\u0430 &#171;payment_type&#187;. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Alembic.<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 <code>OK<\/code> \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0437\u0430\u043a\u0430\u0437\u0430. \u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u0435 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h3>4.1 \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0431\u0430\u0437\u0443<\/h3>\n<pre><code class=\"python\">async with async_session_maker() as session:     await successful_payment_logic(         session=session,         payment_data=payment_data,         currency=\"\u20bd\",         user_tg_id=int(user_telegram_id),         bot=bot     )     await session.commit() <\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>successful_payment_logic<\/code> \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c<\/p>\n<\/li>\n<\/ul>\n<h3>4.2 \u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/h3>\n<pre><code class=\"python\">else:     result = \"bad sign\"     logger.warning(f\"\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0434\u043b\u044f InvId: {inv_id}\") <\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435\u0432\u0435\u0440\u043d\u0430, \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043b\u043e\u0433\u0430\u0445 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442 <code>bad sign<\/code>.<\/p>\n<h3>5. \u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430<\/h3>\n<pre><code class=\"python\">logger.info(f\"\u041e\u0442\u0432\u0435\u0442: {result}\") return web.Response(text=result) <\/code><\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f HTTP-\u043e\u0442\u0432\u0435\u0442:<\/p>\n<ul>\n<li>\n<p><code>OK{inv_id}<\/code>: \u041f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435.<\/p>\n<\/li>\n<li>\n<p><code>bad sign<\/code>: \u041f\u0440\u0438 \u043e\u0448\u0438\u0431\u043a\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u043e\u0447\u0435\u043c\u0443 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e?<\/h4>\n<ul>\n<li>\n<p><strong>\u0417\u0430\u0449\u0438\u0442\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/strong>: \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/strong>: \u0423\u0441\u043f\u0435\u0448\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0412\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u043e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0434\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0418\u0442\u043e\u0433<\/h4>\n<p>\u042d\u0442\u043e\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u2014 \u043a\u043b\u044e\u0447\u0435\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Robokassa. \u041e\u043d \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 <strong>ResultURL<\/strong>, \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432 \u0431\u0430\u0437\u0435 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0438\u0435\u043c\u0430 \u043e\u043f\u043b\u0430\u0442.<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0432\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0441\u0443\u0442\u044c. \u0422\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0432\u043e\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439, \u0431\u0443\u0434\u0435\u0442 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043b\u044f \u043b\u044e\u0431\u043e\u0439 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u0440\u0438 \u0447\u0435\u043c, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u0442\u0430. \u042d\u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u0432\u044b \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432, \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u044d\u0442\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043a\u0430\u043a, \u0432 \u0446\u0435\u043b\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0439 \u0445\u0443\u043a. \u041f\u0435\u0440\u0435\u0434 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0442\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431 \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u2014 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432 \u043c\u043e\u0435\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u043a\u0430\u043d\u0430\u043b\u0435 \u00ab<a href=\"https:\/\/t.me\/PythonPathMaster\">\u041b\u0435\u0433\u043a\u0438\u0439 \u043f\u0443\u0442\u044c \u0432 Python<\/a>\u00bb \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u043a\u043e\u0434\u0430 \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435 \u0431\u0435\u0437 \u043c\u0430\u043b\u043e\u0433\u043e 2000 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043d\u0435 \u044f, \u0442\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0447\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u043e\u0439. \u0410 \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438 \u0441\u0432\u044f\u0437\u0430\u043b\u0438 \u0435\u0433\u043e \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Robocassa, \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0443\u0436\u0435 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u0435.<\/p>\n<h3>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u043a\u0443 Robocassa \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/h3>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u0442\u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u00abRobocassa\u00bb \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u043d\u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0435 \u0432\u0435\u043b\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u0430 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0432 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"python\">def get_product_buy_robocassa(price: int, payment_link: str) -&gt; InlineKeyboardMarkup:     return InlineKeyboardMarkup(inline_keyboard=[         [InlineKeyboardButton(             text=f'\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c {price}\u20bd',             web_app=WebAppInfo(url=payment_link)         )],         [InlineKeyboardButton(text='\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c', callback_data='home')]     ]) <\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 Telegram Mini App. \u0425\u043e\u0442\u044f \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u043c\u0435\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u043b\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 MiniApp, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0437\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u00ab\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435\u00bb MiniApp \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0439\u0442\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u044e \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<p> \u0412 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0e\/937\/1bb\/b0e9371bb15c26d6c96178d751e19673.png\" alt=\" \u0412\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e.\" title=\" \u0412\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e.\" width=\"1033\" height=\"765\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b0e\/937\/1bb\/b0e9371bb15c26d6c96178d751e19673.png\"\/><\/p>\n<div><figcaption> \u0412\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e.<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>bot\/user\/catalog_router.py<\/code> \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0447\u0435\u0442 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 Robocassa:<\/p>\n<pre><code class=\"python\">async def send_robocassa_invoice(call, user_info, product_id, price, session: AsyncSession):     pay_id = await PurchaseDao.get_next_id(session=session)     text = f'\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 {price}\u20bd, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.'     description = f\"\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430 \u0442\u043e\u0432\u0430\u0440: ID {user_info.id} ({price}\u20bd)\"     payment_link = generate_payment_link(cost=float(price), number=pay_id, description=description,                                          user_id=user_info.id, user_telegram_id=call.from_user.id,                                          product_id=product_id)     kb = get_product_buy_robocassa(price, payment_link)     await call.message.answer(text, reply_markup=kb)      <\/code><\/pre>\n<p>\u0421 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f, \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0438 \u043e \u0442\u043e\u0432\u0430\u0440\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>generate_payment_link<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u0441\u0451 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u044f\u0441\u043d\u043e.<\/p>\n<p> \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u0447\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f2b\/8ed\/355\/f2b8ed3557fbbd058bbac1ce5a059d01.png\" width=\"531\" height=\"145\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f2b\/8ed\/355\/f2b8ed3557fbbd058bbac1ce5a059d01.png\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u00ab\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c\u00bb \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0435 \u00ab\u0444\u0435\u0439\u043a\u043e\u0432\u043e\u0435\u00bb \u043c\u0438\u043d\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c. \u041b\u043e\u0433\u0438\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u0439\u0442\u0438 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b \u043e\u043f\u043b\u0430\u0442\u0443 \u043c\u044b \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0445\u0443\u043a\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043b\u043e\u0433\u0438\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443:<\/p>\n<ol>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u00ab\u041e\u043f\u043b\u0430\u0442\u0438\u0442\u044c\u00bb<\/p>\n<\/li>\n<li>\n<p>Robocassa \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0430 \u043f\u043e\u0441\u0442\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u0434\u0435\u043d\u0435\u0433 \u043d\u0430 \u0441\u0447\u0435\u0442<\/p>\n<\/li>\n<li>\n<p>Robocassa \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u043d\u0430\u0448 \u0445\u0443\u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0448 \u0445\u0443\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438 \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u00ab\u041f\u043b\u0430\u0442\u0435\u0436 \u0443\u0441\u043f\u0435\u0448\u0435\u043d\u00bb: \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0430\u0434\u043c\u0438\u043d\u0430\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043b\u0430\u0442\u0435\u0436 \u0443\u0441\u043f\u0435\u0448\u0435\u043d \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u043e\u0432\u0430\u0440.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043e\u0434\u0438\u043d \u0438\u0437 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0447\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 Robocass \u044d\u0442\u043e \u0430\u0439\u0434\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0438 \u0442\u0443\u0442 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0443\u0447\u0435\u0431\u043d\u044b\u0439, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0439\u0442\u0438 \u0432 \u043d\u0435\u043c \u043f\u043e \u043f\u0443\u0442\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0441\u043e\u043f\u0440\u0430\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0430\u0439\u0434\u0438\u0448\u043d\u0438\u043a \u0432 \u043f\u043e\u043a\u0443\u043f\u043a\u0430\u0445 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043a \u043d\u0435\u043c\u0443 +1. \u042d\u0442\u043e \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"python\">class PurchaseDao(BaseDAO[Purchase]):     model = Purchase      # \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b      @classmethod     async def get_next_id(cls, session: AsyncSession) -&gt; int:         \"\"\"         \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 ID \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.          :param session: \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0441\u0435\u0441\u0441\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445         :return: \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 ID         \"\"\"         query = select(func.coalesce(func.max(cls.model.id) + 1, 1))         result = await session.execute(query)         return result.scalar() <\/code><\/pre>\n<h2>\u041f\u0440\u0438\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432 \u0431\u043e\u0442\u0435<\/h2>\n<p>\u0412\u0438\u0434\u0435\u043e-\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/676ea9efa080f3d770e6ad71\" data-style=\"\" id=\"676ea9efa080f3d770e6ad71\" width=\"\"><\/div>\n<h3>\u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 Amvera Cloud<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b amvera.yml \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code class=\"1c\">meta:   environment: python   toolchain:     name: pip     version: 3.12 build:   requirementsPath: requirements.txt run:   persistenceMount: \/data   containerPort: 8000   command: python3 -m bot.main <\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435  containerPort (8000) \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e .env \u0444\u0430\u0439\u043b\u0430 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f SITE_PORT).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439. \u0428\u0430\u0433\u0438 \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0414\u0435\u043b\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u0432 <a href=\"https:\/\/amvera.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=yakvenalex_digital_market_bot_part_two\">Amvera Cloud<\/a> (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438)<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0438\u043a\u0430\u0435\u043c \u043d\u0430 \u00ab\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u00bb<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u0435\u043c \u0438\u043c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0430\u0440\u0438\u0444\u043d\u044b\u0439 \u043f\u043b\u0430\u043d. \u041f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 \u00ab\u0414\u0430\u043b\u0435\u0435\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u043f\u043e\u0441\u043e\u0431 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430. \u0414\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c\u0438 GIT (\u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e) \u0438\u043b\u0438 \u0432\u044b\u0431\u0440\u0430\u0432 \u00ab\u0427\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u00bb \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0435\u0440\u0435\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430 \u043f\u0440\u044f\u043c\u043e \u0432 Amvera. \u042f, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437, \u0432\u044b\u0431\u0438\u0440\u0430\u044e \u00ab\u0427\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u00bb. \u041f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043d\u0430 \u0434\u0430\u043b\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043b\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u0438\u043b\u0438\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u00ab\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u00bb.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0438\u043a\u0430\u0435\u043c \u043d\u0430 \u00ab\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f\u00bb \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u00ab\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f\u00bb<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e73\/183\/c57\/e73183c5781c0fb51a2ce07462f86587.png\" width=\"1156\" height=\"631\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e73\/183\/c57\/e73183c5781c0fb51a2ce07462f86587.png\"\/><\/figure>\n<ol start=\"4\">\n<li>\n<p>\u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0438 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432 \u0444\u0430\u0439\u043b .env<\/p>\n<\/li>\n<\/ol>\n<p>\u0423 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430:<\/p>\n<p><code>SITE_URL=https:\/\/aiogrambotpayhook-yakvenalex.amvera.io<\/code><\/p>\n<ol start=\"5\">\n<li>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c .env \u0444\u0430\u0439\u043b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Amvera Cloud \u043d\u0430 \u0444\u0430\u0439\u043b \u0441 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043e\u043c\u0435\u043d\u043e\u043c<\/p>\n<\/li>\n<li>\n<p>\u041a\u043b\u0438\u043a\u0430\u0435\u043c \u043d\u0430 \u00ab\u041f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u00bb<\/p>\n<\/li>\n<\/ol>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/230\/74b\/0b6\/23074b0b63ca7ab3570af09f49a07486.png\" width=\"1202\" height=\"225\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/230\/74b\/0b6\/23074b0b63ca7ab3570af09f49a07486.png\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e, \u0442\u043e \u0431\u043e\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u0438\u0442 \u0432\u0430\u0441 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043f\u0443\u0449\u0435\u043d, \u0430 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430\u0448\u0430 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cb5\/4d9\/6db\/cb54d96db9f397c0e73482d89bdf0039.png\" width=\"1222\" height=\"447\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cb5\/4d9\/6db\/cb54d96db9f397c0e73482d89bdf0039.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d. \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043a\u043b\u0430\u0446\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u0442\u043e \u0432\u043e\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0435\u0433\u043e: <a href=\"https:\/\/t.me\/DigitalMarketAiogramHookBot\">https:\/\/t.me\/DigitalMarketAiogramHookBot<\/a>. \u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043a\u0430\u043a \u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435<a href=\"https:\/\/t.me\/PythonPathMaster\"> \u0433\u0434\u0435 \u043d\u0430\u0439\u0442\u0438<\/a>.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0440\u043e\u0435\u043a\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d, \u0438 \u043c\u044b \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c! \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0431\u043e\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b \u2014 \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0447\u0435\u0440\u0435\u0437 BotFather \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u043f\u0438\u0441\u043d\u043e\u0433\u043e \u0432\u0435\u0431-\u0445\u0443\u043a\u0430.<\/p>\n<p>\u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u043d\u043e\u0432\u043e\u0439 \u0438 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 Telegram, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0430\u043b\u044e\u0442\u0443 Telegram Stars. \u042d\u0442\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c \u0441 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430\u043c\u0438 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0432\u0430\u0436\u043d\u044b\u0439 \u043d\u0430\u0432\u044b\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0438 \u0441\u0442\u0430\u0442\u044c \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u043e\u043c.<\/p>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0445\u0443\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043d\u043e \u0438 \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0439 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u0432\u044f\u0437\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439. \u041e\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432 \u0434\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u2014 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0431\u0435\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0438 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u044e\u0449\u0438\u043c.<\/p>\n<p>\u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043f\u043b\u0430. \u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0441 \u0441 \u041d\u0430\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u043c \u041d\u043e\u0432\u044b\u043c \u0433\u043e\u0434\u043e\u043c \u0438 \u0432\u0441\u0435\u043c\u0438 \u0437\u0438\u043c\u043d\u0438\u043c\u0438 \u043f\u0440\u0430\u0437\u0434\u043d\u0438\u043a\u0430\u043c\u0438! \u041f\u0443\u0441\u0442\u044c 2025 \u0433\u043e\u0434 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u0432\u0430\u043c \u043d\u043e\u0432\u044b\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f, \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u043f\u0435\u0445 \u2014 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438, \u043d\u043e \u0438 \u0432 \u0436\u0438\u0437\u043d\u0438.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441. \u0414\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0438 \u0432 \u043d\u043e\u0432\u043e\u043c, 2025 \u0433\u043e\u0434\u0443! \ud83c\udf84\u2728<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><\/p>\n<div class=\"tm-article-poll-container\"><!--[--><\/p>\n<div class=\"tm-article-poll tm-article-poll_variant-bordered\">\n<div class=\"tm-notice tm-notice_positive tm-article-poll__notice\"><!----><\/p>\n<div class=\"tm-notice__inner\"><!----><\/p>\n<div class=\"tm-notice__content\" data-test-id=\"notice-content\"><!--[--><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/companies\/amvera\/articles\/870414\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><!--]--><\/div>\n<\/div>\n<\/div>\n<p><!--[--><\/p>\n<div class=\"tm-article-poll__header\">\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u0440\u043e\u0435\u043a\u0442 Telegram-\u0431\u043e\u0442\u0430 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 MiniApp?<\/div>\n<div class=\"tm-article-poll__answers\"><!--[--><\/p>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">80% <\/span><span class=\"tm-article-poll__answer-label\">\u041a\u043e\u043d\u0435\u0447\u043d\u043e!<\/span><span class=\"tm-article-poll__answer-votes\">8<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width: 80%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">0% <\/span><span class=\"tm-article-poll__answer-label\">\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u2026<\/span><span class=\"tm-article-poll__answer-votes\">0<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 0%\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">20% <\/span><span class=\"tm-article-poll__answer-label\">\u041d\u0435\u0442!<\/span><span class=\"tm-article-poll__answer-votes\">2<\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width: 20%\"><\/div>\n<\/div>\n<\/div>\n<p><!--]--><\/div>\n<div class=\"tm-article-poll__stats\"> \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 10 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.   \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f 1 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c. <\/div>\n<p><!--]--><\/div>\n<p><!--]--><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/870414\/\"> https:\/\/habr.com\/ru\/articles\/870414\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0414\u0440\u0443\u0437\u044c\u044f, \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e!<\/p>\n<p>\u0421 \u0443\u0447\u0435\u0442\u043e\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043a \u0442\u0435\u043c\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0432 Telegram-\u0431\u043e\u0442\u043e\u0432, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 Aiogram, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0443\u0433\u043b\u0443\u0431\u0438\u043c\u0441\u044f \u0432 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u044b, \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044b.<\/p>\n<h3>\u0420\u0435\u0442\u0440\u043e\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/h3>\n<p>\u041d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0440\u0430\u0437 \u043c\u044b \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f Telegram-\u0431\u043e\u0442\u0430 \u043d\u0430 Python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c SQLAlchemy 2 \u0438 Aiogram 3. \u042d\u0442\u043e\u0442 \u0431\u043e\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u043b:<\/p>\n<ul>\n<li>\n<p><strong>\u0410\u0434\u043c\u0438\u043d-\u043f\u0430\u043d\u0435\u043b\u044c<\/strong> \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0442\u043e\u0432\u0430\u0440\u043e\u0432<\/strong> \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u042e\u041a\u0430\u0441\u0441\u0430 \u0431\u0435\u0437 \u0432\u044b\u0445\u043e\u0434\u0430 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>\u041b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/strong>, \u0433\u0434\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u043b\u0438\u0441\u044c \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0431\u043e\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435:<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/676edb60c3f6e0d78c08a4e1\" data-style=\"\" id=\"676edb60c3f6e0d78c08a4e1\" width=\"\"><\/div>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u0431\u043e\u0442\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438: <a href=\"https:\/\/t.me\/DigitalMarketAiogramBot\">https:\/\/t.me\/DigitalMarketAiogramBot<\/a> (\u0440\u0435\u0448\u0438\u043b \u043d\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c)<\/p>\n<p>\u041a\u0430\u043a \u044f \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0442\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f Telegram-\u0431\u043e\u0442\u043e\u0432, \u043f\u0440\u043e\u0434\u0430\u044e\u0449\u0438\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u044b, \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043b\u0430\u0442\u044b <strong>Telegram Stars<\/strong>. \u0425\u043e\u0442\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a \u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u044b \u043b\u0438\u0447\u043d\u043e \u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b, \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 Telegram Stars \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c \u0434\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 BotFather \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0430 \u0432 \u043f\u043b\u0430\u043d\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 <strong>Robokassa<\/strong>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b:<\/p>\n<ol>\n<li>\n<p>\u0412\u043d\u0435\u0434\u0440\u0438\u043c Telegram Stars \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 Robokassa \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u044f \u0441 \u043b\u043e\u043d\u0433-\u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0438.<\/p>\n<\/li>\n<\/ol>\n<h3>\u041f\u043b\u0430\u043d \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e \u043f\u043b\u0430\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<h4>1. \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u043b\u043e\u043d\u0433-\u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0438<\/h4>\n<p>\u0412\u0435\u0431\u0445\u0443\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c Telegram \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043d\u0430\u0441 \u043e\u0431 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u0445. \u042d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439.<\/p>\n<h4>2. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Telegram Stars<\/h4>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043b\u0430\u0442\u044b, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043d\u043e\u0432\u044b\u043c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c Telegram.<\/p>\n<h4>3. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Robokassa<\/h4>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c Robokassa \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043e\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<h4>4. \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0435<\/h4>\n<p>\u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u043c \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b.<\/p>\n<h4>5. \u0414\u0435\u043f\u043b\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u041e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0443\u0434\u0435\u043b\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0443 \u0434\u0435\u043f\u043b\u043e\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043e\u043c\u0435\u043d \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTTPS.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u0442\u0430\u043a\u0438\u0445 \u0431\u043e\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1: VPS-\u0441\u0435\u0440\u0432\u0435\u0440<\/strong><\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043a\u0443\u043f\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 VPS.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (NGINX\/APACHE).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 HTTPS.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2: \u0425\u043e\u0441\u0442\u0438\u043d\u0433 (\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 <\/strong><a href=\"https:\/\/amvera.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=yakvenalex_digital_market_bot_part_two\"><strong>Amvera Cloud<\/strong><\/a><strong>)<\/strong><\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u043e\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442 \u0438\u043b\u0438 Git.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u043e\u0449\u0435, \u044f \u0431\u0443\u0434\u0443 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Amvera Cloud.<\/p>\n<h3>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u0438 \u0432 \u0447\u0435\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430?<\/h3>\n<p>\u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0438 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 Telegram-\u0431\u043e\u0442\u043e\u0432, \u043d\u043e \u0438 \u0432 \u043c\u0438\u0440\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0446\u0435\u043b\u043e\u043c.<\/p>\n<h4>\u041f\u043e\u043b\u043b\u0438\u043d\u0433<\/h4>\n<p>\u0421\u0443\u0442\u044c \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u043f\u043e\u043b\u043b\u0438\u043d\u0433\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430\u043c\u0438 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0412\u043e\u0442 \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<ul>\n<li>\n<p><strong>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433:<\/strong> \u0431\u043e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 Telegram \u043e \u043d\u043e\u0432\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0435\u0441\u0442\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430\u0436\u0430\u043b \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041c\u043e\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438\u00bb), \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0431\u043e\u0442\u0443: \u00ab\u0415\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441 ID 123456 \u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443\u00bb. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u043e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043d\u0443\u0436\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 \u043d\u0435\u0442, \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u0430\u0436\u0435 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u044b \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043b\u0438\u043d\u0433:<\/strong> \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0447\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443, \u0432\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u00ab\u043e\u043f\u043b\u0430\u0447\u0435\u043d\u043e\u00bb, \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u0435\u0431\u0445\u0443\u043a\u0438<\/h4>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u2014 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. \u0412\u0435\u0431\u0445\u0443\u043a \u2014 \u044d\u0442\u043e URL-\u0430\u0434\u0440\u0435\u0441, \u043a\u0443\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b:<\/p>\n<ul>\n<li>\n<p><strong>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a\u0438:<\/strong> \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440 Telegram \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0430\u043b \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443), \u043e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0431\u0445\u0443\u043a. \u0411\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043b\u0430\u0442\u0435\u0436\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430:<\/strong> \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u0430\u043c\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0435\u0442 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431\u0445\u0443\u043a. \u0412\u0430\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/h4>\n<ul>\n<li>\n<p><strong>\u042d\u043a\u043e\u043d\u043e\u043c\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/strong> \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439:<\/strong> \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u043e\u0439:<\/strong> \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0436\u0438\u0437\u043d\u0438. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0434\u0440\u0443\u0433\u0430 \u043d\u043e\u0432\u043e\u0441\u0442\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u043b\u043b\u0438\u043d\u0433: \u0432\u044b \u043a\u0430\u0436\u0434\u044b\u0435 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0430: \u00ab\u0427\u0442\u043e \u043d\u043e\u0432\u043e\u0433\u043e?\u00bb.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0435\u0431\u0445\u0443\u043a: \u0434\u0440\u0443\u0433 \u0441\u0430\u043c \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0432\u0430\u043c \u043d\u043e\u0432\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435, \u043d\u043e \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u043d\u0430\u0447\u0430\u043b\u0443 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\u041a \u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 <a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/869136\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439<\/a> \u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c:<\/p>\n<ol>\n<li>\n<p><strong>\u0422\u043e\u043a\u0435\u043d Telegram-\u0431\u043e\u0442\u0430<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u043f\u043b\u0430\u0442\u044b \u042e\u041a\u0430\u0441\u0441\u0430 \u043a \u0431\u043e\u0442\u0443<\/strong>,  \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/t.me\/BotFather\">@BotFather<\/a> (Provider token).<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0433\u0434\u0435 \u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0431\u043e\u0442\u0430 \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0447\u0435\u0440\u0435\u0437 \u042e\u041a\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u043c\u0438, \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c.<\/p>\n<p>\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <strong>Aiohttp<\/strong>. \u042d\u0442\u0430 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 Telegram-\u0431\u043e\u0442\u0430\u0445. \u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 Aiohttp \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u043c\u0438\u043d\u0438-\u0441\u0430\u0439\u0442\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043e \u0445\u0443\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u044e\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<p>\u0414\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>NGROK<\/strong> \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0443\u043d\u043d\u0435\u043b\u044c, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u0437\u043d\u0430\u043a\u043e\u043c\u044b.<\/p>\n<h4>\u0421\u0432\u044f\u0437\u043a\u0430 \u0442\u0443\u043d\u043d\u0435\u043b\u044f \u0438 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/h4>\n<ol>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0440\u0442\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, 8000).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0442\u0443\u043d\u043d\u0435\u043b\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, NGROK) \u043a \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0440\u0442\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0441 HTTPS-\u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0430\u0448 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 Telegram \u0438\u043b\u0438 Robokassa \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u0432\u0430\u043c \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 &#171;<a href=\"https:\/\/habr.com\/ru\/companies\/amvera\/articles\/841616\/\">\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0441 HTTPS \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439: \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043d\u0430 Flask<\/a>&#187; \u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0442\u0443\u043d\u0435\u043b\u0435\u0439 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043e\u0442 <a href=\"https:\/\/amvera.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=yakvenalex_digital_market_bot_part_two\"><strong>Amvera Cloud<\/strong><\/a>, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 HTTPS.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 NGROK<\/h4>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 <a href=\"https:\/\/ngrok.com\">NGROK<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u0438 \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u044c.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Windows).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u2014 \u043e\u043d\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 NGROK \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>ngrok http 8000<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c <code>8000<\/code> \u2014 \u043f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0430\u0448 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u041c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0432\u043e\u0439.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 NGROK \u0432\u044b\u0434\u0430\u0441\u0442 \u0441\u0441\u044b\u043b\u043a\u0443 \u0432\u0438\u0434\u0430 <code>https:\/\/&lt;\u0432\u0430\u0448-\u0434\u043e\u043c\u0435\u043d&gt;.ngrok.io<\/code>. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0435\u0451 \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f.<\/p>\n<h4>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043a \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0431\u043e\u0442\u0435<\/h4>\n<p>\u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b Robokassa \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p>\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/www.robokassa.ru\">Robokassa<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u00ab\u041c\u0430\u0433\u0430\u0437\u0438\u043d\u00bb \u0432 \u043b\u0438\u0447\u043d\u043e\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0432\u0430\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0414\u0432\u0430 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0445\u044d\u0448\u0430 \u2014 MD5 (\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430).<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u042d\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0442\u043e\u043a\u0435\u043d\u044b \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0445\u0443\u043a\u0430).<\/p>\n<figure class=\"full-width\">\n<div><figcaption> \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u041a\u0430\u0440\u0442\u043e\u0447\u043a\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u00bb<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption> \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u00ab\u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438\u00bb<\/figcaption><\/div>\n<\/figure>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438. \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ol>\n<li>\n<p><strong>\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/strong><\/p>\n<pre><code class=\"bash\">git clone https:\/\/githu\u0439b.com\/Yakvenalex\/DigitalMarketBot.git<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0437\u0432\u0435\u0437\u0434\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/strong><\/p>\n<pre><code class=\"bash\">cd DigitalMarketBot<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435:<\/strong><\/p>\n<pre><code class=\"bash\">python -m venv venv source venv\/bin\/activate  # \u0414\u043b\u044f Windows: venv\\Scripts\\activate<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/strong><\/p>\n<pre><code class=\"bash\">pip install -r requirements.txt<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <\/strong><code>.env<\/code><strong> \u0432 \u043a\u043e\u0440\u043d\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<\/strong><\/p>\n<pre><code class=\"1c\">BOT_TOKEN=\u0412\u0410\u0428_\u0422\u041e\u041a\u0415\u041d ADMIN_IDS=[ADMIN_TG1, ADMIN_TG2, ADMIN_TG3] PROVIDER_TOKEN=\u0422\u041e\u041a\u0415\u041d_\u042e_\u041a\u0410\u0421\u0421\u042b SITE_URL=\u0412\u0415\u0411_\u0421\u0410\u0419\u0422_\u0414\u041b\u042f_\u0425\u0423\u041a\u041e\u0412 SITE_HOST=0.0.0.0 SITE_PORT=8000 MRH_LOGIN=\u041b\u041e\u0413\u0418\u041d_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b MRH_PASS_1=\u041f\u0410\u0420\u041e\u041b\u042c_1_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b MRH_PASS_2=\u041f\u0410\u0420\u041e\u041b\u042c_2_\u0421_\u0420\u041e\u0411\u041e\u041a\u0410\u0421\u0421\u042b IN_TEST=1<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>\u0412\u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043f\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0432 <code>.env<\/code>:<\/p>\n<ol>\n<li>\n<p><strong>BOT_TOKEN<\/strong>: \u0422\u043e\u043a\u0435\u043d \u0432\u0430\u0448\u0435\u0433\u043e Telegram-\u0431\u043e\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 @BotFather. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u043e\u0442\u0430 \u043d\u0430 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 Telegram.<\/p>\n<\/li>\n<li>\n<p><strong>ADMIN_IDS<\/strong>: \u0421\u043f\u0438\u0441\u043e\u043a ID \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0431\u043e\u0442\u043e\u043c. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0441\u043f\u0438\u0441\u043a\u0430: <code>[ID1, ID2, ID3]<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>PROVIDER_TOKEN<\/strong>: \u0422\u043e\u043a\u0435\u043d \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u042e\u041a\u0430\u0441\u0441\u0430, \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0431\u043e\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 @BotFather. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_URL<\/strong>: \u041f\u043e\u043b\u043d\u044b\u0439 URL \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0430 \u043e\u0442 NGROK.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_HOST<\/strong>: \u0425\u043e\u0441\u0442 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>0.0.0.0<\/code>, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0432\u0441\u0435\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>SITE_PORT<\/strong>: \u041f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u043f\u043e\u0440\u0442 <code>8000<\/code>.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_LOGIN<\/strong>: \u041b\u043e\u0433\u0438\u043d \u043e\u0442 Robokassa, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_PASS_1<\/strong>: \u041f\u0435\u0440\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0445\u044d\u0448\u0430 \u043f\u0440\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><strong>MRH_PASS_2<\/strong>: \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Robokassa. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>IN_TEST<\/strong>: \u0424\u043b\u0430\u0433 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 <code>1<\/code> \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439 \u0438 \u0432 <code>0<\/code> \u0434\u043b\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0433\u043e\u0442\u043e\u0432 \u043a \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435!<\/p>\n<h3>\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u0431\u043e\u0442\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0445\u0443\u043a\u0438<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-444499","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=444499"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444499\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=444499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=444499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=444499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}