Struct ChargeFailure
pub struct ChargeFailure {
pub processor: i32,
pub code: String,
pub message: String,
pub outcome_network_status: Option<String>,
pub outcome_reason: Option<String>,
pub outcome_type: Option<String>,
}Expand description
Meaningfully interpreting chargeFailure response fields requires inspecting the processor field first.
For Stripe, code will be one of the codes defined here, while message may contain a further textual description. The outcome fields are optional, but present values will directly map to Stripe response properties
For Braintree, the outcome fields will be null. The code and message will contain one of
- a processor decline code (as a string) in code, and associated text in message, as defined this table
gatewayin code, with a reason in messagecode= “unknown”, message = “unknown”
IAP payment processors will never include charge failure information, and detailed order information should be retrieved from the payment processor directly
Fields§
§processor: i32§code: StringSee Stripe failure codes or Braintree decline codes depending on which processor was used
message: StringSee Stripe failure codes or Braintree decline codes depending on which processor was used
outcome_network_status: Option<String>§outcome_reason: Option<String>See Outcome Reason
outcome_type: Option<String>See Outcome Type
Implementations§
§impl ChargeFailure
impl ChargeFailure
pub fn processor(&self) -> PaymentProvider
pub fn processor(&self) -> PaymentProvider
Returns the enum value of processor, or the default if the field is set to an invalid enum value.
pub fn set_processor(&mut self, value: PaymentProvider)
pub fn set_processor(&mut self, value: PaymentProvider)
Sets processor to the provided enum value.
pub fn outcome_network_status(&self) -> &str
pub fn outcome_network_status(&self) -> &str
Returns the value of outcome_network_status, or the default value if outcome_network_status is unset.
pub fn outcome_reason(&self) -> &str
pub fn outcome_reason(&self) -> &str
Returns the value of outcome_reason, or the default value if outcome_reason is unset.
pub fn outcome_type(&self) -> &str
pub fn outcome_type(&self) -> &str
Returns the value of outcome_type, or the default value if outcome_type is unset.
Trait Implementations§
§impl Clone for ChargeFailure
impl Clone for ChargeFailure
§fn clone(&self) -> ChargeFailure
fn clone(&self) -> ChargeFailure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ChargeFailure
impl Debug for ChargeFailure
§impl Default for ChargeFailure
impl Default for ChargeFailure
§fn default() -> ChargeFailure
fn default() -> ChargeFailure
impl Eq for ChargeFailure
§impl Hash for ChargeFailure
impl Hash for ChargeFailure
§impl Message for ChargeFailure
impl Message for ChargeFailure
§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.§impl PartialEq for ChargeFailure
impl PartialEq for ChargeFailure
impl StructuralPartialEq for ChargeFailure
Auto Trait Implementations§
impl Freeze for ChargeFailure
impl RefUnwindSafe for ChargeFailure
impl Send for ChargeFailure
impl Sync for ChargeFailure
impl Unpin for ChargeFailure
impl UnsafeUnpin for ChargeFailure
impl UnwindSafe for ChargeFailure
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].