feat(core): Introduce new decide flow mechanism for payment authorization (#9808)

This commit is contained in:
Hrithikesh
2025-10-21 15:26:55 +05:30
committed by GitHub
parent dfbfeefef7
commit 9af5a8c19f
31 changed files with 323 additions and 115 deletions

View File

@ -508,6 +508,25 @@ impl ConnectorValidation for ConnectorEnum {
}
impl ConnectorSpecifications for ConnectorEnum {
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(),