<?php echo $form->field($model, 'description')->textarea(); ?> <?php echo $form->fieldRadioListBoolean($model, 'active'); ?> <?php echo $form->field($model, 'personTypeIds')->checkboxList(\yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopPersonType::find()->all(), 'id', 'name')); ?> <?php echo $form->fieldInputInt($model, 'priority'); ?> <?php echo $form->field($model, 'component')->listBox(array_merge(['' => ' — '], [\skeeks\cms\shop\paySystems\RobokassaPaySystem::className() => (new \skeeks\cms\shop\paySystems\RobokassaPaySystem())->descriptor->name, \skeeks\cms\shop\paySystems\PayPalPaySystem::className() => (new \skeeks\cms\shop\paySystems\PayPalPaySystem())->descriptor->name, \skeeks\cms\shop\paySystems\YandexKassaPaySystem::className() => (new \skeeks\cms\shop\paySystems\YandexKassaPaySystem())->descriptor->name, \skeeks\cms\shop\paySystems\TinkoffPaySystem::className() => (new \skeeks\cms\shop\paySystems\TinkoffPaySystem())->descriptor->name]), ['size' => 1, 'data-form-reload' => 'true']); ?> <? if ($handler) : ?> <?php echo \skeeks\cms\modules\admin\widgets\BlockTitleWidget::widget(['content' => \Yii::t('skeeks/cms', 'Settings')]); ?> <?php echo $handler->renderConfigForm($form); ?> <? endif; ?> <!--<div class="row"> <div class="col-md-6"> <?/*= $form->fieldSelect($model, 'component', [
/** * @param ShopOrder $order * @return \skeeks\cms\shop\paySystems\robokassa\Merchant * @throws BadRequestHttpException */ protected function getMerchant(ShopOrder $order) { /** @var \skeeks\cms\shop\paySystems\robokassa\Merchant $merchant */ $paySystemHandler = $order->paySystem->paySystemHandler; if (!$paySystemHandler || !$paySystemHandler instanceof RobokassaPaySystem) { RobokassaPaySystem::logError('Not found pay system'); throw new BadRequestHttpException('Not found pay system'); } $merchant = $paySystemHandler->getMerchant(); if (!$merchant instanceof Merchant) { RobokassaPaySystem::logError('Not found merchant'); throw new BadRequestHttpException('Not found merchant'); } return $merchant; }