Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
Grant #1
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
-
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... -
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... -
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... -
[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... -
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... -
vMike #2
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...that>
>
>
>
> Does any one know how to check the algorithm of the credit card numberenter> was entered in the text box? I want to be able to make sure the users> 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
-
S. Justin Gengo #3
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...that>
>
>
>
> Does any one know how to check the algorithm of the credit card numberenter> was entered in the text box? I want to be able to make sure the users> 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
-
vMike #4
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...that>
>
>
>
> Does any one know how to check the algorithm of the credit card numberenter> was entered in the text box? I want to be able to make sure the users> 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
-
Cowboy \(Gregory A. Beamer\) #5
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...that>
>
>
>
> Does any one know how to check the algorithm of the credit card numberenter> was entered in the text box? I want to be able to make sure the users> 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
-
Ron C. #6
Re: Credit Card Validation
have> Someone has already posted a VB.NET version, so no need to go there. II would greatly appreciate the C# version :))> a C# version somewhere, if that is a need.
>
Ron
Ron C. Guest
-
Cowboy \(Gregory A. Beamer\) #7
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
-
Grant Berkeley #8
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
-
gareth #9
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
-
OALI #10
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
-
Twocans #11
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



Reply With Quote

