cancel
Showing results for 
Search instead for 
Did you mean: 

Coming from PayPal and Need guidance

We are new to authorize.net and would like to go this foute in favor of our current paypal process.

 

We are a youth sports group where parents register their children for tournaments.

 

1. enter player information and select tournaments on first page (ASP)

2. save entered information on previous form in access db, presents payment page with paypal paynow button

3. paynow button when clicked routes the customer to paypal via the following code:

 

  <input type="hidden" name="cmd" value="_xclick">
  <input type="hidden" name="business" value="paypal@xxxx.com">
  <input type="hidden" name="item_name" value="<%=Request.Form("email")%>">
  <input type="hidden" name="amount" value="<%=(feeplus)%>">
  <input type="hidden" name="item_number" value="<%=(REGID)%>">
  <input type="hidden" name="no_shipping" value="0">
  <input type="hidden" name="no_note" value="1">
  <input type="hidden" name="currency_code" value="USD">
  <input type="hidden" name="notify_url" value="http://www.xxxx.com/register/ipnPayPal.asp">
  <input type="hidden" name="return" value="http://www.xxxx.com">

 

When the transaction is complete in paypal, the ipnpaypal.asp is executed automatically on our site to post paid to the transaction.

 

Can we do this with authorize.net and are there any practice native ASP examples we can use?

pinkstonm
Contributor
29 REPLIES 29

tried to run the following but keep getting simlib.asp not found when infact it is there

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>Untitled 1</title>
</head>

<body>
<!--#INCLUDE FILE=”simlib.asp”-->
<FORM METHOD=POST ACTION= "https://secure.authorize.net/gateway/transact.dll">
<% ret = InsertFP (APIloginid, sequence, amount, txnkey) %>
<INPUT TYPE=HIDDEN NAME="x_version" VALUE="3.1">
<INPUT TYPE=HIDDEN NAME="x_login" VALUE="hidden">
<INPUT TYPE=HIDDEN NAME="x_show_form" VALUE="PAYMENT_FORM">
<INPUT TYPE=HIDDEN NAME="x_method" VALUE="CC">
<INPUT TYPE=HIDDEN NAME="x_amount" VALUE="9.95">
<INPUT TYPE=SUBMIT VALUE="Click here for the secure payment form">
</FORM>

</body>

</html>

Is your code and simlib.asp in the same folder?

Also did you download and look at the sample code. they are different then that in the documentation.

Okay made some progress, got the code to run on my site and got the submit button to display however when I click it I get the following:

 

The following errors have occurred.

(99) This transaction cannot be accepted.

 

here is the cade I placed in my ASP checkout

 

   <INPUT type='hidden' name='x_login' value='blanked out' />
   <INPUT type='hidden' name='x_transactionKey' value='blanked out' />
 <INPUT type='hidden' name='x_amount' value='<%=(feeplus)%>' />
 <INPUT type='hidden' name='x_description' value='2012 Try-Out Fee' />
 <INPUT type='hidden' name='x_invoice_num' value='<%=(REGID)%>' />
 <INPUT type='hidden' name='x_fp_sequence' value='<%=(sequence)%>' />
 <INPUT type='hidden' name='x_fp_timestamp' value='<%=(timestamp)%>' />
 <INPUT type='hidden' name='x_fp_hash' value='<%=(fingerprint)%>' />
 <INPUT type='hidden' name='x_test_request' value='False' />
 <INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />
 <input type='submit' value='Submit Payment' />

DO NOT pass x_transactionKey.

 

And here the tool to test x_fp_hash.

https://developer.authorize.net/tools/responsecode99/

okay confused I still get 99

 

when I did the page you gave me I got a fingerprint, passed that and still got a 99

 

plus fingerprint was equal too

fingerprint = HMAC (transactionKey, loginID & "^" & sequence & "^" & timeStamp & "^" & amount & "^")

 

any other hints on how to get around this

 

should I pass x_trans_key?

 

 


 

Okay got it to work

 

can I get shipping information not to show, are there options to tell it what to show and perhaps pass some of the information?

 

once detail is submitted what happens where do I return to?

I was able to get the hosted payment form to display on the sandbox, we have signed up for a authorize.net account but while we are waiting I am wondering what happens in the flow next after the user fills out the Hosted Payment form.
 
Do I have at my disposal (the asp page that called the hosted payment form) the result of the payment?  Somehow I need to post into our regiatration DB that payment is completed. 

The setting for fields show on the credit card entry screen is on the merchant account

Account - Settings - Payment Form - Form Fields.

 

Receipt Options

Once the info is submitted can either do

Relay Response Basics and Troubleshooting

or

hosted receipt page

 

I implemented the following code I found (relay response asp) which worked but curious as to what generated the email back to the buyer?  I would like to make sure I get a copy and would like to change the title of the email.

<% 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 %>)&nbsp;<%= 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>