How to save bank data in the database?

Asked

Viewed 330 times

5

When making a virtual store what is the best way to save the user’s bank data in the database?

Credit card number, security number and expiry date.

For example, using Laravel. It would use a type of encryption such as bcrypt?

It turns out that the bcrypt is one-way, so there would be no way I could show on a possible screen the user’s banking data for him to make another purchase using the same data.

1 answer

2


Diego,

Depending on the size of your online store I would not recommend you take responsibility for this data, in case of a possible external problem (hack, server security flaw and etc), I understand that it is bad for the user to have to enter the data every time they pay, but I think it will be less stressful than a possible audit, or lawsuits.

What I could recommend would be to use some options like:

There are other options, just mentioned these because they were the ones I remembered and on account of having a good documentation even in Portuguese.

But if you really want to save the data in your database, use the crypt(); might be the best option, it has some size limitations, and it is not very recommended to use in passwords (according to the documentation), but it would suit your case well at least in the user information.

There’s this article here from Thiago de Belem, is old, but gives a good basis of the crypt();

In short, start by playing the responsibility to third-party companies, as you grow you will take responsibility for this information.

  • 2

    And paying me, I wonder if it’s good?

  • 2

    @Diegosouza o pagar.me is a novelty for me I will even keep it, the site is really beautiful, and I really liked the documentation, I just did not find his fees, but it seems to be a complete platform.

  • It seems that the rates are in the same way as Payu.

Browser other questions tagged

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