My current challenge involves an application that utilizes Stripe Checkout. Upon clicking the "buy" button on the product page, a value is saved in VueX to indicate the selected product. Then, a request is made to the backend which redirects to Stripe checkout. After successful completion of the transaction, the user is directed to the "Success" page. Here lies the issue - I need to access the value of the variable stored in the VueX store on the "Success" page. However, the page redirection to another domain causes my application to lose its state that was originally set on the product page.
I initially attempted to address this by using local storage instead of VueX, but encountered the same problem due to data loss after the redirect changed the subdomain. It appears that even VueX does not retain the necessary information post-redirect.
The only potential solution I have considered is saving the entire VueX store to localStorage, although uncertainty remains regarding its effectiveness. How can I ensure that this variable remains persistent even after redirection to a different domain and subsequent change to a new sub-domain?