commit:     0d3af7ac18335c4ca74f9350e586313b94ea98f1
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 24 00:26:46 2016 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Sep 24 00:30:48 2016 +0000
URL:        https://gitweb.gentoo.org/sites/www.git/commit/?id=0d3af7ac

donate: set $5 min donation.

The foundation has recieved a number of small fraudulant donations,
possibly made to test stolen credit card numbers. These donations had
chargebacks fee levied against us by Paypal.

We are striving to verify the donations where possible, but this will
help reduce them.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 donate/index.html | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/donate/index.html b/donate/index.html
index 7168a69..8aa2f05 100644
--- a/donate/index.html
+++ b/donate/index.html
@@ -28,7 +28,20 @@ layout: tyrian
       <div class="panel-body">
         You can easily make a one-time contribution using PayPal:
         <br><br>
-        <form action="https://www.paypal.com/cgi-bin/webscr"; method="post" 
class="donate-form">
+        <script type="text/javascript">
+          function validate_donation_form() {
+            var amount_str = document.forms["donate-form"]["amount"].value;
+            var amount_num = +amount_str; // unary conversion op
+            if (isNaN(amount_num)) {
+              return false;
+            }
+            if (amount_num < 5.00) {
+              return false;
+            }
+            return true;
+          }
+        </script>
+        <form action="https://www.paypal.com/cgi-bin/webscr"; method="post" 
class="donate-form" name="donate-form" onsubmit="return 
validate_donation_form()">
           <input type="hidden" name="cmd" value="_xclick">
           <input type="hidden" name="business" value="pay...@gentoo.org">
           <input type="hidden" name="item_name" value="Gentoo Linux Support">
@@ -41,7 +54,7 @@ layout: tyrian
           <input type="hidden" name="cancel_return" 
value="https://www.gentoo.org/donate/cancel.html";>
           <div class="input-group input-group-lg">
             <span class="input-group-addon">US $</span>
-            <input type="text" class="form-control" placeholder="Enter Amount" 
name="amount">
+            <input type="text" class="form-control" placeholder="Enter Amount" 
name="amount" min="5.00" step="0.01">
             <span class="input-group-btn">
               <button class="btn btn-danger" type="submit"><span class="fa 
fa-fw fa-heart"></span> Donate!</button>
             </span>
@@ -50,7 +63,9 @@ layout: tyrian
         <br>
         <small>
           You can use this form even if you don't have or want to create a 
PayPal account.
-          On the next screen, you can pay with your credit card instead.
+          On the next screen, you can pay with your credit card instead. 
Please note that
+          there is a US$ 5 minimum, and you may be contacted to confirm your 
donation is
+          not fraudulent.
         </small>
       </div>
     </div>
@@ -113,4 +128,4 @@ layout: tyrian
     Our presence there was only possible thanks to your support<br>
     Picture by Hanno Böck/CC-0
   </small>
-</p>
\ No newline at end of file
+</p>

Reply via email to