如何分配skpayment应用程序用户名 [英] how to assign skpayment applicationusername

查看:62
本文介绍了如何分配skpayment应用程序用户名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以分配skpayment应用程序用户名吗?

can we assign skpayment applicationusername?

在应用内购买完成后,我在 SKPayment中得到了一个空的 applicationUsername.

When in app purchase is completed, I got a null applicationUsername in theSKPayment.

如何为 SKPayment applicationUsername 分配一个值?

推荐答案

您不能为 SKPayment 的属性分配值;当创建 SKMutablePayment 实例以提交购买请求时,您的应用程序可以提供代表应用程序用户ID的不透明值.这样,iTunes商店就可以检测到不正常的活动.

You can't assign a value to the property of an SKPayment; When you create the SKMutablePayment instance in order to submit the purchase request, your app can provide an opaque value that represents the application user id. This enables the iTunes store to detect irregular activity.

尽管它的名称为 applicationUsername 属性,但并不意味着要保留 actual 用户名.

Despite its name, the applicationUsername property is not meant to hold the actual username.

请注意,您分配的值在其中可能不存在您在交易队列中收到的 SKPayment .

Note that the value you assigned may not be present in the SKPayment you receive on the transaction queue.

重要

在将支付交易添加到队列时和队列更新交易之间,不能保证applicationUsername属性持续存在.除了提供欺诈检测外,请勿尝试将此属性用于其他目的.

The applicationUsername property is not guaranteed to persist between when you add the payment transaction to the queue and when the queue updates the transaction. Do not attempt to use this property for purposes other than providing fraud detection.

这篇关于如何分配skpayment应用程序用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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