{"id":459881,"date":"2025-05-16T15:00:05","date_gmt":"2025-05-16T15:00:05","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=459881"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=459881","title":{"rendered":"<span>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 FreeKassa \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \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<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 FreeKassa \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Golang.<br \/>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0432\u043e\u0439\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430<\/h2>\n<ol>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/freekassa.net\" rel=\"noopener noreferrer nofollow\">https:\/\/freekassa.net<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 &#171;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0441\u0441\u0443&#187;:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/392\/1db\/c39\/3921dbc390550e064a38c46ee6df8be6.png\" alt=\"\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b FreeKassa\" title=\"\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b FreeKassa\" width=\"2376\" height=\"338\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/392\/1db\/c39\/3921dbc390550e064a38c46ee6df8be6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/392\/1db\/c39\/3921dbc390550e064a38c46ee6df8be6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b FreeKassa<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0441\u0441\u0443 (\u043c\u0430\u0433\u0430\u0437\u0438\u043d).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e TG-\u0431\u043e\u0442. \u041f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f6a\/a58\/b5d\/f6aa58b5d78121c51609c8a517f90dd5.png\" width=\"1062\" height=\"1040\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f6a\/a58\/b5d\/f6aa58b5d78121c51609c8a517f90dd5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f6a\/a58\/b5d\/f6aa58b5d78121c51609c8a517f90dd5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><em>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430<\/em> &#8212; \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0441\u0441\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438 <strong>\u0422\u0415\u0421\u0422\u041e\u0412\u042b\u0419 \u0420\u0415\u0416\u0418\u041c<\/strong>. \u0418\u043d\u0430\u0447\u0435 \u043a\u0430\u0441\u0441\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u043a\u0430\u0441\u0441\u0443.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0441\u0441\u044b<\/h2>\n<p>\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/839\/f86\/457\/839f86457674ae77acebe5bb560e9ecf.png\" alt=\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 FK.\" title=\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 FK.\" width=\"3444\" height=\"1258\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/839\/f86\/457\/839f86457674ae77acebe5bb560e9ecf.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/839\/f86\/457\/839f86457674ae77acebe5bb560e9ecf.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 FK.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 (\u043a\u0430\u0441\u0441\u044b):<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/244\/91b\/2ac\/24491b2acb43e9ff2815078a75f77777.png\" alt=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0441\u044b.\" title=\"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0441\u044b.\" width=\"2672\" height=\"1956\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/244\/91b\/2ac\/24491b2acb43e9ff2815078a75f77777.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/244\/91b\/2ac\/24491b2acb43e9ff2815078a75f77777.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0441\u044b.<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442:<\/p>\n<ol>\n<li>\n<p>\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 &#8212; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438\u0445 \u0441\u0430\u043c\u0438, \u043b\u0438\u0431\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f<\/strong> &#8212; \u044d\u0442\u043e url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 FreeKassa \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c callback \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b<\/strong> &#8212; url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d <em>\u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043e\u0442 \u043d\u0430\u0441<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0430\u043b 200.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438 <\/strong>&#8212; url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d <em>\u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043e\u0442 \u043d\u0430\u0441<\/em>.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0412\u0410\u0416\u041d\u041e<\/strong>: \u0432\u0441\u0435 URL \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c &#171;\u043d\u0430 \u0434\u043e\u043c\u0435\u043d\u0435 \u043d\u0435 \u043d\u0438\u0436\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f&#187;. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 <u>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 DNS \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/u>, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435: <a href=\"http:\/\/47.99.123.89:8080\/callback\" rel=\"noopener noreferrer nofollow\"><em>http:\/\/47.99.123.89:8080\/callback<\/em><\/a><em>.<\/em><\/p>\n<h2>URL \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b<\/h2>\n<p>\u0421 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442\u043e\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u043e\u043d\u0438 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 <u>https:\/\/t.me\/\u0432\u0430\u0448_\u0431\u043e\u0442<\/u>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0422\u0413-\u0431\u043e\u0442, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c 2 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p><em>\/payments\/success<\/em> &#8212; \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436.<\/p>\n<\/li>\n<li>\n<p><em>\/payments\/failure<\/em> &#8212; \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435, \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f FreeKassa \u0432 Go<\/h2>\n<p>\u0423\u0440\u0430! \u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u044b \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f API-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.1.-Chto-takoe-SCI\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<h3>C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0432\u043e\u0439\u0441\u0430<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 <a href=\"https:\/\/pay.fk.money\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pay.fk.money\/<\/a>.<\/p>\n<p>\u0427\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.3.-Nastrojka-formy-oplaty\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u042f \u043e\u043f\u0438\u0448\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 query params:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">m<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 (merchant id) &#8212; \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">int<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">o<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u0437\u0430\u043a\u0430\u0437\u0430 (order id) &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">oa<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">int (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">currency<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0430\u043b\u044e\u0442\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 (RUB,USD,EUR,UAH,KZT)<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">s<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0434\u043f\u0438\u0441\u044c &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">us_&lt;key&gt;<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0430\u0436\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 &#8212; payload. \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438. Payload, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0438\u043d\u0432\u043e\u0439\u0441\u0435, \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u043d\u0430 callback-\u043c\u0435\u0442\u043e\u0434 (URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f).<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 us_user_id=123, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f us_user_id=123<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>currency.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  type Currency string  const ( RUB Currency = \"RUB\" USD Currency = \"USD\" EUR Currency = \"EUR\" UAH Currency = \"UAH\" KZT Currency = \"KZT\" )  func (c Currency) String() string { return string(c) }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>payment.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"fmt\" \"strings\" )  \/\/ Payment - \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435. type Payment struct { OrderID   string Currency  Currency Amount    int64 Signature string Payload   Payload }  \/\/ Payload - key=value. type Payload map[string]string  \/\/ Generate - \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 Payload \u0432 query-parameters. func (p Payload) Generate() string { if p == nil { return \"\" }  builder := &amp;strings.Builder{} builder.WriteString(\"&amp;\")  for key, value := range p { param := fmt.Sprintf(\"us_%s=%s&amp;\", key, value) builder.WriteString(param) }  return builder.String()[:builder.Len()-1] }<\/code><\/pre>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>Payment<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430.<\/p>\n<p><code>Payload<\/code> &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0438 us_key (s), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u043d\u0432\u043e\u0439\u0441\u043e\u043c \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0430\u0448 URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <code>MD5<\/code> \u0445\u044d\u0448 \u043e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u0438\u043a <code>utils.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"crypto\/md5\" \"encoding\/hex\" )  func md5Hash(text string) string { hash := md5.Sum([]byte(text))  return hex.EncodeToString(hash[:]) }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0432\u043e\u0439\u0441\u0430. \u0423 \u043d\u0430\u0441 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430 \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432 URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 \u0438\u043d\u0432\u043e\u0439\u0441\u0435 &#8212; MD5-\u0425\u044d\u0448 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438:<br \/><code>\"ID_\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430:\u0421\u0443\u043c\u043c\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435_\u0441\u043b\u043e\u0432\u043e_1:\u0412\u0430\u043b\u044e\u0442\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u041d\u043e\u043c\u0435\u0440_\u0437\u0430\u043a\u0430\u0437\u0430\"<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f &#8212; MD5-\u0425\u044d\u0448 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438:<br \/><code>\"ID_\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430:\u0421\u0443\u043c\u043c\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435_\u0441\u043b\u043e\u0432\u043e_2:\u041d\u043e\u043c\u0435\u0440_\u0437\u0430\u043a\u0430\u0437\u0430\"<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>freekassa.go<\/code>, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"fmt\" )  const InvoiceBaseURL = `https:\/\/pay.fk.money`  type Client interface { GenerateInvoice(p *Payment) string GenerateInvoiceSignature(amount int64, currency Currency, orderID string) string GenerateConfirmSignature(amount int64, orderID string) string }  type client struct { MerchantID int64 SecretKey1 string SecretKey2 string }  func NewClient(merchantID int64, secretKey1 string, secretKey2 string) Client { return &amp;client{ MerchantID: merchantID, SecretKey1: secretKey1, SecretKey2: secretKey2, } }  func (c *client) GenerateInvoice(p *Payment) string { if p == nil { return \"\" }  return fmt.Sprintf( \"%s\/?m=%d&amp;o=%s&amp;oa=%d&amp;currency=%s&amp;s=%s%s\", InvoiceBaseURL, c.MerchantID, p.OrderID, p.Amount, p.Currency.String(), p.Signature, p.Payload.Generate(), ) }  func (c *client) GenerateInvoiceSignature(amount int64, currency Currency, orderID string) string { signData := fmt.Sprintf(\"%d:%d:%s:%s:%s\", c.MerchantID, amount, c.SecretKey1, currency.String(), orderID)  return md5Hash(signData) }  func (c *client) GenerateConfirmSignature(amount int64, orderID string) string { signData := fmt.Sprintf(\"%d:%d:%s:%s\", c.MerchantID, amount, c.SecretKey2, orderID)  return md5Hash(signData) } <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c:<\/p>\n<pre><code class=\"go\">package main  import ( \"fmt\" \"github.com\/zenorachi\/freekassa-sdk-go\" )  func main() { merchantID, key1, key2 := int64(123), \"key1\", \"key2\" fk := freekassa.NewClient(merchantID, key1, key2)  order, amount := \"test_order\", int64(100)  invoice := fk.GenerateInvoice(&amp;freekassa.Payment{ OrderID:   order, Currency:  freekassa.RUB, Amount:    amount, Signature: fk.GenerateInvoiceSignature(amount, freekassa.RUB, order), Payload: map[string]string{ \"user_id\": \"3493920\", }, })  fmt.Println(invoice) }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u0434, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 \u0438\u043d\u0432\u043e\u0439\u0441: <a href=\"https:\/\/pay.fk.money\/?m=123&amp;o=test_order&amp;oa=100&amp;currency=RUB&amp;s=7e30da3dc8ef8498415f25e90c18cbb3&amp;us_user_id=3493920\" rel=\"noopener noreferrer nofollow\">https:\/\/pay.fk.money\/?m=123&amp;o=test_order&amp;oa=100&amp;currency=RUB&amp;s=7e30da3dc8ef8498415f25e90c18cbb3&amp;us_user_id=3493920<\/a>.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u043d\u0435\u043c\u0443 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u0447\u0442\u043e Merchant ID (ID \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430) \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.<\/p>\n<h2>URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0418\u043d\u0432\u043e\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u043d, \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c callback.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c router \u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u0445\u044d\u043d\u0434\u043b\u0435\u0440 \u0438 middleware, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 MW. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e IP \u043d\u0430\u043c \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441. \u041e\u0431 \u044d\u0442\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f FK:<\/p>\n<p><em>&#171;\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0412\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0430\u0448\u0438 IP &#8212; 168.119.157.136, 168.119.60.227, 178.154.197.79, 51.250.54.238.&#187;<\/em><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 middleware \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gin:<\/p>\n<pre><code class=\"go\">func middleware() gin.HandlerFunc {     whitelist := map[string]struct{}{ \"168.119.157.136\": {}, \"168.119.60.227\":  {}, \"178.154.197.79\":  {}, \"51.250.54.238\":   {}, }    return func(c *gin.Context) { if _, found := whitelist[c.ClientIP()]; !found { c.AbortWithStatusJSON(http.StatusForbidden, gin.H{\"message\": \"access denied\"})  return }  c.Next() } }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 FK \u043d\u0430 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.4.-Opoveshenie-o-platezhe\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. \u042f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438 payload, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f callback:<\/p>\n<pre><code class=\"go\"> type confirmCallbackRequest struct { Amount  int64  `form:\"AMOUNT\" binding:\"required\"` OrderID string `form:\"MERCHANT_ORDER_ID\" binding:\"required\"` Sign    string `form:\"SIGN\" binding:\"required\"` UserID  int64  `form:\"us_user_id\" binding:\"required,gt=0\"` }  \/\/ \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 Handler, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442 FK. func (h *Handler) callback(c *gin.Context) { var ( req confirmCallbackRequest err error )      \/\/ \u041c\u0430\u0440\u0448\u0430\u043b\u043b\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 if err = c.ShouldBind(&amp;req); err != nil { c.Status(http.StatusBadRequest)  return }      \/\/ \u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 - \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043c \u043f\u0440\u0438\u0441\u043b\u0430\u043b\u0430 FreeKassa if sign := h.fk.GenerateConfirmSignature(req.Amount, req.OrderID); sign != req.Sign { c.Status(http.StatusForbidden)  return }      \/\/ \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0448\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 (\u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442.\u0434.)  c.Status(http.StatusOK) }<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f? \u041f\u043e \u0441\u0443\u0442\u0438 &#8212; \u043d\u0438\u0447\u0435\u0433\u043e, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u041c\u044b \u0443\u043c\u0435\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441, \u0443\u043c\u0435\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c callback. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e &#8212; \u0443\u043a\u0430\u0437\u0430\u0442\u044c URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 FK (\u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 callback).<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436, \u043d\u0435 \u043f\u043b\u0430\u0442\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u043d\u0435\u0433, \u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u0430\u0441\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/272\/9da\/1be\/2729da1be0384fe3ebb7453a640cfa80.png\" alt=\"\u041c\u0435\u043d\u044e c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0436\u0438\u043c\u043e\u043c.\" title=\"\u041c\u0435\u043d\u044e c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0436\u0438\u043c\u043e\u043c.\" width=\"938\" height=\"248\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/272\/9da\/1be\/2729da1be0384fe3ebb7453a640cfa80.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/272\/9da\/1be\/2729da1be0384fe3ebb7453a640cfa80.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041c\u0435\u043d\u044e c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0436\u0438\u043c\u043e\u043c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u043e, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c &#171;\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430&#187;. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c &#171;YES&#187; \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0448\u043b\u043e \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u0415\u0441\u043b\u0438 FK \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442 \u0432\u0430\u0441 &#171;YES&#187; \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0442\u043e FK \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u044d\u0442\u0443 \u0437\u0430\u0432\u0435\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>P.S. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/zenorachi\/freekassa-sdk-go\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0443\u0442<\/a>. \u041c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041e\u043d \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439, \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0441 \u0446\u0435\u043b\u044c\u044e, \u0447\u0442\u043e, \u043c\u043e\u0436\u0435\u0442, \u043a\u043e\u043c\u0443-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/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\/909816\/\"> https:\/\/habr.com\/ru\/articles\/909816\/<\/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! \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0433\u0430\u0439\u0434\u043e\u043c \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 FreeKassa \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Golang.<br \/>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0432\u043e\u0439\u0441\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u0435.<\/p>\n<\/li>\n<\/ul>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430<\/h2>\n<ol>\n<li>\n<p>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/freekassa.net\" rel=\"noopener noreferrer nofollow\">https:\/\/freekassa.net<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 &#171;\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0430\u0441\u0441\u0443&#187;:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b FreeKassa<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u0441\u0441\u0443 (\u043c\u0430\u0433\u0430\u0437\u0438\u043d).<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0438\u043f \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u044d\u0442\u043e TG-\u0431\u043e\u0442. \u041f\u043e\u0441\u043b\u0435 \u0436\u043c\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u0430<\/em> &#8212; \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0441\u0441\u044b. \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u043e\u043d \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043e\u0431 \u044d\u0442\u043e\u043c \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b\u0438 <strong>\u0422\u0415\u0421\u0422\u041e\u0412\u042b\u0419 \u0420\u0415\u0416\u0418\u041c<\/strong>. \u0418\u043d\u0430\u0447\u0435 \u043a\u0430\u0441\u0441\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u0430\u0448\u0443 \u043a\u0430\u0441\u0441\u0443.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u0430\u0441\u0441\u044b<\/h2>\n<p>\u041d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 FK.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 (\u043a\u0430\u0441\u0441\u044b):<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u0430\u0441\u0441\u044b.<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442:<\/p>\n<ol>\n<li>\n<p>\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 &#8212; \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438\u0445 \u0441\u0430\u043c\u0438, \u043b\u0438\u0431\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0432\u0442\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f<\/strong> &#8212; \u044d\u0442\u043e url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 FreeKassa \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c callback \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b<\/strong> &#8212; url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d <em>\u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043e\u0442 \u043d\u0430\u0441<\/em>, \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0430\u043b 200.<\/p>\n<\/li>\n<li>\n<p><strong>URL \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438 <\/strong>&#8212; url, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d <em>\u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043e\u0442 \u043d\u0430\u0441<\/em>.<\/p>\n<\/li>\n<\/ol>\n<p><strong>\u0412\u0410\u0416\u041d\u041e<\/strong>: \u0432\u0441\u0435 URL \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c &#171;\u043d\u0430 \u0434\u043e\u043c\u0435\u043d\u0435 \u043d\u0435 \u043d\u0438\u0436\u0435 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f&#187;. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 <u>\u043d\u0430\u043b\u0438\u0447\u0438\u0435 DNS \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e<\/u>, \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435: <a href=\"http:\/\/47.99.123.89:8080\/callback\" rel=\"noopener noreferrer nofollow\"><em>http:\/\/47.99.123.89:8080\/callback<\/em><\/a><em>.<\/em><\/p>\n<h2>URL \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0438 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b<\/h2>\n<p>\u0421 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043c-\u0431\u043e\u0442\u043e\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e &#8212; \u043e\u043d\u0438 \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 <u>https:\/\/t.me\/\u0432\u0430\u0448_\u0431\u043e\u0442<\/u>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435 \u0422\u0413-\u0431\u043e\u0442, \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c 2 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p><em>\/payments\/success<\/em> &#8212; \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436.<\/p>\n<\/li>\n<li>\n<p><em>\/payments\/failure<\/em> &#8212; \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435, \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f FreeKassa \u0432 Go<\/h2>\n<p>\u0423\u0440\u0430! \u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u044b \u0434\u043e\u0448\u043b\u0438 \u0434\u043e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f API-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.1.-Chto-takoe-SCI\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<h3>C\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0432\u043e\u0439\u0441\u0430<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c GET-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 <a href=\"https:\/\/pay.fk.money\/\" rel=\"noopener noreferrer nofollow\">https:\/\/pay.fk.money\/<\/a>.<\/p>\n<p>\u0427\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.3.-Nastrojka-formy-oplaty\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u042f \u043e\u043f\u0438\u0448\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430. \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 query params:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0422\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">m<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 (merchant id) &#8212; \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435<\/p>\n<\/td>\n<td>\n<p align=\"left\">int<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">o<\/p>\n<\/td>\n<td>\n<p align=\"left\">ID \u0437\u0430\u043a\u0430\u0437\u0430 (order id) &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">oa<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0421\u0443\u043c\u043c\u0430 \u0437\u0430\u043a\u0430\u0437\u0430<\/p>\n<\/td>\n<td>\n<p align=\"left\">int (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">currency<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0430\u043b\u044e\u0442\u0430 \u043f\u043b\u0430\u0442\u0435\u0436\u0430 (RUB,USD,EUR,UAH,KZT)<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">s<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u041f\u043e\u0434\u043f\u0438\u0441\u044c &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">us_&lt;key&gt;<\/p>\n<\/td>\n<td>\n<p align=\"left\">\u0412\u0430\u0436\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430 &#8212; payload. \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0430\u043c\u0438. Payload, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u0438\u043d\u0432\u043e\u0439\u0441\u0435, \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u043d\u0430\u043c \u043d\u0430 callback-\u043c\u0435\u0442\u043e\u0434 (URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f).<\/p>\n<p align=\"left\">\u041f\u0440\u0438\u043c\u0435\u0440: \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 us_user_id=123, \u0442\u043e\u0433\u0434\u0430 \u043d\u0430 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430\u043c \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f us_user_id=123<\/p>\n<\/td>\n<td>\n<p align=\"left\">string<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>currency.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  type Currency string  const ( RUB Currency = \"RUB\" USD Currency = \"USD\" EUR Currency = \"EUR\" UAH Currency = \"UAH\" KZT Currency = \"KZT\" )  func (c Currency) String() string { return string(c) }<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>payment.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"fmt\" \"strings\" )  \/\/ Payment - \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435. type Payment struct { OrderID   string Currency  Currency Amount    int64 Signature string Payload   Payload }  \/\/ Payload - key=value. type Payload map[string]string  \/\/ Generate - \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 Payload \u0432 query-parameters. func (p Payload) Generate() string { if p == nil { return \"\" }  builder := &amp;strings.Builder{} builder.WriteString(\"&amp;\")  for key, value := range p { param := fmt.Sprintf(\"us_%s=%s&amp;\", key, value) builder.WriteString(param) }  return builder.String()[:builder.Len()-1] }<\/code><\/pre>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 <code>Payment<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430.<\/p>\n<p><code>Payload<\/code> &#8212; \u044d\u0442\u043e \u043d\u0430\u0448\u0438 us_key (s), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0438\u043d\u0432\u043e\u0439\u0441\u043e\u043c \u0438 \u043f\u043e\u0442\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0430\u0448 URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0414\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0435\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043c\u0435\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c <code>MD5<\/code> \u0445\u044d\u0448 \u043e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u0438\u043a <code>utils.go<\/code>:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"crypto\/md5\" \"encoding\/hex\" )  func md5Hash(text string) string { hash := md5.Sum([]byte(text))  return hex.EncodeToString(hash[:]) }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u0438\u043d\u0432\u043e\u0439\u0441\u0430. \u0423 \u043d\u0430\u0441 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 &#8212; \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430 \u0438 \u0434\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0432 URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 \u0438\u043d\u0432\u043e\u0439\u0441\u0435 &#8212; MD5-\u0425\u044d\u0448 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438:<br \/><code>\"ID_\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430:\u0421\u0443\u043c\u043c\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435_\u0441\u043b\u043e\u0432\u043e_1:\u0412\u0430\u043b\u044e\u0442\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u041d\u043e\u043c\u0435\u0440_\u0437\u0430\u043a\u0430\u0437\u0430\"<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043f\u0438\u0441\u044c \u0432 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f &#8212; MD5-\u0425\u044d\u0448 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438:<br \/><code>\"ID_\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430:\u0421\u0443\u043c\u043c\u0430_\u043f\u043b\u0430\u0442\u0435\u0436\u0430:\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0435_\u0441\u043b\u043e\u0432\u043e_2:\u041d\u043e\u043c\u0435\u0440_\u0437\u0430\u043a\u0430\u0437\u0430\"<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b <code>freekassa.go<\/code>, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430:<\/p>\n<pre><code class=\"go\">package freekassa  import ( \"fmt\" )  const InvoiceBaseURL = `https:\/\/pay.fk.money`  type Client interface { GenerateInvoice(p *Payment) string GenerateInvoiceSignature(amount int64, currency Currency, orderID string) string GenerateConfirmSignature(amount int64, orderID string) string }  type client struct { MerchantID int64 SecretKey1 string SecretKey2 string }  func NewClient(merchantID int64, secretKey1 string, secretKey2 string) Client { return &amp;client{ MerchantID: merchantID, SecretKey1: secretKey1, SecretKey2: secretKey2, } }  func (c *client) GenerateInvoice(p *Payment) string { if p == nil { return \"\" }  return fmt.Sprintf( \"%s\/?m=%d&amp;o=%s&amp;oa=%d&amp;currency=%s&amp;s=%s%s\", InvoiceBaseURL, c.MerchantID, p.OrderID, p.Amount, p.Currency.String(), p.Signature, p.Payload.Generate(), ) }  func (c *client) GenerateInvoiceSignature(amount int64, currency Currency, orderID string) string { signData := fmt.Sprintf(\"%d:%d:%s:%s:%s\", c.MerchantID, amount, c.SecretKey1, currency.String(), orderID)  return md5Hash(signData) }  func (c *client) GenerateConfirmSignature(amount int64, orderID string) string { signData := fmt.Sprintf(\"%d:%d:%s:%s\", c.MerchantID, amount, c.SecretKey2, orderID)  return md5Hash(signData) } <\/code><\/pre>\n<p>\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0432\u043e\u0439\u0441\u0430 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c:<\/p>\n<pre><code class=\"go\">package main  import ( \"fmt\" \"github.com\/zenorachi\/freekassa-sdk-go\" )  func main() { merchantID, key1, key2 := int64(123), \"key1\", \"key2\" fk := freekassa.NewClient(merchantID, key1, key2)  order, amount := \"test_order\", int64(100)  invoice := fk.GenerateInvoice(&amp;freekassa.Payment{ OrderID:   order, Currency:  freekassa.RUB, Amount:    amount, Signature: fk.GenerateInvoiceSignature(amount, freekassa.RUB, order), Payload: map[string]string{ \"user_id\": \"3493920\", }, })  fmt.Println(invoice) }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u0434, \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448 \u0438\u043d\u0432\u043e\u0439\u0441: <a href=\"https:\/\/pay.fk.money\/?m=123&amp;o=test_order&amp;oa=100&amp;currency=RUB&amp;s=7e30da3dc8ef8498415f25e90c18cbb3&amp;us_user_id=3493920\" rel=\"noopener noreferrer nofollow\">https:\/\/pay.fk.money\/?m=123&amp;o=test_order&amp;oa=100&amp;currency=RUB&amp;s=7e30da3dc8ef8498415f25e90c18cbb3&amp;us_user_id=3493920<\/a>.<\/p>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u043d\u0435\u043c\u0443 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442, \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430, \u0447\u0442\u043e Merchant ID (ID \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430) \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.<\/p>\n<h2>URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f<\/h2>\n<p>\u0418\u043d\u0432\u043e\u0439\u0441 \u0441\u043e\u0437\u0434\u0430\u043d, \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c callback.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c router \u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u043a\u0430\u0436\u0443 \u0441\u0440\u0430\u0437\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u0445\u044d\u043d\u0434\u043b\u0435\u0440 \u0438 middleware, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u043e\u0438\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 MW. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0441 \u043a\u0430\u043a\u043e\u0433\u043e IP \u043d\u0430\u043c \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b \u0437\u0430\u043f\u0440\u043e\u0441. \u041e\u0431 \u044d\u0442\u043e\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f FK:<\/p>\n<p><em>&#171;\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c IP \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0412\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0430\u0448\u0438 IP &#8212; 168.119.157.136, 168.119.60.227, 178.154.197.79, 51.250.54.238.&#187;<\/em><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 middleware \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c gin:<\/p>\n<pre><code class=\"go\">func middleware() gin.HandlerFunc {     whitelist := map[string]struct{}{ \"168.119.157.136\": {}, \"168.119.60.227\":  {}, \"178.154.197.79\":  {}, \"51.250.54.238\":   {}, }    return func(c *gin.Context) { if _, found := whitelist[c.ClientIP()]; !found { c.AbortWithStatusJSON(http.StatusForbidden, gin.H{\"message\": \"access denied\"})  return }  c.Next() } }<\/code><\/pre>\n<p>\u0427\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 FK \u043d\u0430 URL \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/docs.freekassa.net\/#section\/1.-Vvedenie\/1.4.-Opoveshenie-o-platezhe\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>. \u042f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u0443\u043c\u043c\u0443 \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u043d\u043e\u043c\u0435\u0440 \u0437\u0430\u043a\u0430\u0437\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438 payload, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f callback:<\/p>\n<pre><code class=\"go\"> type confirmCallbackRequest struct { Amount  int64  `form:\"AMOUNT\" binding:\"required\"` OrderID string `form:\"MERCHANT_ORDER_ID\" binding:\"required\"` Sign    string `form:\"SIGN\" binding:\"required\"` UserID  int64  `form:\"us_user_id\" binding:\"required,gt=0\"` }  \/\/ \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 Handler, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442 FK. func (h *Handler) callback(c *gin.Context) { var ( req confirmCallbackRequest err error )      \/\/ \u041c\u0430\u0440\u0448\u0430\u043b\u043b\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 if err = c.ShouldBind(&amp;req); err != nil { c.Status(http.StatusBadRequest)  return }      \/\/ \u0421\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 - \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u043c \u043f\u0440\u0438\u0441\u043b\u0430\u043b\u0430 FreeKassa if sign := h.fk.GenerateConfirmSignature(req.Amount, req.OrderID); sign != req.Sign { c.Status(http.StatusForbidden)  return }      \/\/ \u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0448\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 (\u043f\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u043b\u0430\u043d\u0441\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0438 \u0442.\u0434.)  c.Status(http.StatusOK) }<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f? \u041f\u043e \u0441\u0443\u0442\u0438 &#8212; \u043d\u0438\u0447\u0435\u0433\u043e, \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e. \u041c\u044b \u0443\u043c\u0435\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0432\u043e\u0439\u0441, \u0443\u043c\u0435\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c callback. \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e &#8212; \u0443\u043a\u0430\u0437\u0430\u0442\u044c URL-\u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 FK (\u044d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434 callback).<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043b\u0430\u0442\u0435\u0436, \u043d\u0435 \u043f\u043b\u0430\u0442\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0435\u043d\u0435\u0433, \u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043a\u0430\u0441\u0441\u044b \u043c\u043e\u0436\u043d\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041c\u0435\u043d\u044e c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c \u0440\u0435\u0436\u0438\u043c\u043e\u043c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0418 \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u043e, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c &#171;\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0435\u0436\u0430&#187;. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c &#171;YES&#187; \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u043e\u0448\u043b\u043e \u043f\u043e \u043f\u043b\u0430\u043d\u0443. \u0415\u0441\u043b\u0438 FK \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043e\u0442 \u0432\u0430\u0441 &#171;YES&#187; \u043f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430, \u0442\u043e FK \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u044d\u0442\u0443 \u0437\u0430\u0432\u0435\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043e\u0442\u0432\u0435\u0442.<\/p>\n<p>P.S. \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 <a href=\"https:\/\/github.com\/zenorachi\/freekassa-sdk-go\" rel=\"noopener noreferrer nofollow\">\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0442\u0443\u0442<\/a>. \u041c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u041e\u043d \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439, \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0441 \u0446\u0435\u043b\u044c\u044e, \u0447\u0442\u043e, \u043c\u043e\u0436\u0435\u0442, \u043a\u043e\u043c\u0443-\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/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\/909816\/\"> https:\/\/habr.com\/ru\/articles\/909816\/<\/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-459881","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459881","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=459881"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/459881\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=459881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=459881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=459881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}