change format of description records

This commit is contained in:
Benjamin Dauvergne 2012-05-25 15:40:41 +02:00
parent 83141494c5
commit 4f76e78eca
2 changed files with 17 additions and 17 deletions

View File

@ -4,7 +4,7 @@ import logging
try:
from cgi import parse_qs
except:
except ImportError:
from urlparse import parse_qs
from common import PaymentCommon, URL, PaymentResponse, PAID, ERROR
@ -37,38 +37,38 @@ class Payment(PaymentCommon):
'''
description = {
'caption': 'Dummy payment backend',
'parameters': {
'dummy_service_url': {
'parameters': [
{ 'name': 'dummy_service_url',
'caption': 'URL of the dummy payment service',
'default': SERVICE_URL,
'type': str,
},
'direct_notification_url': {
{ 'name': 'direct_notification_url',
'caption': 'direct notification url',
'type': str,
},
'origin': {
{ 'name': 'origin',
'caption': 'name of the requesting service, '
'to present in the user interface',
'type': str,
},
'siret': {
{ 'name': 'siret',
'caption': 'dummy siret parameter',
'type': str,
},
'next_url': {
{ 'name': 'next_url',
'caption': 'Return URL for the user',
'type': str,
},
'consider_all_response_signed': {
{ 'name': 'consider_all_response_signed',
'caption': 'All response will be considered as signed '
'(to test payment locally for example, as you '
'cannot received the signed callback)',
'type': bool,
'default': False,
},
}
],
}
def request(self, montant, email=None, next_url=None, logger=LOGGER):

View File

@ -90,34 +90,34 @@ SERVICE_URL = "https://www.spplus.net/paiement/init.do"
class Payment(PaymentCommon):
description = {
'caption': "SPPlus payment service of French bank Caisse d'epargne",
'parameters': {
'cle': {
'parameters': [
{ 'name': 'cle',
'caption': 'Secret key, a 40 digits hexadecimal number',
'regexp': re.compile('^ *((?:[a-fA-F0-9] *){40}) *$')
},
'siret': {
{ 'name': 'siret',
'caption': 'Siret of the entreprise augmented with the '
'site number, example: 00000000000001-01',
'regexp': re.compile('^ *(\d{14}-\d{2}) *$')
},
'langue': {
{ 'name': 'langue',
'caption': 'Language of the customers',
'default': 'FR',
},
'taxe': {
{ 'name': 'taxe',
'caption': 'Taxes',
'default': '0.00'
},
'modalite': {
{ 'name': 'modalite',
'caption': '1x, 2x, 3x, xx, nx (if multiple separated by "/")',
'default': '1x',
},
'moyen': {
{ 'name': 'moyen',
'caption': 'AUR, AMX, CBS, CGA, '
'CHK, DIN, PRE (if multiple separate by "/")',
'default': 'CBS',
},
}
]
}
devise = '978'