fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5707b61
)
Paypal fix
master
author
Radek Czajka
<radekczajka@wolnelektury.pl>
Tue, 17 Nov 2026 11:16:39 +0000
(12:16 +0100)
committer
Radek Czajka
<radekczajka@wolnelektury.pl>
Tue, 17 Nov 2026 11:16:39 +0000
(12:16 +0100)
src/paypal/rest.py
patch
|
blob
|
history
diff --git
a/src/paypal/rest.py
b/src/paypal/rest.py
index
a5e7ebe
..
cf80b46
100644
(file)
--- a/
src/paypal/rest.py
+++ b/
src/paypal/rest.py
@@
-1,12
+1,12
@@
# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
#
-from datetime import date, datetime, timedelta
+from datetime import date, datetime, timedelta
, timezone
from decimal import Decimal
import paypalrestsdk
from django.contrib.sites.models import Site
from django.urls import reverse
from decimal import Decimal
import paypalrestsdk
from django.contrib.sites.models import Site
from django.urls import reverse
-from django.utils
import timezone
+from django.utils
.timezone import now
from django.conf import settings
from .models import BillingPlan, BillingAgreement
from django.conf import settings
from .models import BillingPlan, BillingAgreement
@@
-69,7
+69,7
@@
def create_agreement(amount, key, app=False):
plan_id = create_plan(amount)
else:
plan_id = plan.plan_id
plan_id = create_plan(amount)
else:
plan_id = plan.plan_id
- start = (
timezone.
now() + timedelta(0, 3600*24)).astimezone(timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
+ start = (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,
billing_agreement = paypalrestsdk.BillingAgreement({
"name": "Subskrypcja klubu WL",
"description": "Stałe wsparcie Wolnych Lektur kwotą %s złotych" % amount,