summaryrefslogtreecommitdiffstats
path: root/eopayment/systempayv2.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2016-06-16 12:59:35 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2016-06-16 12:59:35 (GMT)
commitd0c523ff12f6c1cbc8057174e5117848adc04276 (patch)
tree64184fc0b7d89b895664e71c5360a7c725cfd87f /eopayment/systempayv2.py
parent05dfdc5aafb9495209309911400252b365a2cd96 (diff)
downloadeopayment-d0c523ff12f6c1cbc8057174e5117848adc04276.zip
eopayment-d0c523ff12f6c1cbc8057174e5117848adc04276.tar.gz
eopayment-d0c523ff12f6c1cbc8057174e5117848adc04276.tar.bz2
systempayv2: force field's name and values to be unicode (fixes #10846)v1.11
Diffstat (limited to 'eopayment/systempayv2.py')
-rw-r--r--eopayment/systempayv2.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index 073fecf..f7030be 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -9,7 +9,7 @@ import warnings
from gettext import gettext as _
from common import (PaymentCommon, PaymentResponse, PAID, ERROR, FORM, Form,
- ResponseError)
+ ResponseError, force_text)
from cb import CB_RESPONSE_CODES
__all__ = ['Payment']
@@ -329,11 +329,15 @@ class Payment(PaymentCommon):
transaction_id = '%s_%s' % (fields[VADS_TRANS_DATE], transaction_id)
self.logger.debug('%s transaction id: %s', __name__, transaction_id)
form = Form(
- url=self.service_url,
- method='POST',
- fields=[{'type': 'hidden',
- 'name': name,
- 'value': value} for name, value in fields.iteritems()])
+ url=self.service_url,
+ method='POST',
+ fields=[
+ {
+ 'type': u'hidden',
+ 'name': force_text(field_name),
+ 'value': force_text(field_value),
+ }
+ for field_name, field_value in fields.iteritems()])
return transaction_id, FORM, form
def response(self, query_string, **kwargs):