cancel
Showing results for 
Search instead for 
Did you mean: 

Empty response when sending Authnet xml via Windows 8.1/IIS/PHP to ARBCreateSubscriptionRequest

I have Authnet PHP code that worked perfectly last time I ran it about 2 years ago on Win7 IIS7.5 PHP. Now I am trying to run it on Windows 8.1 and all I get back is an empty response, every time. Here's the test URL I'm sending to:

 

https://apitest.authorize.net/xml/v1/request.api

 

And here is my full XML that I'm sending:

 

 

<ARBCreateSubscriptionRequest xmlns= "AnetApi/xml/v1/schema/AnetApiSchema.xsd">
    <merchantAuthentication>
        <name>foo</name>
        <transactionKey>bar</transactionKey>
    </merchantAuthentication>
    <subscription>
    <name>TransitPark Monthly Indoor</name>
    <paymentSchedule>
        <interval>
            <length>1</length>
            <unit>months</unit>
        </interval>
        <startDate>2015-06-22</startDate>
        <totalOccurrences>9999</totalOccurrences>
        <trialOccurrences>1</trialOccurrences>
    </paymentSchedule>
    <amount>95</amount>
    <trialAmount>105</trialAmount>
    <payment>
        <creditCard>
            <cardNumber>4111111111111111</cardNumber>
            <expirationDate>2015-5</expirationDate>
            <cardCode>123</cardCode>
        </creditCard>
        
    </payment>
    <order>
        <invoiceNumber>5K3TE4UFCY</invoiceNumber>
    </order>
    <customer>
        <email>nate@zerogravpro.com</email>
    </customer>
    <billTo>
        <firstName>Frank</firstName>
        <lastName>O'Malley</lastName>
        <address>1029 Sunset Ave.</address>
        <city>Hollywood</city>
        <state>MO</state>
        <zip>90210</zip>
    </billTo>
</subscription>
</ARBCreateSubscriptionRequest>

The name and transkey values have been changed for the post, but I verified they are valid sandbox api keys. Is there something wrong with my XML?

 

The source code is nothing special, it's straight out of Authnet sample code that I downloaded. Any idea what could be going wrong?

ZeroGravPro
Contributor
11 REPLIES 11

What if there is no SDK? If I understand it correctly PHP site I help to support (Linux 2.4.37.9 and PHP v 5.3.28) simply uses curl to post payment data to https://secure.authorize.net/gateway/transact.dll with the following parameters:


        curl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
        curl_setopt($ch, CURLOPT_POSTFIELDS, rtrim( $fields, "& " )); // use HTTP POST to send form data
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/Entrust.netSecureServerCertificationAuthority.crt");

Replacing contents of Entrust.netSecureServerCertificationAuthority.crt file with what I found in Entrust link on authorize page did not seem to help. Do I need to do something else? Windstream is hosting that website, so I have limited permissions. Anything Windstream needs to do/check?

A Windows 8 activation key is a 25-character code that Microsoft uses to activate your copy of Windows. If you don’t have a product key, you won’t be able to activate your operating system. check out https://www.freeproductkey.com/2017/09/windows-8-product-key.html for further details.

wincrunch
Member