简体   繁体   中英

How keep track of user`s last activity in a web app in java and spring mvc and MongoDB

In my web app i ask several questions from user in a form. After completing this form there is a summary page highlighting the user`s answers.User would be redirected to payment gateway after this stage. At this stage there is an option to save the answers and do the payment later.An email goes instantly to the user highlighting his answers and intimating him that he was about to make the payment. There is a hyperlink in email which will redirect the user to the summary stage from where he left the journey so that he can proceed and make the payment. What is the best way to keep track of user stages so that if he has already made the payment he wont be redirected to the payment gateway by the hyperlinks in the emails whihc were sent prioir to the payment stage. I am using Spring mvc and MongoDB. Thanks in advance.

Assuming that payment gateway is not part of your application.

A good approach would be that your application be notified if any payment is done on a payment gateway (order id , Customer id , product id or stuff like that). Payment is supposed to be made against an order id now the payment gateway is supposed to handle if payment is already made against this order.

So contact the payment gateway team for how to retrieve if payment is successful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM