iOS IAP in_app field in receipt

筅森魡賤 提交于 2020-01-25 09:26:04

问题


There's an in_app field as an array in a receipt.

When does it return an array containing more than 1 element?

And what's the index of the latest purchased item?


回答1:


From the documentation

in_app:

In the JSON file, the value of this key is an array containing all in-app purchase receipts based on the in-app purchase transactions present in the input base-64 receipt-data. For receipts containing auto-renewable subscriptions, check the value of the latest_receipt_info key to get the status of the most recent renewal.

The in-app purchase receipt for a non-consumable product, auto-renewable subscription, non-renewing subscription, or free subscription remains in the receipt indefinitely.

So, if you have auto-renewing subscriptions or the user purchases multiple non-consumable or non-renewing subscription items you can expect this array to grow over time.

For auto-renewing subscriptions, the details of the most recent renewal is in the latest_receipt_info key.

Although it isn't documented, from observation it seems that the last item in the array is the most recent purchase, but you should check the purchase_date field to be sure.



来源:https://stackoverflow.com/questions/47131027/ios-iap-in-app-field-in-receipt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!