Having problem with DevProduct (DevProduct Item not for sale)

So, I made a donation gui for my game using buttons. now the problem is, its always giving me an error with my own DevProduct even though I put the correct Id in the MarketPlaceService:PrompPurchaseFinished(player, productId)

Also, the reason why Im doing this thing because I am saving the donated robux into the DataStore so I know how much the total donation raised.

This is the images for more info:

In-Game after clicking the TextButton with having a remote event to call the server:
p1

The print and warn output so I know if the buttons and remotes are working:
p2

This is the DevProduct Id’s inside the Script that somehow “not” working:
p3

This is the DevProduct Id’s in the Configure Game of roblox website:
p4

This is the scripts:

The script in the server:

DonationEvent.OnServerEvent:Connect(function(sender, messageType)
	if sender and messageType then
		warn("SERVER-CALLED!")
		if messageType == "donation-10" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation10_ID)
			wait(1)
			Debounce = false
		elseif messageType == "donation-25" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation25_ID)
			wait(1)
			Debounce = false
		elseif messageType == "donation-100" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation100_ID)
			wait(1)
			Debounce = false
		elseif messageType == "donation-500" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation500_ID)
			wait(1)
			Debounce = false
		elseif messageType == "donation-1000" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation1000_ID)
			wait(1)
			Debounce = false
		elseif messageType == "donation-10000" and not Debounce then
			Debounce = true
			MarketPlaceService:PromptPurchase(sender, Donation10000_ID)
			wait(1)
			Debounce = false
		end
	else
		warn(sender, "and", messageType, "not found")
	end
	
	MarketPlaceService.ProcessReceipt = getReceipt
	
end)

While this is the localscript to handle the button’s clicked event:


local RS = game:GetService("ReplicatedStorage")
local DonationEvent = RS:WaitForChild("Events"):WaitForChild("DonationEvent")

DonationButton_10 		= 	script.Parent:WaitForChild("A_Donation-10")
DonationButton_25 		= 	script.Parent:WaitForChild("B_Donation-25")
DonationButton_100 		= 	script.Parent:WaitForChild("C_Donation-100")
DonationButton_500 		= 	script.Parent:WaitForChild("D_Donation-500")
DonationButton_1000 	= 	script.Parent:WaitForChild("E_Donation-1000")
DonationButton_10000	= 	script.Parent:WaitForChild("F_Donation-10000")

local Debounce = false

DonationButton_10.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true
		
		DonationEvent:FireServer("donation-10")
		print("SERVER_-FIRED!!!")
		wait(1)
		Debounce = false
	end
end)

DonationButton_25.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true

		DonationEvent:FireServer("donation-25")

		wait(1)
		Debounce = false
	end
end)

DonationButton_100.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true

		DonationEvent:FireServer("donation-100")

		wait(1)
		Debounce = false
	end
end)

DonationButton_500.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true

		DonationEvent:FireServer("donation-500")

		wait(1)
		Debounce = false
	end
end)

DonationButton_1000.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true

		DonationEvent:FireServer("donation-1000")

		wait(1)
		Debounce = false
	end
end)

DonationButton_10000.MouseButton1Click:Connect(function()
	if not Debounce then
		Debounce = true

		DonationEvent:FireServer("donation-10000")

		wait(1)
		Debounce = false
	end
end)

Big thankyou if you can help me!

1 Like

I just found out that I use PromptPurchase instead of PromptProductPurchase and it works now. My bad.

1 Like