Can't restore purchases in 4.25

Hi, i recently upgraded from 4.24 to 4.25. Problem is, all purchasing-related nodes stopped working. So i modified my code to use the v2 of the purchases nodes, and now everything seems to be fine, with one exception: “restore in-app purchasesV2” does not return anything anymore (the returned array is empty). Even more, looks like the game allows me to purchase “non-consumable” items more than once (previously a “you already own this” message poped up).

So looks like UE4 now treats non-consumables as consumables.

What changed? Is there something wrong with my implementation? Or is this a bug? If so, would upgrading to 4.26 fix this?

I did some testing and if you disable StoreV2 in the configuration files v1 nodes will start working again. Restoring purchases using V1 works perfectly fine. Until v2 nodes are fixed i’ll just stick to v1.

How do you disable StoreV2 ?

Don’t bother, V1 is not longer supported and no longer works properly (even tough you can restore purchases properly, the newly made purchases are not beeing confirmed and google automatically refunds them after about 10 minutes, not to mention that the game will start crashing A LOT if you use the old version). We must wait for some update to patch StoreV2. Until then, 4.24 still works.

If you still want to disable store V2 and use V1, drop this in your config file:

[OnlineSubsystemGooglePlay.Store]
bUseStoreV2=False

No, “restore in app purchases2” does not seem to work in 4.26.1 too. I think the main reason is that “Break In App Purchase Restore Info2” is empty even after “On Success”. Can I please ask you if you have reported this problem so that I will vote on it as well?

Hi, it rather looks like “is consumable” flag is ignored and all purchases are treated as consumables. No, i haven’t reported the issue yet.

Interesting point, is this why restore does not work as well? Because consumables are not restorable…

Yes, this is the issue i belive. Previously, in 4.24, attempting to purchase something you already own would result in a “you already own this” message. In 4.25, pressing the “purchase” button again only prompts you to purchase the item again. That’s why i belive that “isconsumable” is ignored.

That can cause a lot of issues!

If you ever reported this please let me know to vote on it :slight_smile:

I have reported the issue, waiting for the case to be reviewd and once the ticket is created i’ll post the report number here.

Thank you so much! :slight_smile: I will wait for the report number to vote on it.

And I also think that reading in version 2 does not work, because instead of, for example, the name of the item and the description, it returns the phrases “super cool item 1” or “super fan item 1” (apparently created by default in an array with information on the subject ).

So can you fix it? What about the application, where to sign? Google informs that soon version 2 will stop being supported, but it does not work for us either!

Hi, i was follow the config (Using In-App Purchases on iOS | Unreal Engine Documentation) and adding the part of SubSystem inside of IOSEngine.ini and AndroidEngine.ini but allways have this error:

LogScript: Warning: Script Msg: UInAppPurchaseQueryCallbackProxy::TriggerQuery - In App Purchases are not supported by Online Subsystem
LogScript: Warning: Script Msg: UInAppPurchaseQueryCallbackProxy::TriggerQuery - In App Purchases are not supported by Online Subsystem
I dont know why not detect that.

If change to V2, always when read the Product ID the data is not correct, for example say:

[2021.07.05-01.06.21:356][552]LogScript: Warning: Script Msg: UInAppPurchaseQueryCallbackProxy2::TriggerQuery - GetUniqueNetIdFromCachedControllerId
UInAppPurchaseQueryCallbackProxy2::OnInAppPurchaseRead - Done
[2021.07.05-01.06.21:365][553]LogBlueprintUserMessages: [Shop_C_0] Cool Item1

Why when use v2 give me this info: [Shop_C_0] Cool Item1

Thx.
BR

Is there any solution for this problem yet?

I belive that only happens if you are in the engine (in the packaged game it should give you the actual items you setup in the app store). It is for testing i belive.