PlatformPaymentException.insufficientFunds constructor
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.
Implementation
factory PlatformPaymentException.insufficientFunds({
required PlatformPaymentType type,
String? transactionId,
double? amount,
String? currency,
Object? cause,
StackTrace? stack,
Map<String, dynamic> metadata = const {},
}) {
return PlatformPaymentException(
type: type,
errorCode: 'insufficient_funds',
userMessage: 'Insufficient funds to complete the payment.',
devMessage: 'Insufficient funds for ${type.displayName} payment.',
transactionId: transactionId,
amount: amount,
currency: currency,
cause: cause,
stack: stack,
metadata: metadata,
);
}