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

109
Views
usando Instamojo rest api con la clase Spring RestTemplate

no se puede realizar una solicitud de pago en instamojo usando instamojo rest api obteniendo una solicitud incorrecta (400), no puedo identificar por qué recibo el error 400. estoy usando la clase Spring RestTemplate para hacer una solicitud de publicación en instamojo. A continuación muestro el código que estoy usando:

 RestTemplate restTemplate = new RestTemplate(); Map<String,Object> requestBody = new HashMap<String, Object>(); requestBody.put("amount", "10000.00"); requestBody.put("purpose", "just_testing_purpose"); requestBody.put("buyer_name", "adityaPandey"); requestBody.put("email", "robust_aditya95@xyz.com"); requestBody.put("phone", "+919634222331"); requestBody.put("redirect_url", "www.imthebest.in"); requestBody.put("webhook", ""); requestBody.put("allow_repeated_payments", false); requestBody.put("send_email", false); requestBody.put("send_sms", false); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.set("X-Api-Key", "me6a901b073db4715a9c540fa00af81"); headers.set("X-Auth-Token", "k3c88da2cda6f89462d6002c9d24e80"); HttpEntity<String> request = new HttpEntity<String>(requestBody.toString(), headers); HttpEntity<String> response = restTemplate.exchange("https://www.instamojo.com/api/1.1/payment-requests/", HttpMethod.POST, request, String.class); logger.info("MailResponse "+ response);
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Hubo un problema con mis datos de requestBody . El valor del campo redirect_url debe ser con http o https , por lo que al hacer este cambio ya no recibo el error 400:

 requestBody.put("redirect_url", "http://www.imthebest.in")
over 4 years ago · Santiago Trujillo Report
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!