Wednesday, April 30, 2008

Javascript for Credit Card Validity

I had a team project at school, making a website which need to input customer data to complete a business transaction.
The transaction needs customer credit card information and of course we must to check the validity of the card number for certain card type.
That's the problem, we didn't know how to make it.Then after I searched, I got information of how to make it and it really works. Fortunately it also helped us to add extra points in our website project.
What we did is just to add a javascript into the head section of webpage (page where user will input the credit card number). The javascript below only for checking 4 types of credit card.
Click this link to get the javascript code:
CardValidity

No comments: