summaryrefslogtreecommitdiffstats
path: root/eopayment/paybox.py
diff options
context:
space:
mode:
Diffstat (limited to 'eopayment/paybox.py')
-rw-r--r--eopayment/paybox.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/eopayment/paybox.py b/eopayment/paybox.py
index ec4d479..b9f79be 100644
--- a/eopayment/paybox.py
+++ b/eopayment/paybox.py
@@ -364,8 +364,9 @@ class Payment(PaymentCommon):
response.raise_for_status()
logger.debug('received %r', response.content)
data = dict(urlparse.parse_qsl(response.content, True, True))
+ data['COMMENTAIRE'] = data.get('COMMENTAIRE', '').decode('iso-8859-1')
if data.get('CODEREPONSE') != PAYBOX_DIRECT_SUCCESS_RESPONSE_CODE:
- raise ResponseError(data.get('COMMENTAIRE'))
+ raise ResponseError(data['COMMENTAIRE'].encode('utf-8'))
return data
def validate(self, amount, bank_data, **kwargs):