[git] gnupg-doc - branch, master, updated. 963c8c078713bdbd1abc8174fff6075031152943

by Werner Koch cvs at cvs.gnupg.org
Tue Oct 21 21:52:26 CEST 2014


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, master has been updated
       via  963c8c078713bdbd1abc8174fff6075031152943 (commit)
      from  f5e7a838cc7d6b84e818f014e7132d84a12927d9 (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 963c8c078713bdbd1abc8174fff6075031152943
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Oct 21 20:54:13 2014 +0200

    Reworked the donation work flow.
    
    * web/donate/checkout-pp.org: New.
    * web/donate/index.org: Add paytype radio buttons and some label tags.
    * web/share/gnupg-logo-180x59tr.png: New.
    * web/donate/checkout-cc.org: Improve buttons.
    * web/share/site.css: Add hacks for the donation buttons.
    * web/donate/donate-thanks.org: Fix a link.
    * web/donate/checkout.org: Remove.
    * web/donate/paypal-thx.org: Remove.
    
    * cgi/config.rc (baseurl): New.
    * cgi/procdonate.cgi: Rewrite to support Paypal.

diff --git a/cgi/config.rc b/cgi/config.rc
index 64290f2..f139b53 100644
--- a/cgi/config.rc
+++ b/cgi/config.rc
@@ -1,5 +1,6 @@
 # config.rc - Configuration variables for all CGIs         -*- perl -*-
 
+baseurl => 'https://gnupg.org'
 htdocs  => '/var/www/www/www.gnupg.org/htdocs/',
 
 payprocd_socket => '/var/run/payproc/daemon',
diff --git a/cgi/procdonate.cgi b/cgi/procdonate.cgi
index a61c75c..3b2ecf4 100755
--- a/cgi/procdonate.cgi
+++ b/cgi/procdonate.cgi
@@ -20,6 +20,7 @@ use IO::Socket::UNIX;
 realpath($0) =~ /^(.*)\/.*$/;
 my %config = do $1 . '/config.rc';
 
+my $baseurl = $config{baseurl};
 my $htdocs =  $config{htdocs};
 my $socket_name = $config{payprocd_socket};
 my $error_marker = '<span style="color: red;">* error</span>';
@@ -33,6 +34,7 @@ my $sessid = $q->param("sessid");
 
 # Variables used in the template pages.
 my $amount = "";
+my $paytype = "";
 my $stripeamount = "";
 my $euroamount = "";
 my $currency = "";
@@ -47,6 +49,7 @@ my %errdict = ();
 
 # Prototypes
 sub fail ($);
+sub get_paypal_approval ();
 
 
 # Write a template file.  A template is a proper HTML file with
@@ -65,13 +68,15 @@ sub write_template ($) {
     my $err_amount = '';
     my $err_name = '';
     my $err_mail = '';
-    my $checkother = ' checked="checked"';
+    my $err_paytype = '';
+    my $check_checked = ' checked="checked"';
     my $sel_eur = '';
     my $sel_usd = '';
     my $sel_gbp = '';
     my $sel_jpy = '';
     my $message_fmt;
     my $publishname;
+    my $check_paytype = 'none';
 
     # Avoid broken HTML attributes.
     $amount =~ s/\x22/\x27/g;
@@ -106,6 +111,12 @@ sub write_template ($) {
         $sel_jpy = ' selected="selected"';
     }
 
+    if ( $paytype eq "cc" ) {
+        $check_paytype = "CC";
+    } elsif ( $paytype eq "pp" ) {
+        $check_paytype = "PP";
+    }
+
     # Set var for the paypal button
     if ( $name eq 'Anonymous' or $name eq '') {
         $publishname = 'No';
@@ -119,6 +130,7 @@ sub write_template ($) {
         if    (/amount/) { $err_amount = $error_marker; }
         elsif (/name/)   { $err_name   = $error_marker; }
         elsif (/mail/)   { $err_mail   = $error_marker; }
+        elsif (/paytype/){ $err_paytype = $error_marker; }
 
         $errorpanel = $errorpanel . "Field $_: " . $errdict{$_} . "<br/>\n"
     }
@@ -128,6 +140,7 @@ sub write_template ($) {
             "<div style='color: red;'><p>\n" . $errorpanel . "</p></div>\n";
     }
 
+
     open TEMPLATE, $htdocs . $fname;
     while (<TEMPLATE>) {
         if ( /<!--/ )
@@ -142,7 +155,8 @@ sub write_template ($) {
             || s/(\x22\x2f>)?<!--CURRENCY-->/$currency\1/
             || s/(\x22\x2f>)?<!--NAME-->/$name\1/
             || s/(\x22\x2f>)?<!--MAIL-->/$mail\1/
-            || s/\x2f><!--CHECKOTHER-->/$checkother\x2f>/
+            || s/\x2f><!--CHECKOTHER-->/$check_checked\x2f>/
+            || s/\x2f><!--CHECK_$check_paytype-->/$check_checked\x2f>/
             || s/(<\x2ftextarea>)?<!--MESSAGE-->/$message\1/
             || s/<!--MESSAGE_FMT-->/$message_fmt/
             || s/(<selected=\x22selected\x22)?><!--SEL_EUR-->/$sel_eur>/
@@ -154,6 +168,7 @@ sub write_template ($) {
             || s/<!--ERR_AMOUNT-->/$err_amount/
             || s/<!--ERR_NAME-->/$err_name/
             || s/<!--ERR_MAIL-->/$err_mail/
+            || s/<!--ERR_PAYTYPE-->/$err_paytype/
             || s/<!--ERRORPANEL-->/$errorpanel/;
         }
         print;
@@ -179,7 +194,7 @@ sub payproc ($$)
     # print STDERR "calling payproc: ", $cmd, "<-\n";
 
     $sock = IO::Socket::UNIX->new($socket_name)
-        or fail "socket: $!";
+        or fail "Error connecting to payprocd: $!";
     $sock->print ($cmd, "\n");
 
     while (($key,$value) = each %$data) {
@@ -231,7 +246,7 @@ sub payproc ($$)
 }
 
 
-# Write a page with all the data inserted.
+# Write a dummy page
 sub write_overload_page ()
 {
     print $q->header(-type=>'text/html', -charset=>'utf-8');
@@ -243,6 +258,13 @@ sub write_overload_page ()
     &write_template("donate/error.html");
 }
 
+sub write_cancel_page ()
+{
+    print $q->header(-type=>'text/html', -charset=>'utf-8');
+    print "\n";
+    &write_template("donate/paypal-can.html");
+}
+
 
 # Write an internal error page
 sub fail ($)
@@ -276,15 +298,12 @@ sub write_checkout_page ()
 {
     print $q->header(-type=>'text/html', -charset=>'utf-8');
     print "\n";
-    write_template("donate/checkout.html");
-}
-
-# Write a page with all the data inserted specific for cards.
-sub write_checkout_cc_page ()
-{
-    print $q->header(-type=>'text/html', -charset=>'utf-8');
-    print "\n";
-    write_template("donate/checkout-cc.html");
+    if ( $paytype eq "cc" ) {
+        write_template("donate/checkout-cc.html");
+    }
+    else {
+        write_template("donate/checkout-pp.html");
+    }
 }
 
 
@@ -315,6 +334,7 @@ sub check_donation ()
     } else {
       $currency = 'EUR';
     }
+
     $name = $q->param("name");
     $name = 'Anonymous' if $name eq '';
     $mail = $q->param("mail");
@@ -342,6 +362,13 @@ sub check_donation ()
         $anyerr = 1;
     }
 
+    # Check the payment type
+    $paytype = $q->param("paytype");
+    if ( $paytype ne "cc" and $paytype ne "pp" ) {
+        $errdict{"paytype"} = 'No payment type selected.' .
+                              ' Use "Credit Card" or "PayPal".';
+        $anyerr = 1;
+    }
 
     # Check the mail address
     if ($mail ne '' and $mail !~ /\S+@\S+\.\S+/ ) {
@@ -355,18 +382,23 @@ sub check_donation ()
         return;
     }
 
-
     # Now create a session.
     $data{"Stripeamount"} = $stripeamount;
     $data{"Euroamount"} = $euroamount;
     $data{"Name"} = $name;
     $data{"Mail"} = $mail;
     $data{"Message"} = $message;
+    $data{"Paytype"} = $paytype;
     payproc ('SESSION create', \%data ) or fail $data{"ERR_Description"};
     $sessid = $data{"_SESSID"};
 
-    # Send the checkout page.
-    write_checkout_page();
+    # Send the checkout page and redirect to paypal
+    if ( $paytype eq "pp" ) {
+        get_paypal_approval ();
+    }
+    else {
+        write_checkout_page();
+    }
 }
 
 # This simply resends the main page again.
@@ -377,6 +409,7 @@ sub resend_main_page ()
     payproc ('SESSION get ' . $sessid, \%data) or fail $data{"ERR_Description"};
     $amount = $data{"Amount"};
     $currency = $data{"Currency"};
+    $paytype = $data{"Paytype"};
     $stripeamount = $data{"Stripeamount"};
     $euroamount = $data{"Euroamount"};
     $name = $data{"Name"};
@@ -387,41 +420,6 @@ sub resend_main_page ()
 }
 
 
-# This simply resends the checkout options page.
-sub resend_card_checkout ()
-{
-    my %data;
-
-    payproc ('SESSION get ' . $sessid, \%data) or fail $data{"ERR_Description"};
-    $amount = $data{"Amount"};
-    $currency = $data{"Currency"};
-    $stripeamount = $data{"Stripeamount"};
-    $euroamount = $data{"Euroamount"};
-    $name = $data{"Name"};
-    $mail = $data{"Mail"};
-    $message = $data{"Message"};
-
-    write_checkout_page();
-}
-
-
-
-# This simply sends the card specific checkout page.
-sub prepare_card_checkout ()
-{
-    my %data;
-
-    payproc ('SESSION get ' . $sessid, \%data) or fail $data{"ERR_Description"};
-    $amount = $data{"Amount"};
-    $currency = $data{"Currency"};
-    $stripeamount = $data{"Stripeamount"};
-    $euroamount = $data{"Euroamount"};
-    $mail = $data{"Mail"};
-
-    write_checkout_cc_page();
-}
-
-
 # This is called by FIXME
 sub complete_stripe_checkout ()
 {
@@ -452,7 +450,7 @@ sub complete_stripe_checkout ()
             '<p>Error: ' . $stripe{"failure"} . '</p><p>'
             . $stripe{"failure-mesg"} . '</p>';
         # Again.
-        prepare_card_checkout ();
+        write_checkout_page ();
         return;
     }
 
@@ -476,12 +474,155 @@ EOF
 }
 
 
