I'm implementing a cart and currently using Zuora's Direct Post.
Basically it's a form submit to Zuora and upon success Zuora will redirect back to my site. They allow for 5 field_passthroughs
which are just query string parameters in the url.
I have the flow working as such:
- User enters in their Card Information
- On Submit, information is submitted to Zuora
- On Success, Zuora redirects back to my site, which lands on an intermediate processing page
- Zuora sticks a few fields on the redirectURL such as
paymentMethodId
, which I use to place the order on the processing page.
I want to optimize it now so that instead of landing on the intermediate processing page, it'll just land back on the user's cart with the input fields still populated.
In order to achieve this without refetching fields like name/email from my backend, Is there a way I can pass it on the redirectUrl? Would it be safe to serialize my Vuex state into a string and encode it? Then when it lands back on my cart from the redirect, I decode and deserialize and repopulate the form?