自动续订 iTunes 订阅 - 沙盒环境限制及字段模拟问题
I just wrapped up my first implementation of auto-renewable subscription functionality, with the goal of covering every possible scenario and handling every field in the subscription receipt. Unfortunately, there are three fields I couldn't simulate at all in the In-App Purchase sandbox environment:
price_consent_statuscancellation_reasoncancellation_date
The price_consent_status Roadblock
For price_consent_status specifically, I spent a lot of time trying to figure out how to trigger a subscription price change—since that's the scenario this field relates to. I could set up introductory prices without any problem, but there's simply no option to configure an actual subscription price modification in the sandbox. After testing all available workflows and checking sandbox limitations, it seems this is a restriction of the current sandbox environment; there's no way to initiate a price change that would populate this field for testing purposes.
I ended up having to rely on mock data and rigorous code reviews to ensure my implementation handles potential values for these untestable fields, even though I couldn't validate them directly in the sandbox.
内容的提问来源于stack exchange,提问作者TRG

