本文整理汇总了PHP中tsmConfig::getInstalledVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP tsmConfig::getInstalledVersion方法的具体用法?PHP tsmConfig::getInstalledVersion怎么用?PHP tsmConfig::getInstalledVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tsmConfig
的用法示例。
在下文中一共展示了tsmConfig::getInstalledVersion方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLatestVersion
/**
* Checks the tsmart Server for the latest available Version of tsmart
*
* @return string Example: 1.1.2
*/
function getLatestVersion()
{
if (!class_exists('VmConnector')) {
require VMPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_tsmart' . DS . 'helpers' . DS . 'connection.php';
}
$url = "http://tsmart.net/index2.php?option=com_versions&catid=1&myVersion={" . tsmConfig::getInstalledVersion() . "}&task=latestversionastext";
$result = VmConnector::handleCommunication($url);
return $result;
}
示例2: plgVmConfirmedOrder
//.........这里部分代码省略.........
$toCheck = array('last_name', 'first_name', 'middle_name', 'phone_1', 'phone_2', 'fax', 'address_1', 'address_2', 'city', 'virtuemart_state_id', 'virtuemart_country_id', 'zip');
$bsError = false;
foreach ($toCheck as $val) {
if (isset($order['details']['ST']->{$val})) {
if ($order['details']['ST']->{$val} != $order['details']['BT']->{$val}) {
$bsError = true;
$errorVal = $val;
break;
}
}
}
if ($bsError) {
$msg = tsmText::_('VMPAYMENT_HEIDELPAY_TECHNICAL_ERROR') . "<br />" . tsmText::_('VMPAYMENT_HEIDELPAY_BILLSAFE_ERROR') . "<br />";
$app = JFactory::getApplication();
$app->redirect('index.php?option=com_virtuemart&view=cart', $msg);
}
$params['PAYMENT.CODE'] = "IV.PA";
$params['ACCOUNT.BRAND'] = "BILLSAFE";
$params = array_merge($params, $this->getBasketDetails());
}
/*
* User account information
*/
$params['ACCOUNT.HOLDER'] = $address->first_name . " " . $address->last_name;
$params['NAME.GIVEN'] = $address->first_name;
$params['NAME.FAMILY'] = $address->last_name;
if (!empty($address->company)) {
$params['NAME.COMPANY'] = $address->company;
}
$params['ADDRESS.STREET'] = $address->address_1;
isset($address->address_2) ? $params['ADDRESS.STREET'] .= " " . $address->address_2 : '';
$params['ADDRESS.ZIP'] = $address->zip;
$params['ADDRESS.CITY'] = $address->city;
$params['ADDRESS.COUNTRY'] = ShopFunctions::getCountryByID($address->virtuemart_country_id, 'country_2_code');
$params['CONTACT.EMAIL'] = $order['details']['BT']->email;
$params['CONTACT.IP'] = $_SERVER['REMOTE_ADDR'];
/*
* Add debug informations for merchiant support
*/
$params['SHOP.TYPE'] = 'VirtueMart ' . tsmConfig::getInstalledVersion();
$params['SHOPMODULE.VERSION'] = $this->version;
$params['CRITERION.PAYMENT_NAME'] = tsmText::_('VMPAYMENT_HEIDELPAY_' . $method->HEIDELPAY_PAYMENT_TYPE);
$params['CRITERION.PAYMENT_NAME'] = strip_tags($params['CRITERION.PAYMENT_NAME']);
/*
* Create hash to secure the response
*/
$params['CRITERION.SECRET'] = $this->createSecretHash($order['details']['BT']->order_number, $method->HEIDELPAY_SECRET);
/*
* Set transaction mode
*/
if ($method->HEIDELPAY_TRANSACTION_MODE == 2) {
$params['TRANSACTION.MODE'] = "LIVE";
} elseif ($method->HEIDELPAY_TRANSACTION_MODE == 0) {
$params['TRANSACTION.MODE'] = "INTEGRATOR_TEST";
} else {
$params['TRANSACTION.MODE'] = "CONNECTOR_TEST";
}
/*
* Add response and css path
*/
$params['FRONTEND.RESPONSE_URL'] = JROUTE::_(JURI::root(), $xhtml = true, $ssl = 0) . 'plugins/vmpayment/heidelpay/heidelpay/heidelpay_response.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&on=' . urlencode($order['details']['BT']->order_number) . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id;
$cssFile = "heidelpay_default.css";
if (!empty($method->HEIDELPAY_STYLE)) {
$cssFile = $method->HEIDELPAY_STYLE;
}
$params['FRONTEND.CSS_PATH'] = JROUTE::_(JURI::root(), $xhtml = true, $ssl = 0) . 'plugins/vmpayment/heidelpay/heidelpay/' . $cssFile;
$requestUrl = $method->HEIDELPAY_PAYMENT_URL;
$params['SECURITY.SENDER'] = $method->HEIDELPAY_SECURITY_SENDER;
$params['USER.LOGIN'] = $method->HEIDELPAY_USER_LOGIN;
$params['USER.PWD'] = $method->HEIDELPAY_USER_PW;
if (substr($method->HEIDELPAY_PAYMENT_TYPE, 0, 2) == 'DD') {
$sepaform = array();
$sepaform = $this->switchDirectDebitFrom($method->HEIDELPAY_SEPA_FORM);
$params = array_merge($sepaform, $params);
}
/*
* send request to payment server
*/
$response = $this->doRequest($requestUrl, $params, $method->HEIDELPAY_DEBUG);
if ($params['TRANSACTION.MODE'] != "LIVE") {
vmInfo('VMPAYMENT_HEIDELPAY_PAYMENT_TESTMODE');
}
/*
* On success show iframe or show error information for your customer
*/
$returnValue = 0;
if ($response['PROCESSING_RESULT'] == "ACK" || $response['POST_VALIDATION'] == "ACK") {
$returnValue = 2;
$html = $this->renderByLayout('displaypayment', array('response' => $response['FRONTEND_REDIRECT_URL']));
} else {
$html = tsmText::_('VMPAYMENT_HEIDELPAY_TECHNICAL_ERROR') . " <br /> - " . addslashes($response['PROCESSING_RETURN']) . "<br />" . tsmText::_('VMPAYMENT_HEIDELPAY_CONTACT_SHOPOWNER');
}
/*
* Show debug information
*/
if ($method->HEIDELPAY_DEBUG == 1) {
vmDebug('HEIDELPAY plgVmConfirmedOrder', $params);
}
return $this->processConfirmedOrderPaymentResponse($returnValue, $cart, $order, $html, '', '');
}