LUHN algorithm for credit card check using javascript

Posted by Jiltin     10 December, 2008    4,825 views   

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);
 }

Following Google Searches Lead To This Post: sum check algorithm for javascript
luhn check javascript
luhn algorithm javascript
luhn algorithm scripts
check credit card algorithim php
Luhn algorithm php script
Luhn-algoritmen
luhn javascript validate
luhn javascript
javascript luhn generator
luhn generator java
luhn generator
How to write a java program to check validity of credit card using Luhn Algorithm
js check CC
php luhn10
javascript luhn algorithm
luhn credit card validation online
java Luhn algorithm generator
luhn10 check
luhn check digit generation php
php luhn check
javascript validation for creditcard
javascript credit card luhn
luhn php credit card validation function
luhn algorithm java method
javascript luhn algorithm function
javascript credit card number check
luhn algorithm in javascript
luhn algorithm check digit java
luhn validation javascript
Luhn algorithm generator
credit card javascript algoryth Luhn
a sample program in java script for credit card payment
check digits only using javascript
javascript luhn10
javascript luhn check
credit card generator ohne java oder script
credit card generator without java or script
javascript check card function
credit card generator source algo
algoritmul hans peter luhn
credit card number generator ALGORITHM IN c#
luhn algorithm check examples
CARD LONG NUMBER CHECKER
luhn check online
luhn checker
java luhn algorithmus
luhnCheck javascript
small card validate javascript
luhn code javascript
javascript luhn
luhn check web
online luhn code generator
cc checker C++
javascript in credit
credit card generator java
javascript create luhn check digit
java credit card generator
Luhn algorithm php
credit card validation algorithm java
credit card validation digits javascript
credit card validation digits
java luhn algorithm credit card
Luhn algorithm java function
javascript+Luhn
luhn’s algorithm in js
credit check, javascript
example of php script of luhn algorithm
Payment Card luhn check
CC Check code
LUHN bash
credit card LUHN bash
luhn algorithm credit card c# 20 digits
cc card gen
unix luhn
luhn algorithm checker
calc luhn c#
Luhn’s algorithm java script
/*—————————————————————*/ /* */ /* Function : isCreditCard() */ /* Purpose : Check if cc is LUHN10 */
javascript luhn10 check
ONLINE LUHN GENERATOR
LUHN Algorithm for the card number
luhn algorithm bash
luhn algorithm java generator
credit card luhn check javascript
Credit Card validation in js
luhn check java
javascript algo de LUHN
javascript digit luhn
luhn card generator
java luhn code
to validate Credit card using js code
générateur luhn
luhn check
“Luhn algorithm generator” online free
luhn checker javascript
luhn regex
luhn javascript generate

Post to Twitter  Post to Delicious  Post to Digg    Post to StumbleUpon

Categories : Web & Scripts Tags : ,

Comments
December 9, 2009

The Option themes is awesome, i also on test it on my test site. The author did a good job.

Posted by mac wholesale
February 1, 2010

Account Security, you need to be allowed access to all of the possible accounts for miscellaneous cash (and the list can often include mo

Posted by abercromibe
Leave a comment

(required)

(required)