show3ds static method

Future<ThreeDsResponse?> show3ds({
  1. required String acsUrl,
  2. required String transactionId,
  3. required String paReq,
})

Shows 3DS dialog. ascUrl, transactionId, paReq are returned in response from the Cloudpayments api if a 3DS authentication is needed.

Returns ThreeDsResponse. You have to use parameters of ThreeDsResponse in post3ds api method.

Implementation

static Future<ThreeDsResponse?> show3ds({
  required String acsUrl,
  required String transactionId,
  required String paReq,
}) async {
  try {
    final dynamic arguments =
        await _channel.invokeMethod<dynamic>('show3ds', {
      'acsUrl': acsUrl,
      'transactionId': transactionId,
      'paReq': paReq,
    });

    if (arguments == null) {
      return null;
    } else {
      return ThreeDsResponse(
          success: true, md: arguments['md'], paRes: arguments['paRes']);
    }
  } on PlatformException catch (e) {
    return ThreeDsResponse(success: false, error: e.message);
  }
}