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


PHP PSU::has_filter方法代码示例

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


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

示例1: process

 public function process()
 {
     if (!$this->txbepay_load_status) {
         PSU::db('banner')->StartTrans();
         if ($this->status_flag == 'success') {
             if ($this->txbepay_trans_type == 1) {
                 $this->detail_code = 'IQEW';
                 $this->detail_desc = 'Credit-Card-Payment-Thank You';
                 $this->multiplier = 1;
             } elseif ($this->txbepay_trans_type == 2) {
                 $this->detail_code = 'IREW';
                 $this->detail_desc = 'Credit-Card-Refund';
                 $this->multiplier = -1;
             } elseif ($this->txbepay_trans_type == 3) {
                 $this->detail_code = 'IQEC';
                 $this->detail_desc = 'E-Check-Payment-Thank You';
                 $this->multiplier = 1;
             }
             //end else
             $this->transaction = new \PSU\AR\Transaction\Receivable($this->txbepay_order_number, $this->txbepay_trans_total / 100, $this->multiplier);
             $this->bursar_term = $this->transaction->term_code;
             $receivable_template = $this->init_template();
             $this->transaction->split($receivable_template);
             if (PSU::has_filter('etrans_post_split')) {
                 PSU::apply_filters('etrans_post_split', $this);
             }
             //end if
             $this->transaction->save();
             if (PSU::has_filter('etrans_post_save')) {
                 PSU::apply_filters('etrans_post_save', $this);
             }
             //end if
             $this->txbepay_load_status = 'loaded';
             $this->txbepay_load_date = date('Y-m-d');
             $this->save();
             $amount = !PSU::db('banner')->HasFailedTrans() ? $this->txbepay_trans_total / 100 : false;
         } else {
             $this->txbepay_load_status = 'no_load';
             $this->txbepay_load_date = date('Y-m-d');
             $this->save();
             $amount = 0;
         }
         //end else
         PSU::db('banner')->CompleteTrans();
         return $amount;
     }
     //end if
     return false;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:49,代码来源:ETransLegacyAR.class.php

示例2: split

 /**
  * split transaction into receivable entries
  *
  * @param $record_template \b bare-bones TBRACCD field array that will be used for all TBRACCD records during transaction processing
  */
 public function split($record_template)
 {
     $this->amount_paid_remaining = $this->amount;
     /**
      * Implementing the below code to work with AR office in an effort 
      * to have student payments only apply to the term that they select 
      * within the online billing app.
      */
     $term_code = $record_template['term_code'] ?: $this->term_code;
     $this->term_payment($term_code, $record_template, $this->amount);
     return $this;
     //------------Currently Ignoring Everything Below Here---------------
     // find the earliest unsatisfied term
     $early_term = $this->person->bill->earliest_unsatisfied_term;
     $only_term_types = array();
     $pre_apply = array();
     $skip = array();
     // populate $only_term_types via filter if filter exists and level has been set
     if (\PSU::has_filter('transaction_term_types') && $this->level) {
         $only_term_types = \PSU::apply_filters('transaction_term_types', $only_term_types, $this->level);
     }
     //end if
     // populate $skip via filter if filter exists
     if (\PSU::has_filter('transaction_term_skip') && $this->level) {
         $skip = \PSU::apply_filters('transaction_term_skip', $skip, $this->person->bill, $this->level);
     }
     //end if
     // populate $pre_apply via filter if filter is set
     if (\PSU::has_filter('transaction_split_pre_apply')) {
         $pre_apply = \PSU::apply_filters('transaction_split_pre_apply', $pre_apply, $this->person->bill);
         // loop over terms to pre-apply payments to
         foreach ($pre_apply as $term => $value) {
             $this->term_payment($term, $record_template, $value);
         }
         //end while
     }
     //end if
     $found_term = false;
     // loop over term balances
     foreach ((array) $this->person->bill->all_term_balances as $term => $value) {
         // find the current term
         if (!$found_term && $term != $early_term) {
             continue;
         } elseif ($term == $early_term) {
             $found_term = true;
         } elseif ($value <= 0) {
             continue;
         }
         // if there are values in $only_term_types then we only want to put
         // transactions in specific terms.  If this term is not in the list
         // of allowable terms, then skip it.
         if (!empty($only_term_types)) {
             if (!in_array(\PSU\Student::term_type($term), $only_term_types)) {
                 continue;
             }
             //end if
         }
         //end if
         // if there are values in $skip then we want to be sure
         // we skip it.
         if (!empty($skip)) {
             if (in_array($term, $skip)) {
                 continue;
             }
             //end if
         }
         //end if
         $this->term_payment($term, $record_template, $value);
     }
     //end while
     // if there is STILL money needing to be posted, prep a dummy term and post
     if ($this->amount_paid_remaining > 0) {
         // We don't want to find old activity, and if we are here, we have applied funds to the current ter,
         // Target the next term specified by the bursar otherwise fall back to this term
         $term = \PSU\AR::bursar_future_term(strtolower($this->level)) ?: $this->person->bill->last_balance_term();
         $payment = $record_template;
         $payment['term_code'] = $term;
         $payment['amount'] = $this->amount_paid_remaining;
         $this->amount_paid_remaining = 0;
         $this->add_entry($payment);
     }
     //end if
     return $this;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:89,代码来源:Transaction.php

示例3: process

 public function process()
 {
     if ($this->psu_status == 'eod') {
         \PSU::db('banner')->StartTrans();
         if ($this->status_flag == 'success') {
             if ($this->transactiontype == 1) {
                 $this->detail_code = 'IQEW';
                 $this->detail_desc = 'Credit-Card-Payment-Thank You';
                 $this->multiplier = -1;
                 // send notification to bursar if an unknown creditcard payment has been received
                 if ($this->transactionstatus == 4) {
                     $message = 'There was a "Transaction Status = 4" payment paid via Commerce Manager.  Here is the debug information:' . "\n\n";
                     $message .= print_r($this, true);
                     \PSU::mail('bursar@plymouth.edu,mtbatchelder@plymouth.edu', 'Alert: Unknown Credit Card Payment via Nelnet', $message);
                 }
                 //end if
             } elseif ($this->transactiontype == 2) {
                 $this->detail_code = 'IREW';
                 $this->detail_desc = 'Credit-Card-Refund';
                 $this->multiplier = 1;
                 // send notification to bursar if an unknown creditcard refund has been received
                 if ($this->transactionstatus == 4) {
                     $message = 'There was a "Transaction Status = 4" credit card refund fed by via Commerce Manager.  Here is the debug information:' . "\n\n";
                     $message .= print_r($this, true);
                     $email = array('psu-its-mis@plymouth.edu');
                     if (!\PSU::isDev()) {
                         $email[] = 'bursar@plymouth.edu';
                     }
                     //end if
                     \PSU::mail($email, 'Alert: Unknown Credit Card Refund via Nelnet', $message);
                 }
                 //end if
             } elseif ($this->transactiontype == 3) {
                 $this->detail_code = 'IQEC';
                 $this->detail_desc = 'E-Check-Payment-Thank You';
                 $this->multiplier = -1;
             }
             //end else
             $this->transaction = new \PSU\AR\Transaction\Receivable($this->ordernumber, $this->totalamount / 100, $this->multiplier);
             $this->bursar_term = $this->transaction->term_code;
             $receivable_template = $this->init_template();
             $this->transaction->split($receivable_template);
             if (\PSU::has_filter('etrans_post_split')) {
                 \PSU::apply_filters('etrans_post_split', $this);
             }
             //end if
             $this->transaction->save();
             if (\PSU::has_filter('etrans_post_save')) {
                 \PSU::apply_filters('etrans_post_save', $this);
             }
             //end if
             $this->psu_status = 'loaded';
             $this->save();
             $amount = !PSU::db('banner')->HasFailedTrans() ? $this->totalamount / 100 : false;
         } else {
             $this->psu_status = 'no_load';
             $this->save();
             $amount = 0;
         }
         //end else
         PSU::db('banner')->CompleteTrans();
         return $amount;
     }
     //end if
     PSU::db('banner')->CompleteTrans(false);
     return false;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:67,代码来源:ETransAR.class.php

示例4: parse_results

 /**
  * parse resultset for records
  *
  * @param $rset \b ADOdbRecordSet
  * @param $key \b key to index the record of of
  * @param $id \b id of the registered sql statement. 
  *        If this id is set, for each $row, the psusql_{id} filter 
  *        is applied if the filter exists in the registry
  */
 public function parse_results(ADORecordset $rset, $key = null, $id = null)
 {
     $records = array();
     foreach ($rset as $row) {
         if ($id) {
             if (PSU::has_filter('psusql_' . $id . '_parse_results')) {
                 $row = PSU::apply_filters('psusql_' . $id . '_parse_results', $row);
             }
             //end if
         }
         //end if
         if ($key) {
             $records[$row[$key]] = $row;
         } else {
             $records[] = $row;
         }
         //end else
     }
     //end foreach
     if (PSU::has_filter('psusql_' . $id . '_records')) {
         $records = PSU::apply_filters('psusql_' . $id . '_records', $records);
     }
     //end if
     $this->count = count($records);
     return $records;
 }
开发者ID:AholibamaSI,项目名称:plymouth-webapp,代码行数:35,代码来源:PSUSQL.class.php


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