I am trying to set up silent response for my live auth.net e-commerce carts. The Silent Post from Auth.net is happening, but I am getting no data whatsoever. I wrote a quick script, just to log the responses from the transactions so I could see what auth.net was sending.
$f = fopen('log.txt', 'a');
fwrite($f, 'new request: ');
fwrite($f, date('Y-m-d H:i'));
fwrite($f, ' ' . $_SERVER['REQUEST_METHOD']. ' ');
fwrite($f, ' ' . $_SERVER['QUERY_STRING']. ' ');
fwrite($f, ' ' . $_SERVER['REQUEST_URI']. ' ');
fwrite($f, print_r(http_get_request_headers(),1));
fwrite($f, print_r($_GET,1));
Simple sweet, should get me a result right? Note the printing of GET that I added, because this is the result set:
new request: 2011-12-06 14:54 GET /authSilentResponse/ Array (
[Accept] => */*
[Host] => myhost.mydomain.com
[Connection] => Close ) Array ( )
So instead of the Post that everything tells me it should be, I am getting a GET request...
Anyone have any idea why this would not be coming through as a POST with data?
I think you're doing something wrong somewhere as Silent Post always submits transaction results using a POST request. Try the code I have written and see if it works better for you. If it does you can compare your code to it and see where the potential issue lies.
Here is a modified version you can use for testing:
You can test it out using this form: