From 969e5e17a54cac2d9284288d84d8cbb3530c8917 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 24 Aug 2023 16:44:17 +1000 Subject: [PATCH] main: Import stripe python module --- master/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/master/main.py b/master/main.py index 355063e..8a5cad0 100644 --- a/master/main.py +++ b/master/main.py @@ -2,6 +2,7 @@ from flask import Flask, request, jsonify import dotenv import os import requests +import stripe dotenv.load_dotenv() @@ -240,7 +241,7 @@ def stripeapi(): payload = request.data stripe.api_key = os.getenv('STRIPE_SECRET') endpoint_secret = os.getenv('STRIPE_ENDPOINT_SECRET') - sig_header = request.headers.get('HTTP_STRIPE_SIGNATURE') + sig_header = request.headers.get('Stripe-Signature') events = None try: event = stripe.Webhook.construct_event(