收据中的iOS IAP in

编程入门 行业动态 更新时间:2024-10-09 14:23:11
本文介绍了收据中的iOS IAP in_app字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

收据中有一个in_app字段作为数组.

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?

推荐答案

来自文档

in_app :

在JSON文件中,此键的值是一个数组,其中包含基于输入的base-64收据数据中存在的应用程序内购买交易的所有应用程序内购买收据.对于包含自动续订订阅的收据,请检查last_receipt_info键的值以获取最新续订的状态.

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.

对于自动续订,最新续订的详细信息位于 latest_receipt_info 键中.

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

尽管没有记录,但从观察来看,数组中的最后一项似乎是最近购买的商品,但是您应该检查 purchase_date 字段以确保正确.

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.

更多推荐

收据中的iOS IAP in

本文发布于:2023-11-26 09:06:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1633489.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:收据   iOS   IAP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!