コード例 #1
0
ファイル: Echeck.php プロジェクト: irovast/eyedock
 /**
  * Process the validated form and if ok, display thanks page,
  * if not ok, return false
  */
 public function processEcheck()
 {
     $echeck = $this->getDi()->echeckRecordRecord;
     $this->form->toEcheckRecord($echeck);
     $echeck->user_id = $this->invoice->user_id;
     $result = $this->plugin->doBill($this->invoice, true, $echeck);
     if ($result->isSuccess()) {
         if ($this->invoice->rebill_times > 0 && !$echeck->pk()) {
             $this->plugin->storeEcheck($echeck, new Am_Paysystem_Result());
         }
         $this->redirectLocation($this->plugin->getReturnUrl());
         return true;
     } elseif ($result->isAction() && $result->getAction() instanceof Am_Paysystem_Action_Redirect) {
         $result->getAction()->process($this);
         // throws Am_Exception_Redirect (!)
     } else {
         $this->view->error = $result->getErrorMessages();
     }
 }