From 70c5c815fa265565056906650c3baf95ce696faf Mon Sep 17 00:00:00 2001 From: rizwanisready Date: Thu, 8 Aug 2024 14:59:01 +0530 Subject: [PATCH] updated webhook module --- goodtimes/webhook/payment_processing_service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/goodtimes/webhook/payment_processing_service.py b/goodtimes/webhook/payment_processing_service.py index cfd83b9..2359d9a 100644 --- a/goodtimes/webhook/payment_processing_service.py +++ b/goodtimes/webhook/payment_processing_service.py @@ -83,8 +83,7 @@ class PaymentProcessingService: 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...") + elif event_type == "checkout.session.expired" or event_type == "invoice.payment_failed": self.handle_failure(txn) except Exception as e: logger.error(f"Transaction Error: {str(e)}")