From 8b0fd048ab92237bb07a06c7ea89a25d18e366d4 Mon Sep 17 00:00:00 2001 From: Sagnik Mitra <83326850+ImSagnik007@users.noreply.github.com> Date: Thu, 22 May 2025 15:37:52 +0530 Subject: [PATCH] fix(connector): Connector Feature Matrix Bugfix (#8047) --- crates/connector_configs/toml/development.toml | 18 ------------------ crates/connector_configs/toml/production.toml | 18 ------------------ crates/connector_configs/toml/sandbox.toml | 18 ------------------ .../src/connectors/bluesnap.rs | 2 +- .../src/connectors/fiserv.rs | 5 +++-- .../src/connectors/inespay.rs | 2 +- .../src/connectors/shift4.rs | 2 +- .../src/connectors/stax.rs | 15 ++++++--------- 8 files changed, 12 insertions(+), 68 deletions(-) diff --git a/crates/connector_configs/toml/development.toml b/crates/connector_configs/toml/development.toml index b46733d17c..3269efbe59 100644 --- a/crates/connector_configs/toml/development.toml +++ b/crates/connector_configs/toml/development.toml @@ -977,24 +977,6 @@ merchant_secret="Source verification key" payment_method_type = "CartesBancaires" [[bluesnap.credit]] payment_method_type = "UnionPay" -[[bluesnap.debit]] - payment_method_type = "Mastercard" -[[bluesnap.debit]] - payment_method_type = "Visa" -[[bluesnap.debit]] - payment_method_type = "Interac" -[[bluesnap.debit]] - payment_method_type = "AmericanExpress" -[[bluesnap.debit]] - payment_method_type = "JCB" -[[bluesnap.debit]] - payment_method_type = "DinersClub" -[[bluesnap.debit]] - payment_method_type = "Discover" -[[bluesnap.debit]] - payment_method_type = "CartesBancaires" -[[bluesnap.debit]] - payment_method_type = "UnionPay" [[bluesnap.wallet]] payment_method_type = "google_pay" [[bluesnap.wallet]] diff --git a/crates/connector_configs/toml/production.toml b/crates/connector_configs/toml/production.toml index 9900edbba8..e467ee970d 100644 --- a/crates/connector_configs/toml/production.toml +++ b/crates/connector_configs/toml/production.toml @@ -494,24 +494,6 @@ merchant_secret="Source verification key" payment_method_type = "CartesBancaires" [[bluesnap.credit]] payment_method_type = "UnionPay" -[[bluesnap.debit]] - payment_method_type = "Mastercard" -[[bluesnap.debit]] - payment_method_type = "Visa" -[[bluesnap.debit]] - payment_method_type = "Interac" -[[bluesnap.debit]] - payment_method_type = "AmericanExpress" -[[bluesnap.debit]] - payment_method_type = "JCB" -[[bluesnap.debit]] - payment_method_type = "DinersClub" -[[bluesnap.debit]] - payment_method_type = "Discover" -[[bluesnap.debit]] - payment_method_type = "CartesBancaires" -[[bluesnap.debit]] - payment_method_type = "UnionPay" [[bluesnap.wallet]] payment_method_type = "google_pay" [[bluesnap.wallet]] diff --git a/crates/connector_configs/toml/sandbox.toml b/crates/connector_configs/toml/sandbox.toml index 331c92c39b..e8cfdae9e6 100644 --- a/crates/connector_configs/toml/sandbox.toml +++ b/crates/connector_configs/toml/sandbox.toml @@ -977,24 +977,6 @@ merchant_secret="Source verification key" payment_method_type = "CartesBancaires" [[bluesnap.credit]] payment_method_type = "UnionPay" -[[bluesnap.debit]] - payment_method_type = "Mastercard" -[[bluesnap.debit]] - payment_method_type = "Visa" -[[bluesnap.debit]] - payment_method_type = "Interac" -[[bluesnap.debit]] - payment_method_type = "AmericanExpress" -[[bluesnap.debit]] - payment_method_type = "JCB" -[[bluesnap.debit]] - payment_method_type = "DinersClub" -[[bluesnap.debit]] - payment_method_type = "Discover" -[[bluesnap.debit]] - payment_method_type = "CartesBancaires" -[[bluesnap.debit]] - payment_method_type = "UnionPay" [[bluesnap.wallet]] payment_method_type = "google_pay" [[bluesnap.wallet]] diff --git a/crates/hyperswitch_connectors/src/connectors/bluesnap.rs b/crates/hyperswitch_connectors/src/connectors/bluesnap.rs index 51ecc69ea2..1a902650d7 100644 --- a/crates/hyperswitch_connectors/src/connectors/bluesnap.rs +++ b/crates/hyperswitch_connectors/src/connectors/bluesnap.rs @@ -1450,7 +1450,7 @@ static BLUESNAP_SUPPORTED_PAYMENT_METHODS: LazyLock = api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({ api_models::feature_matrix::CardSpecificFeatures { three_ds: common_enums::FeatureStatus::Supported, - no_three_ds: common_enums::FeatureStatus::NotSupported, + no_three_ds: common_enums::FeatureStatus::Supported, supported_card_networks: supported_card_network.clone(), } }), diff --git a/crates/hyperswitch_connectors/src/connectors/fiserv.rs b/crates/hyperswitch_connectors/src/connectors/fiserv.rs index 412b1148ff..123abdd076 100644 --- a/crates/hyperswitch_connectors/src/connectors/fiserv.rs +++ b/crates/hyperswitch_connectors/src/connectors/fiserv.rs @@ -814,6 +814,7 @@ static FISERV_SUPPORTED_PAYMENT_METHODS: LazyLock = Laz let supported_capture_methods = vec![ enums::CaptureMethod::Automatic, enums::CaptureMethod::SequentialAutomatic, + enums::CaptureMethod::Manual, ]; let supported_card_network = vec![ @@ -839,7 +840,7 @@ static FISERV_SUPPORTED_PAYMENT_METHODS: LazyLock = Laz api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({ api_models::feature_matrix::CardSpecificFeatures { three_ds: common_enums::FeatureStatus::NotSupported, - no_three_ds: common_enums::FeatureStatus::NotSupported, + no_three_ds: common_enums::FeatureStatus::Supported, supported_card_networks: supported_card_network.clone(), } }), @@ -858,7 +859,7 @@ static FISERV_SUPPORTED_PAYMENT_METHODS: LazyLock = Laz api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({ api_models::feature_matrix::CardSpecificFeatures { three_ds: common_enums::FeatureStatus::NotSupported, - no_three_ds: common_enums::FeatureStatus::NotSupported, + no_three_ds: common_enums::FeatureStatus::Supported, supported_card_networks: supported_card_network.clone(), } }), diff --git a/crates/hyperswitch_connectors/src/connectors/inespay.rs b/crates/hyperswitch_connectors/src/connectors/inespay.rs index 893363a035..9629614f4e 100644 --- a/crates/hyperswitch_connectors/src/connectors/inespay.rs +++ b/crates/hyperswitch_connectors/src/connectors/inespay.rs @@ -718,7 +718,7 @@ impl webhooks::IncomingWebhook for Inespay { } static INESPAY_SUPPORTED_PAYMENT_METHODS: LazyLock = LazyLock::new(|| { - let supported_capture_methods = Vec::new(); + let supported_capture_methods = vec![enums::CaptureMethod::Automatic]; let mut inespay_supported_payment_methods = SupportedPaymentMethods::new(); inespay_supported_payment_methods.add( diff --git a/crates/hyperswitch_connectors/src/connectors/shift4.rs b/crates/hyperswitch_connectors/src/connectors/shift4.rs index 7134406e07..688e51d8bb 100644 --- a/crates/hyperswitch_connectors/src/connectors/shift4.rs +++ b/crates/hyperswitch_connectors/src/connectors/shift4.rs @@ -953,7 +953,7 @@ lazy_static! { connector_type: enums::PaymentConnectorCategory::PaymentGateway, }; - static ref SHIFT4_SUPPORTED_WEBHOOK_FLOWS: Vec = vec![enums::EventClass::Payments]; + static ref SHIFT4_SUPPORTED_WEBHOOK_FLOWS: Vec = vec![enums::EventClass::Payments, enums::EventClass::Refunds]; } diff --git a/crates/hyperswitch_connectors/src/connectors/stax.rs b/crates/hyperswitch_connectors/src/connectors/stax.rs index f8675edae6..3f305529a8 100644 --- a/crates/hyperswitch_connectors/src/connectors/stax.rs +++ b/crates/hyperswitch_connectors/src/connectors/stax.rs @@ -966,8 +966,8 @@ static STAX_SUPPORTED_PAYMENT_METHODS: LazyLock = LazyL specific_features: Some( api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({ api_models::feature_matrix::CardSpecificFeatures { - three_ds: common_enums::FeatureStatus::Supported, - no_three_ds: common_enums::FeatureStatus::NotSupported, + three_ds: common_enums::FeatureStatus::NotSupported, + no_three_ds: common_enums::FeatureStatus::Supported, supported_card_networks: supported_card_network.clone(), } }), @@ -985,8 +985,8 @@ static STAX_SUPPORTED_PAYMENT_METHODS: LazyLock = LazyL specific_features: Some( api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({ api_models::feature_matrix::CardSpecificFeatures { - three_ds: common_enums::FeatureStatus::Supported, - no_three_ds: common_enums::FeatureStatus::NotSupported, + three_ds: common_enums::FeatureStatus::NotSupported, + no_three_ds: common_enums::FeatureStatus::Supported, supported_card_networks: supported_card_network.clone(), } }), @@ -1004,11 +1004,8 @@ static STAX_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo { connector_type: enums::PaymentConnectorCategory::PaymentGateway, }; -static STAX_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 3] = [ - enums::EventClass::Payments, - enums::EventClass::Refunds, - enums::EventClass::Disputes, -]; +static STAX_SUPPORTED_WEBHOOK_FLOWS: [enums::EventClass; 2] = + [enums::EventClass::Payments, enums::EventClass::Refunds]; impl ConnectorSpecifications for Stax { fn get_connector_about(&self) -> Option<&'static ConnectorInfo> {