misc: do not convert parameters to text (#46520)
This commit is contained in:
parent
24459e80d0
commit
68242bd435
|
@ -161,12 +161,8 @@ class Payment(object):
|
|||
if capture_day <= 0:
|
||||
raise ValueError("capture_date needs to be superior to the transaction date.")
|
||||
|
||||
kwargs['capture_day'] = capture_day
|
||||
kwargs['capture_day'] = force_text(capture_day)
|
||||
|
||||
for param in kwargs:
|
||||
# encode all but bool input params to unicode
|
||||
if not isinstance(kwargs[param], bool):
|
||||
kwargs[param] = force_text(kwargs[param])
|
||||
return self.backend.request(amount, **kwargs)
|
||||
|
||||
def response(self, query_string, **kwargs):
|
||||
|
|
|
@ -155,7 +155,7 @@ class PayboxTests(TestCase):
|
|||
backend = eopayment.Payment('paybox', params)
|
||||
transaction_id, kind, what = backend.request(
|
||||
Decimal(amount), email=email, orderid=order_id,
|
||||
transaction_id=transaction, time=time, capture_day=2)
|
||||
transaction_id=transaction, time=time, capture_day='2')
|
||||
root = ET.fromstring(str(what))
|
||||
|
||||
form_params = dict(((
|
||||
|
@ -171,7 +171,7 @@ class PayboxTests(TestCase):
|
|||
backend = eopayment.Payment('paybox', params)
|
||||
transaction_id, kind, what = backend.request(
|
||||
Decimal(amount), email=email, orderid=order_id,
|
||||
transaction_id=transaction, time=time, capture_day=2)
|
||||
transaction_id=transaction, time=time, capture_day='2')
|
||||
root = ET.fromstring(str(what))
|
||||
|
||||
form_params = dict(((
|
||||
|
|
|
@ -27,8 +27,8 @@ def test_tipi():
|
|||
p = eopayment.Payment('tipi', {'numcli': '12345'})
|
||||
payment_id, kind, url = p.request(
|
||||
amount=Decimal('123.12'),
|
||||
exer=9999,
|
||||
refdet=999900000000999999,
|
||||
exer='9999',
|
||||
refdet='999900000000999999',
|
||||
objet='tout a fait',
|
||||
email='info@entrouvert.com',
|
||||
urlcl='http://example.com/tipi/test',
|
||||
|
|
Loading…
Reference in New Issue