So you want to add the ability to accept credit card payments to your shop?
There are a few things you need to consider. You do not want to be storing peoples credit cards in your database. Doing this opens you up to a great many negative things. Security breaches mean that these details can be stolen. It also means your server must comply with a stricter level of PCI restrictions.
So, unless you are a major player or are a credit card processor yourself, you want to offload this responsibility to someone else. I think that perhaps I’ve implemented more of these card gateway shop interfaces than anyone else, so over the next $however_long_it_takes I’m going to detail what a good one looks like. I might even give examples.
Next up, the hand off.