Quite a late reply, but since there was no reply to the subject; I found that in another Surepay PHP code piece that I looked at somewhere, an undocumented (was anyway)feature of curl;
Option CURLOPT_RETURNTRANSFER must be set to 1. Here is a piece of code from a surepay-interfacing library I created at http://sausurepay.sourceforge.net
$curlsession = curl_init ();
curl_setopt ($curlsession, CURLOPT_URL, $url);
curl_setopt ($curlsession, CURLOPT_POST, 1);
curl_setopt ($curlsession, CURLOPT_POSTFIELDS, $postdata);
curl_setopt ($curlsession, CURLOPT_POSTFIELDSIZE, 0);
curl_setopt ($curlsession, CURLOPT_TIMEOUT, $timeout-seconds);
curl_setopt ($curlsession, CURLOPT_HEADER, 0);
curl_setopt ($curlsession, CURLOPT_SSLVERSION, 3);
curl_setopt ($curlsession, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec ($curlsession);
That should work (SSL)