summaryrefslogtreecommitdiffstats
path: root/eopayment/systempayv2.py
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2012-05-29 12:49:26 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2012-05-29 12:49:26 (GMT)
commit0b114b0cb9d6ffee8b290579d98dd297eec15f37 (patch)
tree66f541a3865b88b63a3f9e88253010f4e0f8b4c7 /eopayment/systempayv2.py
parentf3c2d7e79b0d6bfbd97a13c80c752901dfd83e8f (diff)
downloadeopayment-0b114b0cb9d6ffee8b290579d98dd297eec15f37.zip
eopayment-0b114b0cb9d6ffee8b290579d98dd297eec15f37.tar.gz
eopayment-0b114b0cb9d6ffee8b290579d98dd297eec15f37.tar.bz2
systempayv2: improve parameter descriptions
Diffstat (limited to 'eopayment/systempayv2.py')
-rw-r--r--eopayment/systempayv2.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index 2baf78b..047e35b 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -213,10 +213,12 @@ class Payment(PaymentCommon):
'caption': _(u'URL du service de paiment'),
'help_text': _(u'ne pas modifier si vous ne savez pas'),
'validation': lambda x: x.startswith('http'),
+ 'required': True,
},
{ 'name': 'secret_test',
'caption': _(u'Secret pour la configuration de TEST'),
'validation': str.isdigit,
+ 'required': True,
},
{ 'name': 'secret_production',
'caption': _(u'Secret pour la configuration de PRODUCTION'),
@@ -225,12 +227,16 @@ class Payment(PaymentCommon):
]
}
- for name in (VADS_SITE_ID, 'vads_order_info', 'vads_order_info2',
+ for name in ('vads_ctx_mode', VADS_SITE_ID, 'vads_order_info', 'vads_order_info2',
'vads_order_info3', 'vads_payment_cards', 'vads_payment_config'):
parameter = PARAMETER_MAP[name]
x = { 'name': name,
'caption': parameter.description or name,
'validation': parameter.check_value,
+ 'default': parameter.default,
+ 'required': parameter.needed,
+ 'help_text': parameter.help_text,
+ 'max_length': parameter.max_length
}
description['parameters'].append(x)
@@ -284,7 +290,9 @@ class Payment(PaymentCommon):
return transaction_id, URL, url
def response(self, query_string):
- fields = urlparse.parse_qs(query_string)
+ fields = urlparse.parse_qs(query_string, True)
+ for key, value in fields.iteritems():
+ fields[key] = value[0]
copy = fields.copy()
bank_status = []
if VADS_AUTH_RESULT in fields: