I’m using Ionic to build a mobile ordering application. I understand that Ionic isn’t officially supported by Square, but I have card payments and Google Pay working. However when I try to test Apple Pay on my device, I’m getting a PaymentMethodUnsupportedError
.
When I try it on localhost, I get an error stating that my domain hasn’t been verified by Apple, which is the expected behavior. This leads me to believe that I’m passing this verification step, but something in Square.js is blocking the request from going through by saying that Apple Pay isn’t supported, although it should be based on the browser.
Can anyone here help me figure out why I’m receiving this error and how I can get past it?
1 Like
Is there a reason your using the Web Payments SDK for a mobile app instead of using the In-App Payments SDK? This really isn’t the intended use case for the Web Payments SDK.
Are you using a Safari browser in your mobile app?
I opted for the web payments SDK because I’m using Angular with Ionic. Ionic works by hosting a local server on the device and displaying it on a single WebView in the app. My understanding was that this use case more closely resembled the web payments SDK.
I suppose as a fallback, I could build a custom Square-Ionic plugin that would interact with native functionality using the In-App Payments SDK in Swift, but this is certainly a less desirable option. It would be considerably more work and would need to be duplicated for both iOS and Android.
Considering Google Pay and Card Pay work using the web payments SDK, I’d really love to be able to use Apple Pay in the same way.
Thank you for the response!
Is the browser your using in your app a Safari browser?
I believe so! Safari through the ios WKWebView
Hi Bryan! Do you happen to have any more insight into this?