Reply
Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011
Accepted Solution

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?


Accepted Solutions
Solution
Accepted by topic author ZeroGravPro
‎08-21-2015 01:58 AM
Posts: 2,765
Topics: 57
Kudos: 245
Blog Posts: 67
Registered: ‎12-05-2011

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


All Replies
Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

One note, the response may not be literally empty, it's hard to tell. Looks like I might be getting this actually:

 

 error: Error:
 Message:
  
Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

Also don't worry about the expired cc expiration date. I just tried it with non-expired date and got exact same problem. Also tried different cc# from Authnet website.

Expert
Posts: 4,525
Registered: ‎03-08-2010

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

Did you check for connection error since they change SSL not too long ago?

Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

How do I check for connection problems? Authnet is not returning any info to me.

Posts: 2,765
Topics: 57
Kudos: 245
Blog Posts: 67
Registered: ‎12-05-2011

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

Hello @ZeroGravPro

 

We recently upgraded our security certificates to support SHA-2.  For PHP, you may need to obtain the .PEM file from the PHP SDK on GitHub.

 

Richard

Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

Richard, is it just a matter of copying those files to my PC? Or do I need to do something in particular with the .pem file?

Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

Richard: No PEM files exist in the github location you pointed me to:

 

https://github.com/AuthorizeNet/sample-code-php

 

Where can I get that file, and where in my SDK folder path to I place it?

Solution
Accepted by topic author ZeroGravPro
‎08-21-2015 01:58 AM
Posts: 2,765
Topics: 57
Kudos: 245
Blog Posts: 67
Registered: ‎12-05-2011

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

Posts: 41
Topics: 19
Kudos: 5
Solutions: 1
Registered: ‎10-30-2011

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

Thanks Richard. Replacing the .pem file indeed fixed everything in my authnet sandbox environment.