callPayFortForApplePay method

  1. @override
Future<void> callPayFortForApplePay({
  1. required FortRequest request,
  2. required String applePayMerchantId,
  3. required String countryIsoCode,
  4. required ApplePayResultCallback callback,
})
override

Implementation

@override
Future<void> callPayFortForApplePay({
  required FortRequest request,
  required String applePayMerchantId,
  required String countryIsoCode,
  required ApplePayResultCallback callback,
}) {
  if (_platform.isIOS) {
    _applePayResultCallback = callback;
    Map<String, dynamic> arguments = request.asMap();
    arguments.putIfAbsent('apple_pay_merchant_id', () => applePayMerchantId);
    arguments.putIfAbsent('country_code', () => countryIsoCode);
    return _methodChannel.invokeMethod('callPayFortForApplePay', arguments);
  } else {
    throw DeviceNotSupportedException(
        'Apple Pay is not supported on this device');
  }
}