rodgerfields
Programmer
Friends,
I'm writing my first "e-Commerce" web site and need some help.
Existing pages have taken the customer's order and linked him up to Authorize.net, a credit card authorization system, which asks him/her for their cc information, accepts or rejects the transaction, and returns a ton of information to me.
I need to know how to grab that information so I can log it (to a text file now and to a db later). I've gotten sample code that uses WinHTTP, but it outputs the data to the other server; I need to INPUT it. (And I don't know that technology anyway!) For what it's worth,here's that code (in part). If I can use it with a few corrections, that would be fine.
=============================================
<%
'
'(snipped code builds data items for the POST)
'
' Create the object.
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5"
' Set the parameters.
objWinHttp.Open "POST", " & PostData
' Send it.
objWinHttp.Send
' Authorize.Net does its thing to the transaction request, and then returns the
' response string back to our object.
' Get the response string from the object.
strResponse = objWinHttp.ResponseText
'Put response string into an array.
arrResponseValues = Split(strResponse, "|", -1, 1)
%>
=============================================
The data coming to me (from the credit card gateway) *is* in the form of name/value pairs. So should I use a VBScript "dictionary object"? If so, how do I assign it to the incoming data (or vice versa)? Does it come in as a Response object already? What?
As you can tell, I'm in over my head. But I can hack through code pretty well; I just need a push in the right direction.
Any suggestions? I'd be more than grateful.
Rodger Fields
Austin, Texas
rodger_fields@hotmail.com
Rodger Fields
Software Engineer
Pflugerville, Texas (suburb of Austin)
I'm writing my first "e-Commerce" web site and need some help.
Existing pages have taken the customer's order and linked him up to Authorize.net, a credit card authorization system, which asks him/her for their cc information, accepts or rejects the transaction, and returns a ton of information to me.
I need to know how to grab that information so I can log it (to a text file now and to a db later). I've gotten sample code that uses WinHTTP, but it outputs the data to the other server; I need to INPUT it. (And I don't know that technology anyway!) For what it's worth,here's that code (in part). If I can use it with a few corrections, that would be fine.
=============================================
<%
'
'(snipped code builds data items for the POST)
'
' Create the object.
Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5"
' Set the parameters.
objWinHttp.Open "POST", " & PostData
' Send it.
objWinHttp.Send
' Authorize.Net does its thing to the transaction request, and then returns the
' response string back to our object.
' Get the response string from the object.
strResponse = objWinHttp.ResponseText
'Put response string into an array.
arrResponseValues = Split(strResponse, "|", -1, 1)
%>
=============================================
The data coming to me (from the credit card gateway) *is* in the form of name/value pairs. So should I use a VBScript "dictionary object"? If so, how do I assign it to the incoming data (or vice versa)? Does it come in as a Response object already? What?
As you can tell, I'm in over my head. But I can hack through code pretty well; I just need a push in the right direction.
Any suggestions? I'd be more than grateful.
Rodger Fields
Austin, Texas
rodger_fields@hotmail.com
Rodger Fields
Software Engineer
Pflugerville, Texas (suburb of Austin)