Android Market In-App-Purchase:如何获得用户支付的货币?

Android Market In-App-Purchase: How to get the currency a user will pay in?(Android Market In-App-Purchase:如何获得用户支付的货币?)

本文介绍了Android Market In-App-Purchase:如何获得用户支付的货币?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 In-App-Purchase 的 Android 应用来迎合国际受众,因此我希望以不同的货币付款.当然我想用用户的当地货币显示要购买的物品,但我真的不知道怎么做.

I have an Android app using In-App-Purchase that caters to an international audience, so I expect payments in different currencies. Of course I would like to show the items for purchase with the user's local currency, but I don't really know how.

使用用户的地区或语言似乎是一个不好的指标,因为货币似乎取决于用户正在使用的市场帐户的地区,而不是设备设置.

Using the region or language of a user seems like a bad indicator, as the currency seems to depend on the region of the Market account the user is using and not on the device settings.

我如何知道用户将使用哪种货币付款?

How can I find out which currency a user will pay in?

谢谢.

推荐答案

截至 IAB 版本 3,可购买商品的 SKU 详细信息包括格式化的价格,其中包括用户将支付的货币(与他们的 Google Play 商店对应的货币):

As of IAB Version 3, the SKU details for the purchasable item include a formatted price, which includes the currency the user would pay in (the corresponding currency to their Google Play store):

price 值的一些示例(不是来自真实 SKU):

Some examples of values of price (not from a real SKU):

  • 3,99 欧元
  • 2.99 英镑
  • 4.99 美元

编辑:我更新了 SKU 详细信息表,现在包括有关 price_currency_code 字段的信息.

EDIT: I've updated the SKU details table, now including information about the price_currency_code field.

这篇关于Android Market In-App-Purchase:如何获得用户支付的货币?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Android Market In-App-Purchase:如何获得用户支付的货币?

基础教程推荐