view/frontend/templates/checkout.phtml
<h2>Finalizando sua compra com PagSeguro</h2>
<script type="text/javascript" src="<?php echo $this->getPaymentJs(); ?>"></script>
<script type="text/javascript">
function checkout(payment)
{
PagSeguroLightbox(
'<?php echo $this->getCode(); ?>',{
success: function(token){
window.location.href = "<?php echo $this->getUrl('checkout/onepage/success', array('_secure' => true));?>";
},
abort: function(){
window.location.href = '<?php echo $this->getUrl('pagseguro/payment/cancel'); ?>';
}
});
}
</script>
<table style="width:100%;">
<tr>
<td style="width:100%">
Sua compra está em processo de finalização, aguarde um instante.<br />
Caso a página de finalização de pagamento não se inicie automaticamente, <a href="<?php echo $this->getPaymentUrl(); ?>" id="redirect">Clique Aqui</a>
<script type="text/javascript">
checkout();
</script>
</td>
</tr>
</table>