I have integrated a payment gateway with a Java based Web-App Now, After a successful and failure transaction, PG accordingly redirect to respectively html pages failure.html,su
You can't read POST data in client side but you can save it locally when submitting the form using localStorage:
...