Esempio n. 1
0
 protected function beforeTransaction(Transaction $transaction)
 {
     // @change me into event
     if ($transaction->needExchange()) {
         $exchanged = $this->exchanger->exchange($transaction->getAmount(), $transaction->getCurrency(), CurrencyCode::VIRTUAL);
         $transaction->setVirtualAmount($exchanged);
     }
 }