Potential fix for Stripe charges being off by a cent

This commit is contained in:
Wrongecho
2026-09-22 16:01:46 +00:00
parent 8d51f1a64a
commit c4843095b2
4 changed files with 4 additions and 4 deletions

View File

@@ -410,7 +410,7 @@ if (isset($_POST['add_payment_stripe'])) {
// Create a payment intent
try {
$payment_intent = $stripe->paymentIntents->create([
'amount' => intval($balance_to_pay * 100), // Times by 100 as Stripe expects values in cents
'amount' => intval(round($balance_to_pay * 100)), // Times by 100 as Stripe expects values in cents
'currency' => $invoice_currency_code,
'customer' => $payment_provider_client,
'payment_method' => $saved_payment_method,