Example #1
0
 /**
  *
  *
  * @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;
 }
	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);
	}
Example #3
0
 /**
  *
  * тут выводится форма для перехода на сайт оплаты
  * @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);
 }
Example #4
0
 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;
 }
Example #5
0
	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);
	}
 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);
 }
 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() . '";');
 }
 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);
 }
Example #9
0
 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);
 }
Example #10
0
 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);
 }
Example #11
0
 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);
 }
 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);
 }
Example #13
0
 /**
  * @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());
 }
Example #14
0
 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);
 }
 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);
 }
 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);
     plgVmPaymentKlarnaCheckout::includeKlarnaFiles();
     VmConfig::loadJLang('plg_vmpayment_klarna');
 }
Example #17
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = true;
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     //JHTML::_('behavior.modal', 'a.ulozenkamodal');
 }
Example #18
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     // 		vmdebug('Plugin stuff',$subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #19
0
 /**
  * @param object $subject
  * @param array  $config
  */
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     //vmdebug('Muh constructed plgVmShipmentWeight_countries',$varsToPush);
 }
 /**
  * The constructor
  * @param type $subject
  * @param type $config
  */
 public function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $this->setConfigParameterable($this->_configTableFieldName, $this->_getPagSeguroVarsToPush());
     // adding PagSeguro API
     $this->_addPagSeguroLibrary();
 }
Example #21
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = true;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = array('payment_uid' => array('', 'char'), 'payment_pid' => array('', 'char'), 'payment_pas' => array('', 'char'), 'payment_npas' => array('', 'char'), 'payment_info' => array('', 'char'), 'debug' => array(0, 'int'), 'status_pending' => array('', 'char'), 'status_success' => array('', 'char'), 'status_canceled' => array('', 'char'));
     //$this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #22
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     //virtuemart_paypal_id';
     $this->_tableId = 'id';
     //'virtuemart_paypal_id';
     $varsToPush = array('paypal_merchant_email' => array('', 'char'), 'paypal_verified_only' => array('', 'int'), 'payment_currency' => array('', 'int'), 'email_currency' => array('', 'int'), 'log_ipn' => array('', 'int'), 'sandbox' => array(0, 'int'), 'sandbox_merchant_email' => array('', 'char'), 'payment_logos' => array('', 'char'), 'debug' => array(0, 'int'), 'status_pending' => array('', 'char'), 'status_success' => array('', 'char'), 'status_canceled' => array('', 'char'), 'status_refunded' => array('', 'char'), 'countries' => array('', 'char'), 'min_amount' => array('', 'int'), 'max_amount' => array('', 'int'), 'secure_post' => array('', 'int'), 'ipn_test' => array('', 'int'), 'no_shipping' => array('', 'int'), 'address_override' => array('', 'int'), 'cost_per_transaction' => array('', 'int'), 'cost_percent_total' => array('', 'int'), 'tax_id' => array(0, 'int'));
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #23
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $jlang = JFactory::getLanguage();
     $jlang->load('plg_vmpayment_oos', JPATH_ADMINISTRATOR, NULL, TRUE);
     $this->_loggable = true;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $varsToPush = array('url_pay_page' => array('', 'char'), 'merchant_id' => array('', 'char'), 'merchant_key' => array('', 'char'), 'url_success' => array('', 'char'), 'url_fail' => array('', 'char'), 'price_final' => array('', 'int'), 'lang' => array('', 'char'), 'payment_logos' => array('', 'char'), 'status_pending' => array('', 'char'), 'status_success' => array('', 'char'), 'status_canceled' => array('', 'char'), 'countries' => array('', 'char'), 'min_amount' => array('', 'float'), 'max_amount' => array('', 'float'), 'cost_per_transaction' => array('', 'int'), 'cost_percent_total' => array('', 'int'), 'tax_id' => array(0, 'int'));
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #24
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     //virtuemart_sofort_id';
     $this->_tableId = 'id';
     //'virtuemart_sofort_id';
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #25
0
 function __construct(&$subject, $config)
 {
     //if (self::$_this)
     //   return self::$_this;
     parent::__construct($subject, $config);
     // 		vmdebug('Plugin stuff',$subject, $config);
     $this->_loggable = true;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     // self::$_this = $this;
 }
Example #26
0
 function __construct(&$subject, $config)
 {
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     //virtuemart_sofort_id';
     $this->_tableId = 'id';
     //'virtuemart_sofort_id';
     $varsToPush = array('payment_logos' => array('', 'char'), 'configuration_key' => array('', 'char'), 'buyer_protection' => array('', 'int'), 'payment_currency' => array('', 'int'), 'email_currency' => array('', 'int'), 'countries' => array('', 'char'), 'min_amount' => array('', 'float'), 'max_amount' => array('', 'float'), 'cost_per_transaction' => array('', 'char'), 'cost_percent_total' => array('', 'char'), 'tax_id' => array('', 'int'), 'status_pending' => array('', 'char'), 'status_received' => array('', 'char'), 'status_loss' => array('', 'char'), 'status_refunded' => array('', 'char'), 'debug' => array('', 'int'));
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
 }
Example #27
0
 /**
  *
  *
  * @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);
     VmConfig::loadJLang('com_virtuemart_orders', TRUE);
     if (!class_exists('VirtueMartModelOrders')) {
         require VMPATH_ADMIN . 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_min_transaction'] = $method->cost_min_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);
     $payment_info = '';
     if (!empty($method->payment_info)) {
         $lang = JFactory::getLanguage();
         if ($lang->hasKey($method->payment_info)) {
             $payment_info = vmText::_($method->payment_info);
         } else {
             $payment_info = $method->payment_info;
         }
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'currency.php';
     }
     $currency = CurrencyDisplay::getInstance('', $order['details']['BT']->virtuemart_vendor_id);
     $html = $this->renderByLayout('post_payment', array('order_number' => $order['details']['BT']->order_number, 'order_pass' => $order['details']['BT']->order_pass, 'payment_name' => $dbValues['payment_name'], 'displayTotalInPaymentCurrency' => $totalInPaymentCurrency['display']));
     $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;
 }
Example #28
0
 /**
  * @param object $subject
  * @param array  $config
  */
 function __construct(&$subject, $config)
 {
     //if (self::$_this)
     //   return self::$_this;
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     // 		self::$_this
     //$this->createPluginTable($this->_tablename);
     //self::$_this = $this;
 }
 function __construct(&$subject, $config)
 {
     //if (self::$_this)
     //   return self::$_this;
     parent::__construct($subject, $config);
     $this->_loggable = true;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $varsToPush = array('salt' => array('', 'int'), 'merchantkey' => array('', 'char'), 'mode' => array('', 'char'), 'description' => array('', 'text'), 'payment_logos' => array('', 'char'), 'payment_currency' => array('', 'int'), 'status_pending' => array('', 'char'), 'status_success' => array('', 'char'), 'status_canceled' => array('', 'char'), 'countries' => array('', 'char'), 'min_amount' => array('', 'int'), 'max_amount' => array('', 'int'), 'secure_post' => array('', 'int'), 'ipn_test' => array('', 'int'), 'no_shipping' => array('', 'int'), 'address_override' => array('', 'int'), 'cost_per_transaction' => array('', 'int'), 'cost_percent_total' => array('', 'int'), 'tax_id' => array(0, 'int'));
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     //self::$_this = $this;
 }
Example #30
0
 function __construct(&$subject, $config)
 {
     //if (self::$_this)
     //   return self::$_this;
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $this->secret = strtoupper(sha1(mt_rand(10000, mt_getrandmax())));
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     //self::$_this = $this;
 }