We are using stripe connect payment integration in our mobile application all integration we did from backend and we are doing payment from browser from mobile app. Issue is with demo project it for native browser it showing Gpay option but if we try with our application GPay is not showing so what we can do for use Gpay in our mobile application?
Here is my code
enter code here
InAppWebView( Uri.parse('https://stackoverflow.com/questions/67370205/flutter-webview-or-inappwebview-does-not-evaluate-javascript-each-time')),
initialUrlRequest: URLRequest(url: Uri.parse(paymentlink)),
initialOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(
mediaPlaybackRequiresUserGesture: false,
userAgent:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"),
),
onWebViewCreated: (InAppWebViewController controller) {
print("controller...$_controller");
},
androidOnPermissionRequest: (InAppWebViewController controller,
String origin, List<String> resources) async {
return PermissionRequestResponse(
resources: resources,
action: PermissionRequestResponseAction.GRANT);
},
onLoadStart: (controller, url) async {
setState(() {
});
},
onLoadStop: (controller, url) async {
},
shouldOverrideUrlLoading: (InAppWebViewController controller,
NavigationAction navigationAction) async {},
),
also I use some other plugin like:-
webview_flutter_wkwebview: ^3.9.4
flutter_inappwebview: ^5.8.0
webview_flutter_plus: ^0.3.0
please give me some suggetion of this
2
Answers
You may need to add this permission if you have not added it yet:
Full permissions list here
Some deprication info here
To enable Google Pay in an embedded WebView within your mobile app, you need to use Custom Tabs which carries the Google account information that you’ve logged in the Android device.
You might need to find a flutter library that allows you to integrate Custom Tabs.