ios应用内订阅 - original_transaction_id何时更改? [英] ios in-app subscriptions - when does original_transaction_id change?

查看:3384
本文介绍了ios应用内订阅 - original_transaction_id何时更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当有自动续订订阅时,请考虑以下型号情况:

When there is an auto-renewing subscription, consider the following model situation:


  • 用户购买1个月订阅,比如1月份

  • 取消续订

  • 然后等到3月(> 1个月)并再次购买相同的订阅

AppStore是否会(在收据验证时)为新购买返回新的 original_transaction_id ?或者改写,可以 original_transaction_id 用于分组收据以确定用户有效订阅的时间间隔吗?

Does the AppStore return (on receipt verification) a new original_transaction_id for the new purchase? Or rephrased, can original_transaction_id be used for grouping receipts to determine intervals when user had active subscription?

因为在沙盒中,当存在这样的模拟情况时,它始终从第一次购买给定订阅返回 original_transaction_id ,无论是否存在用户未进行有效订阅的某些间隔。当多次购买订阅时,其间隔时间,沙箱收据验证返回 original_purchase_date 首次购买, expires_date 上次购买。

Because in sandbox, when there is a simulated situation like this, it returns always original_transaction_id from the FIRST purchase of given subscription, regardless if there were some intervals where user had not active subscription. When there was multiple purchases of subscription with intervals between, when it was expired, Sandbox receipt verification returns original_purchase_date of first purchase, and expires_date of last purchase.

我的问题是,要在实时环境中测试它,我必须等待一个多月才能让订阅过期以测试确切的行为。

My problem is, to test it in live enviroment, I would have to wait more than a month to let subscriptions expire to test the exact behaviour.

推荐答案

Original_transaction_id是(自动续订订阅的续订链中的所有收据对此字段都具有相同的值。)

Original_transaction_id is (All receipts in a chain of renewals for an auto-renewable subscription have the same value for this field.)

Expires_date是(订阅的到期日期,表示为自1970年1月1日,格林威治标准时间00:00:00以来的毫秒数。)

Expires_date is (The expiration date for the subscription, expressed as the number of milliseconds since January 1, 1970, 00:00:00 GMT.)

参考: https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW12

为什么你想在真实情况下测试它,你可以按照苹果公司的gui在模拟环境中进行测试详见 https://developer.apple.com /library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html

Why do you want to test it in real scenario when you may test in it simulated environment as per apple's guidelines at https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/TestingInAppPurchases.html ?

这篇关于ios应用内订阅 - original_transaction_id何时更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