[4.9.1] "Read In App Purchase Information" node don't work


the “Make In App Purchase” node succesffully work. I tested it with a complete Google Play beta test installation on Android.

But when I want to get the display price and name with the “Read In App Purchase Information” node, I always obtain a Failure. The node does not seem functional ? Is there another way to get this informations ?

Thanks, Eddy

Just like to say I’m seeing the exact same thing. Making a purchase works fine. When reading in app purchase it fails.

Inside GooglePlayStoreHelper onQueryInventoryFinished; isSuccess is returning true however inventory.HasDetails is always returning false, despite confirming that the productIDs I’m querying for are correct.

I have the same problem. What’s going on?

The fault lies with the code. I’ve brought it to the attention of the UE devs and they are putting in a fix. But if you wish to fix this yourself you can go to GooglePlayStoreHelper.java. In the function QueryInAppPurchases around line 167; replace the call to



List<String> moreSkus = new ArrayList<String>();
for (String productID : ProductIds) 
inAppPurchaseHelper.queryInventoryAsync(true, moreSkus, GotInventoryListener);

And that should fix up this particular problem. I’m still having issues tbh but I’m attempting to very slowly work my way through. It’s almost like they don’t test this stuff :wink:

Thanks for the trick it works fine :slight_smile:

HazeTI, it just lacks the first line beginning in your post:

 1. ArrayList<String> moreSkus = new ArrayList<String>();

Glad to have helped, though we must be using different versions as I had to add that whole segment.

Was this fixed in 4.10? I’m also getting a failed response and my app is published.

no, you still have to apply the fix above manually to the engine code.

Thanks. The last time I tried to compile the engine it gave me problems.

This thread is old and no longer an issue (it appears resolved in 4.10.3), however it also appears to be the go-to thread showing up on searches for issues with this node therefore I just want to add a comment regarding some behavior as it has been causing me trouble this afternoon.

The “Read In App Purchase Information” node will fail if called multiple times before previous calls have executed

If you have this setup neither “On Success” or “On Failure” will ever be called.

In my case I had a user widget setup as a button for purchasing “X amount of currency”, then this button appeared it would call “Read In App Purchase Information” for its own transaction, resulting in Y number of calls to the function in quick succession, none of which would ever return.

I had to fix this by accumulating the calls outside of the individual buttons and submitting them all at once.

Hope this helps if someone else finds themselves in the same situation.

How to check if an item is already bought or not ?

i seem to be having this issue , not sure i fully understand your solution.