[git] gnupg-doc - branch, preview, updated. ff2f56b7aa2fa3153e2caff550a2a98a69bfb7a7

by Werner Koch cvs at cvs.gnupg.org
Mon May 29 09:53:54 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, preview has been updated
       via  ff2f56b7aa2fa3153e2caff550a2a98a69bfb7a7 (commit)
      from  91d27cc6112d7df985e568bcf16706f71d1b4b84 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ff2f56b7aa2fa3153e2caff550a2a98a69bfb7a7
Author: Werner Koch <wk at gnupg.org>
Date:   Mon May 29 09:50:19 2017 +0200

    cgi: Relax checks for Bitcoin.
    
    Selecting Bitcoin does now continue even with no amount given.

diff --git a/cgi/procdonate.cgi b/cgi/procdonate.cgi
index 375fbbc..7dae23d 100755
--- a/cgi/procdonate.cgi
+++ b/cgi/procdonate.cgi
@@ -515,49 +515,52 @@ sub check_donation ()
     $message = $q->param("message");
     $stripeamount = "0";
 
-    # Check the amount and the recurring value
-
-    # Note that we only use full Euro/USD/etc from the amount to avoid
-    # problems with ',' and '.' decimal separators.
-    $data{"Amount"} = int $amount;
-    $data{"Currency"} = $currency;
-    $data{"Recur"} = $recur;
-    if (not payproc ('CHECKAMOUNT', \%data )) {
-        $errdict{"amount"} = $data{"ERR_Description"};
-        $anyerr = 1;
-    }
-    $stripeamount = $data{"_amount"};
-    $amount = $data{"Amount"};
-    $recur = $data{"Recur"};
-    $currency = $data{"Currency"};
-    $euroamount = $data{"Euro"};
-
-    # Check that at least some Euros are given.  Due to Stripe
-    # processing fees and our own costs for bookkeeping we need to ask
-    # for a minimum amount.
-    if ( (not $anyerr) and ($euroamount < 4.00) ) {
+    $paytype = $q->param("paytype");
 
-        if ($lang eq 'de') {
-            $msg= 'Um unsere Verwaltungskosten niedrig zu halten,'
-                . 'können wir leider keine Spenden unter 4 Euro annehmen.';
-        } elsif ($lang eq 'fr') {
-            $msg = 'Désolé, en raison des frais généraux nous ne pouvons'
-                . ' pas accepter les donations de moins de 4 euros.';
-        } elsif ($lang eq 'ja') {
-            $msg = '申し訳ありません。間接経費のため、4ユーロ未満の寄付'
-                . 'は受け付けることができません。';
-        }
-        else {
-            $msg = 'Sorry, due to overhead costs we do'
-                . ' not accept donations of less than 4 Euro.';
+    # Check the amount and the recurring value unless Bitcoins are
+    # selected.
+    if ( $paytype ne "bc" ) {
+        # Note that we only use full Euro/USD/etc from the amount to avoid
+        # problems with ',' and '.' decimal separators.
+        $data{"Amount"} = int $amount;
+        $data{"Currency"} = $currency;
+        $data{"Recur"} = $recur;
+        if (not payproc ('CHECKAMOUNT', \%data )) {
+            $errdict{"amount"} = $data{"ERR_Description"};
+            $anyerr = 1;
         }
+        $stripeamount = $data{"_amount"};
+        $amount = $data{"Amount"};
+        $recur = $data{"Recur"};
+        $currency = $data{"Currency"};
+        $euroamount = $data{"Euro"};
+
+        # Check that at least some Euros are given.  Due to Stripe
+        # processing fees and our own costs for bookkeeping we need to ask
+        # for a minimum amount.
+        if ( (not $anyerr) and ($euroamount < 4.00) ) {
+
+            if ($lang eq 'de') {
+                $msg= 'Um unsere Verwaltungskosten niedrig zu halten,'
+                    . 'können wir leider keine Spenden unter 4 Euro annehmen.';
+            } elsif ($lang eq 'fr') {
+                $msg = 'Désolé, en raison des frais généraux nous ne pouvons'
+                    . ' pas accepter les donations de moins de 4 euros.';
+            } elsif ($lang eq 'ja') {
+                $msg = '申し訳ありません。間接経費のため、4ユーロ未満の寄付'
+                    . 'は受け付けることができません。';
+            }
+            else {
+                $msg = 'Sorry, due to overhead costs we do'
+                    . ' not accept donations of less than 4 Euro.';
+            }
 
-        $errdict{"amount"} = $msg;
-        $anyerr = 1;
+            $errdict{"amount"} = $msg;
+            $anyerr = 1;
+        }
     }
 
     # Check the payment type
-    $paytype = $q->param("paytype");
     if ( $paytype eq "bc" ) {
         # No further checks - this is kind of a hack.
     }

-----------------------------------------------------------------------

Summary of changes:
 cgi/procdonate.cgi | 77 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 40 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list