MarketPlaceService.ProcessReceipt isn't working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Making a buy cash GUI

  2. What is the issue? The cash is not going to the player. There are no errors in output

  3. What solutions have you tried so far? I’ve looked through the dev forum and youtube

local MPS = game:GetService("MarketplaceService")

MPS.ProcessReceipt = function(receiptInfo)
	local player = game:GetService("Players"):GetPlayerByUserId(receiptInfo.PlayerId)
	if not player then		return Enum.ProductPurchaseDecision.NotProcessedYet

	if receiptInfo.ProductId == 1213752687 then
		player.leaderstats.Cash.Value += 10
	elseif receiptInfo.ProductId == 1213752803 then
		player.leaderstats.Cash.Value += 100

	return Enum.ProductPurchaseDecision.PurchaseGranted
1 Like

maybe try printing?
so you know if it can find the player

I tried printing, it seems the ProcessReceipt isn’t firing at all

if it is not

try test purchasing the product
in roblox studio

Thats how I’m testing it (30Ch4rssss)

Is there another script that occupies ProcessReceipt? if so, make it one, there cannot be 2 accesses to ProcessReceipt.

1 Like

are you sure it is a dev product?
game passes dont use that call back