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);
|
||||
|
||||
@@ -303,7 +303,7 @@ public class PaymentStartServiceImpl implements PaymentStartService {
|
||||
rd.setAmount(parsedAmount != null && !parsedAmount.isEmpty() ? parsedAmount : "0.00");
|
||||
rd.setMid(parsedMid);
|
||||
rd.setOrderNo(orderNo);
|
||||
rd.setQrString("NO_QR");
|
||||
rd.setQrString("HTML_RESPONSE");
|
||||
rd.setCreatedOn(LocalDateTime.now().toString());
|
||||
|
||||
apiResp.setResponseData(rd);
|
||||
|
||||
Reference in New Issue
Block a user