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
feat(core): Braintree and Mifinity Form type in HS <> UCS Integration (#10989)
Shubhodip pala65699518a24
diff --git a/crates/router/src/core/payments/gateway/setup_mandate.rs b/crates/router/src/core/payments/gateway/setup_mandate.rsindex 37c04673b0..9a636f0141 100644--- a/crates/router/src/core/payments/gateway/setup_mandate.rs+++ b/crates/router/src/core/payments/gateway/setup_mandate.rs@@ -150,6 +150,9 @@ whererouter_data.connector_response = Some(connector_response);});+ router_data.amount_captured = ucs_data.amount_captured;+ router_data.minor_amount_captured = ucs_data.minor_amount_captured;+Ok((router_data, (), setup_mandate_response))},))diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rsindex 80a7488694..189c5bda55 100644--- a/crates/router/src/core/unified_connector_service.rs+++ b/crates/router/src/core/unified_connector_service.rs@@ -1560,6 +1560,10 @@ pub fn handle_unified_connector_service_response_for_payment_register(status_code,connector_customer_id,connector_response,+ amount_captured: response.captured_amount,+ minor_amount_captured: response+ .minor_captured_amount+ .map(common_utils::types::MinorUnit::new),})}diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rsindex c24c1765b2..4046cf596b 100644--- a/crates/router/src/core/unified_connector_service/transformers.rs+++ b/crates/router/src/core/unified_connector_service/transformers.rs@@ -3758,18 +3758,19 @@ impl transformers::ForeignTryFrom<payments_grpc::RedirectForm> for RedirectForm).into(),),- Some(payments_grpc::redirect_form::FormType::Braintree(_)) => Err(- UnifiedConnectorServiceError::RequestEncodingFailedWithReason(- "Braintree form type is not implemented".to_string(),- )- .into(),- ),- Some(payments_grpc::redirect_form::FormType::Mifinity(_)) => Err(- UnifiedConnectorServiceError::RequestEncodingFailedWithReason(- "Mifinity form type is not implemented".to_string(),- )- .into(),- ),+ Some(payments_grpc::redirect_form::FormType::Braintree(braintree)) => {+ Ok(Self::Braintree {+ client_token: braintree.client_token,+ card_token: braintree.card_token,+ bin: braintree.bin,+ acs_url: braintree.acs_url,+ })+ }+ Some(payments_grpc::redirect_form::FormType::Mifinity(mifinity)) => {+ Ok(Self::Mifinity {+ initialization_token: mifinity.initialization_token,+ })+ }None => Err(UnifiedConnectorServiceError::RequestEncodingFailedWithReason("Missing form type".to_string(),diff --git a/crates/router/src/types.rs b/crates/router/src/types.rsindex 9496c87345..301d7298e3 100644--- a/crates/router/src/types.rs+++ b/crates/router/src/types.rs@@ -757,6 +757,8 @@ pub struct UcsSetupMandateResponseData {pub status_code: u16,pub connector_customer_id: Option<String>,pub connector_response: Option<ConnectorResponseData>,+ pub amount_captured: Option<i64>,+ pub minor_amount_captured: Option<MinorUnit>,}#[derive(Debug, Clone, Copy)]