Jun 29 - Update: Fail2ban, welcome email, dunning sequence, escalation

This commit is contained in:
2026-06-29 13:47:57 -04:00
parent c133b5d419
commit b00bbba2da
14 changed files with 414 additions and 1 deletions
+6
View File
@@ -210,6 +210,9 @@ def _on_payment_succeeded(obj):
if t.subscription_status == 'past_due':
t.subscription_status = 'active'
t.past_due_since = None
t.dunning_stage = 0
t.dunning_sent_at = None
if period_end:
t.current_period_end = _ts_to_dt(period_end)
@@ -236,6 +239,9 @@ def _on_payment_failed(obj):
return
t.subscription_status = 'past_due'
if t.past_due_since is None:
from control.time_utils import now_eastern
t.past_due_since = now_eastern()
billing_email = t.billing_email
s.add(TenantAudit(