简体   繁体   中英

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

We tried to make a purchase - a real product using a test account, we did not use one of the android test ids. The Google Popup box appeared as normal, we entered our password as normal, and got the "this is a test purchase you will not be charged etc" message. When we pressed ok, the application crashed and stopped responding.

We think this crash may have happened because we had the wrong googlePlayGamesAppId in our build.settings file, so we fixed that and tried again.

However now if we try to call store.loadProducts we get the following error:

error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)

We've looked up this error, and every link I see says that someone tried to make a test purchase using android.test.purchased, which we did not do.

We've been using store.consumePurchase({transaction.productIdentifier}) for months already in two of our other apps which use exactly the same lua file that we are using now to handle all store functions. However we don't seem to be able to call consumePurchase any more (since the failed purchase nothing in the store works) so we can't consume the offending item.

We've tried with 4 different user accounts, all have had the same problem.

When we try to make the first purchase, this is the output:

    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). 

We found the answer. We had the wrong licence key in our config.lua file for this project. All of our keys start and end with similar characters, so we initially thought it was a single "company" key rather than a product key.
Replacing the key, reuploading the apk to Google Play and then reinstalling fixed all problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM