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(connector): [checkout] populate network_txn_link_id from payments response (#12738)
Vani Guptae6fcccc09568
diff --git a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rsindex ecedc73022..98b01e31bf 100644--- a/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs+++ b/crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs@@ -1272,6 +1272,8 @@ pub struct PaymentsResponse {#[derive(Clone, Debug, Default, Eq, PartialEq, Deserialize, Serialize)]pub struct PaymentProcessingDetails {+ /// A scheme-generated reference that Mastercard intends to use for tracking and linking transactions across the ecosystem.+ pub scheme_transaction_link_id: Option<String>,/// The Merchant Advice Code (MAC) provided by Mastercard, which contains additional information about the transaction.pub partner_merchant_advice_code: Option<String>,/// The original authorization response code sent by the scheme.@@ -1378,7 +1380,10 @@ impl TryFrom<PaymentsResponseRouterData<PaymentsResponse>> for PaymentsAuthorizemandate_reference: Box::new(mandate_reference),connector_metadata: Some(connector_meta),network_txn_id: item.response.scheme_id.clone(),- network_txn_link_id: None,+ network_txn_link_id: item+ .response+ .processing+ .and_then(|processing| processing.scheme_transaction_link_id),connector_response_reference_id: Some(item.response.reference.unwrap_or(item.response.id),),@@ -1495,7 +1500,10 @@ implmandate_reference: Box::new(mandate_reference),connector_metadata: Some(connector_meta),network_txn_id: item.response.scheme_id.clone(),- network_txn_link_id: None,+ network_txn_link_id: item+ .response+ .processing+ .and_then(|processing| processing.scheme_transaction_link_id),connector_response_reference_id: Some(item.response.reference.unwrap_or(item.response.id),),@@ -1577,7 +1585,10 @@ impl TryFrom<PaymentsSyncResponseRouterData<PaymentsResponse>> for PaymentsSyncRmandate_reference: Box::new(mandate_reference),connector_metadata: None,network_txn_id: item.response.scheme_id.clone(),- network_txn_link_id: None,+ network_txn_link_id: item+ .response+ .processing+ .and_then(|processing| processing.scheme_transaction_link_id),connector_response_reference_id: Some(item.response.reference.unwrap_or(item.response.id),),