-->

Unity Unibill Plugin issue with Amazon testing, AM

2019-09-16 05:13发布

问题:

I got Unibill set up for my Unity project and everything is fine with Android payments. Now trying to get it running for Amazon and it is not working.

I tried it with "Amazon Sandbox" turned on and turned off. I tried it with a pre-made "amazon.sdktester.json" and with the one that gets created automatically with Unibill. Nothing seems to work. I keep getting the following error:

In App Purchasing SDK - Sandbox Mode: PurchasingListener Context: com.unity3d.player.UnityPlayerNativeActivity@41a3ea20
UnibillBiller: GetItemDataRequest returned an empty product list. Have you created your purchases on the Amazon developer portal?.
See http://www.outlinegames.com/unibillerrors#AMAZONAPPSTORE_GETITEMDATAREQUEST_NO_PRODUCTS_RETURNED

Not sure if there is some sort of trick or if I'm missing something obvious.

Thanks

UPDATE: I added a few more logs. Not sure if that helps.

D/c       ( 6745): In App Purchasing SDK - Sandbox Mode: handleResponse
I/c       ( 6745): sendGetPurchaseUpdates with user idl3HL7XppEMhrOGDnur9-ulvqomrSg6qyODKmah76lJU=
I/c       ( 6745): send PurchaseUpdates with user id:l3HL7XppEMhrOGDnur9-ulvqomrSg6qyODKmah76lJU=;reset flag:true, local cursor:null, parsed from old requestId:GET_USER_ID_FOR_PURCHASE_UPDATES_PREFIX:1:0f310aba-f83e-4643-b5e3-896b3c552524
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192): Error parsing offset:
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192): java.lang.NumberFormatException: Invalid long: ""
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at java.lang.Long.invalidLong(Long.java:125)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at java.lang.Long.parseLong(Long.java:346)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at java.lang.Long.parseLong(Long.java:319)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at com.amazon.sdktestclient.iap.command.PurchaseUpdatesCommandHandler.parseOffset(PurchaseUpdatesCommandHandler.java:122)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at com.amazon.sdktestclient.iap.command.PurchaseUpdatesCommandHandler.executeRequest(PurchaseUpdatesCommandHandler.java:49)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at com.amazon.sdktestclient.iap.command.IapCommandHandler.execute(IapCommandHandler.java:59)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at com.amazon.sdktestclient.command.CommandBroker.onHandleIntent(CommandBroker.java:30)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at android.os.Handler.dispatchMessage(Handler.java:99)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at android.os.Looper.loop(Looper.java:151)
W/AmazonAppTester/PurchaseUpdatesCommandHandler( 5192):     at android.os.HandlerThread.run(HandlerThread.java:60)
D/c       ( 6745): In App Purchasing SDK - Sandbox Mode: handleResponse
I/c       ( 6745): Offset for PurchaseUpdatesResponse:0
D/UnibillAmazonPlugin( 6745): onPurchaseUpdatesResponse
E/Unity   ( 6745): UnibillBiller: GetItemDataRequest returned an empty product list. Have you created your purchases on the Amazon developer portal?.
E/Unity   ( 6745): See http://www.outlinegames.com/unibillerrors#AMAZONAPPSTORE_GETITEMDATAREQUEST_NO_PRODUCTS_RETURNED

回答1:

I can't comment since I don't have enough 'reputation' but apparently I can answer.

There appears to be a problem with Amazon's test client itself. That stack trace is not coming from Unibill. Please send or post the json file Unibill generates, it is likely something in that file that is causing the amazon client to crash.