Generate unique pages for customer to make payment

Asked

Viewed 151 times

2

I have a system where the client type 5 parameters and when clicking on send is directed to another page where the information filled in on the previous screen is posted.

But today this page of destiny is always the same. What I need is that each time I type the information they were posted to a different and unique URL and that kept the values posted to be accessed later.

In summary these posted amounts are the payment data of a gateway, and I need that each time the admin enters and enters a value, a link is generated for him to send to each client to make the same payment.

1 answer

2

You could generate these links using the customer id, or the payment id you have in your database to generate a unique link.

The simplest way would be a query string in the URL with the feature type, and with the invoice id. For example:

dominio.com/?tipo=pagamento&fatura=10

or simpler:

dominio.com/?pagamento=10 // assim tem o tipo na chave e o id no valor

If you want you can also encrypt the query string, but it seems unnecessary here.

Using my second example could use so to know in PHP the url data:

<?php
if($fatura = $_GET["pagamento"]){
    echo $fatura; // dá 10
    // usar esse valor para o que precisa
}
?> 
  • Good Sergio. I managed to generate the URL by posting via GET instead of POST. But as I posted all the parameters the URL became giant. Do you have any idea how I can automatically generate a reduced link with this url http://site.com.br/index.php?lojaID=1&valu_pedido=10000&pedidoID=ABC122&maximo_parcelas=6&ambient=Teste&x=33&y=15 ?

Browser other questions tagged

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