pub trait Gateway: Send + Sync {
// Required methods
fn authorize<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Result>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn refund<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Result>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn record_deposit<'life0, 'async_trait>(
&'life0 self,
request: RecordRequest,
) -> Pin<Box<dyn Future<Output = Result<RecordResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Defines the behavior required from a gateway participant in the tools workflow.
Required Methods§
Evaluates whether a payment operation is policy-authorized without moving money or changing invoices.
Sourcefn refund<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Result>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn refund<'life0, 'async_trait>(
&'life0 self,
request: Request,
) -> Pin<Box<dyn Future<Output = Result<Result>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resolves the request into source-grounded lookup evidence without editing provider records or contacting customers.
Sourcefn record_deposit<'life0, 'async_trait>(
&'life0 self,
request: RecordRequest,
) -> Pin<Box<dyn Future<Output = Result<RecordResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn record_deposit<'life0, 'async_trait>(
&'life0 self,
request: RecordRequest,
) -> Pin<Box<dyn Future<Output = Result<RecordResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Records a reviewed deposit artifact after authorization while keeping payment movement behind explicit policy gates.