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


PHP hikashopPaymentPlugin::onPaymentConfigurationSave方法代码示例

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


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

示例1: onPaymentConfigurationSave

 function onPaymentConfigurationSave(&$element)
 {
     parent::onPaymentConfigurationSave($element);
     $secret = $element->payment_params->secret_code;
     if (empty($element->payment_id)) {
         $pluginClass = hikashop_get('class.payment');
         $status = $pluginClass->save($element);
         if (!$status) {
             return true;
         }
         $element->payment_id = $status;
     }
     jimport('joomla.filesystem.file');
     $lang = JFactory::getLanguage();
     $locale = strtolower(substr($lang->get('tag'), 0, 2));
     $opts = array('option' => 'com_hikashop', 'tmpl' => 'component', 'ctrl' => 'checkout', 'task' => 'notify', 'notif_payment' => $this->name, 'format' => 'html', 'local' => $locale, 'notif_id' => $element->payment_id, 'from_user' => 'return');
     $content = '<?php' . "\r\n";
     foreach ($opts as $k => $v) {
         $v = str_replace(array('\'', '\\'), '', $v);
         $content .= '$_GET[\'' . $k . '\']=\'' . $v . '\';' . "\r\n" . '$_REQUEST[\'' . $k . '\']=\'' . $v . '\';' . "\r\n";
     }
     $content .= 'include(\'index.php\');' . "\r\n";
     JFile::write(JPATH_ROOT . DS . $this->name . '_return_' . $element->payment_id . '.php', $content);
     $opts['from_user'] = 'cancel';
     $content = '<?php' . "\r\n";
     foreach ($opts as $k => $v) {
         $v = str_replace(array('\'', '\\'), '', $v);
         $content .= '$_GET[\'' . $k . '\']=\'' . $v . '\';' . "\r\n" . '$_REQUEST[\'' . $k . '\']=\'' . $v . '\';' . "\r\n";
     }
     $content .= 'include(\'index.php\');' . "\r\n";
     JFile::write(JPATH_ROOT . DS . $this->name . '_cancel_' . $element->payment_id . '.php', $content);
     unset($opts['from_user']);
     $opts['secret_code'] = $secret;
     $content = '<?php' . "\r\n";
     foreach ($opts as $k => $v) {
         $v = str_replace(array('\'', '\\'), '', $v);
         $content .= '$_GET[\'' . $k . '\']=\'' . $v . '\';' . "\r\n" . '$_REQUEST[\'' . $k . '\']=\'' . $v . '\';' . "\r\n";
     }
     $content .= 'include(\'index.php\');' . "\r\n";
     JFile::write(JPATH_ROOT . DS . $this->name . '_' . $element->payment_id . '_' . $secret . '.php', $content);
     return true;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:42,代码来源:paypaladvanced.php

示例2: onPaymentConfigurationSave

    function onPaymentConfigurationSave(&$element)
    {
        parent::onPaymentConfigurationSave($element);
        if (empty($element->payment_id)) {
            $pluginClass = hikashop_get('class.payment');
            $status = $pluginClass->save($element);
            if (!$status) {
                return true;
            }
            $element->payment_id = $status;
        }
        $app = JFactory::getApplication();
        jimport('joomla.filesystem.file');
        jimport('joomla.filesystem.path');
        $lang = JFactory::getLanguage();
        $locale = strtolower(substr($lang->get('tag'), 0, 2));
        $content = '<?php
	$_GET[\'option\']=\'com_hikashop\';
	$_GET[\'tmpl\']=\'component\';
	$_GET[\'ctrl\']=\'checkout\';
	$_GET[\'task\']=\'notify\';
	$_GET[\'notif_payment\']=\'paybox\';
	$_GET[\'format\']=\'html\';
	$_GET[\'lang\']=\'' . $locale . '\';
	$_GET[\'notif_id\']=\'' . $element->payment_id . '\';
	$_REQUEST[\'option\']=\'com_hikashop\';
	$_REQUEST[\'tmpl\']=\'component\';
	$_REQUEST[\'ctrl\']=\'checkout\';
	$_REQUEST[\'task\']=\'notify\';
	$_REQUEST[\'notif_payment\']=\'paybox\';
	$_REQUEST[\'format\']=\'html\';
	$_REQUEST[\'lang\']=\'' . $locale . '\';
	$_REQUEST[\'notif_id\']=\'' . $element->payment_id . '\';
	include(\'index.php\');
';
        JFile::write(JPATH_ROOT . DS . 'paybox_' . $element->payment_id . '.php', $content);
        return true;
    }
开发者ID:q0821,项目名称:esportshop,代码行数:38,代码来源:paybox.php

示例3: onPaymentConfigurationSave

 public function onPaymentConfigurationSave(&$element)
 {
     $ret = parent::onPaymentConfigurationSave($element);
     $this->generateRootFile($element);
     return $ret;
 }
开发者ID:rodhoff,项目名称:MNW,代码行数:6,代码来源:sagepay.php

示例4: onPaymentConfigurationSave

 /**
  *
  */
 public function onPaymentConfigurationSave(&$element)
 {
     $ret = parent::onPaymentConfigurationSave($element);
     if (empty($element->payment_params->currency)) {
         $element->payment_params->currency = 'AUD';
     }
     jimport('joomla.filesystem.file');
     $lang = JFactory::getLanguage();
     $locale = strtolower(substr($lang->get('tag'), 0, 2));
     $opts = array('option' => 'com_hikashop', 'tmpl' => 'component', 'ctrl' => 'checkout', 'task' => 'notify', 'notif_payment' => $this->name, 'format' => 'html', 'local' => $locale, 'notif_id' => $element->payment_id);
     $content = '<?php' . "\r\n";
     foreach ($opts as $k => $v) {
         $v = str_replace(array('\'', '\\'), '', $v);
         $content .= '$_GET[\'' . $k . '\']=\'' . $v . '\';' . "\r\n" . '$_REQUEST[\'' . $k . '\']=\'' . $v . '\';' . "\r\n";
     }
     $content .= 'include(\'index.php\');' . "\r\n";
     JFile::write(JPATH_ROOT . DS . $this->name . '_' . $element->payment_id . '.php', $content);
     return $ret;
 }
开发者ID:HikaShop,项目名称:hikashoppayment-ewayrapid,代码行数:22,代码来源:ewayrapid.php

示例5: onPaymentConfigurationSave

    function onPaymentConfigurationSave(&$element)
    {
        parent::onPaymentConfigurationSave($element);
        $app = JFactory::getApplication();
        jimport('joomla.filesystem.file');
        jimport('joomla.filesystem.path');
        $lang = JFactory::getLanguage();
        $locale = strtolower(substr($lang->get('tag'), 0, 2));
        $writen = true;
        $content = '<?php
			$_GET[\'option\']=\'com_hikashop\';
			$_GET[\'tmpl\']=\'component\';
			$_GET[\'ctrl\']=\'checkout\';
			$_GET[\'task\']=\'notify\';
			$_GET[\'notif_payment\']=\'beanstream\';
			$_GET[\'format\']=\'html\';
			$_GET[\'lang\']=\'' . $locale . '\';
			$_REQUEST[\'option\']=\'com_hikashop\';
			$_REQUEST[\'tmpl\']=\'component\';
			$_REQUEST[\'ctrl\']=\'checkout\';
			$_REQUEST[\'task\']=\'notify\';
			$_REQUEST[\'notif_payment\']=\'beanstream\';
			$_REQUEST[\'format\']=\'html\';
			$_REQUEST[\'lang\']=\'' . $locale . '\';
			include(\'index.php\');
		';
        ob_start();
        $writen = JFile::write(JPATH_ROOT . DS . 'beanstream_params.php', $content);
        ob_get_clean();
        if (!$writen) {
            $app->enqueueMessage('The plugin failed writing the file beanstream_params.php in the root directory : ' . JPATH_ROOT . DS . '. Please check if the writing permission has been given to the owner.', 'error');
        }
        $content = '<?php
			$_GET[\'option\']=\'com_hikashop\';
			$_GET[\'tmpl\']=\'component\';
			$_GET[\'ctrl\']=\'checkout\';
			$_GET[\'task\']=\'notify\';
			$_GET[\'notif_payment\']=\'beanstream\';
			$_GET[\'format\']=\'html\';
			$_GET[\'lang\']=\'' . $locale . '\';
			$_GET[\'userside\']=\'1\';
			$_REQUEST[\'option\']=\'com_hikashop\';
			$_REQUEST[\'tmpl\']=\'component\';
			$_REQUEST[\'ctrl\']=\'checkout\';
			$_REQUEST[\'task\']=\'notify\';
			$_REQUEST[\'notif_payment\']=\'beanstream\';
			$_REQUEST[\'format\']=\'html\';
			$_REQUEST[\'lang\']=\'' . $locale . '\';
			$_REQUEST[\'userside\']=\'1\';
			include(\'index.php\');
		';
        ob_start();
        $writen = JFile::write(JPATH_ROOT . DS . 'beanstream_params_u.php', $content);
        ob_get_clean();
        if (!$writen) {
            $app->enqueueMessage('The plugin failed writing the file beanstream_params_u.php in the root directory : ' . JPATH_ROOT . DS . '. Please check if the writing permission has been given to the owner.', 'error');
        }
        return true;
    }
开发者ID:rodhoff,项目名称:MNW,代码行数:59,代码来源:beanstream.php


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