added basic strcture for the callbackapi
This commit is contained in:
@@ -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 {
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -398,6 +398,24 @@ public class PaymentServiceImpl implements PaymentService {
|
||||
throw new CustomException("Invalid JSON received from API");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResponseModel handlePaymentIntiateCallback(TransactionStatusResponse transactionStatusResponse) {
|
||||
|
||||
LOGGER.info("Recived Call Back from FetchBillValidateResponse: {}", transactionStatusResponse);
|
||||
if(transactionStatusResponse.getGeneralResp().getStatusCode().equals("200")) {
|
||||
|
||||
}
|
||||
else {
|
||||
LOGGER.info("Bill Fetch Callback Failed with Status: {}", transactionStatusResponse.getGeneralResp().getStatus());
|
||||
|
||||
}
|
||||
|
||||
return new ResponseModel("CallBack Recieved Successfully",
|
||||
"200",
|
||||
200,
|
||||
"");
|
||||
}
|
||||
}
|
||||
/* PollBack logic for the fetchTxnByTxnId API
|
||||
* @Override public ResponseModel fetchTxnByTxnId(BillFetchByBillIdRequest
|
||||
|
||||
Reference in New Issue
Block a user