Diff for phpPlatonLib/Credit_Card/Attic/Luhn_Check.php between version 1.4 and 1.5
| version 1.4, 2002/05/22 10:51:12 |
version 1.5, 2002/05/22 10:59:25 |
| Line 44 class Credit_Card_Luhn_Check |
|
| Line 44 class Credit_Card_Luhn_Check |
|
| * |
* |
| * This function checks given credit card number according |
* This function checks given credit card number according |
| * Luhn check algorithm. It is published on several places, |
* Luhn check algorithm. It is published on several places, |
| * and also here: |
* and also here: |
| * |
* |
| * http://www.webopedia.com/TERM/L/Luhn_formula.html |
* http://www.webopedia.com/TERM/L/Luhn_formula.html |
| * http://www.merriampark.com/anatomycc.htm |
* http://www.merriampark.com/anatomycc.htm |
| * http://hysteria.sk/prielom/prielom-12.html#3 (Slovak language) |
* http://hysteria.sk/prielom/prielom-12.html#3 (Slovak language) |
| * http://www.speech.cs.cmu.edu/~sburke/pub/luhn_lib.html (Perl lib) |
* http://www.speech.cs.cmu.edu/~sburke/pub/luhn_lib.html (Perl lib) |
| * |
* |
| * @param string $number credit card number |
* @param string $number credit card number |
| * @return bool true if number is valid, otherwise false |
* @return bool true if number is valid, otherwise false |
| */ |
*/ |
| function check($number) |
function check($number) |
| { |
{ |
| if (empty($number) || ($len_number = strlen($number)) <= 0) |
if (empty($number) || ($len_number = strlen($number)) <= 0) |
Platon Group <platon@platon.org> http://platon.org/
|
|