Dear Team,
We are integrating Apple Pay using HyperPay.
Apple Pay integration working fine using Safari browser from mobile device but when same code running by mobile app we are getting below error.
"Invalid Access Error : trying to start an Apple Pay Session from aninsecure document"
Note: We checked with Hyperpay Payment provider they said this issue from mobile side
While checking in this issue deeper we found that below findings
Apple Pay’s Security Requirement:
Apple Pay requires that the JavaScript initiating the payment is running in a secure (HTTPS) context. When your code is executed in a browser (Safari), the page is loaded via HTTPS, and Apple Pay works asexpected. However, in your OutSystems mobile app,the page is served using a custom URL scheme(
outsystems://
) to enable offline support with WKWebView. This custom URL scheme is not considered secure by Apple’s standards, triggering the error:
Invalid Access Error: trying to start an Apple Pay Session from an insecure document.
Any solution to Change this outsystems:// protocol to https protocol while build generation via extensibility cofibration
Hi @Sakti S ,
Try the below approach.
In the Pay button, call the OpenInExternalBrowser action from the InAppBrowserPlugin forge component and pass your hosted secure page URL to it.
In the OnApplicationReady event, call the ParseDeepLinkPayload action from the DeepLink forge component.
If the payment is successful, redirect the user to the Payment Success screen.
Hope this works.
Thanks,
Senthil
Dear ,
please find the link , the issue already resolved by another developer
https://www.outsystems.com/forums/discussion/101528/invalid-access-error-for-applepay-session/
Please create custom plugin and create an apple pay session via the plugin