本文整理汇总了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
示例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];
}