resolved intitate payment problem
This commit is contained in:
@@ -138,9 +138,15 @@ public class PaymentServiceImpl implements PaymentService {
|
||||
LOGGER.warn("Invalid response structure received for txnId={}", txnId);
|
||||
throw new CustomException(BBPSConstant.INVALID_STRUCTURE);
|
||||
}
|
||||
|
||||
BillPaymentResponse billPaymentResponse = objectMapper.convertValue(dataMap, BillPaymentResponse.class);
|
||||
|
||||
GeneralResp generalResponse = billPaymentResponse.getGenericResponse();
|
||||
LOGGER.info("genric Response" + generalResponse);
|
||||
if(generalResponse.getStatus().equalsIgnoreCase("Failed")) {
|
||||
throw new CustomException(generalResponse.getMessage(), generalResponse.getStatus(),
|
||||
Integer.parseInt(generalResponse.getStatusCode()), generalResponse.getRemarks());
|
||||
}
|
||||
|
||||
|
||||
BillPayment entity = modelMapper.map(billPaymentResponse, BillPayment.class);
|
||||
paymentRepository.save(entity);
|
||||
|
||||
Reference in New Issue
Block a user