Skip to content

Commit

Permalink
chore(dynamic-fields): [Worldpay] update dynamic fields for payments (j…
Browse files Browse the repository at this point in the history
…uspay#7002)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
kashif-m and hyperswitch-bot[bot] authored Jan 8, 2025
1 parent d594173 commit b46a921
Showing 1 changed file with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,8 @@ impl Default for settings::RequiredFields {
enums::Connector::Worldpay,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: {
non_mandate: HashMap::new(),
common: {
let mut pmd_fields = HashMap::from([
(
"payment_method_data.card.card_number".to_string(),
Expand Down Expand Up @@ -3257,7 +3258,6 @@ impl Default for settings::RequiredFields {
pmd_fields.extend(get_worldpay_billing_required_fields());
pmd_fields
},
common: HashMap::new(),
}
),
(
Expand Down Expand Up @@ -6420,7 +6420,8 @@ impl Default for settings::RequiredFields {
enums::Connector::Worldpay,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: {
non_mandate: HashMap::new(),
common: {
let mut pmd_fields = HashMap::from([
(
"payment_method_data.card.card_number".to_string(),
Expand Down Expand Up @@ -6453,7 +6454,6 @@ impl Default for settings::RequiredFields {
pmd_fields.extend(get_worldpay_billing_required_fields());
pmd_fields
},
common: HashMap::new(),
}
),
(
Expand Down Expand Up @@ -12840,18 +12840,18 @@ impl Default for settings::RequiredFields {
pub fn get_worldpay_billing_required_fields() -> HashMap<String, RequiredFieldInfo> {
HashMap::from([
(
"billing.address.zip".to_string(),
"billing.address.line1".to_string(),
RequiredFieldInfo {
required_field: "billing.address.zip".to_string(),
display_name: "zip".to_string(),
field_type: enums::FieldType::UserAddressPincode,
required_field: "payment_method_data.billing.address.line1".to_string(),
display_name: "line1".to_string(),
field_type: enums::FieldType::UserAddressLine1,
value: None,
},
),
(
"billing.address.country".to_string(),
RequiredFieldInfo {
required_field: "billing.address.country".to_string(),
required_field: "payment_method_data.billing.address.country".to_string(),
display_name: "country".to_string(),
field_type: enums::FieldType::UserAddressCountry {
options: vec![
Expand Down Expand Up @@ -12994,5 +12994,14 @@ pub fn get_worldpay_billing_required_fields() -> HashMap<String, RequiredFieldIn
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,
},
),
])
}

0 comments on commit b46a921

Please sign in to comment.