open method
Opens the payment browser and starts the payment process.
This method:
- Opens a new in-app browser window
- Loads the payment URL
- Sets up URL monitoring
- Prepares for completion callback
Example:
final browser = PaymentBrowser(...);
try {
await browser.open();
} catch (e) {
print('Failed to open browser: $e');
}
Implementation
Future<void> open() async {
await _channel.invokeMethod('openWebView', {
'paymentUrl': paymentUrl,
'redirectUrl': redirectUrl,
});
}