Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 6
Registered: ‎02-23-2013

x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

[ Edited ]

I'm using AIM and m site has an SSL Certificate through GoDaddy.  I have my own porcessing and receipt page.  using Classic ASP.  The response is sending me to the "https://secure.authorize.net/gateway/transact.dll" page showing the following information:

 

has been approved.|000000|P|0||Mysite Registration Credit Purchase|1.95|CC|auth_capture|10000021|Scott|Jones|||||||||myemail@yahoo.comt||||||||||||TRUE||62F93EB07D6F856DA7458C3FEBE6F9D5|||||||||||||XXXX2222||||||||||||||||||Submit

 

even though I have the x_relay_url set.  I removed the URLs in the merchant interface, so this URL should be the only one it sees.  I also tried the https path for my URL. I tried executing my payment_receipt.asp page standalone and it executes properly.


        <input name="x_delim_data" type="hidden" value="TRUE">
        <input name="x_delim_char" type="hidden" value="|">
        <input name="x_type" type="hidden" value="AUTH_CAPTURE">
        <input name="x_version" type="hidden" value="3.1">
        <input name="x_method" type="hidden" value="CC">
        <input name=" x_tax_exempt" type="hidden" value="TRUE">
        <input name="x_description" type="hidden" value="Mysite Registration Credit Purchase">
        <input name="x_relay_response" type="hidden" value="False">
        <input name="x_relay_url" type="hidden" value="http://www.mysite.com/scripts/payment_receipt.asp">

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

should be true for this

<input name="x_relay_response" type="hidden" value="False">

Member
Posts: 6
Registered: ‎02-23-2013

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

Even thought the documentation says it does,'t apply to AIM,

 

x_relay_response Value: FALSE
Format; FALSE, F, NO, N
Notes: SIM applications use relay response. Set this to false if you are
using AIM.

 

I tried setting it to TRUE.  The response brings me to the

 

https://secure.authorize.net/gateway/transact.dll  page

 

It looks mostly like my page but the logo image is missing and the receipt variables are not getting assigned. To verify whether the varibles are getting Posted back, I do a dump of al the request variables at the top of my page and nothing is being sent back.  The links for my menus are also prefixed with "https://secure.authorize.net/gateway/" so they are not working.

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

[ Edited ]

Sorry missed the AIM thing, I saw the form post and assume it was SIM.

You do not want to use the form post method for AIM, as anyone will be able to see you loginID and transactionKey on the page source.

 

The different is for SIM you form post to authorize.net

AIM you do a web request in code.

 

ASP AIM sample code

http://developer.authorize.net/downloads/samplecode/

 

 

It looks mostly like my page but the logo image is missing and the receipt variables are not getting assigned.

everything need absolute path.

 

To verify whether the varibles are getting Posted back, I do a dump of al the request variables at the top of my page and nothing is being sent back.

You check the Request.Form variables?

 

Member
Posts: 6
Registered: ‎02-23-2013

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

Yes I have a function to dump the Request Form variables.  But now with x_relay_response set to False, I'm sent to the transact.dll page and get the | delimited text string returned, so it doesn't seem like my page is even being reached.  I looked at the sample.asp page and didn't see anything I was missing.  Do I need to set the  Default Receipt Link URL     and the      Receipt Method?

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

[ Edited ]

Are you doing AIM, or SIM? It still sound like you got AIM and SIM mixed up. Basically, SIM is a form post, AIM is a code web request call. If you seeing the delimited text string return in transact.dll, you are still doing SIM, it not just what you send, it how you send it too.

 

Can you post the code that you used to send to authorize.net? and remove you loginID and transactionKey before posting

 

 

Member
Posts: 6
Registered: ‎02-23-2013

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

I'm doing a standard form Post to the 'https://secure.authorize.net/gateway/transact.dll' page.

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Option Explicit %>
<% Response.Buffer=true %>
<!-- #INCLUDE FILE="includes/ForceSSL.inc"-->
<html>
<head>
<title>Item Payment</title>
</head>
<BODY bottomMargin=0 leftMargin=0
rightMargin=0 topMargin=0 marginheight="0"
marginwidth="0" bgcolor="#FFFFFF">

