本文整理汇总了PHP中vmPSPlugin类的典型用法代码示例。如果您正苦于以下问题:PHP vmPSPlugin类的具体用法?PHP vmPSPlugin怎么用?PHP vmPSPlugin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了vmPSPlugin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plgVmConfirmedOrder
/**
*
*
* @author Valérie Isaksen
*/
function plgVmConfirmedOrder($cart, $order)
{
if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {
return NULL;
// Another method was selected, do nothing
}
if (!$this->selectedThisElement($method->payment_element)) {
return FALSE;
}
VmConfig::loadJLang('com_virtuemart', true);
if (!class_exists('VirtueMartModelOrders')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
}
$this->getPaymentCurrency($method);
$currency_code_3 = shopFunctions::getCurrencyByID($method->payment_currency, 'currency_code_3');
$email_currency = $this->getEmailCurrency($method);
$totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total, $method->payment_currency);
$dbValues['payment_name'] = $this->renderPluginName($method) . '<br />' . $method->payment_info;
$dbValues['order_number'] = $order['details']['BT']->order_number;
$dbValues['virtuemart_paymentmethod_id'] = $order['details']['BT']->virtuemart_paymentmethod_id;
$dbValues['cost_per_transaction'] = $method->cost_per_transaction;
$dbValues['cost_percent_total'] = $method->cost_percent_total;
$dbValues['payment_currency'] = $currency_code_3;
$dbValues['email_currency'] = $email_currency;
$dbValues['payment_order_total'] = $totalInPaymentCurrency['value'];
$dbValues['tax_id'] = $method->tax_id;
$this->storePSPluginInternalData($dbValues);
$html = '<table class="vmorder-done">' . "\n";
$html .= $this->getHtmlRow('STANDARD_PAYMENT_INFO', $dbValues['payment_name'], 'class="vmorder-done-payinfo"');
if (!empty($payment_info)) {
$lang = JFactory::getLanguage();
if ($lang->hasKey($method->payment_info)) {
$payment_info = vmText::_($method->payment_info);
} else {
$payment_info = $method->payment_info;
}
$html .= $this->getHtmlRow('STANDARD_PAYMENTINFO', $payment_info, 'class="vmorder-done-payinfo"');
}
if (!class_exists('VirtueMartModelCurrency')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
}
$currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
$html .= $this->getHtmlRow('STANDARD_ORDER_NUMBER', $order['details']['BT']->order_number, 'class="vmorder-done-nr"');
$html .= $this->getHtmlRow('STANDARD_AMOUNT', $currency->priceDisplay($order['details']['BT']->order_total), 'class="vmorder-done-amount"');
if ($method->payment_currency != $order['details']['BT']->order_currency) {
$html .= $this->getHtmlRow('COM_VIRTUEMART_CART_TOTAL_PAYMENT', $totalInPaymentCurrency['display'], 'class="vmorder-done-amount"');
}
//$html .= $this->getHtmlRow('STANDARD_INFO', $method->payment_info);
//$html .= $this->getHtmlRow('STANDARD_AMOUNT', $totalInPaymentCurrency.' '.$currency_code_3);
$html .= '</table>' . "\n";
$modelOrder = VmModel::getModel('orders');
$order['order_status'] = $this->getNewStatus($method);
$order['customer_notified'] = 1;
$order['comments'] = '';
$modelOrder->updateStatusForOneOrder($order['details']['BT']->virtuemart_order_id, $order, TRUE);
//We delete the old stuff
$cart->emptyCart();
vRequest::setVar('html', $html);
return TRUE;
}
示例2: plgVmConfirmedOrder
/**
*
* тут выводится форма для перехода на сайт оплаты
* @author Alexius
*/
function plgVmConfirmedOrder($cart, $order)
{
//echo'<pre>salt = ';print_r($this);echo'</pre>';
if (!($method = $this->getVmPluginMethod($order['details']['BT']->virtuemart_paymentmethod_id))) {
return NULL;
// Another method was selected, do nothing
}
if (!$this->selectedThisElement($method->payment_element)) {
return FALSE;
}
VmConfig::loadJLang('com_virtuemart', true);
if (!class_exists('VirtueMartModelOrders')) {
require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
}
$this->getPaymentCurrency($method);
$currency_code_3 = shopFunctions::getCurrencyByID($method->payment_currency, 'currency_code_3');
$email_currency = $this->getEmailCurrency($method);
$new_status = $method->status_pending;
$totalInPaymentCurrency = vmPSPlugin::getAmountInCurrency($order['details']['BT']->order_total, $method->payment_currency);
$dbValues['payment_name'] = $this->renderPluginName($method) . '<br />' . $method->payment_info;
$dbValues['order_number'] = $order['details']['BT']->order_number;
$dbValues['virtuemart_paymentmethod_id'] = $order['details']['BT']->virtuemart_paymentmethod_id;
$dbValues['cost_per_transaction'] = $method->cost_per_transaction;
$dbValues['cost_percent_total'] = $method->cost_percent_total;
$dbValues['payment_currency'] = $currency_code_3;
$dbValues['email_currency'] = $email_currency;
$dbValues['payment_order_total'] = $totalInPaymentCurrency['value'];
$dbValues['tax_id'] = $method->tax_id;
$this->storePSPluginInternalData($dbValues);
/*
$order1 = $this->getDataByOrderNumber('1419045');
$orderModel = VmModel::getModel('orders');
$order = $orderModel->getOrder($order1->virtuemart_order_id);
echo'<pre>';var_dump($order1);echo'</pre>';//die;
//echo'<pre>';var_dump($order);echo'</pre>';
die;
*/
//echo'<pre>';print_r($order['items']);echo'</pre>';
//die;
$session = JFactory::getSession();
$session->set('virtuemart_order_number', $order['details']['BT']->order_number);
//Формирование POST заголовка для отправки на Ipay
$post_variables = array('srv_no' => $method->srv_no, 'pers_acc' => $order['details']['BT']->order_number, 'amount' => (int) $order['details']['BT']->order_total, 'amount_editable' => 'N', 'provider_url' => $method->provider_url);
$url = $method->server;
//$url = 'https://stand.besmart.by:4443/pls/ipay/!iSOU.Login';
$html = '';
$html = '<div class="erip-ipay-frm">';
$html .= '<p>Номер вашего заказа: ' . $order['details']['BT']->order_number . '.</p>';
$html .= '<p>Для оплаты через систему ЕРИП запишите данный номер заказа.</p><br><br>';
$html .= '<p>Для оплаты через систему iPay - нажмите на кнопку ниже.</p>';
$html .= '<form action="' . $url . '" method="post" name="ipay-frm">';
foreach ($post_variables as $name => $value) {
$html .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
}
$html .= '<button type="submit" class="button">Оплатить через iPay</button>';
$html .= '</form>';
$html .= '</div>';
//return $html;
return $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $method->payment_name, $new_status);
}
示例3: getExtraPluginNameInfo
function getExtraPluginNameInfo()
{
if (!class_exists('VirtueMartCart')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
}
$cart = VirtueMartCart::getCart();
//if (!isset($cart->cartPrices)) {
$cart->getCartPrices();
//}
$pbxTotalVendorCurrency = $this->getPbxAmount($cart->cartPrices['salesPrice']);
$subscribe = $this->getSubscribeProducts($cart, $pbxTotalVendorCurrency);
$extraInfo = false;
if (!empty($subscribe)) {
$extraInfo['subscribe'] = true;
$amount2montInCurrency = vmPSPlugin::getAmountInCurrency($subscribe['PBX_2MONT'] * 0.01, $this->_method->payment_currency);
$amount1montInCurrency = vmPSPlugin::getAmountInCurrency($subscribe['PBX_TOTAL'] * 0.01, $this->_method->payment_currency);
$extraInfo['subscribe_2mont'] = $amount2montInCurrency['display'];
$extraInfo['subscribe_1mont'] = $amount1montInCurrency['display'];
$extraInfo['subscribe_nbpaie'] = $subscribe['PBX_NBPAIE'];
$extraInfo['subscribe_freq'] = $subscribe['PBX_FREQ'];
$extraInfo['subscribe_quand'] = $this->_method->subscribe_quand;
$extraInfo['subscribe_delais'] = $this->_method->subscribe_delais;
}
return $extraInfo;
}
示例4: array
function __construct (& $subject, $config) {
parent::__construct ($subject, $config);
$this->_loggable = TRUE;
$this->_debug = TRUE;
$this->tableFields = array_keys ($this->getTableSQLFields ());
$this->_tablepkey = 'id'; //virtuemart_moneybookers_id';
$this->_tableId = 'id'; //'virtuemart_moneybookers_id';
$varsToPush = array('pay_to_email' => array('', 'char'),
'hide_login' => array(0, 'int'),
'logourl' => array('', 'char'),
'secret_word' => array('', 'char'),
'payment_currency' => array('', 'char'),
'payment_logos' => array('', 'char'),
'countries' => array('', 'char'),
'cost_per_transaction'
=> array('', 'int'),
'cost_percent_total'
=> array('', 'int'),
'min_amount' => array('', 'int'),
'max_amount' => array('', 'int'),
'tax_id' => array(0, 'int'),
'countries' => array('', 'char'),
'status_pending' => array('', 'char'),
'status_success' => array('', 'char'),
'status_canceled' => array('', 'char'));
$this->setConfigParameterable ($this->_configTableFieldName, $varsToPush);
}
示例5: array
function __construct (& $subject, $config) {
parent::__construct ($subject, $config);
// unique filelanguage for all moneybookers methods
$jlang = JFactory::getLanguage ();
$jlang->load ('plg_vmpayment_moneybookers', JPATH_ADMINISTRATOR, NULL, TRUE);
$this->_loggable = TRUE;
$this->_debug = TRUE;
$this->tableFields = array_keys ($this->getTableSQLFields ());
$this->_tablepkey = 'id'; //virtuemart_moneybookers_id';
$this->_tableId = 'id'; //'virtuemart_moneybookers_id';
$varsToPush = array('pay_to_email' => array('', 'char'),
'hide_login' => array(0, 'int'),
'logourl' => array('', 'char'),
'secret_word' => array('', 'char'),
'payment_currency' => array('', 'char'),
'payment_logos' => array('', 'char'),
'countries' => array('', 'char'),
'cost_per_transaction'
=> array('', 'int'),
'cost_percent_total'
=> array('', 'int'),
'min_amount' => array('', 'int'),
'max_amount' => array('', 'int'),
'tax_id' => array(0, 'int'),
'countries' => array('', 'char'),
'status_pending' => array('', 'char'),
'status_success' => array('', 'char'),
'status_canceled' => array('', 'char'));
$this->setConfigParameterable ($this->_configTableFieldName, $varsToPush);
}
示例6: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('payment_logos' => array('', 'char'), 'countries' => array(0, 'int'), 'payment_currency' => array(0, 'int'), 'merchant_id' => array('', 'string'), 'secret_key' => array('', 'string'), 'status_success' => array('', 'char'), 'status_pending' => array('', 'char'), 'status_canceled' => array('', 'char'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例7:
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
// Insert javascript into the head
$document = JFactory::getDocument();
$document->addScript(JURI::base() . "plugins/vmuserfield/mds_validation/mds_collivery.js");
$document->addScriptDeclaration('base_url = "' . JURI::base() . '";');
}
示例8:
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = $this->getVarsToPush();
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例9: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('payment_currency' => array(0, 'int'), 'status_success' => array(0, "int"), 'status_canceled' => array(0, "int"), 'payment_logos' => array('', 'char'), 'priv_key' => array('', 'text'), 'pub_key' => array('', 'text'), 'VK_SND_ID' => array('', 'string'), 'priv_pass' => array('', 'string'), 'countries' => array('', 'string'), 'return' => array('', 'text'), 'cancel' => array('', "text"), 'url' => array('', 'text'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例10: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('Client_Title' => array('', 'char'), 'Short_Names' => array('', 'int'), 'Free_Shipping' => array('', 'int'), 'Free_From' => array('', 'char'), 'Only_Estonia' => array('', 'int'), 'small' => array('', 'char'), 'medium' => array('', 'char'), 'large' => array('', 'char'), 'calc_shipping' => array('', 'int'), 'tax_id' => array('', 'int'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例11: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('baokim_merchant_email' => array('', 'char'), 'baokim_merchant_id' => array('', 'char'), 'baokim_secure_pass' => array('', 'char'), 'payment_currency' => array(0, 'int'), 'debug' => array(0, 'int'), 'status_pending' => array('', 'char'), 'status_success' => array('', 'char'), 'status_canceled' => array('', 'char'), 'min_amount' => array(0, 'int'), 'max_amount' => array(0, 'int'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例12: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('payment_logos' => array('', 'char'), 'countries' => array(0, 'int'), 'payment_order_total' => 'decimal(15,5) NOT NULL DEFAULT \'0.00000\' ', 'payment_currency' => array(0, 'int'), 'min_amount' => array(0, 'int'), 'max_amount' => array(0, 'int'), 'cost_per_transaction' => array(0, 'int'), 'cost_percent_total' => array(0, 'int'), 'tax_id' => array(0, 'int'), 'paykeeper_secret' => array('', 'string'), 'status_success' => array('', 'char'), 'status_pending' => array('', 'char'), 'status_canceled' => array('', 'char'), 'paykeeper_payment_form_url' => array('', 'string'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例13: __construct
/**
* @param JDispatcher $dispatcher Joomla dispatcher
* @param array $config Plugin config
*/
public function __construct(JDispatcher $dispatcher, array $config)
{
parent::__construct($dispatcher, $config);
$this->_tablepkey = 'id';
$this->_tableId = 'id';
$this->tableFields = array_keys($this->getTableSQLFields());
$this->setConfigParameterable($this->_configTableFieldName, $this->getVarsToPush());
}
示例14: __construct
public function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
JFactory::getLanguage()->load('com_virtuemart', JPATH_ADMINISTRATOR);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('destination_url' => array('https://payment.maksekeskus.ee/pay/1/signed.html', 'string'), 'shop_id' => array('', 'string'), 'api_secret' => array('', 'string'), 'currency' => array('', 'string'), 'locale' => array('et', 'string'), 'return' => array(JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived'), 'string'), 'status_success' => array(0, 'int'), 'status_canceled' => array(0, 'int'), 'countries' => array('', 'string'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}
示例15: array
function __construct(&$subject, $config)
{
parent::__construct($subject, $config);
$jlang = JFactory::getLanguage();
$jlang->load('plg_vmpayment_payeer', JPATH_ADMINISTRATOR, NULL, TRUE);
$this->_loggable = true;
$this->tableFields = array_keys($this->getTableSQLFields());
$varsToPush = array('payment_logos' => array('', 'char'), 'countries' => array(0, 'int'), 'payment_currency' => array(0, 'int'), 'merchant_url' => array('https://payeer.com/merchant/', 'string'), 'merchant_id' => array('', 'string'), 'secret_key' => array('', 'string'), 'status_success' => array('', 'char'), 'status_pending' => array('', 'char'), 'status_canceled' => array('', 'char'), 'order_desc' => array('', 'string'), 'ip_filter' => array('', 'string'), 'admin_email' => array('', 'string'), 'log_file' => array('', 'string'));
$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
}