cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie - Need help with integration

I am new to authorize.net and need answers quick because of deadline purposes. i am helping a clinic implement a billing system with authrorize.net and thought i could use the SIM format. I don't know what is going on because i get the error 13... html code is below

 

<html>
<body>
<td>

<!--Log-in ID-->
<login= "0000000000"
transactionKey= "0000000000000000"
amount= "amount"
description= "description"
label= "Submit Payment"
url= "http://secure.authorize.net/gateway/transact.dll">

<font color= "black" size="4" font face= "Verdana" width= "95%"> <div

align="center"> We now offer on-line payments
<br><a href="https://secure.authorize.net/gateway/transact.dll" target=

"_blank"><u><font color="red"> Please click here for secure

payment</font></u></a></br>

<!--includefile-->
<includefile="simlib.asp">
<Form method = post action = "https://secure.authorize.net/gateway/transact.dll">
<%ret = insertFP(APIloginin,sequence, amount, txnkey)%>

<INPUT TYPE= HIDDEN NAME = "x_login" Value = "0000000000">
<INPUT TYPE= HIDDEN NAME = "x_txnkey" VALUE="0000000000000000">
<INPUT TYPE= HIDDEN NAME = "x_type" VALUE= "AUTH_CAPTURE">
<INPUT TYPE= HIDDEN NAME = "x_amount" VALUE = "&amount&">
<INPUT TYPE= HIDDEN NAME = "x_fp_hash" VALUE = "&fingerprint&">
<INPUT TYPE= HIDDEN NAME = "x_fp_sequence" VALUE = "&sequence&">
<INPUT TYPE= HIDDEN NAME = "x_fp_timestamp" VALUE = "&timestamp&">
<INPUT TYPE= HIDDEN NAME = "x_show_form" VALUE = "PAYMENT_FORM">


</td>
</div>
</font>
</form>
</body>
</html>

 

 

It isn't entirely finished, but any help would be great to get this thing running asap. HELP!

latadared
Member
14 REPLIES 14

In the sample code the form is create like so

