fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better management of manually-set members.
[wolnelektury.git]
/
src
/
paypal
/
rest.py
diff --git
a/src/paypal/rest.py
b/src/paypal/rest.py
index
8927cab
..
92752b7
100644
(file)
--- a/
src/paypal/rest.py
+++ b/
src/paypal/rest.py
@@
-1,4
+1,3
@@
-# -*- coding: utf-8 -*-
# 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.
#
@@
-7,7
+6,7
@@
from datetime import timedelta
import paypalrestsdk
import pytz
from django.contrib.sites.models import Site
import paypalrestsdk
import pytz
from django.contrib.sites.models import Site
-from django.
core.urlresolver
s import reverse
+from django.
url
s import reverse
from django.utils import timezone
from django.conf import settings
from .models import BillingPlan, BillingAgreement
from django.utils import timezone
from django.conf import settings
from .models import BillingPlan, BillingAgreement
@@
-73,8
+72,8
@@
def create_agreement(amount, app=False):
plan_id = plan.plan_id
start = (timezone.now() + timedelta(0, 3600*24)).astimezone(pytz.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
billing_agreement = paypalrestsdk.BillingAgreement({
plan_id = plan.plan_id
start = (timezone.now() + timedelta(0, 3600*24)).astimezone(pytz.utc).strftime('%Y-%m-%dT%H:%M:%SZ')
billing_agreement = paypalrestsdk.BillingAgreement({
- "name":
u
"Subskrypcja klubu WL",
- "description":
u
"Stałe wsparcie Wolnych Lektur kwotą %s złotych" % amount,
+ "name": "Subskrypcja klubu WL",
+ "description": "Stałe wsparcie Wolnych Lektur kwotą %s złotych" % amount,
"start_date": start,
"plan": {
"id": plan_id,
"start_date": start,
"plan": {
"id": plan_id,