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

fix(payment_methods): add missing required fields for Citigate (#13835)

Tushar Shuklae478235122f2
diff --git a/crates/payment_methods/src/configs/payment_connector_required_fields.rs b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
index 8ec4a6c14a..c8a52f1ea1 100644
--- a/crates/payment_methods/src/configs/payment_connector_required_fields.rs
+++ b/crates/payment_methods/src/configs/payment_connector_required_fields.rs
@@ -1887,6 +1887,32 @@ fn get_cards_required_fields() -> HashMap<Connector, RequiredFieldFinal> {
common: HashMap::new(),
},
),
+ (
+ Connector::Citigate,
+ fields(
+ vec![],
+ vec![],
+ [
+ card_basic(),
+ // `billing_address()` is exactly Citigate's address set: StreetLine1, City,
+ // PostalCode, Country and StateProvince. StateProvince is flagged `Y` in the
+ // API Card field table and is additionally called out as mandatory for
+ // `Country = "US"`, which the connector enforces at request-build time.
+ billing_address(),
+ vec![
+ // Read from the top-level `email`, falling back to the billing address.
+ RequiredField::Email,
+ // Citigate sends `Firstname`/`Surname` as fields distinct from
+ // `CardholderName`, so the cardholder name cannot stand in for them.
+ RequiredField::BillingFirstName("first_name", FieldType::UserFullName),
+ RequiredField::BillingLastName("last_name", FieldType::UserFullName),
+ // `Telephone` is `R` in the field table but mandatory for `Country = "US"`.
+ RequiredField::BillingPhone,
+ ],
+ ]
+ .concat(),
+ ),
+ ),
])
}