diff --git a/fosspay/blueprints/html.py b/fosspay/blueprints/html.py
index 1e5eeaf..7f6fe87 100644
--- a/fosspay/blueprints/html.py
+++ b/fosspay/blueprints/html.py
@@ -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 }
diff --git a/scripts/index.js b/scripts/index.js
index 0041b77..9e4f342 100644
--- a/scripts/index.js
+++ b/scripts/index.js
@@ -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({