{"id":280985,"date":"2016-11-15T13:00:09","date_gmt":"2016-11-15T10:00:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=280985"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=280985","title":{"rendered":"Android In-app Billing: \u043e\u0442 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/02d\/303\/1d1\/02d3031d13f54b0caf3fb40ca273dbad.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u0432 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0438, \u0445\u043e\u0442\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e \u0432\u044b\u043b\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u043e\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u0443\u0447\u0443 \u043d\u0435\u0440\u0432\u043e\u0432 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0439. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u0435 \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 Google (\u0430 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0435\u0434, \u043e \u0447\u0435\u043c \u044f \u0435\u0449\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435).<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u043e\u0442 Google Play \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041a\u043e\u043c\u0443 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442: \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Google Play, \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0431\u0435\u043a\u0435\u043d\u0434\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0435. \u042f \u0431\u0443\u0434\u0443 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u043e \u043a\u0443\u0441\u043e\u0447\u043a\u0430\u043c <a href=\"https:\/\/developer.android.com\/google\/play\/billing\/billing_reference.html\">Google Play In-App Billing V3<\/a> \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/\">Android Publisher API<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043a\u0430\u043a \u0441 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0435\u0439 \u043f\u043e\u043a\u0443\u043f\u043e\u043a, \u0442\u0430\u043a \u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u043e\u0431\u043e\u0439\u0434\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043e\u0439 <a href=\"https:\/\/play.google.com\/apps\/publish\/\">\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Google Play<\/a> \u2014 \u043e\u043d\u0430 \u0442\u043e\u0436\u0435 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f.<\/p>\n<h2>\u0417\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u2014 \u0442\u043e \u0431\u0435\u0437 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u0430\u043c \u043d\u0435 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u0443 \u043e\u0442 \u043f\u0438\u0440\u0430\u0442\u0441\u0442\u0432\u0430. \u0418 \u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 Android Publisher API \u043c\u0435\u0442\u043e\u0434\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u0435\u0437 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0438 \u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0430, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u0445 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438 (\u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c, \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0438 \u0442. \u043f.). \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0434\u0430\u0442\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u043a\u0430\u043a \u0432 Google Play Music:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/85f\/728\/968\/85f72896853547ea8aab44d5b59b4bb3.png\"\/><\/p>\n<p>  \u0422\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043d\u0430 Android Publisher API.<\/p>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 flow \u043f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430 \u0442\u0430\u043a\u043e\u0432:<br \/>  1. \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Google Play \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043a\u0443\u043f\u043e\u043a.<br \/>  2. \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Android in-app billing \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<br \/>  3. \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 1: \u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 Google Play \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/h2>\n<p>  \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 <a href=\"https:\/\/play.google.com\/apps\/publish\/\">\u041a\u043e\u043d\u0441\u043e\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Google Play<\/a> (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u2014 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0437\u0430 $25) \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0430\u0448\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e.<\/p>\n<p>  1. \u0415\u0441\u0442\u044c \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u0435\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043e \u2014 \u043f\u043e\u0434\u043f\u0438\u0448\u0438\u0442\u0435 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u043c release-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u043c \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0435 \u0430\u043b\u044c\u0444\u0430-\u0438\u043b\u0438 \u0431\u0435\u0442\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<br \/>  <u>All Applications \/ \u0412\u0430\u0448\u0435 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \/ APK \/ Alpha(Beta) Testing<\/u><\/p>\n<p>  2. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0430\u043c\u0438 (Alpha \u0438\u043b\u0438 Beta) \u0442\u0438\u043f\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  3. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a email-\u044b Google-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u043b\u0438\u043d\u0433. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u0448 \u043b\u0438\u0447\u043d\u044b\u0439 email, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u0432\u043e\u0448\u043b\u0438 \u0432 Google Play \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/820\/aa1\/1be\/820aa11be2234c788c7a15d8e2f4a237.png\"\/><br \/>  \u0412\u043d\u0438\u0437\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 Opt-in URL: \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u043b\u0438\u043d\u0433 (\u0438 \u0441\u0430\u043c\u043e\u043c\u0443 \u0442\u043e\u0436\u0435), \u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 \u0430\u043b\u044c\u0444\u0430\/\u0431\u0435\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u0438.<\/p>\n<p>  4. \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <i>Settings \/ Account Details<\/i>, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b <i>LICENSE TESTING<\/i> \u0438 \u0432 \u043f\u043e\u043b\u0435 <i>Gmail accounts with testing access<\/i> \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0435 \u0436\u0435 email-\u044b, \u0447\u0442\u043e \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0448\u0430\u0433\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u044d\u0442\u0438\u0445 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u0432 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u2014 \u0437\u0430 \u043d\u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u044b\u043c\u0430\u0442\u044c\u0441\u044f \u043f\u043b\u0430\u0442\u0430.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043e\u043f\u043b\u0430\u0442\u044b \u0432\u0441\u0435 \u0436\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u2014 \u0441\u0430\u043c \u0434\u0438\u0430\u043b\u043e\u0433 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u044d\u0442\u043e\u0433\u043e, \u043e\u0434\u043d\u0430\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0435\u043f\u043e\u0441\u0442\u0440\u0443\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 \u043a\u0443\u043f\u0438\u0442\u044c \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u2014 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0430.<\/p>\n<p>  5. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0432 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 <u>All Applications \/ \u0412\u0430\u0448\u0435 \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \/ In-app Products<\/u> \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <i>Add new product<\/i>. \u041c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u043f\u043e\u043a\u0443\u043f\u043a\u0443 (Managed product) \u0438 \u043e\u0434\u043d\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 (Subscription). \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 product id \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u0441\u0442\u0438\u043b\u0435 <i>com.example.myapp_testing_inapp1<\/i> \u0438 <i>com.example.myapp_testing_subs1<\/i> \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u041d\u0443\u0436\u043d\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0446\u0435\u043d\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430, \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u044b, \u0433\u0434\u0435 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d (\u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435), \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434, \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0434\u0443\u043a\u0442. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043e\u043d \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f.<\/p>\n<p>  \u0412\u0410\u0416\u041d\u041e: \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 (\u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 alpha\/beta), \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c <b>\u043d\u0435 \u0431\u0443\u0434\u0443\u0442<\/b>.<\/p>\n<p>  <i><b>\u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u0442\u0438\u043f\u0430\u0445 \u043f\u043e\u043a\u0443\u043f\u043e\u043a<\/b><br \/>  1. Managed product (inapp) \u2014 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0430. \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u043d\u0430\u0432\u0441\u0435\u0433\u0434\u0430, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0442\u0430\u043a\u0430\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u00ab\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430\u00bb (consume) \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445 \u0442\u043e \u0431\u043e\u043d\u0443\u0441\u043e\u0432. \u041f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442 \u0438 \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437.<br \/>  2.Subscription (subs) \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430. \u041f\u043e\u0441\u043b\u0435 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430 \u0440\u0430\u0437 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434. \u041f\u043e\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043b\u0430\u0442\u0438\u0442 \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0430\u043a\u0442\u0438\u0432\u043d\u0430.<\/i><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u0448\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u2014 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043d\u0438\u0445 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0446\u0435\u043d\u0430 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435) \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0443.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 2: \u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Android in-app billing \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438<\/h2>\n<p>  <b><a href=\"https:\/\/developer.android.com\/google\/play\/billing\/billing_integrate.html\">\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f<\/a> <a href=\"https:\/\/developer.android.com\/google\/play\/billing\/billing_reference.html\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><\/b><\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u0438\u043b\u043b\u0438\u043d\u0433-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u0438\u043a IInAppBillingService.aidl \u0432 \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u043e\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/b><\/p>\n<div class=\"spoiler_text\">IInAppBillingService.aidl \u044d\u0442\u043e \u0444\u0430\u0439\u043b Android Interface Definition Language (AIDL), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c In-app Billing Version 3. \u0412\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u043b\u043b\u0438\u043d\u0433-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9C%D0%B5%D0%B6%D0%BF%D1%80%D0%BE%D1%86%D0%B5%D1%81%D1%81%D0%BD%D0%BE%D0%B5_%D0%B2%D0%B7%D0%B0%D0%B8%D0%BC%D0%BE%D0%B4%D0%B5%D0%B9%D1%81%D1%82%D0%B2%D0%B8%D0%B5\">IPC<\/a>-\u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0444\u0430\u0439\u043b AIDL:<br \/>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 <i>Android SDK Manager<\/i>.<br \/>  \u0412 <i>SDK Manager<\/i> \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0438 \u0440\u0430\u0441\u043a\u0440\u043e\u0439\u0442\u0435 \u0441\u0435\u043a\u0446\u0438\u044e <i>Extras<\/i>.<br \/>  \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 <i>Google Play Billing Library<\/i>.<br \/>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 <i>Install packages<\/i> \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 <i>src\/main<\/i> \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <i>aidl<\/i>.<br \/>  \u0412\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0442 \u043f\u0430\u043f\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0430\u043a\u0435\u0442 <i>com.android.vending.billing<\/i>.<br \/>  \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <i>IInAppBillingService.aidl<\/i> \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 <i>%anroid-sdk%\/extras\/google\/play_billing\/<\/i> \u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 <i>src\/main\/aidl\/com.android.vending.billing<\/i>  <\/div>\n<\/div>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442  <\/p>\n<pre><code class=\"xml\">&lt;uses-permission android:name=&quot;com.android.vending.BILLING&quot; \/&gt; <\/code><\/pre>\n<p>  \u0418 \u0432 \u043c\u0435\u0441\u0442\u0435, \u0433\u0434\u0435 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443:  <\/p>\n<pre><code class=\"java\">    IInAppBillingService inAppBillingService;      ServiceConnection serviceConnection = new ServiceConnection() {         @Override         public void onServiceConnected(ComponentName name, IBinder service) {             inAppBillingService = IInAppBillingService.Stub.asInterface(service);         }          @Override         public void onServiceDisconnected(ComponentName name) {             inAppBillingService = null;         }     };      @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         Intent serviceIntent =                  new Intent(&quot;com.android.vending.billing.InAppBillingService.BIND&quot;);         serviceIntent.setPackage(&quot;com.android.vending&quot;);         bindService(serviceIntent, serviceConnection, Context.BIND_AUTO_CREATE);         ...     }      @Override     public void onDestroy() {         super.onDestroy();         if (serviceConnection != null) {             unbindService(serviceConnection);         }     } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u043e\u043a\u0443\u043f\u043a\u0430\u043c\u0438.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438\u0437 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0438 \u0446\u0435\u043d\u0430\u043c\u0438:<\/p>\n<pre><code class=\"java\">    class InAppProduct {          public String productId;         public String storeName;         public String storeDescription;         public String price;         public boolean isSubscription;         public int priceAmountMicros;         public String currencyIsoCode;          public String getSku() {             return productId;         }                  String getType() {             return isSubscription ? &quot;subs&quot; : &quot;inapp&quot;;         }              }      List&lt;InAppProduct&gt; getInAppPurchases(String type, String... productIds) throws Exception {         ArrayList&lt;String&gt; skuList = new ArrayList&lt;&gt;(Arrays.asList(productIds));         Bundle query = new Bundle();         query.putStringArrayList(&quot;ITEM_ID_LIST&quot;, skuList);         Bundle skuDetails = inAppBillingService.getSkuDetails(                 3, context.getPackageName(), type, query);         ArrayList&lt;String&gt; responseList = skuDetails.getStringArrayList(&quot;DETAILS_LIST&quot;);         List&lt;InAppProduct&gt; result = new ArrayList&lt;&gt;();         for (String responseItem : responseList) {            JSONObject jsonObject = new JSONObject(responseItem);             InAppProduct product = new InAppProduct();             \/\/ &quot;com.example.myapp_testing_inapp1&quot;             product.productId = jsonObject.getString(&quot;productId&quot;);             \/\/ \u041f\u043e\u043a\u0443\u043f\u043a\u0430             product.storeName = jsonObject.getString(&quot;title&quot;);             \/\/ \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438             product.storeDescription = jsonObject.getString(&quot;description&quot;);             \/\/ &quot;0.99USD&quot;             product.price = jsonObject.getString(&quot;price&quot;);             \/\/ &quot;true\/false&quot;             product.isSubscription = jsonObject.getString(&quot;type&quot;).equals(&quot;subs&quot;);             \/\/ &quot;990000&quot; = \u0446\u0435\u043d\u0430 x 1000000             product.priceAmountMicros =                      Integer.parseInt(jsonObject.getString(&quot;price_amount_micros&quot;));             \/\/ USD             product.currencyIsoCode = jsonObject.getString(&quot;price_currency_code&quot;);             result.add(product);         }         return result;     } <\/code><\/pre>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u043a\u0430\u0445.  <\/p>\n<pre><code class=\"java\">        \/\/ \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a         List&lt;InAppProduct&gt; purchases =                  getInAppPurchases(&quot;inapp&quot;, &quot;com.example.myapp_testing_inapp1&quot;);         \/\/ \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043f\u0438\u0441\u043e\u043a         List&lt;InAppProduct&gt; subscriptions =                 getInAppPurchases(&quot;subs&quot;, &quot;com.example.myapp_testing_subs1&quot;); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u044f\u043c\u043e \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u0440\u043e \u043d\u0438\u0445. \u0426\u0435\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u0442\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043b\u0430\u0442\u0438\u0442\u044c. \u042d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u043d\u0430\u0434\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0440\u0432\u0438\u0441 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 Google. \u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0446\u0435\u043d\u044b \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430, \u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0438 \u0446\u0435\u043d\u044b \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0442\u0435\u043f\u0435\u0440\u044c \u0447\u0442\u043e-\u0442\u043e \u043a\u0443\u043f\u0438\u0442\u044c!<\/p>\n<pre><code class=\"java\">    private static final int REQUEST_CODE_BUY = 1234;      public static final int BILLING_RESPONSE_RESULT_OK = 0;     public static final int BILLING_RESPONSE_RESULT_USER_CANCELED = 1;     public static final int BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE = 2;     public static final int BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE = 3;     public static final int BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE = 4;     public static final int BILLING_RESPONSE_RESULT_DEVELOPER_ERROR = 5;     public static final int BILLING_RESPONSE_RESULT_ERROR = 6;     public static final int BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED = 7;     public static final int BILLING_RESPONSE_RESULT_ITEM_NOT_OWNED = 8;      public static final int PURCHASE_STATUS_PURCHASED = 0;     public static final int PURCHASE_STATUS_CANCELLED = 1;     public static final int PURCHASE_STATUS_REFUNDED = 2;      public void purchaseProduct(InAppProduct product) throws Exception {         String sku = product.getSku();         String type = product.getType();         \/\/ \u0441\u044e\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435         \/\/ \u043f\u043e\u0442\u043e\u043c \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043a\u0443\u043f\u043a\u043e\u0439         String developerPayload = &quot;12345&quot;;         Bundle buyIntentBundle = inAppBillingService.getBuyIntent(                 3, context.getPackageName(),                 sku, type, developerPayload);         PendingIntent pendingIntent = buyIntentBundle.getParcelable(&quot;BUY_INTENT&quot;);         startIntentSenderForResult(pendingIntent.getIntentSender(),                 REQUEST_CODE_BUY, new Intent(), Integer.valueOf(0), Integer.valueOf(0),                 Integer.valueOf(0), null);     }      @Override     public void onActivityResult(int requestCode, int resultCode, Intent data) {         super.onActivityResult(requestCode, resultCode, data);         if (requestCode == REQUEST_CODE_BUY) {             int responseCode = data.getIntExtra(&quot;RESPONSE_CODE&quot;, -1);             if (responseCode == BILLING_RESPONSE_RESULT_OK) {                 String purchaseData = data.getStringExtra(&quot;INAPP_PURCHASE_DATA&quot;);                 String dataSignature = data.getStringExtra(&quot;INAPP_DATA_SIGNATURE&quot;);                 \/\/ \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c                  readPurchase(purchaseData);             } else {                 \/\/ \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442             }         }     }          private void readPurchase(String purchaseData) {         try {             JSONObject jsonObject = new JSONObject(purchaseData);             \/\/ \u0438\u0434 \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 null             String orderId = jsonObject.optString(&quot;orderId&quot;);             \/\/ &quot;com.example.myapp&quot;             String packageName = jsonObject.getString(&quot;packageName&quot;);             \/\/ &quot;com.example.myapp_testing_inapp1&quot;             String productId = jsonObject.getString(&quot;productId&quot;);             \/\/ unix-timestamp \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u043e\u043a\u0443\u043f\u043a\u0438             long purchaseTime = jsonObject.getLong(&quot;purchaseTime&quot;);             \/\/ PURCHASE_STATUS_PURCHASED             \/\/ PURCHASE_STATUS_CANCELLED             \/\/ PURCHASE_STATUS_REFUNDED             int purchaseState = jsonObject.getInt(&quot;purchaseState&quot;);             \/\/ &quot;12345&quot;             String developerPayload = jsonObject.optString(&quot;developerPayload&quot;);             \/\/ \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u0441 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c             \/\/ \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435             String purchaseToken = jsonObject.getString(&quot;purchaseToken&quot;);             \/\/ \u0434\u0430\u043b\u0435\u0435 \u0432\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0443             ...         } catch (Exception e) {             ...         }     } <\/code><\/pre>\n<p>  \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e dataSignature. \u041f\u0440\u0438\u043c\u0435\u0440 \u0435\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/googlesamples\/android-play-billing\/blob\/master\/TrivialDrive\/app\/src\/main\/java\/com\/example\/android\/trivialdrivesample\/util\/Security.java#L55\">\u0442\u0443\u0442<\/a>, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u2014 \u0442\u043e \u044d\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u0439 \u0448\u0430\u0433.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043a\u0443\u043f\u043a\u0430\u0445:<\/p>\n<pre><code class=\"java\">    private void readMyPurchases() throws Exception {         readMyPurchases(&quot;inapp&quot;); \/\/ \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a         readMyPurchases(&quot;subs&quot;); \/\/ \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a     }      private void readMyPurchases(String type) throws Exception {         String continuationToken = null;         do {             Bundle result = inAppBillingService.getPurchases(                     3, context.getPackageName(), type, continuationToken);             if (result.getInt(&quot;RESPONSE_CODE&quot;, -1) != 0) {                 throw new Exception(&quot;Invalid response code&quot;);             }             List&lt;String&gt; responseList = result.getStringArrayList(&quot;INAPP_PURCHASE_DATA_LIST&quot;);             for (String purchaseData : responseList) {                 readPurchase(purchaseData);             }             continuationToken = result.getString(&quot;INAPP_CONTINUATION_TOKEN&quot;);         } while (continuationToken != null);     } <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0437 \u0444\u043e\u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430. \u0417\u0434\u0435\u0441\u044c \u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043a\u0443\u043f\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u043a\u0443\u043f\u043a\u0438. \u0418\u043c\u0435\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0447\u0442\u043e-\u0442\u043e \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443, \u0430 \u0441\u0430\u043c\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0435\u0442, \u0434\u0430\u0432\u0430\u044f \u0442\u0430\u043a\u0438\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0435\u0449\u0435 \u0440\u0430\u0437.<\/p>\n<pre><code class=\"java\">    private void consumePurchase(String purchaseToken) throws Exception {         int result = inAppBillingService.consumePurchase(GooglePlayBillingConstants.API_VERSION,                 context.getPackageName(), purchaseToken);         if (result == GooglePlayBillingConstants.BILLING_RESPONSE_RESULT_OK) {             \/\/ \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0431\u043e\u043d\u0443\u0441\u044b             ...         } else {             \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043a\u0438             ...         }      } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0443\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u2014 \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 <i>getPurchases()<\/i>.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0448\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 3: \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/h2>\n<p>  \u042d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0431\u0438\u043b\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e.<\/p>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430 java, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 Google \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <a href=\"https:\/\/developers.google.com\/api-client-library\/java\/apis\/androidpublisher\/v2\">\u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/a> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438.<\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 <a href=\"https:\/\/developers.google.com\/api-client-library\/\">\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u043e Google Publisher API <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/\">\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0442\u0443\u0442<\/a>, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/purchases\/products\">Purchases.products<\/a> \u0438 <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/purchases\/subscriptions\">Purchases.subscriptions<\/a>.<\/p>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438, \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f, \u044d\u0442\u043e <a href=\"https:\/\/developers.google.com\/android-publisher\/authorization\">\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/a>. \u0414\u0430\u0436\u0435 \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043f\u044f\u0442\u0430\u044f \u043d\u043e\u0433\u0430 \u0443 \u043a\u043e\u043d\u044f, \u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d <u>\u0432 \u043a\u043e\u0440\u043d\u0435 \u043d\u0435 \u0432\u0435\u0440\u043d\u044b\u0439<\/u> \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041f\u0440\u043e\u0441\u044c\u0431\u0430 \u043a \u0437\u043d\u0430\u0442\u043e\u043a\u0430\u043c \u043d\u0435 \u043a\u0438\u0434\u0430\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u043d\u044f \u043a\u0430\u043c\u043d\u044f\u043c\u0438: OAuth \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u0432 \u043d\u0430\u0448\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 backend-\u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0418 \u0432\u043e\u0442 \u0442\u0443\u0442 \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 IAM (Identy Access Management). \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 <a href=\"https:\/\/console.cloud.google.com\">Google Cloud Console<\/a> \u0438 \u0437\u0430\u0439\u0442\u0438 \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <i>Credentials<\/i>, \u0432\u044b\u0431\u0440\u0430\u0442\u044c <i>Create credentials &gt; Service account key<\/i>.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/cba\/2a4\/978\/cba2a49786d24adab007ea4b36f15350.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/e38\/343\/5a1\/e383435a1d3d48a682a9e7ee60371138.png\" alt=\"image\"\/><br \/>  Service account: New service account<br \/>  Service account name: \u0438\u043c\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440<br \/>  Role: \u043d\u0435 \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435, \u043e\u043d\u0430 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430<br \/>  Key type: JSON<\/p>\n<p>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 <i>Create<\/i>. \u0412\u044b\u043b\u0435\u0437\u0435\u0442 \u043e\u043a\u043e\u0448\u043a\u043e \u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435\u043c <i>Service account has no role<\/i>. \u0421\u043e\u0433\u043b\u0430\u0448\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <i>CREATE WITHOUT ROLE<\/i>. \u0412\u0430\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f JSON-\u0444\u0430\u0439\u043b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u2014 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043e\u043d \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 Google-\u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">{   &quot;type&quot;: &quot;service_account&quot;,   &quot;project_id&quot;: &quot;project-name&quot;,   &quot;private_key_id&quot;: &quot;1234567890abcdef1234567890abcdef&quot;,   &quot;private_key&quot;: &quot;-----BEGIN PRIVATE KEY-----\\XXXXX.....XXXXX\\n-----END PRIVATE KEY-----\\n&quot;,   &quot;client_email&quot;: &quot;myaccount@project-name.iam.gserviceaccount.com&quot;,   &quot;client_id&quot;: &quot;12345678901234567890&quot;,   &quot;auth_uri&quot;: &quot;https:\/\/accounts.google.com\/o\/oauth2\/auth&quot;,   &quot;token_uri&quot;: &quot;https:\/\/accounts.google.com\/o\/oauth2\/token&quot;,   &quot;auth_provider_x509_cert_url&quot;: &quot;https:\/\/www.googleapis.com\/oauth2\/v1\/certs&quot;,   &quot;client_x509_cert_url&quot;: &quot;https:\/\/www.googleapis.com\/robot\/v1\/metadata\/x509\/myaccount%40project-name.iam.gserviceaccount.com&quot; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <i>Credentials<\/i> \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0432\u0438\u0434\u0438\u043c \u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0438\u0441\u043e\u043a <i>Service account keys<\/i>. \u0421\u043f\u0440\u0430\u0432\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 <i>Manage service accounts<\/i> \u2014 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0435 \u0438 \u0432\u0438\u0434\u0438\u043c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/db3\/d7e\/3d6\/db3d7e3d6f5f4787aeb0007c9f6dd078.png\" alt=\"image\"\/><\/p>\n<p>  <i>myaccount@project-name.iam.gserviceaccount.com<\/i> \u2014 \u044d\u0442\u043e \u0438 \u0435\u0441\u0442\u044c id \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430. \u041a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0438 \u0438\u0434\u0435\u043c \u0432 <i>Google Play Developer Console &gt; Settings &gt; User Accounts &#038; Rights<\/i> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <i>Invite new user<\/i>.<\/p>\n<p>  \u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/fb1\/b91\/9c5\/fb1b919c5dd045eaacbccb73391242ac.png\" alt=\"image\"\/><br \/>  \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c id \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u0432 \u043f\u043e\u043b\u0435 <i>Email<\/i>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 <i>View financial reports<\/i>.<br \/>  \u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Send Invitation. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 JSON-\u0444\u0430\u0439\u043b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 Google API \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <b>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/b><\/p>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c JSON-\u0444\u0430\u0439\u043b \u0441 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 IAM-\u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043d\u0430 \u0432\u0430\u0448\u0435 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<br \/>  \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 Google Play Developer API \u0432 \u0432\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442 (<a href=\"https:\/\/mvnrepository.com\/artifact\/com.google.apis\/google-api-services-androidpublisher\/v2-rev37-1.22.0\">mavencentral<\/a>) \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<br \/>  \u0421\u0430\u043c\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"java\">import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.androidpublisher.AndroidPublisher; import com.google.api.services.androidpublisher.AndroidPublisherScopes; import com.google.api.services.androidpublisher.model.ProductPurchase; import com.google.api.services.androidpublisher.model.SubscriptionPurchase;  import java...  public class GooglePlayService {      private final Map&lt;String, AndroidPublisher&gt; androidPublishers = new HashMap&lt;&gt;();          private String readCredentialsJson(String packageName) {         \/\/ \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u0434\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 JSON-\u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438\u0445         ...     }      private AndroidPublisher getPublisher(String packageName) throws Exception {         if (!androidPublishers.containsKey(packageName)) {             String credentialsJson = readCredentialsJson(packageName);             InputStream inputStream = new ByteArrayInputStream(                     credentialsJson.getBytes(StandardCharsets.UTF_8));             HttpTransport transport = GoogleNetHttpTransport.newTrustedTransport();             GoogleCredential credential = GoogleCredential.fromStream(inputStream)                     .createScoped(Collections.singleton(                             AndroidPublisherScopes.ANDROIDPUBLISHER));             AndroidPublisher.Builder builder = new AndroidPublisher.Builder(                     transport, JacksonFactory.getDefaultInstance(), credential);             AndroidPublisher androidPublisher = builder.build();             androidPublishers.put(packageName, androidPublisher);         }         return androidPublishers.get(packageName);     }      public ProductPurchase getPurchase(String packageName,                                        String productId,                                        String token)              throws Exception {         AndroidPublisher publisher = getPublisher(packageName);         AndroidPublisher.Purchases.Products.Get get = publisher                 .purchases().products().get(packageName, productId, token);         return get.execute();     }      public SubscriptionPurchase getSubscription(String packageName,                                                  String productId,                                                  String token)              throws Exception {         AndroidPublisher publisher = getPublisher(packageName);         AndroidPublisher.Purchases.Subscriptions.Get get = publisher                 .purchases().subscriptions().get(packageName, productId, token);         return get.execute();     }  } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043d\u0430\u0448\u0435\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442 Google, \u043f\u043e\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0438. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0447\u0435\u043c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0447\u0435\u0440\u0435\u0437 IInAppBilligService \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b:  <\/p>\n<ul>\n<li>packageName \u2014 \u0438\u043c\u044f \u043f\u0430\u043a\u0435\u0442\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (com.example.myapp)<\/li>\n<li>productId \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 (com.example.myapp_testing_inapp1)<\/li>\n<li>token \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432 \u043c\u043e\u0431\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438:<br \/> \n<pre><code class=\"java\">String purchaseToken = jsonObject.getString(&quot;purchaseToken&quot;);<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>  \u0414\u0435\u0442\u0430\u043b\u0438 \u043f\u043e <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/purchases\/products\">ProductPurchase<\/a> \u0438 <a href=\"https:\/\/developers.google.com\/android-publisher\/api-ref\/purchases\/subscriptions\">SubscriptionPurchase<\/a> \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<h2>\u0412\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043a\u0430\u0437\u0430\u0432\u0448\u0430\u044f\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430 \u0432 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0430\u0441\u044c \u0432 \u043f\u0443\u0442\u0435\u0448\u0435\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0433\u0443\u0433\u043b\u0438\u043d\u0433 \u0438 \u0431\u0435\u0441\u0441\u0438\u043b\u0438\u0435 (OAuth, <a href=\"https:\/\/developers.google.com\/android-publisher\/authorization\">\u0442\u044b \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u0435\u043d<\/a>), \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 IAM \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043d\u0438 \u0441\u043b\u043e\u0432\u0430. \u0421\u0435\u0440\u044c\u0435\u0437\u043d\u043e, \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0432\u0431\u0438\u0442\u044c \u0440\u0443\u043a\u0430\u043c\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u0440\u044f\u043f\u0430\u043d\u043d\u044b\u0439 URL \u0432 \u0432\u0430\u0448\u0435\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c origin \u0434\u043b\u044f \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c, \u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u0444\u043b\u043e\u0443 OAuth \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0430. \u042d\u0442\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0443\u0441\u043f\u0435\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c refresh-token, \u0442\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u2014 \u0440\u0443\u043a\u0430\u043c\u0438. \u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c \u2014 \u044d\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442 \u043a\u0430\u043a \u043f\u043e\u043b\u043d\u044b\u0439 \u0431\u0440\u0435\u0434 \u0434\u043b\u044f backend-\u0441\u0435\u0440\u0432\u0438\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u0435\u0437 \u0432\u043c\u0435\u0448\u0430\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430.<\/p>\n<p>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u043f\u043e\u043c\u043e\u0433\u0443 \u043a\u043e\u043c\u0443-\u0442\u043e \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435\u0440\u0432\u043e\u0432.<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:\/\/habrahabr.ru\/post\/313416\/\"> https:\/\/habrahabr.ru\/post\/313416\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/02d\/303\/1d1\/02d3031d13f54b0caf3fb40ca273dbad.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442!<\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u043e \u043c\u043d\u043e\u0439 \u0432\u0441\u0442\u0430\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u0432 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0438, \u0445\u043e\u0442\u044f \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e \u0432\u044b\u043b\u0438\u043b\u043e\u0441\u044c \u0432 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u0438\u043d\u043e\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u043a\u0443\u0447\u0443 \u043d\u0435\u0440\u0432\u043e\u0432 \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0439. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043d\u0435 \u0432\u0441\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 Google (\u0430 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u043e\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0440\u0435\u0434, \u043e \u0447\u0435\u043c \u044f \u0435\u0449\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0434\u0430\u043b\u0435\u0435).<\/p>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u0438\u043b\u043b\u0438\u043d\u0433 \u043e\u0442 Google Play \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043d\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041a\u043e\u043c\u0443 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u2014 \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442: \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043a\u0443\u043f\u043e\u043a \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Google Play, \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u0431\u0435\u043a\u0435\u043d\u0434\u0435.  <\/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-280985","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280985","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=280985"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/280985\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=280985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=280985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=280985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}