执行付款贝宝扑
我正在尝试在WebApp中实现PayPal付款,但是WebView与Web不兼容。 我还尝试了DART:UI,但没有成功。
//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'),
),
你知道我该怎么做吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
webviews
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)