I’m having issues with MarketPlaceService.ProcessReceipt.
When the user tries to buy a dev product, it prompts purchase, takes robux, but does not execute the function that is supposed to reward to the player.
local products = {
[1605825426] = function(player)
print("BOUGHT 25k")
PlayerManager.SetMoney(player, PlayerManager.GetEntityIDFromTable(player), (PlayerManager.GetMoney(player, PlayerManager.GetEntityIDFromTable(player)) + 25000)) -- need to find entity id
PlayerManager.BoughtSouls(player, 25000)
return true
end,
[1606940687] = function(player)
print("BOUGHT 200k")
PlayerManager.SetMoney(player, PlayerManager.GetEntityIDFromTable(player), (PlayerManager.GetMoney(player, PlayerManager.GetEntityIDFromTable(player)) + 200000)) -- need to find entity id
PlayerManager.BoughtSouls(player, 200000)
return true
end,
[1606940956] = function(player)
print("BOUGHT 1mil")
PlayerManager.SetMoney(player, PlayerManager.GetEntityIDFromTable(player), (PlayerManager.GetMoney(player, PlayerManager.GetEntityIDFromTable(player)) + 1000000)) -- need to find entity id
PlayerManager.BoughtSouls(player, 1000000)
return true
end,
}
MarketPlaceService.ProcessReceipt = function(info)
print('MARKETPLACESERVICE')
print(info)
local player = Players:GetPlayerByUserId(info.PlayerId)
if not player then
return Enum.ProductPurchaseDecision.NotProcessedYet
end
local success, result = pcall(products[info.ProductId], player)
if not success or not result then
warn ("Error for product " .. result)
return Enum.ProductPurchaseDecision.NotProcessedYet
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
It does not print “MARKETPLACESERVICE” or the info, so i’m not sure if it’s even entering that function. This was working previously, I have no idea when it stopped.