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


PHP BFCHelper::getOrderMerchantPaymentId方法代码示例

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


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

示例1: AND

	</table>	
				<?php 
if ($order->Status == 20 && !$ArchivedAsSpam) {
    $db = JFactory::getDBO();
    $uriMerchant = 'index.php?option=com_bookingforconnector&view=merchantdetails';
    $db->setQuery('SELECT id FROM #__menu WHERE link LIKE ' . $db->Quote($uriMerchant . '%') . ' AND (language=' . $db->Quote($this->language) . ' OR language=' . $db->Quote('*') . ') AND published = 1 LIMIT 1');
    $itemIdMerchant = $db->getErrorNum() ? 0 : intval($db->loadResult());
    $uriMerchant .= '&merchantId=' . $order->MerchantId . ':';
    if ($itemIdMerchant != 0) {
        $uriMerchant .= '&Itemid=' . $itemIdMerchant;
    }
    $uriMerchantthanks = $uriMerchant . '&layout=thanks';
    $uriMerchantthanksKo = $uriMerchant . '&layout=errors';
    $routeThanks = JRoute::_($uriMerchantthanks);
    $routeThanksKo = JRoute::_($uriMerchantthanksKo);
    $currentbookingTypeId = BFCHelper::getOrderMerchantPaymentId($order);
    $data = BFCHelper::getMerchantPaymentData($currentbookingTypeId);
    if (!empty($data)) {
        $cCCTypeList = array();
        $datas = explode("|", $data->Data);
        if (is_array($datas)) {
            foreach ($datas as $singleData) {
                $cCCTypeList[] = JHTML::_('select.option', $singleData, $singleData);
            }
        } else {
            $cCCTypeList[] = JHTML::_('select.option', $datas, $datas);
        }
    }
    ?>

					<form method="post" id="ccdataupdate" class="form-validate" action="<?php 
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:31,代码来源:default_order.php

示例2: getItem

 public function getItem()
 {
     // Get a storage key.
     $store = $this->getStoreId('getItem');
     // Try to load the data from internal storage.
     if (isset($this->cache[$store])) {
         return $this->cache[$store];
     }
     $cultureCode = JFactory::getLanguage()->getTag();
     if (empty($item)) {
         $item = new stdClass();
     }
     /* per recuperare i dati da request prima richiamo il getState e successivamente istanzio param per avere i parametri */
     $state = $this->getState();
     /* */
     $params = $state->params;
     $currentMerchant = null;
     $currentbookingTypeId = null;
     if ($params['orderId'] != '' && strpos($params['orderId'], "donation") === false) {
         $item->order = $this->getOrderFromService($params['orderId']);
         if (empty($item->order->DepositAmount)) {
             $item->order->DepositAmount = $item->order->TotalAmount;
         }
         $currentbookingTypeId = BFCHelper::getOrderMerchantPaymentId($item->order);
         $currentMerchant = $item->order->MerchantId;
     }
     $payments = $this->getPaymentsFromService($cultureCode, $currentMerchant);
     $item->merchantPayments = $payments;
     $item->merchantPayment = null;
     if ($item->merchantPayments != null) {
         if (!empty($currentbookingTypeId)) {
             foreach ($item->merchantPayments as $merchantPayment) {
                 if ($merchantPayment->BookingTypeId == $currentbookingTypeId && $merchantPayment->IsGateway) {
                     $item->merchantPayment = $merchantPayment;
                 }
             }
         }
         /* se non ho un PaymentSystemId recuperato dall'ordine, tento di prendere il sistema di pagamento di default*/
         if (empty($item->merchantPayment)) {
             //				foreach ($item->merchantPayments as $merchantPayment) {
             //					if ($merchantPayment->IsDefault && $merchantPayment->MerchantId==$currentMerchant  && $merchantPayment->IsGateway) {
             //						$item->merchantPayment = $merchantPayment;
             //					}
             //				}
             if (!empty($item->merchantPayments)) {
                 foreach ($item->merchantPayments as $merchantPayment) {
                     if ($merchantPayment->IsDefault && $merchantPayment->IsGateway) {
                         $item->merchantPayment = $merchantPayment;
                     }
                 }
                 if (empty($item->merchantPayment)) {
                     // se non riesco a prendere il default prendo il primo gateway...
                     if ($merchantPayment->IsGateway) {
                         $item->merchantPayment = $merchantPayment;
                     }
                 }
             }
         }
     }
     // Add the items to the internal cache.
     $this->cache[$store] = $item;
     return $this->cache[$store];
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:63,代码来源:payment.php


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