Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

187
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda