I need to add a credit card fee % based depending on what payment method the customer selects at the shopping cart in WooCommerce.
This needs to be added to the shopping cart total so that it sends the total amount including the fee to the payment gateway.
For example if the shopping cart total was £100.
If the customer selects 'Credit Card' payment I would like to add 2% to the transaction making the shopping cart total £102. This amount would then go to the external credit card provider for processing as the actually card processing is handled by them (WorldPay_).
I would also like to add a different amount for Paypal 3%.
If the customer selects Cash on Delivery or Bank Transfer I wouldn't add any fees.