PlatformPaymentException class

Payment flow failures (SDK config, auth, network, user cancel, etc.).

Inheritance
Annotations

Constructors

PlatformPaymentException({required PlatformPaymentType type, String? errorCode, String? transactionId, double? amount, String? currency, String? userMessage, String? devMessage, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}, Severity severity = Severity.error, bool isReportable = true})
Creates a payment exception tied to the specific provider type.
PlatformPaymentException.authenticationFailed({required PlatformPaymentType type, String? transactionId, String? details, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor for payment authentication failures.
factory
PlatformPaymentException.cancelled({required PlatformPaymentType type, String? transactionId, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor for user-cancelled payment attempts.
factory
PlatformPaymentException.insufficientFunds({required PlatformPaymentType type, String? transactionId, double? amount, String? currency, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor for insufficient funds errors.
factory
PlatformPaymentException.invalidConfiguration({required PlatformPaymentType type, String? details, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor for configuration issues (keys, merchant IDs, etc.).
factory
PlatformPaymentException.networkError({required PlatformPaymentType type, String? transactionId, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor for transient network errors.
factory
PlatformPaymentException.notAvailable({required PlatformPaymentType type, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor when the payment method is currently unavailable.
factory
PlatformPaymentException.notSupported({required PlatformPaymentType type, Object? cause, StackTrace? stack, Map<String, dynamic> metadata = const {}})
Convenience constructor when the payment method is unsupported.
factory

Properties

amount double?
Monetary amount involved in the transaction.
final
cause Object?
Original underlying error, if any.
finalinherited
currency String?
ISO currency code for the transaction.
final
devMessage String
Developer-friendly details, safe for logs and tools.
finalinherited
errorCode String?
Provider-specific error code, if supplied.
final
hashCode int
The hash code for this object.
no setterinherited
isReportable bool
Whether this exception should be reported automatically.
finalinherited
metadata Map<String, dynamic>
Additional diagnostic data related to this exception.
finalinherited
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
severity Severity
How serious this exception is.
finalinherited
stack StackTrace?
Capture location. Defaults to StackTrace.current when not provided.
finalinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
transactionId String?
Transaction identifier associated with the failure.
final
type PlatformPaymentType
Payment provider that surfaced the error.
final
userMessage String
Human-friendly text appropriate for end-users.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited