Skip to content

show3ds does not catch other errors, and as a result, the function does not work. #5

Description

@bl1nkker

Hello!
I tried to implement this library in my application. Payment without 3DS is successfully completed (although I had to rewrite a few lines), but as soon as it comes to payment with a 3DS request, everything breaks down. No logs, no error message. I decided to see how the show3ds method works, and I saw this:

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);
    }
  }

The problem is that the method does not catch other errors (except PlatformException ), so it does not return anything and does not take any action.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions