Skip to main content

ResponseCode

Struct ResponseCode 

Source
pub struct ResponseCode(pub u8, pub u8);
Available on crate feature std only.
Expand description

ISO 8583 Response Code

Tuple Fields§

§0: u8§1: u8

Implementations§

Source§

impl ResponseCode

Source

pub const APPROVED: Self

Source

pub const APPROVED_WITH_ID: Self

Source

pub const APPROVED_PARTIAL: Self

Source

pub const REFER_TO_ISSUER: Self

Source

pub const REFER_SPECIAL: Self

Source

pub const INVALID_MERCHANT: Self

Source

pub const PICK_UP_CARD: Self

Source

pub const DO_NOT_HONOR: Self

Source

pub const ERROR: Self

Source

pub const PICK_UP_SPECIAL: Self

Source

pub const HONOR_WITH_ID: Self

Source

pub const INVALID_TRANSACTION: Self

Source

pub const INVALID_AMOUNT: Self

Source

pub const INVALID_CARD_NUMBER: Self

Source

pub const NO_SUCH_ISSUER: Self

Source

pub const CUSTOMER_CANCELLATION: Self

Source

pub const DUPLICATE_TRANSACTION: Self

Source

pub const RE_ENTER_TRANSACTION: Self

Source

pub const INVALID_RESPONSE: Self

Source

pub const NO_ACTION_TAKEN: Self

Source

pub const SUSPECTED_MALFUNCTION: Self

Source

pub const UNACCEPTABLE_TRANSACTION_FEE: Self

Source

pub const FILE_UPDATE_NOT_SUPPORTED: Self

Source

pub const UNABLE_TO_LOCATE_RECORD: Self

Source

pub const DUPLICATE_RECORD: Self

Source

pub const FILE_UPDATE_EDIT_ERROR: Self

Source

pub const FILE_UPDATE_FILE_LOCKED: Self

Source

pub const FILE_UPDATE_FAILED: Self

Source

pub const FORMAT_ERROR: Self

Source

pub const BANK_NOT_SUPPORTED: Self

Source

pub const COMPLETED_PARTIALLY: Self

Source

pub const EXPIRED_CARD_PICKUP: Self

Source

pub const SUSPECTED_FRAUD: Self

Source

pub const RESTRICTED_CARD: Self

Source

pub const CONTACT_ACQUIRER_SECURITY: Self

Source

pub const LOST_CARD: Self

Source

pub const STOLEN_CARD: Self

Source

pub const INSUFFICIENT_FUNDS: Self

Source

pub const NO_CHECKING_ACCOUNT: Self

Source

pub const NO_SAVINGS_ACCOUNT: Self

Source

pub const EXPIRED_CARD: Self

Source

pub const INCORRECT_PIN: Self

Source

pub const NO_CARD_RECORD: Self

Source

pub const TRANSACTION_NOT_PERMITTED: Self

Source

pub const TRANSACTION_NOT_PERMITTED_TERMINAL: Self

Source

pub const SUSPECTED_FRAUD_DECLINE: Self

Source

pub const CONTACT_ACQUIRER: Self

Source

pub const EXCEEDS_WITHDRAWAL_LIMIT: Self

Source

pub const RESTRICTED_CARD_DECLINE: Self

Source

pub const SECURITY_VIOLATION: Self

Source

pub const EXCEEDS_WITHDRAWAL_FREQUENCY: Self

Source

pub const PIN_REQUIRED: Self

Source

pub const PIN_VALIDATION_NOT_POSSIBLE: Self

Source

pub const PIN_TRIES_EXCEEDED: Self

Source

pub const CRYPTOGRAPHIC_FAILURE: Self

Source

pub const CRYPTOGRAPHIC_KEY_SYNC_ERROR: Self

Source

pub const CVV_FAILURE: Self

Source

pub const CANT_VERIFY_PIN: Self

Source

pub const MESSAGE_FLOW_ERROR: Self

Source

pub const CUTOVER_IN_PROGRESS: Self

Source

pub const ISSUER_UNAVAILABLE: Self

Source

pub const ROUTING_ERROR: Self

Source

pub const DUPLICATE_TRANSMISSION: Self

Source

pub const RECONCILE_ERROR: Self

Source

pub const SYSTEM_MALFUNCTION: Self

Source

pub const MAC_ERROR: Self

Source

pub const FAILED_SECURITY_CHECK: Self

Source

pub fn new(first: u8, second: u8) -> Self

Create from two digits

Source

pub fn description(&self) -> &'static str

Get human-readable description

Source

pub fn is_approved(&self) -> bool

Check if the response indicates approval

Source

pub fn is_declined(&self) -> bool

Check if response indicates a decline

Source

pub fn is_referral(&self) -> bool

Check if response indicates referral to issuer

Source

pub fn is_system_error(&self) -> bool

Check if response indicates a system/network error

Source

pub fn should_retain_card(&self) -> bool

Check if response indicates card should be retained

Source

pub fn category(&self) -> ResponseCategory

Get response category

Trait Implementations§

Source§

impl Clone for ResponseCode

Source§

fn clone(&self) -> ResponseCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResponseCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ResponseCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromStr for ResponseCode

Source§

type Err = ()

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for ResponseCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ResponseCode

Source§

fn eq(&self, other: &ResponseCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ResponseCode

Source§

impl Eq for ResponseCode

Source§

impl StructuralPartialEq for ResponseCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.