Try the JB Credit Card Validator at http://www.torry.net/creditcards.htm
<http://www.torry.net/creditcards.htm>
Example code from component
If (Length(CCNumber)=16) and (StrToInt(Copy(CCNumber,1,2))>=51) and
(StrToInt(Copy(CCNumber,1,2))<=55) then
CCType:='MASTERCARD'
else If ((Length(CCNumber)=13) or (Length(CCNumber)=16)) and
(CCNumber[1]='4') then
CCType:='VISA'
else If (Length(CCNumber)=15) and ((StrToInt(Copy(CCNumber,1,2))=34)
or (StrToInt(Copy(CCNumber,1,2))=37)) then
CCType:='AMEX'
else If (Length(CCNumber)=14) and
((((StrToInt(Copy(CCNumber,1,2))=36) or (StrToInt(Copy(CCNumber,1,2))=38)))
or ((StrToInt(Copy(CCNumber,1,2))>=300) and
(StrToInt(Copy(CCNumber,1,3))<=305))) then
CCType:='Diners Club'
else If (Length(CCNumber)=16) and (CCNumber[1]='3') then
CCType:='JCB'
else If (Length(CCNumber)=15) and
((StrToInt(Copy(CCNumber,1,4))=2131) or (StrToInt(Copy(CCNumber,1,4))=1800))
then
CCType:='JCB'
-----Original Message-----
From: Alex Kouznetsov [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, 17 October 2002 14:09
To: Multiple recipients of list delphi
Subject: [DUG]: Detecting credit card type by card number
Can anyone point me to any sort of code, component etc which would
allow to
obtain credit card type (visa, amex etc) by credit card number ?
Thanks
Alex
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List -
[EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
DISCLAIMER: This electronic message together with any attachments is
confidential. If you are not the intended recipient, do not copy, disclose or
use the contents in any way. Please also advise us by return e-mail that you
have received the message and then please destroy. Carter Holt Harvey is not
responsible for any changes made to this message and / or any attachments after
sending by Carter Holt Harvey. We use virus scanning software but exclude all
liability for viruses or anything similar in this email or any attachment.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/