I created a custom plugin using the code in bc_add_cart_modifier.php
Two Issues:
#1 It works only if you go back to the cart then move forward from there.
#2 Once the payment method with surcharge is chosen and the surcharge is added, if I change the method again, the surcharge remains.
You’re going to run into some issues with the bc_add_cart_modifier.php if you use that out of the box with the PayPal payment method (bc_add_cart_modifier.php is intended to be used for adding a surcharge if Invoice is selected).
You might have better success with using this solution instead:
The support post ‘Payment Method Surcharge Price Modifier’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.