Authorize.net Transaction Details API and Classic ASP

gabbermaikel

New Member
I have a Classic ASP Script that goes out to Authorize.net's Transaction Detail API to see what customers have declined. The script work great except for two issues I have.[*]How do you show itemized items ex: Response.Write objResponse.selectSingleNode("/*/api:declineCount").Text[*]I can't figure out how I could link this info with my customers. The database stories the customer's Subscription ID but it doesn't seem to be included in the Output of the API.Any help or suggestions great appreciated!Thanks in advance for the help!Francis G
  • SCRIPT BELOW TO PULL TRANSACTION DETAILS...\[code\]strXML = "<?xml version=""1.0"" encoding=""utf-8""?>"strXML = strXML & "<getSettledBatchListRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">"strXML = strXML & "<merchantAuthentication>" strXML = strXML & "<name>XXXXXXXXX</name>" strXML = strXML & "<transactionKey>XXXXXX</transactionKey>"strXML = strXML & "</merchantAuthentication>"strXML = strXML & "<includeStatistics>true</includeStatistics>"strXML = strXML & "<firstSettlementDate>2012-08-03T00:19:38Z</firstSettlementDate>"strXML = strXML & "<lastSettlementDate>2012-08-04T00:19:38Z</lastSettlementDate>"\[/code\]strXML = strXML & ""post_url = "https://api.authorize.net/xml/v1/request.api"'Start to process and post the XML data to authorize.net.Set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")objHTTP.open "post", post_url, FalseobjHTTP.setRequestHeader "Content-Type", "text/xml"'Send the XML off to Authorize.netobjHTTP.send strXML 'Show the response from authorize.net.Response.Write "Raw response: " & Server.HTMLEncode(objHTTP.responseText) & "

    " & vbCrLf'Parse the returned XML from authorize.net to see what the charge results were.Set objResponse = Server.CreateObject("MSXML2.DOMDocument.4.0")objResponse.loadXML objHTTP.responseTextobjResponse.setProperty "SelectionNamespaces", "xmlns:api='AnetApi/xml/v1/schema/AnetApiSchema.xsd'"
Response.Write objResponse.selectSingleNode("/*/api:declineCount").Text
 
Back
Top