Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Payment gateway not working on flutter web as it is working on flutter mobile webview #24

Closed
KadyanSandeep opened this issue Jul 11, 2021 · 4 comments

Comments

@KadyanSandeep
Copy link

Payment gateway not working on flutter web as it is working on flutter mobile webview.. its not redirecting to bank website.. no error is showing

@KadyanSandeep
Copy link
Author

DOMException: Blocked a frame with origin "http://localhost:62960" from accessing a cross-origin frame.
at js.JsObject._fromJs.callMethod (http://localhost:62960/dart_sdk.js:61116:32)
at web.WebViewXController.new.evalRawJavascript (http://localhost:62960/packages/webviewx/src/controller/web.dart.lib.js:113:79)
at PaymentWebScreen._PaymentScreenState.new.

@adrianflutur
Copy link
Owner

Hi, I will try to update the Readme.md so that every possible and impossible use cases of this package will be shown there.

In the meanwhile, the problem here is that the flutter-web webview is NOT a (mobile) browser, it does not behave like a browser and the usage is much more limited.

If the website you're trying to access allows iframe embeddings, then you should use SourceType.URL, otherwise use SourceType.URL_BYPASS (but this is not guaranteed to work).

Also, please note that you really should not rely on web proxies for things such as payment gateways, auth or other security-related things.

@adrianflutur
Copy link
Owner

Hi,
I'll tell you exactly what I've said here #21

Please check this out #27
Here I explain the limitations of this package, and what are you trying to do seems like one of them.

Also, there's a new version available with multiple (breaking) changes available here: #26. Maybe you can use the new features to work-around your issue.
Closing this for now, please open a new issue if you encounter anything else.

@fatememir
Copy link

Payment gateway not working on flutter web as it is working on flutter mobile webview.. its not redirecting to bank website.. no error is showing

i had same issue and I think it's because of bank's limitation rules. you cant open some urls in iframe . you should use url_luncher

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants