fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes
[wolnelektury.git]
/
src
/
paypal
/
rest.py
diff --git
a/src/paypal/rest.py
b/src/paypal/rest.py
index
25bb21a
..
11693cb
100644
(file)
--- a/
src/paypal/rest.py
+++ b/
src/paypal/rest.py
@@
-1,7
+1,7
@@
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from datetime import datetime, timedelta
+from datetime import date
, date
time, timedelta
from decimal import Decimal
import paypalrestsdk
import pytz
from decimal import Decimal
import paypalrestsdk
import pytz
@@
-117,11
+117,6
@@
def check_agreement(agreement_id):
return a.state == 'Active'
return a.state == 'Active'
-def user_is_subscribed(user):
- agreements = BillingAgreement.objects.filter(user=user)
- return any(agreement.check_agreement() for agreement in agreements)
-
-
def execute_agreement(token):
return paypalrestsdk.BillingAgreement.execute(token)
def execute_agreement(token):
return paypalrestsdk.BillingAgreement.execute(token)