[git] gnupg-doc - branch, master, updated. 2f3a353d4a327cc0f0629d43911db60579ecb260
by Werner Koch
cvs at cvs.gnupg.org
Fri Apr 28 20:47:28 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, master has been updated
via 2f3a353d4a327cc0f0629d43911db60579ecb260 (commit)
from 9c504b531be386a895496fec02385a2a54aeb4d2 (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 2f3a353d4a327cc0f0629d43911db60579ecb260
Author: Werner Koch <wk at gnupg.org>
Date: Fri Apr 28 20:43:36 2017 +0200
cgi: Make the Stripe publishable key configurable.
To provide a test installation it is better to have the stripe key in
the config file and not hardcoded in the HTML template.
diff --git a/cgi/config.rc b/cgi/config.rc
index f139b53..a6baa7f 100644
--- a/cgi/config.rc
+++ b/cgi/config.rc
@@ -3,6 +3,10 @@
baseurl => 'https://gnupg.org'
htdocs => '/var/www/www/www.gnupg.org/htdocs/',
+stripepubkey => 'pk_live_lcfUUC9FLdguvgEKqMeaeuWY',
+#stripepubkey => 'pk_test_54VgokzAcVz6WxEOsZ6jtein',
+
payprocd_socket => '/var/run/payproc/daemon',
+
#eof#
diff --git a/cgi/procdonate.cgi b/cgi/procdonate.cgi
index b58dc16..650f803 100755
--- a/cgi/procdonate.cgi
+++ b/cgi/procdonate.cgi
@@ -22,6 +22,7 @@ my %config = do $1 . '/config.rc';
my $baseurl = $config{baseurl};
my $htdocs = $config{htdocs};
+my $stripepubkey = $config{stripepubkey};
my $socket_name = $config{payprocd_socket};
my $error_marker = '<span style="color: red;">* error</span>';
@@ -157,6 +158,7 @@ sub write_template ($) {
s/<!--SESSID-->/$sessid/
|| s/(\x22\x2f>)?<!--AMOUNT-->/$amount\1/
|| s/(\x22\x2f>)?<!--EUROAMOUNT-->/$euroamount\1/
+ || s/(\x22\x2f>)?<!--STRIPEPUBKEY-->/$stripepubkey\1/
|| s/(\x22\x2f>)?<!--STRIPEAMOUNT-->/$stripeamount\1/
|| s/(\x22\x2f>)?<!--CURRENCY-->/$currency\1/
|| s/(\x22\x2f>)?<!--NAME-->/$name\1/
diff --git a/web/donate/checkout-cc.org b/web/donate/checkout-cc.org
index 73b69f2..8651eb0 100644
--- a/web/donate/checkout-cc.org
+++ b/web/donate/checkout-cc.org
@@ -57,7 +57,7 @@
<script
src="https://checkout.stripe.com/checkout.js"
class="stripe-button"
- data-key="pk_live_lcfUUC9FLdguvgEKqMeaeuWY"
+ data-key="<!--STRIPEPUBKEY-->"
data-image="/share/gnupg-badge-128x128.png"
data-name="GnuPG"
data-description="Donation to the GnuPG project"
-----------------------------------------------------------------------
Summary of changes:
cgi/config.rc | 4 ++++
cgi/procdonate.cgi | 2 ++
web/donate/checkout-cc.org | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GnuPG website and other docs
http://git.gnupg.org
More information about the Gnupg-commits
mailing list