resolved intitate payment problem
This commit is contained in:
@@ -32,7 +32,7 @@ public class BillPaymentRequest extends BaseClass {
|
||||
|
||||
private String customerMobNo;
|
||||
|
||||
private String txnAmount; // Changed to @NotNull as it's an Integer (non-nullable)
|
||||
private Integer txnAmount; // Changed to @NotNull as it's an Integer (non-nullable)
|
||||
|
||||
private String paymentRefId;
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ public class BillPaymentForwardRequest {
|
||||
private String billerCategory;
|
||||
private String macAdress;
|
||||
private String customerMobNo;
|
||||
private String txnAmount;
|
||||
private Integer txnAmount;
|
||||
private String paymentRefId;
|
||||
private String clientReqId;
|
||||
private String paymentChannel;
|
||||
|
||||
@@ -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