Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Paypal_ipn text attribute blank on orders


jferezy

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

Link to comment
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

Link to comment
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);

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...