cancel
Showing results for 
Search instead for 
Did you mean: 

Response returning empty

We were using PHP SDK from https://github.com/AuthorizeNet/sdk-php.

It was working but then suddenly stop working. Our issue is that the response is returning empty. Any ideas?

mepting0235
Member
55 REPLIES 55

I am still seeing this problem. I set the logging to debug to see if there are any clues:

 (I cleared out the credentials and url with XXXX, fyi)

 

10/22/15 16:03:24,176:  INFO [http-bio-8443-exec-6] (net.authorize.util.LogHelper:24) - Use Proxy: 'false'

10/22/15 16:03:24,280: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.SingleClientConnManager:195) - Get connection for route HttpRoute[{s}->https://apitest.authorize.net]

10/22/15 16:03:24,883: DEBUG [http-bio-8443-exec-6] (org.apache.http.client.protocol.RequestAddCookies:131) - CookieSpec selected: best-match

10/22/15 16:03:24,895: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.client.DefaultRequestDirector:481) - Attempt 1 to execute request

10/22/15 16:03:24,895: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:244) - Sending request: POST /xml/v1/request.api HTTP/1.1

10/22/15 16:03:24,896: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "POST /xml/v1/request.api HTTP/1.1[EOL]"

10/22/15 16:03:24,898: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "Content-Type: text/xml; charset=utf-8[EOL]"

10/22/15 16:03:24,898: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "Content-Length: 631[EOL]"

10/22/15 16:03:24,899: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "Host: apitest.authorize.net[EOL]"

10/22/15 16:03:24,899: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "Connection: Keep-Alive[EOL]"

10/22/15 16:03:24,900: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "User-Agent: Apache-HttpClient/4.0.1 (java 1.5)[EOL]"

10/22/15 16:03:24,900: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "Expect: 100-Continue[EOL]"

10/22/15 16:03:24,901: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "[EOL]"

10/22/15 16:03:24,901: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:248) - >> POST /xml/v1/request.api HTTP/1.1

10/22/15 16:03:24,902: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> Content-Type: text/xml; charset=utf-8

10/22/15 16:03:24,902: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> Content-Length: 631

10/22/15 16:03:24,903: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> Host: apitest.authorize.net

10/22/15 16:03:24,903: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> Connection: Keep-Alive

10/22/15 16:03:24,904: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)

10/22/15 16:03:24,904: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:251) - >> Expect: 100-Continue

10/22/15 16:03:26,915: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - >> "<?xml version="1.0"?><getHostedProfilePageRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"><merchantAuthentication><name>XXXX</name><transactionKey>XXXX</transactionKey></merchantAuthentication><customerProfileId>XXXX</customerProfileId><hostedProfileSettings><setting><settingName>hostedProfileIFrameCommunicatorUrl</settingName><settingValue>XXX/authnet/IframeCommunicator.html</settingValue></setting><setting><settingName>hostedProfilePageBorderVisible</settingName><settingValue>false</settingValue></setting></hostedProfileSettings></getHostedProfilePageRequest>"

10/22/15 16:03:27,54: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - << "HTTP/1.1 100 Continue[EOL]"

10/22/15 16:03:27,57: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - << "Date: Thu, 22 Oct 2015 22:03:27 GMT[EOL]"

10/22/15 16:03:27,58: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - << "Connection: keep-alive[EOL]"

10/22/15 16:03:27,58: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.Wire:78) - << "[EOL]"

10/22/15 16:03:27,59: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:229) - Receiving response: HTTP/1.1 100 Continue

10/22/15 16:03:27,60: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:232) - << HTTP/1.1 100 Continue

10/22/15 16:03:27,60: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:235) - << Date: Thu, 22 Oct 2015 22:03:27 GMT

10/22/15 16:03:27,61: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:235) - << Connection: keep-alive

10/22/15 16:11:47,286: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:153) - Connection closed

10/22/15 16:11:47,287: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.client.DefaultRequestDirector:487) - Closing the connection.

10/22/15 16:11:47,288: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.conn.DefaultClientConnection:153) - Connection closed

10/22/15 16:11:47,288:  INFO [http-bio-8443-exec-6] (org.apache.http.impl.client.DefaultRequestDirector:491) - I/O exception (org.apache.http.NoHttpResponseException) caught when processing request: The target server failed to respond

