} else {
        echo "<label>No se ha podido realizar el pago, por favor intente nuevamente.</label>";
    }
}
function second_step_todopago($order)
{
    global $todopagoTransaccion;
    $todopagoTransaccion = new TodopagoTransaccion();
    $response = callGAA($order);
    if ($response) {
        take_action($response);
    } else {
        showError();
    }
}
second_step_todopago($orders);
$logo = "http://www.todopago.com.ar/sites/todopago.com.ar/files/pluginstarjeta.jpg";
unset($_SESSION['sendto']);
unset($_SESSION['billto']);
unset($_SESSION['shipping']);
unset($_SESSION['payment']);
unset($_SESSION['comments']);
$_SESSION['cart']->reset(true);
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=checkout_success.<br />
 * Displays confirmation details after order has been successfully processed.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
<div class="contentContainer">
  <div class="buttonSet">

    <div>
    <?php 
        $logo = "http://www.todopago.com.ar/sites/todopago.com.ar/files/pluginstarjeta.jpg";
        echo " <div><img src='" . $logo . "' title='todo pago'  /></div>";
        if ($offline) {
            $url_cupon = $todopagoTransaccion->getCouponUrl($order_id);
            echo tep_draw_button('Descargar PDF', 'triangle-1-e', $url_cupon, '', array('newwindow' => true));
        }
        ?>
    <span class="buttonAction"><?php 
        echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary');
        ?>
</span>
    </div>
  </div>
</div>
</form>
<?php 
        require DIR_WS_INCLUDES . 'template_bottom.php';
        require DIR_WS_INCLUDES . 'application_bottom.php';
    } else {
        tep_redirect(tep_href_link('checkout_shipping_retry.php'));
    }
}
_unregisterSessionVars();
//Necesario para el framework
second_step_todopago();