open method

Future<void> open()

Opens the payment browser and starts the payment process.

This method:

  1. Opens a new in-app browser window
  2. Loads the payment URL
  3. Sets up URL monitoring
  4. 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,
  });
}