userCanPay static method

Future<bool> userCanPay(
  1. PayProvider provider,
  2. String merchantId
)

Implementation

static Future<bool> userCanPay(PayProvider provider, String merchantId) async {
  if (Platform.isIOS && provider == PayProvider.applePay) {
    return await _channel.invokeMethod("isApplePaySupported", {
      "merchantId": merchantId
    });
  } else if (Platform.isAndroid && provider == PayProvider.googlePay) {
    return await _channel.invokeMethod("isGooglePaySupported", {
      "merchantId": merchantId
    });
  }
  return false;
}