The short of it is, I don't recieve money on purchase.
What I have running, in ServerScriptService, as a Server-Sided Script:
local MarketplaceService = Game:GetService("MarketplaceService")
local ds = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory")
MarketplaceService.ProcessReceipt = function(receiptInfo)
MarketplaceService.ProcessReceipt = function(receiptInfo)
for i, player in pairs(game.Players:GetChildren()) do
if player.userId == receiptInfo.PlayerId then
player.Teleport.Value = false
player.Teleport.Value = true
end
end
local playerProductKey = receiptInfo.PlayerId .. receiptInfo.PurchaseId
ds:IncrementAsync(playerProductKey, 1)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
This was copied from the demo place I found in the Roblox Wiki (http://www.roblox.com/Developer-Product-Sample-place?id=147965737).
the local 'playerProductKey' (line 14) used to be longer, but used to produce errors: 'key is too long' or something.
Shortening that fixed the errors, but still it won't pay me.
Please tell me if you see something that may cause this to not work.
