简体   繁体   English

Android应用内结算(IAB版本3)

[英]Android in-app billing (IAB Version 3)

I have tried the sample application of in-app billing for version 3 http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample ? 我已经尝试了版本3 http://developer.android.com/training/in-app-billing/preparing-iab-app.html#GetSample的应用内结算示例应用程序? App is TrivialDrive. 应用是TrivialDrive。 When i tried to test the app by following the steps in README. 当我尝试按照自述文件中的步骤测试应用程序时。 file. 文件。 After uploading it to market as draft and tried to purchase a in-app using a test device i received a eror message that User is not eligible for this purchase . 在将其作为草稿上传到市场并尝试使用测试设备购买应用程序内购后,我收到一条错误消息,提示用户不符合此购买条件 Why iam receiving this message Thanks in advance 为什么我会收到此消息?

Edit: 编辑:

The actual reason for this error: 此错误的实际原因:

If an unauthorized user try to purchase an item them this message should appear. 如果未经授权的用户尝试购买商品,则会出现此消息。

So if the App is not published, a non test user should get this error while try to purchase. 因此,如果该应用未发布,则非测试用户应在尝试购买时收到此错误。

I realized that, Google play takes time to update the changes in app store. 我意识到,Google Play需要花一些时间来更新应用商店中的更改。 So you can not expect the changes immediately. 因此,您不能立即期望更改。 Rather you should wait, in my case it took average 2/3 hours. 相反,您应该等待,就我而言,这平均需要2/3个小时。

Still there may be some unknown error, which I could not figure. 仍然可能存在一些未知错误,我无法确定。

My Cases: 我的案例:

First I was trying to purchase from my test device still got this error, But after waiting some time I didn't get this error. 首先,我尝试从测试设备购买时仍然出现此错误,但是等待了一段时间后,我没有收到此错误。 So I think the time was reason here. 所以我认为时间是这里的原因。

Secondly I was trying from a non test device, which was an unauthorized device as the app was not published. 其次,我尝试使用非测试设备,该设备是未经授权的设备,因为该应用未发布。

I finally got this to work by changing the "License Test Resonse" to "LICENSED" on the User Accounts and Rights Tab. 我终于通过在“用户帐户和权限”选项卡上将“许可测试共鸣”更改为“已许可”来使其工作。

====================== edit ================================= =====================编辑=========================== ======

OK Here are the exact instructions to find this setting: 确定这里是找到此设置的确切说明:

In the Google Play Developer Console, using the "new design" there is on the left "All applications" "Reports" and "Settings." 在Google Play开发者控制台中,使用“新设计”在左侧的“所有应用程序”,“报告”和“设置”中。 Choose Settings. 选择设置。

There is a License Testing box. 有一个许可证测试框。 You must enter the gmail address of the account that is on the test device. 您必须输入测试设备上帐户的gmail地址。 This cannot be the same as the email address of the developer account. 该名称不能与开发者帐户的电子邮件地址相同。 (You cannot buy from yourself.) (您不能向自己购买。)

Below License Testing, there is a "License Test Response" Dropdown. 在许可测试下方,有一个“许可测试响应”下拉列表。 Choose LICENSED. 选择许可。

I suppose that this is described in the docs someplace, but I missed it :) 我想这在某个地方的文档中有描述,但是我错过了:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM