json_hook_output
This commit is contained in:
@@ -242,7 +242,6 @@ def stripe_payments_webhook_post():
|
|||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
logger.info(f"Route Stripe Webhook POST ==>>>> {data}")
|
logger.info(f"Route Stripe Webhook POST ==>>>> {data}")
|
||||||
SubscriptionService.subscription_webhook_start(data)
|
SubscriptionService.subscription_webhook_start(data)
|
||||||
# response = MyProductsService.process_provision_actions(data)
|
|
||||||
return []
|
return []
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# A general exception handler for any other type of exception
|
# A general exception handler for any other type of exception
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ from marshmallow import ValidationError
|
|||||||
from app.models import Members, MembersProducts, SubscriptionOptions, SubscriptionOptionsItems, PaymentsSession
|
from app.models import Members, MembersProducts, SubscriptionOptions, SubscriptionOptionsItems, PaymentsSession
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.api.integrations import StripeIntegration
|
from app.api.integrations import StripeIntegration
|
||||||
|
import json
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SubscriptionService(BaseService):
|
class SubscriptionService(BaseService):
|
||||||
# def get_all_subscriptions(cls, product_id=None, member_id=None, page=1, limit=20):
|
# def get_all_subscriptions(cls, product_id=None, member_id=None, page=1, limit=20):
|
||||||
@@ -243,8 +246,10 @@ class SubscriptionService(BaseService):
|
|||||||
with db.session.begin():
|
with db.session.begin():
|
||||||
# logger.info(f"Subscription_Webhook_Start data ==>>>> {data}")
|
# logger.info(f"Subscription_Webhook_Start data ==>>>> {data}")
|
||||||
hook_data = data["data"]
|
hook_data = data["data"]
|
||||||
logger.info(f"HOOK Data ALL ==>>>> {hook_data}")
|
logger.info(f"***** HOOK Data ALL ==>>>> {hook_data}")
|
||||||
data_id = hook_data["id"]
|
json_hook_output = json.dumps(hook_data)
|
||||||
|
|
||||||
|
data_id = json_hook_output["id"]
|
||||||
logger.info(f"HOOK Data ID ==>>>> {data_id}")
|
logger.info(f"HOOK Data ID ==>>>> {data_id}")
|
||||||
# logger.info(f"Subscription_Webhook_Start data ==>>>> {hook_data.id}")
|
# logger.info(f"Subscription_Webhook_Start data ==>>>> {hook_data.id}")
|
||||||
# token = validated_data.get('token')
|
# token = validated_data.get('token')
|
||||||
|
|||||||
Reference in New Issue
Block a user