如何在应用内结算交易中检索客户的电子邮件?

发布于 2024-12-24 02:51:21 字数 289 浏览 2 评论 0原文

随 PURCHASE_STATE_CHANGED 意图返回的 JSON 字段 包含非常有用的信息,但我感兴趣的一项没有列出:客户的电子邮件地址。

有没有办法使用 In-App Billing API 来检索它?

如果没有,是否有办法检索客户的其他唯一标识符,以便交易可以与客户而不是设备关联?

The JSON fields that are returned with a PURCHASE_STATE_CHANGED intent contain very useful information, but one piece that I am interested in is not listed: customer's email address.

Is there a way to retrieve it, using In-App Billing API?

If not, is there a way to retrieve some other unique identifier for the customer, so that a transaction can be associated with the customer, not the device?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不寐倦长更 2024-12-31 02:51:21

如果您运行的是 Android 2.x 及更高版本,也许您可​​以使用所有者的电子邮件地址

这样做的缺点是它需要清单中的 android.permission.GET_ACCOUNTS 。您的应用程序需要的权限越多,您就越有可能吓到应用程序的潜在用户...

另请注意,“所有者的电子邮件地址”可能与“购买帐户电子邮件地址”不同(特别是因为 蜂窝3.0

If you are running Android 2.x and up, maybe you can get a way with the owner's email address?

The downside of this is that it requires android.permission.GET_ACCOUNTS in the manifest. The more permissions your apps requires, the more likely you are to scare prospective users of your app...

Also note that "owner's email address" might not be the same as "purchase account email address" (especially since Honeycomb 3.0)

原来是傀儡 2024-12-31 02:51:21

我也在努力解决这个问题。所以我想到的是使用随机数值。理想情况下,您应该在从应用程序发送应用内计费请求之前在服务器端生成随机数,因此在这种情况下,您可以将随机数值连接到客户的电子邮件。

我知道这有点笨拙,所以如果有人知道更好的解决方案,我希望看到它。

I was struggling to solve this problem too. So what I've come to is using nonce value. Ideally you should generate nonce on the server side prior to sending IN-APP Billing request from your app, so in this case you can connect nonce value to customer's email.

I understand that it's a little bit clunky so if anyone knows better solution I'd like to see it to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文