Skip to content

Commit

Permalink
[Donate] Always use one-off, not once.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Jul 8, 2024
1 parent 370b69c commit a374d56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions www/includes/easyparliament/helper-donate.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function stripe_session_ajax($successPage, $cancelPage)
$howoften = "monthly";
}
$validPeriods = ["monthly" => "month", "annually" => "year"];
$period = $validPeriods[$howoften] ?? "once";
$period = $validPeriods[$howoften] ?? "one-off";

$metadata = [
"gift-aid" => $giftaid,
Expand Down Expand Up @@ -112,7 +112,7 @@ function stripe_session_ajax($successPage, $cancelPage)
We run services such as TheyWorkForYou, WhatDoTheyKnow and FixMyStreet.
";

if ($period == "once") {
if ($period == "one-off") {
// one off payments
$data += [
"mode" => "payment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<h2>Donate to TheyWorkForYou and mySociety</h3>

<div class="fat-radio-buttons">
<label for="how-often-once" class="inline-radio-label"><input type="radio" id="how-often-once" name="how-often" value="once" data-default-amount="<?= $default_amounts["one-off"] ?>" required <?php get_checked($initial_payment_type, 'one-off') ?>>One-off donation</label>
<label for="how-often-one-off" class="inline-radio-label"><input type="radio" id="how-often-one-off" name="how-often" value="one-off" data-default-amount="<?= $default_amounts["one-off"] ?>" required <?php get_checked($initial_payment_type, 'one-off') ?>>One-off donation</label>
<label for="how-often-annually" class="inline-radio-label"><input type="radio" id="how-often-annually" name="how-often" value="annually" data-default-amount="<?= $default_amounts["annually"] ?>" required <?php get_checked($initial_payment_type, 'annually') ?>>Annual donation</label>
<label for="how-often-monthly" class="inline-radio-label"><input type="radio" id="how-often-monthly" name="how-often" value="monthly" data-default-amount="<?= $default_amounts["monthly"] ?>" required <?php get_checked($initial_payment_type, 'monthly') ?>>Monthly donation</label>
</div>
Expand Down

0 comments on commit a374d56

Please sign in to comment.