0001-paybox-add-python3-compat-for-transaction-operations.patch
eopayment/paybox.py | ||
---|---|---|
364 | 364 |
response.raise_for_status() |
365 | 365 |
logger.debug('received %r', response.content) |
366 | 366 |
data = dict(urlparse.parse_qsl(response.content, True, True)) |
367 |
data['COMMENTAIRE'] = data.get('COMMENTAIRE', '').decode('iso-8859-1') |
|
367 |
if six.PY2: |
|
368 |
data['COMMENTAIRE'] = data.get('COMMENTAIRE', '').decode('iso-8859-1') |
|
368 | 369 |
if data.get('CODEREPONSE') != PAYBOX_DIRECT_SUCCESS_RESPONSE_CODE: |
369 |
raise ResponseError(data['COMMENTAIRE'].encode('utf-8')) |
|
370 |
if six.PY2: |
|
371 |
raise ResponseError(data['COMMENTAIRE'].encode('utf-8')) |
|
372 |
raise ResponseError(data['COMMENTAIRE']) |
|
370 | 373 |
return data |
371 | 374 | |
372 | 375 |
def validate(self, amount, bank_data, **kwargs): |
373 |
- |