android - 无法使 Android 应用内结算示例应用正常工作

标签 android in-app-purchase in-app-billing

我已尝试根据 http://developer.android.com/google/play/billing/billing_integrate.html#billing-download 中的步骤让应用内结算示例应用正常工作.

我将详细说明我所做的一切 + 在末尾添加日志。 我希望有人能够告诉我我做错了什么。

这是我所做的一切(我知道这很长......但我想确保我没有忘记任何事情):

我将 Dungeons 项目导入到我的工作区中,并将我的 Google 公钥导入到 Security.java 的 base64EncodedPublicKey 变量中。 我从添加到我的 Google 开发者帐户的新应用程序中获得了该公钥。

我按要求更改了应用程序包的名称,因此它没有 com.example 前缀

我构建应用程序并通过“Android 工具”->“导出已签名的应用程序包...”登录

我将该 APK 上传到我在我的开发者帐户中创建的新应用程序(我从中获取公钥的应用程序)

我将应用程序产品添加到新应用程序中,使用与 Dungeons 项目中相同的 ID(sword_001,postion_001)并激活它们。

我在“设置”->“具有测试访问权限的 Gmail 帐户”中为我的开发者帐户添加了一个测试帐户 该帐户不是我的开发者帐户,而是我创建的新帐户。

我在一台设备上安装了签名的应用程序,我将其恢复出厂设置并使用我添加到我的开发者帐户的测试帐户登录。

我的设备

我在没有 SIM 卡的 android 2.3.4 设备上安装了该应用程序(这是我的测试设备)。 谷歌播放版本:3.10.9

结果

当我尝试购买其中一种产品时,出现“商品不可用”错误(实际上我收到了两次)。 我尝试将 DEBUG 设置为 true,现在我收到“从服务器检索信息时出错。[RPC:S-5:AEC-0]”(两次...)

日志:

12-06 07:58:42.255: D/Finsky(1955): [7] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.275: D/Finsky(1955): [7] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.325: D/Finsky(1955): [27] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.335: D/Finsky(1955): [27] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.991: E/Volley(1955): [15] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/details?doc=subs:com.sakal.billingtest.merchant:potion_001
12-06 07:58:44.785: D/Finsky(1955): [1] MarketBillingService.sendResponseCode: Sending response RESULT_ERROR for request 8273178932293834331 to com.sakal.billingtest.merchant.
12-06 07:58:44.785: I/BillingService(3173): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
12-06 07:58:45.551: E/Volley(1955): [14] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/details?doc=inapp:com.sakal.billingtest.merchant:potion_001
12-06 07:58:46.225: D/Finsky(1955): [1] MarketBillingService.sendResponseCode: Sending response RESULT_ERROR for request 2493329704825383333 to com.sakal.billingtest.merchant.
12-06 07:58:46.245: I/BillingService(3173): handleCommand() action: com.android.vending.billing.RESPONSE_CODE

最佳答案

好的,问题解决了。 这只是时间问题...我猜 Google 的服务器需要一段时间才能更新我添加到开发者帐户的内容,但现在可以了,我终于可以从自己那里购买药水了。

现在又出现了新的问题。

  1. 当我选择要购买的商品时,我首先收到“找不到商品”的错误消息,当我点击“确定”时,我在 google play 中看到了该商品。这会发生在其他人身上吗?

  2. 我购买了几件新商品,我在我的 Google Checkout 帐户上看到订单已“发货”,但在计费测试应用程序中,在“您拥有的商品”下我没有看到任何东西...

  3. http://developer.android.com/google/play/billing/billing_integrate.html#billing-download他们建议

refund purchases that are made with test accounts, otherwise the purchases will show up as actual payouts to your merchant account

在哪里可以办理退款?在我的谷歌结帐帐户中,“退款”项目显示为灰色...

有谁知道如何处理这些问题?

关于android - 无法使 Android 应用内结算示例应用正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13739360/

相关文章:

iphone - 我可以在 iPhone/iPad 应用程序中使用 PayPal 吗?

android-应用内计费

android - 尝试订阅产品时需要应用内计费android返回身份验证

java - 访问另一个 Activity 的布局

java - Android 中已弃用的 People 类的替代方案

ios - 应用因 UITabBarController 和应用内购买而崩溃

android - 如何在我的 android 应用程序中实现应用内购买?

Android SeekBar 设置进度值

带有图像的 Android 自定义选项卡选择指示器

安卓/谷歌播放 : do I really need my OWN server to manage inapp billing subscriptions?