Skip to content

Commit

Permalink
#1308 if a subscription is cancelled by the lack of payments send sho…
Browse files Browse the repository at this point in the history
…p owner notification (#1310)

* Fix #1308 when a subscription is cancelled, email the shop owner with context

* rm breakpoint
  • Loading branch information
chrisjsimpson authored Mar 5, 2024
1 parent a376f84 commit 697b51b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions subscribie/blueprints/checkout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 697b51b

Please sign in to comment.