We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97ee9ba commit 0a0af81Copy full SHA for 0a0af81
readthedocs/payments/utils.py
@@ -17,6 +17,10 @@
17
def delete_customer(customer_id):
18
"""Delete customer from Stripe, cancelling subscriptions."""
19
try:
20
+ log.info(
21
+ "Deleting stripe customer.",
22
+ stripe_customer=customer_id,
23
+ )
24
customer = stripe.Customer.retrieve(customer_id)
25
return customer.delete()
26
except stripe.error.InvalidRequestError:
@@ -29,6 +33,10 @@ def delete_customer(customer_id):
29
33
def cancel_subscription(subscription_id):
30
34
"""Cancel Stripe subscription, if it exists."""
31
35
36
37
+ "Canceling stripe subscription.",
38
+ stripe_subscription=subscription_id,
39
32
40
return stripe.Subscription.delete(subscription_id)
41
except stripe.error.StripeError:
42
log.exception(
0 commit comments