From 697b51beb105f222ed0c8f730996d3bca6f0451c Mon Sep 17 00:00:00 2001 From: chrisjsimpson Date: Tue, 5 Mar 2024 23:32:17 +0000 Subject: [PATCH] #1308 if a subscription is cancelled by the lack of payments send shop owner notification (#1310) * Fix #1308 when a subscription is cancelled, email the shop owner with context * rm breakpoint --- subscribie/blueprints/checkout/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subscribie/blueprints/checkout/__init__.py b/subscribie/blueprints/checkout/__init__.py index f04d6399..93baac62 100644 --- a/subscribie/blueprints/checkout/__init__.py +++ b/subscribie/blueprints/checkout/__init__.py @@ -829,7 +829,6 @@ def stripe_webhook(): log.info(f"Received stripe webhook event type {event['type']}") if event["type"] == "customer.subscription.deleted": - breakpoint() eventObj = event["data"]["object"] cancellation_reason = eventObj["cancellation_details"]["reason"] if cancellation_reason == "payment_failed": @@ -877,7 +876,7 @@ def stripe_webhook(): ).one() except Exception: log.error( - "Unable to locate subscription associated with event customer.subscription.deleted" + "Unable to locate subscription associated with event customer.subscription.deleted" # noqa: E501 ) if person is not None: