openPayment method

  1. @override
Future<Map?> openPayment({
  1. required String url,
  2. required Map<String, String> params,
  3. String? title,
  4. bool javaScript = true,
  5. bool devLogs = false,
  6. String? actionUrl,
  7. String? actionPath,
})
override

Returns a Map like: { success: bool, data: String?, cancelled: bool }

Implementation

@override
Future<Map<dynamic, dynamic>?> openPayment({
  required String url,
  required Map<String, String> params,
  String? title,
  bool javaScript = true,
  bool devLogs = false,
  String? actionUrl,
  String? actionPath,
}) async {
  final res = await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
    'openPayment',
    <String, dynamic>{
      'url': url,
      'params': params,
      'title': title,
      'javaScript': javaScript,
      'devLogs': devLogs,
      'actionUrl': actionUrl,
      'actionPath': actionPath,
    },
  );
  return res ?? <dynamic, dynamic>{'success': false, 'cancelled': true, 'data': null};
}