/** * Creates a new SinaDeposit model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new SinaDeposit(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', ['model' => $model]); } }
/** * 用户充值数据记录 * @param $uid * @param $identity_id * @param $out_trade_no * @param $account_type * @param $amount * @param $payer_ip * @param $pay_method * @param $ticket * @param $status * @param $msg * @param $validate_code * @return bool */ private static function depositLog($uid, $identity_id, $out_trade_no, $account_type, $amount, $payer_ip, $pay_method, $ticket, $status, $msg, $validate_code) { $log = new SinaDeposit(); $log->uid = $uid; $log->identity_id = $identity_id; $log->out_trade_no = $out_trade_no; $log->account_type = $account_type; $log->amount = $amount; $log->payer_ip = $payer_ip; $log->pay_method = $pay_method; $log->ticket = $ticket; $log->validate_code = $validate_code; $log->status = $status; $log->msg = $msg; return $log->save(); }