Example #1
0
 public function addLenderInviteTransaction(ConnectionInterface $con, Invite $invite)
 {
     $amount = Money::create(25);
     $transactionLender = new InviteTransaction();
     $transactionLender->setLender($invite->getLender())->setAmount($amount)->setDescription('Lender invite credit')->setTransactionDate(new \DateTime())->setType(Transaction::LENDER_INVITE_INVITER);
     $transactionLender->save($con);
     $transactionInvitee = new InviteTransaction();
     $transactionInvitee->setLender($invite->getInvitee())->setAmount($amount)->setDescription('Lender invite credit')->setTransactionDate(new \DateTime())->setType(Transaction::LENDER_INVITE_INVITEE);
     $transactionInvitee->save($con);
 }
Example #2
0
 public function trackInviteAccept(Invite $invite)
 {
     Mixpanel::track('Invite accepted', array('username' => $invite->getInvitee()->getUser()->getUsername(), 'email' => $invite->getEmail(), 'lender_id' => $invite->getLenderId()));
 }