Skip to content

Commit

Permalink
feat: add required fields for bancontact_card for Mollie, Adyen and S…
Browse files Browse the repository at this point in the history
…tripe
  • Loading branch information
swangi-kumari committed Dec 1, 2023
1 parent 95876b0 commit afe50d2
Showing 1 changed file with 73 additions and 1 deletion.
74 changes: 73 additions & 1 deletion crates/router/src/configs/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4125,13 +4125,85 @@ impl Default for super::settings::RequiredFields {
ConnectorFields {
fields: HashMap::from([
(
enums::Connector::Stripe,
enums::Connector::Mollie,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
common: HashMap::new(),
}
),
(
enums::Connector::Stripe,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from([
(
"payment_method_data.bank_redirect.bancontact_card.billing_details.email".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.billing_details.email".to_string(),
display_name: "email".to_string(),
field_type: enums::FieldType::UserEmailAddress,
value: None,
}
),
(
"payment_method_data.bank_redirect.bancontact_card.billing_details.billing_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.billing_details.billing_name".to_string(),
display_name: "billing_name".to_string(),
field_type: enums::FieldType::UserBillingName,
value: None,
}
)
]),
common: HashMap::new(),
}
),
(
enums::Connector::Adyen,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from([
(
"payment_method_data.bank_redirect.bancontact_card.card_number".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.card_number".to_string(),
display_name: "card_number".to_string(),
field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
"payment_method_data.bank_redirect.bancontact_card.card_exp_month".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.card_exp_month".to_string(),
display_name: "card_exp_month".to_string(),
field_type: enums::FieldType::UserCardExpiryMonth,
value: None,
}
),
(
"payment_method_data.bank_redirect.bancontact_card.card_exp_year".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.card_exp_year".to_string(),
display_name: "card_exp_year".to_string(),
field_type: enums::FieldType::UserCardExpiryYear,
value: None,
}
),
(
"payment_method_data.bank_redirect.bancontact_card.card_holder_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.bank_redirect.bancontact_card.card_holder_name".to_string(),
display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
)
]),
common: HashMap::new(),
}
)
]),
},
),
Expand Down

0 comments on commit afe50d2

Please sign in to comment.