feat(connector): [Nexixpay] add mandates flow for cards (#6259)

Co-authored-by: Mrudul Vajpayee <mrudul.vajpayee@mrudulvajpayee-XJWXCWP7HF.local>
This commit is contained in:
Mrudul Vajpayee
2024-12-05 14:16:04 +05:30
committed by GitHub
parent c2646d749c
commit 62521f367b
5 changed files with 981 additions and 150 deletions

View File

@ -1952,6 +1952,98 @@ impl Default for settings::RequiredFields {
),
}
),
(
enums::Connector::Nexixpay,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.card.card_number".to_string(),
display_name: "card_number".to_string(),
field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
"payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.card.card_exp_month".to_string(),
display_name: "card_exp_month".to_string(),
field_type: enums::FieldType::UserCardExpiryMonth,
value: None,
}
),
(
"payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.card.card_exp_year".to_string(),
display_name: "card_exp_year".to_string(),
field_type: enums::FieldType::UserCardExpiryYear,
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.line2".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.line2".to_string(),
display_name: "line1".to_string(),
field_type: enums::FieldType::UserAddressLine2,
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.address.zip".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.zip".to_string(),
display_name: "zip".to_string(),
field_type: enums::FieldType::UserAddressPincode,
value: None,
}
),
(
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
display_name: "first_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
),
(
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
display_name: "last_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
)
]
),
}
),
(
enums::Connector::Nmi,
RequiredFieldFinal {