payment-fee icon indicating copy to clipboard operation
payment-fee copied to clipboard

Fee amount not displayed separately & not working with Paypal

Open YogaPixie17 opened this issue 8 years ago • 1 comments

Hello :) Adding the fee works perfectly on offline payment methods, I can see it has been added to the grand total on the checkout page, but the row showing the fee does not display at all. The row does show if the order is placed and then viewed in my orders.

Also if I select Paypal as the payment method, it says "PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details)." The above was tried with "Transfer Cart Line Items" in magento paypal config option set to both Yes and No

Using Magento ver. 1.9.3.1 tested on RWD and default themes.

YogaPixie17 avatar Feb 11 '17 19:02 YogaPixie17

This can be solved by changing the code in

app/code/community/Brander/PaymentFee/Model

in function updatePaypalTotal

change $cart->updateTotal(Mage_Paypal_Model_Cart::TOTAL_SUBTOTAL, $cart->getSalesEntity()->getFeeAmount());

to

$paymentfeeAmount = $cart->getSalesEntity()->getFeeAmount(); if ($paymentfeeAmount > 0) { $cart->addItem('Payment Fee', 1, $paymentfeeAmount, 'payment_fee'); }

priyaraj456 avatar Sep 14 '18 11:09 priyaraj456