False Alarm (was: Developer Products processing extra receipts when purchased quickly)

If a player purchases the same Developer Product several times continuously, the Roblox client is invoking MarketplaceService.ProcessReceipt with more unique PurchaseIds than the number of actual transactions in which the Player is charged robux. (i.e. Roblox charges the player 5 times, but tells my code via ProcessReceipt that they purchased it 8 times).

I created a quick test to see whether this was my own faulty ProcessReceipt system. On the server, it prints each unique PurchaseId (in the screenshot, each ID is preceeded by the UserId who purchased it).

[details=My online Purchase History]

[/details]

[details=PurchaseIds processed on server]

[/details]

As you can see, I was charged only 13 times, but was awarded 23 goods.

By purchasing the same product quickly, players are exploiting this to get extra goods while I am losing revenue. Please fix. Thanks.

Wait, those IDs are not unique.

This may be my fault. I will continue to investigate.

Well, I just made a fool of myself.

I threw an asynchronous process into my ProcessReceipt. False alarm.

I’ve been experiencing this kind of behavior with developer products in my game as well. If you would confirm that it was truly the developer’s fault, kindly reply saying so since I’m unsure if this is an issue related to ProcessReceipt or the developer’s setup.

The problem with ProcessReceipt is that, if you have any yields (such as saving to datastore) before you return the PurchaseGranted signal, that same unique receipt id may run again if the player purchases another devproduct.

Roblox will run ProcessReceipt with receipts that have not returned the PurchaseGranted again whenever the player makes another purchase. This can result in accidently giving the player more goods than they purchased.

An example:

→ Player makes a purchase.
→ Server is working to save the change to the datastore.
→ Player makes a second purchase
→ Roblox notices the first purchase wasn’t finished, so Roblox will run ProcessReceipt for both the first purchase again, and the new purchase.
→ Player ends up with 3 of the goods they purchased, instead of 2.

2 Likes