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
In my case, the player will spend vbucks and will not be granted the item. As you can see on this video, the successful purchase pop up clearly is clearly displayed but no item granted in the quickbar at the UI bottom
So player keep getting scammed. I sent a ticket through Epic Assistance.
PS : It works well in UEFN session but not in private or public version
YOU ARE IN TEST MODE, YOU CANNOT REALLY SPEND YOUR V-BUCKS.
You probably wont see this until you use 0.25 speed on your video
When the project is in a published then the VBUCKS are really do get deducted. During testing this shows a VBucks deducted but when you come out of a private island you will see the Real VBucks do not get deducted and the item are not in the Persistent storage.
In my published version of the UEFN Example this does work, but the documentation for the Verse has been fixed. The example works
This is covered in the recently updated documentation
Sorry if I wasnât clear enough in my original post ; the issue is not in test mode. The item is not being granted in the published public version either.
To clarify the expected behavior: after a successful purchase, the bought item should appear in the quick bar at the bottom of the UI. This works perfectly fine in a UEFN session, but does NOT work in either private or public published versions.
I might record a comparison video showing the difference in behavior between a UEFN session and the published version to make the issue clearer. Would that help?
Probably good idea to produce videos of the problem.
When trying the UEFN FE (Feature Example) IIT (In-Island Transaction)the item Entitlement is available, but the code to display an item in the box does not happen the example on display. The display is not like the one you describe when you ask for this.
Therefore this IMHO is that the problem lies in the transfer from the Entitlement to the Persistent item display
There would seem the problem to be in the way the display code works when published rather than the IIT code.
There is however a Debug function and that is documented
My speculative guess is that they will have the entitlement and its the display code which is failing when published, because the display code is removed as its inside a debug module
This is very complex Verse code and too deep for me to understand, as an indie dev just follow the examples
Thanks for the input, but this is not a code issue on my end. The map has been published for 3 months and everything worked fine â item granting and quickbar display â in both private and public versions. I havenât touched the code since publication, except for adjusting prices. The bug appeared after Epicâs latest update without any change on my side.
Here is the video recorded in UEFN session. You can clearly see the Medic Kit item being granted in my quick bar at the bottom. Every enetitlement works in UEFN, but none in public or private version.
I think I will create a new topic, because it seems itâs a whole other issue from In Island Transactions