mirror of
https://github.com/itflow-org/itflow
synced 2026-11-26 22:37:29 +00:00
Let clients pay the card fee - turn on Clients pay the card fee on Stripe in Admin > Payment Providers with Stripe's percent and fixed rate, and each card payment in the client portal, through an invoice's link, by autopay or from Charge Saved Card is grossed up so Stripe's fee comes out of it, with one fee per payment shared over its invoices; the fee is shown before paying (Pay invoices, checkout, the guest pay page, invoice pages, autopay and the Charge Saved Card window) and goes on each invoice as a Card Fee line with no tax when the payment is booked, carried in the PaymentIntent's itflow_fees metadata and checked against the amount received to the cent; a client can be let off it with No card fee on their Billing tab, refunding a card payment takes its Card Fee line back off, autopay and Charge Saved Card now compare cents instead of whole dollars, database 3.5.6 adds the provider and client columns, changelog updated
This commit is contained in:
@@ -1047,12 +1047,12 @@ if (isset($_POST['portal_pay'])) {
|
||||
if (!$booked['ok']) {
|
||||
$pi_id = escapeSql((string) $charge['pi']->id);
|
||||
logApp("Stripe", "error", "Saved card payment $pi_id for client $session_client_id went through but could not be booked: " . $booked['error']);
|
||||
appNotify("Invoice Payment", "A card payment of " . escapeSql(billingMoney($selection['total'], $selection['currency'])) . " from $session_client_name went through in the client portal but could not be recorded - $pi_id", "/agent/invoices.php?client_id=$session_client_id", $session_client_id);
|
||||
appNotify("Invoice Payment", "A card payment of " . escapeSql(billingMoney($selection['charge'], $selection['currency'])) . " from $session_client_name went through in the client portal but could not be recorded - $pi_id", "/agent/invoices.php?client_id=$session_client_id", $session_client_id);
|
||||
flashAlert('Your card was charged, but we could not record the payment here - we have been told and will put it right', 'error');
|
||||
redirect('invoices.php');
|
||||
}
|
||||
|
||||
flashAlert('Thank you - your payment of <strong>' . escapeHtml(billingMoney($selection['total'], $selection['currency'])) . '</strong> went through');
|
||||
flashAlert('Thank you - your payment of <strong>' . escapeHtml(billingMoney($selection['charge'], $selection['currency'])) . '</strong> went through');
|
||||
redirect('receipt.php?id=' . $booked['payment_id']);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user