Private
Public Access
1
0
Files
rowsandall/rowers/payments.py
Sander Roosendaal 7626554ba9 more coverage
2021-04-26 12:11:46 +02:00

26 lines
742 B
Python

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
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