home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2001 March
/
PCWorld_2001-03_cd.bin
/
Software
/
Topware
/
aspedit
/
_SETUP.1
/
cctest.asp
< prev
next >
Wrap
Text File
|
1998-12-22
|
2KB
|
78 lines
<html>
<!-- Test Script for credit card information -->
<!-- (c) 1998 by Click Online -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<!-- #include file="ccheck.inc"-->
<title>Click Online Credit Card Test </title>
</head>
<body
<%
response.write "text=""" & textcol1 &_
""" link=""" & textlink &_
""" vlink=""" & textvlink &_
""" alink=""" & textalink &_
""" background=""../images/" &_
bgimgurl & """ bgcolor=""" &_
bgcolor & """" %>>
<p><%number=request("number")
cctype=request("cctype")
if number<>"" then
chk=checkcc(number,cctype)
response.write "<br>Result: "
select case chk
case 0
response.write "Card is ok!"
case 1
response.write "Wrong card type"
case 2
response.write "Wrong length"
case 3
response.write "Wrong length and card type"
case 4
response.write "Wrong checksum"
case 5
response.write "Wrong checksum and card type"
case 6
response.write "Wrong checksum and length"
case 7
response.write "Wrong checksum, length and card type"
case 8
response.write "unknown cardtype"
end select
else
response.write "Please enter a card number"
end if%></p>
<form method="POST">
<p>Card number: <input type="text" name="number" size="20"
value="<%=number%>"></p>
<p>Type: <select name="cctype" size="1">
<option value="V" <%if cctype="V" then response.write "selected"%>>
VISA</option>
<option value="M" <%if cctype="M" then response.write "selected"%>>
Mastercard/Eurocard</option>
<option value="A" <%if cctype="A" then response.write "selected"%>>
American Express</option>
<option value="C" <%if cctype="C" then response.write "selected"%>>
Diners Club / Carte Blanche</option>
<option value="D" <%if cctype="D" then response.write "selected"%>>
Discover</option>
<option value="E" <%if cctype="E" then response.write "selected"%>>
enRoute</option>
<option value="J" <%if cctype="J" then response.write "selected"%>>
JCB</option>
<option value="U" <%if cctype="U" then response.write "selected"%>>
unknown cardtype (test)</option>
</select></p>
<p><input type="submit" value="Test it!" name="B1"></p>
</form>
<p>⌐ 1998 by <a href="http://www.click-online.de">Click Online</a></p>
</body>
</html>