Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to add Order Number to Paypal Emails back to Merchant


Guest

Recommended Posts

Posted

I wanted to have the order number on my store specified somewhere in the Paypal email i receive when someone purchases from my store as at present i only have their name and what they purchased.

 

Pretty sure i would need to add it to the /includes/modules/Payment/paypal.php file

 

atm i have a small addon hack to pass more detailed info on products and qty so my line in the function _getPayPalFields in the above file is as follows:

 

$paypal_fields .= tep_draw_hidden_field('item_name', $_SESSION['FixOrder']) .

 

I would have thought something along the lines of the following will work, but i need to ascertain the order id first, any help ???

 

$paypal_fields .= tep_draw_hidden_field('item_name', (int)$order_id . ':' . $_SESSION['FixOrder']) .

Posted

thx for the pointer, although i haven't the time to install the whole contribution

 

it looks like within the paypal_ipn.php file that the following line uploads the order id to paypal

 

$parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);

 

so it looks like the field invoice can contain the order number

 

so now i just need to extract the order id somehow and then send it on its way to paypal ??

 

perhaps with an extra line of something like:

tep_draw_hidden_field('invoice', '$order_id') .

 

and then pull order id somehow ?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...