Infographic – Check if a Credit Card is Valid or Invalid/Fake

We stumbled upon an interesting infographic and couldn’t stop us from sharing it with our readers. Credit Card or CC is an essential and prominent financial product these days, usually owned by a majority of users to buy goods and services. If you’re a Credit Card or Debit Card holder, then you must have noticed the 16-digit numeric code inscribed on the card. But as most of you might wonder, those 16 numbers aren’t given randomly but serves an important purpose. According to an amazing algorithm by Mint.com, one can simply crack the credit card code and determine if the card number is invalid or fake. Sounds weird? Just try it on your CC and make sure to do the math right!

How to Validate a Credit Card with your Mind –

Cracking Credit Card Code

We tried this trick on a valid Credit Card and a Debit Card as well (both Visa), and surprisingly the result turned out true as the final sum was divisible by 10. Do try this out and remember to follow the described steps carefully. 🙂

Source: Mint.com

Mayur

Mayur Agarwal is the founder and editor-in-chief of WebTrickz. As a Technology enthusiast and an Internet addict, he loves sharing useful How To’s and Tips & Tricks. Follow him @mayurjango on Twitter.

4 Responses

  1. Awesome Buddy!!

    I tried with 3 cards, and the numbers were divisible by 3.. :0

  2. Hello says:

    Is this correct:

    4417-1427-9732-7711
    8 2 2 4 8 6 14 2

    8+4+7+2+7+4+4+2+3+7+6+8+1+2+14+7=86

    86/10 = Invalid Card

  3. Rick Clark says:

    Just to clarify what this article is saying… you cannot tell if a card IS VALID using this method. But you can pick out obviously fake ones.

    Even if a card does pass this check, it could still be invalid. If a card does not pass this check, it is definitely a fake.

    Here is the code in PHP if you want to use it in your web application:

    <?php

    // SET THE CARD NUMBER TO BE TESTED
    $card_number = '';

    // TEST THE CARD NUMBER
    if (is_card_fake($card_number)) {
    print "It's Possible This Card Is Valid";
    }
    else {
    print "Card Cannot Possibly Be Valid.";
    }

    function is_card_fake($card_number) {

    $number_sum = 0;

    // SPLIT THE CARD NUMBER INTO 16 INDIVIDUAL DIGITS
    $digits = preg_split('//', $card_number, -1, PREG_SPLIT_NO_EMPTY);

    // LOOP THROUGH THE DIGITS
    for ($i = 0; $i 9) {
    $doubled_digits = preg_split(‘//’, $double_number, -1, PREG_SPLIT_NO_EMPTY);
    $number_sum += $doubled_digits[0] + $doubled_digits[1];
    }
    // OTHERWISE, JUST ADD THE DOUBLED NUMBER TO THE SUM
    else {
    $number_sum += $double_number;
    }

    }
    // WE DO NOT HAVE TO DOUBLE THESE DIGITS; JUST ADD THEM TO THE SUM
    else {
    $number_sum += $digits[$i];
    }

    }

    // CHECK TO SEE IF THE SUM OF THE DIGITS CAN BE DIVIDED BY 10
    if ($number_sum % 10 == 0) {
    return true;
    }
    else {
    return false;
    }

    }

    ?>

  4. Rick Clark says:

    The code in my last post did not format correctly, but I see no way to edit my previous post. I have pasted the code into SNIPPLR here:

    http://snipplr.com/view/69142/fake-credit-card-checker/

Leave a Reply

Your email address will not be published. Required fields are marked *