Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development: update steps for testing subscriptions #10992

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docs/dev/subscriptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion readthedocs/settings/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down