diff --git a/connector-template/mod.rs b/connector-template/mod.rs index e9945a726a95..77627f31e53e 100644 --- a/connector-template/mod.rs +++ b/connector-template/mod.rs @@ -304,7 +304,7 @@ impl &self, _req: &types::PaymentsCaptureRouterData, _connectors: &settings::Connectors, - ) -> CustomResult, errors::ConnectorError> { + ) -> CustomResult { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } diff --git a/crates/router/src/connector/placetopay.rs b/crates/router/src/connector/placetopay.rs index 71f07d79fb6d..1079a45794e4 100644 --- a/crates/router/src/connector/placetopay.rs +++ b/crates/router/src/connector/placetopay.rs @@ -2,6 +2,7 @@ pub mod transformers; use std::fmt::Debug; +use common_utils::request::RequestContent; use error_stack::{IntoReport, ResultExt}; use masking::ExposeInterface; use transformers as placetopay; @@ -165,7 +166,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { + ) -> CustomResult { let connector_router_data = placetopay::PlacetopayRouterData::try_from(( &self.get_currency_unit(), req.request.currency, @@ -173,12 +174,7 @@ impl ConnectorIntegration::encode_to_string_of_json, - ) - .change_context(errors::ConnectorError::RequestEncodingFailed)?; - Ok(Some(placetopay_req)) + Ok(RequestContent::Json(Box::new(req_obj))) } fn build_request( @@ -196,7 +192,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { + ) -> CustomResult { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -333,7 +329,7 @@ impl ConnectorIntegration, _connectors: &settings::Connectors, - ) -> CustomResult, errors::ConnectorError> { + ) -> CustomResult { let connector_router_data = placetopay::PlacetopayRouterData::try_from(( &self.get_currency_unit(), req.request.currency, @@ -404,12 +400,7 @@ impl ConnectorIntegration::encode_to_string_of_json, - ) - .change_context(errors::ConnectorError::RequestEncodingFailed)?; - Ok(Some(placetopay_req)) + Ok(RequestContent::Json(Box::new(req_obj))) } fn build_request( @@ -424,7 +415,7 @@ impl ConnectorIntegration