I am using an server with Windows 2000.
Using Classic ASP with VB Script.
I am using the demo code at: http://developer.authorize.net/api/reference/index.html#payment-transactions
Under “Charge a Credit Card”, if you select “Try it”. It shows the XML to charge a card.
In order to test this, I placed it into an ASP page.
Here is the code:
strLineOut = strLineOut & "<?xml version=""1.0"" encoding=""utf-8""?>" & vbCrLf
strLineOut = strLineOut & "<createTransactionRequest xmlns=""AnetApi/xml/v1/schema/AnetApiSchema.xsd"">" & vbCrLf
strLineOut = strLineOut & " <merchantAuthentication>" & vbCrLf
strLineOut = strLineOut & " <name>2V4cJg6v</name>" & vbCrLf
strLineOut = strLineOut & " <transactionKey>XXXXXXXXXXX</transactionKey>" & vbCrLf
strLineOut = strLineOut & " </merchantAuthentication>" & vbCrLf
strLineOut = strLineOut & " <refId>123456</refId>" & vbCrLf
strLineOut = strLineOut & " <transactionRequest>" & vbCrLf
strLineOut = strLineOut & " <transactionType>authCaptureTransaction</transactionType>" & vbCrLf
strLineOut = strLineOut & " <amount>5</amount>" & vbCrLf
strLineOut = strLineOut & " <payment>" & vbCrLf
strLineOut = strLineOut & " <creditCard>" & vbCrLf
strLineOut = strLineOut & " <cardNumber>4007000000027</cardNumber>" & vbCrLf
strLineOut = strLineOut & " <expirationDate>1220</expirationDate>" & vbCrLf
strLineOut = strLineOut & " <cardCode>999</cardCode>" & vbCrLf
strLineOut = strLineOut & " </creditCard>" & vbCrLf
strLineOut = strLineOut & " </payment>" & vbCrLf
strLineOut = strLineOut & " <order>" & vbCrLf
strLineOut = strLineOut & " <invoiceNumber>INV-12345</invoiceNumber>" & vbCrLf
strLineOut = strLineOut & " <description>Product Description</description>" & vbCrLf
strLineOut = strLineOut & " </order>" & vbCrLf
strLineOut = strLineOut & " <lineItems>" & vbCrLf
strLineOut = strLineOut & " <lineItem>" & vbCrLf
strLineOut = strLineOut & " <itemId>1</itemId>" & vbCrLf
strLineOut = strLineOut & " <name>vase</name>" & vbCrLf
strLineOut = strLineOut & " <description>Cannes logo </description>" & vbCrLf
strLineOut = strLineOut & " <quantity>18</quantity>" & vbCrLf
strLineOut = strLineOut & " <unitPrice>45.00</unitPrice>" & vbCrLf
strLineOut = strLineOut & " </lineItem>" & vbCrLf
strLineOut = strLineOut & " </lineItems>" & vbCrLf
strLineOut = strLineOut & " <tax>" & vbCrLf
strLineOut = strLineOut & " <amount>4.26</amount>" & vbCrLf
strLineOut = strLineOut & " <name>level2 tax name</name>" & vbCrLf
strLineOut = strLineOut & " <description>level2 tax</description>" & vbCrLf
strLineOut = strLineOut & " </tax>" & vbCrLf
strLineOut = strLineOut & " <duty>" & vbCrLf
strLineOut = strLineOut & " <amount>8.55</amount>" & vbCrLf
strLineOut = strLineOut & " <name>duty name</name>" & vbCrLf
strLineOut = strLineOut & " <description>duty description</description>" & vbCrLf
strLineOut = strLineOut & " </duty>" & vbCrLf
strLineOut = strLineOut & " <shipping>" & vbCrLf
strLineOut = strLineOut & " <amount>4.26</amount>" & vbCrLf
strLineOut = strLineOut & " <name>level2 tax name</name>" & vbCrLf
strLineOut = strLineOut & " <description>level2 tax</description>" & vbCrLf
strLineOut = strLineOut & " </shipping>" & vbCrLf
strLineOut = strLineOut & " <poNumber>456654</poNumber>" & vbCrLf
strLineOut = strLineOut & " <customer>" & vbCrLf
strLineOut = strLineOut & " <id>99999456654</id>" & vbCrLf
strLineOut = strLineOut & " </customer>" & vbCrLf
strLineOut = strLineOut & " <billTo>" & vbCrLf
strLineOut = strLineOut & " <firstName>Ellen</firstName>" & vbCrLf
strLineOut = strLineOut & " <lastName>Johnson</lastName>" & vbCrLf
strLineOut = strLineOut & " <company>Souveniropolis</company>" & vbCrLf
strLineOut = strLineOut & " <address>14 Main Street</address>" & vbCrLf
strLineOut = strLineOut & " <city>Pecan Springs</city>" & vbCrLf
strLineOut = strLineOut & " <state>TX</state>" & vbCrLf
strLineOut = strLineOut & " <zip>44628</zip>" & vbCrLf
strLineOut = strLineOut & " <country>USA</country>" & vbCrLf
strLineOut = strLineOut & " </billTo>" & vbCrLf
strLineOut = strLineOut & " <shipTo>" & vbCrLf
strLineOut = strLineOut & " <firstName>China</firstName>" & vbCrLf
strLineOut = strLineOut & " <lastName>Bayles</lastName>" & vbCrLf
strLineOut = strLineOut & " <company>Thyme for Tea</company>" & vbCrLf
strLineOut = strLineOut & " <address>12 Main Street</address>" & vbCrLf
strLineOut = strLineOut & " <city>Pecan Springs</city>" & vbCrLf
strLineOut = strLineOut & " <state>TX</state>" & vbCrLf
strLineOut = strLineOut & " <zip>44628</zip>" & vbCrLf
strLineOut = strLineOut & " <country>USA</country>" & vbCrLf
strLineOut = strLineOut & " </shipTo>" & vbCrLf
strLineOut = strLineOut & " <customerIP>192.168.1.1</customerIP>" & vbCrLf
strLineOut = strLineOut & " <transactionSettings>" & vbCrLf
strLineOut = strLineOut & " <setting>" & vbCrLf
strLineOut = strLineOut & " <settingName>testRequest</settingName>" & vbCrLf
strLineOut = strLineOut & " <settingValue>false</settingValue>" & vbCrLf
strLineOut = strLineOut & " </setting>" & vbCrLf
strLineOut = strLineOut & " </transactionSettings>" & vbCrLf
strLineOut = strLineOut & " <userFields>" & vbCrLf
strLineOut = strLineOut & " <userField>" & vbCrLf
strLineOut = strLineOut & " <name>MerchantDefinedFieldName1</name>" & vbCrLf
strLineOut = strLineOut & " <value>MerchantDefinedFieldValue1</value>" & vbCrLf
strLineOut = strLineOut & " </userField>" & vbCrLf
strLineOut = strLineOut & " <userField>" & vbCrLf
strLineOut = strLineOut & " <name>favorite_color</name>" & vbCrLf
strLineOut = strLineOut & " <value>blue</value>" & vbCrLf
strLineOut = strLineOut & " </userField>" & vbCrLf
strLineOut = strLineOut & " </userFields>" & vbCrLf
strLineOut = strLineOut & " </transactionRequest>" & vbCrLf
strLineOut = strLineOut & "</createTransactionRequest>" & vbCrLf
url = "https://apitest.authorize.net/xml/v1/request.api"
dim xmlhttp
set xmlhttp = Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url, false
xmlhttp.setTimeouts 60000,10000, 10000, 10000
xmlhttp.setRequestHeader "Content-Type", "text/xml"
xmlhttp.send strLineOut ‘This is where the ERROR occurs.
xmlhttp.waitForResponse 10000
Response.Write xmlhttp.responseText
Set xmlhttp = nothing
I am getting an Error at the line xmlhttp.send strLineOut:
msxml3.dll error '80072eff'
The connection with the server was reset
I have redirected this code to an ASP that can parse the XML fine. And I get no errors while accessing that ASP.
Hi narnone,
Windows 2000 server was end-of-lifed several years ago and is not being maintained by Microsoft or updated to support modern internet technology. Most likely, your server will not be able to recognize any modern SHA2 certificate such as the one used on our site.
Thanks,
Joy
11-17-2015 09:42 AM