diff --git a/defaults.env b/defaults.env
index d837a1a51b..85acc21d0b 100644
--- a/defaults.env
+++ b/defaults.env
@@ -31,6 +31,7 @@ BRAINTREE_SANDBOX_MODE=true
BRAINTREE_MERCHANT_ID=ddnq29fv74cqxwkg
BRAINTREE_PUBLIC_KEY=f9xk4pb5ts86k67k
BRAINTREE_PRIVATE_KEY=36ded60b7f4a43ebc605ca5f4b33d909
+BRAINTREE_CLIENT_AUTHORIZATION=sandbox_cr9dyy9c_bk8h97tqzyqjhtfn
COINBASE_API_KEY=uETKVUrnPuXzVaVj
COINBASE_API_SECRET=32zAkQCcHHYkGGn29VkvEZvn21PM1lgO
diff --git a/gratipay/wireup.py b/gratipay/wireup.py
index 87e5a932cb..f902aa0514 100644
--- a/gratipay/wireup.py
+++ b/gratipay/wireup.py
@@ -351,6 +351,7 @@ def env():
BRAINTREE_MERCHANT_ID = unicode,
BRAINTREE_PUBLIC_KEY = unicode,
BRAINTREE_PRIVATE_KEY = unicode,
+ BRAINTREE_CLIENT_AUTHORIZATION = unicode,
GITHUB_CLIENT_ID = unicode,
GITHUB_CLIENT_SECRET = unicode,
GITHUB_CALLBACK = unicode,
diff --git a/js/gratipay/homepage.js b/js/gratipay/homepage.js
index 4386c85975..d256a4bc23 100644
--- a/js/gratipay/homepage.js
+++ b/js/gratipay/homepage.js
@@ -1,6 +1,6 @@
Gratipay.homepage = {}
-Gratipay.homepage.initForm = function () {
+Gratipay.homepage.initForm = function(clientAuthorization) {
$form = $('#homepage #content form');
$submit= $form.find('button[type=submit]');
$submit.click(Gratipay.homepage.submitForm);
@@ -9,7 +9,7 @@ Gratipay.homepage.initForm = function () {
$promote.click(Gratipay.homepage.openPromote);
braintree.dropin.create({
- authorization: 'sandbox_cr9dyy9c_bk8h97tqzyqjhtfn',
+ authorization: clientAuthorization,
container: '#braintree-container'
}, function (createErr, instance) {
$submit.click(function () {
@@ -51,7 +51,7 @@ jQuery.fn.extend({
toggleText:function(a,b){
if(this.html()==a){
this.html(b)
- }
+ }
else {
this.html(a)
$('#promotion-fields :input').val('');
diff --git a/www/index.spt b/www/index.spt
index f4251013fd..ebca1e5197 100644
--- a/www/index.spt
+++ b/www/index.spt
@@ -25,7 +25,11 @@ if not user.ANON:
{% endblock %}
{% block scripts %}
-
+
{{ super() }}
{% endblock %}