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

105
Visualizações
How would I navigate to the form I am making a post request to using axios?

I have a react project.

I have an external payment gateway that I need to submit a hidden form to. The documentation of this gateway suggests I create a simple with action and submit. When doing this, I achieve the expected behaviour - it changes my current window location to that of the action, and the information passed in the hidden inputs is displayed.

The problem is, I need to dynamically load the inputs from my own backend so need to use Javascript with either Fetch or Axios to send a post request with the data from my own backend. When I attempt to do this, I get both a CORS error and the page doesn't navigate to the desired action page.

TDLR: How do I convert this HTML form to either Axios or Fetch in JavaScript:

<form method="post" action="https://mdepayments.epdq.co.uk/ncol/test/orderstandard_utf8.asp" id="form1" name="form1">

<input type="hidden" name="PSPID" value=""/>

<input type="hidden" name="ORDERID" value=""/>

<input type="hidden" name="AMOUNT" value=""/>

<input type="hidden" name="CURRENCY" value=""/>

<input type="hidden" name="LANGUAGE" value=""/>

<input type="submit" value="Submit" id="submit2" name="submit2">
</form>

about 4 years ago · Juan Pablo Isaza
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