public function processTransferPayee() { $this->getAccount(); $transaction = new Transactions(); $transaction->accountID = $this->_accountID; $transaction->transactionDate = $_SESSION['transferDate']; $transaction->transactionDescription = 'Description: ' . $_SESSION['transferDescription']; $transaction->transactee = $_SESSION['transferAccountPayee']; if (isset($_SESSION['transferDate'])) { $date = date_create($_SESSION['transferDate']); $transferDate = date_format($date, 'zY'); $transferDate = intval($transferDate); $currentDate = date_create(date('m/d/Y h:i:s a', time())); $currentDate = date_format($currentDate, 'zY'); $currentDate = intval($currentDate); if ($transferDate == $currentDate) { $_SESSION['transferStatus'] = 'Paid'; } elseif ($transferDate > $currentDate) { $_SESSION['transferStatus'] = 'Future Payment'; } else { return false; } } $transaction->transactionStatus = $_SESSION['transferStatus']; $transaction->debits = $_SESSION['transferAmount']; $transaction->transactionType = $_SESSION['transferType']; $transaction->transactionID = $transaction->set(); if ($transaction->transactionID > 0) { $transaction->getTransaction(); $conf = 'B' . $transferDate . $transaction->transactionID; $_SESSION['transferConf'] = $conf; $_SESSION['transferCreated'] = $transaction->transactionDate; return true; } else { return false; } }