diff --git a/Adyen/client.py b/Adyen/client.py index 9d218179..4ed901a0 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) @@ -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.