From 14f3ad83891b0eed213de595ecbca8c731a69401 Mon Sep 17 00:00:00 2001 From: Serghei Mihai Date: Wed, 19 Oct 2016 12:06:03 +0200 Subject: [PATCH] make unicode all API input params (#13624) --- eopayment/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eopayment/__init__.py b/eopayment/__init__.py index 6f620c0..4858f94 100644 --- a/eopayment/__init__.py +++ b/eopayment/__init__.py @@ -3,7 +3,7 @@ import logging from common import (URL, HTML, FORM, RECEIVED, ACCEPTED, PAID, DENIED, - CANCELED, CANCELLED, ERROR, ResponseError) + CANCELED, CANCELLED, ERROR, ResponseError, force_text) __all__ = ['Payment', 'URL', 'HTML', 'FORM', 'SIPS', 'SYSTEMPAY', 'SPPLUS', 'TIPI', 'DUMMY', 'get_backend', 'RECEIVED', 'ACCEPTED', @@ -102,6 +102,9 @@ class Payment(object): server, which must be sent to the customer browser. ''' logger.debug(u'%r' % kwargs) + for param in kwargs: + # encode all input params to unicode + kwargs[param] = force_text(kwargs[param]) return self.backend.request(amount, **kwargs) def response(self, query_string, **kwargs):