' Create the HTML form containing necessary SIM post values
Response.Write("<FORM method='post' action='" & url & "' >")
' Additional fields can be added here as outlined in the SIM integration guide
' at: http://developer.authorize.net
Response.Write("	<INPUT type='hidden' name='x_login' value='" & loginID & "' />")
Response.Write("	<INPUT type='hidden' name='x_amount' value='" & amount & "' />")
Response.Write("	<INPUT type='hidden' name='x_description' value='" & description & "' />")
Response.Write("	<INPUT type='hidden' name='x_invoice_num' value='" & invoice & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_sequence' value='" & sequence & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_timestamp' value='" & timeStamp & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_hash' value='" & fingerprint & "' />")
Response.Write("	<INPUT type='hidden' name='x_test_request' value='" & testMode & "' />")
Response.Write("	<INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />")
Response.Write("	<input type='submit' value='" & label & "' />")
Response.Write("</FORM>")

 But your is outside the script <% %>, so all you been doing is passing the string "amount" not the value "1999.99", etc

and more important, do not send the following, with it and the loginID, other can use your account.

<INPUT TYPE= HIDDEN NAME = "x_txnkey" VALUE="0000000000000000"/>

 

 

So, i fixed the </%> sign and now by "Please click here for payment form" won't open anything. I don't know if i am just mixing up all the infomation, but after clicking that button i am suppose to be taked to the form correct?

Did you look at the browser page sources when running it, it will show you what might be causing the problem.

And post your updated code again and see if we can see the problem.

Thanks.. I feel like i am making something super easy into something exteremly difficult. I am now confused as to how integration works. I have pretty nice general skills in C++ and html, but for some reason i am hitting a stump. My code is below..

 Just a refresher, once i get this "submit payment" button working, i should be taken away from my website and to a general form from authorize.net where customers can fill in information except the amount?

 

<HTML lang='en'>

<title> UNHS online bill pay</title>

<%
loginID= "my id"
transactionKey= "my transaction key"
amount= "0000.00"
description = "Sample Transaction"
label= "Submit Payment"
testMode= "false"
url= "http://secure.authorize.net/gateway/transact.dll"

 
Response.Write If Request.Form ("amount") <> ""Then amount = Request.Form ("amount")
End If
 
If Request.Form ("description") <> ""Then description = Request.Form ("description")
End If
 
If Request.QueryString ("amount") <> ""Then amount = Request.QueryString ("amount")
End If
 
If Request.QueryString ("description") <> ""Then description = Request.QueryString ("description")
End If
 
Dim invoice
invoice = Year (Date) & Month (Date)& Day (Date) & Hour (Now) & Minute (Now) & Second (Now)
 
Dim Sequence
Randomize
Sequence = Int(1000*Rnd)
 

Dim timeStamp = GetSecondsSince1970()+(25200)

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


 
Response.Write ("Amount: "&amount&"  <br/>")
Response.Write ("Description: "&description&" <br/>")

 

<!--#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_login" value= "000000000">
<INPUT type = hidden name= "x_version" value= "3.1">
<INPUT type= hidden name="x_amount" value= "0000.00">
<INPUT type=hidden name = "x_method" value="CC">
<INPUT type=hidden name="x_type" value = "CAPTURE_ONLY">
<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_show_form" value= "PAYMENT_FORM">
<INPUT type= submit value="Please click here for secure payment.">

</%>
</Form>

 

</HTML>

From the sample code, see if you can just download the sample code and change the loginid, transactionKey and the url.

<!--
This sample code is designed to connect to Authorize.net using the SIM method.
For API documentation or additional sample code, please visit:
http://developer.authorize.net

Most of this page can be modified using any standard html. The parts of the
page that cannot be modified are noted in the comments.  This file can be
renamed as long as the file extension remains .asp
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
  "http://www.w3.org/TR/html4/loose.dtd">
<HTML lang='en'>
<HEAD>
	<TITLE> Sample SIM Implementation </TITLE>
</HEAD>
<BODY>

<!-- This section generates the "Submit Payment" button using ASP           -->
<!--#INCLUDE FILE="simlib.asp"-->
<%
' the parameters for the payment can be configured here
' the API Login ID and Transaction Key must be replaced with valid values
Dim loginID, transactionKey, amount, description, label, testMode, url
loginID			= "API_LOGIN_ID"
transactionKey	= "TRANSACTION_KEY"
amount			= "19.99"
description		= "Sample Transaction"
' The is the label on the 'submit' button
label			= "Submit Payment"
testMode		= "false"
' By default, this sample code is designed to post to our test server for
' developer accounts: https://test.authorize.net/gateway/transact.dll
' for real accounts (even in test mode), please make sure that you are
' posting to: https://secure.authorize.net/gateway/transact.dll
url				= "https://test.authorize.net/gateway/transact.dll"

' If an amount or description were posted to this page, the defaults are overidden
If Request.Form("amount") <> "" Then
	amount = Request.Form("amount")
End If
If Request.Form("description") <> "" Then
	description = Request.Form("description")
End If

' also check to see if the amount or description were sent using the GET method
If Request.QueryString("amount") <> "" Then
	amount = Request.QueryString("amount")
End If
If Request.QueryString("description") <> "" Then
	description = Request.QueryString("description")
End If

' an invoice is generated using the date and time
Dim invoice
invoice	= Year(Date) & Month(Date) &  Day(Date) & Hour(Now) & Minute(Now) & Second(Now)
' a sequence number is randomly generated
Dim sequence
Randomize
sequence	= Int(1000 * Rnd)
' a time stamp is generated (using a function from simlib.asp)
Dim timeStamp
timeStamp = simTimeStamp()
' a fingerprint is generated using the functions from simlib.asp and md5.asp
Dim fingerprint
fingerprint = HMAC (transactionKey, loginID & "^" & sequence & "^" & timeStamp & "^" & amount & "^")

' Print the Amount and Description to the screen.
Response.Write("Amount: " & amount & " <br />")
Response.Write("Description: " & description & " <br />")

' Create the HTML form containing necessary SIM post values
Response.Write("<FORM method='post' action='" & url & "' >")
' Additional fields can be added here as outlined in the SIM integration guide
' at: http://developer.authorize.net
Response.Write("	<INPUT type='hidden' name='x_login' value='" & loginID & "' />")
Response.Write("	<INPUT type='hidden' name='x_amount' value='" & amount & "' />")
Response.Write("	<INPUT type='hidden' name='x_description' value='" & description & "' />")
Response.Write("	<INPUT type='hidden' name='x_invoice_num' value='" & invoice & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_sequence' value='" & sequence & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_timestamp' value='" & timeStamp & "' />")
Response.Write("	<INPUT type='hidden' name='x_fp_hash' value='" & fingerprint & "' />")
Response.Write("	<INPUT type='hidden' name='x_test_request' value='" & testMode & "' />")
Response.Write("	<INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' />")
Response.Write("	<input type='submit' value='" & label & "' />")
Response.Write("</FORM>")
%>
<!-- This is the end of the code generating the "submit payment" button.    -->

</BODY>
</HTML>

Also, can you post the browser page source?