PlatformPaymentException.cancelled constructor
PlatformPaymentException.cancelled({
- required PlatformPaymentType type,
- String? transactionId,
- Object? cause,
- StackTrace? stack,
- Map<
String, dynamic> metadata = const {},
Convenience constructor for user-cancelled payment attempts.
Implementation
factory PlatformPaymentException.cancelled({
required PlatformPaymentType type,
String? transactionId,
Object? cause,
StackTrace? stack,
Map<String, dynamic> metadata = const {},
}) {
return PlatformPaymentException(
type: type,
errorCode: 'payment_cancelled',
userMessage: 'Payment was cancelled.',
devMessage: '${type.displayName} payment cancelled by user.',
transactionId: transactionId,
cause: cause,
stack: stack,
isReportable: false,
metadata: metadata,
);
}