Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

refactor(card_details): added missing card data fields for connectors (#4571)

Kiran Kumar41655ba30056
diff --git a/crates/router/src/configs/defaults.rs b/crates/router/src/configs/defaults.rs
index 3d4d56b45c..4fcdd76992 100644
--- a/crates/router/src/configs/defaults.rs
+++ b/crates/router/src/configs/defaults.rs
@@ -626,6 +626,53 @@ impl Default for super::settings::RequiredFields {
common: HashMap::new(),
}
),
+ (
+ enums::Connector::Billwerk,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
(
enums::Connector::Bluesnap,
RequiredFieldFinal {
@@ -700,6 +747,100 @@ impl Default for super::settings::RequiredFields {
common: HashMap::new(),
}
),
+ (
+ enums::Connector::Boku,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Braintree,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
(
enums::Connector::Checkout,
RequiredFieldFinal {
@@ -968,11 +1109,13 @@ impl Default for super::settings::RequiredFields {
common:HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Fiserv,
+ enums::Connector::DummyConnector1,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1012,14 +1155,15 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Forte,
+ enums::Connector::DummyConnector2,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1056,80 +1200,18 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
+ )
]
),
- common:HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Globalpay,
+ enums::Connector::DummyConnector3,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
- common: 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,
- }
- )
- ]),
- }
- ),
- (
- enums::Connector::Helcim,
- RequiredFieldFinal {
- mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1166,61 +1248,66 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
+ )
+ ]
+ ),
+ }
+ ),
+ #[cfg(feature = "dummy_connector")]
+ (
+ enums::Connector::DummyConnector4,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
+ [
(
- "billing.address.first_name".to_string(),
+ "payment_method_data.card.card_number".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ required_field: "payment_method_data.card.card_number".to_string(),
+ display_name: "card_number".to_string(),
+ field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
- "billing.address.last_name".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ 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,
}
),
(
- "billing.address.zip".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.zip".to_string(),
- display_name: "zip".to_string(),
- field_type: enums::FieldType::UserAddressPincode,
+ 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,
}
),
(
- "billing.address.line1".to_string(),
+ "payment_method_data.card.card_cvc".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.line1".to_string(),
- display_name: "line1".to_string(),
- field_type: enums::FieldType::UserAddressLine1,
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
+ )
]
),
- common: HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Iatapay,
+ enums::Connector::DummyConnector5,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
- common: HashMap::new(),
- }
- ),
- (
- enums::Connector::Mollie,
- RequiredFieldFinal {
- mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1257,35 +1344,17 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
+ )
]
),
- common: HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Multisafepay,
+ enums::Connector::DummyConnector6,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate:HashMap::new(),
+ non_mandate: HashMap::new(),
common: HashMap::from(
[
(
@@ -1323,71 +1392,52 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- 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,
- }
- ),
+ )
+ ]
+ ),
+ }
+ ),
+ #[cfg(feature = "dummy_connector")]
+ (
+ enums::Connector::DummyConnector7,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
+ [
(
- "billing.address.line2".to_string(),
+ "payment_method_data.card.card_number".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.line2".to_string(),
- display_name: "line2".to_string(),
- field_type: enums::FieldType::UserAddressLine2,
+ required_field: "payment_method_data.card.card_number".to_string(),
+ display_name: "card_number".to_string(),
+ field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
- "billing.address.city".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.city".to_string(),
- display_name: "city".to_string(),
- field_type: enums::FieldType::UserAddressCity,
+ 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,
}
),
(
- "billing.address.zip".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.zip".to_string(),
- display_name: "zip".to_string(),
- field_type: enums::FieldType::UserAddressPincode,
+ 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,
}
),
(
- "billing.address.country".to_string(),
+ "payment_method_data.card.card_cvc".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![
- "ALL".to_string(),
- ]
- },
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
)
@@ -1396,11 +1446,10 @@ impl Default for super::settings::RequiredFields {
}
),
(
- enums::Connector::Nexinets,
+ enums::Connector::Fiserv,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::new(),
- common: HashMap::from(
+ non_mandate: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1440,10 +1489,11 @@ impl Default for super::settings::RequiredFields {
)
]
),
+ common: HashMap::new(),
}
),
(
- enums::Connector::Nmi,
+ enums::Connector::Forte,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from(
@@ -1488,7 +1538,7 @@ impl Default for super::settings::RequiredFields {
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -1497,31 +1547,66 @@ impl Default for super::settings::RequiredFields {
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
),
- (
- "billing.address.zip".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.zip".to_string(),
- display_name: "billing_zip".to_string(),
- field_type: enums::FieldType::UserAddressPincode,
- value: None,
- }
- ),
]
),
- common: HashMap::new(),
+ common:HashMap::new(),
}
),
(
- enums::Connector::Noon,
+ enums::Connector::Globalpay,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
- common: HashMap::from(
+ common: 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,
+ }
+ )
+ ]),
+ }
+ ),
+ (
+ enums::Connector::Helcim,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1563,7 +1648,7 @@ impl Default for super::settings::RequiredFields {
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -1572,21 +1657,47 @@ impl Default for super::settings::RequiredFields {
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
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.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,
+ }
+ ),
]
),
+ common: HashMap::new(),
}
),
(
- enums::Connector::Payme,
+ enums::Connector::Iatapay,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
- common: HashMap::from(
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Mollie,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1624,20 +1735,11 @@ impl Default for super::settings::RequiredFields {
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: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -1653,13 +1755,15 @@ impl Default for super::settings::RequiredFields {
),
]
),
+ common: HashMap::new(),
}
),
(
- enums::Connector::Paypal,
+ enums::Connector::Multisafepay,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate:HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1696,25 +1800,92 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- )
- ]
- ),
- common: HashMap::new(),
- }
- ),
- (
- enums::Connector::Payu,
- RequiredFieldFinal {
- mandate: HashMap::new(),
- non_mandate: HashMap::from(
- [
+ ),
(
- "payment_method_data.card.card_number".to_string(),
+ "billing.address.first_name".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,
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ 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![
+ "ALL".to_string(),
+ ]
+ },
+ value: None,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Nexinets,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
}
),
(
@@ -1746,11 +1917,10 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new(),
}
),
(
- enums::Connector::Powertranz,
+ enums::Connector::Nmi,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from(
@@ -1795,7 +1965,7 @@ impl Default for super::settings::RequiredFields {
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -1804,21 +1974,31 @@ impl Default for super::settings::RequiredFields {
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
),
+ (
+ "billing.address.zip".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.zip".to_string(),
+ display_name: "billing_zip".to_string(),
+ field_type: enums::FieldType::UserAddressPincode,
+ value: None,
+ }
+ ),
]
),
common: HashMap::new(),
}
),
(
- enums::Connector::Rapyd,
+ enums::Connector::Noon,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1876,14 +2056,14 @@ impl Default for super::settings::RequiredFields {
),
]
),
- common: HashMap::new(),
}
),
(
- enums::Connector::Shift4,
+ enums::Connector::Nuvei,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1923,13 +2103,14 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new(),
}
- ),(
- enums::Connector::Stax,
+ ),
+ (
+ enums::Connector::Payme,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -1967,11 +2148,20 @@ impl Default for super::settings::RequiredFields {
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: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -1987,15 +2177,60 @@ impl Default for super::settings::RequiredFields {
),
]
),
+ }
+ ),
+ (
+ enums::Connector::Paypal,
+ 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,
+ }
+ )
+ ]
+ ),
common: HashMap::new(),
}
),
(
- enums::Connector::Stripe,
+ enums::Connector::Payu,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::new(),
- common:HashMap::from(
+ non_mandate: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2035,10 +2270,11 @@ impl Default for super::settings::RequiredFields {
)
]
),
+ common: HashMap::new(),
}
),
(
- enums::Connector::Trustpay,
+ enums::Connector::Powertranz,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from(
@@ -2097,53 +2333,78 @@ impl Default for super::settings::RequiredFields {
value: None,
}
),
+ ]
+ ),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Rapyd,
+ 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,
+ }
+ ),
(
- "billing.address.line1".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.line1".to_string(),
- display_name: "line1".to_string(),
- field_type: enums::FieldType::UserAddressLine1,
+ 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,
}
),
(
- "billing.address.city".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.city".to_string(),
- display_name: "city".to_string(),
- field_type: enums::FieldType::UserAddressCity,
+ 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,
}
),
(
- "billing.address.zip".to_string(),
+ "payment_method_data.card.card_cvc".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.zip".to_string(),
- display_name: "zip".to_string(),
- field_type: enums::FieldType::UserAddressPincode,
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
),
(
- "billing.address.country".to_string(),
+ "billing.address.first_name".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![
- "ALL".to_string(),
- ]
- },
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
value: None,
}
),
]
),
- common: HashMap::new()
+ common: HashMap::new(),
}
),
(
- enums::Connector::Tsys,
+ enums::Connector::Shift4,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from(
@@ -2186,16 +2447,385 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new()
+ common: HashMap::new(),
}
),
(
- enums::Connector::Worldline,
+ enums::Connector::Square,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from([
- (
- "payment_method_data.card.card_number".to_string(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Stax,
+ 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,
+ }
+ ),
+ (
+ "billing.address.first_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ ]
+ ),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Stripe,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Trustpay,
+ 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,
+ }
+ ),
+ (
+ "billing.address.first_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ 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.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![
+ "ALL".to_string(),
+ ]
+ },
+ value: None,
+ }
+ ),
+ ]
+ ),
+ common: HashMap::new()
+ }
+ ),
+ (
+ enums::Connector::Tsys,
+ 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,
+ }
+ )
+ ]
+ ),
+ common: HashMap::new()
+ }
+ ),
+ (
+ enums::Connector::Worldline,
+ 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,
+ }
+ ),
+ (
+ "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![
+ "ALL".to_string(),
+ ]
+ },
+ value: None,
+ }
+ )
+ ]),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Worldpay,
+ 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(),
@@ -2220,123 +2850,459 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardExpiryYear,
value: None,
}
+ )
+ ]),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Zen,
+ 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_cvc".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.card.card_cvc".to_string(),
- display_name: "card_cvc".to_string(),
- field_type: enums::FieldType::UserCardCvc,
+ 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,
}
),
(
- "billing.address.country".to_string(),
+ "payment_method_data.card.card_exp_year".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![
- "ALL".to_string(),
- ]
- },
+ 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,
}
- )
+ ),
+ (
+ "email".to_string(),
+ RequiredFieldInfo {
+ required_field: "email".to_string(),
+ display_name: "email".to_string(),
+ field_type: enums::FieldType::UserEmailAddress,
+ value: None,
+ }
+ ),
]),
common: HashMap::new(),
}
),
+ ]),
+ },
+ ),
+ (
+ enums::PaymentMethodType::Credit,
+ ConnectorFields {
+ fields: HashMap::from([
+ (
+ enums::Connector::Aci,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ ),
+ (
+ "billing.address.first_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Adyen,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Airwallex,
+ 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,
+ }
+ )
+ ]
+ ),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Authorizedotnet,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
(
- enums::Connector::Worldpay,
+ enums::Connector::Bambora,
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,
- }
- )
- ]),
+ 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,
+ }
+ ),
+ (
+ "billing.address.first_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ ]
+ ),
common: HashMap::new(),
}
),
(
- enums::Connector::Zen,
+ 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,
- }
- ),
- (
- "email".to_string(),
- RequiredFieldInfo {
- required_field: "email".to_string(),
- display_name: "email".to_string(),
- field_type: enums::FieldType::UserEmailAddress,
- value: None,
- }
- ),
- ]),
- common: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ ),
+ (
+ "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: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ 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.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,
+ }
+ ),
+ (
+ "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![
+ "ALL".to_string(),
+ ]
+ },
+ 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,
+ }
+ ),
+ ]
+ ),
}
),
- ]),
- },
- ),
- (
- enums::PaymentMethodType::Credit,
- ConnectorFields {
- fields: HashMap::from([
(
- enums::Connector::Aci,
+ enums::Connector::Billwerk,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
@@ -2377,35 +3343,16 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
+ )
]
),
}
),
(
- enums::Connector::Adyen,
+ enums::Connector::Bluesnap,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::new(),
- common: HashMap::from(
+ non_mandate: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2442,16 +3389,45 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
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: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
)
]
),
+ common: HashMap::new(),
}
),
(
- enums::Connector::Airwallex,
+ enums::Connector::Boku,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2491,11 +3467,10 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new(),
}
),
(
- enums::Connector::Authorizedotnet,
+ enums::Connector::Braintree,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::new(),
@@ -2542,7 +3517,7 @@ impl Default for super::settings::RequiredFields {
}
),
(
- enums::Connector::Bambora,
+ enums::Connector::Checkout,
RequiredFieldFinal {
mandate: HashMap::new(),
non_mandate: HashMap::from(
@@ -2582,35 +3557,38 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
+ )
+ ]
+ ),
+ common: HashMap::new(),
+ }
+ ),
+ (
+ enums::Connector::Coinbase,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::from(
+ [
(
"billing.address.first_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
- ),
+ )
]
),
common: HashMap::new(),
}
),
(
- enums::Connector::Bankofamerica,
+ enums::Connector::Cybersource,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate:HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2648,20 +3626,11 @@ impl Default for super::settings::RequiredFields {
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: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
+ display_name: "card_holder_name".to_string(),
field_type: enums::FieldType::UserFullName,
value: None,
}
@@ -2670,11 +3639,29 @@ impl Default for super::settings::RequiredFields {
"billing.address.last_name".to_string(),
RequiredFieldInfo {
required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "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.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.city".to_string(),
RequiredFieldInfo {
@@ -2714,26 +3701,96 @@ impl Default for super::settings::RequiredFields {
},
value: None,
}
+ )
+ ]
+ ),
+ }
+ ),
+ (
+ enums::Connector::Dlocal,
+ 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,
+ }
),
(
- "billing.address.line1".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.line1".to_string(),
- display_name: "line1".to_string(),
- field_type: enums::FieldType::UserAddressLine1,
+ 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,
+ }
+ ),
+ (
+ "billing.address.first_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.first_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
+ value: None,
+ }
+ ),
+ (
+ "billing.address.last_name".to_string(),
+ RequiredFieldInfo {
+ required_field: "payment_method_data.billing.address.last_name".to_string(),
+ display_name: "card_holder_name".to_string(),
+ field_type: enums::FieldType::UserFullName,
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![
+ "ALL".to_string(),
+ ]
+ },
+ value: None,
+ }
+ )
]
),
- common: HashMap::new(),
+ common:HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Bluesnap,
+ enums::Connector::DummyConnector1,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2770,44 +3827,66 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
+ )
+ ]
+ ),
+ }
+ ),
+ #[cfg(feature = "dummy_connector")]
+ (
+ enums::Connector::DummyConnector2,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
),
(
- "email".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "email".to_string(),
- display_name: "email".to_string(),
- field_type: enums::FieldType::UserEmailAddress,
+ 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,
}
),
(
- "billing.address.first_name".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ 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,
}
),
(
- "billing.address.last_name".to_string(),
+ "payment_method_data.card.card_cvc".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
)
]
),
- common: HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Checkout,
+ enums::Connector::DummyConnector3,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2847,34 +3926,15 @@ impl Default for super::settings::RequiredFields {
)
]
),
- common: HashMap::new(),
- }
- ),
- (
- enums::Connector::Coinbase,
- RequiredFieldFinal {
- mandate: HashMap::new(),
- non_mandate: HashMap::from(
- [
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- )
- ]
- ),
- common: HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Cybersource,
+ enums::Connector::DummyConnector4,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -2911,93 +3971,114 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
+ )
+ ]
+ ),
+ }
+ ),
+ #[cfg(feature = "dummy_connector")]
+ (
+ enums::Connector::DummyConnector5,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
+ [
(
- "billing.address.first_name".to_string(),
+ "payment_method_data.card.card_number".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ required_field: "payment_method_data.card.card_number".to_string(),
+ display_name: "card_number".to_string(),
+ field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
- "billing.address.last_name".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
+ 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,
}
),
(
- "email".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "email".to_string(),
- display_name: "email".to_string(),
- field_type: enums::FieldType::UserEmailAddress,
+ 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,
}
),
(
- "billing.address.line1".to_string(),
+ "payment_method_data.card.card_cvc".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.line1".to_string(),
- display_name: "line1".to_string(),
- field_type: enums::FieldType::UserAddressLine1,
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
+ )
+ ]
+ ),
+ }
+ ),
+ #[cfg(feature = "dummy_connector")]
+ (
+ enums::Connector::DummyConnector6,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
+ [
(
- "billing.address.city".to_string(),
+ "payment_method_data.card.card_number".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.city".to_string(),
- display_name: "city".to_string(),
- field_type: enums::FieldType::UserAddressCity,
+ required_field: "payment_method_data.card.card_number".to_string(),
+ display_name: "card_number".to_string(),
+ field_type: enums::FieldType::UserCardNumber,
value: None,
}
),
(
- "billing.address.state".to_string(),
+ "payment_method_data.card.card_exp_month".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.state".to_string(),
- display_name: "state".to_string(),
- field_type: enums::FieldType::UserAddressState,
+ 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,
}
),
(
- "billing.address.zip".to_string(),
+ "payment_method_data.card.card_exp_year".to_string(),
RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.zip".to_string(),
- display_name: "zip".to_string(),
- field_type: enums::FieldType::UserAddressPincode,
+ 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,
}
),
(
- "billing.address.country".to_string(),
+ "payment_method_data.card.card_cvc".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![
- "ALL".to_string(),
- ]
- },
+ required_field: "payment_method_data.card.card_cvc".to_string(),
+ display_name: "card_cvc".to_string(),
+ field_type: enums::FieldType::UserCardCvc,
value: None,
}
)
]
),
- common:HashMap::new(),
}
),
+ #[cfg(feature = "dummy_connector")]
(
- enums::Connector::Dlocal,
+ enums::Connector::DummyConnector7,
RequiredFieldFinal {
mandate: HashMap::new(),
- non_mandate: HashMap::from(
+ non_mandate: HashMap::new(),
+ common: HashMap::from(
[
(
"payment_method_data.card.card_number".to_string(),
@@ -3034,41 +4115,9 @@ impl Default for super::settings::RequiredFields {
field_type: enums::FieldType::UserCardCvc,
value: None,
}
- ),
- (
- "billing.address.first_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.first_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- value: None,
- }
- ),
- (
- "billing.address.last_name".to_string(),
- RequiredFieldInfo {
- required_field: "payment_method_data.billing.address.last_name".to_string(),
- display_name: "card_holder_name".to_string(),
- field_type: enums::FieldType::UserFullName,
- 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![
- "ALL".to_string(),
- ]
- },
- value: None,
- }
)
]
),
- common:HashMap::new(),
}
),
(
@@ -3684,6 +4733,53 @@ impl Default for super::settings::RequiredFields {
),
}
),
+ (
+ enums::Connector::Nuvei,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
(
enums::Connector::Payme,
RequiredFieldFinal {
@@ -4028,7 +5124,55 @@ impl Default for super::settings::RequiredFields {
),
common: HashMap::new(),
}
- ),(
+ ),
+ (
+ enums::Connector::Square,
+ RequiredFieldFinal {
+ mandate: HashMap::new(),
+ non_mandate: HashMap::new(),
+ common: 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,
+ }
+ )
+ ]
+ ),
+ }
+ ),
+ (
enums::Connector::Stax,
RequiredFieldFinal {
mandate: HashMap::new(),