public static function validateTxn($payClass)
 {
     return true;
     if (count($_POST) > 0) {
         $npi = new PagSeguroNpi();
         $result = $npi->notificationPost();
         $transacaoID = isset($_POST['TransacaoID']) ? $_POST['TransacaoID'] : '';
         if ($result == "VERIFICADO") {
             //Validated by Pagseguro
             return true;
         } else {
             if ($result == "FALSO") {
                 //Failed
                 return false;
             } else {
                 //Error in the integration with Pagseguro.
                 return false;
             }
         }
     }
 }
        curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
        $result = trim(curl_exec($curl));
        curl_close($curl);
        return $result;
    }
}
function MoedaBR($valor)
{
    $valor = str_replace('.', '', $valor);
    $valor = str_replace(',', '.', $valor);
    return $valor;
}
if (count($_POST) > 0) {
    // POST recebido, indica que é a requisição do NPI.
    $npi = new PagSeguroNpi();
    $result = $npi->notificationPost();
    $transacao_cod = isset($_POST['TransacaoID']) ? $_POST['TransacaoID'] : '';
    if ($result == "VERIFICADO") {
        // Recebendo Dados
        $transacao_cod = $_REQUEST['TransacaoID'];
        $usuario_id = $_REQUEST['Referencia'];
        $data_transacao = date('Y-m-d H:i:s');
        $tipo_pagamento = $_REQUEST['TipoPagamento'];
        $num_itens = $_REQUEST['NumItens'];
        $nome = $_REQUEST['CliNome'];
        $endereco = $_REQUEST['CliEndereco'];
        $numero = $_REQUEST['CliNumero'];
        $complemento = $_REQUEST['CliComplemento'];
        $bairro = $_REQUEST['CliBairro'];
        $cidade = $_REQUEST['CliCidade'];