예제 #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);
 }