diff --git a/uncloud/uncloud/settings.py b/uncloud/uncloud/settings.py index c6c89d5..cc0ec3a 100644 --- a/uncloud/uncloud/settings.py +++ b/uncloud/uncloud/settings.py @@ -11,8 +11,6 @@ https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os - -import stripe import ldap # Uncommitted file with secrets @@ -174,5 +172,3 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_URL = '/static/' - -stripe.api_key = uncloud.secrets.STRIPE_KEY diff --git a/uncloud/uncloud_pay/stripe.py b/uncloud/uncloud_pay/stripe.py index 6399a1a..c50317f 100644 --- a/uncloud/uncloud_pay/stripe.py +++ b/uncloud/uncloud_pay/stripe.py @@ -2,13 +2,12 @@ import stripe import stripe.error import logging -from django.conf import settings +import uncloud.secrets # Static stripe configuration used below. CURRENCY = 'chf' -# Register stripe (secret) API key from config. -stripe.api_key = settings.STRIPE_API_KEY +stripe.api_key = uncloud.secrets.STRIPE_KEY # Helper (decorator) used to catch errors raised by stripe logic. def handle_stripe_error(f):