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


PHP Transaction::search方法代码示例

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


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

示例1: getIndex

 /**
  * Dashboard / All Transactions
  */
 public function getIndex()
 {
     // Page Title
     $this->_data['page_title'] = "Transactions";
     $this->_data['affiliates'] = Affiliate::orderBy('name', 'ASC')->get();
     $this->_data['products'] = Product::orderBy('name', 'ASC')->get();
     $transactions = new Transaction();
     $this->_data['transactions'] = $transactions->search();
     $this->_data['searchParams'] = $transactions->getSearchParams();
     $this->_data['revenue'] = $transactions->totalRevenue();
     $this->_data['paidAffliates'] = $transactions->paidToAffiliates();
     $this->_data['refundQueue'] = $transactions->refundQueueCount();
     return View::make('admin.transactions.index', $this->_data)->nest('header', 'admin.common.header', $this->_data)->nest('footer', 'admin.common.footer', $this->_data);
 }
开发者ID:michaelotto126,项目名称:dksolution,代码行数:17,代码来源:TransactionsController.php

示例2: header

<?php

require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Assistant", $member_role)) {
} else {
    header('location:restricted_page.php');
}
if (count($_POST) > 0) {
    //print_r($_POST);
    //print_r($_POST["condition"]);
    //print_r($_POST["returned"]);
    $tid = $_POST["tid"];
    $tran = Transaction::search($tid);
    $tran->updateComment($_POST["comment"]);
    $tran->updateRemark($_POST["remark"]);
    $condition = $_POST["condition"];
    $returned = $_POST["returned"];
    $i = 0;
    for ($i = 1; $i < count($returned); $i++) {
        if ($tran->finishReturn($returned[$i], $condition[$i])) {
            $status = true;
        } else {
            $status = false;
        }
    }
    if ($status) {
        echo "<div style='text-align:center';>";
        echo "<img src='img/icons/success-icon.png' hight='200' width='200'>";
        echo "<h2>Item Return Successful !</h2>";
        echo "<a href='item_return_panel1.php'><h4>Back to Item Returns</h4></a>";
开发者ID:NalindaHemanga,项目名称:ELMS,代码行数:31,代码来源:item_return_panel2_control.php

示例3: transactions

 public function transactions()
 {
     $collection = Transaction::search([TransactionSearch::ids()->in($this->transactionIds)]);
     return $collection;
 }
开发者ID:braintree,项目名称:braintree_php,代码行数:5,代码来源:Disbursement.php

示例4: postRecentTransactions

 /**
  * Recent Transactions
  *
  * Get 25 recent transactions of a user
  */
 public function postRecentTransactions()
 {
     if ($this->_isValidRequest()) {
         $email = Input::get('email');
         if (!$email) {
             $this->_invalidRequest("Email parameter is required");
         }
         $transaction = new Transaction();
         $product_id = Product::where('code', '=', Input::get('code'))->first()->id;
         // Set search params
         $params = array("from" => "1970-01-01", "to" => date("Y-m-d", time()), "range" => "custom", "product" => $product_id, "affiliate" => NULL, "paid" => 1, "refunded" => 1, "search" => "true", "q" => NULL, "email" => $email);
         $transactions = $transaction->search($params);
         $response = array();
         if (!$transactions) {
             die(json_encode(array('data' => $response)));
         }
         foreach ($transactions as $transaction) {
             $response[] = array('transaction_id' => $transaction->pay_id, 'amount' => $transaction->amount, 'is_refunded' => $transaction->is_refunded ? 'true' : 'false', 'date' => $transaction->updated_at, 'plan_name' => $transaction->plan_name, 'plan' => Plan::where('id', '=', $transaction->plan_id)->first()->code);
         }
         die(json_encode(array('data' => $response)));
     }
 }
开发者ID:michaelotto126,项目名称:dksolution,代码行数:27,代码来源:ApiController.php


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