getApplePayToken method
Presents the native Apple Pay sheet and returns the resulting token.
Returns null if the user cancels the sheet.
Implementation
@override
Future<NoonApplePayToken?> getApplePayToken(NoonApplePayConfig config) async {
final Map<dynamic, dynamic>? result = await methodChannel
.invokeMethod<Map<dynamic, dynamic>>(
'getApplePayToken',
config.toMap(),
);
if (result == null) {
// User cancelled the Apple Pay sheet.
return null;
}
return NoonApplePayToken.fromMap(result);
}