If you are storing card details you need to be PCI/DSS compliant.
Key parts.
Regular Scans
firewall
Web server
firewall
Database server
Card nos must be encrypted on database server
If you are dealing with any volume of card data you will need an external security company to audit your code, design, security procedures and confirm you are compliant.
Amazon do not do real time card lookups, so their is probably not a configuration that you want to copy.
See https://www.pcisecuritystandards.org/ for the standards.