tipi: define payment type in backend parameters

This commit is contained in:
Serghei Mihai 2016-05-13 16:48:17 +02:00
parent e1b419b2d6
commit 8941ab4aeb
1 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,12 @@ class Payment(PaymentCommon):
'caption': _('Automatic return URL'), 'caption': _('Automatic return URL'),
'required': True, 'required': True,
}, },
{
'name': 'saisie',
'caption': _('Payment type'),
'required': True,
'default': 'T',
},
], ],
} }
@ -110,6 +116,8 @@ class Payment(PaymentCommon):
except Exception, e: except Exception, e:
raise ValueError('MEL is not a valid email, %r' % mel, e) raise ValueError('MEL is not a valid email, %r' % mel, e)
saisie = saisie or self.saisie
if saisie not in ('M', 'T', 'X', 'A'): if saisie not in ('M', 'T', 'X', 'A'):
raise ValueError('SAISIE invalid format, %r, must be M, T, X or A' % saisie) raise ValueError('SAISIE invalid format, %r, must be M, T, X or A' % saisie)