Reputation: 7729
I need to solve a problem with POST redirect in Spring MVC application.
PayPal lets you to place a simple html form that can redirect to PayPal pages with post. But I need to perform some actions in application after user clicks the PayPal button, but before actual action is taken.
So i was thinking about doing it like this: place PayPal button on webpage, pointing to local controller. There i would need to make some actions like checking whether user is logged to application and if yes then put his email as custom field for PayPal request parameters. If not then log user in and do the previous. After all the information is gathered I need to make post. I know how I could make such a Post, but I need user's web browse to be redirected there. Is there any way to do this?
Upvotes: 1
Views: 923
Reputation: 7722
You canno't instruct the user's browser to do redirection and a post, but you can do that with javascript. The flow would be something like this :
Upvotes: 1