Credit Card Validation

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Credit Card Validation





    Does any one know how to check the algorithm of the credit card number that
    was entered in the text box? I want to be able to make sure the users enter
    correct credit card number since we will process it manually via phone. I
    want this to be done on the server side behind the code in ASP.Net. Thanks


    Grant Guest

  2. Similar Questions and Discussions

    1. From validation? [ credit card ]
      I want to have a form in my director movie where the user enters their credit card details. Does anyone know how I can validate the number to see...
    2. Credit Card processing...
      Hello there.... I would like my users on my site to be able to pay with credit cards and I need an "immediate" validation and transffer... Can...
    3. Credit card integration
      Hi, we would like to be able to let our clients pay by credit card on our website. Right now the clients can buy after opening an account with us...
    4. [PHP] Credit card/Debit card validation
      I have a mod10 validation script written in another scripting language. I could try to convert it if you would like but I am sure that someone has...
    5. Credit card/Debit card validation
      Does anyone know of a PHP routine to validate Credit/Debit cards? I've seen some convoluted Javascript scripts but want a PHP version so validation...
  3. #2

    Default Re: Credit Card Validation

    Take a look at this site.

    [url]http://www.merriampark.com/anatomycc.htm[/url]

    "Grant" <Grant@nutrikids.com> wrote in message
    news:u$vJ8X6SDHA.3132@tk2msftngp13.phx.gbl...
    >
    >
    >
    >
    > Does any one know how to check the algorithm of the credit card number
    that
    > was entered in the text box? I want to be able to make sure the users
    enter
    > correct credit card number since we will process it manually via phone. I
    > want this to be done on the server side behind the code in ASP.Net. Thanks
    >
    >

    vMike Guest

  4. #3

    Default Re: Credit Card Validation

    I have a credit card validation sample on my web site in the code library:
    [url]www.aboutfortunate.com[/url]

    It's titled: Regular expression credit card validation. I haven't
    implemented a way to search the database yet, but if you set the first drop
    down list to: Web or Windows, and the second drop down to: JavaScript it
    will limit the library to just that entry.

    --
    S. Justin Gengo
    Web Developer / Programmer

    Free Code Library At:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Grant" <Grant@nutrikids.com> wrote in message
    news:u$vJ8X6SDHA.3132@tk2msftngp13.phx.gbl...
    >
    >
    >
    >
    > Does any one know how to check the algorithm of the credit card number
    that
    > was entered in the text box? I want to be able to make sure the users
    enter
    > correct credit card number since we will process it manually via phone. I
    > want this to be done on the server side behind the code in ASP.Net. Thanks
    >
    >

    S. Justin Gengo Guest

  5. #4

    Default Re: Credit Card Validation

    Here is an access function for generic card testing which might help you
    also.

    Function CreditCardCheckDigit(strCreditCard As String) As Boolean
    Dim intLength As Integer
    Dim intEvenSum As Integer
    Dim intOddSum As Integer
    Dim i As Integer
    CreditCardCheckDigit = False
    On Error GoTo Errorhandler
    intEvenSum = 0
    intOddSum = 0
    intLength = Len(strCreditCard)
    If intLength Mod 2 = 1 Then strCreditCard = "0" & strCreditCard ' for
    amex
    For i = 1 To intLength - 1
    If i Mod 2 = 0 Then
    intEvenSum = intEvenSum + CInt(Mid(strCreditCard, i, 1))
    ElseIf CInt(Mid(strCreditCard, i, 1)) = 9 Then
    intOddSum = intOddSum + 9
    Else
    intOddSum = intOddSum + CInt(Mid(strCreditCard, i, 1)) * 2 Mod 9
    End If
    Next i
    If Right(CStr(1000 - (intEvenSum + intOddSum)), 1) =
    CInt(Right(strCreditCard, 1)) Then
    CreditCardCheckDigit = True
    End If


    Exit Function
    Errorhandler:
    MsgBox "Credit Card Check Digit function failed."

    End Function
    "Grant" <Grant@nutrikids.com> wrote in message
    news:u$vJ8X6SDHA.3132@tk2msftngp13.phx.gbl...
    >
    >
    >
    >
    > Does any one know how to check the algorithm of the credit card number
    that
    > was entered in the text box? I want to be able to make sure the users
    enter
    > correct credit card number since we will process it manually via phone. I
    > want this to be done on the server side behind the code in ASP.Net. Thanks
    >
    >

    vMike Guest

  6. #5

    Default Re: Credit Card Validation

    Client Side JavaScript (quite full featured):
    [url]http://freshmeat.net/releases/112097/[/url]

    Someone has already posted a VB.NET version, so no need to go there. I have
    a C# version somewhere, if that is a need.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    ************************************************** **************************
    ****
    Think Outside the Box!
    ************************************************** **************************
    ****
    "Grant" <Grant@nutrikids.com> wrote in message
    news:u$vJ8X6SDHA.3132@tk2msftngp13.phx.gbl...
    >
    >
    >
    >
    > Does any one know how to check the algorithm of the credit card number
    that
    > was entered in the text box? I want to be able to make sure the users
    enter
    > correct credit card number since we will process it manually via phone. I
    > want this to be done on the server side behind the code in ASP.Net. Thanks
    >
    >

    Cowboy \(Gregory A. Beamer\) Guest

  7. #6

    Default Re: Credit Card Validation

    > Someone has already posted a VB.NET version, so no need to go there. I
    have
    > a C# version somewhere, if that is a need.
    >
    I would greatly appreciate the C# version :))
    Ron


    Ron C. Guest

  8. #7

    Default Re: Credit Card Validation

    Ron:

    I have tweaked the Mod10 to make it a bit cleaner (the original was
    converted from a VB project):

    public bool CheckMod10(string cardNumber)
    {
    char[] cardNums = cardNumber.Trim().ToCharArray();
    int cardLength = cardNums.Length;
    bool lengthCardEven = ((cardNums.Length%2)==0);
    int checkValue=0;
    int currentValue=0;

    for(int counter=0;counter<cardNums.Length;counter++)
    {

    if((((counter%2)==0)&&(lengthCardEven))||(((counte r%2)==1)&&(!lengthCardEven
    )))
    currentValue = Convert.ToInt32(cardNums[counter].ToString())*2;
    else
    currentValue = Convert.ToInt32(cardNums[counter].ToString());

    if(currentValue>=10)
    currentValue -= 9;

    checkValue += currentValue;
    }

    return checkValue%10==0 ? true : false;
    }

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA
    Author: ADO.NET and XML: ASP.NET on the Edge

    ************************************************** **************************
    ****
    Think Outside the Box!
    ************************************************** **************************
    ****
    "Ron C." <rcraven@net9.cc> wrote in message
    news:%23ou8xGpTDHA.3192@tk2msftngp13.phx.gbl...
    > many thanks
    > Ron
    >
    >

    Cowboy \(Gregory A. Beamer\) Guest

  9. #8

    Default Credit card validation

    I'm looking for a very simple credit card form field validator/extension
    just to simply check if the number entered in the number field is valid?

    Any pointers??

    TIA

    Grant


    Grant Berkeley Guest

  10. #9

    Default Re: Credit card validation

    You didnt mention the language you were using, but do a search on google and
    you`ll find a load of pre written code for the language you need.

    You`ll need to search for "mod 10 algorithm", which is the formula used for
    validating a credit card number has been entered correctly.

    Theres a good article at the address below, its for PHP, but it explains the
    principles and can be adapted for other languages.

    [url]http://www.sitepoint.com/article/card-validation-class-php[/url]

    gareth Guest

  11. #10

    Default Credit Card Validation

    Hello,

    I'm trying to find an extension for validating fake or false credit cards.
    I've read this site: [url]http://www.15seconds.com/issue/970101.htm[/url]

    It would be great if DW has an extension for this.

    OALI Guest

  12. #11

    Default Re: Credit Card Validation

    [url]http://www.interaktonline.com/Products/Dreamweaver-Extensions/FormValidation/Features/Details/Comprehensive+validation+rules.html?id_ftr=12[/url]

    or

    [url]http://www.webassist.com/Products/ProductFeatures.asp?PID=33[/url]


    if your using DW8 check to see that either support it at this time, I have
    used both on DW2004 with out any problem.

    regards

    Kenny










    "OALI" <webforumsuser@macromedia.com> wrote in message
    news:dh3vj1$ati$1@forums.macromedia.com...
    > Hello,
    >
    > I'm trying to find an extension for validating fake or false credit cards.
    > I've read this site: [url]http://www.15seconds.com/issue/970101.htm[/url]
    >
    > It would be great if DW has an extension for this.
    >

    Twocans Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139