mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
refactor(connector): [Mifinity] Add dynamic fields for Mifinity Wallet (#4943)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -9481,6 +9481,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"user_date_of_birth"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Possible field type of required fields in payment_method_data"
|
"description": "Possible field type of required fields in payment_method_data"
|
||||||
|
|||||||
@ -459,6 +459,7 @@ pub enum FieldType {
|
|||||||
UserBank,
|
UserBank,
|
||||||
Text,
|
Text,
|
||||||
DropDown { options: Vec<String> },
|
DropDown { options: Vec<String> },
|
||||||
|
UserDateOfBirth,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FieldType {
|
impl FieldType {
|
||||||
@ -543,6 +544,7 @@ impl PartialEq for FieldType {
|
|||||||
options: options_other,
|
options: options_other,
|
||||||
},
|
},
|
||||||
) => options_self.eq(options_other),
|
) => options_self.eq(options_other),
|
||||||
|
(Self::UserDateOfBirth, Self::UserDateOfBirth) => true,
|
||||||
_unused => false,
|
_unused => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8087,7 +8087,35 @@ impl Default for super::settings::RequiredFields {
|
|||||||
enums::Connector::Mifinity,
|
enums::Connector::Mifinity,
|
||||||
RequiredFieldFinal {
|
RequiredFieldFinal {
|
||||||
mandate: HashMap::new(),
|
mandate: HashMap::new(),
|
||||||
non_mandate: HashMap::from([
|
non_mandate: HashMap::new(),
|
||||||
|
common: HashMap::from([
|
||||||
|
(
|
||||||
|
"payment_method_data.wallet.mifinity.date_of_birth".to_string(),
|
||||||
|
RequiredFieldInfo {
|
||||||
|
required_field: "payment_method_data.wallet.mifinity.date_of_birth".to_string(),
|
||||||
|
display_name: "date_of_birth".to_string(),
|
||||||
|
field_type: enums::FieldType::UserDateOfBirth,
|
||||||
|
value: None,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"billing.address.line1".to_string(),
|
||||||
|
RequiredFieldInfo {
|
||||||
|
required_field: "payment_method_data.billing.address.line1".to_string(),
|
||||||
|
display_name: "line1".to_string(),
|
||||||
|
field_type: enums::FieldType::UserAddressLine1,
|
||||||
|
value: None,
|
||||||
|
}
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"billing.address.city".to_string(),
|
||||||
|
RequiredFieldInfo {
|
||||||
|
required_field: "payment_method_data.billing.address.city".to_string(),
|
||||||
|
display_name: "city".to_string(),
|
||||||
|
field_type: enums::FieldType::UserAddressCity,
|
||||||
|
value: None,
|
||||||
|
}
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"billing.first_name".to_string(),
|
"billing.first_name".to_string(),
|
||||||
RequiredFieldInfo {
|
RequiredFieldInfo {
|
||||||
@ -8193,7 +8221,6 @@ impl Default for super::settings::RequiredFields {
|
|||||||
}
|
}
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
common: HashMap::new(),
|
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
|||||||
Reference in New Issue
Block a user