mod authorize_flow; mod cancel_flow; mod capture_flow; mod psync_flow; mod session_flow; mod verfiy_flow; use async_trait::async_trait; use super::PaymentData; use crate::{ core::{errors::RouterResult, payments}, routes::AppState, services, types::{ self, api, storage::{self, enums}, }, }; #[async_trait] pub trait ConstructFlowSpecificData { async fn construct_router_data<'a>( &self, state: &AppState, connector_id: &str, merchant_account: &storage::MerchantAccount, ) -> RouterResult>; } #[async_trait] pub trait Feature { async fn decide_flows<'a>( self, state: &AppState, connector: api::ConnectorData, maybe_customer: &Option, payment_data: PaymentData, call_connector_action: payments::CallConnectorAction, storage_scheme: enums::MerchantStorageScheme, ) -> (RouterResult, PaymentData) where Self: std::marker::Sized, F: Clone, dyn api::Connector: services::ConnectorIntegration; }