make unicode all API input params (#13624)

This commit is contained in:
Serghei Mihai 2016-10-19 12:06:03 +02:00
parent 09f2ec7e3d
commit 14f3ad8389
1 changed files with 4 additions and 1 deletions

View File

@ -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):