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


PHP hikashopPaymentPlugin::onPaymentConfiguration方法代码示例

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


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

示例1: onPaymentConfiguration

    function onPaymentConfiguration(&$element)
    {
        parent::onPaymentConfiguration($element);
        $secret_code = @$element->payment_params->secret_code;
        if (empty($secret_code)) {
            $secret_code = uniqid('') . '_' . time() . "p";
        }
        $this->secret_code = '<input type="hidden" name="data[payment][payment_params][secret_code]" value="' . $secret_code . '"/>
		Make sure that the "Use Silent Post" field is set to "Yes" in your <a href="https://manager.paypal.com/loginPage.do">PayPal manager</a> account.<br/>
		If you want to use the Iframe type of display, make sure you select the Layout C in your <a href="https://manager.paypal.com/loginPage.do">PayPal manager</a> account and otherwise, select either A or B.';
        $pb = '';
        if (empty($element->payment_params->vendor)) {
            $pb .= ', ' . JText::_('ATOS_MERCHANT_ID');
        }
        if (empty($element->payment_params->partner)) {
            $pb .= ', ' . JText::_('PARTNER');
        }
        if (empty($element->payment_params->password)) {
            $pb .= ', ' . JText::_('HIKA_PASSWORD');
        }
        if (!empty($pb)) {
            $app = JFactory::getApplication();
            $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'PayPal Advanced', $pb, 'PayPal Advanced', 'https://www.paypal.com/webapps/mpp/paypal-payments-advanced'));
        }
    }
开发者ID:rodhoff,项目名称:MNW,代码行数:25,代码来源:paypaladvanced.php

示例2: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     parent::onPaymentConfiguration($element);
     $lang = JFactory::getLanguage();
     $locale = strtolower(substr($lang->get('tag'), 0, 2));
     if (empty($element->payment_params->pspid)) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'Ogone', 'PSPID', 'Ogone', 'http://www.ogone.com/en/sitecore/Content/COM/Web/Solutions/Payment%20Processing/eCommerce.aspx'));
     }
     $this->pluginConfig['status_url'][2] = htmlentities(HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=ogone&tmpl=component&lang=' . strtolower($locale));
     if (!function_exists('hash') && !function_exists('sha1')) {
         $this->pluginConfig['hash_method'][2]['sha1'] = JText::_('SHA1') . ' ' . JText::_('not present');
     }
     if (!function_exists('hash')) {
         $this->pluginConfig['hash_method'][2]['sha256'] = JText::_('SHA256') . ' ' . JText::_('not present');
         $this->pluginConfig['hash_method'][2]['sha512'] = JText::_('SHA512') . ' ' . JText::_('not present');
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:18,代码来源:ogone.php

示例3: onPaymentConfiguration

    function onPaymentConfiguration(&$element)
    {
        parent::onPaymentConfiguration($element);
        if (empty($element->payment_params->email)) {
            $app = JFactory::getApplication();
            $doc = JFactory::getDocument();
            $js = "window.hikashop.ready( function() {\r\n\t\t\t\t\tvar element = document.getElementById('link_to_plateform');\r\n\t\t\t\t\telement.onclick = function() {\r\n\t\t\t\t\t\tdocument.getElementById('hikashop_be2bill_form').submit();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t};\r\n\t\t\t\t});";
            $config = hikashop_config();
            $email = $config->get('from_email');
            $form = '<form id="hikashop_be2bill_form" name="hikashop_be2bill_form" action="https://setup.be2bill.com/ouverture-vad" method="post">
			<input type="hidden" name="partner-code" value="P-6a0831" />
			<input type="hidden" name="email" value="' . $email . '" />
			<input type="hidden" name="website" value="' . $_SERVER['HTTP_HOST'] . '" />
			<input type="hidden" name="ecommerce-platform" value="Hikashop" />
			</form>';
            $doc->addScriptDeclaration($js);
            $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'Be2bill', 'identifer', 'Be2bill', '') . $form);
        }
    }
