diff --git a/connector-template/mod.rs b/connector-template/mod.rs index b27a0774e714..7f21962109de 100644 --- a/connector-template/mod.rs +++ b/connector-template/mod.rs @@ -157,7 +157,7 @@ impl Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } - fn get_request_body(&self, req: &types::PaymentsAuthorizeRouterData) -> CustomResult, errors::ConnectorError> { + fn get_request_body(&self, req: &types::PaymentsAuthorizeRouterData, _connectors: &settings::Connectors,) -> CustomResult, errors::ConnectorError> { let connector_router_data = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}RouterData::try_from(( &self.get_currency_unit(), @@ -186,7 +186,7 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body(self, req, connectors)?) .build(), )) } @@ -302,6 +302,7 @@ impl fn get_request_body( &self, _req: &types::PaymentsCaptureRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -319,7 +320,7 @@ impl .headers(types::PaymentsCaptureType::get_headers( self, req, connectors, )?) - .body(types::PaymentsCaptureType::get_request_body(self, req)?) + .body(types::PaymentsCaptureType::get_request_body(self, req, connectors)?) .build(), )) } @@ -374,7 +375,7 @@ impl Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into()) } - fn get_request_body(&self, req: &types::RefundsRouterData) -> CustomResult, errors::ConnectorError> { + fn get_request_body(&self, req: &types::RefundsRouterData, _connectors: &settings::Connectors,) -> CustomResult, errors::ConnectorError> { let connector_router_data = {{project-name | downcase}}::{{project-name | downcase | pascal_case}}RouterData::try_from(( &self.get_currency_unit(), @@ -394,7 +395,7 @@ impl .url(&types::RefundExecuteType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::RefundExecuteType::get_headers(self, req, connectors)?) - .body(types::RefundExecuteType::get_request_body(self, req)?) + .body(types::RefundExecuteType::get_request_body(self, req, connectors)?) .build(); Ok(Some(request)) } @@ -442,7 +443,7 @@ impl .url(&types::RefundSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::RefundSyncType::get_headers(self, req, connectors)?) - .body(types::RefundSyncType::get_request_body(self, req)?) + .body(types::RefundSyncType::get_request_body(self, req, connectors)?) .build(), )) } diff --git a/crates/router/src/connector/aci.rs b/crates/router/src/connector/aci.rs index 7dbe2a0cd9a2..f6389c802f9e 100644 --- a/crates/router/src/connector/aci.rs +++ b/crates/router/src/connector/aci.rs @@ -201,7 +201,9 @@ impl .url(&types::PaymentsSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?) - .body(types::PaymentsSyncType::get_request_body(self, req)?) + .body(types::PaymentsSyncType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -280,6 +282,7 @@ impl fn get_request_body( &self, req: &types::PaymentsAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { // encode only for for urlencoded things. let connector_router_data = aci::AciRouterData::try_from(( @@ -317,7 +320,9 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -386,6 +391,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCancelRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = aci::AciCancelRequest::try_from(req)?; let aci_req = types::RequestBody::log_and_get_request_body( @@ -406,7 +412,9 @@ impl .url(&types::PaymentsVoidType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?) - .body(types::PaymentsVoidType::get_request_body(self, req)?) + .body(types::PaymentsVoidType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -479,6 +487,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = aci::AciRouterData::try_from(( &self.get_currency_unit(), @@ -508,7 +517,9 @@ impl services::ConnectorIntegration CustomResult, errors::ConnectorError> { let authorize_req = types::PaymentsAuthorizeRouterData::from(( req, @@ -203,7 +204,9 @@ impl .url(&types::SetupMandateType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::SetupMandateType::get_headers(self, req, connectors)?) - .body(types::SetupMandateType::get_request_body(self, req)?) + .body(types::SetupMandateType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -306,6 +309,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCaptureRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -334,7 +338,9 @@ impl .headers(types::PaymentsCaptureType::get_headers( self, req, connectors, )?) - .body(types::PaymentsCaptureType::get_request_body(self, req)?) + .body(types::PaymentsCaptureType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -398,6 +404,7 @@ impl fn get_request_body( &self, req: &types::RouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { // Adyen doesn't support PSync flow. We use PSync flow to fetch payment details, // specifically the redirect URL that takes the user to their Payment page. In non-redirection flows, @@ -482,7 +489,7 @@ impl req: &types::RouterData, connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { - let request_body = self.get_request_body(req)?; + let request_body = self.get_request_body(req, connectors)?; match request_body { Some(_) => Ok(Some( services::RequestBuilder::new() @@ -490,7 +497,9 @@ impl .url(&types::PaymentsSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?) - .body(types::PaymentsSyncType::get_request_body(self, req)?) + .body(types::PaymentsSyncType::get_request_body( + self, req, connectors, + )?) .build(), )), None => Ok(None), @@ -632,6 +641,7 @@ impl fn get_request_body( &self, req: &types::PaymentsAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -664,7 +674,9 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -752,6 +764,7 @@ impl fn get_request_body( &self, req: &types::PaymentsBalanceRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = adyen::AdyenBalanceRequest::try_from(req)?; @@ -776,7 +789,9 @@ impl .headers(types::PaymentsBalanceType::get_headers( self, req, connectors, )?) - .body(types::PaymentsBalanceType::get_request_body(self, req)?) + .body(types::PaymentsBalanceType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -845,6 +860,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCancelRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = adyen::AdyenCancelRequest::try_from(req)?; @@ -866,7 +882,9 @@ impl .url(&types::PaymentsVoidType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?) - .body(types::PaymentsVoidType::get_request_body(self, req)?) + .body(types::PaymentsVoidType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -955,6 +973,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = adyen::AdyenPayoutCancelRequest::try_from(req)?; let adyen_req = types::RequestBody::log_and_get_request_body( @@ -975,7 +994,9 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -1066,7 +1088,9 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -1162,7 +1187,9 @@ impl .headers(types::PayoutEligibilityType::get_headers( self, req, connectors, )?) - .body(types::PayoutEligibilityType::get_request_body(self, req)?) + .body(types::PayoutEligibilityType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) @@ -1241,6 +1268,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -1269,7 +1297,9 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = adyen::AdyenRouterData::try_from(( &self.get_currency_unit(), @@ -1369,7 +1400,9 @@ impl services::ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = airwallex::AirwallexIntentRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -274,7 +277,9 @@ impl .url(&types::PaymentsInitType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsInitType::get_headers(self, req, connectors)?) - .body(types::PaymentsInitType::get_request_body(self, req)?) + .body(types::PaymentsInitType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -373,6 +378,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = airwallex::AirwallexRouterData::try_from(( &self.get_currency_unit(), @@ -404,7 +410,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = airwallex::AirwallexCompleteRequest::try_from(req)?; @@ -572,7 +581,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -635,6 +644,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = airwallex::AirwallexPaymentsCaptureRequest::try_from(req)?; @@ -660,7 +670,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = airwallex::AirwallexPaymentsCancelRequest::try_from(req)?; @@ -773,7 +786,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = airwallex::AirwallexRouterData::try_from(( &self.get_currency_unit(), @@ -848,7 +864,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = authorizedotnet::AuthorizedotnetRouterData::try_from(( &self.get_currency_unit(), @@ -176,7 +177,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = authorizedotnet::AuthorizedotnetCreateSyncRequest::try_from(req)?; let sync_request = types::RequestBody::log_and_get_request_body( @@ -261,7 +265,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = authorizedotnet::AuthorizedotnetRouterData::try_from(( &self.get_currency_unit(), @@ -362,7 +369,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = authorizedotnet::CancelOrCaptureTransactionRequest::try_from(req)?; @@ -445,7 +455,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = authorizedotnet::AuthorizedotnetRouterData::try_from(( &self.get_currency_unit(), @@ -542,7 +555,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = authorizedotnet::AuthorizedotnetRouterData::try_from(( &self.get_currency_unit(), @@ -634,7 +650,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = authorizedotnet::AuthorizedotnetRouterData::try_from(( &self.get_currency_unit(), @@ -735,7 +754,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) diff --git a/crates/router/src/connector/bambora.rs b/crates/router/src/connector/bambora.rs index d0ed9929a77b..802be26408df 100644 --- a/crates/router/src/connector/bambora.rs +++ b/crates/router/src/connector/bambora.rs @@ -173,6 +173,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let request = bambora::BamboraPaymentsRequest::try_from(req)?; @@ -195,7 +196,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = bambora::BamboraPaymentsCaptureRequest::try_from(req)?; let bambora_req = types::RequestBody::log_and_get_request_body( @@ -368,7 +370,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let request = bambora::BamboraPaymentsRequest::try_from(req)?; @@ -464,7 +467,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = bambora::BamboraRefundRequest::try_from(req)?; let bambora_req = types::RequestBody::log_and_get_request_body( @@ -557,7 +563,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let request = bambora::BamboraThreedsContinueRequest::try_from(&req.request)?; @@ -766,7 +777,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(); Ok(Some(request)) diff --git a/crates/router/src/connector/bankofamerica.rs b/crates/router/src/connector/bankofamerica.rs index a51fcc0ad626..84870f7407fb 100644 --- a/crates/router/src/connector/bankofamerica.rs +++ b/crates/router/src/connector/bankofamerica.rs @@ -166,6 +166,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = bankofamerica::BankofamericaRouterData::try_from(( &self.get_currency_unit(), @@ -198,7 +199,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -332,7 +336,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = bankofamerica::BankofamericaRouterData::try_from(( &self.get_currency_unit(), @@ -420,7 +427,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = bitpay::BitpayRouterData::try_from(( &self.get_currency_unit(), @@ -205,7 +206,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = bluesnap::BluesnapVoidRequest::try_from(req)?; let bluesnap_req = types::RequestBody::log_and_get_request_body( @@ -283,7 +284,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = bluesnap::BluesnapRouterData::try_from(( &self.get_currency_unit(), @@ -465,7 +469,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = bluesnap::BluesnapCreateWalletToken::try_from(req)?; let bluesnap_req = types::RequestBody::log_and_get_request_body( @@ -552,7 +559,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = bluesnap::BluesnapRouterData::try_from(( &self.get_currency_unit(), @@ -668,7 +678,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = bluesnap::BluesnapRouterData::try_from(( &self.get_currency_unit(), @@ -789,7 +802,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -855,6 +868,7 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = bluesnap::BluesnapRouterData::try_from(( &self.get_currency_unit(), @@ -883,7 +897,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = boku::BokuPaymentsRequest::try_from(req)?; let boku_req = types::RequestBody::log_and_get_request_body( @@ -232,7 +233,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = boku::BokuPsyncRequest::try_from(req)?; let boku_req = types::RequestBody::log_and_get_request_body( @@ -318,7 +322,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -395,7 +402,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = boku::BokuRefundRequest::try_from(req)?; let boku_req = types::RequestBody::log_and_get_request_body( @@ -485,7 +495,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = boku::BokuRsyncRequest::try_from(req)?; let boku_req = types::RequestBody::log_and_get_request_body( @@ -564,7 +577,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = braintree::BraintreeSessionRequest::try_from(req)?; let braintree_session_request = types::RequestBody::log_and_get_request_body( @@ -324,6 +327,7 @@ impl fn get_request_body( &self, req: &types::TokenizationRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = braintree_graphql_transformers::BraintreeTokenRequest::try_from(req)?; @@ -349,7 +353,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )), false => Ok(None), @@ -439,6 +445,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version.clone(); let connector_router_data = @@ -484,7 +491,9 @@ impl ConnectorIntegration Err(errors::ConnectorError::NotImplemented( @@ -589,6 +598,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version; match self.is_braintree_graphql_version(connector_api_version) { @@ -620,7 +630,9 @@ impl ConnectorIntegration Ok(Some( @@ -629,7 +641,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version; let connector_router_data = @@ -920,7 +937,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version; match self.is_braintree_graphql_version(connector_api_version) { @@ -1057,6 +1077,7 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version; let connector_router_data = @@ -1103,7 +1124,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_api_version = &req.connector_api_version; match self.is_braintree_graphql_version(connector_api_version) { @@ -1221,7 +1245,9 @@ impl ConnectorIntegration Ok(None), @@ -1586,6 +1612,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCompleteAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = braintree_graphql_transformers::BraintreeRouterData::try_from(( @@ -1631,7 +1658,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )), diff --git a/crates/router/src/connector/cashtocode.rs b/crates/router/src/connector/cashtocode.rs index 75433cfd0f13..12a52e485396 100644 --- a/crates/router/src/connector/cashtocode.rs +++ b/crates/router/src/connector/cashtocode.rs @@ -203,6 +203,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = cashtocode::CashtocodePaymentsRequest::try_from(req)?; let cashtocode_req = types::RequestBody::log_and_get_request_body( @@ -228,7 +229,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = checkout::TokenRequest::try_from(req)?; let checkout_req = types::RequestBody::log_and_get_request_body( @@ -229,7 +230,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -313,6 +316,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = checkout::CheckoutRouterData::try_from(( &self.get_currency_unit(), @@ -342,7 +346,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = checkout::CheckoutRouterData::try_from(( &self.get_currency_unit(), @@ -532,7 +541,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = checkout::PaymentVoidRequest::try_from(req)?; let checkout_req = types::RequestBody::log_and_get_request_body( @@ -609,7 +621,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = checkout::CheckoutRouterData::try_from(( &self.get_currency_unit(), @@ -704,7 +719,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let checkout_req = checkout::Evidence::try_from(req)?; let checkout_req_string = types::RequestBody::log_and_get_request_body( @@ -1065,7 +1085,9 @@ impl .headers(types::SubmitEvidenceType::get_headers( self, req, connectors, )?) - .body(types::SubmitEvidenceType::get_request_body(self, req)?) + .body(types::SubmitEvidenceType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) } diff --git a/crates/router/src/connector/coinbase.rs b/crates/router/src/connector/coinbase.rs index f26100fcc8cf..5704ea15b005 100644 --- a/crates/router/src/connector/coinbase.rs +++ b/crates/router/src/connector/coinbase.rs @@ -184,6 +184,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = coinbase::CoinbasePaymentsRequest::try_from(req)?; let coinbase_payment_request = types::RequestBody::log_and_get_request_body( @@ -208,7 +209,9 @@ impl ConnectorIntegration CustomResult)>, errors::ConnectorError> { let api_method; - let payload = match self.get_request_body(req)? { + let payload = match self.get_request_body(req, connectors)? { Some(val) => { let body = types::RequestBody::get_inner_value(val).peek().to_owned(); api_method = "POST".to_string(); @@ -217,6 +217,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = cryptopay::CryptopayRouterData::try_from(( &self.get_currency_unit(), @@ -249,7 +250,9 @@ impl ConnectorIntegration CustomResult)>, errors::ConnectorError> { let date = OffsetDateTime::now_utc(); - let cybersource_req = self.get_request_body(req)?; + let cybersource_req = self.get_request_body(req, connectors)?; let auth = cybersource::CybersourceAuthType::try_from(&req.connector_auth_type)?; let merchant_account = auth.merchant_account.clone(); let base_url = connectors.cybersource.base_url.as_str(); @@ -298,6 +298,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = cybersource::CybersourcePaymentsRequest::try_from(req)?; let cybersource_payments_request = types::RequestBody::log_and_get_request_body( @@ -320,7 +321,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Ok(Some( types::RequestBody::log_and_get_request_body("{}".to_string(), Ok) @@ -472,6 +476,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = cybersource::CybersourceRouterData::try_from(( &self.get_currency_unit(), @@ -503,7 +508,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Ok(Some( types::RequestBody::log_and_get_request_body("{}".to_string(), Ok) @@ -588,7 +594,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = cybersource::CybersourceRefundRequest::try_from(req)?; let cybersource_refund_request = types::RequestBody::log_and_get_request_body( @@ -679,7 +686,7 @@ impl ConnectorIntegration, - _connectors: &settings::Connectors, + connectors: &settings::Connectors, ) -> CustomResult)>, errors::ConnectorError> { - let dlocal_req = match self.get_request_body(req)? { + let dlocal_req = match self.get_request_body(req, connectors)? { Some(val) => val, None => types::RequestBody::log_and_get_request_body("".to_string(), Ok) .change_context(errors::ConnectorError::RequestEncodingFailed)?, @@ -211,6 +211,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = dlocal::DlocalRouterData::try_from(( &self.get_currency_unit(), @@ -242,7 +243,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = dlocal::DlocalPaymentsCaptureRequest::try_from(req)?; let dlocal_payments_capture_request = types::RequestBody::log_and_get_request_body( @@ -392,7 +396,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = dlocal::DlocalRouterData::try_from(( &self.get_currency_unit(), @@ -546,7 +553,9 @@ impl ConnectorIntegration fn get_request_body( &self, req: &types::PaymentsAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = transformers::DummyConnectorPaymentsRequest::::try_from(req)?; let dummmy_payments_request = types::RequestBody::log_and_get_request_body( @@ -213,7 +214,9 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -348,6 +351,7 @@ impl fn get_request_body( &self, _req: &types::PaymentsCaptureRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -430,6 +434,7 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = transformers::DummyConnectorRefundRequest::try_from(req)?; let dummmy_refund_request = types::RequestBody::log_and_get_request_body( @@ -452,7 +457,9 @@ impl ConnectorIntegration ConnectorIntegration, - _connectors: &settings::Connectors, + connectors: &settings::Connectors, ) -> CustomResult)>, errors::ConnectorError> { let timestamp = OffsetDateTime::now_utc().unix_timestamp_nanos() / 1_000_000; let auth: fiserv::FiservAuthType = @@ -70,7 +70,7 @@ where let mut auth_header = self.get_auth_header(&req.connector_auth_type)?; let fiserv_req = self - .get_request_body(req)? + .get_request_body(req, connectors)? .ok_or(errors::ConnectorError::RequestEncodingFailed)?; let client_request_id = Uuid::new_v4().to_string(); @@ -246,6 +246,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = fiserv::FiservCancelRequest::try_from(req)?; let fiserv_payments_cancel_request = types::RequestBody::log_and_get_request_body( @@ -267,7 +268,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = fiserv::FiservSyncRequest::try_from(req)?; let fiserv_payments_sync_request = types::RequestBody::log_and_get_request_body( @@ -353,7 +357,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let router_obj = fiserv::FiservRouterData::try_from(( &self.get_currency_unit(), @@ -434,7 +441,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let router_obj = fiserv::FiservRouterData::try_from(( &self.get_currency_unit(), @@ -547,7 +557,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let router_obj = fiserv::FiservRouterData::try_from(( &self.get_currency_unit(), @@ -636,7 +649,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = fiserv::FiservSyncRequest::try_from(req)?; let fiserv_sync_request = types::RequestBody::log_and_get_request_body( @@ -716,7 +732,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = forte::FortePaymentsRequest::try_from(req)?; let forte_req = types::RequestBody::log_and_get_request_body( @@ -226,7 +227,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = forte::ForteCaptureRequest::try_from(req)?; let forte_req = types::RequestBody::log_and_get_request_body( @@ -380,7 +384,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = forte::ForteCancelRequest::try_from(req)?; let forte_req = types::RequestBody::log_and_get_request_body( @@ -461,7 +468,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = forte::ForteRefundRequest::try_from(req)?; let forte_req = types::RequestBody::log_and_get_request_body( @@ -542,7 +552,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let globalpay_req = types::RequestBody::log_and_get_request_body("{}".to_string(), Ok) .change_context(errors::ConnectorError::RequestEncodingFailed)?; @@ -187,7 +188,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -263,7 +264,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = GlobalpayRefreshTokenRequest::try_from(req)?; let globalpay_req = types::RequestBody::log_and_get_request_body( @@ -383,7 +387,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = requests::GlobalpayCancelRequest::try_from(req)?; let globalpay_req = types::RequestBody::log_and_get_request_body( @@ -541,6 +548,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = requests::GlobalpayCaptureRequest::try_from(req)?; let globalpay_req = types::RequestBody::log_and_get_request_body( @@ -564,7 +572,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = GlobalpayPaymentsRequest::try_from(req)?; let globalpay_req = types::RequestBody::log_and_get_request_body( @@ -655,7 +666,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = requests::GlobalpayRefundRequest::try_from(req)?; let globalpay_req = types::RequestBody::log_and_get_request_body( @@ -742,7 +756,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = globepay::GlobepayPaymentsRequest::try_from(req)?; let globepay_req = types::RequestBody::log_and_get_request_body( @@ -213,7 +214,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = globepay::GlobepayRefundRequest::try_from(req)?; let globepay_req = types::RequestBody::log_and_get_request_body( @@ -387,7 +391,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = gocardless::GocardlessCustomerRequest::try_from(req)?; let gocardless_req = types::RequestBody::log_and_get_request_body( @@ -178,7 +179,9 @@ impl .headers(types::ConnectorCustomerType::get_headers( self, req, connectors, )?) - .body(types::ConnectorCustomerType::get_request_body(self, req)?) + .body(types::ConnectorCustomerType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -248,6 +251,7 @@ impl fn get_request_body( &self, req: &types::TokenizationRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = gocardless::GocardlessBankAccountRequest::try_from(req)?; let gocardless_req = types::RequestBody::log_and_get_request_body( @@ -269,7 +273,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -366,6 +372,7 @@ impl fn get_request_body( &self, req: &types::SetupMandateRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = gocardless::GocardlessMandateRequest::try_from(req)?; let gocardless_req = types::RequestBody::log_and_get_request_body( @@ -389,7 +396,9 @@ impl .url(&types::SetupMandateType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::SetupMandateType::get_headers(self, req, connectors)?) - .body(types::SetupMandateType::get_request_body(self, req)?) + .body(types::SetupMandateType::get_request_body( + self, req, connectors, + )?) .build(), )) } else { @@ -447,6 +456,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = gocardless::GocardlessRouterData::try_from(( &self.get_currency_unit(), @@ -478,7 +488,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = gocardless::GocardlessRouterData::try_from(( &self.get_currency_unit(), @@ -640,7 +653,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = helcim::HelcimVerifyRequest::try_from(req)?; @@ -214,7 +215,9 @@ impl .url(&types::SetupMandateType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::SetupMandateType::get_headers(self, req, connectors)?) - .body(types::SetupMandateType::get_request_body(self, req)?) + .body(types::SetupMandateType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -270,6 +273,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = helcim::HelcimRouterData::try_from(( &self.get_currency_unit(), @@ -301,7 +305,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = helcim::HelcimRouterData::try_from(( &self.get_currency_unit(), @@ -470,7 +477,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = helcim::HelcimVoidRequest::try_from(req)?; let helcim_req = types::RequestBody::log_and_get_request_body( @@ -546,7 +556,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = helcim::HelcimRouterData::try_from(( &self.get_currency_unit(), @@ -628,7 +641,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = iatapay::IatapayAuthUpdateRequest::try_from(req)?; let iatapay_req = types::RequestBody::log_and_get_request_body( @@ -199,7 +200,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = iatapay::IatapayRouterData::try_from(( &self.get_currency_unit(), @@ -307,7 +311,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = iatapay::IatapayRouterData::try_from(( &self.get_currency_unit(), @@ -490,7 +497,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = klarna::KlarnaSessionRequest::try_from(req)?; // encode only for for urlencoded things. @@ -178,7 +179,9 @@ impl .headers(types::PaymentsSessionType::get_headers( self, req, connectors, )?) - .body(types::PaymentsSessionType::get_request_body(self, req)?) + .body(types::PaymentsSessionType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -410,6 +413,7 @@ impl fn get_request_body( &self, req: &types::PaymentsAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = klarna::KlarnaRouterData::try_from(( &self.get_currency_unit(), @@ -441,7 +445,9 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(), )) } diff --git a/crates/router/src/connector/mollie.rs b/crates/router/src/connector/mollie.rs index 94da85b19d2d..ef3eb6a3e7b3 100644 --- a/crates/router/src/connector/mollie.rs +++ b/crates/router/src/connector/mollie.rs @@ -150,6 +150,7 @@ impl fn get_request_body( &self, req: &types::TokenizationRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = mollie::MollieCardTokenRequest::try_from(req)?; let mollie_req = types::RequestBody::log_and_get_request_body( @@ -170,7 +171,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -233,6 +236,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let router_obj = mollie::MollieRouterData::try_from(( &self.get_currency_unit(), @@ -264,7 +268,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let router_obj = mollie::MollieRouterData::try_from(( &self.get_currency_unit(), @@ -455,7 +462,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = multisafepay::MultisafepayRouterData::try_from(( &self.get_currency_unit(), @@ -293,7 +294,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = multisafepay::MultisafepayRouterData::try_from(( &self.get_currency_unit(), @@ -392,7 +396,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nexinets::NexinetsPaymentsRequest::try_from(req)?; let nexinets_req = types::RequestBody::log_and_get_request_body( @@ -225,7 +226,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = nexinets::NexinetsCaptureOrVoidRequest::try_from(req)?; let nexinets_req = types::RequestBody::log_and_get_request_body( @@ -385,7 +389,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = nexinets::NexinetsCaptureOrVoidRequest::try_from(req)?; let nexinets_req = types::RequestBody::log_and_get_request_body( @@ -466,7 +473,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = nexinets::NexinetsRefundRequest::try_from(req)?; let nexinets_req = types::RequestBody::log_and_get_request_body( @@ -551,7 +561,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = nmi::NmiPaymentsRequest::try_from(req)?; let nmi_req = types::RequestBody::log_and_get_request_body( @@ -163,7 +164,9 @@ impl .method(services::Method::Post) .url(&types::SetupMandateType::get_url(self, req, connectors)?) .headers(types::SetupMandateType::get_headers(self, req, connectors)?) - .body(types::SetupMandateType::get_request_body(self, req)?) + .body(types::SetupMandateType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -213,6 +216,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = nmi::NmiRouterData::try_from(( &self.get_currency_unit(), @@ -243,7 +247,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = nmi::NmiSyncRequest::try_from(req)?; let nmi_req = types::RequestBody::log_and_get_request_body( @@ -313,7 +320,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = nmi::NmiRouterData::try_from(( &self.get_currency_unit(), @@ -388,7 +398,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = nmi::NmiCancelRequest::try_from(req)?; let nmi_req = types::RequestBody::log_and_get_request_body( @@ -458,7 +471,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = nmi::NmiRouterData::try_from(( &self.get_currency_unit(), @@ -534,7 +550,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = nmi::NmiSyncRequest::try_from(req)?; let nmi_req = types::RequestBody::log_and_get_request_body( @@ -602,7 +621,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = noon::NoonPaymentsRequest::try_from(req)?; let noon_req = types::RequestBody::log_and_get_request_body( @@ -227,7 +228,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = noon::NoonPaymentsActionRequest::try_from(req)?; let noon_req = types::RequestBody::log_and_get_request_body( @@ -371,7 +375,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = noon::NoonPaymentsCancelRequest::try_from(req)?; let noon_req = types::RequestBody::log_and_get_request_body( @@ -446,7 +453,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = noon::NoonPaymentsActionRequest::try_from(req)?; let noon_req = types::RequestBody::log_and_get_request_body( @@ -521,7 +531,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let meta: nuvei::NuveiMeta = utils::to_connector_meta(req.request.connector_meta.clone())?; let req_obj = nuvei::NuveiPaymentsRequest::try_from((req, meta.session_token))?; @@ -176,7 +177,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -235,6 +236,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentFlowRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -255,7 +257,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentSyncRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -339,7 +344,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentFlowRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -421,7 +429,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentsRequest::try_from((req, req.get_session_token()?))?; let req = types::RequestBody::log_and_get_request_body( @@ -581,7 +592,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiSessionRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -670,7 +684,7 @@ impl self, req, connectors, )?) .body(types::PaymentsPreAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -727,6 +741,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentsRequest::try_from((req, req.get_session_token()?))?; let req = types::RequestBody::log_and_get_request_body( @@ -749,7 +764,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = nuvei::NuveiPaymentFlowRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -828,7 +846,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = opayo::OpayoPaymentsRequest::try_from(req)?; let opayo_req = types::RequestBody::log_and_get_request_body( @@ -198,7 +199,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -332,7 +336,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = opayo::OpayoRefundRequest::try_from(req)?; @@ -413,7 +420,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = opennode::OpennodeRouterData::try_from(( &self.get_currency_unit(), @@ -203,7 +204,9 @@ impl ConnectorIntegration, - _connectors: &settings::Connectors, + connectors: &settings::Connectors, ) -> CustomResult)>, errors::ConnectorError> { let auth = payeezy::PayeezyAuthType::try_from(&req.connector_auth_type)?; - let option_request_payload = self.get_request_body(req)?; + let option_request_payload = self.get_request_body(req, connectors)?; let request_payload = option_request_payload.map_or("{}".to_string(), |payload| { types::RequestBody::get_inner_value(payload).expose() }); @@ -200,6 +200,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = payeezy::PayeezyCaptureOrVoidRequest::try_from(req)?; let payeezy_req = types::RequestBody::log_and_get_request_body( @@ -220,7 +221,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let router_obj = payeezy::PayeezyRouterData::try_from(( &self.get_currency_unit(), @@ -325,7 +329,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let router_obj = payeezy::PayeezyRouterData::try_from(( &self.get_currency_unit(), @@ -422,7 +429,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let router_obj = payeezy::PayeezyRouterData::try_from(( &self.get_currency_unit(), @@ -514,7 +524,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = payme::CaptureBuyerRequest::try_from(req)?; @@ -173,7 +174,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), ), AuthenticationType::NoThreeDs => None, @@ -253,6 +256,7 @@ impl fn get_request_body( &self, req: &types::PaymentsPreProcessingRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let amount = req.request.get_amount()?; let currency = req.request.get_currency()?; @@ -283,7 +287,7 @@ impl self, req, connectors, )?) .body(types::PaymentsPreProcessingType::get_request_body( - self, req, + self, req, connectors, )?) .build(), ); @@ -378,6 +382,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCompleteAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = payme::Pay3dsRequest::try_from(req)?; let payme_req = types::RequestBody::log_and_get_request_body( @@ -403,7 +408,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -480,6 +485,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = payme::PaymeRouterData::try_from(( &self.get_currency_unit(), @@ -511,7 +517,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = payme::PaymeQuerySaleRequest::try_from(req)?; let payme_req = types::RequestBody::log_and_get_request_body( @@ -595,7 +604,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = payme::PaymeRouterData::try_from(( &self.get_currency_unit(), @@ -688,7 +700,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = payme::PaymeRouterData::try_from(( &self.get_currency_unit(), @@ -793,7 +808,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = payme::PaymeQueryTransactionRequest::try_from(req)?; let payme_req = types::RequestBody::log_and_get_request_body( @@ -874,7 +892,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = paypal::PaypalAuthUpdateRequest::try_from(req)?; let paypal_req = types::RequestBody::log_and_get_request_body( @@ -304,7 +305,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = paypal::PaypalRouterData::try_from(( &self.get_currency_unit(), @@ -415,7 +419,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = paypal::PaypalRouterData::try_from(( &self.get_currency_unit(), @@ -717,7 +724,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = paypal::PaypalRouterData::try_from(( &self.get_currency_unit(), @@ -877,7 +887,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = paypal::PaypalSourceVerificationRequest::try_from(&req.request)?; let paypal_req = types::RequestBody::log_and_get_request_body( diff --git a/crates/router/src/connector/payu.rs b/crates/router/src/connector/payu.rs index 305e49fea06d..9a8d4734f837 100644 --- a/crates/router/src/connector/payu.rs +++ b/crates/router/src/connector/payu.rs @@ -244,6 +244,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = payu::PayuAuthUpdateRequest::try_from(req)?; let payu_req = types::RequestBody::log_and_get_request_body( @@ -266,7 +267,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = payu::PayuPaymentsCaptureRequest::try_from(req)?; let payu_req = types::RequestBody::log_and_get_request_body( @@ -441,7 +445,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = payu::PayuPaymentsRequest::try_from(req)?; let payu_req = types::RequestBody::log_and_get_request_body( @@ -541,7 +548,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = payu::PayuRefundRequest::try_from(req)?; let payu_req = types::RequestBody::log_and_get_request_body( @@ -628,7 +638,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = powertranz::PowertranzPaymentsRequest::try_from(req)?; let powertranz_req = types::RequestBody::log_and_get_request_body( @@ -219,7 +220,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let redirect_payload: powertranz::RedirectResponsePayload = req .request @@ -309,7 +313,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -371,6 +375,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = powertranz::PowertranzBaseRequest::try_from(&req.request)?; let powertranz_req = types::RequestBody::log_and_get_request_body( @@ -394,7 +399,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = powertranz::PowertranzBaseRequest::try_from(&req.request)?; let powertranz_req = types::RequestBody::log_and_get_request_body( @@ -482,7 +490,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = powertranz::PowertranzBaseRequest::try_from(req)?; let powertranz_req = types::RequestBody::log_and_get_request_body( @@ -543,7 +554,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = prophetpay::ProphetpayRouterData::try_from(( &self.get_currency_unit(), @@ -196,7 +197,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -330,7 +334,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = prophetpay::ProphetpayRouterData::try_from(( &self.get_currency_unit(), @@ -418,7 +425,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = rapyd::RapydRouterData::try_from(( &self.get_currency_unit(), @@ -212,7 +213,7 @@ impl let salt = Alphanumeric.sample_string(&mut rand::thread_rng(), 12); let auth: rapyd::RapydAuthType = rapyd::RapydAuthType::try_from(&req.connector_auth_type)?; - let body = types::PaymentsAuthorizeType::get_request_body(self, req)? + let body = types::PaymentsAuthorizeType::get_request_body(self, req, connectors)? .ok_or(errors::ConnectorError::RequestEncodingFailed)?; let req_body = types::RequestBody::get_inner_value(body).expose(); let signature = @@ -233,7 +234,9 @@ impl self, req, connectors, )?) .headers(headers) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) } @@ -493,6 +496,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCaptureRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = rapyd::RapydRouterData::try_from(( &self.get_currency_unit(), @@ -522,7 +526,7 @@ impl "/v1/payments/{}/capture", req.request.connector_transaction_id ); - let body = types::PaymentsCaptureType::get_request_body(self, req)? + let body = types::PaymentsCaptureType::get_request_body(self, req, connectors)? .ok_or(errors::ConnectorError::RequestEncodingFailed)?; let req_body = types::RequestBody::get_inner_value(body).expose(); let signature = @@ -541,7 +545,9 @@ impl self, req, connectors, )?) .headers(headers) - .body(types::PaymentsCaptureType::get_request_body(self, req)?) + .body(types::PaymentsCaptureType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) } @@ -631,6 +637,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = rapyd::RapydRouterData::try_from(( &self.get_currency_unit(), @@ -656,7 +663,7 @@ impl services::ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = shift4::Shift4PaymentsRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -249,7 +250,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = shift4::Shift4PaymentsRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -496,7 +500,9 @@ impl .content_type(request::ContentType::FormUrlEncoded) .attach_default_headers() .headers(types::PaymentsInitType::get_headers(self, req, connectors)?) - .body(types::PaymentsInitType::get_request_body(self, req)?) + .body(types::PaymentsInitType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -556,6 +562,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCompleteAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = shift4::Shift4PaymentsRequest::try_from(req)?; let req = types::RequestBody::log_and_get_request_body( @@ -581,7 +588,7 @@ impl self, req, connectors, )?) .body(types::PaymentsCompleteAuthorizeType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -636,6 +643,7 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = shift4::Shift4RefundRequest::try_from(req)?; let shift4_req = types::RequestBody::log_and_get_request_body( @@ -658,7 +666,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = square::SquareTokenRequest::try_from(req)?; @@ -268,7 +269,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -413,6 +416,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = square::SquarePaymentsRequest::try_from(req)?; @@ -439,7 +443,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = square::SquareRefundRequest::try_from(req)?; let square_req = types::RequestBody::log_and_get_request_body( @@ -725,7 +732,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = stax::StaxCustomerRequest::try_from(req)?; @@ -187,7 +188,9 @@ impl .headers(types::ConnectorCustomerType::get_headers( self, req, connectors, )?) - .body(types::ConnectorCustomerType::get_request_body(self, req)?) + .body(types::ConnectorCustomerType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -250,6 +253,7 @@ impl fn get_request_body( &self, req: &types::TokenizationRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stax::StaxTokenRequest::try_from(req)?; @@ -272,7 +276,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -351,6 +357,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = stax::StaxRouterData::try_from(( &self.get_currency_unit(), @@ -383,7 +390,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = stax::StaxRouterData::try_from(( &self.get_currency_unit(), @@ -542,7 +552,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = stax::StaxRouterData::try_from(( &self.get_currency_unit(), @@ -701,7 +714,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req = stripe::StripeCreditTransferSourceRequest::try_from(req)?; let pre_processing_request = types::RequestBody::log_and_get_request_body( @@ -171,7 +172,7 @@ impl self, req, connectors, )?) .body(types::PaymentsPreProcessingType::get_request_body( - self, req, + self, req, connectors, )?) .build(), )) @@ -270,6 +271,7 @@ impl fn get_request_body( &self, req: &types::ConnectorCustomerRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stripe::CustomerRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -295,7 +297,9 @@ impl .headers(types::ConnectorCustomerType::get_headers( self, req, connectors, )?) - .body(types::ConnectorCustomerType::get_request_body(self, req)?) + .body(types::ConnectorCustomerType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -397,6 +401,7 @@ impl fn get_request_body( &self, req: &types::TokenizationRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stripe::TokenRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -418,7 +423,9 @@ impl .url(&types::TokenizationType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::TokenizationType::get_headers(self, req, connectors)?) - .body(types::TokenizationType::get_request_body(self, req)?) + .body(types::TokenizationType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -526,6 +533,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCaptureRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stripe::CaptureRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -549,7 +557,9 @@ impl .headers(types::PaymentsCaptureType::get_headers( self, req, connectors, )?) - .body(types::PaymentsCaptureType::get_request_body(self, req)?) + .body(types::PaymentsCaptureType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -671,7 +681,9 @@ impl .url(&types::PaymentsSyncType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsSyncType::get_headers(self, req, connectors)?) - .body(types::PaymentsSyncType::get_request_body(self, req)?) + .body(types::PaymentsSyncType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -810,6 +822,7 @@ impl fn get_request_body( &self, req: &types::PaymentsAuthorizeRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { match &req.request.payment_method_data { api_models::payments::PaymentMethodData::BankTransfer(bank_transfer_data) => { @@ -842,7 +855,9 @@ impl .headers(types::PaymentsAuthorizeType::get_headers( self, req, connectors, )?) - .body(types::PaymentsAuthorizeType::get_request_body(self, req)?) + .body(types::PaymentsAuthorizeType::get_request_body( + self, req, connectors, + )?) .build(), )) } @@ -950,6 +965,7 @@ impl fn get_request_body( &self, req: &types::PaymentsCancelRouterData, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stripe::CancelRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -970,7 +986,9 @@ impl .url(&types::PaymentsVoidType::get_url(self, req, connectors)?) .attach_default_headers() .headers(types::PaymentsVoidType::get_headers(self, req, connectors)?) - .body(types::PaymentsVoidType::get_request_body(self, req)?) + .body(types::PaymentsVoidType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) } @@ -1084,6 +1102,7 @@ impl types::SetupMandateRequestData, types::PaymentsResponseData, >, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req = stripe::SetupIntentRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -1109,7 +1128,7 @@ impl .url(&Verify::get_url(self, req, connectors)?) .attach_default_headers() .headers(Verify::get_headers(self, req, connectors)?) - .body(Verify::get_request_body(self, req)?) + .body(Verify::get_request_body(self, req, connectors)?) .build(), )) } @@ -1220,6 +1239,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_request = stripe::RefundRequest::try_from(req)?; let stripe_req = types::RequestBody::log_and_get_request_body( @@ -1242,7 +1262,9 @@ impl services::ConnectorIntegration CustomResult, errors::ConnectorError> { let stripe_req = stripe::Evidence::try_from(req)?; let stripe_req_string = types::RequestBody::log_and_get_request_body( @@ -1719,7 +1744,9 @@ impl .headers(types::SubmitEvidenceType::get_headers( self, req, connectors, )?) - .body(types::SubmitEvidenceType::get_request_body(self, req)?) + .body(types::SubmitEvidenceType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) } diff --git a/crates/router/src/connector/trustpay.rs b/crates/router/src/connector/trustpay.rs index 903952dc8eb4..7509131afeef 100644 --- a/crates/router/src/connector/trustpay.rs +++ b/crates/router/src/connector/trustpay.rs @@ -236,6 +236,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = trustpay::TrustpayAuthUpdateRequest::try_from(req)?; let trustpay_req = types::RequestBody::log_and_get_request_body( @@ -257,7 +258,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let currency = req.request.get_currency()?; let amount = req @@ -476,7 +480,7 @@ impl self, req, connectors, )?) .body(types::PaymentsPreProcessingType::get_request_body( - self, req, + self, req, connectors, )?) .build(), ); @@ -553,6 +557,7 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let amount = req .request @@ -599,7 +604,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = trustpay::TrustpayRouterData::try_from(( &self.get_currency_unit(), @@ -706,7 +714,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = tsys::TsysPaymentsRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -168,7 +169,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = tsys::TsysSyncRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -247,7 +251,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_req = tsys::TsysPaymentsCaptureRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -328,7 +335,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = tsys::TsysPaymentsCancelRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -404,7 +414,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let req_obj = tsys::TsysRefundRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -482,7 +495,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = tsys::TsysSyncRequest::try_from(req)?; let tsys_req = types::RequestBody::log_and_get_request_body( @@ -559,7 +575,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let req_obj = volt::VoltAuthUpdateRequest::try_from(req)?; let volt_req = types::RequestBody::log_and_get_request_body( @@ -196,7 +197,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = volt::VoltRouterData::try_from(( &self.get_currency_unit(), @@ -293,7 +297,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { Err(errors::ConnectorError::NotImplemented("get_request_body method".to_string()).into()) } @@ -435,7 +442,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = volt::VoltRouterData::try_from(( &self.get_currency_unit(), @@ -525,7 +535,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = wise::WisePayoutQuoteRequest::try_from(req)?; let wise_req = types::RequestBody::log_and_get_request_body( @@ -346,7 +347,9 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = wise::WiseRecipientCreateRequest::try_from(req)?; let wise_req = types::RequestBody::log_and_get_request_body( @@ -423,7 +427,9 @@ impl .headers(types::PayoutRecipientType::get_headers( self, req, connectors, )?) - .body(types::PayoutRecipientType::get_request_body(self, req)?) + .body(types::PayoutRecipientType::get_request_body( + self, req, connectors, + )?) .build(); Ok(Some(request)) @@ -516,6 +522,7 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = wise::WisePayoutCreateRequest::try_from(req)?; let wise_req = types::RequestBody::log_and_get_request_body( @@ -536,7 +543,9 @@ impl services::ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = wise::WisePayoutFulfillRequest::try_from(req)?; let wise_req = types::RequestBody::log_and_get_request_body( @@ -634,7 +644,9 @@ impl services::ConnectorIntegration, + _connectors: &Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = worldline::ApproveRequest::try_from(req)?; @@ -406,7 +407,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = worldline::WorldlineRouterData::try_from(( &self.get_currency_unit(), @@ -524,7 +528,9 @@ impl ConnectorIntegration, + _connectors: &Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_req = worldline::WorldlineRefundRequest::try_from(req)?; let refund_req = types::RequestBody::log_and_get_request_body( @@ -610,7 +617,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = worldpay::WorldpayRouterData::try_from(( &self.get_currency_unit(), @@ -463,7 +466,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_request = WorldpayRefundRequest::try_from(req)?; let fiserv_refund_request = types::RequestBody::log_and_get_request_body( @@ -550,7 +556,9 @@ impl ConnectorIntegration CustomResult, errors::ConnectorError> { let connector_router_data = zen::ZenRouterData::try_from(( &self.get_currency_unit(), @@ -247,7 +248,9 @@ impl ConnectorIntegration, + _connectors: &settings::Connectors, ) -> CustomResult, errors::ConnectorError> { let connector_router_data = zen::ZenRouterData::try_from(( &self.get_currency_unit(), @@ -439,7 +443,9 @@ impl ConnectorIntegration: ConnectorIntegrationAny, + _connectors: &Connectors, ) -> CustomResult, errors::ConnectorError> { Ok(None) }