Jun 29 - Update: Fail2ban, welcome email, dunning sequence, escalation
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user