-- For processRecipt

function module.applyProductFunction(productId: number, func: productFunction): boolean?
	if Functions.products[productId] then return true end 
	local success, errorMessage, productInfo
	
	success, errorMessage = pcall(function()
		productInfo = MarketplaceService:GetProductInfo(productId, Enum.InfoType.Product)
	end)
	
	assert(productInfo, `MarketPlace error: {errorMessage}`)
	if not productInfo.IsForSale then return nil end
	
	Functions.products[productId] = func
	
	return true
end
