{"id":458679,"date":"2025-05-05T21:01:38","date_gmt":"2025-05-05T21:01:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=458679"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=458679","title":{"rendered":"<span>\u041e\u043f\u043b\u0430\u0442\u0430 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u0432 Telegram-\u0431\u043e\u0442\u0435 \u043d\u0430 Go<\/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<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e <strong>VPN-\u0431\u043e\u0442\u0430<\/strong>, \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 \u0434\u0432\u0430 \u043a\u043b\u0438\u043a\u0430.<\/p>\n<p>TG Stars \u0432 \u0446\u0435\u043b\u043e\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u0440\u0435\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e <strong><u>Telegram<\/u><\/strong> \u0443\u0436\u0435 \u043d\u0435 \u0442\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442, \u0430 <strong><u>\u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442<\/u><\/strong> \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438.<\/p>\n<blockquote>\n<p>If your bot or mini app sells\u00a0<strong>digital goods and services<\/strong>, be sure to carry out the payment in\u00a0<a href=\"https:\/\/telegram.org\/blog\/telegram-stars\" rel=\"noopener noreferrer nofollow\">Telegram Stars<\/a>\u00a0by specifying\u00a0<code>XTR<\/code>\u00a0as currency. In compliance with third-party store policies, Telegram does not support the sale of digital goods and services using other currencies.<\/p>\n<\/blockquote>\n<p> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/core.telegram.org\/bots\/features#payments\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0431\u043e\u0442\u0430<\/h2>\n<p>\u041b\u0438\u0431\u043e \u044f \u043f\u043b\u043e\u0445\u043e \u0433\u0443\u0433\u043b\u0438\u043b, \u043b\u0438\u0431\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0441\u0435\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0442 +\/- \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u0432 \u0431\u043e\u0442\u0430, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Go.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c, \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u043d\u0432\u043e\u0439\u0441\u0430<\/h2>\n<pre><code class=\"go\">import tele \"gopkg.in\/telebot.v3\"  var bot, _ = tele.NewBot(tele.Settings{ Token: \"token\", Poller:  &amp;tele.LongPoller{Timeout: 10}, })  var invoice = &amp;tele.Invoice{     Title:       \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438\",     Description: \"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\",     Payload:     \"\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\",     Token:       \"\",  \/\/ \u0422\u043e\u043a\u0435\u043d \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u043c     Currency:    \"XTR\",  \/\/ \u0412\u0430\u043b\u044e\u0442\u0430 \u0434\u043b\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a     Prices: []tele.Price{         {             Label:  \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430 100 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a\",             Amount: 100, \/\/ \u041a\u043e\u043b-\u0432\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a \u043a \u043e\u043f\u043b\u0430\u0442\u0435         },     }, }  func initBot() {   bot.Handle(\"\/test_pay\", func(c tele.Context) error {     return c.Send(invoice)   }) }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u043e\u0442\u0430 <code>\/test_pay<\/code> , \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18c\/b45\/9c1\/18cb459c1728ac68bc609faf9e6f60a0.png\" alt=\"\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430\" title=\"\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430\" width=\"550\" height=\"310\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/18c\/b45\/9c1\/18cb459c1728ac68bc609faf9e6f60a0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/18c\/b45\/9c1\/18cb459c1728ac68bc609faf9e6f60a0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \ud83d\ude42 \u0414\u0430\u043b\u044c\u0448\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/h2>\n<pre><code class=\"go\">\/\/ \u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436 bot.Handle(tele.OnCheckout, func(c tele.Context) error {   return c.Accept() })  \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436 bot.Handle(tele.OnPayment, func (c tele.Context) error {   \/\/ \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0434    return c.Send(\"&lt;b&gt;\u0423\u0440\u0430!&lt;\/b&gt; \u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\", tele.ModeHTML) })<\/code><\/pre>\n<h2>\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<pre><code class=\"go\">import tele \"gopkg.in\/telebot.v3\"  var bot, _ = tele.NewBot(   tele.Settings{ Token: \"token\", Poller:  &amp;tele.LongPoller{Timeout: 10}, }, )  var invoice = &amp;tele.Invoice{     Title:       \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438\",     Description: \"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\",     Payload:     \"\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\",     Token:       \"\",  \/\/ \u0422\u043e\u043a\u0435\u043d \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u043c     Currency:    \"XTR\",  \/\/ \u0412\u0430\u043b\u044e\u0442\u0430 \u0434\u043b\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a     Prices: []tele.Price{         {             Label:  \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430 100 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a\",             Amount: 100, \/\/ \u041a\u043e\u043b-\u0432\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a \u043a \u043e\u043f\u043b\u0430\u0442\u0435         },     }, }  func initBot() {     \/\/ \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441     bot.Handle(\"\/test_pay\", func(c tele.Context) error {       return c.Send(invoice)     })          \/\/ \u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436     bot.Handle(tele.OnCheckout, func(c tele.Context) error {       return c.Accept()     })          \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436     bot.Handle(tele.OnPayment, func (c tele.Context) error {       \/\/ \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0434            return c.Send(\"&lt;b&gt;\u0423\u0440\u0430!&lt;\/b&gt; \u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\")     }) }<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0441\u0435, \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e!<\/p>\n<p>\u0411\u0443\u0434\u0443 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/t.me\/ms_fi_it\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 \u0422\u0413-\u043a\u0430\u043d\u0430\u043b<\/a> \ud83e\udd79<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/907158\/\"> https:\/\/habr.com\/ru\/articles\/907158\/<\/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<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0432\u043e\u0435\u0433\u043e <strong>VPN-\u0431\u043e\u0442\u0430<\/strong>, \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e. \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432 \u0434\u0432\u0430 \u043a\u043b\u0438\u043a\u0430.<\/p>\n<p>TG Stars \u0432 \u0446\u0435\u043b\u043e\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043e\u0431\u0440\u0435\u0442\u0430\u044e\u0442 \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e <strong><u>Telegram<\/u><\/strong> \u0443\u0436\u0435 \u043d\u0435 \u0442\u043e \u0447\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442, \u0430 <strong><u>\u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442<\/u><\/strong> \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0434\u0430\u0432\u0446\u043e\u0432 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u0430\u043c\u0438.<\/p>\n<blockquote>\n<p>If your bot or mini app sells\u00a0<strong>digital goods and services<\/strong>, be sure to carry out the payment in\u00a0<a href=\"https:\/\/telegram.org\/blog\/telegram-stars\" rel=\"noopener noreferrer nofollow\">Telegram Stars<\/a>\u00a0by specifying\u00a0<code>XTR<\/code>\u00a0as currency. In compliance with third-party store policies, Telegram does not support the sale of digital goods and services using other currencies.<\/p>\n<\/blockquote>\n<p> \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 <a href=\"https:\/\/core.telegram.org\/bots\/features#payments\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0431\u043e\u0442\u0430<\/h2>\n<p>\u041b\u0438\u0431\u043e \u044f \u043f\u043b\u043e\u0445\u043e \u0433\u0443\u0433\u043b\u0438\u043b, \u043b\u0438\u0431\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0441\u0435\u0442\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0442 +\/- \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u0432 \u0431\u043e\u0442\u0430, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043d\u0430 Go.<\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c, \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u043d\u0432\u043e\u0439\u0441\u0430<\/h2>\n<pre><code class=\"go\">import tele \"gopkg.in\/telebot.v3\"  var bot, _ = tele.NewBot(tele.Settings{ Token: \"token\", Poller:  &amp;tele.LongPoller{Timeout: 10}, })  var invoice = &amp;tele.Invoice{     Title:       \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438\",     Description: \"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\",     Payload:     \"\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\",     Token:       \"\",  \/\/ \u0422\u043e\u043a\u0435\u043d \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u043c     Currency:    \"XTR\",  \/\/ \u0412\u0430\u043b\u044e\u0442\u0430 \u0434\u043b\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a     Prices: []tele.Price{         {             Label:  \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430 100 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a\",             Amount: 100, \/\/ \u041a\u043e\u043b-\u0432\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a \u043a \u043e\u043f\u043b\u0430\u0442\u0435         },     }, }  func initBot() {   bot.Handle(\"\/test_pay\", func(c tele.Context) error {     return c.Send(invoice)   }) }<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u0431\u043e\u0442\u0430 <code>\/test_pay<\/code> , \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u042d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u043c\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435 \ud83d\ude42 \u0414\u0430\u043b\u044c\u0448\u0435 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0435\u0433\u043e.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/h2>\n<pre><code class=\"go\">\/\/ \u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436 bot.Handle(tele.OnCheckout, func(c tele.Context) error {   return c.Accept() })  \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436 bot.Handle(tele.OnPayment, func (c tele.Context) error {   \/\/ \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0434    return c.Send(\"&lt;b&gt;\u0423\u0440\u0430!&lt;\/b&gt; \u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\", tele.ModeHTML) })<\/code><\/pre>\n<h2>\u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<pre><code class=\"go\">import tele \"gopkg.in\/telebot.v3\"  var bot, _ = tele.NewBot(   tele.Settings{ Token: \"token\", Poller:  &amp;tele.LongPoller{Timeout: 10}, }, )  var invoice = &amp;tele.Invoice{     Title:       \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438\",     Description: \"\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\",     Payload:     \"\u0441\u044e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c\",     Token:       \"\",  \/\/ \u0422\u043e\u043a\u0435\u043d \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u043c     Currency:    \"XTR\",  \/\/ \u0412\u0430\u043b\u044e\u0442\u0430 \u0434\u043b\u044f \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a     Prices: []tele.Price{         {             Label:  \"\u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0437\u0430 100 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a\",             Amount: 100, \/\/ \u041a\u043e\u043b-\u0432\u043e \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u0435\u043a \u043a \u043e\u043f\u043b\u0430\u0442\u0435         },     }, }  func initBot() {     \/\/ \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441     bot.Handle(\"\/test_pay\", func(c tele.Context) error {       return c.Send(invoice)     })          \/\/ \u0413\u043e\u0432\u043e\u0440\u0438\u043c \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c\u0443, \u0447\u0442\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436     bot.Handle(tele.OnCheckout, func(c tele.Context) error {       return c.Accept()     })          \/\/ \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436     bot.Handle(tele.OnPayment, func (c tele.Context) error {       \/\/ \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u0442\u0434            return c.Send(\"&lt;b&gt;\u0423\u0440\u0430!&lt;\/b&gt; \u041e\u043f\u043b\u0430\u0442\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e.\")     }) }<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0441\u0435, \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0432\u0435\u0437\u0434\u043e\u0447\u043a\u0430\u043c\u0438 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0430 \u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043e\u0442\u0430, \u043f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u044e!<\/p>\n<p>\u0411\u0443\u0434\u0443 \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0437\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 <a href=\"https:\/\/t.me\/ms_fi_it\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0439 \u0422\u0413-\u043a\u0430\u043d\u0430\u043b<\/a> \ud83e\udd79<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/907158\/\"> https:\/\/habr.com\/ru\/articles\/907158\/<\/a><br \/><\/br><\/br><\/p>\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-458679","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458679","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=458679"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/458679\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=458679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=458679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=458679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}