Reputation: 5042
I need to validate the credit-card details such as
Card Type
Card Number
Card CVV number
Card Exper Date
My need is to verify all the above details are valid currently.
Could you help me, how to overcome this?
Upvotes: 2
Views: 4367
Reputation: 37700
Magento comes with Really Easy Field Validation in place so you only need to add some classes to the fields in question.
validate-cc-type
or validate-cc-type-select
validate-cc-number
validate-cc-cvn
validate-cc-exp
However the normal payment modules should already be using these so what are you doing that breaks it or otherwise needs CC details?
Upvotes: 4
Reputation: 7001
To answer your question:
The answer is comprehensive and addresses your question properly.
An alternate is to fully hand-off the details and the processing to a 3rd party, which removes the risk on your and the obligation to be PCI-DSS compliant
CVV validation can only be performed through interaction with a provider. Simple rules do exist, for example:
Of course, let me state, that this may not be entirely accurate and you should refer to other, slightly more accurate resources:
Upvotes: 3