openPayment method
Future<Map?>
openPayment({
- required String url,
- required Map<
String, String> params, - String? title,
- bool javaScript = true,
- bool devLogs = false,
- String? actionUrl,
- String? actionPath,
- bool forceOverlay = false,
override
Returns a Map like: { success: bool, data: String?, cancelled: bool }
forceOverlay is used by the web implementation for top-level payment
navigation inside embedded WebView / WebKit hosts. Native platforms ignore it.
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,
bool forceOverlay = false,
}) 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,
};
}