PlatformPaymentException.notSupported constructor
PlatformPaymentException.notSupported({
- required PlatformPaymentType type,
- Object? cause,
- StackTrace? stack,
- Map<
String, dynamic> metadata = const {},
Convenience constructor when the payment method is unsupported.
Implementation
factory PlatformPaymentException.notSupported({
required PlatformPaymentType type,
Object? cause,
StackTrace? stack,
Map<String, dynamic> metadata = const {},
}) {
final msg = type.isRegionDependent
? '${type.displayName} is not supported in your region.'
: '${type.displayName} is not supported.';
return PlatformPaymentException(
type: type,
errorCode: 'payment_not_supported',
userMessage: msg,
devMessage: '${type.displayName} payment method not supported.',
cause: cause,
stack: stack,
metadata: metadata,
);
}