Android 中的错误订阅到期日期
Wrong subscription expiry date in Android
我已经在我的 Android 应用程序中实施了订阅购买,并且一切正常,除了我在验证订阅状态时没有得到有效的到期日期。为了验证订阅的状态,我 运行 我的服务器上的 cron 任务(在 PHP 中) Android Google API 并相应地更新我的数据库.
我收到 Google API 的 JSon 回复,看起来像这样:
Google_Service_AndroidPublisher_SubscriptionPurchase Object
(
[internal_gapi_mappings:protected] => Array
(
)
[autoRenewing] => 1
[expiryTimeMillis] => 1426085467680
[kind] => androidpublisher#subscriptionPurchase
[startTimeMillis] => 1425999079640
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
)
"startTimeMillis" 给出了正确的值(用户购买订阅的日期),但是 "expiryTimeMillis" 是错误的。它应该是 "startTimeMillis" + 1 个月,它给出 "startTimeMillis" + 恰好 1 天...
你觉得哪里不对?
谢谢
已解决!事实上,我刚刚在 Google API 的文档中读到:"Test subscription purchases recur daily, regardless of the product's subscription period."
我已经在我的 Android 应用程序中实施了订阅购买,并且一切正常,除了我在验证订阅状态时没有得到有效的到期日期。为了验证订阅的状态,我 运行 我的服务器上的 cron 任务(在 PHP 中) Android Google API 并相应地更新我的数据库.
我收到 Google API 的 JSon 回复,看起来像这样:
Google_Service_AndroidPublisher_SubscriptionPurchase Object
(
[internal_gapi_mappings:protected] => Array
(
)
[autoRenewing] => 1
[expiryTimeMillis] => 1426085467680
[kind] => androidpublisher#subscriptionPurchase
[startTimeMillis] => 1425999079640
[modelData:protected] => Array
(
)
[processed:protected] => Array
(
)
)
"startTimeMillis" 给出了正确的值(用户购买订阅的日期),但是 "expiryTimeMillis" 是错误的。它应该是 "startTimeMillis" + 1 个月,它给出 "startTimeMillis" + 恰好 1 天...
你觉得哪里不对?
谢谢
已解决!事实上,我刚刚在 Google API 的文档中读到:"Test subscription purchases recur daily, regardless of the product's subscription period."