在沙盒模式下检查应用内购买自动续订订阅

Check In-app purchase auto renewal subscription in sandbox mode

我的应用程序中的自动续订收据更新出现延迟。

例如,如果用户订阅了 7 天的订阅和一周的免费试用,

所以根据上面的信息,在前 15 分钟内我应该有一个有效的订阅。但有时它 returns 不是有效订阅。

我发现的问题甚至在前 3 分钟后,收据还没有更新,所以当我将到期日期与当前时间进行比较时,它 returns 因为订阅期已到期。

这在沙盒模式中很常见还是我做错了什么?

Testing Auto-Renewable Subscriptions

When testing auto-renewable subscriptions in the test environment, keep in mind that the duration times are compressed. Additionally, test subscriptions only auto-renew a maximum of six times. Table 3-1 lists the compressed duration times.

Table 3-1  Subscription durations for testing
Actual duration
Test duration
1 week    3 minutes
1 month   5 minutes
2 months 10 minutes
3 months 15 minutes
6 months 30 minutes
1 year    1 hour

参考这个url: https://help.apple.com/app-store-connect/#/dev7e89e149d

我是如何解决这个问题的。最初在我的设备中,我没有自动设置时间。我设置的时间比实际时间多 5 分钟。因此,在验证过期日期时,它始终显示为过期订阅。

因为在沙盒模式下测试时,一周的时间非常短(3 分钟)。我猜它给了我错误的信息。

希望这会是 helpful.Thanks。