vyskoczilova / woocommerce-payforpayment-old

Setup individual charges for each payment method in woocommerce.
19 stars 15 forks source link

Credit versus debit card fees... #8

Closed ArtScope closed 10 years ago

ArtScope commented 10 years ago

I have installed the woocommerce-payforpayment extension on my site (thanks!) with the hope of being able to charge my customers for credit cards (by simply passing on the percentage fee from the Payment Gateway) but not charge for debit cards (I can swallow the 20p charge myself).

Though it seems like the 'Extra charge' fields added in my WP admin pages don't seem to differentiate between credit and debit cards and instead see these as one and the same payment type? Is this the case or am I missing something?

Thanks in advance...

mcguffin commented 10 years ago

Hi, looks like the plugin can't handle this. You can configure fees only once for each payment gateway. To make a distinction between credit and debit you need to have them installed as two different payment methods. If this distinction is made off-site by PayPal, Amazon or any other payment service you'll have no chance to achieve your goal.

Just in case you can handle it on-site (e.g. the customer made a choice somewhere), I just added two filters, allowing you to handle payment fees before they get added to the cart. woocommerce_pay4pay_applyfor_{$current_gateway_id} should be the one. See readme for details. regards, j.