0

We have a debit payment method where the user has to enter some data like his name, IBAN, BIC and the name of the bank.

I need to store these pieces of information in our database and automatically load them if the user visits the checkout again.

Should I create a new database for this or should I store the information in the customer model in tables like customer_entity_varchar?

1 Answer 1

1

DON'T store data like that in your store.

Use plugins that already exist that tokenize banking data. This makes it so even if your site is compromised, your user credit card/debit card is not. Most modern payment plugins already do this - Authorize.net / Moneris / etc.

IF you are not afraid of being hacked, I would create a separate Table that stores that data based on User ID.

Please look into encrypting this data as you don't want that kind of information out there.

PS: Remember that Guest accounts do not have user id, so you will need to deal with those separately.

2
  • 1
    Don't worry, we use encryption to store the data and we already have the OK from our data protection agent. We don't store credit card information. We don't have guest accounts. Thx
    – Black
    Commented Nov 18, 2021 at 8:49
  • 1
    @Black ok, then yes, you can just put that data into a separate table. No need to put it inside customer model as you want modularity - if the plugin is removed, then you can delete the table too without having to remove data from core table. (FYI: Prefix your table with the name of your company so it's clear what the table is. For example Microsoft would be mcsft_credit_cards or something like that). Commented Nov 18, 2021 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.