TLDR: This is an user error, caused by a wrong description of a function in the digest APIs⌠(It says about purchase result which is wrong, it is actually about the UI closing behavior, explained better bellowâŚ)
This is due to the developer wrongly checking purchase with the result of BuyOffer. What happens is that the user is force-closing the purchase dialog before the purchase finishes (clearly visible in the video). Then in verse it returns false (true = automatically closed popup | false = popup force closed by the player).
It is being purchased fine without issues, but your logic inside Verse is not handling it correctly, making it âmissâ the purchase made. Many other devs working with marketplace are doing this same mistake due to not knowing about this detail.
To fix/avoid this, you should use the EntitlementsChangedEvent to listen for entitlement purchases (and any other change during the game). Then even if the player force close the popup, it will correctly detect the purchase.
In a more robust approach, should also use the GetPurchasedEntitlements when game start, to load/setup the purchases for that player, before listening for other purcahses or game events. This will also already fix the purchase being missed just by the player rejoining the session if you ever forget to listen for the entitlements changed event at any moment.
Here is some explanation in more details that I made in another place:
Can you delete this reply? This is not a user error. We are responding to a bug that was reported and confirming that we also have that issue. We also use the âmore robust approachâ that you are suggesting would fix our user error.
I use GetPurchasedEntitlements on Player join. I still donât have my purchases anymore (they are actually removed because in my code I remove the item if the player doesnât have the entitlment) so the API is returning that the player doesnât have the purchase.
@PeterGGs Oh yeah I was just commenting out with some people on another place, seems to be two things happening:
A) Transactions broken / inventory of transactions failing to load and returning empty/zero purchases when calling GetPurchasedEntitlements (actual bug on epic side)
B) Some people not relying on the entitlement changed or get entitlements to retrieve purchase data (user error due to wrong setup)
âAâ is a real bug on epic end that needs to be fixed;
âBâ is caused due to wrong setup in verse by the developer
The video clearly shows a repro-step of the âBâ (only if the dev did not handled it properly). But yeah, if the dev made everything correctly, then it is the âAâ issue that is being impacting it.
Thatâs why I firstly assumed it was just the âBâ based on the video attached. Specially this user wrong setup is a thing that happens since marketplace released, I already faced many people facing it and I always explain that about how to fix it and so onâŚ
But, the âAâ is completely new and valid if is happening too, like Iâve saw other people confirming it even with the correct setups