isCardValid method
Verify card information
cardNumber
is the card number
dueMonth
is the month of the card's expiration date
dueYear
is the year of the card's expiration date
cvv
is the card's CVV(Card Verification Value)
return bool with value true
if the card is valid
return bool with value false
if the card is invalid
Implementation
@override
Future<bool> isCardValid({
required String cardNumber,
required String dueMonth,
required String dueYear,
required String cvv,
}) async {
final result = await methodChannel.invokeMethod<bool>('isValidCard', {
'cardNumber': cardNumber,
'mm': dueMonth,
'yy': dueYear,
'cvv': cvv,
});
return result ?? false;
}