Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

Why don't ProductPurchase give me money from the sales?

Asked by
jav2612 180
11 years ago

I tried following the wiki and example place but there still must be something wrong, because when someone buys the developer product in-game, I don't ever receive payment.

This script is in the Workspace:

01MarketplaceService = Game:GetService("MarketplaceService"
02 
03 
04local ID = 19690897  
05local PurchaseHistory = game:GetService("DataStoreService"):GetDataStore("PurchaseHistory"
06 
07    MarketplaceService.ProcessReceipt = function(receiptInfo)  
08        local playerProductKey = receiptInfo.PlayerId .. ":" .. receiptInfo.PurchaseId 
09        if PurchaseHistory:GetAsync(playerProductKey) then 
10            return Enum.ProductPurchaseDecision.PurchaseGranted --We already granted it. 
11        end 
12        -- find the player based on the PlayerId in receiptInfo 
13        for i, player in ipairs(game.Players:GetChildren()) do 
14            if player.userId == receiptInfo.PlayerId then 
15                -- check which product was purchased (required, otherwise you'll award the wrong items if you're using more than one developer product) 
View all 26 lines...

And this is used to prompt the purchase after pressing a gui button: MarketplaceService:PromptProductPurchase(player, 19690897)

1 answer

Log in to vote
-2
Answered by 11 years ago

First. ProductPurchase takes 1-24 Hours to load on your account with the money that they bought. Second. 19690897 is a Person's place.

0
First, like I specified I have never received the payment....ever... That was 2 days ago by the way. Second, It's not someone's place I copied the ID directly: http://gyazo.com/279b259a766ec661718b81849e71eb96 jav2612 180 — 11y
0
Did you look at my screenshot? It's the exact same ID. Also I forgot to mention that you gain the points from buying it ingame. The only problem is I don't get payment. jav2612 180 — 11y
0
ProductIds are not the same as AssetIds. A ProductId can be the same as an AssetId. Articulating 1335 — 11y
View all comments (4 more)
0
OH ASSET, well in that case thats easy. You don't need scripts just a plugin! Get it off the roblox blog. It should be around where the winter games are about to start section RolandStudio 115 — 11y
0
Okay who gave us both -1... RolandStudio 115 — 11y
0
I just joined this website because nobody was helping on the forum so I don't know what that means.... So no idea why I'm not getting the payment? jav2612 180 — 11y
0
Phhh, I came off the scripting forums they never help. So I went to lualearners they closed then I came here... RolandStudio 115 — 11y
Ad

Answer this question