{"id":335042,"date":"2022-06-27T15:00:20","date_gmt":"2022-06-27T15:00:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=335042"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=335042","title":{"rendered":"<span>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u042e\u043a\u0430\u0441\u0441\u0430 \u0432 telegramm \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\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>\u041f\u0440\u0438\u0432\u0435\u0442 \u0442\u0435\u043c \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0437\u043d\u0435\u0441\u043c\u0435\u043d\u0430! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u044b\u0442 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0435, \u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u044d\u0442\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 \u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u0430. \u0412 \u0445\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u042e\u043a\u0430\u0441\u0441\u0430, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (\u0435\u0441\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u043c\u0438. <\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e <a href=\"https:\/\/yookassa.ru\/docs\/support\/payments\/onboarding\/integration\/cms-module\/telegram\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0438\u0441\u0430\u043d\u0430<\/a> \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0432 telegramm \u0431\u043e\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u0445.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bc9\/463\/930\/bc94639306a362c310de230c2733ff74.png\" width=\"1398\" height=\"186\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc9\/463\/930\/bc94639306a362c310de230c2733ff74.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0431\u0438\u0434\u043d\u043e, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u043f\u043b\u0430\u0442\u044b \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u043e\u043c\u0443 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043f\u043b\u0430\u0442\u044b. \u0412 \u0445\u043e\u0434\u0435 \u0431\u0435\u0433\u043b\u043e\u0433\u043e \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b, \u0447\u0435\u043c\u0443 \u044f \u0431\u044b\u043b \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0433\u043e\u0440\u0447\u0435\u043d,  \u0442\u0430\u043a-\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b. \u041d\u043e \u0442\u0430\u043a-\u043a\u0430\u043a, \u0431\u043e\u0442 \u0431\u044b\u043b \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0435\u0449\u0451 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e, \u0430 \u0445\u043e\u0442\u0435\u043b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u0447\u0435\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044e \u043a \u043f\u043b\u0430\u0442\u0435\u0436\u0443 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435, \u0438 \u043f\u043e \u0444\u0430\u043a\u0442\u0443, \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0443\u0431\u043e\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0431\u0435\u0437 \u0432\u0435\u0431 \u0445\u0443\u043a\u043e\u0432, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u0445<\/h2>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0443\u0441\u043b\u0443\u0433 \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442 \u044e\u043a\u0430\u0441\u0441\u044b. \u042f \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043a\u043b\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0432 \u0431\u043e\u0442\u0435 \u0443\u0441\u043b\u0443\u0433\u0443, \u0432 \u043e\u0442\u0432\u0435\u0442 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0438 \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0432\u0430\u0440, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0431\u043e\u0442. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0436\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u0431\u043e\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &#171;pending&#187;. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 &#171;succeeded&#187; \u0431\u043e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u0432\u0430\u0440\/\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u043b\u0443\u0433\u0443 \u0438 \u0442\u0434).<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c yookassa \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b Configuration \u0438 Payment. \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 Configuration: Configuration.account_id \u0438 Configuration.secret_key , \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c id \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 api \u043a\u043b\u044e\u0447 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430.  <\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/yookassa.ru\/developers\/api#payment_object\" rel=\"noopener noreferrer nofollow\">Payment.create<\/a> , \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0430\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044e\u043a\u0430\u0441\u0441\u0443.<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })<\/code><\/pre>\n<p>\u041f\u043b\u0430\u0442\u0435\u0436 \u0441\u043e\u0437\u0434\u0430\u043d, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c id \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0437\u0436\u0435) \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c json(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u044e\u043a\u0430\u0441\u0441\u044b \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c json \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c python :<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })         payment_data = json.loads(payment.json())   payment_id = payment_data['id']   payment_url = (payment_data['confirmation'])['confirmation_url']<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c payment_url \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u0438\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 Payment.find_one(payment_id)).json(), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 id (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0448\u0430\u0433\u0435) \u0438 \u043f\u0440\u0438\u0448\u043b\u0435\u0442 \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0441 pending \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \/ \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439.<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config import time  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })         payment_data = json.loads(payment.json())   payment_id = payment_data['id']   payment_url = (payment_data['confirmation'])['confirmation_url']      payment = json.loads((Payment.find_one(payment_id)).json())   while payment['status'] == 'pending': payment = json.loads((Payment.find_one(payment_id)).json()) time.sleep(\u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438)   <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435 \u0438\u043b\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u0447\u0442\u043e-\u0442\u043e \u043e\u043a\u043e\u043b\u043e 15 \u043c\u0438\u043d\u0443\u0442), \u043c\u044b \u0432\u044b\u0439\u0434\u0435\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0431\u043e\u0442\u0430, \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u043e\u043f\u043b\u0430\u0442\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 sleep. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config import asyncio  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  def payment(value,description): payment = Payment.create({     \"amount\": {         \"value\": value,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0443\u0440\u043b \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430\"     },     \"capture\": True,     \"description\": description })  return json.loads(payment.json())  async def check_payment(payment_id): payment = json.loads((Payment.find_one(payment_id)).json()) while payment['status'] == 'pending': payment = json.loads((Payment.find_one(payment_id)).json()) await asyncio.sleep(3)  if payment['status']=='succeeded': print(\"SUCCSESS RETURN\") print(payment) return True else: print(\"BAD RETURN\") print(payment) return False<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0431\u043e\u0442\u0435 (aiogram)<\/p>\n<pre><code class=\"python\">import json from aiogram import Bot, Dispatcher, executor, types, filters from yookassa import Configuration,Payment import payment import config   API_TOKEN = config.API_TOKEN BASE=config.BASE REFBASE=config.REFBASE CURRENT_ENDPOINT=config.CURRENT_ENDPOINT   #--- buttons --- btnbuy = types.KeyboardButton(\"\u043a\u0443\u043f\u0438\u0442\u044c\") btnprologue = types.KeyboardButton(\"\u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c\") btnstatus = types.KeyboardButton(\"\u0441\u0442\u0430\u0442\u0443\u0441\") btnsinfo = types.KeyboardButton(\"\u0438\u043d\u0444\u043e\")  mainmenu=types.ReplyKeyboardMarkup(resize_keyboard = True).add(btnbuy,btnprologue,btnstatus,btnsinfo)  # Initialize bot and dispatcher bot = Bot(token=API_TOKEN) dp = Dispatcher(bot)  @dp.message_handler(commands=['start']) async def send_welcome(message: types.Message): await message.answer(\"Hello\", reply_markup = mainmenu)   @dp.message_handler(commands=['info']) async def info(message: types.Message): await message.answer(\"info\", disable_web_page_preview=True)  @dp.message_handler(commands=['buy']) async def BuyVPNforMonth(message: types.Message): await message.answer(msg.buy_message) payment_deatils = payment.payment(100,'\u041a\u0443\u043f\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u04401') await message.answer( (payment_deatils['confirmation'])['confirmation_url'] ) if await payment.check_payment(payment_deatils['id']):     message.answer(\"\u043f\u043b\u0430\u0442\u0435\u0436\")  else: message.answer(\"\u043f\u043b\u0430\u0442\u0435\u0436 \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b\")  @dp.message_handler() async def menu_message(message: types.Message): if message.text == \"\u043a\u0443\u043f\u0438\u0442\u044c\": await BuyVPNforMonth(message) if message.text == \"\u0438\u043d\u0444\u043e\": await info(message)  if __name__ == '__main__':     executor.start_polling(dp, skip_updates=True)<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u0442\u0430, \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u043f\u043b\u0430\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/t.me\/HiddenVPN_bot\/?start=habr\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/673646\/\"> https:\/\/habr.com\/ru\/post\/673646\/<\/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>\u041f\u0440\u0438\u0432\u0435\u0442 \u0442\u0435\u043c \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0438\u0437\u043d\u0435\u0441\u043c\u0435\u043d\u0430! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438\u0448\u043b\u0430 \u0438\u0434\u0435\u044f, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u044b\u0442 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0435, \u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0437\u0430 \u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u044d\u0442\u043e\u0439 \u0443\u0441\u043b\u0443\u0433\u0438 \u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u043b\u0435\u0447\u0438 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c \u0431\u043e\u0442\u0430. \u0412 \u0445\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043e\u043f\u043b\u0430\u0442\u044b \u0431\u044b\u043b\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u042e\u043a\u0430\u0441\u0441\u0430, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0435\u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c (\u0435\u0441\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u043c\u0438. <\/p>\n<p>\u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e <a href=\"https:\/\/yookassa.ru\/docs\/support\/payments\/onboarding\/integration\/cms-module\/telegram\" rel=\"noopener noreferrer nofollow\">\u043e\u043f\u0438\u0441\u0430\u043d\u0430<\/a> \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0432 telegramm \u0431\u043e\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u044b\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u0445.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041e\u0431\u0438\u0434\u043d\u043e, \u043d\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043e\u043f\u043b\u0430\u0442\u044b \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u043e\u043c\u0443 \u043d\u0430\u0439\u0442\u0438 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043f\u043b\u0430\u0442\u044b. \u0412 \u0445\u043e\u0434\u0435 \u0431\u0435\u0433\u043b\u043e\u0433\u043e \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f, \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043f\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b, \u0447\u0435\u043c\u0443 \u044f \u0431\u044b\u043b \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0433\u043e\u0440\u0447\u0435\u043d,  \u0442\u0430\u043a-\u043a\u0430\u043a \u044d\u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0440\u0443\u0447\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u043f\u043b\u0430\u0442\u044b. \u041d\u043e \u0442\u0430\u043a-\u043a\u0430\u043a, \u0431\u043e\u0442 \u0431\u044b\u043b \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0435\u0449\u0451 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b. \u0418\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u044f \u043d\u0435 \u0434\u0443\u043c\u0430\u043b \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e, \u0430 \u0445\u043e\u0442\u0435\u043b \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u0441\u0447\u0435\u0442\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u044e \u043a \u043f\u043b\u0430\u0442\u0435\u0436\u0443 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0435 \u043e\u043f\u043b\u0430\u0442\u044b. \u041e\u0434\u043d\u0430\u043a\u043e, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435, \u0438 \u043f\u043e \u0444\u0430\u043a\u0442\u0443, \u0432 \u0441\u0430\u043c\u043e\u043c \u0434\u0443\u0431\u043e\u0432\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0431\u0435\u0437 \u0432\u0435\u0431 \u0445\u0443\u043a\u043e\u0432, \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432\u0441\u0435\u0433\u043e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u044b\u0445<\/h2>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u043b\u0430\u0442\u0443 \u0443\u0441\u043b\u0443\u0433 \u0441\u0430\u043c\u043e\u0437\u0430\u043d\u044f\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0441\u0430\u0439\u0442 \u044e\u043a\u0430\u0441\u0441\u044b. \u042f \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043a\u043b\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0432 \u0431\u043e\u0442\u0435 \u0443\u0441\u043b\u0443\u0433\u0443, \u0432 \u043e\u0442\u0432\u0435\u0442 \u0435\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u043a\u043b\u0438\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0438 \u043e\u043f\u043b\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u0432\u0430\u0440, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u0431\u043e\u0442. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0436\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u0431\u043e\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &#171;pending&#187;. \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 &#171;succeeded&#187; \u0431\u043e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 (\u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u043e\u0432\u0430\u0440\/\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u043b\u0443\u0433\u0443 \u0438 \u0442\u0434).<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c yookassa \u043e\u0442\u043a\u0443\u0434\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b Configuration \u0438 Payment. \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0434\u0432\u0430 \u043f\u043e\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 Configuration: Configuration.account_id \u0438 Configuration.secret_key , \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c id \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 api \u043a\u043b\u044e\u0447 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430.  <\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 <a href=\"https:\/\/yookassa.ru\/developers\/api#payment_object\" rel=\"noopener noreferrer nofollow\">Payment.create<\/a> , \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043b\u0430\u0442\u0435\u0436\u0430. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u0430\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044e\u043a\u0430\u0441\u0441\u0443.<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })<\/code><\/pre>\n<p>\u041f\u043b\u0430\u0442\u0435\u0436 \u0441\u043e\u0437\u0434\u0430\u043d, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c id \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0437\u0436\u0435) \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c json(), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0443 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u044e\u043a\u0430\u0441\u0441\u044b \u0438 \u0432\u0435\u0440\u043d\u0435\u0442 \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c json \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c python :<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })         payment_data = json.loads(payment.json())   payment_id = payment_data['id']   payment_url = (payment_data['confirmation'])['confirmation_url']<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c payment_url \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043e\u043d \u0441\u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u0440. \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c \u043e\u043f\u043b\u0430\u0442\u0438\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0442\u043e\u0432\u0430\u0440 \u0438\u043b\u0438 \u043d\u0435\u0442. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 Payment.find_one(payment_id)).json(), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 \u043f\u043b\u0430\u0442\u0435\u0436 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 id (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0448\u0430\u0433\u0435) \u0438 \u043f\u0440\u0438\u0448\u043b\u0435\u0442 \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 json. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0441 pending \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \/ \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439.<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config import time  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  payment = Payment.create({     \"amount\": {         \"value\": \u0441\u0443\u043c\u043c\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0421\u0441\u044b\u043b\u043a\u0430, \u043a\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430\"     },     \"capture\": True,     \"description\": description })         payment_data = json.loads(payment.json())   payment_id = payment_data['id']   payment_url = (payment_data['confirmation'])['confirmation_url']      payment = json.loads((Payment.find_one(payment_id)).json())   while payment['status'] == 'pending': payment = json.loads((Payment.find_one(payment_id)).json()) time.sleep(\u0432\u0440\u0435\u043c\u044f \u043c\u0435\u0436\u0434\u0443 \u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438)   <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435 \u0438\u043b\u0438 \u0442\u0430\u0439\u043c\u0430\u0443\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u0447\u0442\u043e-\u0442\u043e \u043e\u043a\u043e\u043b\u043e 15 \u043c\u0438\u043d\u0443\u0442), \u043c\u044b \u0432\u044b\u0439\u0434\u0435\u043c \u0438\u0437 \u0446\u0438\u043a\u043b\u0430, \u043e\u0434\u043d\u0430\u043a\u043e \u0437\u0434\u0435\u0441\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 \u0431\u043e\u0442\u0430, \u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u043e\u043f\u043b\u0430\u0442\u044b. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 sleep. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043e\u043f\u043b\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430<\/p>\n<pre><code class=\"python\">import json from yookassa import Configuration,Payment import config import asyncio  Configuration.account_id = config.SHOP_ID Configuration.secret_key = config.SHOP_API_TOKEN  def payment(value,description): payment = Payment.create({     \"amount\": {         \"value\": value,         \"currency\": \"RUB\"     },     \"payment_method_data\": {         \"type\": \"bank_card\"     },     \"confirmation\": {         \"type\": \"redirect\",         \"return_url\": \"\u0443\u0440\u043b \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430\"     },     \"capture\": True,     \"description\": description })  return json.loads(payment.json())  async def check_payment(payment_id): payment = json.loads((Payment.find_one(payment_id)).json()) while payment['status'] == 'pending': payment = json.loads((Payment.find_one(payment_id)).json()) await asyncio.sleep(3)  if payment['status']=='succeeded': print(\"SUCCSESS RETURN\") print(payment) return True else: print(\"BAD RETURN\") print(payment) return False<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0431\u043e\u0442\u0435 (aiogram)<\/p>\n<pre><code class=\"python\">import json from aiogram import Bot, Dispatcher, executor, types, filters from yookassa import Configuration,Payment import payment import config   API_TOKEN = config.API_TOKEN BASE=config.BASE REFBASE=config.REFBASE CURRENT_ENDPOINT=config.CURRENT_ENDPOINT   #--- buttons --- btnbuy = types.KeyboardButton(\"\u043a\u0443\u043f\u0438\u0442\u044c\") btnprologue = types.KeyboardButton(\"\u043f\u0440\u043e\u0434\u043b\u0438\u0442\u044c\") btnstatus = types.KeyboardButton(\"\u0441\u0442\u0430\u0442\u0443\u0441\") btnsinfo = types.KeyboardButton(\"\u0438\u043d\u0444\u043e\")  mainmenu=types.ReplyKeyboardMarkup(resize_keyboard = True).add(btnbuy,btnprologue,btnstatus,btnsinfo)  # Initialize bot and dispatcher bot = Bot(token=API_TOKEN) dp = Dispatcher(bot)  @dp.message_handler(commands=['start']) async def send_welcome(message: types.Message): await message.answer(\"Hello\", reply_markup = mainmenu)   @dp.message_handler(commands=['info']) async def info(message: types.Message): await message.answer(\"info\", disable_web_page_preview=True)  @dp.message_handler(commands=['buy']) async def BuyVPNforMonth(message: types.Message): await message.answer(msg.buy_message) payment_deatils = payment.payment(100,'\u041a\u0443\u043f\u0438\u0442\u044c \u0442\u043e\u0432\u0430\u04401') await message.answer( (payment_deatils['confirmation'])['confirmation_url'] ) if await payment.check_payment(payment_deatils['id']):     message.answer(\"\u043f\u043b\u0430\u0442\u0435\u0436\")  else: message.answer(\"\u043f\u043b\u0430\u0442\u0435\u0436 \u043d\u0435 \u043f\u0440\u043e\u0448\u0435\u043b\")  @dp.message_handler() async def menu_message(message: types.Message): if message.text == \"\u043a\u0443\u043f\u0438\u0442\u044c\": await BuyVPNforMonth(message) if message.text == \"\u0438\u043d\u0444\u043e\": await info(message)  if __name__ == '__main__':     executor.start_polling(dp, skip_updates=True)<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u043e\u0442\u0430, \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0435\u0439 \u043e\u043f\u043b\u0430\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/t.me\/HiddenVPN_bot\/?start=habr\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/673646\/\"> https:\/\/habr.com\/ru\/post\/673646\/<\/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-335042","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335042","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=335042"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/335042\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}