Don’t allow to switch payment method for unpaid order

The rule is that if you pay with paypal or credit card you get -5%.

A customer tried to pay with card, it wasn’t successful and after that he paid with cash on delivery, but he get the discount.

We can’t recalculate existing order, but it’s possible to force payment method.

Please, use this PHP code: