No errors on script

Hello, I’ve mad a donation center and when player’s are donating a message will get posted to guided.gg but it does not show.

I get no errors and I’ve tried debugging it but I still do not find the issue.
image_2022-06-21_002434232

There’s no HTTP errors on server and client side.

Server script

print("Loading...")
local MarketplaceService = game:GetService("MarketplaceService")

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local remoteEvent = ReplicatedStorage:WaitForChild("DonatedRobux")

local ProductID = 1094660235--Donation Id1

local ProductID2 = 1094659522--Donation Id2

local ProductID3 = 1094660485--Donation Id3

local ProductID4 = 1094643057--Donation Id4

local ProductID5 = 1094641019--Donation Id5

local ProductID6 = 1094659814--Donation Id6

local ProductID7 = 1094659265--Donation Id7

local ProductID8= 1094643315--Donation Id8

local ProductID9 = 1094658883--Donation Id9
print("Done loading!")

MarketplaceService.ProcessReceipt = function(ReceiptInfo)
	print("Passed 27")
	if ReceiptInfo.ProductId == ProductID or ReceiptInfo.ProductId == ProductID2 or ReceiptInfo.ProductId == ProductID3 or ReceiptInfo.ProductId == ProductID4 or ReceiptInfo.ProductId == ProductID5 or ReceiptInfo.ProductId == ProductID6 or ReceiptInfo.ProductId == ProductID7 or ReceiptInfo.ProductId == ProductID8 or ReceiptInfo.ProductId == ProductID9 then
		print("Passed 29")
		local Player = game.Players:GetPlayerByUserId(ReceiptInfo.PlayerId)
		print("Passed 31")
		remoteEvent:FireClient(Player)
		print("Passed 33")
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
end

The server script that will send the webhook

print("Loading...")
local webhookURL = "https://media.guilded.gg/webhooks/XXXXXXXXXXXXXXXXXXX"
local httpService = game:GetService("HttpService")	
local MPS = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("DonatedRobux")
print("Done loading!")


	MPS.ProcessReceipt = function(receiptInfo)
		if receiptInfo.ProductId == 1094659522 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "100 Robux, We got 70 Robux.",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094660485 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "1000 Robux, We got 800 Robux." ,
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094660235 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "1500 Robux, We got 1,050 Robux.",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094659814 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "2000 Robux, We got 1,800 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094641019 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "25 Robux, We got 17 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094643057 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "250 Robux, We got 175 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094659265 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "50 Robux, We got 35 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094643315 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "500 Robux, We got 350 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
		if receiptInfo.ProductId == 1094658883 then
			local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)

			local data = {
				["embeds"] = {{

					['title'] = player.Name.. " Just Donated" ,
					['description'] = "750 Robux, We got 525 Robux",
					['color'] = 0
				}}
			}

			local finalData = httpService:JSONEncode(data)
			httpService:PostAsync(webhookURL, finalData)
			return Enum.ProductPurchaseDecision.PurchaseGranted
		end
	end

1 Like

The process receipt function can only be called by a single script right now you have 2 of them so only 1 of them will run.

“this function should be set once and only once by a single Script. If you’re selling multiple products in your game, this callback must handle receipts for all of them.”

1 Like