Private
Public Access
1
0

updated t&c,

This commit is contained in:
Sander Roosendaal
2019-02-16 11:08:41 +01:00
parent 6afde11b7c
commit 0d3763ebb3
8 changed files with 111 additions and 57 deletions

View File

@@ -154,6 +154,7 @@ def update_subscription(rower,data,method='up'):
return False,0
if result.is_success:
yesterday = (timezone.now()-datetime.timedelta(days=1)).date()
rower.paidplan = plan
rower.planexpires = result.subscription.billing_period_end_date
rower.teamplanexpires = result.subscription.billing_period_end_date
@@ -161,6 +162,8 @@ def update_subscription(rower,data,method='up'):
rower.paymenttype = plan.paymenttype
rower.rowerplan = plan.shortname
rower.subscription_id = result.subscription.id
rower.protrialexpires = yesterday
rower.plantrialexpires = yesterday
rower.save()
name = '{f} {l}'.format(
f = rower.user.first_name,