Private
Public Access
1
0

basic withdraw and upgrade

This commit is contained in:
Sander Roosendaal
2021-11-10 21:44:05 +01:00
parent 6efae814af
commit 1926f7073d
5 changed files with 53 additions and 2 deletions

View File

@@ -27,6 +27,8 @@ from rowers.tasks import (
#handle_send_email_transaction_notification,
)
from rowers import credits
import pandas as pd
from rowsandall_app.settings import (
@@ -268,6 +270,7 @@ def update_subscription(rower,data,method='up'):
if result.is_success:
yesterday = (timezone.now()-datetime.timedelta(days=1)).date()
rower.paidplan = plan
eurocredits = credits.upgrade(int(amount),rower)
rower.planexpires = result.subscription.billing_period_end_date
rower.teamplanexpires = result.subscription.billing_period_end_date
rower.clubsize = plan.clubsize