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

108
Vistas
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 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