fix: stipe key issue

This commit is contained in:
bobbyvish
2024-10-30 12:33:53 +05:30
parent 449d8615c8
commit 540442fa28
2 changed files with 7 additions and 5 deletions

View File

@@ -303,11 +303,12 @@ SIMPLE_JWT = {
"JTI_CLAIM": "jti",
}
STRIPE_SECRET_KEY = "sk_test_51OexsKCesU6kunsIsbSKSZc1BF4gjklniaue8lmpkGKqDzenQtMkR8tKAryxErJXqp0jPiu1Gg7papa4tqZfKL9G00qUM4toB2"
STRIPE_PUBLISH_KEY = "pk_test_51OexsKCesU6kunsINDvKUhbelxeUmDAVZGSOisZ6XXHCp3pKtl4vs0pR42w0OcjZhngmECsXQNbAKNPOhiFMTJ8o00sRZQG0lh"
# STRIPE_SECRET_KEY = env.str("STRIPE_SECRET_KEY")
# STRIPE_PUBLISH_KEY = env.str("STRIPE_PUBLISH_KEY")
STRIPE_SECRET_KEY = env.str("STRIPE_SECRET_KEY")
STRIPE_PUBLISH_KEY = env.str("STRIPE_PUBLISH_KEY")
# https://dashboard.stripe.com/webhooks/create?endpoint_location=local
# This is your Stripe CLI webhook secret for testing your endpoint locally.
ENDPOINT_SECRET = "whsec_ccf1f87295603cdd1733995ee2d3c0d6f74c7ceaf28916ea45114a54b7ce1d0f"
ONE_SIGNAL_APP_ID = env.str("ONE_SIGNAL_APP_ID")

View File

@@ -133,7 +133,8 @@ class StripeWebhookTest(APIView):
stripe.api_key = settings.STRIPE_SECRET_KEY
payload = request.body
sig_header = request.META["HTTP_STRIPE_SIGNATURE"]
endpoint_secret = "whsec_ccf1f87295603cdd1733995ee2d3c0d6f74c7ceaf28916ea45114a54b7ce1d0f" # Make sure to retrieve this from your settings
# This is your Stripe CLI webhook secret for testing your endpoint locally.
endpoint_secret = settings.ENDPOINT_SECRET
event = None
webhook_event = None