【问题标题】:Google Play - Error "subscriptionNotOwnedByUser" when acknowledging purchase token of a subscriptionGoogle Play - 确认订阅的购买令牌时出现错误“subscriptionNotOwnedByUser”
【发布时间】:2019-09-13 07:29:07
【问题描述】:

在使用 Google 的开发人员 API 进行服务器端订阅验证确认订阅升级/降级时,不断收到来自 Google 的错误“subscriptionNotOwnedByUser”。

购买令牌是直接从 Google 的实时开发者通知收到的通知中提取的。尝试搜索此错误但没有运气。

感谢您的帮助。

错误信息:

{
  "error": {
    "errors": [
      {
        "domain": "androidpublisher",
        "reason": "subscriptionNotOwnedByUser",
        "message": "The subscription purchase not is owned by the user.",
      }
    ],
    "code": 400,
    "message": "The subscription purchase not is owned by the user."
  }
}

【问题讨论】:

标签: android in-app-subscription


【解决方案1】:

订阅自动续订时,您无需再次确认。因为在订阅购买时已经确认了相同的购买令牌。因此,当您确认已确认的订阅时,您会收到此错误。

我遇到了同样的错误,所以我在续订时删除了确认部分。

【讨论】:

  • 如何区分订阅是否续订?通过检查 PaymentState 为 2 即订阅状态是否为试用?
  • 在通知中,您有 notificationType 字段。通过此字段,您可以识别新的订阅购买或购买续订等。 developer.android.com/google/play/billing/rtdn-reference#sub
  • 感谢您的回复。我们之前没有在服务器端收到通知,稍后会收到。我们很想知道 SUBSCRIPTION_PUR​​CHASED 是否包含免费试用?
猜你喜欢
  • 1970-01-01
  • 2013-03-31
  • 1970-01-01
  • 2022-06-19
  • 2019-05-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-16
相关资源
最近更新 更多