I'm currently trying to add IAP to an existing App. To that end, I've added some products and created some test users. The products are recurring subscriptions. The device I'm testing with is an iPhone 4S with iOS 5.1.
我目前正在尝试将IAP添加到现有应用程序中。为此,我添加了一些产品并创建了一些测试用户。这些产品是定期订阅。我正在测试的设备是带有iOS 5.1的iPhone 4S。
I can successfully query the store for my products, and successfully purchase them with my new Test users. The problem I have is that if I try to manage my subscriptions from the Store Settings App, it forces me to Review my account by telling me that "This account has not been used to purchase anything in the AppStore, please review your account and continue." If I review the account, it won't let me continue without supplying CreditCard info.
我可以成功查询商店的产品,并成功购买我的新测试用户。我遇到的问题是,如果我尝试从商店设置应用程序管理我的订阅,它会强制我通过告诉我“此帐户尚未用于在AppStore中购买任何内容来审核我的帐户,请检查您的帐户并继续“。如果我查看该帐户,它将不会让我继续提供CreditCard信息。
The end result is that I can never cancel my test subscriptions. I've deleted Test Users and created new ones, deleted the app and reinstalled it, killed the StoreApp and Settings App, rebooted the device, verified the accounts via email before purchasing, not verified the accounts via email before purchasing...all permutations seem to fail.
最终结果是我永远无法取消我的测试订阅。我删除了测试用户并创建了新用户,删除了应用程序并重新安装了它,杀死了StoreApp和设置应用程序,重新启动了设备,在购买之前通过电子邮件验证了帐户,在购买之前没有通过电子邮件验证帐户...所有排列似乎失败了。
Sometimes I will purchase the same subscription twice which will prompt StoreKit to ask me to manage my subscription settings. Sometimes this results in the previous "Account Review" process, and sometimes it results in an Alert that says "cannot connect to iTunes Store".
有时我会两次购买相同的订阅,这会促使StoreKit要求我管理我的订阅设置。有时这会导致之前的“帐户审核”过程,有时会导致“无法连接到iTunes Store”的警报。
I've run out of ideas for how to continue.
我已经完成了如何继续的想法。
EDIT - Here is the flow of events with any iTunesConnect Test User I create
编辑 - 这是我创建的任何iTunesConnect测试用户的事件流
Initial Subscription
初步认购
Use Existing ID
使用现有ID
Test Account Sign-In
测试帐户登录
Manage Subscription
管理订阅
AppStore Sign-in
AppStore登录
Cannot Connect To AppStore
无法连接到AppStore
Review Your Account
检查您的帐户
Then, the review process forces me to enter CreditCard Info, even though it has my address as "1 Infinite Loop Cupertino, CA" (i.e. it knows this is a test account).
然后,审查过程迫使我输入CreditCard Info,即使它的地址为“1 Infinite Loop Cupertino,CA”(即它知道这是一个测试帐户)。
2 个解决方案
#1
8
There is response by Apple developer.(Rich Kubota) About Subscription testing in sandbox environment.
苹果开发者有回应。(Rich Kubota)关于沙箱环境中的订阅测试。
This is a bug hole in the in-app purchase simulation process. There is no supported way to simulate the cancellation process or to simulate the manage subscription process from a users iTunes app. This limitation also exists with TestFlight version of the app. When you submit the TestFlight build of the app to a user and they test the app, the user account is actually operating in the sandbox environment. You've verified this because the TestFlight app won't appear as a managed app in the TestFlight users iTunes managed subscription section. That's because the app is in the sandbox environment, which the iTunes app knows nothing about. It's been a while since I've responded on this forum, however, the best means to verifying that the application will handle the auto-renewing process is to verify that the app also handles the detection of auto-renewing subscription renewals via the transactionObserver properly. For example if you purchase a 1 mo subscription in the sandbox environment. Then kill the app, wait 6 minutes, then relaunch the app, does the transactionObserver detect that there is an incompleteTransaction (the compressed one month renewal) to be processed. This is very similar to what happens in the case that the user restarts a subscription in the iTunes subscription management page. The transaction is recorded by the iTunes store and an incompleteTransaction for the user account / app bundle ID is enabled. When the app starts up and activates the transactionObserver (via a call to addTransactionObserver) the incompleteTransaction is detected and the updatedTransaction delefgate method called to process the renewal. The app can then validate the applicationReceipt to verify that there is now an in_app array item for the auto-renewing subscription item that has an expire_date greater than the current date and knows that the auto-renewing subscription product_id is active. As for testing that an auto-renewing subscription has been canceled, this again needs iTunes Store server support to simulate. However, receipt validation process works daily and can detect which in_app array item is the most current for the auto-renewing subscription, then detecting if the cancel_date is set tells the app that the subscription was canceled. As a note, just detecting that the cancel_date field for any element can result in a false positive. The user might have canceled an auto-renewing subscription earlier, then decided it wasn't so bad any more and re-purchased the item. For this reason, the logic needs to making sure that the cancel_date field is set in the most current in_app array element to know that the current subscription has actually been canceled. One issue which I'm trying to determine - if a canceled item will have the expire_date moved up to the cancel_date so that an canceled subscription can appear the same as an expired subscription. Seems like the right move - but this information is controlled by the iTunes Store server team. If you want to pursue a mechansim for simulating these features of the production store environment in the sandbox, I suggest that you submit an enhancement request using the Apple Developer Bug Report web page. Please select the iTunesConnect Product for the bug report, as the suggestion is something for the iTunes Store to simulate, not iOS.
这是应用内购买模拟过程中的一个漏洞。没有受支持的方法来模拟取消过程或模拟用户iTunes应用程序的管理订阅过程。应用程序的TestFlight版本也存在此限制。当您向用户提交应用程序的TestFlight版本并测试应用程序时,该用户帐户实际上是在沙箱环境中运行。您已经验证了这一点,因为TestFlight应用程序不会在TestFlight用户iTunes托管订阅部分中显示为托管应用程序。这是因为应用程序位于沙盒环境中,iTunes应用程序对此一无所知。自从我在这个论坛上做出回应已经有一段时间了,但是,确认应用程序将处理自动续订过程的最佳方法是验证应用程序是否还通过transactionObserver正确处理自动续订订阅续订的检测。例如,如果您在沙箱环境中购买了1个月的订阅。然后杀死应用程序,等待6分钟,然后重新启动应用程序,transactionObserver是否检测到有一个incompleteTransaction(压缩的一个月续订)要处理。这与用户在iTunes订阅管理页面中重新启动订阅的情况非常相似。该事务由iTunes商店记录,并且启用了针对用户帐户/应用程序包ID的incompleteTransaction。当应用程序启动并激活transactionObserver时(通过调用addTransactionObserver),将检测到incompleteTransaction,并调用updatedTransaction delefgate方法来处理续订。然后,应用程序可以验证applicationReceipt,以验证现在是否有自动续订订阅项目的in_app数组项目,其expire_date大于当前日期,并且知道自动续订订阅product_id是活动的。至于测试已取消自动续订订阅,这又需要iTunes Store服务器支持来模拟。但是,收据验证过程每天都有效,并且可以检测哪个in_app数组项目是最新的自动续订订阅,然后检测是否设置了cancel_date告诉应用程序订阅已取消。注意,只是检测到任何元素的cancel_date字段都可能导致误报。用户可能先前取消了自动续订订阅,然后再决定它不再那么糟糕并重新购买该项目。因此,逻辑需要确保在最新的in_app数组元素中设置了cancel_date字段,以便知道当前订阅实际上已被取消。我试图确定的一个问题 - 如果取消的项目将expire_date移动到cancel_date,以便取消的订阅看起来与过期的订阅相同。似乎是正确的举动 - 但这些信息由iTunes Store服务器团队控制。如果您想在机箱中使用mechansim来模拟生产商店环境的这些功能,我建议您使用Apple Developer Bug Report网页提交增强请求。请选择iTunesConnect产品以获取错误报告,因为该建议适用于iTunes Store进行模拟,而不是iOS。
#2
46
You can't really manage subscriptions in sandbox, but as Jean-Paul de Ville de Goyet found out on Apple Developer Forums:
你无法真正管理沙盒中的订阅,但正如Jean-Paul de Ville de Goyet在Apple Developer Forums上发现的那样:
1 month subscriptions auto-renew every 5 minutes. So far so good. They auto-renew 5 times and then they stop, so after 25 minutes you'll get the 21006 error. However even when repurchasing the same subscription it will NOT auto-renew again on the same test account since it has already auto-renewed 5 times. So if you want to test renewal and you have been messing with these subscriptions for a while you need to create a new itunes connect test user. This is very annoying honestly and it would be a lot easier if we could just reset the entire purchase history of a test user account.
1个月订阅每5分钟自动续订一次。到现在为止还挺好。他们自动续订5次然后停止,所以25分钟后你会得到21006错误。但是,即使重新购买相同的订阅,它也不会在同一测试帐户上再次自动续订,因为它已经自动续订了5次。因此,如果您想测试续订并且您一直在搞乱这些订阅,您需要创建一个新的itunes connect测试用户。这真的非常烦人,如果我们可以重置测试用户帐户的整个购买历史记录会更容易。
I tested my subscriptions the same way.
我以同样的方式测试了我的订阅。
#1
8
There is response by Apple developer.(Rich Kubota) About Subscription testing in sandbox environment.
苹果开发者有回应。(Rich Kubota)关于沙箱环境中的订阅测试。
This is a bug hole in the in-app purchase simulation process. There is no supported way to simulate the cancellation process or to simulate the manage subscription process from a users iTunes app. This limitation also exists with TestFlight version of the app. When you submit the TestFlight build of the app to a user and they test the app, the user account is actually operating in the sandbox environment. You've verified this because the TestFlight app won't appear as a managed app in the TestFlight users iTunes managed subscription section. That's because the app is in the sandbox environment, which the iTunes app knows nothing about. It's been a while since I've responded on this forum, however, the best means to verifying that the application will handle the auto-renewing process is to verify that the app also handles the detection of auto-renewing subscription renewals via the transactionObserver properly. For example if you purchase a 1 mo subscription in the sandbox environment. Then kill the app, wait 6 minutes, then relaunch the app, does the transactionObserver detect that there is an incompleteTransaction (the compressed one month renewal) to be processed. This is very similar to what happens in the case that the user restarts a subscription in the iTunes subscription management page. The transaction is recorded by the iTunes store and an incompleteTransaction for the user account / app bundle ID is enabled. When the app starts up and activates the transactionObserver (via a call to addTransactionObserver) the incompleteTransaction is detected and the updatedTransaction delefgate method called to process the renewal. The app can then validate the applicationReceipt to verify that there is now an in_app array item for the auto-renewing subscription item that has an expire_date greater than the current date and knows that the auto-renewing subscription product_id is active. As for testing that an auto-renewing subscription has been canceled, this again needs iTunes Store server support to simulate. However, receipt validation process works daily and can detect which in_app array item is the most current for the auto-renewing subscription, then detecting if the cancel_date is set tells the app that the subscription was canceled. As a note, just detecting that the cancel_date field for any element can result in a false positive. The user might have canceled an auto-renewing subscription earlier, then decided it wasn't so bad any more and re-purchased the item. For this reason, the logic needs to making sure that the cancel_date field is set in the most current in_app array element to know that the current subscription has actually been canceled. One issue which I'm trying to determine - if a canceled item will have the expire_date moved up to the cancel_date so that an canceled subscription can appear the same as an expired subscription. Seems like the right move - but this information is controlled by the iTunes Store server team. If you want to pursue a mechansim for simulating these features of the production store environment in the sandbox, I suggest that you submit an enhancement request using the Apple Developer Bug Report web page. Please select the iTunesConnect Product for the bug report, as the suggestion is something for the iTunes Store to simulate, not iOS.
这是应用内购买模拟过程中的一个漏洞。没有受支持的方法来模拟取消过程或模拟用户iTunes应用程序的管理订阅过程。应用程序的TestFlight版本也存在此限制。当您向用户提交应用程序的TestFlight版本并测试应用程序时,该用户帐户实际上是在沙箱环境中运行。您已经验证了这一点,因为TestFlight应用程序不会在TestFlight用户iTunes托管订阅部分中显示为托管应用程序。这是因为应用程序位于沙盒环境中,iTunes应用程序对此一无所知。自从我在这个论坛上做出回应已经有一段时间了,但是,确认应用程序将处理自动续订过程的最佳方法是验证应用程序是否还通过transactionObserver正确处理自动续订订阅续订的检测。例如,如果您在沙箱环境中购买了1个月的订阅。然后杀死应用程序,等待6分钟,然后重新启动应用程序,transactionObserver是否检测到有一个incompleteTransaction(压缩的一个月续订)要处理。这与用户在iTunes订阅管理页面中重新启动订阅的情况非常相似。该事务由iTunes商店记录,并且启用了针对用户帐户/应用程序包ID的incompleteTransaction。当应用程序启动并激活transactionObserver时(通过调用addTransactionObserver),将检测到incompleteTransaction,并调用updatedTransaction delefgate方法来处理续订。然后,应用程序可以验证applicationReceipt,以验证现在是否有自动续订订阅项目的in_app数组项目,其expire_date大于当前日期,并且知道自动续订订阅product_id是活动的。至于测试已取消自动续订订阅,这又需要iTunes Store服务器支持来模拟。但是,收据验证过程每天都有效,并且可以检测哪个in_app数组项目是最新的自动续订订阅,然后检测是否设置了cancel_date告诉应用程序订阅已取消。注意,只是检测到任何元素的cancel_date字段都可能导致误报。用户可能先前取消了自动续订订阅,然后再决定它不再那么糟糕并重新购买该项目。因此,逻辑需要确保在最新的in_app数组元素中设置了cancel_date字段,以便知道当前订阅实际上已被取消。我试图确定的一个问题 - 如果取消的项目将expire_date移动到cancel_date,以便取消的订阅看起来与过期的订阅相同。似乎是正确的举动 - 但这些信息由iTunes Store服务器团队控制。如果您想在机箱中使用mechansim来模拟生产商店环境的这些功能,我建议您使用Apple Developer Bug Report网页提交增强请求。请选择iTunesConnect产品以获取错误报告,因为该建议适用于iTunes Store进行模拟,而不是iOS。
#2
46
You can't really manage subscriptions in sandbox, but as Jean-Paul de Ville de Goyet found out on Apple Developer Forums:
你无法真正管理沙盒中的订阅,但正如Jean-Paul de Ville de Goyet在Apple Developer Forums上发现的那样:
1 month subscriptions auto-renew every 5 minutes. So far so good. They auto-renew 5 times and then they stop, so after 25 minutes you'll get the 21006 error. However even when repurchasing the same subscription it will NOT auto-renew again on the same test account since it has already auto-renewed 5 times. So if you want to test renewal and you have been messing with these subscriptions for a while you need to create a new itunes connect test user. This is very annoying honestly and it would be a lot easier if we could just reset the entire purchase history of a test user account.
1个月订阅每5分钟自动续订一次。到现在为止还挺好。他们自动续订5次然后停止,所以25分钟后你会得到21006错误。但是,即使重新购买相同的订阅,它也不会在同一测试帐户上再次自动续订,因为它已经自动续订了5次。因此,如果您想测试续订并且您一直在搞乱这些订阅,您需要创建一个新的itunes connect测试用户。这真的非常烦人,如果我们可以重置测试用户帐户的整个购买历史记录会更容易。
I tested my subscriptions the same way.
我以同样的方式测试了我的订阅。