Skip to main content

PaymentProviderLifecycleService

Trait PaymentProviderLifecycleService 

pub trait PaymentProviderLifecycleService {
    // Required methods
    fn connect_start(
        &self,
        root: &mut Value,
        owner_route_value: &str,
        provider_id: &str,
        actor_id: i64,
    ) -> Result<String, i32>;
    fn callback_complete(
        &self,
        root: &mut Value,
        owner_route_value: &str,
        provider_id: &str,
        presented_state: &str,
        authorization_code: &str,
        actor_id: i64,
    ) -> Result<(), i32>;
    fn refresh(
        &self,
        root: &mut Value,
        owner_route_value: &str,
        provider_id: &str,
        actor_id: i64,
    ) -> Result<(), i32>;
    fn disconnect(
        &self,
        root: &mut Value,
        owner_route_value: &str,
        provider_id: &str,
        actor_id: i64,
    ) -> Result<(), i32>;
}
Expand description

Framework lifecycle contract. Implementations receive generic owner and provider identities, never an app-specific route or domain object.

Required Methods§

fn connect_start( &self, root: &mut Value, owner_route_value: &str, provider_id: &str, actor_id: i64, ) -> Result<String, i32>

fn callback_complete( &self, root: &mut Value, owner_route_value: &str, provider_id: &str, presented_state: &str, authorization_code: &str, actor_id: i64, ) -> Result<(), i32>

fn refresh( &self, root: &mut Value, owner_route_value: &str, provider_id: &str, actor_id: i64, ) -> Result<(), i32>

fn disconnect( &self, root: &mut Value, owner_route_value: &str, provider_id: &str, actor_id: i64, ) -> Result<(), i32>

Implementors§

§

impl<E> PaymentProviderLifecycleService for RuntimePaymentProviderLifecycleService<'_, E>
where E: PaymentProviderRuntimeEnvironment,