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


PHP EE_Transaction::selected_gateway方法代码示例

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


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

示例1: get_payment_details

 /**
  *    get_payment_details
  *
  * @access    public
  * @param    array $payments
  * @return    string
  */
 public function get_payment_details($payments = array())
 {
     //prepare variables for displaying
     $template_args = array();
     $template_args['transaction'] = $this->_current_txn;
     $template_args['reg_url_link'] = $this->_reg_url_link;
     $template_args['payments'] = array();
     foreach ($payments as $payment) {
         $template_args['payments'][] = $this->get_payment_row_html($payment);
     }
     //create a hacky payment object, but dont save it
     $gateway_name = $this->_current_txn->selected_gateway();
     $payment = EE_Payment::new_instance(array('TXN_ID' => $this->_current_txn->ID(), 'STS_ID' => EEM_Payment::status_id_pending, 'PAY_timestamp' => current_time('timestamp'), 'PAY_amount' => $this->_current_txn->total(), 'PAY_gateway' => $gateway_name));
     $template_args['gateway_content'] = EEM_Gateways::instance()->get_payment_overview_content($gateway_name, $payment);
     // link to SPCO payment_options
     $template_args['show_try_pay_again_link'] = $this->_show_try_pay_again_link;
     $template_args['SPCO_payment_options_url'] = $this->_SPCO_payment_options_url;
     // verify template arguments
     EEH_Template_Validator::verify_instanceof($template_args['transaction'], '$transaction', 'EE_Transaction');
     EEH_Template_Validator::verify_isnt_null($template_args['payments'], '$payments');
     EEH_Template_Validator::verify_isnt_null($template_args['show_try_pay_again_link'], '$show_try_pay_again_link');
     EEH_Template_Validator::verify_isnt_null($template_args['gateway_content'], '$gateway_content');
     EEH_Template_Validator::verify_isnt_null($template_args['SPCO_payment_options_url'], '$SPCO_payment_options_url');
     return EEH_Template::locate_template(THANK_YOU_TEMPLATES_PATH . 'thank-you-page-payment-details.template.php', $template_args, TRUE, TRUE);
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:32,代码来源:EES_Espresso_Thank_You.shortcode.php

示例2: _get_empty_payment_obj

 /**
  * This sets up an empty EE_Payment object for the purpose of shortcode parsing.  Note that this doesn't actually get saved to the db.
  * @return EE_Payment 
  */
 private function _get_empty_payment_obj(EE_Transaction $txn)
 {
     $PMT = EE_Payment::new_instance(array('STS_ID' => EEM_Payment::status_id_pending, 'PAY_timestamp' => (int) current_time('timestamp'), 'PAY_gateway' => $txn->selected_gateway(), 'PAY_gateway_response' => $txn->gateway_response_on_transaction()));
     return $PMT;
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:9,代码来源:EE_Messages_Gateways_incoming_data.class.php


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