- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm sorry if this has already been discussed, I did do a search. I am very new to asp and have been trying to set up just a very basic relay response. I tried using the relayresponse.asp sample that authorize.net supplies to no avail. I am pretty sure I don't need to put in my api login id or tran key for just a relay page but maybe I am wrong? After going over the basics fo the relay response page I have discovered that there is an issue with the asp page itselt, I always get an internal 500 error when accessing my .asp page directly via web browser. This would confirm the standard timeout error I get from authorize.net. Here is a copy of what the server log says:
"
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 3, near "0 <--> Dim" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Dim?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] String found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 16, at end of line <--> (Might be a runaway multi-line '' string starting on line 6) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before ' Retrieving and defining Form Data from Post command body from Authorize.Net <--> ResponseCode = Trim(Request.Form("x_response_code")) <--> ResponseReasonText = Trim(Request.Form("x_response_reason_text")) <--> ResponseReasonCode = Trim(Request.Form("x_response_reason_code")) <--> AVS = Trim(Request.Form("x_avs_code")) <--> TransID = Trim(Request.Form("x_Trans_ID")) <--> AuthCode = Trim(Request.Form("x_Auth_Code")) <--> Amount = Trim(Request.Form("x_Amount")) <--> ReceiptLink = "http://www.authorizenet.com" <--> '?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 16, near "Print" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Print?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 26, near "'Test to see if this is a test transaction. <--> \tIf TransID = "0" and ResponseCode = "1" Then <--> \t'If" <--> (Might be a runaway multi-line '' string starting on line 24) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before If?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 41, near ""371" align" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before align?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 43, near ""3" color" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before color?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 43, near ""#000000" face" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before face?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 44, near "<br> <--> \t\t This" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before This?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 55, near "tr> <--> \t\t<th width="312"><font size="3" color="#000000" face="Verdana, Arial, Helvetica, sans-serif">This" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 63, near "tr> <--> \t\t<th colspan="2"><font size="3" color="Red" face="Verdana, Arial, Helvetica, sans-serif">There" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 72, near "/font></td" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before td?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 73, near ""2" color" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before color?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 73, near ""black" face" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before face?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 80, near ""0" <--> \t\t\tResponse" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Response?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] String found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 80, near "Write "Not Applicable."" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Do you need to predeclare Write?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 81, near ""Not Applicable." <--> \t\tCase" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Case?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 90, near ""000000" <--> \t\t\tResponse" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Response?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] String found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 90, near "Write "Not Applicable."" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Do you need to predeclare Write?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] Bareword found where operator expected at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 91, near ""Not Applicable." <--> \t\tCase" <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [debug] \t(Missing operator before Case?) <-->
[Sun Nov 06 13:58:19 2011] [error] [asp] [5851] [error] error compiling relayresponse.asp: Invalid range "t-a" in transliteration operator at /var/www/vhosts/sim-savvy.com/httpdocs/reciept/relayresponse.asp line 138. <--> , /usr/lib/perl5/vendor_perl/5.8.8/Apache/ASP.pm line 1468
[Sun Nov 06 13:58:42 2011] [error] [client 184.167.244.140]
Here is the relayresponse.asp code: straight from the sample;
<% Response.Expires = 0 Dim ResponseCode, ResponseReasonText, ResponseReasonCode, ResponseSubcode, AVS, ReceiptLink, TransID Dim Amount, AuthCode ' Retrieving and defining Form Data from Post command body from Authorize.Net ResponseCode = Trim(Request.Form("x_response_code")) ResponseReasonText = Trim(Request.Form("x_response_reason_text")) ResponseReasonCode = Trim(Request.Form("x_response_reason_code")) AVS = Trim(Request.Form("x_avs_code")) TransID = Trim(Request.Form("x_Trans_ID")) AuthCode = Trim(Request.Form("x_Auth_Code")) Amount = Trim(Request.Form("x_Amount")) ReceiptLink = "http://www.authorizenet.com" 'Print a receipt page %> <html> <head> <title>Transaction Receipt Page</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body bgcolor="#FFFFFF"> <% 'Test to see if this is a test transaction. If TransID = "0" and ResponseCode = "1" Then 'If so, print it to the screen, so we know that the transaction will not be processed. %> <table align="center"> <tr> <th><font size="5" color="red" face="arial">TEST MODE</font></th> <tr> <th valign="top"><font size="1" color="black" face="arial">This transaction will <u>NOT</u> be processed because your account is in Test Mode.</font></th> </tr> </table> <% End If %> <br> <br> <% 'Test to see if the transaction resulted in Approvavl, Decline or Error Select Case ResponseCode Case "1" %> <table align="center"> <tr> <th><font size="3" color="#000000" face="Verdana, Arial, Helvetica, sans-serif">This transaction has been approved.</font></th> </tr> </table> <% Case "2" %> <table align="center"> <tr> <th width="312"><font size="3" color="#000000" face="Verdana, Arial, Helvetica, sans-serif">This transaction has been declined.</font></th> </tr> </table> <% Case Else %> <table align="center"> <tr> <th colspan="2"><font size="3" color="Red" face="Verdana, Arial, Helvetica, sans-serif">There was an error processing this transaction.</font></th> </tr> </table> <% End Select %> <br> <br> <table align="center" width="60%"> <tr> <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Amount:</b></font></td> <td align="left"><font size="2" color="black" face="arial">$<%= Amount %></td> </tr> <tr> <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Transaction ID:</b></font></td><td align="left"><font size="2" color="black" face="arial"> <% Select Case TransID Case "0" Response.Write "Not Applicable." Case Else Response.Write TransID End Select %> </td></tr> <tr> <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Authorization Code:</b></font></td><td align="left"><font size="2" color="black" face="arial"> <% Select Case AuthCode Case "000000" Response.Write "Not Applicable." Case Else Response.Write AuthCode End Select %> </td></tr> <tr> <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Response Reason:</b></font></td><td align="left"><font size="2" color="black" face="arial">(<%= ResponseReasonCode %>) <%= ResponseReasonText %></font><font size="1" color="black" face="arial"></td></tr> <tr> <td align="right" width=175 valign=top><font size="2" color="black" face="arial"><b>Address Verification:</b></font></td><td align="left"><font size="2" color="black" face="arial"> <% 'Turn the AVS code into the corresponding text string. Select Case AVS Case "A" Response.Write "Address (Street) matches, ZIP does not." Case "B" Response.Write "Address Information Not Provided for AVS Check." Case "C" Response.Write "Street address and Postal Code not verified for international transaction due to incompatible formats. (Acquirer sent both street address and Postal Code.)" Case "D" Response.Write "International Transaction: Street address and Postal Code match." Case "E" Response.Write "AVS Error." Case "G" Response.Write "Non U.S. Card Issuing Bank." Case "N" Response.Write "No Match on Address (Street) or ZIP." Case "P" Response.Write "AVS not applicable for this transaction." Case "R" Response.Write "Retry. System unavailable or timed out." Case "S" Response.Write "Service not supported by issuer." Case "U" Response.Write "Address information is unavailable." Case "W" Response.Write "9 digit ZIP matches, Address (Street) does not." Case "X" Response.Write "Address (Street) and 9 digit ZIP match." Case "Y" Response.Write "Address (Street) and 5 digit ZIP match." Case "Z" Response.Write "5 digit ZIP matches, Address (Street) does not." Case Else Response.Write "The address verification system returned an unknown value." End Select %> </td> </tr> </table> </body> </html>
Any help is much appreciated!
Solved! Go to Solution.
‎11-06-2011 04:36 PM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I got it all figured out... even though I have only been talking to myself on here. Plesk showed ASP running, but it was probably only working with perl because it was on a UNIX server. #2 got the php to work, the ssl cert for the site is expired, but everything still seams to work now. There should be a sample code for the relay response in PHP available right under the asp classic sample code in the SAMPLE CODE section so people don't have to go mining for it.
‎11-07-2011 09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is looking like my server only allows perl based asp files. What is going to be my best option? Should I just try and get VB asp support?
‎11-06-2011 09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried to get the php relay response page from the SIM php package to work and still get a timeout error. I know the php is working because the sim php example works, maybe I am using the wrong php response file for my relay response? It seems the relay response function is the most difficult thing to setup because it is so touchy yet there is so much less support for its functionality?
‎11-07-2011 09:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok I got it all figured out... even though I have only been talking to myself on here. Plesk showed ASP running, but it was probably only working with perl because it was on a UNIX server. #2 got the php to work, the ssl cert for the site is expired, but everything still seams to work now. There should be a sample code for the relay response in PHP available right under the asp classic sample code in the SAMPLE CODE section so people don't have to go mining for it.
‎11-07-2011 09:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm a little confused - if ASP is running on top of PHP or in PHP syntax or whatever, why not just use PHP all the way instead of ASP?

‎11-07-2011 05:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That is exactly what I am doing now. However, the server in question doesn't have the latest php version, so some of the sample script doesn't work, like the operator === released with php 4.0. It took me 2 days to find the php sample relay response page, the asp classic was the only one listed under the sample downloads.
‎11-07-2011 07:52 PM
