ladykaren Posted March 27, 2011 Share Posted March 27, 2011 Hi there; I was wondering if someone could help me please. I just installed Authorize.net AIM and have all the settings set. But when I run a test order, after clicking Confirm Order, I receive this error : Parse error: syntax error, unexpected T_VARIABLE in /home/content/l/a/d/ladykdelights/html/catalog/checkout_process.php on line 56 Here is the surrounding code snippet : // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order.php'); $order = new order; require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_totals = $order_total_modules->process(); // load the before_process function from the payment modules $payment_modules->before_process(); (line 56) $sql_data_array = array('customers_id' => $customer_id, 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'], 'customers_company' => $order->customer['company'], 'customers_street_address' => $order->customer['street_address'], Can anyone see where the error is coming from? Thanks for your help Quote Link to comment Share on other sites More sharing options...
germ Posted March 27, 2011 Share Posted March 27, 2011 // load the before_process function from the payment modules If that code is actually on two lines (instead of one) in the PHP source - there's the problem. Should be on ONE line. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
ladykaren Posted March 28, 2011 Author Share Posted March 28, 2011 Hi germ; Thanks so much for getting back. I moved modules up to the first line. That took care of that problem. Now if I run a test order, after clicking confirm, I get this - Warning: Cannot modify header information - headers already sent by (output started at /home/content/l/a/d/ladykdelights/html/catalog/includes/modules/payment/authorizenet_aim.php:921) in /home/content/l/a/d/ladykdelights/html/catalog/includes/functions/general.php on line 33 Here is snippet of code for catalog/includes/function/general.php // 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); (line 33) 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); } } } Help again please Thanks so much Quote Link to comment Share on other sites More sharing options...
ladykaren Posted March 28, 2011 Author Share Posted March 28, 2011 Hi again; I found it. There was a couple of white spaces at the bottom of the authorize.net_php file. YIPPIE the test order worked lol Quote Link to comment Share on other sites More sharing options...
germ Posted March 29, 2011 Share Posted March 29, 2011 Glad you fixed it. :) When you get the infamous "headers already sent" message the problem is in the first file mentioned in the error message. Quote If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.