From 545727afe7e73017c6f496c116f1a0bf461ed557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 5 Mar 2020 11:51:08 +0100 Subject: [PATCH] Move STRIPE_PUBLIC_KEY to secrets (i.e. local configuration) --- uncloud/uncloud/secrets_sample.py | 3 ++- uncloud/uncloud/settings.py | 4 ---- uncloud/uncloud_pay/stripe.py | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/uncloud/uncloud/secrets_sample.py b/uncloud/uncloud/secrets_sample.py index 464662f..bc9cd38 100644 --- a/uncloud/uncloud/secrets_sample.py +++ b/uncloud/uncloud/secrets_sample.py @@ -15,6 +15,7 @@ LDAP_ADMIN_PASSWORD="" LDAP_SERVER_URI = "" # Stripe (Credit Card payments) -STRIPE_API_key="" +STRIPE_KEY="" +STRIPE_PUBLIC_KEY="" SECRET_KEY="dx$iqt=lc&yrp^!z5$ay^%g5lhx1y3bcu=jg(jx0yj0ogkfqvf" diff --git a/uncloud/uncloud/settings.py b/uncloud/uncloud/settings.py index 9f1ac91..cc0ec3a 100644 --- a/uncloud/uncloud/settings.py +++ b/uncloud/uncloud/settings.py @@ -172,7 +172,3 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_URL = '/static/' - -################################################################################ -# Stripe -STRIPE_PUBLIC_KEY="" diff --git a/uncloud/uncloud_pay/stripe.py b/uncloud/uncloud_pay/stripe.py index ab3eac2..f23002b 100644 --- a/uncloud/uncloud_pay/stripe.py +++ b/uncloud/uncloud_pay/stripe.py @@ -64,7 +64,7 @@ def handle_stripe_error(f): # Actual Stripe logic. def public_api_key(): - return uncloud.settings.STRIPE_PUBLIC_KEY + return uncloud.secrets.STRIPE_PUBLIC_KEY def get_customer_id_for(user): try: