asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search








Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Code Samples
Components
Tools
New
Free
Downloads
Vendors
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!


<HTML>
<HEAD>
<TITLE>ASPCharge Test Form</TITLE>
</HEAD>
<CENTER>
<H1>ASPCharge Test Form</H1>
</CENTER>
<%If Request.ServerVariables("Content_Length")>0 Then
  Set charger = Server.CreateObject( "ASPCharge.CC" )
  charger.ICVerifyCommand = "c:\inetpub\icverify\icverify.cmd"
  charger.Logging = "c:\inetpub\icverify"
  charger.DataDir = "c:\inetpub\icverify\datadir"
  charger.Timeout = 45
  charger.Name = Trim(Request("First")) + " " + Trim(Request("Last"))
  charger.ProductCode = Trim(Request("Product"))
  charger.Address = Trim(Request("Address1"))
  charger.City = Trim(Request("City"))
  charger.State = Trim(Request("State"))
  charger.Zip = Trim(Request("Zip"))
  charger.Country = Trim(Request("Country"))
  charger.Amount = Trim(Request("Cost"))
  charger.CCType = Trim(Request("CCType"))
  charger.CCNum = Trim(Request("CCNum"))
  charger.CCMonth = Trim(Request("CCMon"))
  charger.CCYear = Trim(Request("CCYear"))

  charger.TestMode=0
  
  charger.Go()
  	
  CCError=charger.LastError

  if charger.Cleared = "Y" Then
    Response.Write("Thank you," & Request("First") & " for purchasing a " & Request("Product") & ".  We appreciate your business.<P>")
	Application("NextTestLicense") = Application("NextTestLicense") + 1

    Response.Write("Your unique order number is " & Application("NextTestLicense"))
  elseif charger.Cleared = "N" Then
    Response.Write("I'm sorry your card was declined.")
  elseif charger.Cleared = "X" Then
    if charger.LastError = 1006 Then
	  Response.Write("ASPCharge detected a duplicate charge and did not charge the credit card.")
	else  
	  Response.Write("ASPCharge responded with a code of " & charger.LastError & "<BR>")
      Response.Write("The code: " & charger.LastErrorMsg)
	end if
  else
    Response.Write("This shouldn't ever be seen!")
  end if
  
  Response.Write("<P>")
  
else
%>
  <CENTER>
  <FONT SIZE="+3">Pretend to buy a Blue Squirrel Coffee Mug</FONT>
  <BR>
  <FONT SIZE="2" COLOR="Red">Not Real - Credit card will not be charged.<BR>Try valid or invalid information and see how ASPCharge responds.<BR>Note: ASPCharge will be in test-mode and will not contact the clearinghouse.<BR>These are just sample responses.  All messages can be customized.</FONT>
  <P>
  </CENTER>
  
  <FORM ACTION="<%=Request.ServerVariables("SCRIPT_NAME")%>" METHOD=POST>
  <table border=0 width=610>
	<tr>
    <th align=right>First:</th>
    <th align=left><INPUT type="text" size="20" name="First"></th>
    <td> </td>
    <th align=right>Last:</th>
    <th align=left><INPUT type="text" size="20" name="Last"></th>
	</tr>
	<tr>
    <th align=right>E-mail:</th>
    <th align=left><INPUT type="text" size="20" name="Email"></th>
    <td> </td>
    <th align=right>Phone:</th>
    <th align=left><INPUT type="text" size="20" name="Phone"></th>
	</tr>
	<tr>
    <th align=right>Address:</th>
    <th align=left><INPUT type="text" size="20" name="Address1"></th>
    <td> </td>
    <th align=right>Address:</th>
    <th align=left><INPUT type="text" size="20" name="Address2"></th>
	</tr>
	<tr>
    <th align=right>City:</th>
    <th align=left><INPUT type="text" size="20" name="City"></th>
    <td> </td>
    <th align=right>State:</th>
    <th align=left><INPUT type="text" size="20" name="State"></th>
	</tr>
	<tr>
    <th align=right>Postal Code:</th>
    <th align=left><INPUT type="text" size="20" name="Zip"></th>
    <td> </td>
    <th align=right>Country:</th>
    <th align=left><INPUT type="text" size="20" name="Country" value="United States"></th>
	</tr>
  </table>
  
  <INPUT TYPE="HIDDEN" NAME="Product" VALUE="Blue Squirrel Coffee Mug">
  <INPUT TYPE="HIDDEN" NAME="Cost" VALUE="12.95">
  
  <HR>
<DD><STRONG>Charge To:</STRONG>
<SELECT NAME="CCType">
<OPTION SELECTED="SELECTED" VALUE="MasterCard">MasterCard
</OPTION>
<OPTION VALUE="Visa">Visa
</OPTION>
<OPTION VALUE="American Express">American Express
</OPTION>
<OPTION VALUE="Discover">Discover Card
</OPTION>
<OPTION VALUE="Novus">Novus
</OPTION>
</SELECT>
<DD>
<INPUT TYPE="text" NAME="CCNum" SIZE=32 MAXLENGTH="120"> Credit Card #
<DD><select name="CCMon" size=1>
<option>(month)</option><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option>
<option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option></select>
<select name="CCYear" size=1>
<option>(year)</option><option>97</option><option>98</option><option>99</option><option>00</option><option>01</option></select>
expiration date (month / year)
</DL>
<INPUT TYPE=submit VALUE="Register"> <INPUT TYPE=reset VALUE="Clear">
<%end if%>

</HTML>





email this code sample to a colleague

Related Products
A$Pcharge
A$PCharge is a COM wrapper for the ICVerify interface that allows you to charge credit cards from your Active Server Pages in real-time over a modem. A$PCharge also can communicate with TCP/IP credit card clearing networks, Epoch or CyberSource, with no additional software or hardware required.
[Top]

Support the Active Server Industry



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES