From 485c09d16743d73b446d6313f0ee6462c8a77028 Mon Sep 17 00:00:00 2001 From: Lab Rat <35325046+rootCircle@users.noreply.github.com> Date: Wed, 4 Oct 2023 07:55:54 +0000 Subject: [PATCH] feat(connector): [Payeezy] Use connector_response_reference_id as reference to merchant (#2410) --- crates/router/src/connector/payeezy/transformers.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/router/src/connector/payeezy/transformers.rs b/crates/router/src/connector/payeezy/transformers.rs index d6c22ba67c31..98e8ea12c00d 100644 --- a/crates/router/src/connector/payeezy/transformers.rs +++ b/crates/router/src/connector/payeezy/transformers.rs @@ -67,6 +67,7 @@ pub struct PayeezyPaymentsRequest { pub currency_code: String, pub credit_card: PayeezyPaymentMethod, pub stored_credentials: Option, + pub reference: String, } #[derive(Serialize, Debug)] @@ -118,6 +119,7 @@ fn get_card_specific_payment_data( currency_code, credit_card, stored_credentials, + reference: item.connector_request_reference_id.clone(), }) } fn get_transaction_type_and_stored_creds( @@ -252,6 +254,7 @@ pub struct PayeezyPaymentsResponse { pub gateway_resp_code: String, pub gateway_message: String, pub stored_credentials: Option, + pub reference: Option, } #[derive(Debug, Deserialize)] @@ -354,13 +357,17 @@ impl status, response: Ok(types::PaymentsResponseData::TransactionResponse { resource_id: types::ResponseId::ConnectorTransactionId( - item.response.transaction_id, + item.response.transaction_id.clone(), ), redirection_data: None, mandate_reference, connector_metadata: metadata, network_txn_id: None, - connector_response_reference_id: None, + connector_response_reference_id: Some( + item.response + .reference + .unwrap_or(item.response.transaction_id), + ), }), ..item.data })