public function addActivationFeedback(Borrower $borrower, $data)
 {
     $feedbackMessage = new FeedbackMessage();
     $feedbackMessage->setCc($data['cc'])->setReplyTo($data['replyTo'])->setSubject($data['subject'])->setMessage($data['message'])->setBorrowerEmail($data['borrowerEmail'])->setSenderName($data['senderName'])->setSentAt(new \DateTime())->setBorrower($borrower)->setType(FeedbackMessage::ACTIVATION_TYPE);
     $feedbackMessage->save();
     $this->borrowerMailer->sendFeedbackMail($feedbackMessage);
     return $feedbackMessage;
 }
Example #2
0
 public function addLoanFeedback($loanId, $data)
 {
     $loan = LoanQuery::create()->findOneById($loanId);
     $feedbackMessage = new FeedbackMessage();
     $feedbackMessage->setCc($data['cc'])->setReplyTo($data['replyTo'])->setSubject($data['subject'])->setMessage($data['message'])->setBorrowerEmail($data['borrowerEmail'])->setSenderName($data['senderName'])->setSentAt(new \DateTime())->setLoan($loan)->setType('loan')->setLoanApplicant($loan->getBorrower());
     $feedbackMessage->save();
     $this->borrowerMailer->sendLoanFeedbackMail($feedbackMessage);
     return $feedbackMessage;
 }