Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal Checkout


siu_fa

Recommended Posts

Posted

Can anyone help me with this? My site was running perfectly fine before and customers were able to checkout to PayPal to make payment transfer. But now they will get the message below:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/gndst3/public_html/store/includes/classes/order.php:753) in /home/gndst3/public_html/store/includes/functions/general.php on line 33

 

Does anyone know how to fix this? What I have done wrong?

 

////
// Stop from parsing any further PHP code
 function tep_exit() {
  tep_session_close();
  exit();
 }

////
// Redirect to another page or site
 function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { 
  tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
  if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
	$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
  }
}

header('Location: ' . $url);

tep_exit();
 }

////
// Parse the data used in the html tags to ensure the tags will not break
 function tep_parse_input_field_data($data, $parse) {
return strtr(trim($data), $parse);
 }

 function tep_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
  return htmlspecialchars($string);
} else {
  if ($translate == false) {
	return tep_parse_input_field_data($string, array('"' => '"'));
  } else {
	return tep_parse_input_field_data($string, $translate);
  }
}
 }

 function tep_output_string_protected($string) {
return tep_output_string($string, false, true);
 }

 function tep_sanitize_string($string) {
$string = ereg_replace(' +', ' ', trim($string));

Posted
Can anyone help me with this? My site was running perfectly fine before and customers were able to checkout to PayPal to make payment transfer. But now they will get the message below:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/gndst3/public_html/store/includes/classes/order.php:753) in /home/gndst3/public_html/store/includes/functions/general.php on line 33

 

Does anyone know how to fix this? What I have done wrong?

 

////
// Stop from parsing any further PHP code
 function tep_exit() {
  tep_session_close();
  exit();
 }

////
// Redirect to another page or site
 function tep_redirect($url) {
if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { 
  tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page
  if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url
	$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL
  }
}

header('Location: ' . $url);

tep_exit();
 }

////
// Parse the data used in the html tags to ensure the tags will not break
 function tep_parse_input_field_data($data, $parse) {
return strtr(trim($data), $parse);
 }

 function tep_output_string($string, $translate = false, $protected = false) {
if ($protected == true) {
  return htmlspecialchars($string);
} else {
  if ($translate == false) {
	return tep_parse_input_field_data($string, array('"' => '"'));
  } else {
	return tep_parse_input_field_data($string, $translate);
  }
}
 }

 function tep_output_string_protected($string) {
return tep_output_string($string, false, true);
 }

 function tep_sanitize_string($string) {
$string = ereg_replace(' +', ' ', trim($string));

 

your best bet is to reinstall the paypal module

I recommend paypal ipn

very easy to install

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...