Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Problem


Guest

Recommended Posts

Posted

hi people,

this is my problem, when an order is placed pay for via paypal, my site doesnt ad the shipping into the order, and sometimes i do not get an order on file in the website back end. so i have to email the people and ask them what they purchased, and then give them free shipping since i cant email them asking for more money, that would be rude. any way if someone could help me with this i'd love it.

Thanks

Don

:blink: B)

Posted

While this won't help with the order showing in admin, it will let you know what the customer ordered

 

You may also want to consider adding this in case they don't click continue on paypal site and return to your site to finish transaction

 

 

Just in case someone doesn't click continue to get back to your site

here is a mod to include into your PayPal module to you can see what the customer ordered on your PayPal payment notification (just in case they don't return to your site to complete the process and generate an invoice) -

 

BACK UP BACK UP BACK UP

 

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;

}

 

 

the above code snippet replaces the code snippet in the catalog/includes/modules/payment/paypal.php file

 

look for

 

function process_button() {

 

and then copy and paste and replace that section of code with the code above

Posted

I get this error message after someone pays via paypal:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/pewter/public_html/onlinestore/includes/modules/payment/paypal.php:107) in /home/pewter/public_html/onlinestore/includes/functions/general.php on line 23

 

This prevents the customer from coming back to the site after paying through paypal. Any ideas on how to fix this?

  • 3 weeks later...
Posted

Is there a fix for this problem? I have searched the forum for several hours, but so far all I've found is the code that adds product purchase information to your Paypal notification, and a suggestion to look for extra lines or spaces at the end of the offending file. I did that, but it did not help. We're still getting this following error once the user clicks on the "continue" link after making payment with Paypal:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxxxx/public_html/catalog/includes/languages/english/modules/payment/paypal.php:15) in /home/xxxxxxxx/public_html/catalog/includes/functions/general.php on line 29

 

If I click on refresh it brings you back to the shopping cart and adds the order to the DB, but if you get the error and stop there, it obviously does not.

 

Is there a fix to this so that the user does not receive an error and is returned to the shopping cart as they should be?

Posted

So it turns out I was looking in the wrong paypal.php file (modules/payment/paypal.php). When I actually looked at the RIGHT file, sure enough, there was an extra line. DUH! :blink:

Posted

This works great but doesn't allow for options (Color, Size) does paypal IPN pass those? Or is there simply a better way (Lost Orders contrib) or something? I'm getting this about once or twice a week inspite of posting intructions regarding paypal checkout and so on. (Hey finally seeing some sales I won't complain too much!)

 

My typical orders are 6 items in X colors and X sizes.

 

Peter

Posted

I believe you'll have to modify your files to send that info, and that will be the case regardless of using Paypal or Paypal IPN. There is some input about sending additional info to Paypal in the IPN support thread. Let us know when you get it working.

Archived

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

×
×
  • Create New...