Exemple #1
0
 public function onWithdrawnFromSource(MoneyWereWithdrawnEnvelope $event)
 {
     if (!($process = $this->getProcessForTransaction($event->getTransaction()))) {
         return;
     }
     $this->assertFinalized($process);
     $process->withdrawnFromSource();
     $process->depositOnTarget();
     $this->bus->handle(new TransferDepositCommand((string) $process->getTargetAccountNumber(), (int) $process->getAmount(), (string) $process->getTransaction()));
 }