summaryrefslogtreecommitdiff
path: root/postgresqleu/paypal/views.py
diff options
context:
space:
mode:
authorMagnus Hagander2018-12-14 12:43:24 +0000
committerMagnus Hagander2018-12-14 12:43:24 +0000
commit957224e2f86435b7f84e30b45c21976fd4dab297 (patch)
tree746238e26547840986b8d24ef44ba7cf5899ddca /postgresqleu/paypal/views.py
parent5e8a4a7ab78a9939b21d11094234231bda59567a (diff)
Manual fix of further whitespace issues
Many of these were masked with the using of tabs, but were basically incorrect all the time. It's all in places where whitespace doesn't actually matter, but let's try to match up to PEP8.
Diffstat (limited to 'postgresqleu/paypal/views.py')
-rw-r--r--postgresqleu/paypal/views.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/postgresqleu/paypal/views.py b/postgresqleu/paypal/views.py
index 4a002173..9eb8acfe 100644
--- a/postgresqleu/paypal/views.py
+++ b/postgresqleu/paypal/views.py
@@ -21,8 +21,8 @@ def paypal_return_handler(request):
# Custom error return that can get to the request context
def paypal_error(reason):
return render(request, 'paypal/error.html', {
- 'reason': reason,
- })
+ 'reason': reason,
+ })
# Logger for the invoice processing - we store it in the genereal
# paypal logs
@@ -148,7 +148,7 @@ def paypal_return_handler(request):
create_accounting_entry(date.today(), accrows, True, urls)
return render(request, 'paypal/noinvoice.html', {
- })
+ })
invoicemanager = InvoiceManager()
(r,i,p) = invoicemanager.process_incoming_payment(ti.transtext,
@@ -184,15 +184,15 @@ def paypal_return_handler(request):
url = "%s/invoices/%s/%s/" % (settings.SITEBASE, i.pk, i.recipient_secret)
return render(request, 'paypal/complete.html', {
- 'invoice': i,
- 'url': url,
- })
+ 'invoice': i,
+ 'url': url,
+ })
else:
# Did not match an invoice anywhere!
# We'll leave the transaction in the paypal transaction
# list, where it will generate an alert in the nightly mail.
return render(request, 'paypal/noinvoice.html', {
- })
+ })
# For a pending payment, we set ourselves up with a redirect loop
if d['payment_status'] == 'Pending':
@@ -201,6 +201,6 @@ def paypal_return_handler(request):
except:
pending_reason = 'no reason given'
return render(request, 'paypal/pending.html', {
- 'reason': pending_reason,
- })
+ 'reason': pending_reason,
+ })
return paypal_error('Unknown payment status %s.' % d['payment_status'])