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


PHP BFCHelper类代码示例

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


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

示例1: display

 function display($tpl = null, $preparecontent = false)
 {
     BookingForConnectorViewOnSellUnitBase::basedisplay($tpl);
     $item = $this->get('Item');
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $config = JComponentHelper::getParams('com_bookingforconnector');
     BFCHelper::setState($item, 'onsellunit', 'onsellunit');
     //		$document->addStyleSheet('components/com_bookingforconnector/assets/css/resource.css');
     // add stylesheet
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor.css');
     JHTML::stylesheet('components/com_bookingforconnector/assets/css/bookingfor-responsive.css');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.form.js');
     $document->addScript('components/com_bookingforconnector/assets/js/jquery.blockUI.js');
     $document->addScript('components/com_bookingforconnector/assets/js/bf.js');
     if ($this->checkAnalytics("Sales Resources Page") && $config->get('eecenabled', 0) == 1) {
         $obj = new stdClass();
         $obj->id = "" . $item->ResourceId . " - Sales Resource";
         $obj->name = $item->Name;
         $obj->category = $item->MerchantCategoryName;
         $obj->brand = $item->MerchantName;
         $obj->variant = 'NS';
         $document->addScriptDeclaration('callAnalyticsEEc("addProduct", [' . json_encode($obj) . '], "item");');
     }
     $this->assignRef('document', $document);
     $this->assignRef('language', $language);
     $this->assignRef('item', $item);
     $this->assignRef('config', $config);
     //		$item		= $this->get('Item');
     //$item->Name = $item->nome;
     //$this->setBreadcrumb($item, 'resources');
     $this->setBreadcrumb($item, 'onsellunits', $language);
     parent::display($tpl, true);
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:34,代码来源:view.html.php

示例2: __construct

 public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
 {
     $paymentData = explode('|', $config);
     /*ShopID|Separator|SecretKey|PaymentUrl */
     $this->shopID = $paymentData[0];
     $this->separator = $paymentData[1];
     $this->SecretKey = $paymentData[2];
     $this->paymentUrl = $paymentData[3];
     $this->numord = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
     $this->importo = number_format($order->DepositAmount * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY, 2, ',', '');
     $this->importoForMac = intval($order->DepositAmount * 100 * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY);
     if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
         $this->numord .= $this->separator . "R" . $suffixOrder;
         $this->importo = number_format($overrideAmount * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY, 2, ',', '');
         $this->importoForMac = intval($overrideAmount * 100 * COM_BOOKINGFORCONNECTOR_CONVERSIONCURRENCY);
     }
     $this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
     $this->languageId = $this->getLanguage($language);
     $this->url = $url;
     $this->urlBack = $urlBack;
     if ($debug) {
         $this->shopID = 'MYSHOP';
         $this->numord = 78;
         $this->importo = '17,00';
         $this->importoForMac = '1700';
         $this->SecretKey = '3DfEO2B5Jjm4VC1Q3vEh';
     }
     //$this->mac = $this->getMac();
     $this->redirectUrl = getUrl();
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:30,代码来源:wspayform.php

示例3: __construct

 public function __construct($config, $order, $language, $urlok, $urlko, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
 {
     $paymentData = explode('|', $config);
     /*MerchantID|ShopID|UserID|Password|Separator|SecretString */
     $this->merchantID = $paymentData[0];
     $this->shopID = $paymentData[1];
     $this->userID = $paymentData[2];
     $this->password = $paymentData[3];
     $this->separator = $paymentData[4];
     $this->SecretKey = $paymentData[5];
     //$this->paymentUrl = $paymentData[3];
     $this->numeroOrdine = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
     $this->totaleOrdine = intval($order->DepositAmount * 100);
     if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
         $this->numord .= $this->separator . "R" . $suffixOrder;
         $this->totaleOrdine = intval($overrideAmount * 100);
     }
     $this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
     $this->languageId = $this->getLanguage($language);
     $this->urlOk = $urlok;
     $this->urlKo = $urlko;
     if ($debug) {
         $this->merchantID = '9999888';
         $this->shopID = '99888';
         $this->userID = '9999888_IPERTRD';
         $this->numeroOrdine = 'VERXORDXPROD196';
         $this->totaleOrdine = '1';
         $this->password = 'Ipertrade2013!';
         $this->SecretKey = 'b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1b1';
         $this->tipoRispostaApv = 'click';
         $this->urlOk = "http://www.dominio.it/ok.html";
         $this->urlKo = "http://www.dominio.it/ko.html";
     }
     //		$this->paymentUrl .= $this->getUrl();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:35,代码来源:pagoonline.php

示例4: __construct

 public function __construct($config, $order, $language, $urlBack, $url, $debug = false, $donation = false)
 {
     $paymentData = explode('|', $config);
     /*Username|Password|Signature|Separator */
     $this->Username = $paymentData[0];
     $this->Password = $paymentData[1];
     $this->Signature = $paymentData[2];
     $this->separator = $paymentData[3];
     $this->divisa = 'EUR';
     $this->numord = sprintf('B%s%s%s%s', rand(1, 9999) . $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
     $this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
     $this->languageId = $this->getLanguage($language);
     $this->importo = intval($order->DepositAmount);
     $this->paymentUrl = 'https://www.paypal.com/cgi-bin/webscr';
     $this->paymentUrlAPI = 'https://api-3t.paypal.com/nvp';
     $this->returnurl = $url;
     $this->urlBack = $urlBack;
     $this->method = "SetExpressCheckout";
     $this->version = "109.0";
     $this->paymentaction = "Sale";
     if ($debug) {
         $this->paymentUrl = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
         $this->paymentUrlAPI = 'https://api-3t.sandbox.paypal.com/nvp';
     }
     //$this->requestUrl = $this->getUrl();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:26,代码来源:paypalexpress.php

示例5: setBreadcrumb

 function setBreadcrumb($merchant, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     if ($layout != '') {
         $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?layout=' . $layout . '&option=com_bookingforconnector&view=merchantdetails&merchantId=' . $merchant->MerchantId . ':' . BFCHelper::getSlug($merchant->Name)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:9,代码来源:view.raw.php

示例6: setBreadcrumb

 function setBreadcrumb($resource, $layout = '')
 {
     $mainframe = JFactory::getApplication();
     $pathway = $mainframe->getPathway();
     $pathway->addItem($resource->Merchant->Name, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     $pathway->addItem(JTEXT::_('COM_BOOKINGFORCONNECTOR_VIEWS_MERCHANTDETAILS_LAYOUT_' . strtoupper($layout)), JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&layout=' . $layout . '&merchantId=' . $resource->Merchant->MerchantId . ':' . BFCHelper::getSlug($resource->Merchant->Name)));
     //		$resourceName = BFCHelper::getLanguage($resource->Name, $this->Language);
     $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
     $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=resource&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:10,代码来源:view.raw.php

示例7: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $merchantTypes = BFCHelper::getMerchantTypes();
     $options = array();
     if ($merchantTypes) {
         foreach ($merchantTypes as $merchantType) {
             $options[] = JHtml::_('select.option', $merchantType->MerchantTypeId, $merchantType->RefName);
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:17,代码来源:merchanttypes.php

示例8: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $tags = BFCHelper::getTags();
     $options = array();
     if ($tags) {
         foreach ($tags as $tag) {
             $options[] = JHtml::_('select.option', $tag->TagId, $tag->Name);
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:17,代码来源:tags.php

示例9: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $locationZones = BFCHelper::getLocations();
     $options = array();
     if ($locationZones) {
         foreach ($locationZones as $lz) {
             $options[] = JHtml::_('select.option', $lz->CityId, $lz->Name);
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:17,代码来源:cities.php

示例10: setBreadcrumb

 function setBreadcrumb($resource, $layout = '', $language)
 {
     if (!empty($resource)) {
         $mainframe = JFactory::getApplication();
         $pathway = $mainframe->getPathway();
         // resetto il pathway
         $pathway->setPathway(null);
         //				$resourceName = BFCHelper::getLanguage($resource->Name, $language);
         $resourceName = BFCHelper::getLanguage($resource->Name, $this->language, null, array('ln2br' => 'ln2br', 'striptags' => 'striptags'));
         $pathway->addItem($resource->MerchantName, JRoute::_('index.php?option=com_bookingforconnector&view=merchantdetails&merchantId=' . $resource->MerchantId . ':' . BFCHelper::getSlug($resource->MerchantName)));
         $pathway->addItem($resourceName, JRoute::_('index.php?option=com_bookingforconnector&view=onsellunit&resourceId=' . $resource->ResourceId . ':' . BFCHelper::getSlug($resourceName)));
     }
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:13,代码来源:resourceview.php

示例11: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $masterTypologies = BFCHelper::getMasterTypologies();
     $options = array();
     if ($masterTypologies) {
         foreach ($masterTypologies as $masterTypology) {
             $options[] = JHtml::_('select.option', $masterTypology->MasterTypologyId, BFCHelper::getLanguage($masterTypology->Name, $language));
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:19,代码来源:mastertypologies.php

示例12: __construct

 public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
 {
     //	echo "<pre>order";
     //	echo print_r($order);
     //	echo "</pre>";
     //$this->helper = new wsQueryHelper(COM_BOOKINGFORCONNECTOR_WSURL, COM_BOOKINGFORCONNECTOR_APIKEY);
     $paymentData = explode('|', $config);
     /* MerchantId|Abi|MacKey|Separator|PaymentUrl */
     $this->merchant_id = $paymentData[0];
     $this->abi = $paymentData[1];
     $this->SecretKey = $paymentData[2];
     $this->separator = $paymentData[3];
     $this->paymentUrl = $paymentData[4];
     $this->order_id = sprintf('B%s%s%s%s', $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
     $this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
     $this->lingua = $this->getLanguage($language);
     $this->importo = number_format($order->DepositAmount, 2, ',', '');
     //$this->order_id = $order->OrderId;
     if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
         $this->order_id .= $this->separator . "R" . $suffixOrder;
         //$this->orderId .= $this->separator . "R" . $suffixOrder;
         $this->importo = $overrideAmount;
         $this->suffixOrder = $suffixOrder;
     }
     if (empty($order->ExternalId)) {
         $order->ExternalId = $this->abi;
     }
     $this->urlok = $url;
     $this->urlko = $urlBack;
     $paymentDescr = "payment";
     if (isset($order->donationNotes) && !empty($order->donationNotes)) {
         $paymentDescr = $order->donationNotes;
     }
     $paymentDescr = preg_replace('/[^A-Za-z0-9\\- ]/', '', $paymentDescr);
     if (strlen($paymentDescr > 120)) {
         $paymentDescr = substr($paymentDescr, 0, 120);
     }
     $ExternalId = $order->ExternalId;
     if (strlen($ExternalId > 32)) {
         $ExternalId = substr($ExternalId, 0, 32);
     }
     $this->items = $ExternalId . $this->FieldSeparator . $paymentDescr . $this->FieldSeparator . "1" . $this->FieldSeparator . $this->importo . $this->FieldSeparator . $this->divisa . $this->macSeparator;
     /*if ($debug){
     			$this->merchant_id = 'NCHTEST';
     			$this->abi = '03599';
     			$this->SecretKey = 'CAE5859549B7F54834040AA110A533A1';
     		}*/
     $this->mac = $this->getMac();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:49,代码来源:virtualpay.php

示例13: __construct

 public function __construct($config, $order, $language, $urlBack, $url, $suffixOrder, $overrideAmount = 0, $debug = FALSE)
 {
     //	echo "<pre>order";
     //	echo print_r($order);
     //	echo "</pre>";
     //$this->helper = new wsQueryHelper(COM_BOOKINGFORCONNECTOR_WSURL, COM_BOOKINGFORCONNECTOR_APIKEY);
     $paymentData = explode('|', $config);
     /* storename|ksig|Separator|PaymentUrl */
     $this->storename = $paymentData[0];
     $this->ksig = $paymentData[1];
     $this->separator = $paymentData[2];
     $this->paymentUrl = $paymentData[3];
     $this->order_id = sprintf('B%s%s%s%s', $this->separator, $order->ExternalId, $this->separator, $order->OrderId);
     $this->email = BFCHelper::getItem($order->CustomerData, 'email') . "";
     $this->language = $this->getLanguage($language);
     $this->importo = number_format($order->DepositAmount, 2, '.', '');
     $this->currentDateTime = date("Y:m:d-H:i:s");
     //$this->order_id = $order->OrderId;
     if (isset($suffixOrder) && $suffixOrder != "" && $overrideAmount > 0) {
         $this->order_id .= $this->separator . "R" . $suffixOrder;
         //$this->orderId .= $this->separator . "R" . $suffixOrder;
         $this->importo = number_format($overrideAmount, 2, '.', '');
         $this->suffixOrder = $suffixOrder;
     }
     $this->responseSuccessURL = $url;
     $this->responseFailURL = $urlBack;
     $paymentDescr = "payment";
     if (isset($order->donationNotes) && !empty($order->donationNotes)) {
         $paymentDescr = $order->donationNotes;
     }
     $paymentDescr = preg_replace('/[^A-Za-z0-9\\- ]/', '', $paymentDescr);
     if (strlen($paymentDescr > 120)) {
         $paymentDescr = substr($paymentDescr, 0, 120);
     }
     if (empty($order->ExternalId)) {
         $this->invoicenumber = $order->ExternalId;
     }
     if (strlen($this->invoicenumber > 32)) {
         $this->invoicenumber = substr($this->invoicenumber, 0, 32);
     }
     $this->info = $this->invoicenumber . $this->FieldSeparator . $paymentDescr . $this->FieldSeparator . "1" . $this->FieldSeparator . $this->importo . $this->FieldSeparator . $this->divisa;
     /*if ($debug){
     			$this->merchant_id = 'NCHTEST';
     			$this->abi = '03599';
     			$this->SecretKey = 'CAE5859549B7F54834040AA110A533A1';
     		}*/
     $this->hash = $this->getHash();
 }
开发者ID:Bookingfor,项目名称:joomla-extension,代码行数:48,代码来源:bnlpositivity.php

示例14: getOptions

 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $document = JFactory::getDocument();
     $language = $document->getLanguage();
     $merchantCategories = BFCHelper::getMerchantCategories();
     $options = array();
     if ($merchantCategories) {
         foreach ($merchantCategories as $merchantCategory) {
             $currOpt = JHtml::_('select.option', $merchantCategory->MerchantCategoryId, BFCHelper::getLanguage($merchantCategory->Name, $language));
             $currOpt->checked = null;
             $options[] = $currOpt;
         }
     }
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:21,代码来源:merchantcategories.php

示例15: setInfoRequest

 public function setInfoRequest($customerData = NULL, $suggestedStay = NULL, $creditCardData = NULL, $otherNoteData = NULL, $merchantId = 0, $type = NULL, $userNotes = NULL, $label = NULL, $cultureCode = NULL, $processInfoRequest = NULL, $mailFrom = NULL)
 {
     $options = array('path' => $this->urlCreateInfoRequest, 'data' => array('customerData' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($customerData)), 'suggestedStay' => BFCHelper::getQuotedString(BFCHelper::getJsonEncodeString($suggestedStay)), 'otherNoteData' => BFCHelper::getQuotedString($otherNoteData), 'infoRequestType' => BFCHelper::getQuotedString($type), 'userNotes' => BFCHelper::getQuotedString($userNotes), 'label' => BFCHelper::getQuotedString($label), 'cultureCode' => BFCHelper::getQuotedString($cultureCode), 'processInfoRequest' => $processInfoRequest, 'mailFrom' => $mailFrom, '$format' => 'json'));
     if (!empty($merchantId) && intval($merchantId) > 0) {
         $options['data']['merchantId'] = $merchantId;
     }
     $url = $this->helper->getQuery($options);
     $order = null;
     //$r = $this->helper->executeQuery($url);
     $r = $this->helper->executeQuery($url, "POST");
     if (isset($r)) {
         $res = json_decode($r);
         $order = $res->d->results ?: $res->d;
     }
     return $order;
 }
开发者ID:Bookingfor,项目名称:joomla-extension-v-2,代码行数:16,代码来源:inforequest.php


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