1.1 Setup App to Handle Deep Links
Add the code given below to yourAppDelegate. In this example, we override the application(_:open:options:) method to handle deep link URLs. You can use this method to parse the URL and determine which screen or content to display in your app.
Swift
1.2 Setup WKNavigationDelegate for WKWebView
Get a reference to yourWKWebView and call the navigationDelegate property to setup WKWebView using the following code. Add the loadWebPage function to load your content.
Swift
1.3 Conforming to WKNavigationDelegate
Create aWKNavigationDelegate to handle navigation events in your WKWebView.
In this example, we override the WebView(_:decidePolicyFor:decisionHandler:) method to handle navigation events in the WKWebView. If the URL scheme is not http or https, then we check if the URL can be opened using the UIApplication.shared.canOpenURL() method.
- If yes, then we open the URL using the
UIApplication.shared.open()method. - If not, then we allow the navigation to continue using the
decisionHandler(.allow)method.
Swift
1.4 Enable UPI Intent Support
To enable and test UPI intent in WebView-based Checkout:1
Open your website integrated with custom checkout.
Open your website integrated with custom checkout.
2
Pass `webview_intent: true` parameter in the [payload](/payments/pa...
Pass
webview_intent: true parameter in the payload sent to checkout to enable UPI intent support.3
Ensure that UPI intent is triggered when the payment request is made.
Ensure that UPI intent is triggered when the payment request is made.
List of Supported UPI Intent Apps
Given below is the list of supported UPI apps for Mobile Web.gpayphonepepaytm