Skip to content

Commit

Permalink
fix(connector): [Adyen]add required fields for afterpay clearpay (#4858)
Browse files Browse the repository at this point in the history
  • Loading branch information
srujanchikke authored Jun 4, 2024
1 parent e9be4e2 commit ba0a1e9
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 4 deletions.
2 changes: 0 additions & 2 deletions crates/connector_configs/toml/development.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ merchant_secret="Source verification key"
payment_method_type = "eps"
[[adyen.bank_redirect]]
payment_method_type = "blik"
[[adyen.bank_redirect]]
payment_method_type = "przelewy24"
[[adyen.bank_redirect]]
payment_method_type = "trustly"
[[adyen.bank_redirect]]
Expand Down
2 changes: 0 additions & 2 deletions crates/connector_configs/toml/sandbox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ merchant_secret="Source verification key"
payment_method_type = "eps"
[[adyen.bank_redirect]]
payment_method_type = "blik"
[[adyen.bank_redirect]]
payment_method_type = "przelewy24"
[[adyen.bank_redirect]]
payment_method_type = "trustly"
[[adyen.bank_redirect]]
Expand Down
94 changes: 94 additions & 0 deletions crates/router/src/configs/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8110,6 +8110,100 @@ impl Default for super::settings::RequiredFields {
]),
common : HashMap::new(),
}
),
(
enums::Connector::Adyen,
RequiredFieldFinal {
mandate : HashMap::new(),
non_mandate: HashMap::from([
(
"billing.email".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.email".to_string(),
display_name: "email".to_string(),
field_type: enums::FieldType::UserEmailAddress,
value: None,
}
),
(
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
display_name: "billing_first_name".to_string(),
field_type: enums::FieldType::UserBillingName,
value: None,
}
),
(
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
display_name: "billing_last_name".to_string(),
field_type: enums::FieldType::UserBillingName,
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: "line2".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.country".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.country".to_string(),
display_name: "country".to_string(),
field_type: enums::FieldType::UserAddressCountry{
options: vec![
"GB".to_string(),
]
},
value: None,
}
),
(
"billing.address.state".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.state".to_string(),
display_name: "state".to_string(),
field_type: enums::FieldType::UserAddressState,
value: None,
}
),
]),
common : HashMap::new(),
}
)
]),
},
Expand Down

0 comments on commit ba0a1e9

Please sign in to comment.