Skip to content

Commit e0a33f8

Browse files
fix(router): fix billing details path in required field (#5992)
1 parent f096992 commit e0a33f8

File tree

1 file changed

+73
-39
lines changed

1 file changed

+73
-39
lines changed

crates/router/src/configs/defaults.rs

Lines changed: 73 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9659,9 +9659,9 @@ impl Default for super::settings::RequiredFields {
96599659
},
96609660
value: None,
96619661
}),
9662-
("email".to_string(),
9662+
("billing.email".to_string(),
96639663
RequiredFieldInfo {
9664-
required_field: "email".to_string(),
9664+
required_field: "payment_method_data.billing.email".to_string(),
96659665
display_name: "email".to_string(),
96669666
field_type: enums::FieldType::UserEmailAddress,
96679667
value: None,
@@ -9822,9 +9822,9 @@ impl Default for super::settings::RequiredFields {
98229822
}
98239823
),
98249824
(
9825-
"payment_method_data.billing.phone.number".to_string(),
9825+
"billing.phone.number".to_string(),
98269826
RequiredFieldInfo {
9827-
required_field: "billing.phone.number".to_string(),
9827+
required_field: "payment_method_data.billing.phone.number".to_string(),
98289828
display_name: "phone_number".to_string(),
98299829
field_type: enums::FieldType::UserPhoneNumber,
98309830
value: None,
@@ -9865,7 +9865,56 @@ impl Default for super::settings::RequiredFields {
98659865
field_type: enums::FieldType::UserAddressLine2,
98669866
value: None,
98679867
}
9868-
)
9868+
),
9869+
(
9870+
"shipping.address.line1".to_string(),
9871+
RequiredFieldInfo {
9872+
required_field: "shipping.address.line1".to_string(),
9873+
display_name: "line1".to_string(),
9874+
field_type: enums::FieldType::UserAddressLine1,
9875+
value: None,
9876+
}
9877+
),
9878+
(
9879+
"shipping.address.line2".to_string(),
9880+
RequiredFieldInfo {
9881+
required_field: "shipping.address.line2".to_string(),
9882+
display_name: "line2".to_string(),
9883+
field_type: enums::FieldType::UserAddressLine2,
9884+
value: None,
9885+
}
9886+
),
9887+
(
9888+
"shipping.address.zip".to_string(),
9889+
RequiredFieldInfo {
9890+
required_field: "shipping.address.zip".to_string(),
9891+
display_name: "zip".to_string(),
9892+
field_type: enums::FieldType::UserShippingAddressPincode,
9893+
value: None,
9894+
}
9895+
),
9896+
(
9897+
"shipping.address.city".to_string(),
9898+
RequiredFieldInfo {
9899+
required_field: "shipping.address.city".to_string(),
9900+
display_name: "city".to_string(),
9901+
field_type: enums::FieldType::UserShippingAddressCity,
9902+
value: None,
9903+
}
9904+
),
9905+
(
9906+
"shipping.address.country".to_string(),
9907+
RequiredFieldInfo {
9908+
required_field: "shipping.address.country".to_string(),
9909+
display_name: "country".to_string(),
9910+
field_type: enums::FieldType::UserCountry {
9911+
options: vec![
9912+
"US".to_string(),
9913+
]},
9914+
value: None,
9915+
}
9916+
),
9917+
98699918
]
98709919
),
98719920
common: HashMap::new(),
@@ -9945,7 +9994,7 @@ impl Default for super::settings::RequiredFields {
99459994
(
99469995
"payment_method_data.billing.phone.number".to_string(),
99479996
RequiredFieldInfo {
9948-
required_field: "billing.phone.number".to_string(),
9997+
required_field: "payment_method_data.billing.phone.number".to_string(),
99499998
display_name: "phone_number".to_string(),
99509999
field_type: enums::FieldType::UserPhoneNumber,
995110000
value: None,
@@ -10063,6 +10112,21 @@ impl Default for super::settings::RequiredFields {
1006310112
value: None,
1006410113
}
1006510114
),
10115+
(
10116+
"billing.address.country".to_string(),
10117+
RequiredFieldInfo {
10118+
required_field: "payment_method_data.billing.address.country".to_string(),
10119+
display_name: "country".to_string(),
10120+
field_type: enums::FieldType::UserAddressCountry{
10121+
options: vec![
10122+
"DK".to_string(),
10123+
"FI".to_string(),
10124+
"NO".to_string(),
10125+
"SE".to_string(),
10126+
]},
10127+
value: None,
10128+
}
10129+
),
1006610130
(
1006710131
"billing.phone.country_code".to_string(),
1006810132
RequiredFieldInfo {
@@ -11940,42 +12004,12 @@ impl Default for super::settings::RequiredFields {
1194012004
display_name: "country".to_string(),
1194112005
field_type: enums::FieldType::UserAddressCountry {
1194212006
options: vec![
11943-
"AT".to_string(),
1194412007
"BE".to_string(),
11945-
"BG".to_string(),
11946-
"HR".to_string(),
11947-
"CY".to_string(),
11948-
"CZ".to_string(),
11949-
"DK".to_string(),
11950-
"EE".to_string(),
11951-
"FI".to_string(),
11952-
"FR".to_string(),
1195312008
"DE".to_string(),
11954-
"GR".to_string(),
11955-
"HU".to_string(),
11956-
"IE".to_string(),
11957-
"IT".to_string(),
11958-
"LV".to_string(),
11959-
"LT".to_string(),
11960-
"LU".to_string(),
11961-
"MT".to_string(),
11962-
"NL".to_string(),
11963-
"PL".to_string(),
11964-
"PT".to_string(),
11965-
"RO".to_string(),
11966-
"SI".to_string(),
11967-
"SK".to_string(),
1196812009
"ES".to_string(),
11969-
"SE".to_string(),
11970-
"AD".to_string(),
11971-
"IS".to_string(),
11972-
"LI".to_string(),
11973-
"MC".to_string(),
11974-
"NO".to_string(),
11975-
"SM".to_string(),
11976-
"CH".to_string(),
11977-
"GB".to_string(),
11978-
"VA".to_string(),
12010+
"FR".to_string(),
12011+
"IE".to_string(),
12012+
"NL".to_string(),
1197912013
],
1198012014
},
1198112015
value: None,

0 commit comments

Comments
 (0)