Home > OS >  execute payment paypal flutter
execute payment paypal flutter

Time:05-29

I am trying to implement paypal payments in a WebApp, but WebView is not compatible with the web. i also tried dart: ui but without success.

//ignore: undefined_prefixed_name
  ui.platformViewRegistry.registerViewFactory(
      'paypal-html',
      (int viewId) => IFrameElement()
        ..width = MediaQuery.of(context).size.width.toString()
        ..height = MediaQuery.of(context).size.height.toString()
        ..src = checkoutUrl
        ..style.border = 'none');

SizedBox(
          width: MediaQuery.of(context).size.width,
          height: MediaQuery.of(context).size.height,
          child: HtmlElementView(viewType: 'paypal-html'),
        ),

Do you know how I can do it?

CodePudding user response:

Webviews are not supported by PayPal for payment approval. A browser view mechanism with an address bar must be used (such as a Safari View Controller or Chrome Custom Tab)

  • Related