pub struct AcpPaymentAdapter { /* private fields */ }Expand description
Thin shared-payment-token payment bridge for ACP-style commerce approvals.
This adapter performs one remote authorization call before execution and then lets the kernel reconcile the local hold as capture/release/refund bookkeeping after tool execution. This keeps ACP-specific logic adapter scoped while still exercising a real external authorization hop.
Implementations§
Trait Implementations§
Source§impl Clone for AcpPaymentAdapter
impl Clone for AcpPaymentAdapter
Source§fn clone(&self) -> AcpPaymentAdapter
fn clone(&self) -> AcpPaymentAdapter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AcpPaymentAdapter
impl Debug for AcpPaymentAdapter
Source§impl PaymentAdapter for AcpPaymentAdapter
impl PaymentAdapter for AcpPaymentAdapter
fn rail_id(&self) -> &'static str
fn rail_mode(&self) -> Option<PaymentRailMode>
Authorize or prepay up to
amount_units before the tool executes. Read moreSource§fn capture(
&self,
authorization_id: &str,
amount_units: u64,
currency: &str,
reference: &str,
) -> Result<PaymentResult, PaymentError>
fn capture( &self, authorization_id: &str, amount_units: u64, currency: &str, reference: &str, ) -> Result<PaymentResult, PaymentError>
Finalize payment for the actual cost after tool execution. Read more
Source§fn release(
&self,
authorization_id: &str,
reference: &str,
) -> Result<PaymentResult, PaymentError>
fn release( &self, authorization_id: &str, reference: &str, ) -> Result<PaymentResult, PaymentError>
Release an unused authorization hold. Read more
Source§fn refund(
&self,
transaction_id: &str,
amount_units: u64,
currency: &str,
reference: &str,
) -> Result<PaymentResult, PaymentError>
fn refund( &self, transaction_id: &str, amount_units: u64, currency: &str, reference: &str, ) -> Result<PaymentResult, PaymentError>
Refund a previously executed payment.
Source§fn settlement_state(
&self,
reference: &str,
authorization_id: Option<&str>,
) -> Result<RailSettlementState, PaymentError>
fn settlement_state( &self, reference: &str, authorization_id: Option<&str>, ) -> Result<RailSettlementState, PaymentError>
Return the side-effect-free rail state for a durable reference. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AcpPaymentAdapter
impl !UnwindSafe for AcpPaymentAdapter
impl Freeze for AcpPaymentAdapter
impl Send for AcpPaymentAdapter
impl Sync for AcpPaymentAdapter
impl Unpin for AcpPaymentAdapter
impl UnsafeUnpin for AcpPaymentAdapter
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more