{"id":160911,"date":"2013-02-12T10:26:03","date_gmt":"2013-02-12T06:26:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=160911"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=160911","title":{"rendered":"<span class=\"post_title\">In-app Billing Subscriptions \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \tIn-app Billing Subscriptions (\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u043e \u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434 Android. \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u2014 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u043c\u043e\u0448\u043d\u0438\u043a \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u043d\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 <a href=\"http:\/\/developer.android.com\/google\/play\/billing\/v2\/billing_subscriptions.html\">\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438<\/a> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0442\u043e\u043a\u0435\u043d \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0437\u0430\u043a\u0430\u0437\u0430 \u0432 Google Play, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0431\u043b\u0430\u0433\u0430<\/li>\n<li>\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0430\u043a\u0442 \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0438\u044f \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0431\u043b\u0430\u0433<\/li>\n<\/ol>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0448\u0430\u0433\u0438 \u043f\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u043d\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f In-App Billing version 2.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430, Google \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/developers.google.com\/android-publisher\/index\">Google Play Android Developer API<\/a>. API \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n<ul>\n<li><a href=\"https:\/\/developers.google.com\/android-publisher\/v1\/purchases\/get\">\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/a> \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435<\/li>\n<li><a href=\"https:\/\/developers.google.com\/android-publisher\/v1\/purchases\/cancel\">\u041e\u0442\u043c\u0435\u043d\u0430<\/a> \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u041d\u0443 \u043a\u0430\u043a \u043e\u0442\u043c\u0435\u043d\u0430\u2026 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043e\u0442\u043c\u0435\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u0418\u0431\u043e \u043f\u043e-\u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e\u0441\u0442\u0438 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043e\u043f\u043b\u0430\u0447\u0435\u043d \u043d\u0430\u043f\u0435\u0440\u0435\u0434<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435 myapp.month.test \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f com.myapp (\u043a\u0441\u0442\u0430\u0442\u0438, \u0432\u0441\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0438\u0436\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0438 \u043a\u043b\u044e\u0447\u0435\u0439 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b. \u0414\u043b\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430), \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/p>\n<pre><code class=\"bash\">$ wget 'https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription' --2013-02-11 18:24:01--  https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription Resolving www.googleapis.com (www.googleapis.com)... 173.194.71.95, 2a00:1450:4010:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|173.194.71.95|:443... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed. <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 <a href=\"https:\/\/developers.google.com\/accounts\/docs\/OAuth2\">\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e<\/a> \u043f\u043e \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0443 OAuth2 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <a href=\"https:\/\/code.google.com\/apis\/console\/\">\u043a\u043e\u043d\u0441\u043e\u043b\u0438<\/a>. \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438, \u043d\u0443\u0436\u043d\u043e <a href=\"https:\/\/developers.google.com\/accounts\/docs\/OAuth2WebServer\">\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c<\/a>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 Client ID for web applications:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/pix.am\/qNgO.jpeg\" alt=\"image\"\/><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438  <\/p>\n<ol>\n<li>\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 <code>https:\/\/accounts.google.com\/o\/oauth2\/auth?scope=https:\/\/www.googleapis.com\/auth\/androidpublisher<\/code><br \/>  <code>&response_type=code&access_type=offline<\/code><br \/>  <code>&redirect_uri=http:\/\/example.com\/oauth2callback<\/code><br \/>  <code>&client_id=someclientid.apps.googleusercontent.com<\/code><br \/>  \u0417\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u043c\u0435 \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 <b>access type offline<\/b>, \u043f\u043e\u043b\u044c\u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u0430 \u043f\u043e\u0437\u0436\u0435<\/li>\n<li>\u041e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043d<\/li>\n<li>\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435, \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e\u043c\u0443\n<p>  <img decoding=\"async\" src=\"http:\/\/pix.am\/nQyH.png\" alt=\"image\"\/><\/li>\n<li>\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0438\u0437 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 <code>http:\/\/example.com\/oauth2callback?code=4\/AuthoRIZ4ti0nC0De <\/code><\/li>\n<li>\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\n<pre><code class=\"bash\">$ wget https:\/\/accounts.google.com\/o\/oauth2\/token --post-data 'code=4\/AuthoRIZ4ti0nC0De&client_id=someclientid.apps.googleusercontent.com&client_secret=c1iEnT5eCReT&redirect_uri=http:\/\/example.com\/oauth2callback&grant_type=authorization_code' -O - --2013-02-11 18:31:20--  https:\/\/accounts.google.com\/o\/oauth2\/token Resolving accounts.google.com (accounts.google.com)... 173.194.71.84, 2a00:1450:4010:c04::54 Connecting to accounts.google.com (accounts.google.com)|173.194.71.84|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application\/json] Saving to: `STDOUT'      [&lt;=&gt;                                                                                                                                                                                          ] 0           --.-K\/s              {   &quot;access_token&quot; : &quot;ya29.ACCeSs-T0keN&quot;,   &quot;token_type&quot; : &quot;Bearer&quot;,   &quot;expires_in&quot; : 3600,   &quot;refresh_token&quot; : &quot;1\/rEfRE5hT0KeN&quot;     [ &lt;=&gt;                                                                                                                                                                                         ] 127         --.-K\/s   in 0s        2013-02-11 18:31:20 (16.6 MB\/s) - written to stdout [127] <\/code><\/pre>\n<\/li>\n<li>\u0412 \u043f\u043e\u043b\u0435 access_token \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API. \u041e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 3600 \u0441\u0435\u043a\u0443\u043d\u0434, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 <b>expires_in<\/b>. \u041f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0442\u043e\u043a\u0435\u043d, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c (\u043d\u0443 \u043c\u0430\u043b\u043e-\u043b\u0438, \u0437\u0430\u0431\u044b\u043b\u0438) \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u0440\u0430\u0437, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441.\n<pre><code class=\"bash\">$ wget https:\/\/accounts.google.com\/o\/oauth2\/token --post-data 'code=4\/0thER-AuthoRIZ4ti0nC0De&client_id=someclientid.apps.googleusercontent.com&client_secret=c1iEnT5eCReT&redirect_uri=http:\/\/example.com\/oauth2callback&grant_type=authorization_code' -O - --2013-02-11 18:31:20--  https:\/\/accounts.google.com\/o\/oauth2\/token Resolving accounts.google.com (accounts.google.com)... 173.194.71.84, 2a00:1450:4010:c04::54 Connecting to accounts.google.com (accounts.google.com)|173.194.71.84|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application\/json] Saving to: `STDOUT'      [&lt;=&gt;                                                                                                                                                                                          ] 0           --.-K\/s              {   &quot;access_token&quot; : &quot;ya29.neW-ACCeSs-T0keN&quot;,   &quot;token_type&quot; : &quot;Bearer&quot;,   &quot;expires_in&quot; : 3573,     [ &lt;=&gt;                                                                                                                                                                                         ] 127         --.-K\/s   in 0s        2013-02-11 18:31:20 (16.6 MB\/s) - written to stdout [127] <\/code><\/pre>\n<\/li>\n<\/ol>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 Google \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043d\u043e \u0431\u0435\u0437 \u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f. \u0412\u0441\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435, \u0438 \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f:<\/p>\n<ol>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0442\u043e\u043a\u0435\u043d \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041a\u0441\u0442\u0430\u0442\u0438, \u043e\u043d-\u0442\u043e \u043d\u0430\u043c \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0431\u0430\u043b\u0433\u043e\u0434\u0430\u0440\u044f <b>access type offline<\/b>. \u0415\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u043e\u0434\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043e, \u043f\u0440\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u0442. \u041d\u0430 \u043c\u043e\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435, \u043e\u043d \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043d\u0438 \u0440\u0430\u0437\u0443<\/li>\n<li>\u041f\u0440\u0438 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0430\u043d\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043e \u0447\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043f\u043e \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c\u0443 \u043e\u0442\u0432\u0435\u0442\u0443 \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c HTTP 401 \u043d\u0430 \u0432\u044b\u0437\u043e\u0432\u044b \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f\n<pre><code class=\"bash\">$ wget 'https:\/\/accounts.google.com\/o\/oauth2\/token' --post-data 'refresh_token=1\/rEfRE5hT0KeN&client_id=someclientid.apps.googleusercontent.com&client_secret=c1iEnT5eCReT&grant_type=refresh_token' -O - --2013-02-11 19:33:13--  https:\/\/accounts.google.com\/o\/oauth2\/token Resolving accounts.google.com (accounts.google.com)... 173.194.71.84, 2a00:1450:4010:c04::54 Connecting to accounts.google.com (accounts.google.com)|173.194.71.84|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application\/json] Saving to: `STDOUT'      [&lt;=&gt;                                                                                                                                                                                          ] 0           --.-K\/s              {   &quot;access_token&quot; : &quot;ya29.rEFre5hED-ACCeSs-T0keN&quot;,   &quot;token_type&quot; : &quot;Bearer&quot;,   &quot;expires_in&quot; : 3600     [ &lt;=&gt;                                                                                                                                                                                         ] 127         --.-K\/s   in 0s        2013-01-11 19:33:14 (18.7 MB\/s) - written to stdout [127] <\/code><\/pre>\n<\/li>\n<li>\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u0442\u043e\u043c \u0441\u0430\u043c\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435<\/li>\n<\/ol>\n<p>  \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432 \u0441\u0435\u0431\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0432\u0435\u0436\u0438\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c-\u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u044f\u0449\u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u0432\u043e\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435:<\/p>\n<pre><code class=\"bash\">$ wget 'https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN' -O - --2013-02-11 19:50:21--  https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN Resolving www.googleapis.com (www.googleapis.com)... 173.194.71.95, 2a00:1450:4010:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|173.194.71.95|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application\/json] Saving to: `STDOUT'      [&lt;=&gt;                                                                                                                                                                                          ] 0           --.-K\/s              {  &quot;kind&quot;: &quot;androidpublisher#subscriptionPurchase&quot;,  &quot;initiationTimestampMsec&quot;: &quot;1357909784285&quot;,  &quot;validUntilTimestampMsec&quot;: &quot;1360588184285&quot;,  &quot;autoRenewing&quot;: true }     [ &lt;=&gt;                                                                                                                                                                                         ] 167         --.-K\/s   in 0s        2013-02-11 19:50:21 (30.7 MB\/s) - written to stdout [167] <\/code><\/pre>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043e\u043c\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/developers.google.com\/android-publisher\/v1\/purchases#resource\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0443<\/a><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 initiationTimestampMsec \u0438 validUntilTimestampMsec:<\/p>\n<ul>\n<li>initiationTimestampMsec = 1357909784.285 \u0441\u0435\u043a\u0443\u043d\u0434\u044b = 2013-01-11 17:09:44<\/li>\n<li>validUntilTimestampMsec = 1360588184.285 \u0441\u0435\u043a\u0443\u043d\u0434\u044b = 2013-02-11 23:09:44<\/li>\n<\/ul>\n<p>  \u041f\u043e\u043b\u0430\u0433\u0430\u044e, Google \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e 6 \u0447\u0430\u0441\u043e\u0432 \u043d\u0430 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u043e \u0441\u0447\u0435\u0442\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u0440\u0438 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0438, \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c. \u0412 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u0430\u0431\u043b\u0438\u0448\u043c\u0435\u043d\u0442\u0430 \u0434\u0435\u043d\u044c\u0433\u0438 \u0431\u044b\u043b\u0438 \u0441\u043f\u0438\u0441\u0430\u043d\u044b \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 ~ \u0432 2013-02-11 17:10. \u041a\u0441\u0442\u0430\u0442\u0438, \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 Facebook \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u0441\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432\u043f\u043b\u043e\u0442\u044c \u0434\u043e 4 \u0441\u0443\u0442\u043e\u043a \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430. \u0410 \u0432\u043e\u0442 iTunes \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0435\u043d\u044c\u0433\u0438 \u0437\u0430 \u0441\u0443\u0442\u043a\u0438 \u0434\u043e \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043a \u043c\u043e\u043c\u0435\u043d\u0442\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0431\u044b\u043b\u043e \u0442\u043e\u0447\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0430 \u043e\u043d\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, Google \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 400-\u043c \u043a\u043e\u0434\u043e\u043c HTTP. \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0440\u0438 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 HTTP 404.<\/p>\n<pre><code class=\"bash\">$ wget 'https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/not.myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN' -O - --2013-02-11 19:58:24--  https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/not.myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN Resolving www.googleapis.com (www.googleapis.com)... 173.194.71.95, 2a00:1450:4010:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|173.194.71.95|:443... connected. HTTP request sent, awaiting response... 400 Bad Request 2013-02-11 19:58:25 ERROR 400: Bad Request. <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u043c\u0435\u043d\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438:<\/p>\n<pre><code class=\"bash\">$ wget 'https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription\/cancel?access_token=ya29.rEFre5hED-ACCeSs-T0keN' --post-data '' -O - --2013-02-11 20:01:16--  https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription\/cancel?access_token=ya29.rEFre5hED-ACCeSs-T0keN Resolving www.googleapis.com (www.googleapis.com)... 173.194.71.95, 2a00:1450:4010:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|173.194.71.95|:443... connected. HTTP request sent, awaiting response... 204 No Content <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u0434 \u043e\u0442\u0432\u0435\u0442\u0430 HTTP 204, \u0430 \u043f\u0443\u0441\u0442\u043e\u0435 \u0442\u0435\u043b\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043b\u044c\u0441\u0432\u0443\u0442 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u0442\u043c\u0435\u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0435, \u043c\u043e\u0436\u043d\u043e \u0432 \u044d\u0442\u043e\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f<\/p>\n<pre><code class=\"bash\">$ wget 'https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN' -O - --2013-02-11 20:08:47--  https:\/\/www.googleapis.com\/androidpublisher\/v1\/applications\/com.myapp\/subscriptions\/myapp.month.test\/purchases\/subsubsubscripscription?access_token=ya29.rEFre5hED-ACCeSs-T0keN Resolving www.googleapis.com (www.googleapis.com)... 173.194.71.95, 2a00:1450:4010:c04::5f Connecting to www.googleapis.com (www.googleapis.com)|173.194.71.95|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application\/json] Saving to: `STDOUT'      [&lt;=&gt;                                                                                                                                                                                          ] 0           --.-K\/s              {  &quot;kind&quot;: &quot;androidpublisher#subscriptionPurchase&quot;,  &quot;initiationTimestampMsec&quot;: &quot;1357909784285&quot;,  &quot;validUntilTimestampMsec&quot;: &quot;1360588184285&quot;,  &quot;autoRenewing&quot;: false }     [ &lt;=&gt;                                                                                                                                                                                         ] 167         --.-K\/s   in 0s        2013-02-11 20:08:49 (23.5 MB\/s) - written to stdout [167] <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0434\u0430\u0442\u0430 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u0430\u0432\u0442\u043e\u043f\u0440\u043e\u043b\u043e\u043d\u0433\u0430\u0446\u0438\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0439. <br \/>  \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/pix.am\/HY1H.png\" alt=\"image\"\/><\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>buy \u2014 \u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430<\/li>\n<li>verify \u2014 \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438<\/li>\n<li>queue \u2014 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0432\u0435\u0440\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a<\/li>\n<li>periodical verification \u2014 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a. \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0430, \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u041f\u0435\u0440\u0438\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0434\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0443\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043b\u0438\u043c\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a API. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043d \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 <b>15K\/\u0441\u0443\u0442\u043a\u0438<\/b><\/li>\n<li>access token refreshing \u2014 \u0431\u043b\u043e\u043a \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0435\u0441\u043b\u0438 \u043e\u043d \u0443\u0441\u0442\u0430\u0440\u0435\u043b<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0441\u043e\u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0434\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/alxmsl\/GoogleClient\">\u043f\u043e\u043f\u0440\u043e\u0449\u0435<\/a>, \u043d\u043e \u0447\u0442\u043e \u043d\u0430\u0434\u043e<\/li>\n<li><a href=\"https:\/\/code.google.com\/p\/google-api-php-client\/\">\u043f\u043e\u043f\u0438\u0437\u0436\u0435<\/a>, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435<\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/160911\/\"> http:\/\/habrahabr.ru\/post\/160911\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \tIn-app Billing Subscriptions (\u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u043e \u0441\u0447\u0435\u0442\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434 Android. \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u2014 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043e\u043c\u043e\u0448\u043d\u0438\u043a \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043c\u043e\u043d\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 <a href=\"http:\/\/developer.android.com\/google\/play\/billing\/v2\/billing_subscriptions.html\">\u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430\u043c\u0438<\/a> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<ol>\n<li>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043f\u043e\u043a\u0443\u043f\u043a\u0438, \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043a\u0430\u0437\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0442\u043e\u043a\u0435\u043d \u043f\u0440\u043e\u0434\u0430\u0436\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0438\u0445 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440<\/li>\n<li>\u0421\u0435\u0440\u0432\u0435\u0440 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0437\u0430\u043a\u0430\u0437\u0430 \u0432 Google Play, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043d\u0430\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u0431\u043b\u0430\u0433\u0430<\/li>\n<li>\u041f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438, \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0444\u0430\u043a\u0442 \u043f\u0440\u043e\u0434\u043b\u0435\u043d\u0438\u044f \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u043d\u0430\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0431\u043b\u0430\u0433<\/li>\n<\/ol>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0448\u0430\u0433\u0438 \u043f\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u043e\u043d\u0435\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f In-App Billing version 2.  <\/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-160911","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160911","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=160911"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/160911\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=160911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=160911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=160911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}