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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
refactor(routing): Remove backwards compatibility for the routing crate (#3015)
Amisha Prabhat78a7804b9c8b
diff --git a/crates/api_models/Cargo.toml b/crates/api_models/Cargo.tomlindex 9df13c85a8..0595bdc3e7 100644--- a/crates/api_models/Cargo.toml+++ b/crates/api_models/Cargo.toml@@ -9,17 +9,13 @@ license.workspace = true[features]default = []-business_profile_routing = []-connector_choice_bcompat = []errors = ["dep:actix-web", "dep:reqwest"]-backwards_compatibility = ["connector_choice_bcompat"]-connector_choice_mca_id = ["euclid/connector_choice_mca_id"]dummy_connector = ["euclid/dummy_connector", "common_enums/dummy_connector"]detailed_errors = []payouts = []frm = []olap = []-openapi = ["common_enums/openapi", "olap", "backwards_compatibility", "business_profile_routing", "connector_choice_mca_id", "recon", "dummy_connector", "olap"]+openapi = ["common_enums/openapi", "olap", "recon", "dummy_connector", "olap"]recon = []v2 = []diff --git a/crates/api_models/src/events/routing.rs b/crates/api_models/src/events/routing.rsindex a09735bc57..1f068678c5 100644--- a/crates/api_models/src/events/routing.rs+++ b/crates/api_models/src/events/routing.rs@@ -3,10 +3,8 @@ use common_utils::events::{ApiEventMetric, ApiEventsType};use crate::routing::{LinkedRoutingConfigRetrieveResponse, MerchantRoutingAlgorithm, ProfileDefaultRoutingConfig,RoutingAlgorithmId, RoutingConfigRequest, RoutingDictionaryRecord, RoutingKind,- RoutingPayloadWrapper,+ RoutingPayloadWrapper, RoutingRetrieveLinkQuery, RoutingRetrieveQuery,};-#[cfg(feature = "business_profile_routing")]-use crate::routing::{RoutingRetrieveLinkQuery, RoutingRetrieveQuery};impl ApiEventMetric for RoutingKind {fn get_api_event_type(&self) -> Option<ApiEventsType> {@@ -49,7 +47,6 @@ impl ApiEventMetric for ProfileDefaultRoutingConfig {}}-#[cfg(feature = "business_profile_routing")]impl ApiEventMetric for RoutingRetrieveQuery {fn get_api_event_type(&self) -> Option<ApiEventsType> {Some(ApiEventsType::Routing)@@ -62,7 +59,6 @@ impl ApiEventMetric for RoutingConfigRequest {}}-#[cfg(feature = "business_profile_routing")]impl ApiEventMetric for RoutingRetrieveLinkQuery {fn get_api_event_type(&self) -> Option<ApiEventsType> {Some(ApiEventsType::Routing)diff --git a/crates/api_models/src/routing.rs b/crates/api_models/src/routing.rsindex 66f3ff558e..4e62a5f67d 100644--- a/crates/api_models/src/routing.rs+++ b/crates/api_models/src/routing.rs@@ -45,7 +45,6 @@ pub struct ProfileDefaultRoutingConfig {pub connectors: Vec<RoutableConnectorChoice>,}-#[cfg(feature = "business_profile_routing")]#[derive(Debug, serde::Deserialize, serde::Serialize)]pub struct RoutingRetrieveQuery {pub limit: Option<u16>,@@ -54,7 +53,6 @@ pub struct RoutingRetrieveQuery {pub profile_id: Option<String>,}-#[cfg(feature = "business_profile_routing")]#[derive(Debug, serde::Deserialize, serde::Serialize)]pub struct RoutingRetrieveLinkQuery {pub profile_id: Option<String>,@@ -77,7 +75,6 @@ pub enum LinkedRoutingConfigRetrieveResponse {/// Routing Algorithm specific to merchantspub struct MerchantRoutingAlgorithm {pub id: String,- #[cfg(feature = "business_profile_routing")]pub profile_id: String,pub name: String,pub description: String,@@ -129,27 +126,17 @@ impl EuclidAnalysable for ConnectorSelection {.into_iter().map(|connector_choice| {let connector_name = connector_choice.connector.to_string();- #[cfg(not(feature = "connector_choice_mca_id"))]- let sub_label = connector_choice.sub_label.clone();- #[cfg(feature = "connector_choice_mca_id")]let mca_id = connector_choice.merchant_connector_id.clone();(euclid::frontend::dir::DirValue::Connector(Box::new(connector_choice.into())),std::collections::HashMap::from_iter([("CONNECTOR_SELECTION".to_string(),- #[cfg(feature = "connector_choice_mca_id")]serde_json::json!({"rule_name": rule_name,"connector_name": connector_name,"mca_id": mca_id,}),- #[cfg(not(feature = "connector_choice_mca_id"))]- serde_json ::json!({- "rule_name": rule_name,- "connector_name": connector_name,- "sub_label": sub_label,- }),)]),)})@@ -163,143 +150,90 @@ pub struct ConnectorVolumeSplit {pub split: u8,}-#[cfg(feature = "connector_choice_bcompat")]+/// Routable Connector chosen for a payment+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]+#[serde(from = "RoutableChoiceSerde", into = "RoutableChoiceSerde")]+pub struct RoutableConnectorChoice {+ #[serde(skip)]+ pub choice_kind: RoutableChoiceKind,+ pub connector: RoutableConnectors,+ pub merchant_connector_id: Option<String>,+}+#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]pub enum RoutableChoiceKind {OnlyConnector,FullStruct,}-#[cfg(feature = "connector_choice_bcompat")]#[derive(Debug, serde::Deserialize, serde::Serialize)]#[serde(untagged)]pub enum RoutableChoiceSerde {OnlyConnector(Box<RoutableConnectors>),FullStruct {connector: RoutableConnectors,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: Option<String>,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: Option<String>,},}-#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]-#[cfg_attr(- feature = "connector_choice_bcompat",- serde(from = "RoutableChoiceSerde"),- serde(into = "RoutableChoiceSerde")-)]-#[cfg_attr(not(feature = "connector_choice_bcompat"), derive(PartialEq, Eq))]--/// Routable Connector chosen for a payment-pub struct RoutableConnectorChoice {- #[cfg(feature = "connector_choice_bcompat")]- #[serde(skip)]- pub choice_kind: RoutableChoiceKind,- pub connector: RoutableConnectors,- #[cfg(feature = "connector_choice_mca_id")]- pub merchant_connector_id: Option<String>,- #[cfg(not(feature = "connector_choice_mca_id"))]- pub sub_label: Option<String>,-}-impl std::fmt::Display for RoutableConnectorChoice {fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {- #[cfg(feature = "connector_choice_mca_id")]let base = self.connector.to_string();- #[cfg(not(feature = "connector_choice_mca_id"))]- let base = {- let mut sub_base = self.connector.to_string();- if let Some(ref label) = self.sub_label {- sub_base.push('_');- sub_base.push_str(label);- }-- sub_base- };-write!(f, "{}", base)}}-#[cfg(feature = "connector_choice_bcompat")]-impl PartialEq for RoutableConnectorChoice {- fn eq(&self, other: &Self) -> bool {- #[cfg(not(feature = "connector_choice_mca_id"))]- {- self.connector.eq(&other.connector) && self.sub_label.eq(&other.sub_label)+impl From<RoutableConnectorChoice> for ast::ConnectorChoice {+ fn from(value: RoutableConnectorChoice) -> Self {+ Self {+ connector: value.connector,}+ }+}- #[cfg(feature = "connector_choice_mca_id")]- {- self.connector.eq(&other.connector)- && self.merchant_connector_id.eq(&other.merchant_connector_id)- }+impl PartialEq for RoutableConnectorChoice {+ fn eq(&self, other: &Self) -> bool {+ self.connector.eq(&other.connector)+ && self.merchant_connector_id.eq(&other.merchant_connector_id)}}-#[cfg(feature = "connector_choice_bcompat")]impl Eq for RoutableConnectorChoice {}-#[cfg(feature = "connector_choice_bcompat")]impl From<RoutableChoiceSerde> for RoutableConnectorChoice {fn from(value: RoutableChoiceSerde) -> Self {match value {RoutableChoiceSerde::OnlyConnector(connector) => Self {choice_kind: RoutableChoiceKind::OnlyConnector,connector: *connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: None,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,},RoutableChoiceSerde::FullStruct {connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label,} => Self {choice_kind: RoutableChoiceKind::FullStruct,connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label,},}}}-#[cfg(feature = "connector_choice_bcompat")]impl From<RoutableConnectorChoice> for RoutableChoiceSerde {fn from(value: RoutableConnectorChoice) -> Self {match value.choice_kind {RoutableChoiceKind::OnlyConnector => Self::OnlyConnector(Box::new(value.connector)),RoutableChoiceKind::FullStruct => Self::FullStruct {connector: value.connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: value.merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: value.sub_label,},}}}-impl From<RoutableConnectorChoice> for ast::ConnectorChoice {- fn from(value: RoutableConnectorChoice) -> Self {- Self {- connector: value.connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: value.sub_label,- }- }-}-#[derive(Debug, Copy, Clone, serde::Serialize, serde::Deserialize, strum::Display, ToSchema)]#[serde(rename_all = "snake_case")]#[strum(serialize_all = "snake_case")]@@ -499,7 +433,7 @@ impl RoutingAlgorithmRef {pub struct RoutingDictionaryRecord {pub id: String,- #[cfg(feature = "business_profile_routing")]+pub profile_id: String,pub name: String,pub kind: RoutingAlgorithmKind,diff --git a/crates/euclid/Cargo.toml b/crates/euclid/Cargo.tomlindex 295f032778..63c9c1508d 100644--- a/crates/euclid/Cargo.toml+++ b/crates/euclid/Cargo.toml@@ -29,7 +29,6 @@ common_utils = { version = "0.1.0", path = "../common_utils"}default = []ast_parser = ["dep:nom"]valued_jit = []-connector_choice_mca_id = []dummy_connector = []payouts = []diff --git a/crates/euclid/src/frontend/ast.rs b/crates/euclid/src/frontend/ast.rsindex ecb6aa87f2..c77736effa 100644--- a/crates/euclid/src/frontend/ast.rs+++ b/crates/euclid/src/frontend/ast.rs@@ -12,8 +12,6 @@ use crate::types::{DataType, Metadata};#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)]pub struct ConnectorChoice {pub connector: RoutableConnectors,- #[cfg(not(feature = "connector_choice_mca_id"))]- pub sub_label: Option<String>,}#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, ToSchema)]@@ -163,18 +161,16 @@ pub struct Program<O> {#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]pub struct RoutableConnectorChoice {- #[cfg(feature = "connector_choice_bcompat")]#[serde(skip)]pub choice_kind: RoutableChoiceKind,- #[cfg(feature = "connector_choice_mca_id")]+ pub connector: RoutableConnectors,pub merchant_connector_id: Option<String>,- #[cfg(not(feature = "connector_choice_mca_id"))]- pub sub_label: Option<String>,}-#[derive(Debug, Clone, Deserialize, Serialize, ToSchema)]+#[derive(Debug, Default, Clone, Deserialize, Serialize, ToSchema)]pub enum RoutableChoiceKind {OnlyConnector,+ #[default]FullStruct,}diff --git a/crates/euclid/src/frontend/dir.rs b/crates/euclid/src/frontend/dir.rsindex 8cfdf65671..9a7134e708 100644--- a/crates/euclid/src/frontend/dir.rs+++ b/crates/euclid/src/frontend/dir.rs@@ -9,7 +9,6 @@ use strum::IntoEnumIterator;use crate::{enums as euclid_enums, frontend::ast, types};#[macro_export]-#[cfg(feature = "connector_choice_mca_id")]macro_rules! dirval {(Connector = $name:ident) => {$crate::frontend::dir::DirValue::Connector(Box::new(@@ -46,53 +45,6 @@ macro_rules! dirval {}};}-#[macro_export]-#[cfg(not(feature = "connector_choice_mca_id"))]-macro_rules! dirval {- (Connector = $name:ident) => {- $crate::frontend::dir::DirValue::Connector(Box::new(- $crate::frontend::ast::ConnectorChoice {- connector: $crate::enums::RoutableConnectors::$name,- sub_label: None,- },- ))- };-- (Connector = ($name:ident, $sub_label:literal)) => {- $crate::frontend::dir::DirValue::Connector(Box::new(- $crate::frontend::ast::ConnectorChoice {- connector: $crate::enums::RoutableConnectors::$name,- sub_label: Some($sub_label.to_string()),- },- ))- };-- ($key:ident = $val:ident) => {{- pub use $crate::frontend::dir::enums::*;-- $crate::frontend::dir::DirValue::$key($key::$val)- }};-- ($key:ident = $num:literal) => {{- $crate::frontend::dir::DirValue::$key($crate::types::NumValue {- number: common_utils::types::MinorUnit::new($num),- refinement: None,- })- }};-- ($key:ident s= $str:literal) => {{- $crate::frontend::dir::DirValue::$key($crate::types::StrValue {- value: $str.to_string(),- })- }};- ($key:literal = $str:literal) => {{- $crate::frontend::dir::DirValue::MetaData($crate::types::MetadataValue {- key: $key.to_string(),- value: $str.to_string(),- })- }};-}-#[derive(Debug, Clone, Hash, PartialEq, Eq, serde::Serialize)]pub struct DirKey {pub kind: DirKeyKind,@@ -482,11 +434,7 @@ impl DirKeyKind {Self::Connector => Some(common_enums::RoutableConnectors::iter().map(|connector| {- DirValue::Connector(Box::new(ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- }))+ DirValue::Connector(Box::new(ast::ConnectorChoice { connector }))}).collect(),),diff --git a/crates/euclid_wasm/Cargo.toml b/crates/euclid_wasm/Cargo.tomlindex 293940f27c..be8f61240d 100644--- a/crates/euclid_wasm/Cargo.toml+++ b/crates/euclid_wasm/Cargo.toml@@ -11,10 +11,8 @@ license.workspace = truecrate-type = ["cdylib"][features]-default = ["connector_choice_bcompat", "payouts", "connector_choice_mca_id"]-release = ["connector_choice_bcompat", "connector_choice_mca_id", "payouts"]-connector_choice_bcompat = ["api_models/connector_choice_bcompat"]-connector_choice_mca_id = ["api_models/connector_choice_mca_id", "euclid/connector_choice_mca_id", "kgraph_utils/connector_choice_mca_id"]+default = ["payouts"]+release = ["payouts"]dummy_connector = ["kgraph_utils/dummy_connector", "connector_configs/dummy_connector"]production = ["connector_configs/production"]development = ["connector_configs/development"]diff --git a/crates/euclid_wasm/src/lib.rs b/crates/euclid_wasm/src/lib.rsindex 031440ae54..eed5c38af9 100644--- a/crates/euclid_wasm/src/lib.rs+++ b/crates/euclid_wasm/src/lib.rs@@ -84,8 +84,6 @@ pub fn seed_knowledge_graph(mcas: JsValue) -> JsResult {.map(|mca| {Ok::<_, strum::ParseError>(ast::ConnectorChoice {connector: RoutableConnectors::from_str(&mca.connector_name)?,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: mca.business_sub_label.clone(),})}).collect::<Result<_, _>>()diff --git a/crates/kgraph_utils/Cargo.toml b/crates/kgraph_utils/Cargo.tomlindex 7528461dbc..6172e75629 100644--- a/crates/kgraph_utils/Cargo.toml+++ b/crates/kgraph_utils/Cargo.toml@@ -8,7 +8,7 @@ license.workspace = true[features]dummy_connector = ["api_models/dummy_connector", "euclid/dummy_connector"]-connector_choice_mca_id = ["api_models/connector_choice_mca_id", "euclid/connector_choice_mca_id"]+[dependencies]api_models = { version = "0.1.0", path = "../api_models", package = "api_models" }diff --git a/crates/kgraph_utils/src/mca.rs b/crates/kgraph_utils/src/mca.rsindex 5b31a6be64..a636c4b3a2 100644--- a/crates/kgraph_utils/src/mca.rs+++ b/crates/kgraph_utils/src/mca.rs@@ -651,11 +651,7 @@ fn compile_merchant_connector_graph(None,).map_err(KgraphError::GraphConstructionError)?;- let connector_dir_val = dir::DirValue::Connector(Box::new(ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: mca.business_sub_label.clone(),- }));+ let connector_dir_val = dir::DirValue::Connector(Box::new(ast::ConnectorChoice { connector }));let connector_info = "Connector";let connector_node_id =diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.tomlindex 1212869600..438e0dc323 100644--- a/crates/router/Cargo.toml+++ b/crates/router/Cargo.toml@@ -9,24 +9,20 @@ readme = "README.md"license.workspace = true[features]-default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "payout_retry", "business_profile_routing", "connector_choice_mca_id", "profile_specific_fallback_routing", "retry", "frm", "tls"]+default = ["kv_store", "stripe", "oltp", "olap", "accounts_cache", "dummy_connector", "payouts", "payout_retry", "retry", "frm", "tls"]tls = ["actix-web/rustls-0_22"]keymanager_mtls = ["reqwest/rustls-tls","common_utils/keymanager_mtls"]email = ["external_services/email", "scheduler/email", "olap"]keymanager_create = []frm = ["api_models/frm", "hyperswitch_domain_models/frm"]stripe = ["dep:serde_qs"]-release = ["stripe", "email", "backwards_compatibility", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing", "vergen", "recon", "external_services/aws_kms", "external_services/aws_s3","keymanager_mtls","keymanager_create"]+release = ["stripe", "email", "accounts_cache", "kv_store", "vergen", "recon", "external_services/aws_kms", "external_services/aws_s3","keymanager_mtls","keymanager_create"]olap = ["hyperswitch_domain_models/olap", "storage_impl/olap", "scheduler/olap", "api_models/olap", "dep:analytics"]oltp = ["storage_impl/oltp"]kv_store = ["scheduler/kv_store"]accounts_cache = []vergen = ["router_env/vergen"]-backwards_compatibility = ["api_models/backwards_compatibility"]-business_profile_routing = ["api_models/business_profile_routing"]-profile_specific_fallback_routing = []dummy_connector = ["api_models/dummy_connector", "euclid/dummy_connector", "kgraph_utils/dummy_connector"]-connector_choice_mca_id = ["api_models/connector_choice_mca_id", "euclid/connector_choice_mca_id", "kgraph_utils/connector_choice_mca_id"]external_access_dc = ["dummy_connector"]detailed_errors = ["api_models/detailed_errors", "error-stack/serde"]payouts = ["api_models/payouts", "common_enums/payouts", "hyperswitch_domain_models/payouts", "storage_impl/payouts"]diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rsindex 62cf9416b2..c061931256 100644--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs@@ -293,13 +293,9 @@ impl TryFrom<StripePaymentIntentRequest> for payments::PaymentsRequest {.map(|connector| {api_models::routing::RoutingAlgorithm::Single(Box::new(api_models::routing::RoutableConnectorChoice {- #[cfg(feature = "backwards_compatibility")]choice_kind: api_models::routing::RoutableChoiceKind::FullStruct,connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: None,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,},))})diff --git a/crates/router/src/compatibility/stripe/setup_intents/types.rs b/crates/router/src/compatibility/stripe/setup_intents/types.rsindex b5408f600b..66c35637de 100644--- a/crates/router/src/compatibility/stripe/setup_intents/types.rs+++ b/crates/router/src/compatibility/stripe/setup_intents/types.rs@@ -189,13 +189,9 @@ impl TryFrom<StripeSetupIntentRequest> for payments::PaymentsRequest {.map(|connector| {api_models::routing::RoutingAlgorithm::Single(Box::new(api_models::routing::RoutableConnectorChoice {- #[cfg(feature = "backwards_compatibility")]choice_kind: api_models::routing::RoutableChoiceKind::FullStruct,connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: None,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,},))})diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rsindex af6d469fd3..8a7854d658 100644--- a/crates/router/src/core/admin.rs+++ b/crates/router/src/core/admin.rs@@ -1340,13 +1340,9 @@ pub async fn create_payment_connector(if let Some(routable_connector_val) = routable_connector {let choice = routing_types::RoutableConnectorChoice {- #[cfg(feature = "backwards_compatibility")]choice_kind: routing_types::RoutableChoiceKind::FullStruct,connector: routable_connector_val,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: Some(mca.merchant_connector_id.clone()),- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: req.business_sub_label.clone(),};if !default_routing_config.contains(&choice) {diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rsindex 24cc9583d9..5a4d40ef85 100644--- a/crates/router/src/core/payment_methods/cards.rs+++ b/crates/router/src/core/payment_methods/cards.rs@@ -44,8 +44,6 @@ use super::surcharge_decision_configs::{perform_surcharge_decision_management_for_payment_method_list,perform_surcharge_decision_management_for_saved_cards,};-#[cfg(not(feature = "connector_choice_mca_id"))]-use crate::core::utils::get_connector_label;#[cfg(feature = "payouts")]use crate::types::domain::types::AsyncLift;use crate::{@@ -2577,7 +2575,6 @@ pub async fn list_payment_methods(let mut routable_choice_list = vec![];for choice in routing_choice {let routable_choice = routing_types::RoutableConnectorChoice {- #[cfg(feature = "backwards_compatibility")]choice_kind: routing_types::RoutableChoiceKind::FullStruct,connector: choice.connector@@ -2585,10 +2582,7 @@ pub async fn list_payment_methods(.to_string().parse::<api_enums::RoutableConnectors>().change_context(errors::ApiErrorResponse::InternalServerError)?,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: choice.connector.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: choice.sub_label,};routable_choice_list.push(routable_choice);}@@ -2619,22 +2613,6 @@ pub async fn list_payment_methods(.first().ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;- #[cfg(not(feature = "connector_choice_mca_id"))]- let connector_label = get_connector_label(- payment_intent.business_country,- payment_intent.business_label.as_ref(),- #[cfg(not(feature = "connector_choice_mca_id"))]- first_routable_connector.sub_label.as_ref(),- #[cfg(feature = "connector_choice_mca_id")]- None,- first_routable_connector.connector.to_string().as_str(),- );- #[cfg(not(feature = "connector_choice_mca_id"))]- let matched_mca = filtered_mcas- .iter()- .find(|m| connector_label == m.connector_label);-- #[cfg(feature = "connector_choice_mca_id")]let matched_mca = filtered_mcas.iter().find(|m| {first_routable_connector.merchant_connector_id.as_ref()== Some(&m.merchant_connector_id)@@ -3437,11 +3415,7 @@ pub async fn filter_payment_methods(connector_variant.to_string().as_str(),) {context_values.push(dir::DirValue::Connector(Box::new(- api_models::routing::ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- },+ api_models::routing::ast::ConnectorChoice { connector },)));};diff --git a/crates/router/src/core/payment_methods/utils.rs b/crates/router/src/core/payment_methods/utils.rsindex 96ed882f24..7d90a5cb6b 100644--- a/crates/router/src/core/payment_methods/utils.rs+++ b/crates/router/src/core/payment_methods/utils.rs@@ -311,11 +311,7 @@ fn construct_supported_connectors_for_update_mandate_node(.ok().map(|connector| {dir::DirValue::Connector(Box::new(- api_models::routing::ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- },+ api_models::routing::ast::ConnectorChoice { connector },))})}),@@ -336,11 +332,7 @@ fn construct_supported_connectors_for_update_mandate_node(.ok().map(|connector| {dir::DirValue::Connector(Box::new(- api_models::routing::ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- },+ api_models::routing::ast::ConnectorChoice { connector },))})}),@@ -393,11 +385,7 @@ fn construct_supported_connectors_for_update_mandate_node(.ok().map(|connector| {dir::DirValue::Connector(Box::new(- api_models::routing::ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- },+ api_models::routing::ast::ConnectorChoice { connector },))})}),@@ -468,11 +456,7 @@ fn construct_supported_connectors_for_mandate_node(.filter_map(|connector| {match api_enums::RoutableConnectors::from_str(connector.to_string().as_str()) {Ok(connector) => Some(dir::DirValue::Connector(Box::new(- api_models::routing::ast::ConnectorChoice {- connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: None,- },+ api_models::routing::ast::ConnectorChoice { connector },))),Err(_) => None,}diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rsindex c6a836f9c4..5cad096bd3 100644--- a/crates/router/src/core/payments.rs+++ b/crates/router/src/core/payments.rs@@ -3298,10 +3298,9 @@ wherelet mut routing_data = storage::RoutingData {routed_through: payment_data.payment_attempt.connector.clone(),- #[cfg(feature = "connector_choice_mca_id")]+merchant_connector_id: payment_data.payment_attempt.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- business_sub_label: payment_data.payment_attempt.business_sub_label.clone(),+algorithm: request_straight_through.clone(),routing_info: payment_data.payment_attempt@@ -3337,14 +3336,8 @@ where.attach_printable("error serializing payment routing info to serde value")?;payment_data.payment_attempt.connector = routing_data.routed_through;- #[cfg(feature = "connector_choice_mca_id")]- {- payment_data.payment_attempt.merchant_connector_id = routing_data.merchant_connector_id;- }- #[cfg(not(feature = "connector_choice_mca_id"))]- {- payment_data.payment_attempt.business_sub_label = routing_data.business_sub_label;- }++ payment_data.payment_attempt.merchant_connector_id = routing_data.merchant_connector_id;payment_data.payment_attempt.straight_through_algorithm = Some(encoded_info);Ok(decided_connector)@@ -3388,21 +3381,17 @@ where&state.conf.connectors,&mandate_connector_details.connector,api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]mandate_connector_details.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- None,).change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Invalid connector name received in 'routed_through'")?;routing_data.routed_through = Some(mandate_connector_details.connector.clone());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data- .merchant_connector_id- .clone_from(&mandate_connector_details.merchant_connector_id);- }++ routing_data+ .merchant_connector_id+ .clone_from(&mandate_connector_details.merchant_connector_id);+return Ok(ConnectorCallType::PreDetermined(connector_data));}@@ -3432,26 +3421,17 @@ where.ok_or(errors::ApiErrorResponse::IncorrectPaymentMethodConfiguration)?;routing_data.routed_through = Some(first_routable_connector.connector.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data- .merchant_connector_id- .clone_from(&first_routable_connector.merchant_connector_id);- }- #[cfg(not(feature = "connector_choice_mca_id"))]- {- routing_data.business_sub_label = first_routable_connector.sub_label.clone();- }++ routing_data+ .merchant_connector_id+ .clone_from(&first_routable_connector.merchant_connector_id);for connector_choice in routable_connector_list.clone() {let connector_data = api::ConnectorData::get_connector_by_name(&state.conf.connectors,&connector_choice.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]connector_choice.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- None,).change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("Invalid connector name received")?;@@ -3459,11 +3439,11 @@ wherepre_routing_connector_data_list.push(connector_data);}- #[cfg(all(feature = "retry", feature = "connector_choice_mca_id"))]+ #[cfg(feature = "retry")]let should_do_retry =retry::config_should_call_gsm(&*state.store, &merchant_account.merchant_id).await;- #[cfg(all(feature = "retry", feature = "connector_choice_mca_id"))]+ #[cfg(feature = "retry")]if payment_data.payment_attempt.payment_method_type== Some(storage_enums::PaymentMethodType::ApplePay)&& should_do_retry@@ -3510,19 +3490,14 @@ where.attach_printable("Failed execution of straight through routing")?;if check_eligibility {- #[cfg(feature = "business_profile_routing")]let profile_id = payment_data.payment_intent.profile_id.clone();- #[cfg(not(feature = "business_profile_routing"))]- let _profile_id: Option<String> = None;-connectors = routing::perform_eligibility_analysis_with_fallback(&state.clone(),key_store,connectors,&TransactionData::Payment(payment_data),eligible_connectors,- #[cfg(feature = "business_profile_routing")]profile_id,).await@@ -3537,10 +3512,7 @@ where&state.conf.connectors,&conn.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]conn.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- None,)}).collect::<CustomResult<Vec<_>, _>>()@@ -3567,19 +3539,14 @@ where.attach_printable("Failed execution of straight through routing")?;if check_eligibility {- #[cfg(feature = "business_profile_routing")]let profile_id = payment_data.payment_intent.profile_id.clone();- #[cfg(not(feature = "business_profile_routing"))]- let _profile_id: Option<String> = None;-connectors = routing::perform_eligibility_analysis_with_fallback(&state,key_store,connectors,&TransactionData::Payment(payment_data),eligible_connectors,- #[cfg(feature = "business_profile_routing")]profile_id,).await@@ -3594,10 +3561,7 @@ where&state.conf.connectors,&conn.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]conn.merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- None,)}).collect::<CustomResult<Vec<_>, _>>()@@ -3769,19 +3733,10 @@ pub async fn decide_multiplex_connector_for_normal_or_recurring_payment<F: Clone.attach_printable("no eligible connector found for token-based MIT payment")?;routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data- .merchant_connector_id- .clone_from(&chosen_connector_data.merchant_connector_id);- }- routing_data.routed_through = Some(chosen_connector_data.connector_name.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data- .merchant_connector_id- .clone_from(&chosen_connector_data.merchant_connector_id);- }++ routing_data+ .merchant_connector_id+ .clone_from(&chosen_connector_data.merchant_connector_id);payment_data.mandate_id = Some(payments_api::MandateIds {mandate_id: None,@@ -3800,10 +3755,8 @@ pub async fn decide_multiplex_connector_for_normal_or_recurring_payment<F: Clone.clone();routing_data.routed_through = Some(first_choice.connector_name.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data.merchant_connector_id = first_choice.merchant_connector_id;- }++ routing_data.merchant_connector_id = first_choice.merchant_connector_id;Ok(ConnectorCallType::Retryable(connectors))}@@ -3939,22 +3892,6 @@ wherelet mut final_list: Vec<api::SessionConnectorData> = Vec::new();- #[cfg(not(feature = "connector_choice_mca_id"))]- for mut connector_data in connectors {- if !routing_enabled_pms.contains(&connector_data.payment_method_type) {- final_list.push(connector_data);- } else if let Some(choice) = result.get(&connector_data.payment_method_type) {- let routing_choice = choice- .first()- .ok_or(errors::ApiErrorResponse::InternalServerError)?;- if connector_data.connector.connector_name == routing_choice.connector.connector_name {- connector_data.business_sub_label = routing_choice.sub_label.clone();- final_list.push(connector_data);- }- }- }-- #[cfg(feature = "connector_choice_mca_id")]for connector_data in connectors {if !routing_enabled_pms.contains(&connector_data.payment_method_type) {final_list.push(connector_data);@@ -3987,27 +3924,15 @@ where{#[allow(unused_variables)]let (profile_id, routing_algorithm) = match &transaction_data {- TransactionData::Payment(payment_data) => {- if cfg!(feature = "business_profile_routing") {- (- payment_data.payment_intent.profile_id.clone(),- business_profile.routing_algorithm.clone(),- )- } else {- (None, merchant_account.routing_algorithm.clone())- }- }+ TransactionData::Payment(payment_data) => (+ payment_data.payment_intent.profile_id.clone(),+ business_profile.routing_algorithm.clone(),+ ),#[cfg(feature = "payouts")]- TransactionData::Payout(payout_data) => {- if cfg!(feature = "business_profile_routing") {- (- Some(payout_data.payout_attempt.profile_id.clone()),- business_profile.payout_routing_algorithm.clone(),- )- } else {- (None, merchant_account.payout_routing_algorithm.clone())- }- }+ TransactionData::Payout(payout_data) => (+ Some(payout_data.payout_attempt.profile_id.clone()),+ business_profile.payout_routing_algorithm.clone(),+ ),};let algorithm_ref = routing_algorithm@@ -4032,7 +3957,6 @@ whereconnectors,&transaction_data,eligible_connectors,- #[cfg(feature = "business_profile_routing")]profile_id,).await@@ -4053,10 +3977,7 @@ where&state.conf.connectors,&conn.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]conn.merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- None,)}).collect::<CustomResult<Vec<_>, _>>()@@ -4080,14 +4001,7 @@ whereTransactionData::Payout(_) => {routing_data.routed_through = Some(first_connector_choice.connector.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;- }- #[cfg(not(feature = "connector_choice_mca_id"))]- {- routing_data.business_sub_label = first_connector_choice.sub_label;- }+ routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;Ok(ConnectorCallType::Retryable(connector_data))}diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rsindex 1579322995..3629457d5a 100644--- a/crates/router/src/core/payments/helpers.rs+++ b/crates/router/src/core/payments/helpers.rs@@ -4220,7 +4220,7 @@ pub fn get_applepay_metadata(})}-#[cfg(all(feature = "retry", feature = "connector_choice_mca_id"))]+#[cfg(feature = "retry")]pub async fn get_apple_pay_retryable_connectors<F>(state: &SessionState,merchant_account: &domain::MerchantAccount,diff --git a/crates/router/src/core/payments/routing.rs b/crates/router/src/core/payments/routing.rsindex d6904e09a3..0ff53c63b4 100644--- a/crates/router/src/core/payments/routing.rs+++ b/crates/router/src/core/payments/routing.rs@@ -36,8 +36,6 @@ use storage_impl::redis::cache::{CacheKey, CGRAPH_CACHE, ROUTING_CACHE};#[cfg(feature = "payouts")]use crate::core::payouts;-#[cfg(not(feature = "business_profile_routing"))]-use crate::utils::StringExt;use crate::{core::{errors, errors as oss_errors, payments as payments_oss,@@ -77,10 +75,6 @@ pub struct SessionRoutingPmTypeInput<'a> {routing_algorithm: &'a MerchantAccountRoutingAlgorithm,backend_input: dsl_inputs::BackendInput,allowed_connectors: FxHashMap<String, api::GetToken>,- #[cfg(any(- feature = "business_profile_routing",- feature = "profile_specific_fallback_routing"- ))]profile_id: Option<String>,}@@ -262,10 +256,6 @@ pub async fn perform_static_routing_v1<F: Clone>(algorithm_ref: routing_types::RoutingAlgorithmRef,transaction_data: &routing::TransactionData<'_, F>,) -> RoutingResult<Vec<routing_types::RoutableConnectorChoice>> {- #[cfg(any(- feature = "profile_specific_fallback_routing",- feature = "business_profile_routing"- ))]let profile_id = match transaction_data {routing::TransactionData::Payment(payment_data) => payment_data.payment_intent@@ -281,9 +271,6 @@ pub async fn perform_static_routing_v1<F: Clone>(} else {let fallback_config = routing_helpers::get_merchant_default_config(&*state.clone().store,- #[cfg(not(feature = "profile_specific_fallback_routing"))]- merchant_id,- #[cfg(feature = "profile_specific_fallback_routing")]profile_id,&api_enums::TransactionType::from(transaction_data),)@@ -296,7 +283,6 @@ pub async fn perform_static_routing_v1<F: Clone>(state,merchant_id,&algorithm_id,- #[cfg(feature = "business_profile_routing")]Some(profile_id).cloned(),&api_enums::TransactionType::from(transaction_data),)@@ -328,10 +314,9 @@ async fn ensure_algorithm_cached_v1(state: &SessionState,merchant_id: &str,algorithm_id: &str,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,transaction_type: &api_enums::TransactionType,) -> RoutingResult<Arc<CachedAlgorithm>> {- #[cfg(feature = "business_profile_routing")]let key = {let profile_id = profile_id.clone()@@ -349,17 +334,6 @@ async fn ensure_algorithm_cached_v1(}};- #[cfg(not(feature = "business_profile_routing"))]- let key = match transaction_type {- api_enums::TransactionType::Payment => {- format!("dsl_{merchant_id}")- }- #[cfg(feature = "payouts")]- api_enums::TransactionType::Payout => {- format!("dsl_po_{merchant_id}")- }- };-let cached_algorithm = ROUTING_CACHE.get_val::<Arc<CachedAlgorithm>>(CacheKey {key: key.clone(),@@ -370,14 +344,7 @@ async fn ensure_algorithm_cached_v1(let algorithm = if let Some(algo) = cached_algorithm {algo} else {- refresh_routing_cache_v1(- state,- key.clone(),- algorithm_id,- #[cfg(feature = "business_profile_routing")]- profile_id,- )- .await?+ refresh_routing_cache_v1(state, key.clone(), algorithm_id, profile_id).await?};Ok(algorithm)@@ -429,9 +396,8 @@ pub async fn refresh_routing_cache_v1(state: &SessionState,key: String,algorithm_id: &str,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,) -> RoutingResult<Arc<CachedAlgorithm>> {- #[cfg(feature = "business_profile_routing")]let algorithm = {let algorithm = state.store@@ -448,22 +414,6 @@ pub async fn refresh_routing_cache_v1(algorithm};- #[cfg(not(feature = "business_profile_routing"))]- let algorithm = {- let config = state- .store- .find_config_by_key(algorithm_id)- .await- .change_context(errors::RoutingError::DslMissingInDb)- .attach_printable("DSL not found in DB")?;-- let algorithm: routing_types::RoutingAlgorithm = config- .config- .parse_struct("Program")- .change_context(errors::RoutingError::DslParsingError)- .attach_printable("Error parsing routing algorithm from configs")?;- algorithm- };let cached_algorithm = match algorithm {routing_types::RoutingAlgorithm::Single(conn) => CachedAlgorithm::Single(conn),routing_types::RoutingAlgorithm::Priority(plist) => CachedAlgorithm::Priority(plist),@@ -531,12 +481,11 @@ pub fn perform_volume_split(pub async fn get_merchant_cgraph<'a>(state: &SessionState,key_store: &domain::MerchantKeyStore,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,transaction_type: &api_enums::TransactionType,) -> RoutingResult<Arc<hyperswitch_constraint_graph::ConstraintGraph<euclid_dir::DirValue>>> {let merchant_id = &key_store.merchant_id;- #[cfg(feature = "business_profile_routing")]let key = {let profile_id = profile_id.clone()@@ -551,13 +500,6 @@ pub async fn get_merchant_cgraph<'a>(}};- #[cfg(not(feature = "business_profile_routing"))]- let key = match transaction_type {- api_enums::TransactionType::Payment => format!("cgraph_{}", merchant_id),- #[cfg(feature = "payouts")]- api_enums::TransactionType::Payout => format!("cgraph_po_{}", merchant_id),- };-let cached_cgraph = CGRAPH_CACHE.get_val::<Arc<hyperswitch_constraint_graph::ConstraintGraph<euclid_dir::DirValue>>>(CacheKey {@@ -570,15 +512,7 @@ pub async fn get_merchant_cgraph<'a>(let cgraph = if let Some(graph) = cached_cgraph {graph} else {- refresh_cgraph_cache(- state,- key_store,- key.clone(),- #[cfg(feature = "business_profile_routing")]- profile_id,- transaction_type,- )- .await?+ refresh_cgraph_cache(state, key_store, key.clone(), profile_id, transaction_type).await?};Ok(cgraph)@@ -588,7 +522,7 @@ pub async fn refresh_cgraph_cache<'a>(state: &SessionState,key_store: &domain::MerchantKeyStore,key: String,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,transaction_type: &api_enums::TransactionType,) -> RoutingResult<Arc<hyperswitch_constraint_graph::ConstraintGraph<euclid_dir::DirValue>>> {let mut merchant_connector_accounts = state@@ -617,7 +551,6 @@ pub async fn refresh_cgraph_cache<'a>(}};- #[cfg(feature = "business_profile_routing")]let merchant_connector_accounts = payments_oss::helpers::filter_mca_based_on_business_profile(merchant_connector_accounts,profile_id,@@ -679,7 +612,7 @@ async fn perform_cgraph_filtering(chosen: Vec<routing_types::RoutableConnectorChoice>,backend_input: dsl_inputs::BackendInput,eligible_connectors: Option<&Vec<api_enums::RoutableConnectors>>,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,transaction_type: &api_enums::TransactionType,) -> RoutingResult<Vec<routing_types::RoutableConnectorChoice>> {let context = euclid_graph::AnalysisContext::from_dir_values(@@ -687,14 +620,7 @@ async fn perform_cgraph_filtering(.into_context().change_context(errors::RoutingError::KgraphAnalysisError)?,);- let cached_cgraph = get_merchant_cgraph(- state,- key_store,- #[cfg(feature = "business_profile_routing")]- profile_id,- transaction_type,- )- .await?;+ let cached_cgraph = get_merchant_cgraph(state, key_store, profile_id, transaction_type).await?;let mut final_selection = Vec::<routing_types::RoutableConnectorChoice>::new();for choice in chosen {@@ -730,7 +656,7 @@ pub async fn perform_eligibility_analysis<F: Clone>(chosen: Vec<routing_types::RoutableConnectorChoice>,transaction_data: &routing::TransactionData<'_, F>,eligible_connectors: Option<&Vec<api_enums::RoutableConnectors>>,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,) -> RoutingResult<Vec<routing_types::RoutableConnectorChoice>> {let backend_input = match transaction_data {routing::TransactionData::Payment(payment_data) => make_dsl_input(payment_data)?,@@ -744,7 +670,6 @@ pub async fn perform_eligibility_analysis<F: Clone>(chosen,backend_input,eligible_connectors,- #[cfg(feature = "business_profile_routing")]profile_id,&api_enums::TransactionType::from(transaction_data),)@@ -756,13 +681,10 @@ pub async fn perform_fallback_routing<F: Clone>(key_store: &domain::MerchantKeyStore,transaction_data: &routing::TransactionData<'_, F>,eligible_connectors: Option<&Vec<api_enums::RoutableConnectors>>,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,) -> RoutingResult<Vec<routing_types::RoutableConnectorChoice>> {let fallback_config = routing_helpers::get_merchant_default_config(&*state.store,- #[cfg(not(feature = "profile_specific_fallback_routing"))]- &key_store.merchant_id,- #[cfg(feature = "profile_specific_fallback_routing")]match transaction_data {routing::TransactionData::Payment(payment_data) => payment_data.payment_intent@@ -790,7 +712,6 @@ pub async fn perform_fallback_routing<F: Clone>(fallback_config,backend_input,eligible_connectors,- #[cfg(feature = "business_profile_routing")]profile_id,&api_enums::TransactionType::from(transaction_data),)@@ -803,7 +724,7 @@ pub async fn perform_eligibility_analysis_with_fallback<F: Clone>(chosen: Vec<routing_types::RoutableConnectorChoice>,transaction_data: &routing::TransactionData<'_, F>,eligible_connectors: Option<Vec<api_enums::RoutableConnectors>>,- #[cfg(feature = "business_profile_routing")] profile_id: Option<String>,+ profile_id: Option<String>,) -> RoutingResult<Vec<routing_types::RoutableConnectorChoice>> {let mut final_selection = perform_eligibility_analysis(state,@@ -811,7 +732,6 @@ pub async fn perform_eligibility_analysis_with_fallback<F: Clone>(chosen,transaction_data,eligible_connectors.as_ref(),- #[cfg(feature = "business_profile_routing")]profile_id.clone(),).await?;@@ -821,7 +741,6 @@ pub async fn perform_eligibility_analysis_with_fallback<F: Clone>(key_store,transaction_data,eligible_connectors.as_ref(),- #[cfg(feature = "business_profile_routing")]profile_id,).await;@@ -854,7 +773,6 @@ pub async fn perform_session_flow_routing(let mut pm_type_map: FxHashMap<api_enums::PaymentMethodType, FxHashMap<String, api::GetToken>> =FxHashMap::default();- #[cfg(feature = "business_profile_routing")]let routing_algorithm: MerchantAccountRoutingAlgorithm = {let profile_id = session_input.payment_intent@@ -879,18 +797,6 @@ pub async fn perform_session_flow_routing(.unwrap_or_default()};- #[cfg(not(feature = "business_profile_routing"))]- let routing_algorithm: MerchantAccountRoutingAlgorithm = {- session_input- .merchant_account- .routing_algorithm- .clone()- .map(|val| val.parse_value("MerchantAccountRoutingAlgorithm"))- .transpose()- .change_context(errors::RoutingError::InvalidRoutingAlgorithmStructure)?- .unwrap_or_default()- };-let payment_method_input = dsl_inputs::PaymentMethodInput {payment_method: None,payment_method_type: None,@@ -973,10 +879,7 @@ pub async fn perform_session_flow_routing(routing_algorithm: &routing_algorithm,backend_input: backend_input.clone(),allowed_connectors,- #[cfg(any(- feature = "business_profile_routing",- feature = "profile_specific_fallback_routing"- ))]+profile_id: session_input.payment_intent.profile_id.clone(),};let routable_connector_choice_option =@@ -992,19 +895,12 @@ pub async fn perform_session_flow_routing(&session_pm_input.state.clone().conf.connectors,&connector_name,get_token.clone(),- #[cfg(feature = "connector_choice_mca_id")]selection.merchant_connector_id,- #[cfg(not(feature = "connector_choice_mca_id"))]- None,).change_context(errors::RoutingError::InvalidConnectorName(connector_name))?;- #[cfg(not(feature = "connector_choice_mca_id"))]- let sub_label = selection.sub_label;session_routing_choice.push(routing_types::SessionRoutingChoice {connector: connector_data,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: sub_label,payment_method_type: pm_type,});}@@ -1031,7 +927,6 @@ async fn perform_session_routing_for_pm_type(&session_pm_input.state.clone(),merchant_id,algorithm_id,- #[cfg(feature = "business_profile_routing")]session_pm_input.profile_id.clone(),transaction_type,)@@ -1052,16 +947,11 @@ async fn perform_session_routing_for_pm_type(} else {routing_helpers::get_merchant_default_config(&*session_pm_input.state.clone().store,- #[cfg(not(feature = "profile_specific_fallback_routing"))]- merchant_id,- #[cfg(feature = "profile_specific_fallback_routing")]- {- session_pm_input- .profile_id- .as_ref()- .get_required_value("profile_id")- .change_context(errors::RoutingError::ProfileIdMissing)?- },+ session_pm_input+ .profile_id+ .as_ref()+ .get_required_value("profile_id")+ .change_context(errors::RoutingError::ProfileIdMissing)?,transaction_type,).await@@ -1076,7 +966,6 @@ async fn perform_session_routing_for_pm_type(chosen_connectors,session_pm_input.backend_input.clone(),None,- #[cfg(feature = "business_profile_routing")]session_pm_input.profile_id.clone(),transaction_type,)@@ -1085,16 +974,11 @@ async fn perform_session_routing_for_pm_type(if final_selection.is_empty() {let fallback = routing_helpers::get_merchant_default_config(&*session_pm_input.state.clone().store,- #[cfg(not(feature = "profile_specific_fallback_routing"))]- merchant_id,- #[cfg(feature = "profile_specific_fallback_routing")]- {- session_pm_input- .profile_id- .as_ref()- .get_required_value("profile_id")- .change_context(errors::RoutingError::ProfileIdMissing)?- },+ session_pm_input+ .profile_id+ .as_ref()+ .get_required_value("profile_id")+ .change_context(errors::RoutingError::ProfileIdMissing)?,transaction_type,).await@@ -1106,7 +990,6 @@ async fn perform_session_routing_for_pm_type(fallback,session_pm_input.backend_input.clone(),None,- #[cfg(feature = "business_profile_routing")]session_pm_input.profile_id.clone(),transaction_type,)diff --git a/crates/router/src/core/payments/routing/transformers.rs b/crates/router/src/core/payments/routing/transformers.rsindex ae779a6551..abe3fbd01b 100644--- a/crates/router/src/core/payments/routing/transformers.rs+++ b/crates/router/src/core/payments/routing/transformers.rs@@ -13,11 +13,7 @@ use crate::{impl ForeignFrom<routing_types::RoutableConnectorChoice> for dsl_ast::ConnectorChoice {fn foreign_from(from: routing_types::RoutableConnectorChoice) -> Self {Self {- // #[cfg(feature = "backwards_compatibility")]- // choice_kind: from.choice_kind.foreign_into(),connector: from.connector,- #[cfg(not(feature = "connector_choice_mca_id"))]- sub_label: from.sub_label,}}}diff --git a/crates/router/src/core/payouts.rs b/crates/router/src/core/payouts.rsindex e36036eb79..4365519aec 100644--- a/crates/router/src/core/payouts.rs+++ b/crates/router/src/core/payouts.rs@@ -112,10 +112,7 @@ pub async fn get_connector_choice(payout_data.payout_attempt.routing_info = Some(straight_through);let mut routing_data = storage::RoutingData {routed_through: connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: None,- #[cfg(not(feature = "connector_choice_mca_id"))]- business_sub_label: payout_data.payout_attempt.business_label.clone(),algorithm: Some(request_straight_through.clone()),routing_info: PaymentRoutingInfo {algorithm: None,@@ -137,10 +134,7 @@ pub async fn get_connector_choice(api::ConnectorChoice::Decide => {let mut routing_data = storage::RoutingData {routed_through: connector,- #[cfg(feature = "connector_choice_mca_id")]merchant_connector_id: None,- #[cfg(not(feature = "connector_choice_mca_id"))]- business_sub_label: payout_data.payout_attempt.business_label.clone(),algorithm: None,routing_info: PaymentRoutingInfo {algorithm: None,diff --git a/crates/router/src/core/payouts/helpers.rs b/crates/router/src/core/payouts/helpers.rsindex 5d70e00921..3ab1714320 100644--- a/crates/router/src/core/payouts/helpers.rs+++ b/crates/router/src/core/payouts/helpers.rs@@ -690,7 +690,6 @@ pub async fn decide_payout_connector(connectors,&TransactionData::<()>::Payout(payout_data),eligible_connectors,- #[cfg(feature = "business_profile_routing")]Some(payout_attempt.profile_id.clone()),).await@@ -711,10 +710,7 @@ pub async fn decide_payout_connector(&state.conf.connectors,&conn.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]payout_attempt.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- None,)}).collect::<CustomResult<Vec<_>, _>>()@@ -722,14 +718,8 @@ pub async fn decide_payout_connector(.attach_printable("Invalid connector name received")?;routing_data.routed_through = Some(first_connector_choice.connector.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;- }- #[cfg(not(feature = "connector_choice_mca_id"))]- {- routing_data.business_sub_label = first_connector_choice.sub_label.clone();- }+ routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;+routing_data.routing_info.algorithm = Some(routing_algorithm);return Ok(api::ConnectorCallType::Retryable(connector_data));}@@ -748,7 +738,6 @@ pub async fn decide_payout_connector(connectors,&TransactionData::<()>::Payout(payout_data),eligible_connectors,- #[cfg(feature = "business_profile_routing")]Some(payout_attempt.profile_id.clone()),).await@@ -771,10 +760,7 @@ pub async fn decide_payout_connector(&state.conf.connectors,&conn.connector.to_string(),api::GetToken::Connector,- #[cfg(feature = "connector_choice_mca_id")]payout_attempt.merchant_connector_id.clone(),- #[cfg(not(feature = "connector_choice_mca_id"))]- None,)}).collect::<CustomResult<Vec<_>, _>>()@@ -782,14 +768,8 @@ pub async fn decide_payout_connector(.attach_printable("Invalid connector name received")?;routing_data.routed_through = Some(first_connector_choice.connector.to_string());- #[cfg(feature = "connector_choice_mca_id")]- {- routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;- }- #[cfg(not(feature = "connector_choice_mca_id"))]- {- routing_data.business_sub_label = first_connector_choice.sub_label.clone();- }+ routing_data.merchant_connector_id = first_connector_choice.merchant_connector_id;+return Ok(api::ConnectorCallType::Retryable(connector_data));}diff --git a/crates/router/src/core/routing.rs b/crates/router/src/core/routing.rsindex c2312fe224..5f10de56e4 100644--- a/crates/router/src/core/routing.rs+++ b/crates/router/src/core/routing.rs@@ -1,42 +1,33 @@pub mod helpers;pub mod transformers;-#[cfg(feature = "business_profile_routing")]-use api_models::routing::{RoutingRetrieveLinkQuery, RoutingRetrieveQuery};use api_models::{enums,- routing::{self as routing_types, RoutingAlgorithmId},+ routing::{+ self as routing_types, RoutingAlgorithmId, RoutingRetrieveLinkQuery, RoutingRetrieveQuery,+ },};-#[cfg(not(feature = "business_profile_routing"))]-use common_utils::ext_traits::{Encode, StringExt};-#[cfg(not(feature = "business_profile_routing"))]-use diesel_models::configs;-#[cfg(feature = "business_profile_routing")]use diesel_models::routing_algorithm::RoutingAlgorithm;use error_stack::ResultExt;use rustc_hash::FxHashSet;-#[cfg(not(feature = "business_profile_routing"))]-use storage_impl::redis::cache;use super::payments;#[cfg(feature = "payouts")]use super::payouts;-#[cfg(feature = "business_profile_routing")]-use crate::types::transformers::{ForeignInto, ForeignTryFrom};use crate::{consts,core::{- errors::{RouterResponse, StorageErrorExt},+ errors::{self, RouterResponse, StorageErrorExt},metrics, utils as core_utils,},routes::SessionState,- types::domain,+ services::api as service_api,+ types::{+ domain,+ transformers::{ForeignInto, ForeignTryFrom},+ },utils::{self, OptionExt, ValueExt},};-#[cfg(not(feature = "business_profile_routing"))]-use crate::{core::errors, services::api as service_api, types::storage};-#[cfg(feature = "business_profile_routing")]-use crate::{errors, services::api as service_api};pub enum TransactionData<'a, F>where@@ -50,47 +41,29 @@ wherepub async fn retrieve_merchant_routing_dictionary(state: SessionState,merchant_account: domain::MerchantAccount,- #[cfg(feature = "business_profile_routing")] query_params: RoutingRetrieveQuery,- #[cfg(feature = "business_profile_routing")] transaction_type: &enums::TransactionType,+ query_params: RoutingRetrieveQuery,+ transaction_type: &enums::TransactionType,) -> RouterResponse<routing_types::RoutingKind> {metrics::ROUTING_MERCHANT_DICTIONARY_RETRIEVE.add(&metrics::CONTEXT, 1, &[]);- #[cfg(feature = "business_profile_routing")]- {- let routing_metadata = state- .store- .list_routing_algorithm_metadata_by_merchant_id_transaction_type(- &merchant_account.merchant_id,- transaction_type,- i64::from(query_params.limit.unwrap_or_default()),- i64::from(query_params.offset.unwrap_or_default()),- )- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- let result = routing_metadata- .into_iter()- .map(ForeignInto::foreign_into)- .collect::<Vec<_>>();-- metrics::ROUTING_MERCHANT_DICTIONARY_RETRIEVE_SUCCESS_RESPONSE.add(- &metrics::CONTEXT,- 1,- &[],- );- Ok(service_api::ApplicationResponse::Json(- routing_types::RoutingKind::RoutingAlgorithm(result),- ))- }- #[cfg(not(feature = "business_profile_routing"))]++ let routing_metadata = state+ .store+ .list_routing_algorithm_metadata_by_merchant_id_transaction_type(+ &merchant_account.merchant_id,+ transaction_type,+ i64::from(query_params.limit.unwrap_or_default()),+ i64::from(query_params.offset.unwrap_or_default()),+ )+ .await+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;+ let result = routing_metadata+ .into_iter()+ .map(ForeignInto::foreign_into)+ .collect::<Vec<_>>();+metrics::ROUTING_MERCHANT_DICTIONARY_RETRIEVE_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- #[cfg(not(feature = "business_profile_routing"))]Ok(service_api::ApplicationResponse::Json(- routing_types::RoutingKind::Config(- helpers::get_merchant_routing_dictionary(- state.store.as_ref(),- &merchant_account.merchant_id,- )- .await?,- ),+ routing_types::RoutingKind::RoutingAlgorithm(result),))}@@ -131,251 +104,121 @@ pub async fn create_routing_config(&format!("routing_{}", &merchant_account.merchant_id),);- #[cfg(feature = "business_profile_routing")]- {- let profile_id = request- .profile_id- .get_required_value("profile_id")- .change_context(errors::ApiErrorResponse::MissingRequiredField {- field_name: "profile_id",- })- .attach_printable("Profile_id not provided")?;-- core_utils::validate_and_get_business_profile(- db,- Some(&profile_id),- &merchant_account.merchant_id,- )- .await?;-- helpers::validate_connectors_in_routing_config(- db,- &key_store,- &merchant_account.merchant_id,- &profile_id,- &algorithm,- )- .await?;-- let timestamp = common_utils::date_time::now();- let algo = RoutingAlgorithm {- algorithm_id: algorithm_id.clone(),- profile_id,- merchant_id: merchant_account.merchant_id,- name: name.clone(),- description: Some(description.clone()),- kind: algorithm.get_kind().foreign_into(),- algorithm_data: serde_json::json!(algorithm),- created_at: timestamp,- modified_at: timestamp,- algorithm_for: transaction_type.to_owned(),- };- let record = db- .insert_routing_algorithm(algo)- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;-- let new_record = record.foreign_into();-- metrics::ROUTING_CREATE_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(new_record))- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let algorithm_str = algorithm- .encode_to_string_of_json()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Unable to serialize routing algorithm to string")?;-- let mut algorithm_ref: routing_types::RoutingAlgorithmRef = merchant_account- .routing_algorithm- .clone()- .map(|val| val.parse_value("RoutingAlgorithmRef"))- .transpose()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to deserialize routing algorithm ref from merchant account")?- .unwrap_or_default();- let mut merchant_dictionary =- helpers::get_merchant_routing_dictionary(db, &merchant_account.merchant_id).await?;-- utils::when(- merchant_dictionary.records.len() >= consts::MAX_ROUTING_CONFIGS_PER_MERCHANT,- || {- Err(errors::ApiErrorResponse::PreconditionFailed {- message: format!("Reached the maximum number of routing configs ({}), please delete some to create new ones", consts::MAX_ROUTING_CONFIGS_PER_MERCHANT),+ let profile_id = request+ .profile_id+ .get_required_value("profile_id")+ .change_context(errors::ApiErrorResponse::MissingRequiredField {+ field_name: "profile_id",})- },- )?;- let timestamp = common_utils::date_time::now_unix_timestamp();- let records_are_empty = merchant_dictionary.records.is_empty();-- let new_record = routing_types::RoutingDictionaryRecord {- id: algorithm_id.clone(),- name: name.clone(),- kind: algorithm.get_kind(),- description: description.clone(),- created_at: timestamp,- modified_at: timestamp,- algorithm_for: Some(*transaction_type),- };- merchant_dictionary.records.push(new_record.clone());-- let new_algorithm_config = configs::ConfigNew {- key: algorithm_id.clone(),- config: algorithm_str,- };-- db.insert_config(new_algorithm_config)- .await- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Failed to save new routing algorithm config to DB")?;+ .attach_printable("Profile_id not provided")?;- if records_are_empty {- merchant_dictionary.active_id = Some(algorithm_id.clone());- algorithm_ref.update_algorithm_id(algorithm_id);- let key =- cache::CacheKind::Routing(format!("dsl_{}", &merchant_account.merchant_id).into());+ core_utils::validate_and_get_business_profile(+ db,+ Some(&profile_id),+ &merchant_account.merchant_id,+ )+ .await?;- helpers::update_merchant_active_algorithm_ref(db, &key_store, key, algorithm_ref)- .await?;- }+ helpers::validate_connectors_in_routing_config(+ db,+ &key_store,+ &merchant_account.merchant_id,+ &profile_id,+ &algorithm,+ )+ .await?;- helpers::update_merchant_routing_dictionary(- db,- &merchant_account.merchant_id,- merchant_dictionary,- )- .await?;+ let timestamp = common_utils::date_time::now();+ let algo = RoutingAlgorithm {+ algorithm_id: algorithm_id.clone(),+ profile_id,+ merchant_id: merchant_account.merchant_id,+ name: name.clone(),+ description: Some(description.clone()),+ kind: algorithm.get_kind().foreign_into(),+ algorithm_data: serde_json::json!(algorithm),+ created_at: timestamp,+ modified_at: timestamp,+ algorithm_for: transaction_type.to_owned(),+ };+ let record = db+ .insert_routing_algorithm(algo)+ .await+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- metrics::ROUTING_CREATE_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(new_record))- }+ let new_record = record.foreign_into();++ metrics::ROUTING_CREATE_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);+ Ok(service_api::ApplicationResponse::Json(new_record))}pub async fn link_routing_config(state: SessionState,merchant_account: domain::MerchantAccount,- #[cfg(not(feature = "business_profile_routing"))] key_store: domain::MerchantKeyStore,algorithm_id: String,transaction_type: &enums::TransactionType,) -> RouterResponse<routing_types::RoutingDictionaryRecord> {metrics::ROUTING_LINK_CONFIG.add(&metrics::CONTEXT, 1, &[]);let db = state.store.as_ref();- #[cfg(feature = "business_profile_routing")]- {- let routing_algorithm = db- .find_routing_algorithm_by_algorithm_id_merchant_id(- &algorithm_id,- &merchant_account.merchant_id,- )- .await- .change_context(errors::ApiErrorResponse::ResourceIdNotFound)?;- let business_profile = core_utils::validate_and_get_business_profile(- db,- Some(&routing_algorithm.profile_id),+ let routing_algorithm = db+ .find_routing_algorithm_by_algorithm_id_merchant_id(+ &algorithm_id,&merchant_account.merchant_id,)- .await?- .get_required_value("BusinessProfile")- .change_context(errors::ApiErrorResponse::BusinessProfileNotFound {- id: routing_algorithm.profile_id.clone(),- })?;+ .await+ .change_context(errors::ApiErrorResponse::ResourceIdNotFound)?;- let mut routing_ref: routing_types::RoutingAlgorithmRef = match transaction_type {- enums::TransactionType::Payment => business_profile.routing_algorithm.clone(),- #[cfg(feature = "payouts")]- enums::TransactionType::Payout => business_profile.payout_routing_algorithm.clone(),- }+ let business_profile = core_utils::validate_and_get_business_profile(+ db,+ Some(&routing_algorithm.profile_id),+ &merchant_account.merchant_id,+ )+ .await?+ .get_required_value("BusinessProfile")+ .change_context(errors::ApiErrorResponse::BusinessProfileNotFound {+ id: routing_algorithm.profile_id.clone(),+ })?;++ let mut routing_ref: routing_types::RoutingAlgorithmRef = business_profile+ .routing_algorithm+ .clone().map(|val| val.parse_value("RoutingAlgorithmRef")).transpose().change_context(errors::ApiErrorResponse::InternalServerError).attach_printable("unable to deserialize routing algorithm ref from merchant account")?.unwrap_or_default();- utils::when(routing_algorithm.algorithm_for != *transaction_type, || {+ utils::when(routing_algorithm.algorithm_for != *transaction_type, || {+ Err(errors::ApiErrorResponse::PreconditionFailed {+ message: format!(+ "Cannot use {}'s routing algorithm for {} operation",+ routing_algorithm.algorithm_for, transaction_type+ ),+ })+ })?;++ utils::when(+ routing_ref.algorithm_id == Some(algorithm_id.clone()),+ || {Err(errors::ApiErrorResponse::PreconditionFailed {- message: format!(- "Cannot use {}'s routing algorithm for {} operation",- routing_algorithm.algorithm_for, transaction_type- ),+ message: "Algorithm is already active".to_string(),})- })?;-- utils::when(- routing_ref.algorithm_id == Some(algorithm_id.clone()),- || {- Err(errors::ApiErrorResponse::PreconditionFailed {- message: "Algorithm is already active".to_string(),- })- },- )?;-- routing_ref.update_algorithm_id(algorithm_id);- helpers::update_business_profile_active_algorithm_ref(- db,- business_profile,- routing_ref,- transaction_type,- )- .await?;-- metrics::ROUTING_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(- routing_algorithm.foreign_into(),- ))- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let mut routing_ref: routing_types::RoutingAlgorithmRef = match transaction_type {- enums::TransactionType::Payment => merchant_account.routing_algorithm.clone(),- #[cfg(feature = "payouts")]- enums::TransactionType::Payout => merchant_account.payout_routing_algorithm.clone(),- }- .map(|val| val.parse_value("RoutingAlgorithmRef"))- .transpose()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to deserialize routing algorithm ref from merchant account")?- .unwrap_or_default();-- utils::when(- routing_ref.algorithm_id == Some(algorithm_id.clone()),- || {- Err(errors::ApiErrorResponse::PreconditionFailed {- message: "Algorithm is already active".to_string(),- })- },- )?;- let mut merchant_dictionary =- helpers::get_merchant_routing_dictionary(db, &merchant_account.merchant_id).await?;-- let modified_at = common_utils::date_time::now_unix_timestamp();- let record = merchant_dictionary- .records- .iter_mut()- .find(|rec| rec.id == algorithm_id)- .ok_or(errors::ApiErrorResponse::ResourceIdNotFound)- .attach_printable("Record with given ID not found for routing config activation")?;-- record.modified_at = modified_at;- merchant_dictionary.active_id = Some(record.id.clone());- let response = record.clone();- routing_ref.update_algorithm_id(algorithm_id);- helpers::update_merchant_routing_dictionary(- db,- &merchant_account.merchant_id,- merchant_dictionary,- )- .await?;- let key =- cache::CacheKind::Routing(format!("dsl_{}", &merchant_account.merchant_id).into());- helpers::update_merchant_active_algorithm_ref(db, &key_store, key, routing_ref).await?;+ },+ )?;+ routing_ref.update_algorithm_id(algorithm_id);+ helpers::update_business_profile_active_algorithm_ref(+ db,+ business_profile,+ routing_ref,+ transaction_type,+ )+ .await?;- metrics::ROUTING_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(response))- }+ metrics::ROUTING_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);+ Ok(service_api::ApplicationResponse::Json(+ routing_algorithm.foreign_into(),+ ))}pub async fn retrieve_routing_config(@@ -385,256 +228,105 @@ pub async fn retrieve_routing_config() -> RouterResponse<routing_types::MerchantRoutingAlgorithm> {metrics::ROUTING_RETRIEVE_CONFIG.add(&metrics::CONTEXT, 1, &[]);let db = state.store.as_ref();- #[cfg(feature = "business_profile_routing")]- {- let routing_algorithm = db- .find_routing_algorithm_by_algorithm_id_merchant_id(- &algorithm_id.0,- &merchant_account.merchant_id,- )- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- core_utils::validate_and_get_business_profile(- db,- Some(&routing_algorithm.profile_id),+ let routing_algorithm = db+ .find_routing_algorithm_by_algorithm_id_merchant_id(+ &algorithm_id.0,&merchant_account.merchant_id,)- .await?- .get_required_value("BusinessProfile")- .change_context(errors::ApiErrorResponse::ResourceIdNotFound)?;-- let response = routing_types::MerchantRoutingAlgorithm::foreign_try_from(routing_algorithm)- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to parse routing algorithm")?;-- metrics::ROUTING_RETRIEVE_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(response))- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let merchant_dictionary =- helpers::get_merchant_routing_dictionary(db, &merchant_account.merchant_id).await?;+ .await+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- let record = merchant_dictionary- .records- .into_iter()- .find(|rec| rec.id == algorithm_id.0)- .ok_or(errors::ApiErrorResponse::ResourceIdNotFound)- .attach_printable("Algorithm with the given ID not found in the merchant dictionary")?;+ core_utils::validate_and_get_business_profile(+ db,+ Some(&routing_algorithm.profile_id),+ &merchant_account.merchant_id,+ )+ .await?+ .get_required_value("BusinessProfile")+ .change_context(errors::ApiErrorResponse::ResourceIdNotFound)?;- let algorithm_config = db- .find_config_by_key(&algorithm_id.0)- .await- .change_context(errors::ApiErrorResponse::ResourceIdNotFound)- .attach_printable("Routing config not found in DB")?;+ let response = routing_types::MerchantRoutingAlgorithm::foreign_try_from(routing_algorithm)+ .change_context(errors::ApiErrorResponse::InternalServerError)+ .attach_printable("unable to parse routing algorithm")?;- let algorithm: routing_types::RoutingAlgorithm = algorithm_config- .config- .parse_struct("RoutingAlgorithm")- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Error deserializing routing algorithm config")?;-- let response = routing_types::MerchantRoutingAlgorithm {- id: record.id,- name: record.name,- description: record.description,- algorithm,- created_at: record.created_at,- modified_at: record.modified_at,- algorithm_for: record- .algorithm_for- .unwrap_or(enums::TransactionType::Payment),- };-- metrics::ROUTING_RETRIEVE_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(response))- }+ metrics::ROUTING_RETRIEVE_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);+ Ok(service_api::ApplicationResponse::Json(response))}pub async fn unlink_routing_config(state: SessionState,merchant_account: domain::MerchantAccount,- #[cfg(not(feature = "business_profile_routing"))] key_store: domain::MerchantKeyStore,- #[cfg(feature = "business_profile_routing")] request: routing_types::RoutingConfigRequest,+ request: routing_types::RoutingConfigRequest,transaction_type: &enums::TransactionType,) -> RouterResponse<routing_types::RoutingDictionaryRecord> {metrics::ROUTING_UNLINK_CONFIG.add(&metrics::CONTEXT, 1, &[]);let db = state.store.as_ref();- #[cfg(feature = "business_profile_routing")]- {- let profile_id = request- .profile_id- .get_required_value("profile_id")- .change_context(errors::ApiErrorResponse::MissingRequiredField {- field_name: "profile_id",- })- .attach_printable("Profile_id not provided")?;- let business_profile = core_utils::validate_and_get_business_profile(- db,- Some(&profile_id),- &merchant_account.merchant_id,- )- .await?;- match business_profile {- Some(business_profile) => {- let routing_algo_ref: routing_types::RoutingAlgorithmRef = match transaction_type {- enums::TransactionType::Payment => business_profile.routing_algorithm.clone(),- #[cfg(feature = "payouts")]- enums::TransactionType::Payout => {- business_profile.payout_routing_algorithm.clone()- }- }- .map(|val| val.parse_value("RoutingAlgorithmRef"))- .transpose()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable(- "unable to deserialize routing algorithm ref from merchant account",- )?- .unwrap_or_default();-- let timestamp = common_utils::date_time::now_unix_timestamp();-- match routing_algo_ref.algorithm_id {- Some(algorithm_id) => {- let routing_algorithm: routing_types::RoutingAlgorithmRef =- routing_types::RoutingAlgorithmRef {- algorithm_id: None,- timestamp,- config_algo_id: routing_algo_ref.config_algo_id.clone(),- surcharge_config_algo_id: routing_algo_ref.surcharge_config_algo_id,- };-- let record = db- .find_routing_algorithm_by_profile_id_algorithm_id(- &profile_id,- &algorithm_id,- )- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- let response = record.foreign_into();- helpers::update_business_profile_active_algorithm_ref(- db,- business_profile,- routing_algorithm,- transaction_type,+ let profile_id = request+ .profile_id+ .get_required_value("profile_id")+ .change_context(errors::ApiErrorResponse::MissingRequiredField {+ field_name: "profile_id",+ })+ .attach_printable("Profile_id not provided")?;+ let business_profile = core_utils::validate_and_get_business_profile(+ db,+ Some(&profile_id),+ &merchant_account.merchant_id,+ )+ .await?;+ match business_profile {+ Some(business_profile) => {+ let routing_algo_ref: routing_types::RoutingAlgorithmRef = match transaction_type {+ enums::TransactionType::Payment => business_profile.routing_algorithm.clone(),+ #[cfg(feature = "payouts")]+ enums::TransactionType::Payout => business_profile.payout_routing_algorithm.clone(),+ }+ .map(|val| val.parse_value("RoutingAlgorithmRef"))+ .transpose()+ .change_context(errors::ApiErrorResponse::InternalServerError)+ .attach_printable("unable to deserialize routing algorithm ref from merchant account")?+ .unwrap_or_default();++ let timestamp = common_utils::date_time::now_unix_timestamp();++ match routing_algo_ref.algorithm_id {+ Some(algorithm_id) => {+ let routing_algorithm: routing_types::RoutingAlgorithmRef =+ routing_types::RoutingAlgorithmRef {+ algorithm_id: None,+ timestamp,+ config_algo_id: routing_algo_ref.config_algo_id.clone(),+ surcharge_config_algo_id: routing_algo_ref.surcharge_config_algo_id,+ };++ let record = db+ .find_routing_algorithm_by_profile_id_algorithm_id(+ &profile_id,+ &algorithm_id,)- .await?;-- metrics::ROUTING_UNLINK_CONFIG_SUCCESS_RESPONSE.add(- &metrics::CONTEXT,- 1,- &[],- );- Ok(service_api::ApplicationResponse::Json(response))- }- None => Err(errors::ApiErrorResponse::PreconditionFailed {- message: "Algorithm is already inactive".to_string(),- })?,+ .await+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;+ let response = record.foreign_into();+ helpers::update_business_profile_active_algorithm_ref(+ db,+ business_profile,+ routing_algorithm,+ transaction_type,+ )+ .await?;++ metrics::ROUTING_UNLINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);+ Ok(service_api::ApplicationResponse::Json(response))}+ None => Err(errors::ApiErrorResponse::PreconditionFailed {+ message: "Algorithm is already inactive".to_string(),+ })?,}- None => Err(errors::ApiErrorResponse::InvalidRequestData {- message: "The business_profile is not present".to_string(),- }- .into()),}- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let mut merchant_dictionary =- helpers::get_merchant_routing_dictionary(db, &merchant_account.merchant_id).await?;-- let routing_algo_ref: routing_types::RoutingAlgorithmRef = match transaction_type {- enums::TransactionType::Payment => merchant_account.routing_algorithm.clone(),- #[cfg(feature = "payouts")]- enums::TransactionType::Payout => merchant_account.payout_routing_algorithm.clone(),+ None => Err(errors::ApiErrorResponse::InvalidRequestData {+ message: "The business_profile is not present".to_string(),}- .map(|val| val.parse_value("RoutingAlgorithmRef"))- .transpose()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to deserialize routing algorithm ref from merchant account")?- .unwrap_or_default();- let timestamp = common_utils::date_time::now_unix_timestamp();-- utils::when(routing_algo_ref.algorithm_id.is_none(), || {- Err(errors::ApiErrorResponse::PreconditionFailed {- message: "Algorithm is already inactive".to_string(),- })- })?;- let routing_algorithm: routing_types::RoutingAlgorithmRef =- routing_types::RoutingAlgorithmRef {- algorithm_id: None,- timestamp,- config_algo_id: routing_algo_ref.config_algo_id.clone(),- surcharge_config_algo_id: routing_algo_ref.surcharge_config_algo_id,- };-- let active_algorithm_id = merchant_dictionary- .active_id- .or(routing_algo_ref.algorithm_id.clone())- .ok_or(errors::ApiErrorResponse::PreconditionFailed {- // When the merchant_dictionary doesn't have any active algorithm and merchant_account doesn't have any routing_algorithm configured- message: "Algorithm is already inactive".to_string(),- })?;-- let record = merchant_dictionary- .records- .iter_mut()- .find(|rec| rec.id == active_algorithm_id)- .ok_or(errors::ApiErrorResponse::ResourceIdNotFound)- .attach_printable("Record with the given ID not found for de-activation")?;-- let response = record.clone();-- merchant_dictionary.active_id = None;-- helpers::update_merchant_routing_dictionary(- db,- &merchant_account.merchant_id,- merchant_dictionary,- )- .await?;-- let ref_value = routing_algorithm- .encode_to_value()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Failed converting routing algorithm ref to json value")?;-- let merchant_account_update = storage::MerchantAccountUpdate::Update {- merchant_name: None,- merchant_details: None,- return_url: None,- webhook_details: None,- sub_merchants_enabled: None,- parent_merchant_id: None,- enable_payment_response_hash: None,- payment_response_hash_key: None,- redirect_to_merchant_with_http_post: None,- publishable_key: None,- locker_id: None,- metadata: None,- routing_algorithm: Some(ref_value),- primary_business_details: None,- intent_fulfillment_time: None,- frm_routing_algorithm: None,- payout_routing_algorithm: None,- default_profile: None,- payment_link_config: None,- pm_collect_link_config: None,- };-- db.update_specific_fields_in_merchant(- &key_store.merchant_id,- merchant_account_update,- &key_store,- )- .await- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("Failed to update routing algorithm ref in merchant account")?;-- metrics::ROUTING_UNLINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(response))+ .into()),}}@@ -710,110 +402,60 @@ pub async fn retrieve_default_routing_config(pub async fn retrieve_linked_routing_config(state: SessionState,merchant_account: domain::MerchantAccount,- #[cfg(feature = "business_profile_routing")] query_params: RoutingRetrieveLinkQuery,- #[cfg(feature = "business_profile_routing")] transaction_type: &enums::TransactionType,+ query_params: RoutingRetrieveLinkQuery,+ transaction_type: &enums::TransactionType,) -> RouterResponse<routing_types::LinkedRoutingConfigRetrieveResponse> {metrics::ROUTING_RETRIEVE_LINK_CONFIG.add(&metrics::CONTEXT, 1, &[]);let db = state.store.as_ref();- #[cfg(feature = "business_profile_routing")]- {- let business_profiles = if let Some(profile_id) = query_params.profile_id {- core_utils::validate_and_get_business_profile(- db,- Some(&profile_id),- &merchant_account.merchant_id,- )- .await?- .map(|profile| vec![profile])- .get_required_value("BusinessProfile")- .change_context(errors::ApiErrorResponse::BusinessProfileNotFound { id: profile_id })?- } else {- db.list_business_profile_by_merchant_id(&merchant_account.merchant_id)- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?- };-- let mut active_algorithms = Vec::new();-- for business_profile in business_profiles {- let routing_ref: routing_types::RoutingAlgorithmRef = match transaction_type {- enums::TransactionType::Payment => business_profile.routing_algorithm,- #[cfg(feature = "payouts")]- enums::TransactionType::Payout => business_profile.payout_routing_algorithm,- }- .clone()- .map(|val| val.parse_value("RoutingAlgorithmRef"))- .transpose()- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to deserialize routing algorithm ref from merchant account")?- .unwrap_or_default();+ let business_profiles = if let Some(profile_id) = query_params.profile_id {+ core_utils::validate_and_get_business_profile(+ db,+ Some(&profile_id),+ &merchant_account.merchant_id,+ )+ .await?+ .map(|profile| vec![profile])+ .get_required_value("BusinessProfile")+ .change_context(errors::ApiErrorResponse::BusinessProfileNotFound { id: profile_id })?+ } else {+ db.list_business_profile_by_merchant_id(&merchant_account.merchant_id)+ .await+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?+ };- if let Some(algorithm_id) = routing_ref.algorithm_id {- let record = db- .find_routing_algorithm_metadata_by_algorithm_id_profile_id(- &algorithm_id,- &business_profile.profile_id,- )- .await- .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;+ let mut active_algorithms = Vec::new();- active_algorithms.push(record.foreign_into());- }+ for business_profile in business_profiles {+ let routing_ref: routing_types::RoutingAlgorithmRef = match transaction_type {+ enums::TransactionType::Payment => business_profile.routing_algorithm,+ #[cfg(feature = "payouts")]+ enums::TransactionType::Payout => business_profile.payout_routing_algorithm,}+ .clone()+ .map(|val| val.parse_value("RoutingAlgorithmRef"))+ .transpose()+ .change_context(errors::ApiErrorResponse::InternalServerError)+ .attach_printable("unable to deserialize routing algorithm ref from merchant account")?+ .unwrap_or_default();- metrics::ROUTING_RETRIEVE_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(- routing_types::LinkedRoutingConfigRetrieveResponse::ProfileBased(active_algorithms),- ))- }- #[cfg(not(feature = "business_profile_routing"))]- {- let merchant_dictionary =- helpers::get_merchant_routing_dictionary(db, &merchant_account.merchant_id).await?;-- let algorithm = if let Some(algorithm_id) = merchant_dictionary.active_id {- let record = merchant_dictionary- .records- .into_iter()- .find(|rec| rec.id == algorithm_id)- .ok_or(errors::ApiErrorResponse::ResourceIdNotFound)- .attach_printable("record for active algorithm not found in merchant dictionary")?;-- let config = db- .find_config_by_key(&algorithm_id)+ if let Some(algorithm_id) = routing_ref.algorithm_id {+ let record = db+ .find_routing_algorithm_metadata_by_algorithm_id_profile_id(+ &algorithm_id,+ &business_profile.profile_id,+ ).await- .to_not_found_response(errors::ApiErrorResponse::InternalServerError)- .attach_printable("error finding routing config in db")?;-- let the_algorithm: routing_types::RoutingAlgorithm = config- .config- .parse_struct("RoutingAlgorithm")- .change_context(errors::ApiErrorResponse::InternalServerError)- .attach_printable("unable to parse routing algorithm")?;-- Some(routing_types::MerchantRoutingAlgorithm {- id: record.id,- name: record.name,- description: record.description,- algorithm: the_algorithm,- created_at: record.created_at,- modified_at: record.modified_at,- algorithm_for: record- .algorithm_for- .unwrap_or(enums::TransactionType::Payment),- })- } else {- None- };-- let response = routing_types::LinkedRoutingConfigRetrieveResponse::MerchantAccountBased(- routing_types::RoutingRetrieveResponse { algorithm },- );+ .to_not_found_response(errors::ApiErrorResponse::ResourceIdNotFound)?;- metrics::ROUTING_RETRIEVE_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);- Ok(service_api::ApplicationResponse::Json(response))+ active_algorithms.push(record.foreign_into());+ }}++ metrics::ROUTING_RETRIEVE_LINK_CONFIG_SUCCESS_RESPONSE.add(&metrics::CONTEXT, 1, &[]);+ Ok(service_api::ApplicationResponse::Json(+ routing_types::LinkedRoutingConfigRetrieveResponse::ProfileBased(active_algorithms),+ ))}pub async fn retrieve_default_routing_config_for_profiles(@@ -883,25 +525,17 @@ pub async fn update_default_routing_config_for_profile(})})?;- let existing_set = FxHashSet::from_iter(default_config.iter().map(|c| {- (- c.connector.to_string(),- #[cfg(feature = "connector_choice_mca_id")]- c.merchant_connector_id.as_ref(),- #[cfg(not(feature = "connector_choice_mca_id"))]- c.sub_label.as_ref(),- )- }));-- let updated_set = FxHashSet::from_iter(updated_config.iter().map(|c| {- (- c.connector.to_string(),- #[cfg(feature = "connector_choice_mca_id")]- c.merchant_connector_id.as_ref(),- #[cfg(not(feature = "connector_choice_mca_id"))]- c.sub_label.as_ref(),- )- }));+ let existing_set = FxHashSet::from_iter(+ default_config+ .iter()+ .map(|c| (c.connector.to_string(), c.merchant_connector_id.as_ref())),+ );++ let updated_set = FxHashSet::from_iter(+ updated_config+ .iter()+ .map(|c| (c.connector.to_string(), c.merchant_connector_id.as_ref())),+ );let symmetric_diff = existing_set.symmetric_difference(&updated_set)diff --git a/crates/router/src/core/routing/helpers.rs b/crates/router/src/core/routing/helpers.rsindex 0e4adbff36..d99177aa55 100644--- a/crates/router/src/core/routing/helpers.rs+++ b/crates/router/src/core/routing/helpers.rs@@ -249,14 +249,11 @@ pub async fn update_business_profile_active_algorithm_ref(let merchant_id = current_business_profile.merchant_id.clone();- #[cfg(feature = "business_profile_routing")]let profile_id = current_business_profile.profile_id.clone();- #[cfg(feature = "business_profile_routing")]+let routing_cache_key =cache::CacheKind::Routing(format!("routing_config_{merchant_id}_{profile_id}").into());- #[cfg(not(feature = "business_profile_routing"))]- let routing_cache_key = cache::CacheKind::Routing(format!("dsl_{merchant_id}").into());let (routing_algorithm, payout_routing_algorithm) = match transaction_type {storage::enums::TransactionType::Payment => (Some(ref_val), None),#[cfg(feature = "payouts")]@@ -320,7 +317,6 @@ pub async fn validate_connectors_in_routing_config(id: merchant_id.to_string(),})?;- #[cfg(feature = "connector_choice_mca_id")]let name_mca_id_set = all_mcas.iter().filter(|mca| mca.profile_id.as_deref() == Some(profile_id))@@ -333,7 +329,6 @@ pub async fn validate_connectors_in_routing_config(.map(|mca| &mca.connector_name).collect::<FxHashSet<_>>();- #[cfg(feature = "connector_choice_mca_id")]let check_connector_choice = |choice: &routing_types::RoutableConnectorChoice| {if let Some(ref mca_id) = choice.merchant_connector_id {error_stack::ensure!(@@ -361,21 +356,6 @@ pub async fn validate_connectors_in_routing_config(Ok(())};- #[cfg(not(feature = "connector_choice_mca_id"))]- let check_connector_choice = |choice: &routing_types::RoutableConnectorChoice| {- error_stack::ensure!(- name_set.contains(&choice.connector.to_string()),- errors::ApiErrorResponse::InvalidRequestData {- message: format!(- "connector with name '{}' not found for the given profile",- choice.connector,- )- }- );-- Ok(())- };-match routing_algorithm {routing_types::RoutingAlgorithm::Single(choice) => {check_connector_choice(choice)?;diff --git a/crates/router/src/core/routing/transformers.rs b/crates/router/src/core/routing/transformers.rsindex 4feca317a5..2e45605edb 100644--- a/crates/router/src/core/routing/transformers.rs+++ b/crates/router/src/core/routing/transformers.rs@@ -17,7 +17,7 @@ impl ForeignFrom<RoutingProfileMetadata> for RoutingDictionaryRecord {fn foreign_from(value: RoutingProfileMetadata) -> Self {Self {id: value.algorithm_id,- #[cfg(feature = "business_profile_routing")]+profile_id: value.profile_id,name: value.name,kind: value.kind.foreign_into(),@@ -33,7 +33,7 @@ impl ForeignFrom<RoutingAlgorithm> for RoutingDictionaryRecord {fn foreign_from(value: RoutingAlgorithm) -> Self {Self {id: value.algorithm_id,- #[cfg(feature = "business_profile_routing")]+profile_id: value.profile_id,name: value.name,kind: value.kind.foreign_into(),@@ -52,7 +52,7 @@ impl ForeignTryFrom<RoutingAlgorithm> for MerchantRoutingAlgorithm {Ok(Self {id: value.algorithm_id,name: value.name,- #[cfg(feature = "business_profile_routing")]+profile_id: value.profile_id,description: value.description.unwrap_or_default(),algorithm: valuediff --git a/crates/router/src/db/merchant_account.rs b/crates/router/src/db/merchant_account.rsindex 39d63080a4..ff3830b238 100644--- a/crates/router/src/db/merchant_account.rs+++ b/crates/router/src/db/merchant_account.rs@@ -513,7 +513,6 @@ async fn publish_and_redact_merchant_account_cache(.as_ref().map(|publishable_key| CacheKind::Accounts(publishable_key.into()));- #[cfg(feature = "business_profile_routing")]let cgraph_key = merchant_account.default_profile.as_ref().map(|profile_id| {CacheKind::CGraph(format!(@@ -525,11 +524,6 @@ async fn publish_and_redact_merchant_account_cache()});- #[cfg(not(feature = "business_profile_routing"))]- let cgraph_key = Some(CacheKind::CGraph(- format!("cgraph_{}", merchant_account.merchant_id.clone()).into(),- ));-let mut cache_keys = vec![CacheKind::Accounts(merchant_account.merchant_id.as_str().into(),)];diff --git a/crates/router/src/routes/app.rs b/crates/router/src/routes/app.rsindex b8b329a3ac..0d7d042f7a 100644--- a/crates/router/src/routes/app.rs+++ b/crates/router/src/routes/app.rs@@ -1,7 +1,7 @@use std::{collections::HashMap, sync::Arc};use actix_web::{web, Scope};-#[cfg(all(feature = "business_profile_routing", feature = "olap"))]+#[cfg(feature = "olap")]use api_models::routing::RoutingRetrieveQuery;#[cfg(feature = "olap")]use common_enums::TransactionType;@@ -569,22 +569,19 @@ impl Routing {#[allow(unused_mut)]let mut route = web::scope("/routing").app_data(web::Data::new(state.clone()))- .service(web::resource("/active").route(web::get().to(- |state, req, #[cfg(feature = "business_profile_routing")] query_params| {+ .service(+ web::resource("/active").route(web::get().to(|state, req, query_params| {cloud_routing::routing_retrieve_linked_config(state,req,- #[cfg(feature = "business_profile_routing")]query_params,- #[cfg(feature = "business_profile_routing")]&TransactionType::Payment,)- },- )))+ })),+ ).service(web::resource("").route(- #[cfg(feature = "business_profile_routing")]web::get().to(|state, req, path: web::Query<RoutingRetrieveQuery>| {cloud_routing::list_routing_configs(state,@@ -593,8 +590,6 @@ impl Routing {&TransactionType::Payment,)}),- #[cfg(not(feature = "business_profile_routing"))]- web::get().to(cloud_routing::list_routing_configs),).route(web::post().to(|state, req, payload| {cloud_routing::routing_create_config(@@ -623,17 +618,16 @@ impl Routing {)})),)- .service(web::resource("/deactivate").route(web::post().to(- |state, req, #[cfg(feature = "business_profile_routing")] payload| {+ .service(+ web::resource("/deactivate").route(web::post().to(|state, req, payload| {cloud_routing::routing_unlink_config(state,req,- #[cfg(feature = "business_profile_routing")]payload,&TransactionType::Payment,)- },- )))+ })),+ ).service(web::resource("/decision").route(web::put().to(cloud_routing::upsert_decision_manager_config))@@ -676,21 +670,16 @@ impl Routing {route = route.service(web::resource("/payouts")- .route(- #[cfg(feature = "business_profile_routing")]- web::get().to(|state, req, path: web::Query<RoutingRetrieveQuery>| {+ .route(web::get().to(+ |state, req, path: web::Query<RoutingRetrieveQuery>| {cloud_routing::list_routing_configs(state,req,- #[cfg(feature = "business_profile_routing")]path,- #[cfg(feature = "business_profile_routing")]&TransactionType::Payout,)- }),- #[cfg(not(feature = "business_profile_routing"))]- web::get().to(cloud_routing::list_routing_configs),- )+ },+ )).route(web::post().to(|state, req, payload| {cloud_routing::routing_create_config(state,@@ -701,13 +690,11 @@ impl Routing {})),).service(web::resource("/payouts/active").route(web::get().to(- |state, req, #[cfg(feature = "business_profile_routing")] query_params| {+ |state, req, query_params| {cloud_routing::routing_retrieve_linked_config(state,req,- #[cfg(feature = "business_profile_routing")]query_params,- #[cfg(feature = "business_profile_routing")]&TransactionType::Payout,)},@@ -743,11 +730,10 @@ impl Routing {)),).service(web::resource("/payouts/deactivate").route(web::post().to(- |state, req, #[cfg(feature = "business_profile_routing")] payload| {+ |state, req, payload| {cloud_routing::routing_unlink_config(state,req,- #[cfg(feature = "business_profile_routing")]payload,&TransactionType::Payout,)diff --git a/crates/router/src/routes/routing.rs b/crates/router/src/routes/routing.rsindex 74bd61765b..788acd4ba2 100644--- a/crates/router/src/routes/routing.rs+++ b/crates/router/src/routes/routing.rs@@ -3,9 +3,10 @@//! Functions that are used to perform the api level configuration, retrieval, updation//! of Routing configs.use actix_web::{web, HttpRequest, Responder};-#[cfg(feature = "business_profile_routing")]-use api_models::routing::{RoutingRetrieveLinkQuery, RoutingRetrieveQuery};-use api_models::{enums, routing as routing_types};+use api_models::{+ enums, routing as routing_types,+ routing::{RoutingRetrieveLinkQuery, RoutingRetrieveQuery},+};use router_env::{tracing::{self, instrument},Flow,@@ -16,7 +17,6 @@ use crate::{routes::AppState,services::{api as oss_api, authentication as auth, authorization::permissions::Permission},};-#[cfg(feature = "olap")]#[instrument(skip_all)]pub async fn routing_create_config(@@ -71,8 +71,6 @@ pub async fn routing_link_config(routing::link_routing_config(state,auth.merchant_account,- #[cfg(not(feature = "business_profile_routing"))]- auth.key_store,algorithm_id.0,transaction_type,)@@ -125,61 +123,34 @@ pub async fn routing_retrieve_config(pub async fn list_routing_configs(state: web::Data<AppState>,req: HttpRequest,- #[cfg(feature = "business_profile_routing")] query: web::Query<RoutingRetrieveQuery>,- #[cfg(feature = "business_profile_routing")] transaction_type: &enums::TransactionType,+ query: web::Query<RoutingRetrieveQuery>,+ transaction_type: &enums::TransactionType,) -> impl Responder {- #[cfg(feature = "business_profile_routing")]- {- let flow = Flow::RoutingRetrieveDictionary;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- query.into_inner(),- |state, auth: auth::AuthenticationData, query_params, _| {- routing::retrieve_merchant_routing_dictionary(- state,- auth.merchant_account,- query_params,- transaction_type,- )- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingRead),- req.headers(),- ),- #[cfg(feature = "release")]- &auth::JWTAuth(Permission::RoutingRead),- api_locking::LockAction::NotApplicable,- ))- .await- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let flow = Flow::RoutingRetrieveDictionary;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- (),- |state, auth: auth::AuthenticationData, _, _| {- routing::retrieve_merchant_routing_dictionary(state, auth.merchant_account)- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingRead),- req.headers(),- ),- #[cfg(feature = "release")]+ let flow = Flow::RoutingRetrieveDictionary;+ Box::pin(oss_api::server_wrap(+ flow,+ state,+ &req,+ query.into_inner(),+ |state, auth: auth::AuthenticationData, query_params, _| {+ routing::retrieve_merchant_routing_dictionary(+ state,+ auth.merchant_account,+ query_params,+ transaction_type,+ )+ },+ #[cfg(not(feature = "release"))]+ auth::auth_type(+ &auth::ApiKeyAuth,&auth::JWTAuth(Permission::RoutingRead),- api_locking::LockAction::NotApplicable,- ))- .await- }+ req.headers(),+ ),+ #[cfg(feature = "release")]+ &auth::JWTAuth(Permission::RoutingRead),+ api_locking::LockAction::NotApplicable,+ ))+ .await}#[cfg(feature = "olap")]@@ -187,68 +158,34 @@ pub async fn list_routing_configs(pub async fn routing_unlink_config(state: web::Data<AppState>,req: HttpRequest,- #[cfg(feature = "business_profile_routing")] payload: web::Json<- routing_types::RoutingConfigRequest,- >,+ payload: web::Json<routing_types::RoutingConfigRequest>,transaction_type: &enums::TransactionType,) -> impl Responder {- #[cfg(feature = "business_profile_routing")]- {- let flow = Flow::RoutingUnlinkConfig;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- payload.into_inner(),- |state, auth: auth::AuthenticationData, payload_req, _| {- routing::unlink_routing_config(- state,- auth.merchant_account,- payload_req,- transaction_type,- )- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingWrite),- req.headers(),- ),- #[cfg(feature = "release")]- &auth::JWTAuth(Permission::RoutingWrite),- api_locking::LockAction::NotApplicable,- ))- .await- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let flow = Flow::RoutingUnlinkConfig;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- (),- |state, auth: auth::AuthenticationData, _, _| {- routing::unlink_routing_config(- state,- auth.merchant_account,- auth.key_store,- transaction_type,- )- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingWrite),- req.headers(),- ),- #[cfg(feature = "release")]+ let flow = Flow::RoutingUnlinkConfig;+ Box::pin(oss_api::server_wrap(+ flow,+ state,+ &req,+ payload.into_inner(),+ |state, auth: auth::AuthenticationData, payload_req, _| {+ routing::unlink_routing_config(+ state,+ auth.merchant_account,+ payload_req,+ transaction_type,+ )+ },+ #[cfg(not(feature = "release"))]+ auth::auth_type(+ &auth::ApiKeyAuth,&auth::JWTAuth(Permission::RoutingWrite),- api_locking::LockAction::NotApplicable,- ))- .await- }+ req.headers(),+ ),+ #[cfg(feature = "release")]+ &auth::JWTAuth(Permission::RoutingWrite),+ api_locking::LockAction::NotApplicable,+ ))+ .await}#[cfg(feature = "olap")]@@ -508,62 +445,35 @@ pub async fn retrieve_decision_manager_config(pub async fn routing_retrieve_linked_config(state: web::Data<AppState>,req: HttpRequest,- #[cfg(feature = "business_profile_routing")] query: web::Query<RoutingRetrieveLinkQuery>,- #[cfg(feature = "business_profile_routing")] transaction_type: &enums::TransactionType,+ query: web::Query<RoutingRetrieveLinkQuery>,+ transaction_type: &enums::TransactionType,) -> impl Responder {- #[cfg(feature = "business_profile_routing")]- {- use crate::services::authentication::AuthenticationData;- let flow = Flow::RoutingRetrieveActiveConfig;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- query.into_inner(),- |state, auth: AuthenticationData, query_params, _| {- routing::retrieve_linked_routing_config(- state,- auth.merchant_account,- query_params,- transaction_type,- )- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingRead),- req.headers(),- ),- #[cfg(feature = "release")]- &auth::JWTAuth(Permission::RoutingRead),- api_locking::LockAction::NotApplicable,- ))- .await- }-- #[cfg(not(feature = "business_profile_routing"))]- {- let flow = Flow::RoutingRetrieveActiveConfig;- Box::pin(oss_api::server_wrap(- flow,- state,- &req,- (),- |state, auth: auth::AuthenticationData, _, _| {- routing::retrieve_linked_routing_config(state, auth.merchant_account)- },- #[cfg(not(feature = "release"))]- auth::auth_type(- &auth::ApiKeyAuth,- &auth::JWTAuth(Permission::RoutingRead),- req.headers(),- ),- #[cfg(feature = "release")]+ use crate::services::authentication::AuthenticationData;+ let flow = Flow::RoutingRetrieveActiveConfig;+ Box::pin(oss_api::server_wrap(+ flow,+ state,+ &req,+ query.into_inner(),+ |state, auth: AuthenticationData, query_params, _| {+ routing::retrieve_linked_routing_config(+ state,+ auth.merchant_account,+ query_params,+ transaction_type,+ )+ },+ #[cfg(not(feature = "release"))]+ auth::auth_type(+ &auth::ApiKeyAuth,&auth::JWTAuth(Permission::RoutingRead),- api_locking::LockAction::NotApplicable,- ))- .await- }+ req.headers(),+ ),+ #[cfg(feature = "release")]+ &auth::JWTAuth(Permission::RoutingRead),+ api_locking::LockAction::NotApplicable,+ ))+ .await}#[cfg(feature = "olap")]diff --git a/crates/router/src/types/api/routing.rs b/crates/router/src/types/api/routing.rsindex 4f982d543d..d201f57eb9 100644--- a/crates/router/src/types/api/routing.rs+++ b/crates/router/src/types/api/routing.rs@@ -1,11 +1,9 @@-#[cfg(feature = "backwards_compatibility")]-pub use api_models::routing::RoutableChoiceKind;pub use api_models::{enums as api_enums,routing::{- ConnectorVolumeSplit, RoutableConnectorChoice, RoutingAlgorithm, RoutingAlgorithmKind,- RoutingAlgorithmRef, RoutingConfigRequest, RoutingDictionary, RoutingDictionaryRecord,- StraightThroughAlgorithm,+ ConnectorVolumeSplit, RoutableChoiceKind, RoutableConnectorChoice, RoutingAlgorithm,+ RoutingAlgorithmKind, RoutingAlgorithmRef, RoutingConfigRequest, RoutingDictionary,+ RoutingDictionaryRecord, StraightThroughAlgorithm,},};@@ -13,8 +11,6 @@ use super::types::api as api_oss;pub struct SessionRoutingChoice {pub connector: api_oss::ConnectorData,- #[cfg(not(feature = "connector_choice_mca_id"))]- pub sub_label: Option<String>,pub payment_method_type: api_enums::PaymentMethodType,}diff --git a/crates/router/src/types/storage.rs b/crates/router/src/types/storage.rsindex 7713d88cb4..b124579844 100644--- a/crates/router/src/types/storage.rs+++ b/crates/router/src/types/storage.rs@@ -71,10 +71,9 @@ use crate::types::api::routing;#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]pub struct RoutingData {pub routed_through: Option<String>,- #[cfg(feature = "connector_choice_mca_id")]+pub merchant_connector_id: Option<String>,- #[cfg(not(feature = "connector_choice_mca_id"))]- pub business_sub_label: Option<String>,+pub routing_info: PaymentRoutingInfo,pub algorithm: Option<api_models::routing::StraightThroughAlgorithm>,}diff --git a/postman/collection-dir/adyen_uk/Flow Testcases/Happy Cases/Scenario22-Create Gift Card payment/Payments - Create/request.json b/postman/collection-dir/adyen_uk/Flow Testcases/Happy Cases/Scenario22-Create Gift Card payment/Payments - Create/request.jsonindex 0915e9894b..f8e5000d31 100644--- a/postman/collection-dir/adyen_uk/Flow Testcases/Happy Cases/Scenario22-Create Gift Card payment/Payments - Create/request.json+++ b/postman/collection-dir/adyen_uk/Flow Testcases/Happy Cases/Scenario22-Create Gift Card payment/Payments - Create/request.json@@ -42,10 +42,6 @@}}},- "routing": {- "type": "single",- "data": "adyen"- },"billing": {"address": {"line1": "1467",diff --git a/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payments - Create/request.jsonindex ed9dbeaa9c..8ac3ed14b0 100644--- a/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/adyen_uk/Flow Testcases/QuickStart/Payments - Create/request.json@@ -43,10 +43,6 @@"card_cvc": "7373"}},- "routing": {- "type": "single",- "data": "adyen"- },"billing": {"address": {"line1": "1467",diff --git a/postman/collection-dir/adyen_uk/Flow Testcases/Variation Cases/Scenario10-Create Gift Card payment where it fails due to insufficient balance/Payments - Create/request.json b/postman/collection-dir/adyen_uk/Flow Testcases/Variation Cases/Scenario10-Create Gift Card payment where it fails due to insufficient balance/Payments - Create/request.jsonindex 11437ff576..923cb4aae7 100644--- a/postman/collection-dir/adyen_uk/Flow Testcases/Variation Cases/Scenario10-Create Gift Card payment where it fails due to insufficient balance/Payments - Create/request.json+++ b/postman/collection-dir/adyen_uk/Flow Testcases/Variation Cases/Scenario10-Create Gift Card payment where it fails due to insufficient balance/Payments - Create/request.json@@ -42,10 +42,6 @@}}},- "routing": {- "type": "single",- "data": "adyen"- },"billing": {"address": {"line1": "1467",diff --git a/postman/collection-dir/authorizedotnet/Flow Testcases/Happy Cases/Scenario4-Create failed payment with confirm true copy/Payments - Create/request.json b/postman/collection-dir/authorizedotnet/Flow Testcases/Happy Cases/Scenario4-Create failed payment with confirm true copy/Payments - Create/request.jsonindex b9bf4f2b66..f477cdecc3 100644--- a/postman/collection-dir/authorizedotnet/Flow Testcases/Happy Cases/Scenario4-Create failed payment with confirm true copy/Payments - Create/request.json+++ b/postman/collection-dir/authorizedotnet/Flow Testcases/Happy Cases/Scenario4-Create failed payment with confirm true copy/Payments - Create/request.json@@ -16,10 +16,6 @@"amount": 7003,"currency": "USD","confirm": true,- "routing": {- "data": "authorizedotnet",- "type": "single"- },"capture_method": "automatic","capture_on": "2022-09-10T10:11:12Z","customer_id": "StripeCustomer",diff --git a/postman/collection-dir/authorizedotnet/Flow Testcases/Variation Cases/Scenario12-Failed case for wrong api keys/Payments - Create/request.json b/postman/collection-dir/authorizedotnet/Flow Testcases/Variation Cases/Scenario12-Failed case for wrong api keys/Payments - Create/request.jsonindex b9bf4f2b66..f477cdecc3 100644--- a/postman/collection-dir/authorizedotnet/Flow Testcases/Variation Cases/Scenario12-Failed case for wrong api keys/Payments - Create/request.json+++ b/postman/collection-dir/authorizedotnet/Flow Testcases/Variation Cases/Scenario12-Failed case for wrong api keys/Payments - Create/request.json@@ -16,10 +16,6 @@"amount": 7003,"currency": "USD","confirm": true,- "routing": {- "data": "authorizedotnet",- "type": "single"- },"capture_method": "automatic","capture_on": "2022-09-10T10:11:12Z","customer_id": "StripeCustomer",diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.jsonindex 43eb0c9cc1..cc19ac2bab 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.jsonindex c2a8a615d1..14f671d7f6 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json@@ -78,10 +78,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.jsonindex 71cc910695..66f5c825b1 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json@@ -64,10 +64,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "bankofamerica"}}},diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.jsonindex 8bd119ed2f..5ec6335d05 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.jsonindex 8ea0f5f203..b2c86ceb5e 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/request.jsonindex 580e722c1d..2685dca3f0 100644--- a/postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/bankofamerica/Flow Testcases/QuickStart/Payments - Create/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "bankofamerica"}}},diff --git a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.jsonindex 4cbb79aa56..b4169de208 100644--- a/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json+++ b/postman/collection-dir/bluesnap/Flow Testcases/Happy Cases/Scenario28-Create partially captured payment with refund/Payments - Create/request.json@@ -74,10 +74,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/request.jsonindex 197580ddff..74441099ea 100644--- a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/3DS Payment/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "checkout"}}},diff --git a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/request.jsonindex b28dec9990..04df55714a 100644--- a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Cancel After Partial Capture/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "checkout"}}},diff --git a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Refund After Partial Capture/Payments - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Refund After Partial Capture/Payments - Create/request.jsonindex b28dec9990..04df55714a 100644--- a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Refund After Partial Capture/Payments - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Refund After Partial Capture/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "checkout"}}},diff --git a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/request.jsonindex b28dec9990..04df55714a 100644--- a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Retrieve After Partial Capture/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "checkout"}}},diff --git a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/request.json b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/request.jsonindex b28dec9990..04df55714a 100644--- a/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/request.json+++ b/postman/collection-dir/checkout/Flow Testcases/Happy Cases/Scenario10-Multiple Captures/Successful Partial Capture and Refund/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "checkout"}}},diff --git a/postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario9-Add card flow/Save card payments - Create/request.json b/postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario9-Add card flow/Save card payments - Create/request.jsonindex 4afeccc824..f40a645ea0 100644--- a/postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario9-Add card flow/Save card payments - Create/request.json+++ b/postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario9-Add card flow/Save card payments - Create/request.json@@ -66,10 +66,6 @@"country_code": "+91"}},- "routing": {- "type": "single",- "data": "stripe"- },"statement_descriptor_name": "joseph","statement_descriptor_suffix": "JS","metadata": {diff --git a/postman/collection-dir/forte/Flow Testcases/Happy Cases/Scenario7-Create payment with Zero Amount/Payments - Create/request.json b/postman/collection-dir/forte/Flow Testcases/Happy Cases/Scenario7-Create payment with Zero Amount/Payments - Create/request.jsonindex 0bf23604d8..624968c77c 100644--- a/postman/collection-dir/forte/Flow Testcases/Happy Cases/Scenario7-Create payment with Zero Amount/Payments - Create/request.json+++ b/postman/collection-dir/forte/Flow Testcases/Happy Cases/Scenario7-Create payment with Zero Amount/Payments - Create/request.json@@ -30,10 +30,6 @@"phone_country_code": "+65","description": "Its my first payment request","authentication_type": "no_three_ds",- "routing": {- "type": "single",- "data": "forte"- },"return_url": "https://duck.com","payment_method": "card","payment_method_data": {diff --git a/postman/collection-dir/forte/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/forte/Flow Testcases/QuickStart/Payments - Create/request.jsonindex 04be684704..05fde18c2d 100644--- a/postman/collection-dir/forte/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/forte/Flow Testcases/QuickStart/Payments - Create/request.json@@ -21,10 +21,6 @@"amount": 6540,"currency": "USD","confirm": true,- "routing": {- "type": "single",- "data": "forte"- },"capture_method": "automatic","capture_on": "2022-09-10T10:11:12Z","amount_to_capture": 6540,diff --git a/postman/collection-dir/hyperswitch/Hackathon/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json b/postman/collection-dir/hyperswitch/Hackathon/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.jsonindex 64df182d1e..d1361c52bc 100644--- a/postman/collection-dir/hyperswitch/Hackathon/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json+++ b/postman/collection-dir/hyperswitch/Hackathon/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json@@ -21,10 +21,6 @@"amount": 8000,"currency": "USD","confirm": false,- "routing": {- "type": "single",- "data": "stripe"- },"capture_method": "automatic","capture_on": "2022-09-10T10:11:12Z","amount_to_capture": 6540,diff --git a/postman/collection-dir/multisafepay/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/multisafepay/Flow Testcases/QuickStart/Payments - Create/request.jsonindex a4e816ad17..289e780a72 100644--- a/postman/collection-dir/multisafepay/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/multisafepay/Flow Testcases/QuickStart/Payments - Create/request.json@@ -55,10 +55,6 @@"last_name": "happy"}},- "routing": {- "type": "single",- "data": "multisafepay"- },"shipping": {"address": {"line1": "1467",diff --git a/postman/collection-dir/multisafepay/Flow Testcases/Variation Cases/Scenario6- Create payment with Invalid Merchant ID/Payments - Create/request.json b/postman/collection-dir/multisafepay/Flow Testcases/Variation Cases/Scenario6- Create payment with Invalid Merchant ID/Payments - Create/request.jsonindex 525eaa739e..289e780a72 100644--- a/postman/collection-dir/multisafepay/Flow Testcases/Variation Cases/Scenario6- Create payment with Invalid Merchant ID/Payments - Create/request.json+++ b/postman/collection-dir/multisafepay/Flow Testcases/Variation Cases/Scenario6- Create payment with Invalid Merchant ID/Payments - Create/request.json@@ -42,10 +42,6 @@"card_cvc": "123"}},- "routing": {- "type": "single",- "data": "multisafepay"- },"billing": {"address": {"line1": "1467",diff --git a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario13-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario13-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.jsonindex 050f353af5..e04dc7b428 100644--- a/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario13-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json+++ b/postman/collection-dir/nmi/Flow Testcases/Happy Cases/Scenario13-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json b/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.jsonindex 07a9e0fc0b..db81c387d5 100644--- a/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json+++ b/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario9-Create a mandate payment/Payments - Create/request.json b/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario9-Create a mandate payment/Payments - Create/request.jsonindex 2cbfe4a20f..314752373c 100644--- a/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario9-Create a mandate payment/Payments - Create/request.json+++ b/postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario9-Create a mandate payment/Payments - Create/request.json@@ -97,10 +97,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Create/request.json b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Create/request.jsonindex 9e084a35c8..691f63896f 100644--- a/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Create/request.json+++ b/postman/collection-dir/paypal/Flow Testcases/Happy Cases/Scenario8-Create payment with Manual capture with confirm false and surcharge_data/Payments - Create/request.json@@ -65,10 +65,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "paypal"}}},diff --git a/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json b/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.jsonindex 2c8566c242..58e786c79d 100644--- a/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json+++ b/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json@@ -28,13 +28,9 @@"payment_method": "card_redirect","payment_method_type": "card_redirect","payment_method_data": {- "card_redirect": {- "card_redirect": {}- }- },- "routing": {- "type": "single",- "data": "prophetpay"+ "card_redirect": {+ "card_redirect": {}+ }}}},diff --git a/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json b/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.jsonindex 851a18115f..514099b88a 100644--- a/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json+++ b/postman/collection-dir/prophetpay/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json@@ -24,11 +24,7 @@"amount_to_capture": 8000,"business_country": "US","customer_id": "not_a_rick_roll",- "return_url": "https://www.google.com",- "routing": {- "type": "single",- "data": "prophetpay"- }+ "return_url": "https://www.google.com"}},"url": {diff --git a/postman/collection-dir/prophetpay/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/prophetpay/Flow Testcases/QuickStart/Payments - Create/request.jsonindex 11c9749e95..5302bca0e2 100644--- a/postman/collection-dir/prophetpay/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/prophetpay/Flow Testcases/QuickStart/Payments - Create/request.json@@ -28,13 +28,9 @@"payment_method": "card_redirect","payment_method_type": "card_redirect","payment_method_data": {- "card_redirect": {- "card_redirect": {}- }- },- "routing": {- "type": "single",- "data": "prophetpay"+ "card_redirect": {+ "card_redirect": {}+ }}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.jsonindex 950ec531ae..48b7d41089 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json@@ -98,10 +98,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Payments - Create/request.jsonindex b5ef6b1afe..b32011d26d 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Payments - Create/request.json@@ -97,10 +97,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Recurring Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Recurring Payments - Create/request.jsonindex 613e9148f7..f6038bfc21 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Recurring Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario10-Create a mandate and recurring payment/Recurring Payments - Create/request.json@@ -52,10 +52,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Payments - Create/request.jsonindex 61f007ede6..18f12b7306 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Payments - Create/request.json@@ -85,10 +85,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Recurring Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Recurring Payments - Create/request.jsonindex fe8a73d458..8ca8a333ad 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Recurring Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario11-Refund recurring payment/Recurring Payments - Create/request.json@@ -52,10 +52,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.jsonindex f621bd52f0..88e6597536 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario12-BNPL-klarna/Payments - Create/request.json@@ -38,10 +38,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario13-BNPL-afterpay/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario13-BNPL-afterpay/Payments - Create/request.jsonindex d108e1198a..2e536713b9 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario13-BNPL-afterpay/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario13-BNPL-afterpay/Payments - Create/request.json@@ -78,10 +78,6 @@"amount": 7000,"quantity": 1}- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario14-BNPL-affirm/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario14-BNPL-affirm/Payments - Create/request.jsonindex eedc71f3a1..3675475c08 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario14-BNPL-affirm/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario14-BNPL-affirm/Payments - Create/request.json@@ -77,10 +77,6 @@"amount": 7000,"quantity": 1}- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Create/request.jsonindex 048893f351..247f1256f7 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario15-Bank Redirect-Ideal/Payments - Create/request.json@@ -76,10 +76,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/request.jsonindex 21e71ad037..0b0c56d266 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Create/request.json@@ -76,10 +76,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.jsonindex 026af8449c..f423db2115 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario17-Bank Redirect-eps/Payments - Create/request.json@@ -76,10 +76,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/request.jsonindex 7fa60b50cd..b9e58c09ce 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario18-Bank Transfer-ach/Payments - Create/request.json@@ -52,10 +52,6 @@"last_name": "Kumari"},"email": "[email protected]"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/request.jsonindex 53fe9371e4..473970b21c 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario19-Bank Debit-ach/Payments - Create/request.json@@ -95,10 +95,6 @@"amount": 1800,"account_name": "transaction_processing"}- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/request.jsonindex daffd2ab9e..2b623eed2e 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario20-Wallet-Wechatpay/Payments - Create/request.json@@ -40,10 +40,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/request.jsonindex beeb5b3983..2f7bdae8a6 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario21- Update address and List Payment method/Payments - Create/request.json@@ -62,10 +62,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/request.jsonindex 785122a83c..b41aa02e5d 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario22- Update Amount/Payments - Create/request.json@@ -62,10 +62,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/request.jsonindex 9d931d3853..4f64a5d0e3 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Payments - Create/request.json@@ -86,10 +86,6 @@"country_code": "+91"}},- "routing": {- "type": "single",- "data": "stripe"- },"statement_descriptor_name": "joseph","statement_descriptor_suffix": "JS","metadata": {diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/request.jsonindex 4afeccc824..3371960e67 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario23-Add card flow/Save card payments - Create/request.json@@ -66,10 +66,6 @@"country_code": "+91"}},- "routing": {- "type": "single",- "data": "stripe"- },"statement_descriptor_name": "joseph","statement_descriptor_suffix": "JS","metadata": {@@ -81,12 +77,8 @@},"url": {"raw": "{{baseUrl}}/payments",- "host": [- "{{baseUrl}}"- ],- "path": [- "payments"- ]+ "host": ["{{baseUrl}}"],+ "path": ["payments"]},"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"}diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/request.jsonindex b903a3ca74..b0ff74e888 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Payments - Create/request.json@@ -92,10 +92,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/request.jsonindex a3ca3aa6ac..f40a645ea0 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario24-Don't Pass CVV for save card flow and verifysuccess payment/Save card payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/request.jsonindex 9b1092f93f..7b15b0ee87 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Payments - Create/request.json@@ -92,10 +92,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/request.jsonindex dc78d553ec..0e614b315f 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario25-Save card payment with manual capture/Save card payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.jsonindex 6a9836d232..627c816fba 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario26-Create payment without customer_id and with billing address and shipping address/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/request.jsonindex 7e28058ccf..2fc1d3e062 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario27-Confirm a payment with requires_customer_action status/Payments - Create with confirm true/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/request.jsonindex 83e3a58da2..578d3c4726 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario28-Create payment with payment method billing/Payments - Create/request.json@@ -79,10 +79,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/request.jsonindex 95c2541e0b..14381e2d55 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario29-Update payment with payment method billing/Payments - Create/request.json@@ -54,10 +54,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.jsonindex beeb5b3983..2f7bdae8a6 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json@@ -62,10 +62,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.jsonindex 0619498e38..4deef11deb 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4a-Create payment with manual_multiple capture/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4a-Create payment with manual_multiple capture/Payments - Create/request.jsonindex 0fbd6a4dcd..f1ff4cb569 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4a-Create payment with manual_multiple capture/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario4a-Create payment with manual_multiple capture/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.jsonindex 0619498e38..4deef11deb 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario5-Void the payment/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment/Payments - Create/request.jsonindex 7e28058ccf..2fc1d3e062 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario6-Create 3DS payment/Payments - Create/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/request.jsonindex 14f3394596..72c0cf1fd9 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario7-Create 3DS payment with confirm false/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario8-Create a failure card payment with confirm true/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario8-Create a failure card payment with confirm true/Payments - Create/request.jsonindex a3e0f52b8d..1a9dc98589 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario8-Create a failure card payment with confirm true/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario8-Create a failure card payment with confirm true/Payments - Create/request.json@@ -86,10 +86,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.jsonindex 2363c62ff2..f58c425653 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9-Refund full payment/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9a-Partial refund/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9a-Partial refund/Payments - Create/request.jsonindex b5f464abc1..f58c425653 100644--- a/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9a-Partial refund/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario9a-Partial refund/Payments - Create/request.json@@ -72,21 +72,13 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},"url": {"raw": "{{baseUrl}}/payments",- "host": [- "{{baseUrl}}"- ],- "path": [- "payments"- ]+ "host": ["{{baseUrl}}"],+ "path": ["payments"]},"description": "To process a payment you will have to create a payment, attach a payment method and confirm. Depending on the user journey you wish to achieve, you may opt to all the steps in a single request or in a sequence of API request using following APIs: (i) Payments - Update, (ii) Payments - Confirm, and (iii) Payments - Capture"}diff --git a/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payments - Create/request.jsonindex 0a7b19679a..2225c6096e 100644--- a/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/QuickStart/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp Year)/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp Year)/request.jsonindex 0e1f282acd..02e431466a 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp Year)/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp Year)/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp month)/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp month)/request.jsonindex 92e81f4f53..52c73bea74 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp month)/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid Exp month)/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/request.jsonindex a8f4cf69a2..c7ad4cb274 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(Invalid card number)/request.json@@ -70,10 +70,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.jsonindex fdc09ce202..9fa8e3bbe1 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario1-Create payment with Invalid card details/Payments - Create(invalid CVV)/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario10-Refund exceeds amount captured/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario10-Refund exceeds amount captured/Payments - Create/request.jsonindex 90b6e3bd03..d6f53f92a0 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario10-Refund exceeds amount captured/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario10-Refund exceeds amount captured/Payments - Create/request.json@@ -71,10 +71,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario2-Confirming the payment without PMD/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario2-Confirming the payment without PMD/Payments - Create/request.jsonindex beeb5b3983..2f7bdae8a6 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario2-Confirming the payment without PMD/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario2-Confirming the payment without PMD/Payments - Create/request.json@@ -62,10 +62,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/request.jsonindex 0619498e38..4deef11deb 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario3-Capture greater amount/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/request.jsonindex 2363c62ff2..f58c425653 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario4-Capture the succeeded payment/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/request.jsonindex 2363c62ff2..f58c425653 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario5-Void the success_slash_failure payment/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario6-Create 3DS payment with greater capture/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario6-Create 3DS payment with greater capture/Payments - Create/request.jsonindex c132368eb4..9c2ddbffb6 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario6-Create 3DS payment with greater capture/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario6-Create 3DS payment with greater capture/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/request.jsonindex 2363c62ff2..f58c425653 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.jsonindex 4105bd1a86..3e1f1231ff 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.json@@ -72,10 +72,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/request.jsonindex b5ef6b1afe..b32011d26d 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/request.json@@ -97,10 +97,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/request.json b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/request.jsonindex 3ced4fa532..299eb1685b 100644--- a/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/request.json+++ b/postman/collection-dir/stripe/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/request.json@@ -64,10 +64,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/PaymentMethods/Payments - Create/request.json b/postman/collection-dir/stripe/PaymentMethods/Payments - Create/request.jsonindex 3b16fb5e65..93bda64022 100644--- a/postman/collection-dir/stripe/PaymentMethods/Payments - Create/request.json+++ b/postman/collection-dir/stripe/PaymentMethods/Payments - Create/request.json@@ -92,10 +92,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Payments/Payments - Create Again/request.json b/postman/collection-dir/stripe/Payments/Payments - Create Again/request.jsonindex bef68a2608..c985bf50b0 100644--- a/postman/collection-dir/stripe/Payments/Payments - Create Again/request.json+++ b/postman/collection-dir/stripe/Payments/Payments - Create Again/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Payments/Payments - Create Yet Again/request.json b/postman/collection-dir/stripe/Payments/Payments - Create Yet Again/request.jsonindex 544af8234f..2b6d4bf333 100644--- a/postman/collection-dir/stripe/Payments/Payments - Create Yet Again/request.json+++ b/postman/collection-dir/stripe/Payments/Payments - Create Yet Again/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/Payments/Payments - Create/request.json b/postman/collection-dir/stripe/Payments/Payments - Create/request.jsonindex 55ddd525d4..5a7457cedf 100644--- a/postman/collection-dir/stripe/Payments/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Payments/Payments - Create/request.json@@ -83,10 +83,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/stripe/QuickStart/Payments - Create-copy/request.json b/postman/collection-dir/stripe/QuickStart/Payments - Create-copy/request.jsonindex 34d455fe76..5fcc564759 100644--- a/postman/collection-dir/stripe/QuickStart/Payments - Create-copy/request.json+++ b/postman/collection-dir/stripe/QuickStart/Payments - Create-copy/request.json@@ -86,7 +86,10 @@},"routing": {"type": "single",- "data": "stripe"+ "data": {+ "connector":"stripe",+ "merchant_connector_id":"{{merchant_connector_id}}"+ }}}},diff --git a/postman/collection-dir/stripe/QuickStart/Payments - Create/request.json b/postman/collection-dir/stripe/QuickStart/Payments - Create/request.jsonindex cbf58f2e89..13ed1a212d 100644--- a/postman/collection-dir/stripe/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/stripe/QuickStart/Payments - Create/request.json@@ -87,7 +87,10 @@},"routing": {"type": "single",- "data": "stripe"+ "data": {+ "connector":"stripe",+ "merchant_connector_id":"{{merchant_connector_id}}"+ }}}},diff --git a/postman/collection-dir/stripe/Refunds/Payments - Create/request.json b/postman/collection-dir/stripe/Refunds/Payments - Create/request.jsonindex 24a37d16cf..d3219a30cf 100644--- a/postman/collection-dir/stripe/Refunds/Payments - Create/request.json+++ b/postman/collection-dir/stripe/Refunds/Payments - Create/request.json@@ -84,10 +84,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "stripe"}}},diff --git a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.jsonindex bd07653578..6cf802f630 100644--- a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json+++ b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json@@ -82,10 +82,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "volt"}}},diff --git a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.jsonindex 744663ee79..b5bbc7aca1 100644--- a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json+++ b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario2-Create payment with confirm false/Payments - Create/request.json@@ -82,10 +82,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "volt"}}},diff --git a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.jsonindex 7323f440e6..bde98e7ef0 100644--- a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json+++ b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario3-Create payment without PMD/Payments - Create/request.json@@ -63,10 +63,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "volt"}}},diff --git a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario4-Bank Redirect-open_banking_uk/Payments - Create/request.json b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario4-Bank Redirect-open_banking_uk/Payments - Create/request.jsonindex 7323f440e6..bde98e7ef0 100644--- a/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario4-Bank Redirect-open_banking_uk/Payments - Create/request.json+++ b/postman/collection-dir/volt/Flow Testcases/Happy Cases/Scenario4-Bank Redirect-open_banking_uk/Payments - Create/request.json@@ -63,10 +63,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "volt"}}},diff --git a/postman/collection-dir/volt/Flow Testcases/QuickStart/Payments - Create/request.json b/postman/collection-dir/volt/Flow Testcases/QuickStart/Payments - Create/request.jsonindex bd07653578..6cf802f630 100644--- a/postman/collection-dir/volt/Flow Testcases/QuickStart/Payments - Create/request.json+++ b/postman/collection-dir/volt/Flow Testcases/QuickStart/Payments - Create/request.json@@ -82,10 +82,6 @@"udf1": "value1","new_customer": "true","login_date": "2019-09-10T10:11:12Z"- },- "routing": {- "type": "single",- "data": "volt"}}},