1

I have a pwa app. in this app we have an account charge feature. the server gives us a pay link which is an external link. after we open it and user goes through payment(IPG) and after successful payment he will get redirected to a page in our site. in that page we have a "back to application" button with some query params which includes some information about payment.

The question is how can i get the query params in another origin when user gets back to my app in order to find out whether the payment was successful or not?

we have a standalone pwa and i want to open the pwa app when user wants to get back to app after payment and not opening another instance of safari.

Ehsan
  • 188
  • 12
  • Does this answer your question? [How can I get query string values in JavaScript?](https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript) – Konrad Aug 24 '22 at 14:25
  • ofcourse not. i wanna get query params in another origin and send back to installed pwa app in ios. – Ehsan Aug 25 '22 at 06:16
  • *in that page we have a "back to application" button with some query params which includes some information about payment.* - so do you have this button or not? I really can't understand the issue here – Konrad Aug 25 '22 at 06:25
  • yes. but it is in another origin. i can;t get that params from another origin. i dont have access – Ehsan Aug 25 '22 at 10:17
  • I still don't understand why you can't redirect the user to your app with params? – Konrad Aug 25 '22 at 11:15
  • how do you want to get params from www.example.com when you are in www.some-domain.com? – Ehsan Aug 26 '22 at 08:21
  • Being on www.example.com: `document.querySelector('a').src="www.some-domain.com?token=" + window.location.search` then user clicks button and is redirected to `www.some-domain.com` with correct params. – Konrad Aug 26 '22 at 14:13

0 Answers0