<div id="radiobuttons">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><form action="https://secure.authorize.net/gateway/transact.dll" method="post" name="Payment" id="Payment" onSubmit="return submitforms()">
      <table border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="386" height="20"><span class="text_fb_16">Pricing Information</span></td>
          <td width="10">&nbsp;</td>
          <td height="20"><span class="text_fb_14"><span class="text_fb_16">Payment Information</span></span></td>
          </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td><hr></td>
              </tr>
            </table></td>
          <td width="10">&nbsp;</td>
          <td><hr></td>
          </tr>
        <tr>
          <td height="60" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_b1_fb_gray">
            <tr>
              <td width="50" height="30" align="center"><input name="x_amount" type="radio" class="radio" id="Quantity1" value="$1.95" checked></td>
              <td width="124" height="30" align="center" class="text_fb_14">1</td>
              <td height="30" align="center" nowrap class="text_fb_14">2 Years</td>
              <td width="56" align="center" class="text_fb_14">$1.95</td>
              </tr>
            <tr>
              <td width="50" height="30" align="center"><input name="x_amount" type="radio" class="radio" id="Quantity2" value="$3.75"></td>
              <td width="124" height="30" align="center" class="text_fb_14">2</td>
              <td height="30" align="center" nowrap class="text_fb_14">2 Years</td>
              <td align="center" class="text_fb_14">$3.75</td>
              </tr>
            <tr>
              <td width="50" height="30" align="center"><input type="radio" name="x_amount" class="radio" id="Quantity3" value="$5.50"></td>
              <td width="124" height="30" align="center" class="text_fb_14">3</td>
              <td height="30" align="center" nowrap class="text_fb_14">2 Years</td>
              <td align="center" class="text_fb_14">$5.50</td>
              </tr>
            <tr>
              <td width="50" height="30" align="center"><input type="radio" name="x_amount" class="radio" id="Quantity4" value="$8.95"></td>
              <td width="124" height="30" align="center" class="text_fb_14">5</td>
              <td height="30" align="center" nowrap class="text_fb_14">2 Years</td>
              <td align="center" class="text_fb_14">$8.95</td>
              </tr>
            <tr>
              <td width="50" height="30" align="center"><input type="radio" name="x_amount" class="radio" id="Quantity5" value="$16.95"></td>
              <td width="124" height="30" align="center" class="text_fb_14">10</td>
              <td height="30" align="center" nowrap class="text_fb_14">2 Years</td>
              <td align="center" class="text_fb_14">$16.95</td>
              </tr>
            <tr>
              <td width="50" height="30" align="center">&nbsp;</td>
              <td colspan="2" align="right" nowrap class="text_fb_14">Total Charge To Card:&nbsp; </td>
              <td align="center"><b><div id="DispTotal" class="text_fb_14" style="margin: 0;text-color:blue;"> $0.00</div></b></td>
              </tr>
            </table></td>
          <td width="10" valign="top">&nbsp;</td>
          <td align="center"><table width="70%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td colspan="3"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="table_b1_fb_gray">
                <tr>
                  <td width="1%">&nbsp;</td>
                  <td width="208"><img src="../images/visa.gif" width="43" height="26"><img src="../images/mastercard.gif" alt="" width="41" height="26"><img src="../images/amex.gif" alt="" width="40" height="26"><img src="../images/discover.gif" alt="" width="40" height="26"></td>
                  </tr>
                <tr>
                  <td height="20" align="right" nowrap><span class="text_fb_14">Card Number:</span></td>
                  <td height="20" nowrap><input name="x_card_num" type="text" id="x_card_num" value="4222222222222" size="21" maxlength="19">
                    <span class="text_fb_12">* (enter number without spaces or dashes)</span></td>
                  </tr>
                <tr>
                  <td height="20" align="right" nowrap><span class="text_fb_14">Expiration Date:</span></td>
                  <td height="20" align="left"><label for="x_exp_date"></label>
                    <input name="x_exp_date" type="text" id="x_exp_date" value="1115" size="6">
                    <span class="text_fb_14">* </span><span class="text_fb_12">(mmyy)</span></td>
                  </tr>
                <tr>
                  <td height="20" align="right" nowrap><span class="text_fb_14">CCV:</span></td>
                  <td height="20" align="left"><input name="x_card_code" type="text" id="x_card_code" size="6" maxlength="4">
                    <span class="text_fb_14">* </span><span class="text_fb_12">What's this?</span></td>
                  </tr>
                </table></td>
              </tr>
            <tr>
              <td colspan="3"><hr></td>
              </tr>
            <tr>
              <td colspan="3" align="center"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="table_b1_fb_gray">
                <tr>
                  <td width="1%" height="20" align="right" nowrap class="text_fb_14"><p>First Name:</p></td>
                  <td height="20" align="left"><input name="x_first_name" type="text" id="x_first_name" value="John" size=32 maxlength="75"></td>
                  </tr>
                <tr>
                  <td width="1%" height="20" align="right" nowrap class="text_fb_14">Last Name:</td>
                  <td height="20" align="left"><input name="x_last_name" type="text" id="x_last_name" value="Doe" size=32 maxlength="75"></td>
                  </tr>
                </table></td>
              </tr>
            <tr>
              <td width="35%" align="center">
                <div class="AuthorizeNetSeal">
                  <script type="text/javascript" language="javascript">var ANS_customer_id="zzzzzzzzzzzzzzzzzzzzzzzzzzzz";</script>
                  <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script>
                  <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Online Payments</a></div></td>
              <td width="30%" align="center">
                <p>              
                  <CENTER>
                    <p>
                      <input name="Payment" type=submit id="Payment" onSubmit="return submitforms()" value="Submit">
                      </p>
                    <p>
                      <input type=reset value="Reset Form" onClick="this.form.reset()">
                      </p>
                    </CENTER></td>
              <td width="35%">&nbsp;</td>
              </tr>
            </table></td>
          </tr>
        </table>
        <input name="x_login" type="hidden" value="xxxxxxxxxxx">
        <input name="x_tran_key" type="hidden" value="yyyyyyyyyyyyyyyyyyyy">
        <input name="x_delim_data" type="hidden" value="TRUE">
        <input name="x_delim_char" type="hidden" value="|">
        <input name="x_type" type="hidden" value="AUTH_CAPTURE">
        <input name="x_version" type="hidden" value="3.1">
        <input name="x_method" type="hidden" value="CC">
        <input name=" x_tax_exempt" type="hidden" value="TRUE">
        <input name="x_description" type="hidden" value="Credit Purchase">
        <input name="x_relay_response" type="hidden" value="False">
        <input name="x_relay_url" type="hidden" value="https://www.mysite.com/scripts/payment_receipt.asp">
        </form>
        </td>
  </tr>
</table>
</body>
</html>

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

[ Edited ]

Just as I thought, the way you do it is for SIM/DPM, not AIM, so following the SIM documentation http://developer.authorize.net/api/sim/ or DPM documentation http://developer.authorize.net/api/dpm/

Or start with the AIM sample code http://developer.authorize.net/downloads/samplecode/ if you are really want to use AIM.

 

 

It easy to tell because you are trying to pass<input name="x_tran_key" type="hidden" value="yyyyyyyyyyyyyyyyyyyy">

which anyone can look at the web browser page source and get your credentials.

Member
Posts: 6
Registered: ‎02-23-2013

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

OK.  I'm starting with the sample AIM code.  How do I direct the reponse to be sent to my page?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: x_relay_url sending response to https://secure.authorize.net/gateway/transact.dll instead

[ Edited ]

You don't use relay response for AIM. If you look at the source on the AIM sample, you would see that the response is from the objRequest.Send method.