From 162a233620698bc0ab3f7e9034f74f3e43f37473 Mon Sep 17 00:00:00 2001 From: AkshayaFoiger Date: Thu, 2 Nov 2023 13:20:49 +0530 Subject: [PATCH] refactor elavon transformer --- crates/router/src/connector/elavon/transformers.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/router/src/connector/elavon/transformers.rs b/crates/router/src/connector/elavon/transformers.rs index fd279bc34be1..68a0ac49f4c8 100644 --- a/crates/router/src/connector/elavon/transformers.rs +++ b/crates/router/src/connector/elavon/transformers.rs @@ -136,14 +136,10 @@ impl TryFrom<&ElavonRouterData<&types::PaymentsAuthorizeRouterData>> for ElavonP expiration_year: req_card.get_expiry_year_4_digit(), security_code: req_card.card_cvc.to_owned(), }, - do_capture: if item.router_data.request.is_auto_capture()? { - true - } else { - false - }, + do_capture: item.router_data.request.is_auto_capture()?, }; - Ok(ElavonPaymentsRequest::CardPaymentRequest(card_data)) + Ok(Self::CardPaymentRequest(card_data)) } _ => Err(errors::ConnectorError::NotImplemented("Payment methods".to_string()).into()), }