2

I am storing the credit card details that the user enters during checkout in the database.

If the user has more than one credit card associated with a user, how can I display those details to the user, and allow him to choose one or enter a new credit card and checkout?

I know that gridview can display the options. Should I add radio buttons in the gridview and go in that direction, or should I dynamically add table rows??

Which is the best way?

Cheran Shunmugavel
  • 7,899
  • 1
  • 28
  • 39
  • 1
    Please make sure you read these answers when storing with sensitive information like credit card numbers: http://stackoverflow.com/questions/4300863/storing-credit-card-number-pci – Kane Aug 31 '12 at 23:12

2 Answers2

0

You don't need to store the full card number, just the last 4.

Some payment gateways can provide options to do a payment by reusing the customers previous payments details, identified by their transactions ids.

Basically you need to store the last 4 digits from the card number and the transaction id of the previous order. You pass this to the payment provider.

Even if you store the full details (card number, cv2, billing address, secure code, expiry date, etc), you might not be able to create a transaction if the card is 3D Secure enrolled.

Adrian Iftode
  • 14,740
  • 3
  • 41
  • 71
0

Some merchants also allow you to setup a customer wallet. This is a unique ID that you can use for future payments.

If you do decide to store the full cc#, I would suggest encrypting it. If someone else gets the list of real cc#'s, all of your customers will be very angry.

But to answer your question, I would allow the customer to give the card they're using a name. Then show the list of names in a gv with rb's.

Tom Collins
  • 3,978
  • 2
  • 18
  • 34