Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion contracts/payment-processing-contract/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub enum PaymentError {
InvalidAmount = 22,
InvalidSignature = 23,
PaymentExpired = 24,
// InsufficientBalance removed: token transfers from SDK panic on insufficient funds

// Refund
RefundNotFound = 30,
Expand All @@ -45,4 +44,16 @@ pub enum PaymentError {
InvalidInput = 50,
StorageError = 51,
ArithmeticError = 52,

// Subscription
/// Subscription ID not found in storage.
SubscriptionNotFound = 60,
/// A subscription with this ID already exists.
SubscriptionAlreadyExists = 61,
/// Subscription is not in Active state (e.g. already cancelled).
SubscriptionNotActive = 62,
/// Payment interval has not elapsed since the last charge.
/// The off-chain scheduler must wait until `last_charged_at + interval`
/// before invoking `process_subscription_payment` again.
SubscriptionIntervalNotElapsed = 63,
}
Loading
Loading