开发者ID:q0821,项目名称:esportshop,代码行数:19,代码来源:be2bill.php

示例4: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     parent::onPaymentConfiguration($element);
     $obj = $element;
     $field = '';
     if (empty($obj->payment_params->login)) {
         $field = JText::_('USERNAME');
     } elseif (empty($obj->payment_params->password)) {
         $field = JText::_('PASSWORD');
     } elseif (empty($obj->payment_params->signature)) {
         $field = JText::_('SIGNATURE');
     }
     if (!empty($field)) {
         $app = JFactory::getApplication();
         $lang = JFactory::getLanguage();
         $locale = strtolower(substr($lang->get('tag'), 0, 2));
         $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'PayPal Pro', $field, 'PayPal Pro', 'https://www.paypal.com/' . $locale . '/mrb/pal=SXL9FKNKGAEM8'));
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:19,代码来源:paypalpro.php

示例5: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     parent::onPaymentConfiguration($element);
 }
开发者ID:q0821,项目名称:esportshop,代码行数:4,代码来源:worldnettps.php

示例6: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     $this->pluginConfig['returnurl'][2] = HIKASHOP_LIVE . 'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=postfinance&amp;tmpl=component';
     parent::onPaymentConfiguration($element);
 }
开发者ID:q0821,项目名称:esportshop,代码行数:5,代码来源:postfinance.php

示例7: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     parent::onPaymentConfiguration($element);
     $obj = $element;
     $fill = '';
     if (empty($obj->payment_params->merchantid)) {
         $fill = JText::_('MERCHANT_NUMBER');
     }
     if (empty($obj->payment_params->password)) {
         $fill = JText::_('HIKA_PASSWORD');
     }
     if (empty($obj->payment_params->sharedkey)) {
         $fill = JText::_('SHARED_KEY');
     }
     if (!empty($fill)) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'CardSave', $fill, 'CardSave', 'http://www.cardsave.net/hikashop/'));
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:19,代码来源:cardsave.php

