Lightbox via API

Asked

Viewed 1,202 times

2

I have a Lightbox working perfectly well, using:

<!-- INICIO FORMULARIO BOTAO PAGSEGURO -->
<form action="https://pagseguro.uol.com.br/checkout/v2/cart.html?action=add" method="post" onsubmit="PagSeguroLightbox(this,
    {
         success : function(transactionCode)
         {
            user_transactionCode_save(1, 2, transactionCode);
            alert('<b>Seu código de transação é:</b> ' + transactionCode);
         },
         abort : function() {
            document.write('<b>Você não concluiu a sua compra</b>');
         }
    }); return false;"
>

<!-- NÃO EDITE OS COMANDOS DAS LINHAS ABAIXO -->
<input type="hidden" name="itemCode" value="*****************" />
<input type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/pagamentos/209x48-comprar-assina.gif" name="submit" alt="Pague com PagSeguro - é rápido, grátis e seguro!" />
</form>
<!-- FINAL FORMULARIO BOTAO PAGSEGURO -->

It’s quite simple, but, the return of transactionCode is always being 1.

What’s?

  • Where it’s being declared checkoutCode? and what is its value when calling the PagSeguroLightbox? You’re one short e.preventDefault();

  • Opa, declaring it: var checkoutCode=... occurs the same when adding the e.preventDefault(); also

  • How did you manage to resolve this situation ? I’m trying the same.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.