LUHN algorithm for credit card check using javascript
Here is the LUHN algorithm for credit card check using javascript
/* */
/* Function : isCreditCard() */
/* Purpose : Check if cc is LUHN10 */
/* */
/* */
/* Parameters: cc – the cc number */
/* */
/* Returns : boolean */
/* */
/* Usage : isCreditCard(cc) */
/*—————————————————————*/
function isCreditCard( CC )
{
if (CC.length > 19)
return (false);
sum = 0; mul = 1; l = CC.length;
for (i = 0; i < l; i++)
{
digit = CC.substring(l-i-1,l-i);
tproduct = parseInt(digit ,10)*mul;
if (tproduct >= 10)
sum += (tproduct % 10) + 1;
else
sum += tproduct;
if (mul == 1)
mul++;
else
mul–;
}
if ((sum % 10) == 0)
return (true);
else
return (false);
}

The Option themes is awesome, i also on test it on my test site. The author did a good job.
Account Security, you need to be allowed access to all of the possible accounts for miscellaneous cash (and the list can often include mo