I am currently creating a ASP.Net MVC 3.0 # order processing application. The application allows users to add products to their order, add a payment and then submit the order.
I am currently at the phase of submitting the order. I looking for suggestions as to how to achieve the following. A users clicks the submit button to submit the order. At this point I would like a processing icon to display while the order is processed, if an error occurs user gets redirected to a payment page, if processing completes successfully, redirect to the confirmation page.
What I was thinking of doing is, when the submit button is pressed, a View is returned to the user containing the processing icon, while in the background via an async Task or async controller, the order is processing and when complete, a redirect occurs to the applicable page. Does this sound like the best way achieving such?
Next question I have on this, what is the best way to prevent double submitting eg. user pressing the F5 key in the web browser?
Finally my last question, as order processing handles a number of events I may need to make it transactional, one fails all fail etc. What is the best way of achieving this?