Ejemplo n.º 1
0
 public function actionProcessed()
 {
     $transactionId = app()->session['transaction_id'];
     $model = Transactions::model()->findByPk($transactionId);
     // Транзакция не найдена
     if ($model === NULL) {
         user()->setFlash(FlashConst::MESSAGE_ERROR, Yii::t('main', 'Транзакция не найдена.'));
         $this->redirect(array('index'));
     }
     if ($model->isPaid()) {
         user()->setFlash(FlashConst::MESSAGE_ERROR, Yii::t('main', 'Транзакция уже обработана.'));
         $this->redirect(array('index'));
     }
     $deposit = new Deposit();
     $deposit->init($model->payment_system);
     $this->render('//cabinet/deposit/processed', array('model' => $model, 'fields' => $deposit->getFields($model), 'formAction' => $deposit->getFormAction(), 'deposit' => $deposit));
 }