summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Mihai <smihai@entrouvert.com>2016-11-03 09:44:12 (GMT)
committerSerghei Mihai <smihai@entrouvert.com>2016-11-03 13:31:15 (GMT)
commitea7e051c9eaf9fb8783dceba001cde146aecbeff (patch)
tree70912218a330b6036fcd5af9432eafac5f35592c
parent11ba668f42333cc3f595be6a54910992d8f42111 (diff)
downloadeopayment-ea7e051c9eaf9fb8783dceba001cde146aecbeff.zip
eopayment-ea7e051c9eaf9fb8783dceba001cde146aecbeff.tar.gz
eopayment-ea7e051c9eaf9fb8783dceba001cde146aecbeff.tar.bz2
systempayv2: allos spaces in user first and last names (#13834)v1.17
-rw-r--r--eopayment/systempayv2.py4
-rw-r--r--tests/test_systempayv2.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index daa30bb..ccf38d0 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -140,8 +140,8 @@ PARAMETERS = [
Parameter('vads_url_return', 'ans', 28, max_length=127),
Parameter('vads_user_info', 'ans', 61, max_length=255),
Parameter('vads_contracts', 'ans', 62, max_length=255),
- Parameter(VADS_CUST_FIRST_NAME, 'an', 104, max_length=63),
- Parameter(VADS_CUST_LAST_NAME, 'an', 104, max_length=63),
+ Parameter(VADS_CUST_FIRST_NAME, 'ans', 104, max_length=63),
+ Parameter(VADS_CUST_LAST_NAME, 'ans', 104, max_length=63),
]
PARAMETER_MAP = dict(((parameter.name,
parameter) for parameter in PARAMETERS))
diff --git a/tests/test_systempayv2.py b/tests/test_systempayv2.py
index 03e70e7..25ad104 100644
--- a/tests/test_systempayv2.py
+++ b/tests/test_systempayv2.py
@@ -15,23 +15,23 @@ PARAMS = {
def test_systempayv2():
p = Payment(PARAMS)
data = {'amount': 15.24, 'orderid': '654321',
- 'first_name': u'Sergheï',
+ 'first_name': u'Jean Michél',
'last_name': u'Mihaï'
}
qs = 'vads_version=V2&vads_page_action=PAYMENT&vads_action_mode=INTERACTIV' \
'E&vads_payment_config=SINGLE&vads_site_id=12345678&vads_ctx_mode=TES' \
'T&vads_trans_id=654321&vads_trans_date=20090501193530&vads_amount=15' \
- '24&vads_currency=978&vads_cust_first_name=Sergheï&vads_cust_last_name=Mihaï'
+ '24&vads_currency=978&vads_cust_first_name=Jean+Mich%C3%A9l&vads_cust_last_name=Mihaï'
qs = urlparse.parse_qs(qs)
for key in qs.keys():
qs[key] = qs[key][0]
- assert p.signature(qs) == '4d2010d3b4566841ee0b0b2c74b6650bce65365e'
+ assert p.signature(qs) == 'cf1ccac335590a33d6c243345c4f4531a0316b7f'
transaction_id, f, form = p.request(**data)
# check that user first and last names are unicode
for field in form.fields:
if field['name'] in (VADS_CUST_FIRST_NAME, VADS_CUST_LAST_NAME):
- assert field['value'] in (u'Sergheï', u'Mihaï')
+ assert field['value'] in (u'Jean Michél', u'Mihaï')
response_qs = 'vads_amount=1042&vads_auth_mode=FULL&vads_auth_number=3feadf' \
'&vads_auth_result=00&vads_capture_delay=0&vads_card_brand=CB' \