require at least $5
This commit is contained in:
parent
8c4fdf4c22
commit
5d2b8cfe9b
|
@ -220,6 +220,9 @@ def donate():
|
|||
except:
|
||||
return { "success": False, "reason": "Invalid request" }, 400
|
||||
|
||||
if amount < 500:
|
||||
return { "success": False, "reason": "Please select at least $5 to offset processing fees" }
|
||||
|
||||
[_, domain] = email.split("@")
|
||||
if domain in email_blacklist:
|
||||
return { "success": True, "new_account": False }
|
||||
|
|
|
@ -67,6 +67,13 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (donation.amount < 500) {
|
||||
var errors = document.getElementById("errors");
|
||||
errors.classList.remove("hidden");
|
||||
errors.querySelector("p").textContent = "Please select at least $5 to offset processing fees.";
|
||||
return;
|
||||
}
|
||||
|
||||
donation.comment = document.getElementById("comments").value;
|
||||
|
||||
var handler = StripeCheckout.configure({
|
||||
|
|
Loading…
Reference in New Issue