chore: add logic to use pre decide flow

This commit is contained in:
hrithikesh026
2025-10-14 00:28:51 +05:30
parent 42a451c19a
commit 94e4d9330c
8 changed files with 232 additions and 53 deletions

View File

@ -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(),