Jump to content
Sign in to follow this  
jferezy

Paypal_ipn text attribute blank on orders

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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);

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×