I have run into an issue with developer products. Here is my client script, it works and is pretty simple:
local mps = game:GetService("MarketplaceService")
script.Parent.MouseButton1Click:Connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, 1197189028)
end)
Now here is my server script, it doesn’t even print:
local martketplace = game:GetService("MarketplaceService")
local productFunctions = {
[1197189028] = function(player) player.saveddata.Skips.Value += 1 return true end, --1
[1197189334] = function(player) player.saveddata.Skips.Value += 5 end, --5
[1197189522] = function(player) player.saveddata.Skips.Value += 10 end, --10
[1197189843] = function(player) player.saveddata.Skips.Value += 15 end, --15
[1197189976] = function(player) player.saveddata.Skips.Value += 20 end, --20
[1197190123] = function(player) player.saveddata.Skips.Value += 25 end, --25
[1197190320] = function(player) player.saveddata.Skips.Value += 30 end
}
local function processTheReceipt(receiptInfo)
print("Fired")
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if not player then return Enum.ProductPurchaseDecision.NotProcessedYet end
if player then
productFunctions[receiptInfo.ProductId](player)
end
return Enum.ProductPurchaseDecision.PurchaseGranted
end
martketplace.ProcessReceipt = processTheReceipt
To be clear, the problem is about handling the purchase. Nothing else.
Any help is appreciated !