I have this credit vendor where you should be able to buy in-game cash but the purchase dialog won't show up. This is the script from a button in the GUI that should handle the purchase. Thanks.

local buyButton = script.Parent
local productId = 38169241 --change to dev product id
local mps = game:GetService"MarketplaceService"

function getPlayerById(id)
for i,v in pairs(game.Players:GetPlayers()) do
if v.userId == id then
return v
end
end
end

buyButton.MouseButton1Click:connect(function()
mps:PromptProductPurchase(game.Players.LocalPlayer, productId)
end)

mps.ProcessReceipt = function(info)
local plr = getPlayerById(info.PlayerId)
if plr and plr:FindFirstChild"leaderstats" and plr.leaderstats:FindFirstChild"Credits" then
plr.leaderstats.Points.Value = plr.leaderstats.Credits.Value + 50
end
end