PayController.php 500 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\controllers;
  3. use Yii;
  4. use app\models\PayForm;
  5. class PayController extends \yii\web\Controller
  6. {
  7. public function actionIndex()
  8. {
  9. $model = new PayForm();
  10. if ($model->load(Yii::$app->request->post())) {
  11. Yii::$app->session->setFlash('success', 'This is the message');
  12. return $this->refresh();
  13. }
  14. $cc = $model->getAmount();
  15. return $this->render('index', [
  16. 'model' => $model,
  17. ]);
  18. }
  19. }