Initial commit

This commit is contained in:
NewUsername
2025-10-10 12:56:49 +03:00
parent f9579e4839
commit bec7093889
42 changed files with 1574 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package com.test.payment.jobs;
import com.test.payment.repository.MpesaRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
@RequiredArgsConstructor
@Slf4j
public class MpesaTransactionJob {
private final MpesaRepository mpesaRepository;
@Scheduled(fixedDelay = 60000)
public void pullTransactions() {
mpesaRepository.findAllTransactions()
.doOnNext(tx -> log.info("Checking transaction: {}", tx))
.subscribe();
}
}