adding pagination for transaction controller
This commit is contained in:
@@ -10,6 +10,8 @@ import java.util.UUID;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.domain.Specification;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -182,8 +184,8 @@ public class TransactionService {
|
||||
return transaction;
|
||||
}
|
||||
|
||||
public List<Transaction> findAll(Specification<Transaction> spec) {
|
||||
return transactionRepository.findAll(spec, Sort.by(Sort.Direction.ASC, "createdAt"));
|
||||
public Page<Transaction> findAll(Specification<Transaction> spec, Pageable pageable) {
|
||||
return transactionRepository.findAll(spec, pageable);
|
||||
}
|
||||
|
||||
public Transaction save(Transaction transaction){
|
||||
|
||||
@@ -63,7 +63,7 @@ public class EcocashRemotePaymentProcessor implements TransactionProcessorInterf
|
||||
.action("PAYMENT")
|
||||
.sandbox(true)
|
||||
.paymentProcessorLabel("ECOCASH")
|
||||
.responseUrl("https://peakapi.stewardpay.co.zw")
|
||||
.responseUrl("https://peakapi.qantra.co.zw")
|
||||
.build();
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
||||
Reference in New Issue
Block a user