Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(core): validate capture method before update trackers (#3715)
Hrithikesh595201726018
diff --git a/crates/router/src/core/payments/flows/authorize_flow.rs b/crates/router/src/core/payments/flows/authorize_flow.rsindex 7842678a92..d7d122c325 100644--- a/crates/router/src/core/payments/flows/authorize_flow.rs+++ b/crates/router/src/core/payments/flows/authorize_flow.rs@@ -72,13 +72,6 @@ impl Feature<api::Authorize, types::PaymentsAuthorizeData> for types::PaymentsAutypes::PaymentsAuthorizeData,types::PaymentsResponseData,> = connector.connector.get_connector_integration();- connector- .connector- .validate_capture_method(- self.request.capture_method,- self.request.payment_method_type,- )- .to_payment_failed_response()?;if self.should_proceed_with_authorize() {self.decide_authentication_type();@@ -210,13 +203,19 @@ impl Feature<api::Authorize, types::PaymentsAuthorizeData> for types::PaymentsAu) -> RouterResult<(Option<services::Request>, bool)> {match call_connector_action {payments::CallConnectorAction::Trigger => {+ connector+ .connector+ .validate_capture_method(+ self.request.capture_method,+ self.request.payment_method_type,+ )+ .to_payment_failed_response()?;let connector_integration: services::BoxedConnectorIntegration<'_,api::Authorize,types::PaymentsAuthorizeData,types::PaymentsResponseData,> = connector.connector.get_connector_integration();-connector_integration.execute_pretasks(self, state).await