Skip to content

Commit

Permalink
feat(connector): [BANKOFAMERICA] Implement Cards for Bank of America (#…
Browse files Browse the repository at this point in the history
…2765)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: swangi-kumari <[email protected]>
  • Loading branch information
3 people authored Nov 16, 2023
1 parent 0176c91 commit e8de3a7
Show file tree
Hide file tree
Showing 178 changed files with 10,152 additions and 207 deletions.
Binary file modified .github/secrets/connector_auth.toml.gpg
Binary file not shown.
4 changes: 2 additions & 2 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub enum Connector {
Airwallex,
Authorizedotnet,
Bambora,
// Bankofamerica, Added as template code for future usage
Bankofamerica,
Bitpay,
Bluesnap,
Boku,
Expand Down Expand Up @@ -196,7 +196,7 @@ pub enum RoutableConnectors {
Adyen,
Airwallex,
Authorizedotnet,
// Bankofamerica, Added as template code for future usage
Bankofamerica,
Bitpay,
Bambora,
Bluesnap,
Expand Down
3 changes: 2 additions & 1 deletion crates/api_models/src/routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ impl From<RoutableConnectorChoice> for ast::ConnectorChoice {
RoutableConnectors::Adyen => euclid_enums::Connector::Adyen,
RoutableConnectors::Airwallex => euclid_enums::Connector::Airwallex,
RoutableConnectors::Authorizedotnet => euclid_enums::Connector::Authorizedotnet,
RoutableConnectors::Bitpay => euclid_enums::Connector::Bitpay,
RoutableConnectors::Bambora => euclid_enums::Connector::Bambora,
RoutableConnectors::Bankofamerica => euclid_enums::Connector::Bankofamerica,
RoutableConnectors::Bitpay => euclid_enums::Connector::Bitpay,
RoutableConnectors::Bluesnap => euclid_enums::Connector::Bluesnap,
RoutableConnectors::Boku => euclid_enums::Connector::Boku,
RoutableConnectors::Braintree => euclid_enums::Connector::Braintree,
Expand Down
3 changes: 2 additions & 1 deletion crates/euclid/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ pub enum Connector {
Adyen,
Airwallex,
Authorizedotnet,
Bitpay,
Bambora,
Bankofamerica,
Bitpay,
Bluesnap,
Boku,
Braintree,
Expand Down
132 changes: 132 additions & 0 deletions crates/router/src/configs/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,138 @@ impl Default for super::settings::RequiredFields {
common: HashMap::new(),
}
),
(
enums::Connector::Bankofamerica,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: 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,
}
),
(
"payment_method_data.card.card_cvc".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.card.card_cvc".to_string(),
display_name: "card_cvc".to_string(),
field_type: enums::FieldType::UserCardCvc,
value: None,
}
),
(
"payment_method_data.card.card_holder_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.card.card_holder_name".to_string(),
display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
),
(
"email".to_string(),
RequiredFieldInfo {
required_field: "email".to_string(),
display_name: "email".to_string(),
field_type: enums::FieldType::UserEmailAddress,
value: None,
}
),
(
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "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: "billing.address.last_name".to_string(),
display_name: "billing_last_name".to_string(),
field_type: enums::FieldType::UserBillingName,
value: None,
}
),
(
"billing.address.city".to_string(),
RequiredFieldInfo {
required_field: "billing.address.city".to_string(),
display_name: "city".to_string(),
field_type: enums::FieldType::UserAddressCity,
value: None,
}
),
(
"billing.address.state".to_string(),
RequiredFieldInfo {
required_field: "billing.address.state".to_string(),
display_name: "state".to_string(),
field_type: enums::FieldType::UserAddressState,
value: None,
}
),
(
"billing.address.zip".to_string(),
RequiredFieldInfo {
required_field: "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: "billing.address.country".to_string(),
display_name: "country".to_string(),
field_type: enums::FieldType::UserAddressCountry{
options: vec![
"ALL".to_string(),
]
},
value: None,
}
),
(
"billing.address.line1".to_string(),
RequiredFieldInfo {
required_field: "billing.address.line1".to_string(),
display_name: "line1".to_string(),
field_type: enums::FieldType::UserAddressline1,
value: None,
}
),
]
),
common: HashMap::new(),
}
),
(
enums::Connector::Bluesnap,
RequiredFieldFinal {
Expand Down
Loading

0 comments on commit e8de3a7

Please sign in to comment.