/**
  * Редактирование свойств кнопки
  * @param int $market_id
  * @return string
  */
 public function actionEdit($market_id = 0)
 {
     $market = Market::findOne($market_id);
     /**
      * scenarion
      * $pay
      * $buy
      */
     $buy = Button::getInstance()->initBuy($market);
     $pay = Button::getInstance()->initPay($market);
     echo Button::getInstance()->RSAInsalesDecrypt('mcEwHxdtxcGpW+1rHxg3u5dr10kIS0OIGaVK268YzHLda+fbOGxxPX4NuYyUzjlOW6DjJnkeE0G59jY4KZ+11pd9R3QpPL8usVnzSkxcIC+bUC8olt5uyvEXipoNFBarkqwN4rDBIg6I2YPwQX9JoRMkUUfzUv15LXpRc+I/gUIygEn8+z71Jo14xMSgm/xPPAomRtT68OfE8VHkHv0H5fYnFsSHtLqeBU5iha63B5AYj5SCthP1RWXP0zaMrDYIe9K0xuP3uDlK5OH/+9rIuSm9/d+encEpX5Ds7obV6Vd0I5VVaO2sGbhhHX+IOCrri9MyaoVzLscyVcJpIEPapQ==');
     return $this->render('edit', ['buy' => $buy, 'pay' => $pay]);
 }
Beispiel #2
0
 /**
  * 
  * @param type $typeResource
  * @param \frontend\models\Market $market
  * @param type $param
  * @return string
  */
 public static function getResource($typeResource, Market $market, $param = array())
 {
     $resource = "";
     switch ($typeResource) {
         case "button":
             $resource = "button";
             //получаем состояние кнопки
             $resource = isset($market->settings) ? $market->settings : "";
             //преобразуем данные кнопки
             $resource = Button::getInstance()->prepareStruct2Json($market, isset($param[$typeResource]["place"]) ? $param[$typeResource]["place"] : "cart");
             break;
         default:
             $resource = "default";
             break;
     }
     return $resource;
 }