function pushNotification()
{
    $orderId = $_POST['OperationId'];
    $requestKey = $_POST['RequestKey'];
    $eventType = $_POST['EventType'];
    $eventKey = $_POST['EventKey'];
    //Los siguientes 2 campos solo se recuperana a modo informativo.
    $eventDateTime = $_POST['EventDateTime'];
    $eventData = $_POST['EventData'];
    require 'includes/application_top.php';
    require_once dirname(__FILE__) . '/includes/modules/payment/todopagoplugin/includes/Logger/loggerFactory.php';
    //ini_set("date.timezone", "America/Buenos_Aires");
    //$logger = loggerFactory::createLogger();
    //$logger->debug("PushNotification: OperationId: $orderId, RequestKey: $requestKey, EventType: $eventType, EventKey: $eventKey, EventDateTime: $eventDateTime, EventData: $eventData");
    header("Content-Type: text/json", true);
    require_once 'includes/modules/payment/todopagoplugin/includes/TodopagoTransaccion.php';
    $transaction = new TodopagoTransaccion();
    if ($transaction->_getStep($orderId) == TodopagoTransaccion::TRANSACTION_FINISHED && $requestKey == $transaction->getRequestKey($orderId)) {
        $newOrderStatus = getNewOrderStatus($eventType);
        updateOrder($orderId, $newOrderStatus, $comment = 'Actualizado por TodoPago - PushNotificationService', true);
        $statusCode = -1;
    } else {
        $statusCode = 1;
        //$logger->info("Fallo el update de la orden por push. OperationId: $orderId, RequestKey: $requestKey, EventKey: $eventKey");
    }
    $rta = json_encode(array('StatusCode' => $statusCode, 'EventKey' => $eventKey));
    //$logger->debug("Rta PushNotification: $rta");
    echo $rta;
}
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART));
require DIR_WS_INCLUDES . 'template_top.php';
$res = tep_db_query("SELECT * FROM " . TABLE_TP_CONFIGURACION);
$fetch_result = tep_db_fetch_array($res);
//set url external form library
$library = "resources/TPHybridForm-v0.1.js";
if ($fetch_result['ambiente'] == "test") {
    $endpoint = "https://developers.todopago.com.ar/";
} else {
    $endpoint = "https://forms.todopago.com.ar/";
}
$endpoint .= $library;
if (isset($_GET['id'])) {
    $id_decode = $_GET['id'];
    if (is_numeric($id_decode)) {
        $tpTransaccion = new TodopagoTransaccion();
        $response = $tpTransaccion->getTransaction($id_decode);
        if ($response['public_request_key'] != null || $response['public_request_key'] != '') {
            $publicKey = $response['public_request_key'];
            //user, mail
            $customer_data = tep_db_query('SELECT * FROM customers');
            $customer_data = tep_db_fetch_array($customer_data);
            $user = $customer_data['customers_firstname'] . " " . $customer_data['customers_lastname'];
            $mail = $customer_data['customers_email_address'];
        } else {
            header('Location: ' . tep_href_link('checkout_shipping_retry.php', '', 'SSL'));
            die;
        }
    } else {
        header('Location: ' . tep_href_link('checkout_shipping_retry.php', '', 'SSL'));
        die;
    //set url form js
    $endpoint = "";
    $ambiente = $resultConfig->fields['ambiente'];
    //set url external form library
    $library = "resources/TPHybridForm-v0.1.js";
    if ($ambiente == "test") {
        // developers
        $endpoint = "https://developers.todopago.com.ar/";
    } else {
        // produccion
        $endpoint = "https://forms.todopago.com.ar/";
    }
    $endpoint .= $library;
    $orderId = $_GET['id'];
    //RequestKey
    $tpTransaccion = new TodopagoTransaccion();
    $response = $tpTransaccion->getTransaction($orderId);
    $publicKey = $response['public_request_key'];
    //orderID*/
    $orderId = $_GET['id'];
    //merchatid
    $merchantId = $resultConfig->fields['test_merchant'];
    require 'includes/classes/order.php';
    $order = new order($orderId);
    //name
    $user = $order->customer['name'];
    //email
    $mail = $order->customer['email_address'];
} else {
    $url = str_replace("&", "&", zen_href_link('checkout_payment', '', 'SSL'));
    header('Location:' . $url);