X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/349f8b311ecdf30a181b94a8c7747867bacca356..b2c4c0093c7829668c1bf6f5a7493e1aff697181:/src/paypal/rest.py?ds=inline

diff --git a/src/paypal/rest.py b/src/paypal/rest.py
index 4d2697229..e70c67bd4 100644
--- a/src/paypal/rest.py
+++ b/src/paypal/rest.py
@@ -4,7 +4,6 @@
 from datetime import date, datetime, timedelta
 from decimal import Decimal
 import paypalrestsdk
-import pytz
 from django.contrib.sites.models import Site
 from django.urls import reverse
 from django.utils import timezone
@@ -70,7 +69,7 @@ def create_agreement(amount, key, app=False):
         plan_id = create_plan(amount)
     else:
         plan_id = plan.plan_id
-    start = (timezone.now() + timedelta(0, 3600*24)).astimezone(pytz.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
+    start = (timezone.now() + timedelta(0, 3600*24)).astimezone(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
     billing_agreement = paypalrestsdk.BillingAgreement({
         "name": "Subskrypcja klubu WL",
         "description": "Stałe wsparcie Wolnych Lektur kwotą %s złotych" % amount,
@@ -117,11 +116,6 @@ def check_agreement(agreement_id):
         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)