PDA

View Full Version : PayPal Express Checkout IPN



michael_s
10-14-2010, 02:00 AM
Problem : while with discount coupon code module applied and checkout with preset free shipping coupon code, shopping cart will generate invoice correctly but paypal failed to deduct free shipping from total amount which leads to error message such as "total amount did not match". One simply fix can solve this issue by edit through catalog/includes/modules/payment/paypal_ec.php

FIND 2 LOCATIONS :
$su_total = round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal);

REPLACE :
$su_total = (round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal) +round(($order->info['total'] - $order->info['subtotal'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($currency_id), $decimal));

All credit goes to metaphor_e, original discussion can be found on http://forums.oscommerce.com/topic/245571-paypal-express-checkout-ipn-payment-module/page__st__380

*no file uploaded

More... (http://addons.oscommerce.com/info/4791)