From 088dce076d8d8ff86769717368150e09d7d92593 Mon Sep 17 00:00:00 2001 From: frazar <914950+frazar@users.noreply.github.com> Date: Fri, 13 Oct 2023 07:23:27 +0200 Subject: [PATCH] feat(nexinets): Use connector_request_reference_id as reference to the connector - Work In Progress (#2515) --- crates/router/src/connector/nexinets/transformers.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/router/src/connector/nexinets/transformers.rs b/crates/router/src/connector/nexinets/transformers.rs index 7b2a41cfb0be..897d8f639d35 100644 --- a/crates/router/src/connector/nexinets/transformers.rs +++ b/crates/router/src/connector/nexinets/transformers.rs @@ -27,6 +27,7 @@ pub struct NexinetsPaymentsRequest { payment: Option, #[serde(rename = "async")] nexinets_async: NexinetsAsyncDetails, + merchant_order_id: Option, } #[derive(Debug, Serialize, Default)] @@ -172,6 +173,11 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for NexinetsPaymentsRequest { failure_url: return_url, }; let (payment, product) = get_payment_details_and_product(item)?; + let merchant_order_id = match item.payment_method { + // Merchant order id is sent only in case of card payment + enums::PaymentMethod::Card => Some(item.connector_request_reference_id.clone()), + _ => None, + }; Ok(Self { initial_amount: item.request.amount, currency: item.request.currency, @@ -179,6 +185,7 @@ impl TryFrom<&types::PaymentsAuthorizeRouterData> for NexinetsPaymentsRequest { product, payment, nexinets_async, + merchant_order_id, }) } }