mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
feat(core): Introduce new decide flow mechanism for payment authorization (#9808)
This commit is contained in:
@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user