Reference: Luhn Algorithm
The Luhn Algorithm is a great way to quickly verify that the user typed their CC # in correctly.
However, I am concerned that there
Yes -- it works for all mainstream card types.
I have a custom PHP class to handle card data that was compiled from various "validate card number" and alike functions from few programming languages + information from Wikipedia & some Payment Processing systems. It successfully validates test card numbers (every payment system has few of such numbers) for these card types: