Hi,
We integrate with Stripe to process payment methods using Stripe Elements with Javascript. This integration requires that the page where its widget is used is in https (using window.location to determine this) for Production environments. This should have been fine as we are using https everywhere in our Reactive and Mobile apps, however, this integration does not work in iOS but works in Android and the Reactive application.
The reason for this, as we have found out, is that for iOS the window.location attribute starts with outsystems:// instead of https://, as can be seem in the images below (printed window.location).
Questions
iOS flow:
Android flow:
Thanks,
João Mateus
Hi André,
We implemented a workaround where we had a reactive application with the same functionality (basically only the payment page) and UI to which the mobile application, when adding a payment method, would redirect the user to.
It proved to be an acceptable albeit not ideal solution.
Regards,
Joao Mateus
This change was introduced in MABS6.0 (https://success.outsystems.com/Support/Release_Notes/Mobile_Apps_Build_Service#MABS_Version_6.0).
"IOS applications now load from outsystems:// instead of https://. This enables the offline support with WKWebView.".
So, you can't. It is an architectural issue of IOS and WKWebView.
Kind regards, David.
Joao did you manage to solve this? We have this issue intermittently with the Stripe element
I don't know if you evaluate the usage of this plugin (https://www.outsystems.com/forge/component-overview/13678/payments-plugin). More information in this link (https://success.outsystems.com/documentation/11/extensibility_and_integration/mobile_plugins/payments_plugin/).
Hey David thanks for the suggestion. I have briefly looked at it (but havent played with it yet). I don't think it solves what we need as this looks more for one off, on the spot payments. We need to store cards for recurring 'off session' payments (ie not authorised by the user everytime). Plus Stripe has a bunch of flows that make that invoicing easy.
What is odd in our implementation is that 99% of the cases there are no issues with the Stripe Element, however in certain iOS models this error is triggered but not all the time (which is curious), and is known to fix itself randomly like turning app or off or updating the iOS software seems to solve this issue in some cases.