I am developing a webpage which consist of two .Net MVC services:
First one is the frontend which is returning all the views and taking user input in.
Second one is my backend service which processes data.
Currently my flow looks the following:
UserForm->frontend controller method->backend service controller method->a frontend controller method -> result is shown to user
I am now trying to implement a 3-party API to my website so if some criteria is met when the user submits the UserForm I will have to redirect the user to some HTML provided by the 3-party. This HTML I show includes a callback to my website which is the URL the result of the 3-party UserForm is sent to.
When I receive this 3-party data I have to combine it with my initial UserForm data and send it to my backend for processing. But I am having a hard time figuring out how this is possible as showing the new UserForm destroys my initial UserForm input by spawning a new controller/view.
I thought about calling my backend initialy and creating some listener/event pattern to wait for the last information from 3-party callback but I cannot figure out exactly how this can be achieved.
Note that this is sensitive information so it should not be persisted or saved in cookies or similar.
Thank you in advance!