Showing results for 
Search instead for 
Did you mean: 

Occasional Blank Responses... Retrieve Most Recent Transaction?

Hello, every few months or so we seem to receive a blank response from one of our charge requests (submitted via curl, php). There does not appear to be any errors and the code continues on as if there was a response to parse, the response just seems to be blank. In our most recent incident, we discovered that the card had actually been successfully charged.


I was wondering if there was a way to request the details of the most recent transaction when something like this occurs to determine if the charge was successful or not? I found the Transaction Details API from this forum post, but I'm not sure if it fits this situation. I don't know what the transaction ID was since I didn't get it in the response, and it doesn't sound like the other functions would have what I need. Or maybe I'm just misunderstanding something obvious? Any ideas? Thanks.


Do you log the raw response? It is tough to debug if it only happened once in a blue moon.


You could go get all unsettled transaction and loop thru it to see if it the invoice or po# match what you are looking for.


Yes, we log the raw response, just 'once in a blue moon' it logs as blank (It is different behavior than not logging at all.) To be as specific as possible, after setting up and executing a curl command, in the line


$response = curl_exec($ch);


the following code/logging acts as though $response was a blank value, even when the amount is successfully charged, as with our most recent incident, with no errors being recorded in PHP. I agree it is tough to debug and I am not even certain if it is likely to be related to the Authorize side, or our side, or some sort of network fluke in between.


It sounds like the unsettled transaction function may be my best option. I will do some testing with that. Thanks.


Edit: We also may look into setting CURLOPT_SSL_VERIFYPEER to false, per this forum post. Not sure if our rare issue is the kind of "difficulty getting a curl response" the post is talking about, and I would like more assurance that this setting has nothing to do with weakening security, but it seems like a plausible solution.