#sometimes the currency doesnt add

1 messages · Page 1 of 1 (latest)

ivory topaz
#
    local handler = productFunctions[receiptInfo.ProductId]

    
    local success, result = pcall(handler, receiptInfo, player)
    if not success or not result then
        
        return Enum.ProductPurchaseDecision.NotProcessedYet
    end


    local success, errorMessage = pcall(function()
        purchaseHistoryStore:SetAsync(playerProductKey, true)
    end)
    if not success then
        error("Cannot save purchase data: " .. errorMessage)
    end


    return Enum.ProductPurchaseDecision.PurchaseGranted
end


MarketplaceService.ProcessReceipt = processReceipt