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(router): add display_name field to connector feature api (#7121)

AkshayaFoiger50784ad1c13f
diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json
index ebfbfc3bf0..329bab6f3d 100644
--- a/api-reference-v2/openapi_spec.json
+++ b/api-reference-v2/openapi_spec.json
@@ -6471,14 +6471,14 @@
"type": "object",
"required": [
"three_ds",
- "non_three_ds",
+ "no_three_ds",
"supported_card_networks"
],
"properties": {
"three_ds": {
"$ref": "#/components/schemas/FeatureStatus"
},
- "non_three_ds": {
+ "no_three_ds": {
"$ref": "#/components/schemas/FeatureStatus"
},
"supported_card_networks": {
@@ -6776,6 +6776,10 @@
"name": {
"type": "string"
},
+ "display_name": {
+ "type": "string",
+ "nullable": true
+ },
"description": {
"type": "string",
"nullable": true
diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.json
index 7132fe905c..d1bfc5dfdb 100644
--- a/api-reference/openapi_spec.json
+++ b/api-reference/openapi_spec.json
@@ -9228,14 +9228,14 @@
"type": "object",
"required": [
"three_ds",
- "non_three_ds",
+ "no_three_ds",
"supported_card_networks"
],
"properties": {
"three_ds": {
"$ref": "#/components/schemas/FeatureStatus"
},
- "non_three_ds": {
+ "no_three_ds": {
"$ref": "#/components/schemas/FeatureStatus"
},
"supported_card_networks": {
@@ -9526,6 +9526,10 @@
"name": {
"type": "string"
},
+ "display_name": {
+ "type": "string",
+ "nullable": true
+ },
"description": {
"type": "string",
"nullable": true
diff --git a/crates/api_models/src/feature_matrix.rs b/crates/api_models/src/feature_matrix.rs
index c1eb699705..caa5aed111 100644
--- a/crates/api_models/src/feature_matrix.rs
+++ b/crates/api_models/src/feature_matrix.rs
@@ -19,7 +19,7 @@ pub struct CardSpecificFeatures {
/// Indicates whether three_ds card payments are supported.
pub three_ds: FeatureStatus,
/// Indicates whether non three_ds card payments are supported.
- pub non_three_ds: FeatureStatus,
+ pub no_three_ds: FeatureStatus,
/// List of supported card networks
pub supported_card_networks: Vec<CardNetwork>,
}
@@ -47,6 +47,7 @@ pub struct SupportedPaymentMethod {
#[derive(Debug, ToSchema, Serialize)]
pub struct ConnectorFeatureMatrixResponse {
pub name: String,
+ pub display_name: Option<String>,
pub description: Option<String>,
pub category: Option<PaymentConnectorCategory>,
pub supported_payment_methods: Vec<SupportedPaymentMethod>,
diff --git a/crates/hyperswitch_connectors/src/connectors/bambora.rs b/crates/hyperswitch_connectors/src/connectors/bambora.rs
index d972e004f2..c4a9edea65 100644
--- a/crates/hyperswitch_connectors/src/connectors/bambora.rs
+++ b/crates/hyperswitch_connectors/src/connectors/bambora.rs
@@ -847,7 +847,7 @@ lazy_static! {
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
api_models::feature_matrix::CardSpecificFeatures {
three_ds: common_enums::FeatureStatus::Supported,
- non_three_ds: common_enums::FeatureStatus::Supported,
+ no_three_ds: common_enums::FeatureStatus::Supported,
supported_card_networks: supported_card_network.clone(),
}
}),
@@ -858,8 +858,8 @@ lazy_static! {
bambora_supported_payment_methods
};
static ref BAMBORA_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
- description: "Bambora is a leading online payment provider in Canada and United States."
- .to_string(),
+ display_name: "Bambora",
+ description: "Bambora is a leading online payment provider in Canada and United States.",
connector_type: enums::PaymentConnectorCategory::PaymentGateway,
};
static ref BAMBORA_SUPPORTED_WEBHOOK_FLOWS: Vec<enums::EventClass> = Vec::new();
diff --git a/crates/hyperswitch_connectors/src/connectors/deutschebank.rs b/crates/hyperswitch_connectors/src/connectors/deutschebank.rs
index 0b6b2f132e..0b92cb2538 100644
--- a/crates/hyperswitch_connectors/src/connectors/deutschebank.rs
+++ b/crates/hyperswitch_connectors/src/connectors/deutschebank.rs
@@ -1031,7 +1031,7 @@ lazy_static! {
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
api_models::feature_matrix::CardSpecificFeatures {
three_ds: common_enums::FeatureStatus::Supported,
- non_three_ds: common_enums::FeatureStatus::NotSupported,
+ no_three_ds: common_enums::FeatureStatus::NotSupported,
supported_card_networks: supported_card_network.clone(),
}
}),
@@ -1050,7 +1050,7 @@ lazy_static! {
api_models::feature_matrix::PaymentMethodSpecificFeatures::Card({
api_models::feature_matrix::CardSpecificFeatures {
three_ds: common_enums::FeatureStatus::Supported,
- non_three_ds: common_enums::FeatureStatus::NotSupported,
+ no_three_ds: common_enums::FeatureStatus::NotSupported,
supported_card_networks: supported_card_network.clone(),
}
}),
@@ -1062,9 +1062,9 @@ lazy_static! {
};
static ref DEUTSCHEBANK_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
+ display_name: "Deutsche Bank",
description:
- "Deutsche Bank is a German multinational investment bank and financial services company "
- .to_string(),
+ "Deutsche Bank is a German multinational investment bank and financial services company ",
connector_type: enums::PaymentConnectorCategory::BankAcquirer,
};
diff --git a/crates/hyperswitch_connectors/src/connectors/zsl.rs b/crates/hyperswitch_connectors/src/connectors/zsl.rs
index cf01c31b74..d7c0152b7a 100644
--- a/crates/hyperswitch_connectors/src/connectors/zsl.rs
+++ b/crates/hyperswitch_connectors/src/connectors/zsl.rs
@@ -466,9 +466,9 @@ lazy_static! {
};
static ref ZSL_CONNECTOR_INFO: ConnectorInfo = ConnectorInfo {
+ display_name: "ZSL",
description:
- "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers"
- .to_string(),
+ "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers",
connector_type: enums::PaymentConnectorCategory::PaymentGateway,
};
diff --git a/crates/hyperswitch_domain_models/src/router_response_types.rs b/crates/hyperswitch_domain_models/src/router_response_types.rs
index 4d15d715ff..5578647025 100644
--- a/crates/hyperswitch_domain_models/src/router_response_types.rs
+++ b/crates/hyperswitch_domain_models/src/router_response_types.rs
@@ -569,9 +569,10 @@ pub type SupportedPaymentMethods = HashMap<common_enums::PaymentMethod, PaymentM
#[derive(Debug, Clone)]
pub struct ConnectorInfo {
+ /// Display name of the Connector
+ pub display_name: &'static str,
/// Description of the connector.
- pub description: String,
-
+ pub description: &'static str,
/// Connector Type
pub connector_type: common_enums::PaymentConnectorCategory,
}
diff --git a/crates/router/src/routes/feature_matrix.rs b/crates/router/src/routes/feature_matrix.rs
index 66a9968021..67e447ad47 100644
--- a/crates/router/src/routes/feature_matrix.rs
+++ b/crates/router/src/routes/feature_matrix.rs
@@ -99,7 +99,8 @@ fn build_connector_feature_details(
.map(|webhook_flows| webhook_flows.to_vec());
feature_matrix::ConnectorFeatureMatrixResponse {
name: connector_name.to_uppercase(),
- description: connector_about.map(|about| about.description.clone()),
+ display_name: connector_about.map(|about| about.display_name.to_string()),
+ description: connector_about.map(|about| about.description.to_string()),
category: connector_about.map(|about| about.connector_type),
supported_webhook_flows,
supported_payment_methods,