Private
Public Access
1
0

adding transactions download

This commit is contained in:
Sander Roosendaal
2018-12-21 09:46:23 +01:00
parent 98900059f8
commit 73d8d555d1
7 changed files with 208 additions and 13 deletions

View File

@@ -10,22 +10,27 @@ def planstopaypal():
plan.external_id = None
plan.save()
def initiaterowerplans():
rowers = Rower.objects.filter(paymenttype = 'recurring',paidplan = None)
for r in rowers:
r.paymentprocessor = 'paypal'
r.save()
def setrowerplans():
rowers = Rower.objects.all()
for r in rowers:
if r.rowerplan != 'basic':
paidplans = PaidPlan.objects.filter(
shortname = r.rowerplan,
paymenttype = r.paymenttype,
clubsize = r.clubsize)
paidplans = PaidPlan.objects.filter(
shortname = r.rowerplan,
paymenttype = r.paymenttype,
clubsize = r.clubsize,
paymentprocessor=r.paymentprocessor)
if paidplans:
r.paidplan = paidplans[0]
r.paymentprocessor = 'paypal'
r.save()
else:
print 'Could not set plan for ',r
if paidplans:
r.paidplan = paidplans[0]
r.save()
else:
print 'Could not set plan for ',r
def is_existing_customer(rower):
if rower.country is not None and rower.customer_id is not None and rower.country != '':