I am trying to integrate a payflow link module into my site. This will serve to automate cc transactions. I have integrated the module into the site with no issues.... almost.
When the payflow server sends back the approval, my site needs to issue a http 200 ok message in order to complete the process. The payflow post the values back to verisignreturn.php. The file is here:
<?php
global $HTTP_POST_VARS,$HTTP_GET_VARS;
$HTTP_POST_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2'];
$$HTTP_GET_VARS[$HTTP_POST_VARS['USER1']] = $HTTP_POST_VARS['USER2'];
reset ($HTTP_POST_VARS);
reset ($HTTP_GET_VARS);
$postparameters='';
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
$postparameters .= $key.'='.urlencode($val).'&';
}
include('includes/application_top.php');
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PROCESS, $postparameters , 'SSL', false, false));
?>
If I add
header('HTTP/1.1 200 OK');
I recieve the following error
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/verisignreturn.php:6) in /var/www/includes/functions/sessions.php on line 67
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/verisignreturn.php:6) in /var/www/includes/functions/sessions.php on line 67
Warning: Cannot modify header information - headers already sent by (output started at /var/www/verisignreturn.php:6) in /var/www/includes/functions/general.php on line 29
I understand that this is caused by outputing html prior to calling the session_start() function.
How can I get around the situation. Any help is really appreciated.