Forum Moderators: buckworks

Message Too Old, No Replies

ASP and Authorize.net

What is with Authorize.net?

         

bbWS1O

9:33 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



I've seen other posts to this effect:

Why is it so hard to get specific answers on how to actually code in ASP to work with Authorize.net? Sheesh!

It's virtually impossible to figure out how to write simple ASP code to use Authorize.net for processing credit card transactions. The samples they provide are all but useless, and there doesn't seem to be any "freebie" code around to help get this working; all I've found are several people selling their code (for about $50 to $500).

I have a simple dating/personals site where I want to offer members a choice of subscriptions (eg, 1, 3, 6, or 12-month membership) with automatic recurring billing. Sounds simple, right?

Well, not exactly...

Anyone have any working sample code that might help? I should think you'd be doing the whole world--and Authroize.net--a favor!

--Brian

bcolflesh

9:34 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Look here:

loudasp.com/KnowledgeBase/showfaq.asp?faqid=812&catID=17

bcolflesh

9:38 pm on Aug 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Another one:

asp101.com/articles/dan/AuthNetXMLHTTP/default.asp

bbWS1O

9:47 pm on Aug 6, 2003 (gmt 0)

10+ Year Member



Thanks, bcol...

perhaps Dan's article will help!

The loudasp.com link isn't working for me, though...

bmcgee

12:43 am on Aug 7, 2003 (gmt 0)

10+ Year Member



add a "www." in front of the loudasp.com url.

sim511700

8:02 pm on Sep 12, 2003 (gmt 0)

10+ Year Member



This works:

<%
Dim objWinHttp
Dim strResponse
Dim PostData
Dim arrResponseValues
Dim charDelim
' its recommended that you use a tran key over a pw below
'PostData = PostData & "&x_password=TRUE"
'PostData = PostData & "&x_Tran_Key=7fDwz1lo8e7VJwDm"
PostData = PostData & "&x_ADC_Delim_Data=TRUE"
PostData = PostData & "&x_ADC_Delim_Character=¦"
PostData = PostData & "&x_Login=" & Trim(Request("x_Login"))
PostData = PostData & "&x_card_num=" & Trim(Request("x_card_num"))
PostData = PostData & "&x_Exp_Date=" & Trim(Request("x_Exp_Date"))
PostData = PostData & "&x_Email_Customer=" & Trim(Request("x_Email_Customer"))
PostData = PostData & "&x_Email_Merchant=" & Trim(Request("x_Email_Merchant"))
PostData = PostData & "&x_Amount=" & Trim(Request("x_Amount"))
SET objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")
objWinHttp.Open "POST", "https://secure.authorize.net/gateway/transact.dll?" & PostData
objWinHttp.Send
strResponse = objWinHttp.ResponseText
arrResponseValues = Split(strResponse, "¦", -1, 1)
SET objWinHttp = NOTHING

%>
<TABLE WIDTH="60%" ALIGN="CENTER" CELLSPACING="1" CELLPADDING="1" BORDER="1">
<TR>
<TH COLSPAN=2><FONT FACE="ARIEL" COLOR="NAVY">
Response From Authorize.Net
</TH>
</TR>
<%

' Loop through the array showing one table row for each item in
' the response string.

intValue = 1

FOR EACH Item IN arrResponseValues
%>
<TR>
<TD><FONT FACE="ARIEL" COLOR="NAVY"><B>Position# <%= intValue %></B></TD>
<TD><FONT FACE="ARIEL" COLOR="NAVY"><%= Item %></TD>
</TR>
<%
intValue = intValue + 1
NEXT

'Get rid of object
Set objWinHttp = Nothing
%>