summaryrefslogtreecommitdiff
path: root/postgresqleu/adyen/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'postgresqleu/adyen/util.py')
-rw-r--r--postgresqleu/adyen/util.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/postgresqleu/adyen/util.py b/postgresqleu/adyen/util.py
index 3cc981d9..7a0604cd 100644
--- a/postgresqleu/adyen/util.py
+++ b/postgresqleu/adyen/util.py
@@ -16,6 +16,7 @@ from postgresqleu.accounting.util import create_accounting_entry
from models import TransactionStatus, Report, AdyenLog, Notification, Refund
+
# Internal exception class
class AdyenProcessingException(Exception):
pass
@@ -116,7 +117,6 @@ def process_authorization(notification):
notification.save()
return
-
if invoice.accounting_object:
# Store the accounting object so we can properly tag the
# fee for it when we process the settlement (since we don't
@@ -158,6 +158,7 @@ def process_authorization(notification):
notification.confirmed = True
notification.save()
+
def process_capture(notification):
if notification.success:
# Successful capture, so we just set when the capture happened
@@ -181,6 +182,7 @@ def process_capture(notification):
notification.confirmed = True
notification.save()
+
def process_refund(notification):
# Store the refund, and send an email!
if notification.success:
@@ -248,6 +250,7 @@ def process_refund(notification):
notification.confirmed = True
notification.save()
+
def process_new_report(notification):
# Just store the fact that this report is available. We'll have an
# asynchronous cronjob that downloads and processes the reports.
@@ -302,9 +305,6 @@ def process_one_notification(notification):
# unverified notifications.
-
-
-
def process_raw_adyen_notification(raw, POST):
# Process a single raw Adyen notification. Must *not* be called in
# a transactional context, as it manages it's own.
@@ -381,14 +381,12 @@ def process_raw_adyen_notification(raw, POST):
return True
-
#
# Accesspoints into the Adyen API
#
# Most of the API is off limits to us due to lack of PCI, but we can do a couple
# of important things like refunding.
#
-
class AdyenAPI(object):
def refund_transaction(self, refundid, transreference, amount):
apiparam = {
@@ -410,7 +408,6 @@ class AdyenAPI(object):
refundid,
e))
-
def _api_call(self, apiurl, apiparam, okresponse):
apijson = json.dumps(apiparam)