The*_*gAl 2 lua android in-app-purchase coronasdk google-play
我们尝试购买 - 使用测试帐户的真实产品,我们没有使用其中一个Android测试ID.谷歌弹出框似乎正常,我们正常输入密码,并得到"这是一个测试购买,你不会被收取等"的消息.当我们按下确定时,应用程序崩溃并停止响应.
我们认为这次崩溃可能已经发生,因为我们的build.settings文件中有错误的googlePlayGamesAppId,因此我们修复了该问题并再次尝试.
但是现在如果我们尝试调用store.loadProducts,我们会收到以下错误:
错误刷新库存(查询自有项目).(回复:-1003:购买签名验证失败)
我们查看了这个错误,我看到的每个链接都说有人试图使用android.test.purchased进行测试购买,我们没有这样做.
我们已经在我们的其他两个应用程序中使用了store.consumePurchase({transaction.productIdentifier})几个月,这两个应用程序使用的是我们现在用来处理所有商店功能的完全相同的lua文件.但是,我们似乎无法再调用consumePurchase(因为商店中没有任何购买失败)因此我们无法使用违规商品.
我们尝试了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).
Run Code Online (Sandbox Code Playgroud)
我们找到了答案.我们在这个项目的config.lua文件中有错误的许可证密钥.我们所有的密钥都以类似的字符开头和结尾,所以我们最初认为它是一个"公司"密钥而不是产品密钥.
更换密钥,将apk重新上传到Google Play,然后重新安装修复所有问题.
| 归档时间: |
|
| 查看次数: |
5373 次 |
| 最近记录: |