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
1 ACCEPTED SOLUTION

Accepted Solutions
11 REPLIES 11

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:
  
ZeroGravPro
Contributor

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.

ZeroGravPro
Contributor

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

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

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

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?

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?

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