I've had bad experiences with pages that get the info posted to them and then call a page on your server with the result. I ended up making php talk to the bank through curl. That is the script posts to the page and gets the result. I never loose the control of the browser nor do I use java of any type.
Use a field in mysql which marks which step of the whole process you're in. This helps to recover when your provider fails to respond. It works as a lock should your client try to repost. So it stops double charges.
I don't like to depend too much on java since it might not be available. With php you can come up with an implementation which is only server side and has little margin for error.
Saludos
Gerardo