10/22/15 16:11:47,294: DEBUG [http-bio-8443-exec-6] (org.apache.http.impl.client.DefaultRequestDirector:496) - The target server failed to respond

org.apache.http.NoHttpResponseException: The target server failed to respond

at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:101)

at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:210)

at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:271)

at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:227)

at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:209)

at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:292)

at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:126)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:483)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)

at net.authorize.util.HttpClient.executeXML(HttpClient.java:222)

at net.authorize.Merchant.postTransaction(Merchant.java:295)

at com.onp.controllers.CustomerController.setAuthNetToken(CustomerController.java:179)

at com.onp.controllers.CustomerController.populateCustomer(CustomerController.java:428)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.el.parser.AstValue.invoke(AstValue.java:278)

at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:273)

at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:149)

at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:818)

at javax.faces.component.UICommand.broadcast(UICommand.java:300)

at javax.faces.component.UIData.broadcast(UIData.java:1108)

at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)

at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)

at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)

at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at com.onp.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:37)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)

at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)

at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)

at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)

at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.lang.Thread.run(Thread.java:745)

Tried using the httpClient 4.1.2 jar and it's working fine for Sandbox now.

Just ran a test and it worked.

 

 

2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << Expires: Tue, 01 Jan 1980 00:00:00 GMT
2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << Server: Microsoft-IIS/7.5
2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << X-Powered-By: ASP.NET
2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << X-Cnection: close
2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << Date: Fri, 23 Oct 2015 18:55:05 GMT
2015-10-23 14:55:00,851 DEBUG [http-nio-80-exec-5] http.headers      (DefaultClientConnection.java:235)     - << Connection: keep-alive
2015-10-23 14:55:00,857 DEBUG [http-nio-80-exec-5] client.DefaultHttpClient (DefaultRequestDirector.java:540)     - Connection can be kept alive indefinitely
2015-10-23 14:55:00,860 DEBUG [http-nio-80-exec-5] http.wire         (    Wire.java:78)     - << "1|1|1|This transaction has been approved.|YQPIBQ|Y|2242579308|||50.00|CC|auth_capture||||||||||||||||||||||||||E5BA40DE9C5D0565C50BAFFE984DC231||2|||||||||||XXXX1111|Visa||||||||||||||||"
2015-10-23 14:55:00,860 DEBUG [http-nio-80-exec-5] conn.SingleClientConnManager (SingleClientConnManager.java:250)     - Releasing connection org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@1e1f4d5
2015-10-23 14:55:00,860 DEBUG [http-nio-80-exec-5] conn.DefaultClientConnection (DefaultClientConnection.java:141)     - Connection shut down

ugh!  worked 3 times and failed again.

 

2015-10-23 15:01:20,343 DEBUG [http-nio-80-exec-4] http.wire         (    Wire.java:78)     - << "Connection: keep-alive[EOL]"
2015-10-23 15:01:20,343 DEBUG [http-nio-80-exec-4] http.wire         (    Wire.java:78)     - << "[EOL]"
2015-10-23 15:01:20,343 DEBUG [http-nio-80-exec-4] conn.DefaultClientConnection (DefaultClientConnection.java:229)     - Receiving response: HTTP/1.1 100 Continue
2015-10-23 15:01:20,343 DEBUG [http-nio-80-exec-4] http.headers      (DefaultClientConnection.java:232)     - << HTTP/1.1 100 Continue
2015-10-23 15:01:20,343 DEBUG [http-nio-80-exec-4] http.headers      (DefaultClientConnection.java:235)     - << X-N: S
2015-10-23 15:01:20,344 DEBUG [http-nio-80-exec-4] http.headers      (DefaultClientConnection.java:235)     - << Date: Fri, 23 Oct 2015 19:01:24 GMT
2015-10-23 15:01:20,344 DEBUG [http-nio-80-exec-4] http.headers      (DefaultClientConnection.java:235)     - << Connection: keep-alive

Its been working well.  Put through over a doz transactions

What you describe is a immediately up declines transaction, and there's no manner to get a webhook for that transaction. To get a webhook you need a transaction Id link, and also you do no longer get a transaction Id until fee has went thru or been held.

asaw222
Member