PlatoCreative / commerce-payment-express

Payment Express (DPS) payment gateway plugin for Craft Commerce 2
Other
1 stars 4 forks source link

Feature request - capture CC Service Fee #3

Closed anchovy closed 2 years ago

anchovy commented 2 years ago

Windcave has an option to charge a fee for paying by Credit card - this is calculated by windcave and applied to the transaction amount, this is on an account by account basis - you can't enable/disable for a given set of key/username.

I believe it's returned in the response with the key 'AmountSurcharge'.

...
 ["AmountSettlement"]=>
  string(7) "1039.00"
  ["TotalAmount"]=>
  string(7) "1058.23"
  ["AmountSurcharge"]=>
  string(5) "19.23"
  ["AuthCode"]=>
...

Can your plugin be updated to capture this surcharge fee and make it available in the order details, and to also capture the totalAmount as the amount charged rather than AmountSettlement?

Currently, when processing an order with a surcharge we're seeing the order total set to AmountSettlement rather than TotalAmount

The walkthrough snaps below might help.

1-checkout

2-paid-with-surcharge-fee

3-success-wrong-total

There's a couple of ways this could be achived I'm thinking.

  1. Add an option to the gateways - Payments for this gateway can incur a surcharge fee. I say 'can' - because if the gateway allows A2A and CC, the surcharge is only added to CC payments. When this setting is enabled, then the plugin would know to look for the AmountSurcharge value etc. 2: No extra settings, just update the plugin to always look for a AmountSurcharge value and to always use the TotalAmount value.

Happy to help with any other information you might need to get this over the line.

Thanks in advance.

anchovy commented 2 years ago

@stephenj-plato any chance of looking at this, we've purchased the plugin and really need it to capture the processing charge applied by windcave.

mediabeastnz commented 2 years ago

This could probably be achieved by using Event hooks. I'm just not sure there is one currently in the right spot for what you are trying to do. You'd need to grab the response from Windcave (Gateway) find that amount and then make modifications to the order.

Unfortunately this is out of the scope of this plugin.