在应用内购买 - 订阅 - 不基于Apple Id [英] In app purchase - Subscription - not based on Apple Id

查看:196
本文介绍了在应用内购买 - 订阅 - 不基于Apple Id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,如果用户在应用购买中购买某物,则应反映在用户拥有的所有设备中(基于登录的苹果ID)。

I understand that If a user buy something using in app purchase, it should reflect in all the devices owned by the user ( based on logged in apple id ).

但在我的情况下,我需要用我们自己的用户名而不是苹果ID来处理它。也就是说,如果用户在多个设备中登录我们的应用程序,我们需要自己处理订阅。

But in my case I need to handle it with "our own username and not apple id". That is if user logged in to our application in multiple device, We need to handle subscription all our own.

只是为了澄清,即使用户登录到两个设备同样的苹果ID,但我们的应用程序中的用户不同,只有实际购买我们订阅的用户名才能获得扩展访问权限。

Just to clarify, even if user logged in to two devices with same apple id but different user in our application, only the username who actually bought our subscription should get the extended access.

我认为不可更新的订阅是我们需要的,但是在阅读时,我认为这样的订阅应该反映在由相同苹果ID注册的所有设备中。

I believed that non-renewable subscription is what We need, but on reading a bit, I think such a subscription should reflect in all devices registered by same apple id.

所以如果有人可以帮助我选择它会很棒我应该为这种情况选择哪种应用内购买。

So it would be great if someone could help me to select which kind of in app purchase should i choose for this scenario.

任何帮助表示感谢。谢谢。

Any help appreciated. Thanks.

推荐答案

对于这种应用程序购买,最好是非消费品。在这种情况下,用户不必一次又一次地购买产品。关于使用您自己的用户名的问题,您可以维护本地服务器中单个用户的购买记录。为此,您可以在验证来自本地服务器的交易收据时,您将从应用程序购买服务器中的apple获得每次成功交易。要验证收据,您必须以base64编码格式将收据发送到本地服务器,然后本地服务器将连接到本地服务器验证收据的苹果服务器,同时将收据发送到本地服务器发送用户的会话ID如果验证收据成功,则本地服务器会将购买信息存储在本地数据库中。如果用户也将登录第二个设备,您本地服务器将知道该用户已经购买了这么多项目,您可以将数据存入用户已登录的所有设备中。

The kind of in app purchase for this would be preferable is non consumable. In this case user don't have to buy the product again and again. Regarding your question with your own username you can maintain the record of purchase for single user in your local server. For that what you can do is while verifying the transaction receipt from your local server which you will get on every successful transaction from apple in app purchase server. For verifying the receipt you have to send the receipt to you local server in base64 encoded format then your local server will connect to the apple server you local server will verify the receipt while sending the receipt to your local server send the session id of the user to your local server if the verification of the receipt is successful then you local server will store the purchase information in local data base. If user will login in the second device also you local server will know that this user have purchase this many item and you can sink the data in all the device in which user have logged in.

这篇关于在应用内购买 - 订阅 - 不基于Apple Id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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