Android应用内结算购买 - 找不到商品

时间:2014-06-22 16:01:15

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

我已使用此plugin针对phonegap实施了应用内结算V3。 当我购买我的商品时,google play会返回以下内容

The item that you were attempting to purchase could not be found

这很可能是某个地方的设置问题,但我找不到可能出现的问题。

这是我到目前为止所做的:

  • 在Google Play上创建并以价格
  • 激活的项目
  • 查询的商品ID与Google Play上的商品ID相同
  • 在Alpha频道上载了我的apk(也尝试了测试频道),它在Alpha'草稿中。状态
  • 等了几个小时(48小时!)
  • 使用其他Gmail帐户测试购买
  • 测试帐户电子邮件地址位于许可证白名单
  • 还创建了一个Google论坛并在其中添加了测试用户
  • 在两个不同设备上测试应用
  • APK已签名并上传谷歌播放。设备上安装了相同的版本
  • 尝试使用托管和非托管产品
  • 购买项目android.test.purchased作品
  • 配置中的结算密钥与Google Play上的结算密钥相同
  • 设备上的Google Play版本:4.8.20

这是我从logcat获得的堆栈,最后是奇怪的错误,不确定它是否相关:

    D/CordovaLog(32254): file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js: Line 6 : InAppBilling[js]: setup ok
    I/Web Console(32254): InAppBilling[js]: setup ok:6
    D/CORDOVA_BILLING(32254): init start
    D/CORDOVA_BILLING(32254): Creating IAB helper.
    D/CORDOVA_BILLING(32254): Starting setup.
    D/IabHelper(32254): Starting in-app billing setup.
    W/PluginManager(32254): THREAD WARNING: exec() call to InAppBillingPlugin.init blocked the main thread for 21ms. Plugin should use CordovaInterface.getThreadPool().
    D/IabHelper(32254): Billing service connected.
    D/IabHelper(32254): Checking for in-app billing 3 support.
    D/Finsky  (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/IabHelper(32254): In-app billing version 3 supported for com.montreal.deps
    D/Finsky  (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/IabHelper(32254): Subscriptions AVAILABLE.
    D/CORDOVA_BILLING(32254): Setup finished.
    D/CORDOVA_BILLING(32254): Setup successful. Querying inventory.
    D/IabHelper(32254): Starting async operation: refresh inventory
    D/IabHelper(32254): Querying owned items, item type: inapp
    D/IabHelper(32254): Package name: com.montreal.deps
    D/IabHelper(32254): Calling getPurchases with continuation token: null
    D/Finsky  (32296): [2450] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/Finsky  (32296): [2450] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/IabHelper(32254): Owned items response: 0
    D/IabHelper(32254): Continuation token: null
    D/IabHelper(32254): Querying SKU details.
    D/IabHelper(32254): queryPrices: nothing to do because there are no SKUs.
    D/IabHelper(32254): Querying owned items, item type: subs
    D/IabHelper(32254): Package name: com.montreal.deps
    D/IabHelper(32254): Calling getPurchases with continuation token: null
    D/Finsky  (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/Finsky  (32296): [2476] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/IabHelper(32254): Owned items response: 0
    D/IabHelper(32254): Continuation token: null
    D/IabHelper(32254): Querying SKU details.
    D/IabHelper(32254): queryPrices: nothing to do because there are no SKUs.
    D/IabHelper(32254): Ending async operation: refresh inventory
    D/CORDOVA_BILLING(32254): Inside mGotInventoryListener
    D/CORDOVA_BILLING(32254): Query inventory was successful.
    D/CordovaLog(32254): file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js: Line 6 : InAppBilling[js]: buy called!
    I/Web Console(32254): InAppBilling[js]: buy called!:6
    D/IabHelper(32254): Starting async operation: launchPurchaseFlow
    D/IabHelper(32254): Constructing buy intent for deps.item.test, item type: inapp
    D/Finsky  (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/Finsky  (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/Finsky  (32296): [2451] InAppBillingUtils.getPreferredAccount: com.montreal.deps: Account from first account - [sdkNy9OtgBRMmwDfMof3YGfedjA]
    D/IabHelper(32254): Launching buy intent for deps.item.test. Request code: 10001
    W/PluginManager(32254): THREAD WARNING: exec() call to InAppBillingPlugin.buy blocked the main thread for 28ms. Plugin should use CordovaInterface.getThreadPool().
    D/CordovaActivity(32254): Paused the application!
    D/CordovaWebView(32254): Handle the pause
    D/FirewallPolicy( 2119): getURLFilterEnabled(true)
    D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
    D/WebView (32254): loadUrlImpl: called
    D/webcore (32254):  CORE loadUrl: called
    D/webkit  (32254): Firewall not null
    D/FirewallPolicy( 2119): getURLFilterEnabled(true)
    D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
    D/webkit  (32254): euler: isUrlBlocked = false
    D/FirewallPolicy( 2119): getURLFilterEnabled(true)
    D/FirewallPolicy( 2119): isUrlBlocked - Policy disabled
    I/ClipboardServiceEx( 2119): Send intent for dismiss clipboard dialog inside hideCurrentInputLocked() !
    D/WindowManager( 2119): PhoneWindowManager: focusChangedLw
    D/KeyguardViewMediator( 2119): setHidden false
    D/CordovaLog(32254): file:///android_asset/www/app/js/controllers/payment.js: Line 12 : response then payment
    I/Web Console(32254): response then payment:12
    D/CordovaLog(32254): file:///android_asset/www/app/js/controllers/payment.js: Line 13 : OK
    I/Web Console(32254): OK:13
    D/Finsky  (32296): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2.
    E/Finsky  (32296): [2472] FileBasedKeyValueStore.delete: Attempt to delete 'paramsopT-pzzx02i69KNTNDgLqg' failed!

非常感谢你发现问题,因为我已经和它斗争了好几天了。

1 个答案:

答案 0 :(得分:1)

草稿状态的APK不再适用于测试应用内结算。您需要在alpha或beta频道中发布它。

参考:http://developer.android.com/google/play/billing/billing_testing.html#draft_apps