简体   繁体   English

Google Play IAP错误1003:购买签名验证失败-使用Corona SDK

[英]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. 我们尝试进行购买-使用测试帐户的真实产品,我们没有使用android测试ID之一。 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. Google弹出框正常显示,我们正常输入密码,并收到“这是一次测试购买,您将不会被收取费用等”消息。 When we pressed ok, the application crashed and stopped responding. 当我们按OK时,应用程序崩溃并停止响应。

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. 我们认为这次崩溃可能是由于我们的build.settings文件中的googlePlayGamesAppId错误而导致的,因此我们将其修复并重试。

However now if we try to call store.loadProducts we get the following error: 但是现在,如果我们尝试调用store.loadProducts,则会出现以下错误:

error refreshing inventory (querying owned items). 刷新库存时出错(查询拥有的项目)。 (response: -1003:Purchase signature verification failed) (响应:-1003:购买签名验证失败)

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. 我们已经查找了此错误,并且我看到的每个链接都说有人尝试使用android.test.purchased进行测试购买,但我们没有这样做。

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. 我们已经在其他两个应用程序中使用store.consumePurchase({transaction.productIdentifier})已有几个月了,这些应用程序使用与我们现在用于处理所有商店功能的完全相同的lua文件。 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. 但是,我们似乎再也无法调用invokePurchase(因为失败的购买导致商店中的商品无效),因此我们无法消耗有问题的商品。

We've tried with 4 different user accounts, all have had the same problem. 我们尝试了4个不同的用户帐户,但都遇到了相同的问题。

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. 我们在config.lua文件中为此项目使用了错误的许可证密钥。 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. 更换密钥,将apk重新上传到Google Play,然后重新安装解决了所有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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