我已使用此plugin针对phonegap实施了应用内结算V3。 当我购买我的商品时,google play会返回以下内容
The item that you were attempting to purchase could not be found
这很可能是某个地方的设置问题,但我找不到可能出现的问题。
这是我到目前为止所做的:
这是我从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!
非常感谢你发现问题,因为我已经和它斗争了好几天了。
答案 0 :(得分:1)
草稿状态的APK不再适用于测试应用内结算。您需要在alpha或beta频道中发布它。
参考:http://developer.android.com/google/play/billing/billing_testing.html#draft_apps