Skip to content
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

success_url and cancel_url not working in mobile #587

Open
rcpilotp51 opened this issue Dec 13, 2023 · 0 comments
Open

success_url and cancel_url not working in mobile #587

rcpilotp51 opened this issue Dec 13, 2023 · 0 comments
Labels
question Further information is requested

Comments

@rcpilotp51
Copy link

rcpilotp51 commented Dec 13, 2023

How do you get the redirects working in a ionic 7 app?

Deep Linking doesn't seem to be working using Ionic 7 and Capacitor.

When I go to "domain" from either Chrome or Safari in the Sim or my native ios device, the website resolves and doesn't open the application as expected. (I have not tested the deep linking on an Android device as of yet - I've been focusing on iOS first - hoping it would translate - however, I have made the recommended changes to the manifest files and, as mentioned before, I am hosing the json file on my site.)

The reason I wanted to get this working is because I am using the Firebase Stripe Extension that requires a success_url and cancel_url in its implementation to redirect the user back to the app. As you might expect, this works well on the Ionic PWA site, but not natively. I was hoping that deep linking would be the solution to avoid a more manual install and implementation of Stripe.

The Stripe documentation for the firebase extension recommends using the window.location.origin as both the success and cancel urls. window.location.origin translates to capacitor://localhost natively, and stripe errors saying this is an invalid url. I then tried to use the deep link of "domain" as the redirect url in both cases, which is accepted by Stripe as a valid url, but the user is redirected to the default browser and linked to the PWA deployment.

My ask is if it is possible to get some sort of universal link to the site as a redirect url that will work both natively and for the PWA deployment? could I implement a switch/case that would detect the platform and substitute the correct redirect.

@jauntybrain jauntybrain added the question Further information is requested label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants