Guest Posted February 21, 2005 Share Posted February 21, 2005 Hi Guys I cancelled from 2CO last year because they did not support pricing other than in USD. However, the software integrated well with osC at the time. Now they do support pricing in many currencies, so I signed up again. By now they are on version 2 of their solution and there are some differences in how V1 accounts (which they continue to maintain) and V2 accounts (which new users MUST sign to) work. I note that quite a few people have problems with 2CO and their support people are neither efficient nor helpfull. I have tried ALL the solutions proposed by recent contributors and none work for me. When customers click to finalise the transaction, they are returned to my site's login screen and if they log in, they are looped back to the screen before they selected to pay by 2CO. The product is still in their cart and the transaction has not registered on osC. Happily, I do get a message from 2CO telling me that an order ois placed, but it is embarrassing asking the customer for their order details. Is anyone thinking of witing a payment module for 2CO V2? Cheers Tim Quote Link to comment Share on other sites More sharing options...
kevintai Posted February 22, 2005 Share Posted February 22, 2005 Hi Guys I cancelled from 2CO last year because they did not support pricing other than in USD. However, the software integrated well with osC at the time. Now they do support pricing in many currencies, so I signed up again. By now they are on version 2 of their solution and there are some differences in how V1 accounts (which they continue to maintain) and V2 accounts (which new users MUST sign to) work. I note that quite a few people have problems with 2CO and their support people are neither efficient nor helpfull. I have tried ALL the solutions proposed by recent contributors and none work for me. When customers click to finalise the transaction, they are returned to my site's login screen and if they log in, they are looped back to the screen before they selected to pay by 2CO. The product is still in their cart and the transaction has not registered on osC. Happily, I do get a message from 2CO telling me that an order ois placed, but it is embarrassing asking the customer for their order details. Is anyone thinking of witing a payment module for 2CO V2? Cheers Tim <{POST_SNAPBACK}> Hey, I just got the same problem as you did ~~ I think you might have the SSL on your website. My sloustion is turn of my share SSL on my website. then when I do the transaction it will pass the info back to my site. You can check to see if it works for you ~~~ Quote Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2005 Share Posted February 25, 2005 Thanks for that - but this could not be my problem because i do not have SSL. I am plain old HTTP. It IS encouraging that you have got osC to work with 2CO version 2, so it must be possible if I keep plugging away. Could you please confirm that the correct file to enter in the 2CO customisation area under "Input a url for your customers to be sent to on a successful purchase" is definately http://www.ambermines.co.uk/checkout_process.php Anyone with any ideas? Cheers Tim Hey, I just got the same problem as you did ~~ I think you might have the SSL on your website. My sloustion is turn of my share SSL on my website. then when I do the transaction it will pass the info back to my site. You can check to see if it works for you ~~~ <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
covalto Posted March 1, 2005 Share Posted March 1, 2005 (edited) I use pm2checkout_process.php This is how it looks inside: <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <style type="text/css"> body {backgorund-color:#FFFFFF;} body, td, div {font-family: verdana, arial, sans-serif; font-size:14px;} </style> </head> <body onload="document.twocoprocessform.submit()"> <form name="twocoprocessform" method="POST" action="http://www.yourdomain.com/tienda/checkout_process.php"> <table cellpadding="0" width="100%" height="100%" cellspacing="0"> <tr> <td align="middle" style="height:100%; vertical-align:middle;"> <?php foreach ($_GET as $key => $val) { print "<input type=\"hidden\" name=\"$key\" value=\"$val\">\n"; } ?> Gracias... redirecccionando a http://www.yourdomain.com/tienda/checkout_...;Si<br>Si la pagina falla para redireccionar presione <input type="submit" value="here"> </td> </tr> </table> </form> </body> </html> Dont care about the spanish stuff. When you download the contribution is on english. Another detail: Be careful with the Product description and Product id, because you wont be able to recognize what the customer bought. 2Checkout new system "requires" you to use Product ID. Edited March 1, 2005 by covalto Quote Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2005 Share Posted March 2, 2005 Gracias Covalto I'm glad we agree that the correct file is pm2checkout_process.php, because the contribution says to use checkout_process.php. My pm2checkout_process.php file is the same as yours. Could you show me the contents of your includes/modules/payment/pm2checkout.php Can I just check three things: 1. You are on version 2 of 2CO ie your seller ID number is greater than 200,000 (if your seller ID number is 199,999 or lower, you are V1). 2. Your customers are NOT returned to the login screen of your web site 3. The transaction is recorded against the customer account by osC Have you got hash chect and secret word switched on in osC? Cheers Tim I use pm2checkout_process.php This is how it looks inside: <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <style type="text/css"> body {backgorund-color:#FFFFFF;} body, td, div {font-family: verdana, arial, sans-serif; font-size:14px;} </style> </head> <body onload="document.twocoprocessform.submit()"> <form name="twocoprocessform" method="POST" action="http://www.yourdomain.com/tienda/checkout_process.php"> <table cellpadding="0" width="100%" height="100%" cellspacing="0"> <tr> <td align="middle" style="height:100%; vertical-align:middle;"> <?php foreach ($_GET as $key => $val) { print "<input type=\"hidden\" name=\"$key\" value=\"$val\">\n"; } ?> Gracias... redirecccionando a http://www.yourdomain.com/tienda/checkout_...;Si<br>Si la pagina falla para redireccionar presione <input type="submit" value="here"> </td> </tr> </table> </form> </body> </html> Dont care about the spanish stuff. When you download the contribution is on english. Another detail: Be careful with the Product description and Product id, because you wont be able to recognize what the customer bought. 2Checkout new system "requires" you to use Product ID. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
covalto Posted March 2, 2005 Share Posted March 2, 2005 Gracias Covalto I'm glad we agree that the correct file is pm2checkout_process.php, because the contribution says to use checkout_process.php. My pm2checkout_process.php file is the same as yours. Could you show me the contents of your includes/modules/payment/pm2checkout.php Can I just check three things: 1. You are on version 2 of 2CO ie your seller ID number is greater than 200,000 (if your seller ID number is 199,999 or lower, you are V1). 2. Your customers are NOT returned to the login screen of your web site 3. The transaction is recorded against the customer account by osC Have you got hash chect and secret word switched on in osC? Cheers Tim <{POST_SNAPBACK}> pm2checkout.php the one at module: <?php /* $Id: pm2checkout.php,v 1.19 2003/01/29 19:57:15 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License Updates May 13 2004 by http://www.rayservers.com */ class pm2checkout { var $code, $title, $description, $enabled; // class constructor function pm2checkout() { global $order; $this->code = 'pm2checkout'; $this->title = MODULE_PAYMENT_2CHECKOUT_TEXT_TITLE; $this->description = MODULE_PAYMENT_2CHECKOUT_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_2CHECKOUT_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_2CHECKOUT_STATUS == 'True') ? true : false); $this->check_hash = ((MODULE_PAYMENT_2CHECKOUT_CHECK_HASH == 'True') ? true : false); $this->secret_word = MODULE_PAYMENT_2CHECKOUT_SECRET_WORD; $this->login_id = MODULE_PAYMENT_2CHECKOUT_LOGIN; if ((int)MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); // $this->form_action_url = 'https://www.2checkout.com/cgi-bin/Abuyers/purchase.2c'; $this->form_action_url = 'https://www2.2checkout.com/2co/buyer/purchase'; } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_2CHECKOUT_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_2CHECKOUT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { return false; } function selection() { global $order; $selection = array('id' => $this->code, 'module' => $this->title ); return $selection; } function pre_confirmation_check() { return false; } function confirmation() { global $HTTP_POST_VARS; //if (DEFAULT_CURRENCY <> 'CAD') //$title = $this->title . MODULE_PAYMENT_2CHECKOUT_CURRENCY_CONVERSITION; //else $title = $this->title; $confirmation = array('title' => $title); return $confirmation; } function process_button() { global $HTTP_POST_VARS, $order, $currency, $currencies; //if (DEFAULT_CURRENCY <> 'CAD') //{ //$cOrderTotal = $currencies->get_value("CAD") * $order->info['total']; //} //else $cOrderTotal = $order->info['total']; $process_button_string = tep_draw_hidden_field('x_login', MODULE_PAYMENT_2CHECKOUT_LOGIN) . tep_draw_hidden_field('x_amount', number_format($cOrderTotal, 2, '.', '')) . tep_draw_hidden_field('x_invoice_num', date('YmdHis')) . tep_draw_hidden_field('DEMO', ((MODULE_PAYMENT_2CHECKOUT_TESTMODE == 'Test') ? 'Y' : 'N')) . tep_draw_hidden_field('x_first_name', $order->customer['firstname']) . tep_draw_hidden_field('x_last_name', $order->customer['lastname']) . tep_draw_hidden_field('x_address', $order->customer['street_address']) . tep_draw_hidden_field('x_city', $order->customer['city']) . tep_draw_hidden_field('x_state', $order->customer['state']) . tep_draw_hidden_field('x_zip', $order->customer['postcode']) . tep_draw_hidden_field('x_country', $order->customer['country']['title']) . tep_draw_hidden_field('x_email', $order->customer['email_address']) . tep_draw_hidden_field('x_phone', $order->customer['telephone']) . tep_draw_hidden_field('x_ship_to_first_name', $order->delivery['firstname']) . tep_draw_hidden_field('x_ship_to_last_name', $order->delivery['lastname']) . tep_draw_hidden_field('x_ship_to_address', $order->delivery['street_address']) . tep_draw_hidden_field('x_ship_to_city', $order->delivery['city']) . tep_draw_hidden_field('x_ship_to_state', $order->delivery['state']) . tep_draw_hidden_field('x_ship_to_zip', $order->delivery['postcode']) . tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . tep_draw_hidden_field('tco_currency', $currency) . tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); return $process_button_string; } function before_process() { /*global $HTTP_POST_VARS; if ($HTTP_POST_VARS['x_response_code'] != '1') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_MESSAGE), 'SSL', true, false)); } // check the md4 hash if ($this->check_hash == true) { $compare_string = $this->secret_word . $this->login_id . $HTTP_POST_VARS['x_trans_id'] . $HTTP_POST_VARS['x_amount']; // make it md5 $compare_hash1 = md5($compare_string); // make all upper $compare_hash1 = strtoupper($compare_hash1); $compare_hash2 = $HTTP_POST_VARS['x_MD5_Hash']; if ($compare_hash1 != $compare_hash2) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_HASH_MESSAGE), 'SSL', true, false)); } }*/ return false; } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $error = array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR, 'error' => stripslashes(urldecode($HTTP_GET_VARS['error']))); return $error; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_2CHECKOUT_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable 2CheckOut Module', 'MODULE_PAYMENT_2CHECKOUT_STATUS', 'True', 'Do you want to accept 2CheckOut payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login/Store Number', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', '18157', 'Login/Store Number used for the 2CheckOut service', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'Test', 'Transaction mode used for the 2Checkout service', '6', '3', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Merchant Notifications', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'True', 'Should 2CheckOut e-mail a receipt to the store owner?', '6', '4', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_2CHECKOUT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '6', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '7', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Check MD5 hash', 'MODULE_PAYMENT_2CHECKOUT_CHECK_HASH', 'False', 'Should the 2CheckOut MD5 hash facilty to be checked?', '6', '8', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Secret Word', 'MODULE_PAYMENT_2CHECKOUT_SECRET_WORD', 'tango', 'Secret word for the 2CheckOut MD5 hash facility', '6', '9', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_2CHECKOUT_STATUS', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'MODULE_PAYMENT_2CHECKOUT_ZONE', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', 'MODULE_PAYMENT_2CHECKOUT_CHECK_HASH', 'MODULE_PAYMENT_2CHECKOUT_SECRET_WORD'); } } ?> Recently the people at 2Checkout are answering the posts at their forum, but they keep repeating the same thing. I thing nobody has the solution about the "product_id and product description stuff". Even if you install all the Contributions and using 2Checkout help instructions, I will have to wait. Also you can find some information on the Creloaded forums. There are also people trying to find a solution. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2005 Share Posted March 2, 2005 Covalto Are your customers dumped back at the login screen when they use thuis payment module or does it successfully pass back the transaction details to your osC cart? Cheers Tim pm2checkout.php the one at module: <?php /* $Id: pm2checkout.php,v 1.19 2003/01/29 19:57:15 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License Updates May 13 2004 by http://www.rayservers.com */ class pm2checkout { var $code, $title, $description, $enabled; // class constructor function pm2checkout() { global $order; $this->code = 'pm2checkout'; $this->title = MODULE_PAYMENT_2CHECKOUT_TEXT_TITLE; $this->description = MODULE_PAYMENT_2CHECKOUT_TEXT_DESCRIPTION; $this->sort_order = MODULE_PAYMENT_2CHECKOUT_SORT_ORDER; $this->enabled = ((MODULE_PAYMENT_2CHECKOUT_STATUS == 'True') ? true : false); $this->check_hash = ((MODULE_PAYMENT_2CHECKOUT_CHECK_HASH == 'True') ? true : false); $this->secret_word = MODULE_PAYMENT_2CHECKOUT_SECRET_WORD; $this->login_id = MODULE_PAYMENT_2CHECKOUT_LOGIN; if ((int)MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID > 0) { $this->order_status = MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID; } if (is_object($order)) $this->update_status(); // $this->form_action_url = 'https://www.2checkout.com/cgi-bin/Abuyers/purchase.2c'; $this->form_action_url = 'https://www2.2checkout.com/2co/buyer/purchase'; } // class methods function update_status() { global $order; if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_2CHECKOUT_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_2CHECKOUT_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->billing['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } } function javascript_validation() { return false; } function selection() { global $order; $selection = array('id' => $this->code, 'module' => $this->title ); return $selection; } function pre_confirmation_check() { return false; } function confirmation() { global $HTTP_POST_VARS; //if (DEFAULT_CURRENCY <> 'CAD') //$title = $this->title . MODULE_PAYMENT_2CHECKOUT_CURRENCY_CONVERSITION; //else $title = $this->title; $confirmation = array('title' => $title); return $confirmation; } function process_button() { global $HTTP_POST_VARS, $order, $currency, $currencies; //if (DEFAULT_CURRENCY <> 'CAD') //{ //$cOrderTotal = $currencies->get_value("CAD") * $order->info['total']; //} //else $cOrderTotal = $order->info['total']; $process_button_string = tep_draw_hidden_field('x_login', MODULE_PAYMENT_2CHECKOUT_LOGIN) . tep_draw_hidden_field('x_amount', number_format($cOrderTotal, 2, '.', '')) . tep_draw_hidden_field('x_invoice_num', date('YmdHis')) . tep_draw_hidden_field('DEMO', ((MODULE_PAYMENT_2CHECKOUT_TESTMODE == 'Test') ? 'Y' : 'N')) . tep_draw_hidden_field('x_first_name', $order->customer['firstname']) . tep_draw_hidden_field('x_last_name', $order->customer['lastname']) . tep_draw_hidden_field('x_address', $order->customer['street_address']) . tep_draw_hidden_field('x_city', $order->customer['city']) . tep_draw_hidden_field('x_state', $order->customer['state']) . tep_draw_hidden_field('x_zip', $order->customer['postcode']) . tep_draw_hidden_field('x_country', $order->customer['country']['title']) . tep_draw_hidden_field('x_email', $order->customer['email_address']) . tep_draw_hidden_field('x_phone', $order->customer['telephone']) . tep_draw_hidden_field('x_ship_to_first_name', $order->delivery['firstname']) . tep_draw_hidden_field('x_ship_to_last_name', $order->delivery['lastname']) . tep_draw_hidden_field('x_ship_to_address', $order->delivery['street_address']) . tep_draw_hidden_field('x_ship_to_city', $order->delivery['city']) . tep_draw_hidden_field('x_ship_to_state', $order->delivery['state']) . tep_draw_hidden_field('x_ship_to_zip', $order->delivery['postcode']) . tep_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . tep_draw_hidden_field('tco_currency', $currency) . tep_draw_hidden_field('x_receipt_link_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('x_email_merchant', ((MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT == 'True') ? 'TRUE' : 'FALSE')); return $process_button_string; } function before_process() { /*global $HTTP_POST_VARS; if ($HTTP_POST_VARS['x_response_code'] != '1') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_MESSAGE), 'SSL', true, false)); } // check the md4 hash if ($this->check_hash == true) { $compare_string = $this->secret_word . $this->login_id . $HTTP_POST_VARS['x_trans_id'] . $HTTP_POST_VARS['x_amount']; // make it md5 $compare_hash1 = md5($compare_string); // make all upper $compare_hash1 = strtoupper($compare_hash1); $compare_hash2 = $HTTP_POST_VARS['x_MD5_Hash']; if ($compare_hash1 != $compare_hash2) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR_HASH_MESSAGE), 'SSL', true, false)); } }*/ return false; } function after_process() { return false; } function get_error() { global $HTTP_GET_VARS; $error = array('title' => MODULE_PAYMENT_2CHECKOUT_TEXT_ERROR, 'error' => stripslashes(urldecode($HTTP_GET_VARS['error']))); return $error; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_2CHECKOUT_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable 2CheckOut Module', 'MODULE_PAYMENT_2CHECKOUT_STATUS', 'True', 'Do you want to accept 2CheckOut payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Login/Store Number', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', '18157', 'Login/Store Number used for the 2CheckOut service', '6', '2', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'Test', 'Transaction mode used for the 2Checkout service', '6', '3', 'tep_cfg_select_option(array(\'Test\', \'Production\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Merchant Notifications', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'True', 'Should 2CheckOut e-mail a receipt to the store owner?', '6', '4', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_2CHECKOUT_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '6', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '7', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Check MD5 hash', 'MODULE_PAYMENT_2CHECKOUT_CHECK_HASH', 'False', 'Should the 2CheckOut MD5 hash facilty to be checked?', '6', '8', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Secret Word', 'MODULE_PAYMENT_2CHECKOUT_SECRET_WORD', 'tango', 'Secret word for the 2CheckOut MD5 hash facility', '6', '9', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_PAYMENT_2CHECKOUT_STATUS', 'MODULE_PAYMENT_2CHECKOUT_LOGIN', 'MODULE_PAYMENT_2CHECKOUT_TESTMODE', 'MODULE_PAYMENT_2CHECKOUT_EMAIL_MERCHANT', 'MODULE_PAYMENT_2CHECKOUT_ZONE', 'MODULE_PAYMENT_2CHECKOUT_ORDER_STATUS_ID', 'MODULE_PAYMENT_2CHECKOUT_SORT_ORDER', 'MODULE_PAYMENT_2CHECKOUT_CHECK_HASH', 'MODULE_PAYMENT_2CHECKOUT_SECRET_WORD'); } } ?> Recently the people at 2Checkout are answering the posts at their forum, but they keep repeating the same thing. I thing nobody has the solution about the "product_id and product description stuff". Even if you install all the Contributions and using 2Checkout help instructions, I will have to wait. Also you can find some information on the Creloaded forums. There are also people trying to find a solution. <{POST_SNAPBACK}> Quote Link to comment Share on other sites More sharing options...
covalto Posted March 3, 2005 Share Posted March 3, 2005 Covalto Are your customers dumped back at the login screen when they use thuis payment module or does it successfully pass back the transaction details to your osC cart? Cheers Tim <{POST_SNAPBACK}> on the demo version and live version, everything works. At the moment I receive the payment notification I dont know what the customer bought. The same problem with ikobo. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2005 Share Posted March 4, 2005 The variables coming back to OSC from 2Checkout are coming $POST instead of $GET......Update the following code and your variables will dump into the database. <?php $PARAMS = ( count( $HTTP_POST_VARS ) ) ? $HTTP_POST_VARS : $HTTP_GET_VARS; foreach ( $PARAMS as $key=>$value ) { print "$key == $value"; print "<input type=\"hidden\" name=\"$key\" value=\"$value\"><br>\n"; } ?> <!-- < ? php foreach ($_GET as $key => $val) { print "<input type=\"text\" name=\"$key\" value=\"$val\">\n"; } ? > --> Now my question for the gurus is this.... 2Checkout is returning three variables that could be parsed and added to the order table if I can figure out how and where to parse them and create entries in the insert or update statement to add them in. The variable are invoice_num, response_code and trans_id. I thought if we coudl parse these out and add them to the orders table when we dump the order in then, we can match our 2Checkout orders to our OSC orders.....does this make sense, and if so, can any of you gurus that knwo this program inside out, help with this. Thanks in advance Larry :'( Covalto Are your customers dumped back at the login screen when they use thuis payment module or does it successfully pass back the transaction details to your osC cart? Cheers Tim <{POST_SNAPBACK}> Quote 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.
Note: Your post will require moderator approval before it will be visible.