From 3e93859ee1047cdbbd45735b5caa9ccdcc822c05 Mon Sep 17 00:00:00 2001 From: Vinicius Aguiar Date: Mon, 30 Oct 2023 22:01:08 -0300 Subject: [PATCH] feat: get stripe mode from environment variable (#472) --- bd_api/settings/local.py | 2 +- bd_api/settings/remote.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bd_api/settings/local.py b/bd_api/settings/local.py index 57ef2a5f..d3995788 100644 --- a/bd_api/settings/local.py +++ b/bd_api/settings/local.py @@ -56,7 +56,7 @@ ... # Stripe -STRIPE_LIVE_MODE = False +STRIPE_LIVE_MODE = bool(getenv("STRIPE_LIVE_MODE", "False")) STRIPE_LIVE_SECRET_KEY = getenv("STRIPE_LIVE_SECRET_KEY", "") STRIPE_TEST_SECRET_KEY = getenv("STRIPE_TEST_SECRET_KEY", "") DJSTRIPE_WEBHOOK_SECRET = getenv("DJSTRIPE_WEBHOOK_SECRET", "") diff --git a/bd_api/settings/remote.py b/bd_api/settings/remote.py index a3bf10d1..65a8ba97 100644 --- a/bd_api/settings/remote.py +++ b/bd_api/settings/remote.py @@ -72,7 +72,7 @@ } # Stripe -STRIPE_LIVE_MODE = True +STRIPE_LIVE_MODE = bool(getenv("STRIPE_LIVE_MODE")) STRIPE_LIVE_SECRET_KEY = getenv("STRIPE_LIVE_SECRET_KEY") STRIPE_TEST_SECRET_KEY = getenv("STRIPE_TEST_SECRET_KEY") DJSTRIPE_WEBHOOK_SECRET = getenv("DJSTRIPE_WEBHOOK_SECRET")