PaymentLog paymentLog = paymentLogService.getPaymentLog(transactionId); boolean pending = paymentLog.getTransactionStatus() == TransactionStatus.PENDING; boolean allocationMailSent = paymentLog.isAllocationMessageSent(); boolean refundEntryExists = paymentLog.getEligibleForRefund() == null;