Skip to content

Commit cd061ff

Browse files
committed
fixed due date
1 parent d934f6d commit cd061ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/it/gov/pagopa/paymentupdater/service/PaymentServiceImpl.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public void save(Payment reminder) {
7171

7272
public ProxyResponse checkPayment(Payment payment)
7373
throws JsonProcessingException, InterruptedException, ExecutionException {
74+
LocalDate paymentDueDate = payment.getDueDate() != null ? payment.getDueDate().toLocalDate() : null;
7475
ProxyResponse proxyResp = new ProxyResponse();
7576
try {
7677
if (enableRestKey) {
@@ -102,11 +103,11 @@ public ProxyResponse checkPayment(Payment payment)
102103
producer.sendPaymentUpdate(mapper.writeValueAsString(message), kafkaTemplatePayments, topic);
103104
}
104105
proxyResp.setPaid(true);
105-
proxyResp.setDueDate(payment.getDueDate().toLocalDate());
106+
proxyResp.setDueDate(paymentDueDate);
106107
return proxyResp;
107108
}
108109
proxyResp.setPaid(false);
109-
proxyResp.setDueDate(payment.getDueDate().toLocalDate());
110+
proxyResp.setDueDate(paymentDueDate);
110111
return proxyResp;
111112
} else {
112113
throw errorException;

0 commit comments

Comments
 (0)