I have a form for new customers to put in their credit card information or account number. What I would like to do is run java script or PHP code to test if the card is a real card or not using the Luhn Algorithm. This is an algorithm that will determine if the card is a real number (it does not run any transactions, only test the numbers). Would you help me in putting this code inside the form I have. Please see the following links of examples.
Link: hidden link
Link: hidden link
If this is not possible by code is it possible to do the algorithm through a manual mathematical formula and conditional number fields?