startPaymentFlow static method

Future<FlutterTestPaymentResult> startPaymentFlow(
  1. String paymentIntentId
)

Implementation

static Future<FlutterTestPaymentResult> startPaymentFlow(
    String paymentIntentId) async {
  try {
    var result = await _channel.invokeMethod('startPaymentFlow',
        <String, dynamic>{'paymentIntentId': paymentIntentId});
    if (result == null || result.isEmpty) {
      throw 'Unable to get status for payment $paymentIntentId';
    } else {
      return FlutterTestPaymentResult.fromJson(result);
    }
  } on PlatformException catch (e) {
    throw 'Unable to complete payment flow for $paymentIntentId: ${e.message}';
  }
}