示例8: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     if (JRequest::getCmd('subtask', '') == 'logos') {
         $app = JFactory::getApplication();
         $this->view = 'logos';
         $this->noForm = true;
         usort($this->cards, "strcasecmp");
         $element = reset($element);
         $safe_mode = ini_get('safe_mode') == 1 || !strcasecmp(ini_get('safe_mode'), 'On');
         if ($safe_mode) {
             if (strlen($element->payment_params->logo_folder) > 78) {
                 echo 'the destination folder path is probably too long, try a shorter one';
                 $destFolder = JPATH_ROOT . DS . $element->payment_params->logo_folder_relative;
             } else {
                 $destFolder = JPATH_ROOT . DS . $element->payment_params->logo_folder_relative;
             }
         } else {
             if (strlen($element->payment_params->upload_folder_relative) > 78) {
                 echo 'the destination folder path is probably too long, try a shorter one';
                 $destFolder = JPATH_ROOT . DS . $element->payment_params->upload_folder_relative;
                 $destFolder = $this->_addLastSlash($destFolder);
                 $destFolder .= 'l' . DS;
             } else {
                 $destFolder = JPATH_ROOT . DS . $element->payment_params->upload_folder_relative;
                 $destFolder = $this->_addLastSlash($destFolder);
                 $destFolder .= 'l' . DS;
             }
         }
         jimport('joomla.filesystem.folder');
         if (!JFolder::exists($destFolder)) {
             JFolder::create($destFolder);
         }
         $this->_copyLogos($safe_mode, $element);
         $link_vars = null;
         $link_query = parse_url($_SERVER['REQUEST_URI']);
         parse_str(html_entity_decode($link_query['query']), $link_vars);
         $str = JArrayHelper::getValue($link_vars, 'values', '');
         $selectedCards = explode(',2,', $str);
         $selectedCards[$a = count($selectedCards) - 1] = substr($selectedCards[$a = count($selectedCards) - 1], 0, -2);
         $finalCard = array();
         $files = JFolder::files($destFolder);
         if (count($files) < 1) {
             $files = JFolder::files(HIKASHOP_MEDIA . 'images' . DS . 'payment');
         }
         $chk = 0;
         foreach ($this->cards as $card) {
             foreach ($files as $pic) {
                 $name = explode('.', $pic);
                 if ($card == $name[0] && $name[1] == 'gif') {
                     $finalCard[$card] = new stdClass();
                     $finalCard[$card]->name = $card;
                     $finalCard[$card]->present = 1;
                     $chk = 1;
                     break;
                 }
             }
             if ($chk == 0) {
                 $finalCard[$card] = new stdClass();
                 $finalCard[$card]->name = $card;
                 $finalCard[$card]->present = 0;
             }
             $chk = 0;
         }
         foreach ($finalCard as $card) {
             foreach ($selectedCards as $scard) {
                 if ($card->name == $scard) {
                     $finalCard[$scard]->check = 1;
                     $chk = 1;
                     break;
                 }
             }
             if ($chk == 0) {
                 $finalCard[$card->name]->check = 0;
             }
             $chk = 0;
         }
         $this->finalCard = $finalCard;
         $js = "\r\nfunction insertCards(){\r\n\tvar cards = new Array();\r\n\tvar names = '';\r\n\tvar checkBox = document.forms['adminForm'].elements['cards[]'];\r\n\tfor(var i=0,l=checkBox.length;i<l; i++){\r\n\t\tif(checkBox[i].checked){\r\n\t\t\t\tcards.push(checkBox[i]);\r\n\t\t\t\tnames+=checkBox[i].value;\r\n\t\t\t\tnames+=',2,';\r\n\t\t}\r\n\t}\r\n\tnames=names.substr(0,names.length-1);\r\n\twindow.top.document.getElementById('plugin_cards').value = names;\r\n\twindow.top.document.getElementById('plugin_cards_link').href = 'index.php?option=com_hikashop&ctrl=plugins&task=edit&name=atos&plugin_type=payment&subtask=logos&tmpl=component&values='+names;\r\n\twindow.top.hikashop.closeBox();\r\n}\r\n";
         $doc = JFactory::getDocument();
         $doc->addScriptDeclaration($js);
     } else {
         parent::onPaymentConfiguration($element);
         $this->address = hikashop_get('type.address');
     }
 }
开发者ID:q0821,项目名称:esportshop,代码行数:85,代码来源:atos.php

示例9: onPaymentConfiguration

 /**
  *
  */
 public function onPaymentConfiguration(&$element)
 {
     parent::onPaymentConfiguration($element);
     if (version_compare(PHP_VERSION, '5.4', '<')) {
         $app = JFactory::getApplication();
         $app->enqueueMessage('To work correctly, eWay Rapid API requires PHP 5.4 or higher', 'error');
     }
 }
开发者ID:HikaShop,项目名称:hikashoppayment-ewayrapid,代码行数:11,代码来源:ewayrapid.php

示例10: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     $subtask = JRequest::getCmd('subtask', '');
     if ($subtask == 'ips') {
         $ips = null;
         echo implode(',', $this->_getIPList($ips));
         exit;
     } else {
         parent::onPaymentConfiguration($element);
         $lang =& JFactory::getLanguage();
         $locale = strtoupper(substr($lang->get('tag'), 0, 2));
         $element->payment_params->status_url = HIKASHOP_LIVE . 'index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=bluepaid&tmpl=component&lang=' . strtolower($locale);
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:14,代码来源:bluepaid.php

示例11: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     $subtask = JRequest::getCmd('subtask', '');
     if ($subtask == 'ips') {
         $ips = null;
         echo implode(',', $this->_getIPList($ips));
         exit;
     }
     parent::onPaymentConfiguration($element);
     $this->address = hikashop_get('type.address');
     if (empty($element->payment_params->email)) {
         $app = JFactory::getApplication();
         $lang = JFactory::getLanguage();
         $locale = strtolower(substr($lang->get('tag'), 0, 2));
         $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'PayPal', JText::_('HIKA_EMAIL'), 'PayPal', 'https://www.paypal.com/' . $locale . '/mrb/pal=SXL9FKNKGAEM8'));
     }
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:17,代码来源:paypal.php

