refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name (#6859)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com>
This commit is contained in:
Sahkal Poddar
2025-01-20 17:32:05 +05:30
committed by GitHub
parent 062e1d1757
commit e9fcfc4560
16 changed files with 242 additions and 152 deletions

View File

@ -1864,8 +1864,9 @@ pub struct ProfileCreate {
pub is_click_to_pay_enabled: bool,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<HashMap<String, id_type::MerchantConnectorAccountId>>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[nutype::nutype(
@ -1981,8 +1982,9 @@ pub struct ProfileCreate {
pub is_click_to_pay_enabled: bool,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<HashMap<String, id_type::MerchantConnectorAccountId>>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[cfg(feature = "v1")]
@ -2117,8 +2119,9 @@ pub struct ProfileResponse {
pub is_click_to_pay_enabled: bool,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<serde_json::Value>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[cfg(feature = "v2")]
@ -2240,8 +2243,9 @@ pub struct ProfileResponse {
pub is_click_to_pay_enabled: bool,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<serde_json::Value>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[cfg(feature = "v1")]
@ -2370,8 +2374,9 @@ pub struct ProfileUpdate {
pub is_click_to_pay_enabled: Option<bool>,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<HashMap<String, id_type::MerchantConnectorAccountId>>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[cfg(feature = "v2")]
@ -2481,8 +2486,9 @@ pub struct ProfileUpdate {
pub is_click_to_pay_enabled: Option<bool>,
/// Product authentication ids
#[schema(value_type = Option<Object>, example = r#"{ "key1": "value-1", "key2": "value-2" }"#)]
pub authentication_product_ids: Option<HashMap<String, id_type::MerchantConnectorAccountId>>,
#[schema(value_type = Option<Object>, example = r#"{ "click_to_pay": "mca_ushduqwhdohwd", "netcetera": "mca_kwqhudqwd" }"#)]
pub authentication_product_ids:
Option<common_types::payments::AuthenticationConnectorAccountMap>,
}
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]