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
fix(core): propagate mit_category in Setup Mandate flows (#12989)
Vani Guptaeae96505cb3e
diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rsindex 774f46778a..1a998abcdc 100644--- a/crates/hyperswitch_connectors/src/utils.rs+++ b/crates/hyperswitch_connectors/src/utils.rs@@ -7698,7 +7698,7 @@ pub(crate) fn convert_setup_mandate_router_data_to_authorize_router_data(enable_partial_authorization: data.request.enable_partial_authorization,enable_overcapture: None,is_stored_credential: data.request.is_stored_credential,- mit_category: None,+ mit_category: data.request.mit_category,billing_descriptor: data.request.billing_descriptor.clone(),tokenization: None,partner_merchant_identifier_details: datadiff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rsindex 4e2720483e..9a9704a605 100644--- a/crates/hyperswitch_domain_models/src/router_request_types.rs+++ b/crates/hyperswitch_domain_models/src/router_request_types.rs@@ -1926,6 +1926,7 @@ pub struct SetupMandateRequestData {pub authentication_data: Option<AuthenticationData>,pub connector_intent_metadata: Option<ConnectorMetadata>,pub merchant_order_reference_id: Option<String>,+ pub mit_category: Option<common_enums::MitCategory>,}#[derive(Debug, Clone)]diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rsindex c87eb4ae9f..248239df5d 100644--- a/crates/router/src/core/payments/transformers.rs+++ b/crates/router/src/core/payments/transformers.rs@@ -1837,6 +1837,7 @@ pub async fn construct_payment_router_data_for_setup_mandate<'a>(feature_metadata: None,connector_intent_metadata: None,merchant_order_reference_id: None,+ mit_category: None,};let connector_mandate_request_reference_id = payment_data.payment_attempt@@ -6620,6 +6621,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::SetupMandateRequ}).transpose()?,merchant_order_reference_id,+ mit_category: payment_data.payment_intent.mit_category,})}}