oc-mall-plugin
oc-mall-plugin copied to clipboard
[bug] You can avoid payment fee if you pay your order after using payment button
Hello,
I noticed a bug when you decide to pay an order later using the payment button you find in your order history. The order total is not updated and you can bypass the fee of the chosen payment method. Can be reproduced on the default mall theme.
To reproduce :
- Setup some differents payment methods and put some fees to one of them
- Pass an order by choosing a payment method with no fees (and not considered "as paid" to be able to pay later)
- Go to your order history and click on the pay button for your just passed order
- Choose a payment method that have a fee and process the payment
- You will see that the order total is still the same, it was not updated adding the payment fee
After a quick investigation, it seems the reason of that is the paymentMethodSelector component that does not update the order totals in the setData() function. It should update all order totals by taking the payment fee into consideration.
Best regards,
Thank you for this report. This is going to be hard to fix as the totals calculator currently does not work with Order models.