This commit is contained in:
Mohd-Arham
2025-11-24 09:56:31 +05:30
parent bb38775e5b
commit 3a7a278774
10 changed files with 168 additions and 23 deletions
@@ -91,6 +91,8 @@ public class ComplainServiceImpl implements ComplainService {
String requestId = complainRequestDTO.getReqId();
String fullUrl = complainDataUrl + BBPSConstant.ADD_COMPLAIN_ENDPOINT;
LOGGER.info("Full URL-: "+ fullUrl);
// Convert input DTO to JSON
String requestJson = helper.convertObjectToJson(complainRequestDTO);
@@ -194,8 +196,14 @@ public class ComplainServiceImpl implements ComplainService {
try {
LOGGER.info("Calling external API: {}", fullUrl);
Map<String, String> responseMap = httpService.postRequest(fullUrl, requestJson, headers);
ObjectNode root = (ObjectNode) objectMapper.readTree(requestJson);
root.put("tenantId", headersData.getTenantId());
//root.put("agentId", headersData.getAgentId());
String finalJson = root.toString();
LOGGER.info("Final Request Sent to API: {}", finalJson);
// LOGGER.info("Calling external API: {}", fullUrl);
Map<String, String> responseMap = httpService.postRequest(fullUrl, finalJson, headers);
String responseData = responseMap.get("data");