WooCommerce: Add fees to card based on payment gateway selected

Chris Stott picture Chris Stott · Mar 14, 2013 · Viewed 10.1k times · Source

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.

There is no WooCommerce plugin that does this. Closest I've got is this thread.

http://support.woothemes.com/entries/22716621-Credit-card-fees

Thanks in advance for any help you can provide.

Answer

BG BRUNO picture BG BRUNO · Mar 4, 2019