简体   繁体   English

无法验证服务器上的Android应用内订阅

[英]Unable to verify android in-app subscription on the server

I created an active subscription on Google Developer Console for my Android app, currently in draft mode. 我在Google Developer Console上为我的Android应用创建了一个活动订阅,当前处于草稿模式。 I can purchase the subscription from my test device, but cannot verify the purchaseToken I am getting from the app with Purchase Status API on the server. 我可以从我的测试设备购买订阅,但无法验证purchaseToken我从与服务器上的购买状态API应用程序获得。 I'm getting: 我越来越:

{
  "error": {
    "errors": [
      {
        "domain": "androidpublisher",
        "reason": "developerDoesNotOwnApplication",
        "message": "This developer account does not own the application."
      }
    ],
    "code": 401,
    "message": "This developer account does not own the application."
  }
}

I followed Google Play Developer API Guides for authorization flow so I know I am using a proper access token. 我遵循了Google Play开发者API指南进行授权流程,因此我知道我使用的是正确的访问令牌。 (I checked the token with https://www.googleapis.com/oauth2/v1/tokeninfo and its user is my client id). (我使用https://www.googleapis.com/oauth2/v1/tokeninfo检查了令牌,并且其用户是我的客户ID)。 So I am thinking that Purchase Status API does not recognize the purchases done with an app in draft mode. 因此,我认为购买状态API无法识别在草稿模式下使用某个应用完成的购买。 Also, I cannot see the order in my Google Merchant Console quite probably because of the same reason? 另外,由于相同的原因,我很可能无法在Google Merchant Console中看到订单吗?

Did anyone encounter a similar issue? 有没有人遇到过类似的问题? Is my assumption in previous paragraph correct? 我在上一段中的假设正确吗?

As an extra info, getPurchases in the app returns the purchase in question and my credit card is actually charged. 作为额外的信息,应用程序中的getPurchases返回有问题的购买,而我的信用卡实际上已被扣款。 I am using v3 of in-app billing. 我正在使用v3的应用内结算。

It turned out that the account client gave to me wasn't the root account but instead a secondary account. 原来,客户给我的帐户不是根帐户,而是次要帐户。 Once I got the root account and used it's credentials it worked. 一旦我获得了根帐户并使用了它的凭据,它就会起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM