systempayv2: change scope of some parameters (#65136)
Change scope of parameters "vads_orde_info, vads_order_info2, vads_order_info3 and vads_payment_config" to "transaction".
This commit is contained in:
parent
80c979113c
commit
2f7c4374f3
|
@ -92,6 +92,7 @@ class Parameter:
|
|||
choices=None,
|
||||
description=None,
|
||||
help_text=None,
|
||||
scope='global',
|
||||
):
|
||||
self.name = name
|
||||
self.ptype = ptype
|
||||
|
@ -103,6 +104,7 @@ class Parameter:
|
|||
self.choices = choices
|
||||
self.description = description
|
||||
self.help_text = help_text
|
||||
self.scope = scope
|
||||
|
||||
def check_value(self, value):
|
||||
if self.length and len(value) != self.length:
|
||||
|
@ -152,9 +154,30 @@ PARAMETERS = [
|
|||
# ISO 639 code
|
||||
Parameter('vads_language', 'a', 12, length=2, default='fr'),
|
||||
Parameter('vads_order_id', 'an-', 13, max_length=32),
|
||||
Parameter('vads_order_info', 'an', 14, max_length=255, description="Complément d'information 1"),
|
||||
Parameter('vads_order_info2', 'an', 14, max_length=255, description="Complément d'information 2"),
|
||||
Parameter('vads_order_info3', 'an', 14, max_length=255, description="Complément d'information 3"),
|
||||
Parameter(
|
||||
'vads_order_info',
|
||||
'an',
|
||||
14,
|
||||
max_length=255,
|
||||
description="Complément d'information 1",
|
||||
scope='transaction',
|
||||
),
|
||||
Parameter(
|
||||
'vads_order_info2',
|
||||
'an',
|
||||
14,
|
||||
max_length=255,
|
||||
description="Complément d'information 2",
|
||||
scope='transaction',
|
||||
),
|
||||
Parameter(
|
||||
'vads_order_info3',
|
||||
'an',
|
||||
14,
|
||||
max_length=255,
|
||||
description="Complément d'information 3",
|
||||
scope='transaction',
|
||||
),
|
||||
Parameter('vads_page_action', None, 46, needed=True, default='PAYMENT', choices=('PAYMENT',)),
|
||||
Parameter(
|
||||
'vads_payment_cards',
|
||||
|
@ -168,6 +191,7 @@ PARAMETERS = [
|
|||
'E-CARTEBLEUE, MASTERCARD, JCB, MAESTRO, ONEY, '
|
||||
'ONEY_SANDBOX, PAYPAL, PAYPAL_SB, PAYSAFECARD, '
|
||||
'VISA',
|
||||
scope='transaction',
|
||||
),
|
||||
# must be SINGLE or MULTI with parameters
|
||||
Parameter('vads_payment_config', '', 7, default='SINGLE', choices=('SINGLE', 'MULTI'), needed=True),
|
||||
|
@ -320,6 +344,7 @@ class Payment(PaymentCommon):
|
|||
'required': parameter.needed,
|
||||
'help_text': parameter.help_text,
|
||||
'max_length': parameter.max_length,
|
||||
'scope': parameter.scope,
|
||||
}
|
||||
description['parameters'].append(x)
|
||||
|
||||
|
|
Loading…
Reference in New Issue