mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	chore: add logic to use pre decide flow
This commit is contained in:
		| @ -625,6 +625,38 @@ impl ConnectorValidation for ConnectorEnum { | ||||
| } | ||||
|  | ||||
| impl ConnectorSpecifications for ConnectorEnum { | ||||
|     fn should_call_connector_service_with_pre_decide_flow( | ||||
|         &self, | ||||
|         current_flow: api::CurrentFlowInfo<'_>, | ||||
|     ) -> bool { | ||||
|         match self { | ||||
|             Self::Old(connector) => { | ||||
|                 connector.should_call_connector_service_with_pre_decide_flow(current_flow) | ||||
|             } | ||||
|             Self::New(connector) => { | ||||
|                 connector.should_call_connector_service_with_pre_decide_flow(current_flow) | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|     fn get_preprocessing_flow_if_needed( | ||||
|         &self, | ||||
|         current_flow_info: api::CurrentFlowInfo<'_>, | ||||
|     ) -> Option<api::PreProcessingFlowName> { | ||||
|         match self { | ||||
|             Self::Old(connector) => connector.get_preprocessing_flow_if_needed(current_flow_info), | ||||
|             Self::New(connector) => connector.get_preprocessing_flow_if_needed(current_flow_info), | ||||
|         } | ||||
|     } | ||||
|     fn get_alternate_flow_if_needed( | ||||
|         &self, | ||||
|         current_flow: api::CurrentFlowInfo<'_>, | ||||
|     ) -> Option<api::AlternateFlow> { | ||||
|         match self { | ||||
|             Self::Old(connector) => connector.get_alternate_flow_if_needed(current_flow), | ||||
|             Self::New(connector) => connector.get_alternate_flow_if_needed(current_flow), | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     fn get_supported_payment_methods(&self) -> Option<&'static SupportedPaymentMethods> { | ||||
|         match self { | ||||
|             Self::Old(connector) => connector.get_supported_payment_methods(), | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 hrithikesh026
					hrithikesh026