diff --git a/public/actions/submit.php b/public/actions/submit.php index 4d4e82f..1ff438d 100644 --- a/public/actions/submit.php +++ b/public/actions/submit.php @@ -238,7 +238,7 @@ $database->action(function ($database) { // Add Stripe fees // https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers if ($SETTINGS["prices"]["add_stripe_fees"]) { - $duecard = ($duecard + 0.30) / (1 - 0.029); + $duecard = number_format(($duecard + 0.30) / (1 - 0.029), 2) * 1.0; } echo "\nCost $dueusd total: $duecard to Stripe, $campcoupons as coupons\n"; diff --git a/public/static/signup.js b/public/static/signup.js index 9bf4739..8d0583a 100644 --- a/public/static/signup.js +++ b/public/static/signup.js @@ -124,7 +124,7 @@ function updateTotal() { cardcharge = (cardcharge + 0.3) / (1 - 0.029); } - totalcharge = Math.max(cardcharge + couponcharge, 0); + totalcharge = Math.max(cardcharge + couponcharge, 0).toFixed(2); // The server will refuse to finish the registration if this doesn't match // the backend-calculated amount, don't bother being a haxxor