2014-03-24 29 views
0

我正在嘗試使用Android結算v3測試試用訂閱。該應用程序已經在生產產品,但我也試圖添加訂閱。當我第一次購買試用版時,一切正常。然後我取消了它(等待幾個小時和幾天),然後當我嘗試再次購買時,有一個Android對話框顯示消息:您已經擁有此項目。 Google Play應用和我的服務器端應用都會確認訂閱已取消。Android計費 - 您已經擁有的錯誤項目:運營商結算配置爲空。設備不適用於DCB 2

的logcat的窗口顯示輸出:

03-24 15:41:53.722: D/IabHelper(21333): Constructing buy intent for com.MYAPP.freetrial, item type: subs 
03-24 15:41:53.732: D/Finsky(20292): [1056] InAppBillingUtils.pickAccount: com.MYAPP:  Account determined from installer data - [UAHnZq8S3yArGc_6ew11RBHr0DE] 
03-24 15:41:53.742: D/IabHelper(21333): Launching buy intent for com.MYAPP.freetrial. Request code: 10001 
03-24 15:41:53.742: D/audio_hw_primary(181): select_devices: out_snd_device(2: speaker) in_snd_device(0:) 
03-24 15:41:53.742: D/ACDB-LOADER(181): ACDB -> send_afe_cal 
03-24 15:41:53.742: I/ActivityManager(580): START u0 {cmp=com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity (has extras)} from pid -1 
03-24 15:41:53.812: D/Finsky(20292): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2. 
03-24 15:41:53.812: E/Finsky(20292): [1054] FileBasedKeyValueStore.delete: Attempt to delete 'params5wrD2REIodMwVQIkVi-biw' failed! 
03-24 15:41:53.872: W/GLSUser(17314): GoogleAccountDataService.getToken() 
03-24 15:41:53.882: I/ActivityManager(580): Displayed com.android.vending/com.google.android.finsky.billing.lightpurchase.IabV3Activity: +99ms 

我不得不添加到onQueryInventoryFinished BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED檢查,因爲該潛艇是在服務器端重新每次我查詢庫存:

public void onQueryInventoryFinished(IabResult result, Inventory inventory) { 
    // Log.d(TAG, "Query inventory finished."); 
    mHelper.flagEndAsync(); 
    if (result.isFailure()) { 
     // complain("Failed to query inventory: " + result); 
     return; 
    } 

    // Log.d(TAG, "Query inventory was successful."); 
    if (result.getResponse() == IabHelper.BILLING_RESPONSE_RESULT_ITEM_ALREADY_OWNED) { 
     return; 
    } 
    consumePuchasedItems(inventory); 

    // Log.d(TAG, "Initial inventory query finished; enabling main UI."); 

} 

我的應用程序使用發行證書籤署,構建代碼+版本號與開發者控制檯中的完全相同。

我使用的是從http://code.google.com/p/marketbilling/(14/12/2013)最新的代碼

我已經檢查Android billing - error you own this item和其他類似的職位,但它不工作。

我會很感激任何建議。任何想法?我在這工作了好幾天,仍然沒有解決方案。訂閱過程似乎第一次運作良好,我嘗試了不同的帳戶。當我取消它並嘗試重新購買時出現問題。

謝謝!

回答

1

當您取消訂閱時,您仍然可以訪問該訂閱,直到訂閱期結束。這是谷歌的實施。這就是爲什麼沒有退款取消訂閱,因爲即使取消,Google仍允許訪問整個訂閱期的訂閱。

取消訂閱的功能是停止訂閱續訂。

這就是爲什麼即使您取消訂閱,您不能立即購買它。一旦當前訂閱期結束,您應該可以重新購買。

相關問題