From 82fe4a4f54d45c2c0f51101e28df754242544de1 Mon Sep 17 00:00:00 2001 From: Torok Gabor Date: Fri, 14 Jul 2017 08:59:39 +0200 Subject: [PATCH 1/2] Fix invalid variable name, raw_result does not exist in the code --- Adyen/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adyen/client.py b/Adyen/client.py index 9d218179..9d0dd8c1 100644 --- a/Adyen/client.py +++ b/Adyen/client.py @@ -410,7 +410,7 @@ def _handle_response(self, url, raw_response, raw_request, status_code, headers, # If the result can't be parsed into json, most likely is raw html. # Some response are neither json or raw html, handle them here: try: - response = json_lib.loads(raw_result) + response = json_lib.loads(raw_response) self._handle_http_error(url, response, status_code, headers.get('pspReference'), raw_request, raw_response, headers) From 013d5e60a330d8e10bdfe7bfca7f2fce7d1c48c4 Mon Sep 17 00:00:00 2001 From: Torok Gabor Date: Fri, 14 Jul 2017 09:04:08 +0200 Subject: [PATCH 2/2] Make functional argument 'message' optional There is a call to _handle_http_error() that break sotherwise. --- Adyen/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adyen/client.py b/Adyen/client.py index 9d0dd8c1..4ed901a0 100644 --- a/Adyen/client.py +++ b/Adyen/client.py @@ -455,7 +455,7 @@ def _handle_response(self, url, raw_response, raw_request, status_code, headers, raise AdyenInvalidRequestError(errorstring) def _handle_http_error(self, url, response_obj, status_code, psp_ref, - raw_request, raw_response, headers,message): + raw_request, raw_response, headers, message=None): """This function handles the non 200 responses from Adyen, raising an error that should provide more information.