Save customer info for upcoming checkouts, but without having to store card number? (Using API)

0

and anticipated apologies if the question is not very clear, but I will try to clarify the best possible:

I'm developing a relatively simple e-commerce with HTML, CSS, JS, Bootstrap, PHP, Apache, and MySQL.

I plan to use a payment API such as PagSeguro (preferable) or MercadoPago. The simpler to implement, the better. I accept new suggestions.

The problem is: I want clients to be able to checkout without registration, or create an account to expedite the process next time, but I do not want to store sensitive information such as bank details or card numbers in my database, as I believe which I would have to do if I used the transparent checkout of both APIs mentioned (please correct me if I do not know of any other option or have misunderstood).

I could use lightbox or checkout by redirection / iframe (which is what I prefer and wanted to use for security), but the problem is that so the same registered user would have to re-enter all information and registration would be a virtually useless function.

I know it may sound indecisive, but I need to know how to offer convenience without having to store sensitive information on my own basis.

Thanks in advance for the help.

    
asked by anonymous 03.02.2018 / 03:46

1 answer

0

Since you do not want to keep sensitive information from your clients on your SQL server, you can use Cookies to do this.

If you do not know what Cookies are: [Briefly] Cookies are stored data when accessing a site, not all sites use cookies and not all cookies must be "important". In your case it is!

You can use PHP for this, just know: what to store, even when to store and identify it. Note:

<?php
$valor = array(
    "nome" => "Maicon",
    "sobrenome" => "Ferreira",
    "cidade" => "Cuiabá"
    );

setcookie("MeuCookie", $valor, time()+3600); // O time é em timestamp!

?>
    
04.02.2018 / 04:15