Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

What item did the customer order?


Recommended Posts

I tried PayPalIPN on my site, but whenever I leave it in Test Mode it works fine, but whenever I switch over to normal mode it doesn't work right, it leaves all the fields blank :cry:


Also, how do I know what product the customer ordered? It doesn't say on MY invoice and it doesn't say in the PayPalIPN area? Any ideas! Thanks!



Link to comment
Share on other sites

I don't use paypal IPN I just change catalog/includes/modules/payment/paypal.php file

look for function process_button() {




change the following code:


function process_button() {

global $order, $currencies, $currency;


if (MODULE_PAYMENT_PAYPAL_CURRENCY == 'Selected Currency') {

$my_currency = $currency;

} else {

$my_currency = substr(MODULE_PAYMENT_PAYPAL_CURRENCY, 5);


if (!in_array($my_currency, array('CAD', 'EUR', 'GBP', 'JPY', 'USD'))) {

$my_currency = 'USD';


$xx = '';

for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**';


$process_button_string = tep_draw_hidden_field('cmd', '_xclick') .

tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) .

tep_draw_hidden_field('item_name', STORE_NAME . ' ' . $xx) .

tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('currency_code', $my_currency) .

tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) .

tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));


return $process_button_string;


Link to comment
Share on other sites

That will make it so even if they don't come back to your site, it will put the item info ij the e-mail you receive from paypal


You mod worked great. But the attributes info does not get sent any way to add this info to the item?





Link to comment
Share on other sites


I would love to be able to take credit for this mod, but I can't. The credit goes to jchasick he is the one who came up with it. http://www.oscommerce.com/forums/viewtopic.php...+process+paypal


He would be the one to ask about how to make the attributes be included. (I never tried testing with products with attributes)



I have seen tons of people having problems with paypal ipn. Since Paypal e-mails you when you get paid anyways all I needed to know was what the customer ordered. This mod gives me what I need quick and easy with no problems. It is up to you to decide what you want to do. Just my 2 cents.....

Link to comment
Share on other sites


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

  • Create New...