+# Initiate a payment with paypal and redirect to the Paypal site.
+sub get_paypal_approval ()
+{
+    my %data;
+    my %request;
+    my $redirurl;
+
+    payproc ('SESSION get ' . $sessid, \%data)
+        or fail $data{"ERR_Description"};
+
+    $request{"Currency"} = $data{"Currency"};
+    $request{"Amount"} = $data{"Amount"};
+    $request{"Desc"} =
+        "Donation of " . $data{"Amount"} . " " . $data{"Currency"} .
+        " to the GnuPG project";
+    $request{"Meta[name]"} = $data{"Name"} unless
+        $data{"Name"} eq 'Anonymous';
+    $request{"Meta[mail]"} = $data{"Mail"};
+    if ($data{"Message"} ne '') {
+        $request{"Meta[message]"} = $data{"Message"};
+    }
+    $request{"Return-Url"} =
+        $baseurl . "/cgi-bin/procdonate.cgi?mode=confirm-paypal";
+    $request{"Cancel-Url"} =
+        $baseurl . "/cgi-bin/procdonate.cgi?mode=cancel-paypal";
+    $request{"Session-Id"} = $sessid;
+
+    if (payproc ('GETINFO live', ())) {
+      $request{"Paypal-Xp"} = "XP-HD8G-XZRE-W7MH-EYNF";
+    } else {
+      $request{"Paypal-Xp"} = "XP-NBWZ-QR6Z-8CXV-Q8XS";
+    }
+
+    if (not payproc ('PPCHECKOUT prepare', \%request)) {
+        $errorstr = $request{"ERR_Description"};
+        # Back to the main page.
+        write_main_page();
+        return;
+    }
+
+    $redirurl = $request{"Redirect-Url"};
+
+    #print STDERR "Redirecting to: $redirurl\n";
+    print $q->redirect($redirurl) unless $redirurl eq "";
+}
+
+
+# The is called by paypal after approval.  We need to extract the alias
+# and the payerid and store it in the session.  Then we ask to confirm
+# the payment.
+sub confirm_paypal_checkout ()
+{
+    my $aliasid;
+    my $payerid;
+    my %data;
+
+    $aliasid = $q->param("aliasid");
+    $payerid = $q->param("PayerID");
+
+    # Get the session from the alias and store the aliasid and the
+    # payerid in the session.
+    payproc ('SESSION sessid ' . $aliasid, \%data)
+        or fail $data{"ERR_Description"};
+    $sessid = $data{"_SESSID"};
+    payproc ('SESSION get ' . $sessid, \%data)
+        or fail $data{"ERR_Description"};
+
+    if ( $data{"Paytype"} ne "pp" ) {
+        fail "Invalid paytype for Paypal transaction";
+    }
+
+    # Put a description for the thanks page into the session data.
+    # We do this only now because we send a reduced Desc field to paypal.
+    $data{"Desc"} =
+        "GnuPG donation by " . $data{"Name"} . " <" . $data{"Mail"} . ">";
+
+    # Note that the capitalization of session data names must match
+    # the rules of payprocd.
+    $data{"Paypal_aliasid"} = $aliasid;
+    $data{"Paypal_payerid"} = $payerid;
+
+    # Set vars for the checkout page.
+    $amount = $data{"Amount"};
+    $currency = $data{"Currency"};
+    $paytype = $data{"Paytype"};
+    $stripeamount = $data{"Stripeamount"};
+    $euroamount = $data{"Euroamount"};
+    $name = $data{"Name"};
+    $mail = $data{"Mail"};
+    $message = $data{"Message"};
+
+    # Store the session after setting the above cars because that call
+    # clears DATA.
+    payproc ('SESSION put ' . $sessid, \%data)
+        or fail $data{"ERR_Description"};
+
+    # Write the checkout (i.e. confirm payment) page
+    write_checkout_page ();
+}
+
+
+# The approved Paypal payment has been approved.  Now execute the
+# payment.
+sub complete_paypal_checkout ()
+{
+    my %data;
+    my %request;
+
+    payproc ('SESSION get ' . $sessid, \%data) or fail $data{"ERR_Description"};
+
+    $request{"Alias-Id"}     = $data{"Paypal_aliasid"};
+    $request{"Paypal-Payer"} = $data{"Paypal_payerid"};
+
+    if (not payproc ('PPCHECKOUT execute', \%request)) {
+        $errorstr =
+            '<p>Error: ' . $request{"failure"} . '</p><p>'
+            . $request{"failure-mesg"} . '</p>';
+
+        print $q->header(-type=>'text/html', -charset=>'utf-8');
+        print "\n";
+        write_template("donate/error.html");
+        return;
+    }
+
+    # Print thanks
+
+    $message = <<EOF;
+Amount ..: $request{"Amount"} $request{"Currency"}
+Desc ....: $data{"Desc"}
+Cardno...: n/a
+Processor: PayPal
+Email ...: $request{"Email"}
+Charge-Id: $request{"Charge-Id"}
+Timestamp: $request{"_timestamp"}
+EOF
+    if ($request{"Live"} eq 'f') {
+        $message = $message . "\n!!! TEST TRANSACTION !!!";
+    }
+
+    write_thanks_page ();
+    payproc ('SESSION destroy ' . $sessid, ());
+}
 
 
 
 #
 # Main
 #
