簡體   English   中英

Google Play IAP錯誤1003:購買簽名驗證失敗-使用Corona SDK

[英]Google Play IAP error 1003:Purchase signature verification failed - using Corona SDK

我們嘗試進行購買-使用測試帳戶的真實產品,我們沒有使用android測試ID之一。 Google彈出框正常顯示,我們正常輸入密碼,並收到“這是一次測試購買,您將不會被收取費用等”消息。 當我們按OK時,應用程序崩潰並停止響應。

我們認為這次崩潰可能是由於我們的build.settings文件中的googlePlayGamesAppId錯誤而導致的,因此我們將其修復並重試。

但是現在,如果我們嘗試調用store.loadProducts,則會出現以下錯誤:

刷新庫存時出錯(查詢擁有的項目)。 (響應:-1003:購買簽名驗證失敗)

我們已經查找了此錯誤,並且我看到的每個鏈接都說有人嘗試使用android.test.purchased進行測試購買,但我們沒有這樣做。

我們已經在其他兩個應用程序中使用store.consumePurchase({transaction.productIdentifier})已有幾個月了,這些應用程序使用與我們現在用於處理所有商店功能的完全相同的lua文件。 但是,我們似乎再也無法調用invokePurchase(因為失敗的購買導致商店中的商品無效),因此我們無法消耗有問題的商品。

我們嘗試了4個不同的用戶帳戶,但都遇到了相同的問題。

當我們嘗試進行首次購買時,輸出如下:

    D/IabHelper(20893): Starting async operation: refresh inventory
D/dchan   (20893): Inventory refresh successful. (response: 0:OK)
D/IabHelper(20893): Querying owned items, item type: inapp
D/IabHelper(20893): Package name: com.my.game
D/IabHelper(20893): Calling getPurchases with continuation token: null
D/Finsky  (17292): [798] InAppBillingUtils.getPreferredAccount: com.my.game: Account from first account - [hz0AOjMW0S_KNSX3z-B9OZxAwkE]
D/Finsky  (17292): [798] InAppBillingUtils.getPreferredAccount: com.my.game: Account from first account - [hz0AOjMW0S_KNSX3z-B9OZxAwkE]
D/IabHelper(20893): Owned items response: 0
E/IABUtil/Security(20893): Signature verification failed.
W/IabHelper(20893): In-app billing warning: Purchase signature verification **FAILED**. Not adding item.
D/IabHelper(20893):    Purchase data: {"orderId":"12999763169054705758.1399594758502571","packageName":"com.my.game","productId":"my.game.consumableone","purchaseTime":1401295204051,"purchaseState":0,"purchaseToken":"lotsOfCharacters"}
D/IabHelper(20893):    Signature: aLongSignatureStringLikeWeWouldNormallySee==
D/IabHelper(20893): Continuation token: null
D/dchan   (20893): Error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)
D/IabHelper(20893): Ending async operation: refresh inventory
W/dalvikvm(20893): threadid=18: thread exiting with uncaught exception (group=0x41d02e18)
I/Corona  (20893): [IAP] event.transaction.state: failed
I/Corona  (20893): [IAP] event.transaction.date: nil
I/Corona  (20893): [IAP] event.transaction.identifier: nil
I/Corona  (20893): [IAP] event.transaction.productIdentifier: nil
I/Corona  (20893): [IAP] in failed
I/Corona  (20893): [IAP] event.transaction.errorType: -1003
I/Corona  (20893): [IAP] event.transaction.errorString: Error refreshing inventory (querying owned items). 

我們找到了答案。 我們在config.lua文件中為此項目使用了錯誤的許可證密鑰。 我們所有的鍵都以相似的字符開頭和結尾,因此我們最初認為它是單個“公司”鍵而不是產品鍵。
更換密鑰,將apk重新上傳到Google Play,然后重新安裝解決了所有問題。

暫無
暫無

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

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