public function getPayments() { $payments = new Transactions(); $payments->accountID = $_SESSION['accountID']; if (isset($_SESSION['billPaymentList'])) { $payments->transactionType = 'Biller'; } elseif (isset($_SESSION['fundsTransferPaymentList'])) { $payments->transactionType = 'Payee'; } elseif (isset($_SESSION['allPaymentList'])) { $payments->transactionType = 'Both'; } $_SESSION['payeeTransactions'] = $payments->getPayments(); $_SESSION['numPayments'] = $payments->countPayments(); }