Private
Public Access
1
0
Files
rowsandall/rowers/payments.py
Sander Roosendaal 221953bfdf removing future
2022-02-15 08:23:48 +01:00

24 lines
598 B
Python

from rowers.models import Rower, PaidPlan
# run once - copies plans to paypal
def planstopaypal(): # pragma: no cover
plans = PaidPlan.objects.all()
for plan in plans:
plan.pk = None
plan.paymentprocessor = 'paypal'
plan.external_id = None
plan.save()
def is_existing_customer(rower): # pragma: no cover
if rower.country is not None and rower.customer_id is not None and rower.country != '':
if rower.subscription_id is None or rower.subscription_id == '':
return False
else:
return True
return False