pub enum CommerceProgramError {
Show 19 variants
InvalidMint = 0,
InvalidPaymentStatus = 1,
InsufficientSettlementAmount = 2,
SettlementTooEarly = 3,
RefundAmountExceedsPolicyLimit = 4,
RefundWindowExpired = 5,
InvalidEventAuthority = 6,
InvalidAta = 7,
PaymentCloseWindowNotReached = 8,
MerchantOwnerMismatch = 9,
MerchantInvalidPda = 10,
OperatorOwnerMismatch = 11,
OperatorInvalidPda = 12,
OperatorMismatch = 13,
MerchantMismatch = 14,
OrderIdInvalid = 15,
MerchantOperatorConfigInvalidPda = 16,
AcceptedCurrenciesEmpty = 17,
DuplicateMint = 18,
}Variants§
InvalidMint = 0
0 - Incorrect mint provided
InvalidPaymentStatus = 1
1 - Invalid payment status for the operation
InsufficientSettlementAmount = 2
2 - Insufficient settlement amount
SettlementTooEarly = 3
3 - Settlement attempted too early
RefundAmountExceedsPolicyLimit = 4
4 - Refund amount exceeds policy limit
RefundWindowExpired = 5
5 - Refund window expired
InvalidEventAuthority = 6
6 - Invalid event authority
InvalidAta = 7
7 - Invalid ATA
PaymentCloseWindowNotReached = 8
8 - Payment close window not reached
MerchantOwnerMismatch = 9
9 - Merchant owner does not match expected owner
MerchantInvalidPda = 10
10 - Merchant PDA is invalid
OperatorOwnerMismatch = 11
11 - Operator owner does not match expected owner
OperatorInvalidPda = 12
12 - Operator PDA is invalid
OperatorMismatch = 13
13 - Operator does not match config operator
MerchantMismatch = 14
14 - Merchant does not match config merchant
OrderIdInvalid = 15
15 - Order ID is invalid or already used
MerchantOperatorConfigInvalidPda = 16
16 - MerchantOperatorConfig PDA is invalid
AcceptedCurrenciesEmpty = 17
17 - Accepted currencies is empty
DuplicateMint = 18
18 - Duplicate mint in accepted currencies
Trait Implementations§
Source§impl Clone for CommerceProgramError
impl Clone for CommerceProgramError
Source§fn clone(&self) -> CommerceProgramError
fn clone(&self) -> CommerceProgramError
Returns a duplicate of the value. Read more
1.0.0 · 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 CommerceProgramError
impl Debug for CommerceProgramError
Source§impl Display for CommerceProgramError
impl Display for CommerceProgramError
Source§impl Error for CommerceProgramError
impl Error for CommerceProgramError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<CommerceProgramError> for ProgramError
impl From<CommerceProgramError> for ProgramError
Source§fn from(e: CommerceProgramError) -> Self
fn from(e: CommerceProgramError) -> Self
Converts to this type from the input type.
Source§impl FromPrimitive for CommerceProgramError
impl FromPrimitive for CommerceProgramError
Source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
Converts an
i64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
Converts an
u64 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
Converts an
isize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
Converts an
i8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
Converts an
i16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
Converts an
i32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
Converts an
i128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
Converts a
usize to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
Converts an
u8 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
Converts an
u16 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
Converts an
u32 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned.Source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
Converts an
u128 to return an optional value of this type. If the
value cannot be represented by this type, then None is returned. Read moreSource§impl PartialEq for CommerceProgramError
impl PartialEq for CommerceProgramError
impl Eq for CommerceProgramError
impl StructuralPartialEq for CommerceProgramError
Auto Trait Implementations§
impl Freeze for CommerceProgramError
impl RefUnwindSafe for CommerceProgramError
impl Send for CommerceProgramError
impl Sync for CommerceProgramError
impl Unpin for CommerceProgramError
impl UnwindSafe for CommerceProgramError
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
Mutably borrows from an owned value. Read more