Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

297
Views
Error al cargar el recurso: el servidor respondió con un estado de 406 ()

Estoy tratando de integrar la pasarela de pago de Stripe en el proyecto Spring Boot. Recibo un error del lado del cliente, no sé por qué. Estoy usando STS IDE.

A continuación se muestra el formulario de pago:

 <div class="checkout"> <form id="checkoutform" class="form" autocomplete="off"> <h4>Pay With Card</h4> <!-- A Stripe Element will be inserted here. --> <div id="payment-element"></div> <button class="btn" id="submit" type="submit"> <i class="fa fa-lock"></i>Pay Now </button> <div id="error-message"> <!-- Display error message to your customers here --> </div> </form> <div id="messages" role="alert" style="display: none;"></div> </div> <script src="https://js.stripe.com/v3/"></script> <script src="public/web/js/userpayment.js" defer></script>

A continuación se muestra el script para la página de pago:

 document.addEventListener('DOMContentLoaded', async () => { debugger // Load the publishable key from the server. The publishable key is set in your .env file. const {publishableKey} = await fetch('api/config').then((r) => r.json()); if (!publishableKey) { addMessage( 'No publishable key returned from the server. Please check `.env` and try again' ); alert('Please set your Stripe publishable API key in the .env file'); } const stripe = Stripe(publishableKey, { apiVersion: '2020-08-27', }); });

A continuación se muestra mi controlador de pago:

 @RequestMapping(value = {ApiUrl.apiConfig}, method = {RequestMethod.GET}, produces = {MediaType.APPLICATION_JSON_VALUE}) public ResponseEntity<?> config() { return new ResponseEntity<>(new ConfigResponse(stripePublishableKey), HttpStatus.OK); }

No sé por qué estoy recibiendo este error.

Captura de pantalla para mostrar el error

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!