Hi,
Recently, I fixed a problem where all other dev products wouldn’t work when a donate board was in the game - as there were multiple ProcessReceipts. When I removed the donation board, it worked, but I was wondering how to make both the donation board and other products co-exist in one ProcessReceipt (aka, make both the donation board and dev. product purchases work)? Here is my current code:
local MPS = game:GetService("MarketplaceService")
local http = game:GetService("HttpService")
MPS.ProcessReceipt = function(receiptInfo)
if receiptInfo.ProductId == 1235160688 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Gems.Value += 10
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1239862463 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Gems.Value += 100
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1239862464 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Gems.Value += 250
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1239862465 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Gems.Value += 500
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1239862466 then
local plr = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
plr.leaderstats.Gems.Value += 5000
return Enum.ProductPurchaseDecision.PurchaseGranted
end
-- these are robux donos
if receiptInfo.ProductId == 1322432515 then
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1322432639 then
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1322432854 then
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1322432856 then
return Enum.ProductPurchaseDecision.PurchaseGranted
end
if receiptInfo.ProductId == 1322432855 then
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
You can see the latter portion of the code has purchase info for the donation board - i tried this, however it did not work.
Any help is greatly appreciated!