Skip to content

Commit 043fb05

Browse files
committed
Tweaked maximum donation amount
The stripe API rejects anything > $999,999.99 and we're sporadically getting error reports on Sentry from people trying out 1 million.
1 parent f90b46d commit 043fb05

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fundraising/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class PaymentForm(forms.Form):
181181
amount = forms.IntegerField(
182182
required=True,
183183
min_value=1, # Minimum payment from Stripe API
184-
max_value=1_000_000, # Reject clearly unrealistic amounts.
184+
max_value=999_999, # Reject clearly unrealistic amounts.
185185
)
186186
interval = forms.ChoiceField(
187187
required=True,

fundraising/tests/test_forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_max_value_validation(self, client_submit):
2727
"""
2828
form = PaymentForm(
2929
data={
30-
"amount": 1_000_001,
30+
"amount": 1_000_000,
3131
"interval": "onetime",
3232
"captcha": "TESTING",
3333
}

0 commit comments

Comments
 (0)