Hi, i am trying to validate credit card.

I want to validate credit card

1> name on card
2> card number
3> card type (visa,mastercard... etc)
4> cvv
5> expiry date

I seared on google but most of links gives information to validate card according to number.

How to do this? any sample link how to do this? or script ?

8 Years
Discussion Span
Last Post by mschroeder

Hi, can you explain it to me.

How verified these details with paypal but not the payment transfer...

Only credit card verification with above inputs??


You could verify the credit card number using the Luhn Algorithm. http://en.wikipedia.org/wiki/Luhn_algorithm There is a link at the bottom for an example of a php algorithm.

There are some resources I have seen online that describe the particulars of most major card providers in terms of length of card number, general acceptable ranges, as well as what to look for in terms of CVV's and often how frequently they expire.

Besides checking if the number is valid, the date is not expired and the other fields are filled in, I agree with pritaeas that the best way to do this would be through your payment gateway of choice.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.