From e8b90b8fdb6475d848a9b3c069b6e2945fd1d910 Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Thu, 8 Aug 2024 14:07:59 +0530 Subject: [PATCH] updated webhook module --- goodtimes/webhook/payment_processing_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/goodtimes/webhook/payment_processing_service.py b/goodtimes/webhook/payment_processing_service.py index 5bdc525..cfd83b9 100644 --- a/goodtimes/webhook/payment_processing_service.py +++ b/goodtimes/webhook/payment_processing_service.py @@ -80,9 +80,11 @@ class PaymentProcessingService: if event_type == "checkout.session.completed": self.handle_success(txn) elif event_type == "invoice.payment_succeeded": + print("self.charge_data.billing_reason", self.charge_data.get("billing_reason")) if self.charge_data.get("billing_reason") != "subscription_create": self.handle_success(txn) else: + print("Should not be here...") self.handle_failure(txn) except Exception as e: logger.error(f"Transaction Error: {str(e)}")