问题描述
我尝试了解从iTunes服务器获取的收据信息,但找不到相关文档。
I try to understand the receipt information obtained from iTunes server, but could not find relevant documentation.
特别是, unique_identifier
, unique_vendor_identifier
之间的区别是什么? , original_transaction_id
(在WWDC'12会话中声称是事实上的客户ID)和 [[[UIDevice currentDevice] identifierForVendor] UUIDString]
?
Particularly, what's the difference among unique_identifier
, unique_vendor_identifier
, original_transaction_id
(which is claimed, in a WWDC'12 session, to be a de facto customer id) and [[[UIDevice currentDevice] identifierForVendor] UUIDString]
?
{"receipt":
{"original_purchase_date_pst":"...",
"purchase_date_ms":"...",
"unique_identifier":"...",
"original_transaction_id":"...",
"bvrs":"...",
"transaction_id":"...",
"quantity":"...",
"unique_vendor_identifier":"...",
"item_id":"...",
"product_id":"...",
"purchase_date":"...",
"original_purchase_date":"...",
"purchase_date_pst":"...",
"bid":"...",
"original_purchase_date_ms":"..."},
"status":0}`
我希望将此收据存储在我的服务器上的邮件跟踪订阅有效性。所以最好知道我应该使用哪个id作为用户身份的代理。
I wish to store this receipt information on my server to track subscription validity. So it is better to know which id I should use as a surrogate for user identity.
推荐答案
你的软件应该只依赖于Apple在其文档中描述的字段。他们可以随时删除unique_identifier或unique_vendor_identifier,更改其含义或更改其值,而无需告诉您。
Your software should only rely on the fields that Apple describes in their documentation. They could remove unique_identifier or unique_vendor_identifier, change their meaning, or change their values at any time without telling you about it.
您应该关注Apple的关于在服务器将sbuscription内容发送到设备之前使用Apple服务器验证订阅收据。
You should follow Apple's documentation in regard to verifying subscription receipts using Apple's servers before your server transmits the sbuscription content to the device.
这篇关于iOS应用内购买的收据字符串解释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!