#landsman-apple-pay
1 messages · Page 1 of 1 (latest)
Yeah. I gonna send you our User Agent string to show you.
iOS:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [TRISBEE_AN/PayForiOS;TRISBEE_ENV/beta;TRISBEE_AV/2.0.0]
Android:
Mozilla/5.0 (Linux; Android 9; TA-1053 Build/PKQ1.181105.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/103.0.5060.71 Mobile Safari/537.36 [TRISBEE_AN/PayForAndroid;TRISBEE_ENV/beta;TRISBEE_AV/0.0.1-master-run-9]
As you can see we added our custom data: [TRISBEE_AN/PayForiOS;TRISBEE_ENV/beta;TRISBEE_AV/2.0.0] which should not be a problem. Facebook doing the same thing with their apps.
Anyway, after this change, Apple Pay disappeared from the app.
Can you please confirm that Stripe detection of supported browser, system is a problem?
Can you tell me more about your app? Is it a mobile application, or a web application?
It's mobile app that's wrapping web app. It was working very good, in production for thousands users until now.
Is the inner web app powered by Stripe.js?
Yes
Here it is:
- web: https://pay.trisbee.com/michal
- in native app: https://apps.apple.com/cz/app/trisbee/id1239588371
@frank crest can you look for a sec at that one too? They mention changing the User-Agent causing Apple Pay to disappear
Hello! As far as I know a user agent change would not cause this issue; are you sure no other parts of the web view configuration have changed? You're using a WKWebView, correct?
@rugged bough did you have more details?
Yeah, correct. Both.
Is there something like Stripe.js "debug mode" what I can use to tell me more info?
No, not really. Are you using WKUserScript or evaluateJavaScript() with your WKWebView?
evaluateJavaScript
But whole Stripe implementation is on web side. Not in the native app.
Native app is really just stupid wrapper.
Using that will prevent Apple Pay from working. Search this page for "Apple Pay in WKWebView" for details: https://webkit.org/blog/9674/new-webkit-features-in-safari-13/
But we are in production almost 6 months from now with this solution. It stop work today.
Did you change the time at which you inject JavaScript?
Good point. I will check it.
Is there safe to go alternative to evaluateJavaScript ?
No. If you want to inject JavaScript you don't get Apple Pay. It's a security measure Apple has in place.
🤦♂️ so we have to do native implementation of Apple Pay I guess
Or not inject JavaScript, yeah.