jferezy Posted June 14, 2009 Posted June 14, 2009 I am trying to get the orders to select the info from customers_basket_text_attributes and insert it into the orders_text_attributes table when submitting an order to the paypal_ipn. Here is the code I have in the Paypal_ipn.php payment: $order_products_id = tep_db_insert_id(); // denuz text attr $attr_q = tep_db_query("select * from customers_basket_text_attributes where session_id = '" . $_SESSION['osCsid'] . "' and products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); while ($attr = tep_db_fetch_array($attr_q)) { tep_db_query("insert into orders_text_attributes values ($insert_id, " . tep_get_prid($order->products[$i]['id']) . ", " . $attr['products_text_attributes_id'] . ", " . $attr['products_text_attributes_text'] . ")"); } tep_db_query("delete from customers_basket_text_attributes where products_id = '" . tep_get_prid($order->products[$i]['id']) . "' and session_id = '" . $_SESSION['osCsid'] . "'"); // eof denuz text attr I look at the customers basket text attribute and the data is there but when the order comes through, the data is not moved to orders_text_attributes table and not deleted from customers_basket_text_attributes. It works for Authorize.net, but it will not work for paypal. Can you let me know what I am doing wrong? Any help would be greatly appreciated... Jason Quote
steve_s Posted June 14, 2009 Posted June 14, 2009 I am trying to get the orders to select the info from customers_basket_text_attributes and insert it into the orders_text_attributes table when submitting an order to the paypal_ipn. Here is the code I have in the Paypal_ipn.php payment: $order_products_id = tep_db_insert_id(); // denuz text attr $attr_q = tep_db_query("select * from customers_basket_text_attributes where session_id = '" . $_SESSION['osCsid'] . "' and products_id = '" . tep_get_prid($order->products[$i]['id']) . "'"); while ($attr = tep_db_fetch_array($attr_q)) { tep_db_query("insert into orders_text_attributes values ($insert_id, " . tep_get_prid($order->products[$i]['id']) . ", " . $attr['products_text_attributes_id'] . ", " . $attr['products_text_attributes_text'] . ")"); } tep_db_query("delete from customers_basket_text_attributes where products_id = '" . tep_get_prid($order->products[$i]['id']) . "' and session_id = '" . $_SESSION['osCsid'] . "'"); // eof denuz text attr I look at the customers basket text attribute and the data is there but when the order comes through, the data is not moved to orders_text_attributes table and not deleted from customers_basket_text_attributes. It works for Authorize.net, but it will not work for paypal. Can you let me know what I am doing wrong? Any help would be greatly appreciated... Jason try changing notifiy url to checkout_process.php see if that does anything Quote
jferezy Posted June 14, 2009 Author Posted June 14, 2009 try changing notifiy url to checkout_process.php see if that does anything Hi Steve, Thanks for your quick response.... I have this in the paypal_ipn.php file. $parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php', 'language=' . $_SESSION['language'], 'SSL', false, false); Are you saying change that to $parameters['notify_url'] = tep_href_link(FILENAME_CHECKOUT_PROCESS, 'language=' . $_SESSION['language'], 'SSL', false, false); Quote
steve_s Posted June 14, 2009 Posted June 14, 2009 Hi Steve, Thanks for your quick response.... I have this in the paypal_ipn.php file. $parameters['notify_url'] = tep_href_link('ext/modules/payment/paypal_ipn/ipn.php', 'language=' . $_SESSION['language'], 'SSL', false, false); Are you saying change that to $parameters['notify_url'] = tep_href_link(FILENAME_CHECKOUT_PROCESS, 'language=' . $_SESSION['language'], 'SSL', false, false); Yep and see what happens Quote
jferezy Posted June 15, 2009 Author Posted June 15, 2009 Yep and see what happens That unfortunately did not work. All I received was a paypal email. The data is still the same. Any other thoughts would be greatly appreciated!!!! Thanks! Jason Quote
steve_s Posted June 15, 2009 Posted June 15, 2009 That unfortunately did not work. All I received was a paypal email. The data is still the same. Any other thoughts would be greatly appreciated!!!! Thanks! Jason You could try in the paypal suport thread http://www.oscommerce.com/forums/index.php?showforum=54 Quote
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.