2012-07-04 153 views
3

如何測試Google Play Android訂閱和Google API?如何測試Google Play Android訂閱?

  1. 該應用是上傳的,但未發佈。
  2. APK已激活。
  3. 訂閱產品ID已發佈。
  4. 我試圖購買完全不相關的手機上的訂閱,而不是我的帳戶。
  5. 我測試的所有帳戶都列在Android Developer Console>編輯配置文件
  6. BILLING_REQUEST_ITEM_TYPE設置爲「subs」。
  7. BILLING_REQUEST_API_VERSION設置爲2.
  8. 該應用已簽署並且發佈版本爲ant release installr

    IGNORE THIS: When I try to purchase a subscription, it displays the subscription description, but immediately says "The item you are requesting to purchase is not available." 
    

我無法測試谷歌Android發佈網絡API,https://developers.google.com/android-publisher/v1/purchases/get

IGNORE THIS: It requires a user subscription token but I can't get a token without buying a subscription! 

好了不知它開始工作,我能夠購買訂閱。但是,服務器上的腳本存在錯誤,所以我無法保存用戶訂閱令牌。現在,當我嘗試重新購買訂閱時,它會顯示「您已經擁有此訂閱。」

當我點擊詳細信息時,它會顯示「找不到項目」。與一個重試按鈕!

我覺得我是世界上唯一試圖使用這個API的人!

此外,Google結算API中存在錯誤。直到我收到服務器確認已保存訂閱之後,我才撥打mBillingService.confirmNotifications(),但我在我的商家帳戶中看到了押記/押金。

回答

1

您是否在測試設備上安裝了.apk的簽名版本?爲了讓Google Play確認您的購買請求,需要對.apk進行簽名(例如,通過Eclipse中常見的「導出」功能)。

+0

是的。我會補充一點。這是一個發佈版本,「ant release installr」。 – Chloe

+0

結算服務是否返回任何logcat錯誤/信息消息(可能比「請求的項目更詳細」)? – Nick

+0

當我嘗試從我的手機上,(我認爲Finsky是賬單服務(WTF?)) D/Finsky:[26] MarketBillingService.getPreferredAccount:com.kizbit.pairfinder:來自第一個賬戶的賬戶。 E/Volley:[14] BasicNetwork.performRequest:https://android.clients.google.com/fdfe/completePurchase的意外響應代碼500 W/Finsky:[1] CheckoutPurchase.onErrorResponse:DisplayErrorMessage [Your order could not被處理。請重試。] E/Finsky:[1] CheckoutPurchase.setError:type = UNKNOWN,code = -1,message =您的訂單無法處理。請再試一次。 – Chloe