我正在根据服务器端验证我的 Google Play Android 订阅购买
https://developers.google.com/android-publisher/archive/v1/purchases/get
我遇到了 initiationTimestampMsec
与过去的值不同的情况。
https://developers.google.com/android-publisher/archive/v1/purchases#resource
我遇到这个问题是因为我有一个特定购买的测试用例来验证初始时间始终相同。
原始初始化时间为 1366679371220
(2013 年 4 月 23 日星期二 01:09:31 GMT)。这个测试用例总是通过并且代码是根据 git blame
not touched since
2013-04-28.
当我现在运行测试时,THE SAME 购买的初始时间为 1400807382943
(2014 年 5 月 23 日星期五 01:09:42 GMT),因为它是 initiationTimestampMsec
。有趣的是注意到当天的购买时间和一天中的不同时间。
我发出的GET
请求是
https://www.googleapis.com/androidpublisher/v1/applications/<app_id>/subscriptions/product_name/purchases/<purchase_token>?access_token=<access_token>
购买本身使用我的测试用例 (1366679371220
) 的初始时间戳记录到我的生产数据库
编辑: 在与谷歌进行电子邮件对话后,这似乎是他们知道的一个错误。
最佳答案
我刚刚发现,当用户通过 Google Play 应用取消订阅时,“initiationTimestampMsec”(在 v1 和 v1.1 中)或“startTimeMillis”(在 v2 中)会随着取消时间更新。也许这就是您的情况?
几分钟前我刚刚创建了一个相关问题,也许您可以在续订时帮助我了解此字段的值。 Google Play Developer API: "startTimeMillis" is updated when it should not
这个答案应该作为评论,但我还没有足够的声誉来这样做。对不起。
关于android - Google Play Android Developer API 更改同一次购买的初始购买时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24090719/