The receipt from ProccessReceipt function is LOST when the ProccessReceipt function is not defined

If Enum.ProductPurchaseDecision.NotProcessedYet is returned when a player’s purchase fails. When the player rejoins a new server, if for some reason the script that defines the MarketPlaceService.ProccessReceipt function errors or is not defined in time, the receipt is lost. From then on, every time the player joins a server, the ProccessReceipt function will never fire again for that purchase.

Repro

  1. Add this code to a new place and replace the username and product id with your own
game:GetService("MarketplaceService").ProcessReceipt = function(receipt)
	print("RECEIPT EXISTS")
	return Enum.ProductPurchaseDecision.NotProcessedYet
end

delay(10, function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.Dued1, 1684687081)
end)
  1. Publish and join your game
  2. Purchase the product.
  3. Rejoin the game. Notice how the RECEIPT EXISTS print appears
  4. Leave the game
  5. Comment out lines 1-4
  6. Publish and join game - this is when the receipt is destroyed because ProcessReceipt is not defined
  7. Leave game
  8. Uncomment the code
  9. Publish and join the game again
  10. Notice how RECEIPT EXISTS does not print this time. It will never print no matter how many times you join
2 Likes

Just need confirmation that this bug was seen. It seems very critical to me. I’ve had to manually give many players items they purchased because of this bug.

Thanks for the report! We’ll follow up when we have an update for you.

I think I’m dealing with the same issue. Getting a purchase that returns NotProcessedYet and joining a new server, that receipt is lost and will not return. However, joining an already active server (if the player did not join a new server) it will be read. Joining an active server AFTER a fresh one will not have the receipt be read. I think it has to do something with joining before the ProcessReceipt code can be ran.

Using sample code directly from this documentation: https://create.roblox.com/docs/reference/engine/classes/MarketplaceService#ProcessReceipt