updated entity and removed mid from paymentstartRecord
This commit is contained in:
@@ -46,7 +46,6 @@ public class PaymentController {
|
|||||||
@ApiDocCommonResponses
|
@ApiDocCommonResponses
|
||||||
public ResponseEntity<ResponseModel> requestBillFetch(
|
public ResponseEntity<ResponseModel> requestBillFetch(
|
||||||
@RequestBody BillPaymentRequest billPaymentRequest) {
|
@RequestBody BillPaymentRequest billPaymentRequest) {
|
||||||
|
|
||||||
ResponseModel response = paymentService.initiatePayment(billPaymentRequest);
|
ResponseModel response = paymentService.initiatePayment(billPaymentRequest);
|
||||||
return ResponseEntity.ok(response);
|
return ResponseEntity.ok(response);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,9 +66,12 @@ public class TransactionDTO {
|
|||||||
private String planType;
|
private String planType;
|
||||||
|
|
||||||
// ✅ Date fields as String (for JSON compatibility)
|
// ✅ Date fields as String (for JSON compatibility)
|
||||||
private String creationDate;
|
@JsonProperty("creationDate")
|
||||||
private String modifiedDate;
|
private String creationDateBank;
|
||||||
|
@JsonProperty("modifiedDate")
|
||||||
private Long createdEpochDate;
|
private String modifiedDateBank;
|
||||||
private Long modifiedEpochDate;
|
@JsonProperty("createdEpochDate")
|
||||||
|
private Long createdEpochDateBank;
|
||||||
|
@JsonProperty("modifiedEpochDate")
|
||||||
|
private Long modifiedEpochDateBank;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,9 +47,6 @@ public class PaymentStartRecord extends Auditable {
|
|||||||
@Column(name = "amount", nullable = false)
|
@Column(name = "amount", nullable = false)
|
||||||
private String amount;
|
private String amount;
|
||||||
|
|
||||||
@Column(name = "mid", nullable = false)
|
|
||||||
private String mid;
|
|
||||||
|
|
||||||
@Column(name = "txn_id", unique = true, nullable = false)
|
@Column(name = "txn_id", unique = true, nullable = false)
|
||||||
private String txnId;
|
private String txnId;
|
||||||
|
|
||||||
|
|||||||
@@ -164,15 +164,15 @@ public class TransactionMaster extends Auditable {
|
|||||||
@Column(name = "plan_type")
|
@Column(name = "plan_type")
|
||||||
private String planType;
|
private String planType;
|
||||||
|
|
||||||
@Column(name = "creation_date")
|
@Column(name = "creation_date_bank")
|
||||||
private String creationDate;
|
private String creationDateBank;
|
||||||
|
|
||||||
@Column(name = "modified_date")
|
@Column(name = "modified_date_bank")
|
||||||
private String modifiedDate;
|
private String modifiedDateBank;
|
||||||
|
|
||||||
@Column(name = "created_epoch_date")
|
@Column(name = "created_epoch_date_bank")
|
||||||
private Long createdEpochDate;
|
private Long createdEpochDateBank;
|
||||||
|
|
||||||
@Column(name = "modified_epoch_date")
|
@Column(name = "modified_epoch_date_bank")
|
||||||
private Long modifiedEpochDate;
|
private Long modifiedEpochDateBank;
|
||||||
}
|
}
|
||||||
@@ -134,7 +134,7 @@ public class ComplainServiceImpl implements ComplainService {
|
|||||||
|
|
||||||
TransactionMaster transData = dataById.get();
|
TransactionMaster transData = dataById.get();
|
||||||
// Inject tenantId + agentId into request JSON
|
// Inject tenantId + agentId into request JSON
|
||||||
String transactionCreatedDateString = transData.getCreationDate();
|
String transactionCreatedDateString = transData.getCreationDateBank();
|
||||||
LOGGER.info("Date is coming -:" + transactionCreatedDateString);
|
LOGGER.info("Date is coming -:" + transactionCreatedDateString);
|
||||||
LOGGER.info("Return Date Time After 24 Hours"
|
LOGGER.info("Return Date Time After 24 Hours"
|
||||||
+ BillerMapperHelper.isComplaintAllowed(transactionCreatedDateString));
|
+ BillerMapperHelper.isComplaintAllowed(transactionCreatedDateString));
|
||||||
|
|||||||
@@ -1037,9 +1037,9 @@ public class BillerMapperHelper {
|
|||||||
dto.setPaymentInformation(transactionMaster.getPaymentInformation());
|
dto.setPaymentInformation(transactionMaster.getPaymentInformation());
|
||||||
dto.setPlanId(transactionMaster.getPlanId());
|
dto.setPlanId(transactionMaster.getPlanId());
|
||||||
dto.setPlanType(transactionMaster.getPlanType());
|
dto.setPlanType(transactionMaster.getPlanType());
|
||||||
dto.setCreationDate(transactionMaster.getCreationDate());
|
dto.setCreationDate(transactionMaster.getCreationDateBank());
|
||||||
dto.setModifiedDate(transactionMaster.getModifiedDate());
|
dto.setModifiedDate(transactionMaster.getModifiedDateBank());
|
||||||
dto.setCreatedEpochDate(transactionMaster.getCreatedEpochDate());
|
dto.setCreatedEpochDate(transactionMaster.getCreatedEpochDateBank());
|
||||||
dto.setModifiedEpochDate(transactionMaster.getModifiedEpochDate());
|
dto.setModifiedEpochDate(transactionMaster.getModifiedEpochDate());
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
@@ -1052,7 +1052,7 @@ public class BillerMapperHelper {
|
|||||||
TransactionHistoryParticularDetailsDTO dto = new TransactionHistoryParticularDetailsDTO();
|
TransactionHistoryParticularDetailsDTO dto = new TransactionHistoryParticularDetailsDTO();
|
||||||
dto.setBankTxnId(transactionMaster.getBankTxnId());
|
dto.setBankTxnId(transactionMaster.getBankTxnId());
|
||||||
dto.setTxnId(transactionMaster.getTxnId());
|
dto.setTxnId(transactionMaster.getTxnId());
|
||||||
dto.setCreationDate(transactionMaster.getCreationDate());
|
dto.setCreationDate(transactionMaster.getCreationDateBank());
|
||||||
dto.setBillerCategory(transactionMaster.getBillerCategory());
|
dto.setBillerCategory(transactionMaster.getBillerCategory());
|
||||||
dto.setBillerName(transactionMaster.getBillerName());
|
dto.setBillerName(transactionMaster.getBillerName());
|
||||||
dto.setStatus(transactionMaster.getStatus());
|
dto.setStatus(transactionMaster.getStatus());
|
||||||
@@ -1095,20 +1095,20 @@ public class BillerMapperHelper {
|
|||||||
record.setClientUserId(request.getClientUserId());
|
record.setClientUserId(request.getClientUserId());
|
||||||
record.setInternalTxnId(txnId);
|
record.setInternalTxnId(txnId);
|
||||||
|
|
||||||
if (apiResponse != null && apiResponse.getResponseData() != null) {
|
if (apiResponse != null &&
|
||||||
record.setAmount(Optional.ofNullable(apiResponse.getResponseData().getAmount()).orElse("0.00"));
|
apiResponse.getResponseData() != null) {
|
||||||
record.setMid(Optional.ofNullable(apiResponse.getResponseData().getMid()).orElse("DUMMY_MID"));
|
record.setAmount(Optional.ofNullable(apiResponse.getResponseData().getAmount(
|
||||||
record.setTxnId(Optional.ofNullable(apiResponse.getResponseData().getTxnId()).orElse("DUMMY_TXN"));
|
)).orElse("0.00"));
|
||||||
record.setQrString(Optional.ofNullable(apiResponse.getResponseData().getQrString()).orElse("NO_QR"));
|
|
||||||
// parse createdOn string into LocalDateTime and set on Auditable
|
record.setTxnId(Optional.ofNullable(apiResponse.getResponseData().getTxnId())
|
||||||
LocalDateTime createdOn = parseToLocalDateTime(apiResponse.getResponseData().getCreatedOn());
|
.orElse("DUMMY_TXN"));
|
||||||
|
record.setQrString(Optional.ofNullable(apiResponse.getResponseData().
|
||||||
|
getQrString()).orElse("NO_QR")); // parse createdOn string into LocalDateTime and set on Auditable
|
||||||
|
LocalDateTime createdOn =parseToLocalDateTime(apiResponse.getResponseData().getCreatedOn());
|
||||||
|
|
||||||
|
record.setTxnStatus("PENDING"); } else { record.setAmount("0.00");
|
||||||
|
record.setTxnStatus("PENDING"); }
|
||||||
|
|
||||||
record.setTxnStatus("PENDING");
|
|
||||||
} else {
|
|
||||||
record.setAmount("0.00");
|
|
||||||
record.setMid(request.getMid());
|
|
||||||
record.setTxnStatus("PENDING");
|
|
||||||
}
|
|
||||||
|
|
||||||
// store the original request body and raw response
|
// store the original request body and raw response
|
||||||
record.setRequestBody(requestJson);
|
record.setRequestBody(requestJson);
|
||||||
|
|||||||
Reference in New Issue
Block a user