且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS应用内购买中的收据验证会返回多个交易

更新时间:2022-12-31 10:01:20

我认为您已经在应用购买中实现了自动更新. 您的回答是正确的.

I think you have implemented auto renewable in app purchase. Your response is proper.

为什么我要使用相同的ID进行多次交易

就像您在每5分钟执行一次自动更新产品的响应交易中一样(沙盒环境在5分钟内更新产品,而不是在App Store中为1个月).

As in your response transaction performed for auto renew product at every 5 minutes(Sandbox environment renew product in 5 minutes instead of 1 month in App Store).

此响应是否正确

如果正确,则要验证哪个ID

您必须获取商品ID为tfc.premium.subscription的所有交易,然后获取最后一个对象并将其用作您的最新/最后交易.

You have to get all the transaction for your product id tfc.premium.subscription and then grab last object and use it as your latest/last transaction.

阅读此

Read this Apple Document for proper understanding.

自动续订订阅的行为在 测试环境和生产环境.

The behavior of auto-renewable subscriptions differs between the testing environment and the production environment.

在测试环境中,订阅续订发生在 加速费率,并且自动续订的订阅最多可以续订 每天六次.这使您能够测试您的应用如何处理 订阅续订,订阅失效和订阅历史记录 包括差距.请参阅 iTunes Connect的应用内购买配置指南,以了解有关 测试的订阅期限.

In the testing environment, subscription renewals happen at an accelerated rate, and auto-renewable subscriptions renew a maximum of six times per day. This enables you to test how your app handles a subscription renewal, a subscription lapse, and a subscription history that includes gaps. See Testing Auto-Renewable Subscriptions in the In-App Purchase Configuration Guide for iTunes Connect to learn about the subscription durations for testing.

由于加快了过期和续订速度, 订阅可以在系统尝试续订之前到期 订阅,因此在订阅期间会出现一些延迟.这样的 由于多种原因,生产中也可能发生失误 确保您的应用正确处理了它们.

Because of the accelerated expiration and renewal rates, a subscription can expire before the system tries to renew the subscription, leaving a small lapse in the subscription period. Such lapses are also possible in production for a variety of reasons—make sure your app handles them correctly.