From cc7e90f2293f27b74b14669a0c2d5bd6d45c4d99 Mon Sep 17 00:00:00 2001 From: Aaron Jackson Date: Thu, 5 Oct 2023 12:11:38 -0700 Subject: [PATCH] feat(connector): [Forte] Use connector_response_reference_id as reference to merchant (#2456) Co-authored-by: Aaron Jackson Co-authored-by: Shankar Singh C <83439957+ShankarSinghC@users.noreply.github.com> --- crates/router/src/connector/forte/transformers.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/router/src/connector/forte/transformers.rs b/crates/router/src/connector/forte/transformers.rs index dcc8b97788d5..bc7c55c4f87c 100644 --- a/crates/router/src/connector/forte/transformers.rs +++ b/crates/router/src/connector/forte/transformers.rs @@ -259,7 +259,7 @@ impl auth_id: item.response.authorization_code, })), network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(transaction_id.to_string()), }), ..item.data }) @@ -306,7 +306,7 @@ impl auth_id: item.response.authorization_code, })), network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(transaction_id.to_string()), }), ..item.data }) @@ -362,19 +362,18 @@ impl TryFrom> fn try_from( item: types::PaymentsCaptureResponseRouterData, ) -> Result { + let transaction_id = &item.response.transaction_id; Ok(Self { status: enums::AttemptStatus::from(item.response.response.response_code), response: Ok(types::PaymentsResponseData::TransactionResponse { - resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transaction_id, - ), + resource_id: types::ResponseId::ConnectorTransactionId(transaction_id.clone()), redirection_data: None, mandate_reference: None, connector_metadata: Some(serde_json::json!(ForteMeta { auth_id: item.response.authorization_code, })), network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(item.response.transaction_id.to_string()), }), amount_captured: None, ..item.data @@ -441,7 +440,7 @@ impl auth_id: item.response.authorization_code, })), network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some(transaction_id.to_string()), }), ..item.data })