コード例 #1
0
 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}");
 }
コード例 #2
0
 public function actionOrder(string $genreId)
 {
     $amount = $this->pricePerGenre;
     $this->address = $this->addressProvider->getFreeAddress();
     $this->queueManager->orderGenre($genreId, $amount, $this->address);
 }