New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Setting iosScheme to http has no effect #2173
Comments
oh, it's just working with custom protocols right? do you happen to know if ionic://localhost or capacitor://localhost are considered safe for something like stripe.js? |
WKWebView doesn't allow to use http or http for serving local assets, this works as expected. Not sure about stripe, sorry. |
Hey, I am also looking in to this for Stripe.js, did you find a way to integrate Stripe with capacitor ios and android apps? |
we are still using cordova with cordova-plugin-ionic-webview@2.5.3 your best bet is to work with a plugin like this one and use the native stripe sdk |
Hi @jcesarmobile! Could you explain why WKWebView doesn't allow to use http or https for serving local assets? I would like to know more about this but I don't know what/how to search it. Thanks in advance |
as far as i can tell, stripe.js now also sees file:// and ionic:// as safe origins! I also test it right now, and it works if you serve your app from ionic:// on ios! |
is there anyway to set the scheme to http? Google still does not recognize capacitor:// or ionic:// as safe origins in Authorized JavaScript origins for their auth unfortunately |
So @malua says that ionic:// works and @mikeyyyzhao says that it does not. I can see it in the code here if you search for the word ionic: https://js.stripe.com/v3/ |
I was talking about Stripe working, not about Google as mikeyyyzhao was. I have the ios on ionic:// and the android app on https:// |
@malua thanks for responding. https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites |
i have not tried that, but I guess you would not work. rather you would have to use this plugin https://github.com/capacitor-community/stripe and handle the payment in the native part |
Yeah it looks like it won't work with Ionic. The main issue is that you need to register a merchant id for the plugin (native) but not for the web version. I would prefer not to register a merchant id for every stripe connected account I am paying to. Having to set up a merchant id means I would have to release a new version of the app every time a customer joined my platform which is not feasible. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Bug Report
Capacitor Version
Affected Platform(s)
Current Behavior
Setting
iosScheme
incapacitor.config.json
tohttp
makes no difference. App is still being loaded fromcapacitor://
I already removed the ios platform completely and an re-added it, but that didn't work unfortunatley. Am I missing something? Do I need to set something in the plist file or anywhere else?
Expected Behavior
Setting
iosScheme
incapacitor.config.json
tohttp
should make capacitor load the app fromhttp://
instead ofcapacitor://
npm --version
output:6.9.0
node --version
output:v12.13.0
pod --version
output (iOS issues only):1.7.5
Thank you for your help and awesome products!
The text was updated successfully, but these errors were encountered: