Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

188
Vistas
Redirection to payment gateway from rest controller

We have a form at client side. When user fills the details and clicks on submit button then the rest api called which process the data and stored in database. Now what I want is user should redirect (POST method) to third party payment gateway page from server itself with required parameters, also I don't want to use query parameter string because its visible to user. I know there are two ways of doing it,

  1. Using sendRedirect method :

    For redirection I used resp.sendRedirect("paymentgateway url"); but the problem with redirect method is that the post parameters are not sent to payment gateway.

  2. Posting form with hidden fields :

    The payment gateway redirection should be done via posting form with hidden fields but I don't know how to do it at controller level.

<form method="post" action="paymentgateway url">
    <input type="hidden" name="txnid" value="98765">
    <input type="hidden" name="amt" value="100">
</form>

Also I want to show the user loading page after he clicks submit button.

Any help will be appreciated!

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda