Is there any way to get InfoType from ProcessReceipt because I am trying to store the purchased data if the datastore works. However, I want to see the InfoType of the Receipt so I can store the purchased info in separate tables, but I don’t find any methods that can support this feature.
MarketplaceService.ProcessReceipt = function(ReceiptInfo)
local DataStore = DataStoreModule.find("Player", ReceiptInfo.PlayerId)
if DataStore.State ~= true then return Enum.ProductPurchaseDecision.NotProcessedYet end
DataStore.Value.DeveloperProducts[tostring(ReceiptInfo.ProductId)] = true
if DataStore:Save() ~= true then
table.remove(DataStore.Value.DeveloperProducts[tostring(ReceiptInfo.ProductId)])
return Enum.ProductPurchaseDecision.NotProcessedYet
else
self.Client.UserPurchasedProductSignal:Fire(Players:GetPlayerByUserId(ReceiptInfo.PlayerId)--[[I want to pass down the Info type to client here but there is no way I can do it]])
return Enum.ProductPurchaseDecision.PurchaseGranted
end
end
end
Note: I am using Knit and Suphi’s datastore module for the script snippet I provided above