diff --git a/docs/dev/subscriptions.rst b/docs/dev/subscriptions.rst index df994c057fd..a73439cb821 100644 --- a/docs/dev/subscriptions.rst +++ b/docs/dev/subscriptions.rst @@ -9,11 +9,10 @@ Local testing ------------- To test subscriptions locally, you need to have access to the Stripe account, -and define the following settings with the keys from Stripe test mode: +and define the following environment variables with the keys from Stripe test mode: -- ``STRIPE_SECRET``: https://dashboard.stripe.com/test/apikeys -- ``STRIPE_TEST_SECRET_KEY``: https://dashboard.stripe.com/test/apikeys -- ``DJSTRIPE_WEBHOOK_SECRET``: https://dashboard.stripe.com/test/webhooks +- ``RTD_STRIPE_SECRET``: https://dashboard.stripe.com/test/apikeys +- ``RTD_DJSTRIPE_WEBHOOK_SECRET``: https://dashboard.stripe.com/test/webhooks To test the webhook locally, you need to run your local instance with ngrok, for example: diff --git a/readthedocs/settings/docker_compose.py b/readthedocs/settings/docker_compose.py index 9592e7b7641..aa2050cd791 100644 --- a/readthedocs/settings/docker_compose.py +++ b/readthedocs/settings/docker_compose.py @@ -203,7 +203,7 @@ def DATABASES(self): # noqa AWS_S3_ENDPOINT_URL = "http://storage:9000/" AWS_QUERYSTRING_AUTH = False - STRIPE_SECRET = os.environ.get("RTD_STRIPE_SECRET") + STRIPE_SECRET = os.environ.get("RTD_STRIPE_SECRET", "sk_test_x") STRIPE_PUBLISHABLE = os.environ.get("RTD_STRIPE_PUBLISHABLE") STRIPE_TEST_SECRET_KEY = STRIPE_SECRET DJSTRIPE_WEBHOOK_SECRET = os.environ.get("RTD_DJSTRIPE_WEBHOOK_SECRET")