In my view they should only be charged a credit card fee on the deposit, then another fee on the balance when they pay the balance, as they may settle the balance by bank transfer or cheque, in which case I'd need to refund the balance of the credit card fee.
Yes, that is in fact what happens, although I can see why the initial payment summary might not make it obvious...
The fee is shown on the payment summary as a percentage of the invoice amount, but where a partial payment is being taken, the amount charged is a percentage of that total. So in this case they are actually paying 25% of the invoice amount and 25% of the gateway fee. The fee is not actually added to the invoice until after payment is confirmed (as they might select a different payment method and not go through with the payment). At that point, the gateway fee is added to the invoice based on the amount paid (ie. 25%). So the amount outstanding is correct. If they pay the balance offline, the amount outstanding shown on the invoice is fine as it does not include the remaining 75% of the gateway fee. If they pay the balance online, and select the same payment method, the remaining 75% of the gateway fee is added.
There might perhaps be a case here for amending how the gateway fee is displayed in the transaction summary in cases where partial payments are being taken, but even so, both the information displayed, and the behaviour and amount charged is, I believe, correct.