示例12: onPaymentConfiguration

 function onPaymentConfiguration(&$element)
 {
     $subtask = JRequest::getCmd('subtask', '');
     parent::onPaymentConfiguration($element);
     if (empty($element->payment_params->MerchantGuid)) {
         $app = JFactory::getApplication();
         $app->enqueueMessage(JText::sprintf('ENTER_INFO_REGISTER_IF_NEEDED', 'Kaznachey', JText::_('HIKA_EMAIL'), 'Kaznachey', 'https://www.kaznachey.ua/'));
     }
 }
开发者ID:saxum2010,项目名称:kaznacheyHikashop,代码行数:9,代码来源:kaznachey.php

示例13: setVisible

    function onPaymentConfiguration(&$element)
    {
        parent::onPaymentConfiguration($element);
        $this->modes = array();
        if ($this->getAUP(false, true)) {
            $this->modes[] = JHTML::_('select.option', 'aup', 'ALPHA_USER_POINTS');
        }
        $this->modes[] = JHTML::_('select.option', 'hk', 'HIKASHOP_USER_POINTS');
        $this->address = hikashop_get('type.address');
        if (!empty($element->payment_params->categories)) {
            $this->categories = unserialize($element->payment_params->categories);
        }
        $ids = array();
        if (!empty($this->categories)) {
            foreach ($this->categories as $cat) {
                $ids[] = $cat->category_id;
            }
            $db = JFactory::getDBO();
            $db->setQuery('SELECT * FROM ' . hikashop_table('category') . ' WHERE category_id IN (' . implode(',', $ids) . ')');
            $cats = $db->loadObjectList('category_id');
            foreach ($this->categories as $k => $cat) {
                if (!empty($cats[$cat->category_id])) {
                    $this->categories[$k]->category_name = $cats[$cat->category_id]->category_name;
                } else {
                    $this->categories[$k]->category_name = JText::_('CATEGORY_NOT_FOUND');
                }
            }
        }
        $acl = JFactory::getACL();
        if (!HIKASHOP_J16) {
            $this->groups = $acl->get_group_children_tree(null, 'USERS', false);
        } else {
            $db = JFactory::getDBO();
            $db->setQuery('SELECT a.*, a.title as text, a.id as value  FROM #__usergroups AS a ORDER BY a.lft ASC');
            $this->groups = $db->loadObjectList('id');
            foreach ($this->groups as $id => $group) {
                if (isset($this->groups[$group->parent_id])) {
                    $this->groups[$id]->level = intval(@$this->groups[$group->parent_id]->level) + 1;
                    $this->groups[$id]->text = str_repeat('- - ', $this->groups[$id]->level) . $this->groups[$id]->text;
                }
            }
        }
        if (!empty($element->payment_params->groups)) {
            $element->payment_params->groups = unserialize($element->payment_params->groups);
            foreach ($this->groups as $id => $group) {
                $this->groups[$id]->points = (int) @$element->payment_params->groups[$group->value];
            }
        }
        $config =& hikashop_config();
        $this->main_currency = $config->get('main_currency', 1);
        $currency = hikashop_get('class.currency');
        $this->currency = $currency->get($this->main_currency);
        $js = '
function setVisible(value){
	value = (parseInt(value) == 1) ? "" : "none";
	document.getElementById("opt").style.display = value;
	document.getElementById("opt2").style.display = value;
}
';
        if (!HIKASHOP_PHP5) {
            $doc =& JFactory::getDocument();
        } else {
            $doc = JFactory::getDocument();
        }
        $doc->addScriptDeclaration($js);
    }
开发者ID:q0821,项目名称:esportshop,代码行数:66,代码来源:userpoints.php


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