public function orderSongs(Form $form) { $songsArray = $form->getValues(); $songIds = []; foreach ($songsArray as $song => $selected) { if ($selected) { $songIds[] = Strings::replace($song, '~_~', '-'); } } $amount = $this->pricePerSong * count($songIds); $address = $this->addressProvider->getFreeAddress(); $this->queueManager->orderSongs($songIds, $amount, $address); $this->redirectUrl("bitcoin:{$address->getAddress()}?amount={$amount}"); }
public function actionOrder(string $genreId) { $amount = $this->pricePerGenre; $this->address = $this->addressProvider->getFreeAddress(); $this->queueManager->orderGenre($genreId, $amount, $this->address); }