+
 #print STDERR "CGI called with mode=$mode\n";
 #print STDERR "CGI called with sessid=$sessid\n";
 if ($q->param('url') ne '') {
@@ -490,6 +631,10 @@ if ($q->param('url') ne '') {
     # innocent error page.
     write_overload_page ()
 }
+elsif ($mode eq '') {
+    # No mode: Show empty template.
+    write_main_page();
+}
 elsif ($mode eq 'main') {
     # Returning from the donation start page
     check_donation();
@@ -498,18 +643,22 @@ elsif ($mode eq 're-main') {
     # Returning from the donation start page
     resend_main_page();
 }
-elsif ($mode eq 're-checkout') {
-    # Redisplay the checkout option page
-    resend_card_checkout();
-}
-elsif ($mode eq 'checkout-cc') {
-    # The checkout page requested a card checkout.
-    prepare_card_checkout();
-}
 elsif ($mode eq 'checkout-stripe') {
     # we have the stripe token - charge the card.
     complete_stripe_checkout();
 }
+elsif ($mode eq 'cancel-paypal') {
+    # Fixme: Destroy the alias of the session.
+    write_cancel_page();
+}
+elsif ($mode eq 'confirm-paypal') {
+    # We have approval from Paypal - show the confirm checkout page.
+    confirm_paypal_checkout();
+}
+elsif ($mode eq 'checkout-paypal') {
+    # The approved Paypal payment has been approved - charge.
+    complete_paypal_checkout();
+}
 else {
     fail('Internal error: Unknown mode');
 }
diff --git a/web/donate/checkout-cc.org b/web/donate/checkout-cc.org
index 06ee673..73b69f2 100644
--- a/web/donate/checkout-cc.org
+++ b/web/donate/checkout-cc.org
@@ -4,10 +4,33 @@
 
 * Donate - Checkout with card
 
-  You are about to donate
-  @@html:<!--AMOUNT-->@@
-  @@html:<!--CURRENCY-->@@
-  to the GnuPG project using your credit card.
+  Information on your intended donation:
+
+#+BEGIN_HTML
+  <table border="0" cellpadding="0" cellspacing="4" id="checkoutSummary">
+   <tr>
+     <td align="right">Amount:</td>
+     <td><!--AMOUNT-->
+         <!--CURRENCY--></td>
+   </tr>
+   <tr>
+     <td align="right">Name:</td>
+     <td><!--NAME--></td>
+   </tr>
+   <tr>
+     <td align="right">Mail:</td>
+     <td><!--MAIL--></td>
+   </tr>
+   <tr>
+     <td align="right" valign="top">Message:</td>
+     <td><!--MESSAGE_FMT--></td>
+   </tr>
+  </table>
+#+END_HTML
+
+  If something is wrong, please use the back button below to change
+  it.  If the data is correct, you may now continue with the payment.
+
 
 #+BEGIN_HTML
   <noscript>
@@ -25,8 +48,8 @@
     </p>
   </noscript>
 
-
   <!--ERRORSTR-->
+  <div class="buttonbox">
   <p>
     <form action="/cgi-bin/procdonate.cgi" method="POST">
       <input type="hidden" name="mode" value="checkout-stripe">
@@ -46,16 +69,14 @@
       </script>
     </form>
   </p>
-#+END_HTML
-# Note: We do not want to send a
-#         data-email="<!-- MAIL -->"
-#       line to Stripe so to enable the user to use a
-#       a different nail address for use with them.
-
-#+BEGIN_HTML
   <form action="/cgi-bin/procdonate.cgi" method="POST">
-    <input type="hidden" name="mode" value="re-checkout">
+    <input type="hidden" name="mode" value="re-main">
     <input type="hidden" name="sessid" value="<!--SESSID-->">
-    <input type="submit" value="Back to payment options" />
+    <input type="submit" class="donate-button-low" value="Back" />
   </form>
+  </div>
 #+END_HTML
+# Note: We do not want to send a
+#         data-email="<!-- MAIL -->"
+#       line to Stripe so to enable the user to use a
+#       a different mail address for use with them.
diff --git a/web/donate/checkout-pp.org b/web/donate/checkout-pp.org
new file mode 100644
index 0000000..fc8b2c9
--- /dev/null
+++ b/web/donate/checkout-pp.org
@@ -0,0 +1,50 @@
+#+TITLE: GnuPG - Donate - Checkout with PayPal
+#+STARTUP: showall
+#+SETUPFILE: "../share/setup.inc"
+
+* Donate - Checkout with PayPal
+
+  Information on your intended donation:
+
+#+BEGIN_HTML
+  <table border="0" cellpadding="0" cellspacing="4" id="checkoutSummary">
+   <tr>
+     <td align="right">Amount:</td>
+     <td><!--AMOUNT-->
+         <!--CURRENCY--></td>
+   </tr>
+   <tr>
+     <td align="right">Name:</td>
+     <td><!--NAME--></td>
+   </tr>
+   <tr>
+     <td align="right">Mail:</td>
+     <td><!--MAIL--></td>
+   </tr>
+   <tr>
+     <td align="right" valign="top">Message:</td>
+     <td><!--MESSAGE_FMT--></td>
+   </tr>
+  </table>
+#+END_HTML
+
+If something is wrong, please use the /back/ button to change it.  If
+the data is correct, you may complete the payment by clicking on the
+/Pay now/ button.
+
+
+#+BEGIN_HTML
+  <div class="buttonbox">
+  <form action="/cgi-bin/procdonate.cgi" method="POST">
+    <input type="hidden" name="mode" value="checkout-paypal" />
+    <input type="hidden" name="sessid" value="<!--SESSID-->" />
+    <input type="submit" class="donate-button" value="Pay now" />
+  </form>
+
+  <form action="/cgi-bin/procdonate.cgi" method="POST">
+    <input type="hidden" name="mode" value="re-main">
+    <input type="hidden" name="sessid" value="<!--SESSID-->">
+    <input type="submit" class="donate-button-low" value="Back" />
+  </form>
+  </div>
+#+END_HTML
diff --git a/web/donate/checkout.org b/web/donate/checkout.org
deleted file mode 100644
index ad69fcd..0000000
--- a/web/donate/checkout.org
+++ /dev/null
@@ -1,107 +0,0 @@
-#+TITLE: GnuPG - Donate - Checkout
-#+STARTUP: showall
-#+SETUPFILE: "../share/setup.inc"
-
-* Donate - Checkout
-
-  Information on your intended donation:
-
-#+BEGIN_HTML
-  <table border="0" cellpadding="0" cellspacing="4" id="checkoutSummary">
-   <tr>
-     <td align="right">Amount:</td>
-     <td><!--AMOUNT-->
-         <!--CURRENCY--></td>
-   </tr>
-   <tr>
-     <td align="right">Name:</td>
-     <td><!--NAME--></td>
-   </tr>
-   <tr>
-     <td align="right">Mail:</td>
-     <td><!--MAIL--></td>
-   </tr>
-   <tr>
-     <td align="right" valign="top">Message:</td>
-     <td><!--MESSAGE_FMT--></td>
-   </tr>
-  </table>
-#+END_HTML
-
-  If something is wrong, please use the back button below to change
-  it.  If the data is correct, you may proceed by choosing one of the
-  payment options below.
-
-
-  - Donate with a credit card
-
-#+BEGIN_HTML
-   <p id="smallnote">
-      For privacy reasons a click on the button below will take you to a
-      dedicated page for the credit card based checkout.
-   </p>
-   <p>
-      <form action="/cgi-bin/procdonate.cgi" method="POST">
-        <input type="hidden" name="mode" value="checkout-cc">
-        <input type="hidden" name="sessid" value="<!--SESSID-->">
-        <input type="image" src="https://gnupg.org/share/btn-donate.png"
-               border="0" name="submit" alt="Donate with credit card"
-                          title="Donate with credit card">
-      </form>
-    </p>
-#+END_HTML
-
-  - Donate with Bitcoins
-
-#+HTML: <p id="smallnote">Coming soon</p>
-
-
-  - Donate using a Paypal account
-
-#+BEGIN_HTML
-   <p id="smallnote">Use this only if you have a Paypal account.</p>
-   <p id="smallnote">(Until we have finished the restructuring
-      of this payment option, you are unfortunately required to
-      re-enter some of the already given data.)</p>
-   <p>
-    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
-      <input type="hidden" name="cmd" value="_s-xclick">
-      <input type="hidden" name="hosted_button_id" value="GFTRVNVZVGUJW">
-      <input type="image" src="https://gnupg.org/share/btn-donate.png"
-           border="0" name="submit" alt="Donate using PayPal"
-                                  title="Donate using PayPal">
-      <input type="hidden" name="os0" value="<!--PUBLISH_NAME-->">
-      <input type="hidden" name="os1" value="<!--NAME-->">
-    </form>
-  </p>
-#+END_HTML
-
-
-  - Donate using a SEPA bank transfer
-
-#+HTML: <p id="smallnote">Coming soon</p>
-
-# #+BEGIN_HTML
-#   <p id="smallnote">
-#     A SEPA bank transfer is possible in most European countries.  We
-#     will send you an account number and you simply wire the money to
-#     that account.
-#     <form action="/cgi-bin/procdonate.cgi" method="POST">
-#       <input type="hidden" name="mode" value="checkout-sepa">
-#       <input type="hidden" name="sessid" value="<!--SESSID-->">
-#       <input type="image" src="https://gnupg.org/share/btn-donate.png"
-#          border="0" name="submit" alt="Donate using SEPA"
-#                                 title="Donate using SEPA">
-#     </form>
-#   </p>
-# #+END_HTML
-
-
-
-#+BEGIN_HTML
-  <form action="/cgi-bin/procdonate.cgi" method="POST">
-    <input type="hidden" name="mode" value="re-main">
-    <input type="hidden" name="sessid" value="<!--SESSID-->">
-    <input type="submit" value="Back to donation page" />
-  </form>
-#+END_HTML
diff --git a/web/donate/donate-thanks.org b/web/donate/donate-thanks.org
index 988ae21..4edf62e 100644
--- a/web/donate/donate-thanks.org
+++ b/web/donate/donate-thanks.org
@@ -6,11 +6,11 @@
 
   *Thank you very much for your donation to our work on GnuPG.*
 
-  Note that the [[file:kudos.org][list of donors]] is only updated every 30 minutes, thus
+  Note that the [[file:/donate/kudos.org][list of donors]] is only updated every 30 minutes, thus
   have some patience until you see your name.  If you did not give a
   name you won’t be listed at all.
 
-  Here is our transaction data of your payment:
+  Here are the details of your donation:
 #+BEGIN_HTML
   <pre id="checkoutSummary">
   <!--MESSAGE-->
diff --git a/web/donate/index.org b/web/donate/index.org
index a1085e4..07572c1 100644
--- a/web/donate/index.org
+++ b/web/donate/index.org
@@ -75,6 +75,21 @@
       </td>
     </tr>
     <tr>
+      <td align="right">Pay using:</td>
+      <td>
+        <label><input type="radio" name="paytype"
+                      value="cc" /><!--CHECK_CC-->Credit Card</label>
+        <!--ERR_PAYTYPE-->
+      </td>
+   </tr>
+   <tr>
+     <td></td>
+     <td>
+       <label><input type="radio" name="paytype"
+                     value="pp" /><!--CHECK_PP-->PayPal</label>
+     </td>
+   </tr>
+   <tr>
       <td></td>
       <td>
           If you want to be listed on the
@@ -83,9 +98,10 @@
       </td>
     </tr>
     <tr>
-      <td align="right">Name:</td>
+      <td align="right"><label for="f_name">Name:</label></td>
       <td>
-          <input type="text" size="40" style="width:200px" name="name"
+          <input id="f_name" type="text"
+                 size="40" style="width:200px" name="name"
                  value=""/><!--NAME--> (optional)
           <!--ERR_NAME-->
       </td>
@@ -98,10 +114,11 @@
       </td>
     </tr>
     <tr>
-      <td align="right">Mail:</td>
+      <td align="right"><label for="f_mail">Mail:</label></td>
       <td>
-          <input type="text" size="40" style="width:200px" name="mail"
-                   value=""/><!--MAIL--> (optional)
+          <input id="f_mail" type="text" size="40" style="width:200px"
+                 name="mail"
+                 value=""/><!--MAIL--> (optional)
            <!--ERR_MAIL-->
       </td>
     </tr>
@@ -121,7 +138,10 @@
     <tr>
       <td></td>
       <td>
-          <input type="submit" value="Proceed to payment options" />
+        <div class="buttonbox">
+          <input type="submit" class="donate-button-low"
+                 value="Proceed to checkout" />
+         </div>
       </td>
     </tr>
    </table>
diff --git a/web/donate/paypal-thx.org b/web/donate/paypal-thx.org
deleted file mode 100644
index 4dcbab6..0000000
--- a/web/donate/paypal-thx.org
+++ /dev/null
@@ -1,15 +0,0 @@
-#+TITLE: GnuPG - Donate - Thank you
-#+STARTUP: showall
-#+SETUPFILE: "../share/setup.inc"
-
-* Donate - Thank you
-
-  *Thank you very much for your donation to our work on GnuPG.*
-
-  We will update the [[file:kudos.org][list of donors]] about once a week, thus you won’t see
-  your name immediately.  If you did not give a name you won’t be
-  listed at all.
-
-#+BEGIN_HTML
-  <p><a href="/index.html">Continue</a></p>
-#+END_HTML
diff --git a/web/share/gnupg-logo-180x59tr.png b/web/share/gnupg-logo-180x59tr.png
new file mode 100644
index 0000000..1bb1111
Binary files /dev/null and b/web/share/gnupg-logo-180x59tr.png differ
diff --git a/web/share/site.css b/web/share/site.css
index 8930940..5402f3d 100644
--- a/web/share/site.css
+++ b/web/share/site.css
@@ -422,6 +422,53 @@ td.right  {
 }
 
 
+/* Donation stuff. */
+
+.buttonbox {
+    margin-top: 20px;
+    margin-bottom: 20px;
+    float: none;
+}
+
+.donate-button {
+    overflow: hidden;
+    display: inline-block;
+    background-image: linear-gradient(#28A0E5, #015E94);
+    border: 0px none;
+    padding: 1px;
+    text-decoration: none;
+    border-radius: 5px;
+    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2);
+    cursor: pointer;
+    line-height: 30px;
+    font-size: 14px;
+    font-weight: bold;
+    color: #fff;
+    float: left;
+    margin-right: 20px;
+    margin-bottom: 20px;
+}
+
+
+.donate-button-low {
+    overflow: hidden;
+    display: inline-block;
+    background-image: linear-gradient(#28A0E5, #015E94);
+    border: 0px none;
+    text-decoration: none;
+    border-radius: 4px;
+    box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2);
+    cursor: pointer;
+    line-height: 20px;
+    font-size: 14px;
+    font-weight: bold;
+    color: #fff;
+    float: left;
+    margin-right: 20px;
+    margin-bottom: 20px;
+    margin-top: 5px;
+}
+
 
 
 /* EOF */
\ No newline at end of file

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

Summary of changes:
 cgi/config.rc                     |    1 +
 cgi/procdonate.cgi                |  269 ++++++++++++++++++++++++++++---------
 web/donate/checkout-cc.org        |   49 +++++--
 web/donate/checkout-pp.org        |   50 +++++++
 web/donate/checkout.org           |  107 ---------------
 web/donate/donate-thanks.org      |    4 +-
 web/donate/index.org              |   32 ++++-
 web/donate/paypal-thx.org         |   15 ---
 web/share/gnupg-logo-180x59tr.png |  Bin 0 -> 5434 bytes
 web/share/site.css                |   47 +++++++
 10 files changed, 370 insertions(+), 204 deletions(-)
 create mode 100644 web/donate/checkout-pp.org
 delete mode 100644 web/donate/checkout.org
 delete mode 100644 web/donate/paypal-thx.org
 create mode 100644 web/share/gnupg-logo-180x59tr.png


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




More information about the Gnupg-commits mailing list