簡體   English   中英

Android應用內結算:購買后收到空白數據

[英]Android In-App Billing: Blank data received after purchase

我正在嘗試實施應用內結算。 我已登錄到在Market注冊的測試帳戶,並且我已在代碼中更新了我的公鑰。 我可以購買其中一個測試產品ID。

但是,似乎在PURCHASE_STATE_CHANGED意圖中發送了空白簽名。 日志顯示如下:

INFO/BillingReceiver(21437): notifyId: android.test.purchased
WARN/ActivityManager(2513): Duplicate finish request for HistoryRecord{47de4b38 com.android.vending/.billing.InAppBuyPageActivity}
INFO/BillingService(21437): handleCommand() action: com.app.GET_PURCHASE_INFORMATION
DEBUG/BillingService(21437): GetPurchaseInformation
ERROR/BillingService(21437): getPurchaseInformation received RESULT_OK
DEBUG/BillingService(21437): request id: 4241021538346688898
INFO/BillingService(21437): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
DEBUG/BillingService(21437): RequestPurchase: RESULT_OK
INFO/BillingService(21437): handleCommand() action: com.android.vending.billing.PURCHASE_STATE_CHANGED
INFO/Security(21437): signedData: {"nonce":-3927284292945900504,"orders":[{"notificationId":"android.test.purchased","orderId":"transactionId.android.test.purchased","packageName":"com.app","productId":"android.test.purchased","purchaseTime":1301944310410,"purchaseState":0}]}
INFO/Security(21542): signature: 
INFO/Security(21437): Purchase not verified
INFO/Security(21437): Purchase count = 0
INFO/BillingService(21437): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
DEBUG/BillingService(21437): GetPurchaseInformation: RESULT_OK

“購買未經驗證”是由於代碼跳過簽名驗證(因為它是空白的)並且拋棄了產品購買。

任何想法? 我沒有在文檔中看到簽名可能是空白的或原因是什么。

FWIW,這只發生在我的三星Vibrant Galaxy S(2.2.1)上。 它在Droid(2.2.2)上工作正常。

編輯:當我得到PURCHASE_STATE_CHANGED意圖作為恢復事務操作的結果時,我在日志中得到了這個:

INFO/BillingService(24010): handleCommand() action: com.android.vending.billing.PURCHASE_STATE_CHANGED
ERROR/Security(24010): data is null

這表明根本沒有發送簽名的有效負載。

編輯:在進一步測試時,似乎這發生在上傳的應用程序的版本和安裝的應用程序不同時。 http://code.google.com/p/marketbilling/issues/detail?id=15

我也遇到了這個問題。 我增加了apk的versionCode,正確簽名但后來只得到了來自市場的這些空響應。

為了解決這個問題,我將新的apk作為草稿上傳到了市場,然后得到了有效的回復。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM