added basic strcture for the callbackapi

This commit is contained in:
Lincpay Tech
2025-11-24 13:07:26 +05:30
parent d838f4c5cf
commit 08d5509c1a
5 changed files with 93 additions and 6 deletions
@@ -368,7 +368,6 @@ public class AgentServiceImpl implements AgentService {
billFetchByBillIdRequest.setReqId(reqId);
LOGGER.info("Waiting for 2 seconds before fetching bill by ID...");
try {
Thread.sleep(12000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
@@ -648,9 +647,53 @@ public class AgentServiceImpl implements AgentService {
throw new CustomException("Invalid JSON received from API");
}
}
//================================== End Bill fetch and Bill Validate by Client Req Id==================================//
//===================================Callback Methods BillFetch and BillValidate ==================================//
@Override
public ResponseModel processBillFetchCallback(BillDataResponse billDataResponse) {
LOGGER.info("Recived Call Back from billDataResponse: {}", billDataResponse);
if(billDataResponse.getGenericResponse().getStatusCode().equals("200")) {
}
else {
LOGGER.info("Bill Fetch Callback Failed with Status: {}", billDataResponse.getGenericResponse().getStatus());
}
return new ResponseModel("CallBack Recieved Successfully",
"200",
200,
"");
}
@Override
public ResponseModel processBillValidateCallback(FetchBillValidateResponse billValidateResponse) {
LOGGER.info("Recived Call Back from FetchBillValidateResponse: {}", billValidateResponse);
if(billValidateResponse.getGenericResponse().getStatusCode().equals("200")) {
}
else {
LOGGER.info("Bill Fetch Callback Failed with Status: {}", billValidateResponse.getGenericResponse().getStatus());
}
return new ResponseModel("CallBack Recieved Successfully",
"200",
200,
"");
}}
/*
* @Override public ResponseModel
* initiateBillValidate(FetchBillValidatestRequest fetchBillValidateRequest) {
*
@@ -838,4 +881,4 @@ public class AgentServiceImpl implements AgentService {
*/
}