当前位置: 首页>>代码示例>>PHP>>正文


PHP AppController::Erro方法代码示例

本文整理汇总了PHP中AppController::Erro方法的典型用法代码示例。如果您正苦于以下问题:PHP AppController::Erro方法的具体用法?PHP AppController::Erro怎么用?PHP AppController::Erro使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppController的用法示例。


在下文中一共展示了AppController::Erro方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Callback

 public function Callback($PSTData, $GETData)
 {
     //parsian gateway
     if (isset($GETData['au'], $GETData['rs'])) {
         $t = new Transaction();
         $trans = $t->get_by_au($GETData['au']);
         if ($trans && $GETData['rs'] == 0) {
             $totalamont = $trans['amount'];
             //var_dump($trans);exit;
             $u = new user();
             $guest = $u->Get_Guest_ID();
             //get invoice
             $invoice = new Invoice();
             $invc_num = $invoice->get_by_transID($trans['id']);
             //var_dump($invc_num);exit;
             //check tranaction by PaymentEnquiry
             $gt = new ParsianGateway(Parsian_PIN);
             //confirm reservation
             $ctrl = new HotelController();
             $refference = $invoice->get_By_id($invc_num);
             $refference = $refference['refference'];
             $r = new Request();
             $confirm = $r->get_FinalReserve($refid);
             if ($confirm) {
                 //if (true) {
                 //                    $confirm = array(
                 //                        'voucher' => '101010',
                 //                        'Reference' => '202020'
                 //                    );
                 //var_dump($confirm);exit;
                 if ($gt->PaymentEnquiry($GETData['au'], $GETData['rs'])) {
                     //if (TRUE) {
                     //add paydoc
                 } else {
                     $app = new AppController();
                     $app->Erro('در تایید تراکنش خطایی رخ داد ');
                     return FALSE;
                 }
                 //chang inoice status
                 $invoice->submit($invc_num, $confirm['voucher'], $confirm['Reference']);
                 $pd = new Paydoc();
                 if (isset($_SESSION['user']['id'])) {
                     $current_credit = $u->getcredit($_SESSION['user']['id'], 'IRR');
                     $remain = $current_credit - $totalamont;
                     if ($pd->Save($_SESSION['user']['id'], -1, $totalamont, $invc_num, 'IRR')) {
                         $u->change_credit($_SESSION['user']['id'], 'IRR', $remain);
                     }
                 } else {
                     $pd->Save($guest, -1, $totalamont, $invc_num, 'IRR');
                 }
                 $psgr = new passenger();
                 $rmmm = new InvoiceDetail();
                 $inv = new Invoice();
                 $transfer_data = $inv->get_Tranfer_Data($invc_num);
                 //print_r($transfer_data);exit;
                 //$invc_num
                 $variable = array();
                 $variable['voucher'] = $confirm['voucher'];
                 $variable['invoce_data'] = $invoice->get_By_id($invc_num);
                 $variable['passengers'] = $psgr->getByInvoice($invc_num);
                 $variable['rooms'] = $rmmm->getByInvoice($invc_num);
                 $variable['transfer'] = $transfer_data;
                 if ($variable) {
                     foreach ($variable as $k => $v) {
                         ${$k} = $v;
                     }
                 }
                 $ctrl->ShowReserve_info($confirm);
             } else {
                 $app = new AppController();
                 $app->Erro('در تکمیل رزرو خطایی رخ داد ');
                 return FALSE;
             }
             //add paydoc
         } else {
             if ($GETData['rs'] == 1) {
                 $app = new AppController();
                 $app->Erro('تراکنش موفق ');
             } else {
                 $app = new AppController();
                 $app->Erro('شماره تراکنش اشتباه است');
             }
             return FALSE;
         }
     } else {
         //err for now
         $app = new AppController();
         $app->Erro('شماره تراکنش اشتباه است');
         return FALSE;
     }
 }
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:91,代码来源:BankController.php

示例2: AppController

                                     $u->change_credit($_SESSION['user']['id'], $_SESSION['currency_unit'], $remain);
                                 }
                                 $ctrl->ShowReserve_info($confirm);
                             } else {
                                 $app = new AppController();
                                 $app->Erro('متاسفانه درتکمیل   فرآیند رزرو خطایی رخ داد');
                             }
                         } else {
                             $app = new AppController();
                             $app->Erro(LANG::T('Low Creadit'));
                         }
                     }
                 }
             } else {
                 $app = new AppController();
                 $app->Erro('متاسفانه در فرآیند رزرو خطایی رخ داد');
             }
             break;
     }
     break;
 case 'user':
     $usr = new UserController();
     switch ($action) {
         case 'login':
             if (isset($_SESSION['user']['id'])) {
                 header('location:index.php?controller=hotel&action=search');
             } else {
                 $usr->login();
             }
             break;
         case 'login_check':
开发者ID:jnaroogheh,项目名称:darvishi,代码行数:31,代码来源:index.php


注:本文中的AppController::Erro方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。