The background: I am designing a website to host some services online. To use any service, a customer is required to pay a fee using a credit card. The transaction is being processed by the payment gateway, which keeps a record of the amount collected, the card holder name, the last four digits of the credit card number and the transaction date. If a success response is returned, a code will be run to update the customer database to enable the customer to use the paid service. Else, the customer will be redirected to a failed transaction page.
The question: As this is the first time I am designing an e-commerce application, I would like to get some advice. My question is whether there is any need to store what will be stored in the payment gateway separately on a transaction table, prior to transmitting the data to the gateway as a form of verification or for accounting purposes. It would be great to hear from those who have actual experience on designing e-commerce application. Thank you!
Assuming that your not referring to storing (or even having access to) card data (number/cvv etc) which is a completely different kettle of fish, I would suggest you store whatever you can whenever you can;