2
Hello I have a pagseguro button on my site, but when I click on it I want it to take the form data and send it to another page (to then put it in the database). So when you click on the pagseguro button it will send two action. (one for pagseguro and one for my bd.
Payment form.
<!-- INICIO FORMULARIO BOTAO PAGSEGURO -->
<form action="https://pagseguro.uol.com.br/checkout/v2/cart.html?action=add" method="post" onsubmit="PagSeguroLightbox(this); return false;">
<!-- NÃO EDITE OS COMANDOS DAS LINHAS ABAIXO -->
<input type="hidden" name="itemCode" value="DF45A4323B3BA53224E48FBA638D48CE" />
<input type="image" src="https://p.simg.uol.com.br/out/pagseguro/i/botoes/pagamentos/209x48-pagar-assina.gif" name="submit" alt="Pague com PagSeguro - é rápido, grátis e seguro!" />
</form>
<script type="text/javascript" src="https://stc.pagseguro.uol.com.br/pagseguro/api/v2/checkout/pagseguro.lightbox.js"></script>
Website form.
<form method="post" action="">
<table class="tb">
<tr><td>Nome: </td><td><input type="text" name="nome"></td></tr>
<tr><td>E-mail: </td><td><input type="text" name="email"></td></tr>
<tr><td>Telefone: </td><td><input type="text" name="telefone"></td></tr>
</table>
</form>
I’m thinking of putting both in the same form, but the question continues. How to send to two different pages via action?
I thought the same thing, maybe it’s the best way to do it. Fill out the form and then go to the pagseguro.
– Felipe Jorge
It is certainly better even, send ajax and then in Success send to pagseguro
– Felipe Douradinho