Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(connector): [Noon] enable UCS SetupMandate and IncomingWebhook (#14918)

Tushar Shuklaa25db0f94bb7
diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rs
index 2d8e5e3c6d..f7b4dc01b5 100644
--- a/crates/router/src/core/unified_connector_service/transformers.rs
+++ b/crates/router/src/core/unified_connector_service/transformers.rs
@@ -3311,7 +3311,12 @@ impl
complete_authorize_url: router_data.request.complete_authorize_url.clone(),
session_token: router_data.session_token.clone(),
order_tax_amount: None,
- order_category: None,
+ order_category: router_data
+ .request
+ .connector_intent_metadata
+ .as_ref()
+ .and_then(|cm| cm.noon.as_ref())
+ .and_then(|noon| noon.order_category.clone()),
merchant_order_id: None,
shipping_cost: router_data
.request
@@ -3352,7 +3357,12 @@ impl
.as_ref()
.map(|data| Secret::new(data.peek().to_string())),
l2_l3_data: build_ucs_l2_l3_data(router_data.l2_l3_data.as_deref()),
- setup_mandate_details: None,
+ setup_mandate_details: router_data
+ .request
+ .setup_mandate_details
+ .as_ref()
+ .map(payments_grpc::SetupMandateDetails::foreign_try_from)
+ .transpose()?,
partner_merchant_identifier_details: router_data
.request
.partner_merchant_identifier_details