main: Import stripe python module
This commit is contained in:
parent
230dc2a12a
commit
969e5e17a5
@ -2,6 +2,7 @@ from flask import Flask, request, jsonify
|
|||||||
import dotenv
|
import dotenv
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
import stripe
|
||||||
|
|
||||||
dotenv.load_dotenv()
|
dotenv.load_dotenv()
|
||||||
|
|
||||||
@ -240,7 +241,7 @@ def stripeapi():
|
|||||||
payload = request.data
|
payload = request.data
|
||||||
stripe.api_key = os.getenv('STRIPE_SECRET')
|
stripe.api_key = os.getenv('STRIPE_SECRET')
|
||||||
endpoint_secret = os.getenv('STRIPE_ENDPOINT_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
|
events = None
|
||||||
try:
|
try:
|
||||||
event = stripe.Webhook.construct_event(
|
event = stripe.Webhook.construct_event(
|
||||||
|
Loading…
Reference in New Issue
Block a user