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


PHP VirtueMartModelVendor::getVendor方法代码示例

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


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

示例1: plgVmConfirmedOrder

 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;
     }
     $session = JFactory::getSession();
     $return_context = $session->getId();
     $this->_debug = $method->debug;
     $this->logInfo('plgVmConfirmedOrder order number: ' . $order['details']['BT']->order_number, 'message');
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
     }
     //$usr = & JFactory::getUser();
     $html = '';
     $usrBT = $order['details']['BT'];
     $address = isset($order['details']['ST']) ? $order['details']['ST'] : $order['details']['BT'];
     $vendorModel = new VirtueMartModelVendor();
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $this->getPaymentCurrency($method);
     $q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
     $db =& JFactory::getDBO();
     $db->setQuery($q);
     $currency_code_3 = $db->loadResult();
     //$paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
     //$totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total,false), 2);
     $totalInPaymentCurrency = round($order['details']['BT']->order_total, 2);
     $cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
     $user_title = $address->title;
     $user_email = $address->email;
     $user_name = $address->first_name . ' ' . $address->last_name;
     $user_city = $address->city;
     $user_address = $address->address_1;
     $user_zip = $address->zip;
     $user_country = ShopFunctions::getCountryByID($address->virtuemart_country_id, 'country_3_code');
     $msg_1 = $user_name . " Kd-nr " . $usrBT->virtuemart_user_id;
     $msg_2 = "Bestellnr " . $order['details']['BT']->order_number;
     $cont = $method->payment_uid . "|" . $method->payment_pid . "|||||" . $totalInPaymentCurrency . "|" . $currency_code_3 . "|" . $msg_1 . "|" . $msg_2 . "|" . $order['details']['BT']->order_number . "|" . $order['details']['BT']->virtuemart_paymentmethod_id . "|VM v2.1||||" . $method->payment_pas;
     $hash = md5($cont);
     $html .= '<div style="text-align: left; margin-top: 25px; margin-bottom: 25px;">';
     $html .= 'Ihre Bestellung ist bei uns eingegangen und wird umgehend von uns bearbeitet.';
     $html .= '</div>';
     // Prepare data that should be stored in the database
     $dbValues = array();
     $dbValues['order_number'] = $order['details']['BT']->order_number;
     $dbValues['payment_name'] = $this->renderPluginName($method, $order);
     $dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;
     $dbValues['payment_currency'] = $method->payment_currency;
     $dbValues['payment_order_total'] = $totalInPaymentCurrency;
     $this->storePSPluginInternalData($dbValues);
     $new_status = 'C';
     return $this->processConfirmedOrderPaymentResponse(1, $cart, $order, $html, $dbValues['payment_name'], $new_status);
 }
开发者ID:stAn47,项目名称:paymill-virtuemart-2,代码行数:60,代码来源:paymill.php

示例2: plgVmConfirmedOrder

 function plgVmConfirmedOrder($cart, $order)
 {
     if (!($method = $this->getVmPluginMethod($order["details"]["BT"]->virtuemart_paymentmethod_id))) {
         return null;
     }
     if (!$this->selectedThisElement($method->payment_element)) {
         return false;
     }
     $this->logInfo('plgVmOnConfirmedOrderGetPaymentForm order number: ' . $order['details']['BT']->order_number, 'message');
     $lang = JFactory::getLanguage();
     $lang->load('plg_vmpayment_epay', JPATH_ADMINISTRATOR);
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
     }
     $new_status = '';
     $usrBT = $order['details']['BT'];
     $address = isset($order['details']['ST']) ? $order['details']['ST'] : $order['details']['BT'];
     $vendorModel = new VirtueMartModelVendor();
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $this->getPaymentCurrency($method);
     $q = ' SELECT `currency_numeric_code` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
     $db =& JFactory::getDBO();
     $db->setQuery($q);
     $currency_numeric_code = $db->loadResult();
     $paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
     $totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total, false), 2);
     $cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
     $session = JFactory::getSession();
     $post_variables = array('merchantnumber' => $method->epay_merchant, 'instantcapture' => $method->epay_instantcapture, 'ownreceipt' => $method->epay_ownreceipt, 'group' => $method->epay_group, 'mailreceipt' => $method->epay_authmail, 'language' => $this->_getEpayLanguage(), 'orderid' => $order['details']['BT']->order_number, "amount" => $totalInPaymentCurrency * 100, "currency" => $currency_numeric_code, "accepturl" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "callbackurl" => JROUTE::_(JURI::root() . 'index.php?callback=1&option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "cancelurl" => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), "windowstate" => $method->epay_windowstate);
     $hash = md5(implode($post_variables, "") . $method->epay_md5key);
     // Prepare data that should be stored in the database
     $dbValues['payment_name'] = $this->renderPluginName($method, $order);
     $dbValues['order_number'] = $order['details']['BT']->order_number;
     $dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;
     $this->storePSPluginInternalData($dbValues);
     // add spin image
     $html = '<script type="text/javascript" src="https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/paymentwindow.js" charset="UTF-8"></script>';
     $html .= '<script type="text/javascript">';
     $html .= 'paymentwindow = new PaymentWindow({';
     foreach ($post_variables as $name => $value) {
         $html .= '\'' . $name . '\': "' . $value . '",';
     }
     $html .= '\'hash\': "' . $hash . '"';
     $html .= '});';
     $html .= '</script><input type="button" onclick="javascript: paymentwindow.open()" value="Go to payment" />';
     $html .= ' <script type="text/javascript">';
     $html .= ' paymentwindow.open();';
     $html .= ' </script>';
     // 	2 = don't delete the cart, don't send email and don't redirect
     $cart->_confirmDone = false;
     $cart->_dataValidated = false;
     $cart->setCartIntoSession();
     JRequest::setVar('html', $html);
 }
开发者ID:ePay,项目名称:virtuemart3,代码行数:58,代码来源:epay.php

示例3: plgVmConfirmedOrder

 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;
     }
     $session = JFactory::getSession();
     $return_context = $session->getId();
     $this->_debug = $method->debug;
     $this->logInfo('plgVmConfirmedOrder order number: ' . $order['details']['BT']->order_number, 'message');
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
     }
     $new_status = '';
     $usrBT = $order['details']['BT'];
     $address = isset($order['details']['ST']) ? $order['details']['ST'] : $order['details']['BT'];
     $vendorModel = new VirtueMartModelVendor();
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $this->getPaymentCurrency($method);
     $q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
     $db =& JFactory::getDBO();
     $db->setQuery($q);
     $currency_code_3 = $db->loadResult();
     $paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
     $totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total, false), 2);
     $cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
     $testReq = $method->debug == 1 ? 'YES' : 'NO';
     $prefix = $method->prefix;
     if ($prefix) {
         $order_number = $prefix . str_pad($order['details']['BT']->virtuemart_order_id, 4, '0', STR_PAD_LEFT);
     } else {
         $order_number = str_pad($order['details']['BT']->virtuemart_order_id, 4, '0', STR_PAD_LEFT);
     }
     $post_variables = array('protocol' => '7', 'msgtype' => 'authorize', 'merchant' => $method->quickpay_merchant, 'language' => $this->resolveQuickpayLang(), 'ordernumber' => $order_number, 'amount' => 100 * $totalInPaymentCurrency, 'currency' => $currency_code_3, 'continueurl' => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginresponsereceived&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id . '&ordernumber=' . $order['details']['BT']->order_number), 'cancelurl' => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginUserPaymentCancel&on=' . $order['details']['BT']->order_number . '&pm=' . $order['details']['BT']->virtuemart_paymentmethod_id), 'callbackurl' => JROUTE::_(JURI::root() . 'index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&tmpl=component&sessionid=' . $session->getId()), 'autocapture' => $method->quickpay_autocapture, 'autofee' => $method->quickpay_autofee, 'cardtypelock' => $method->quickpay_cardtypelock, 'splitpayment' => $method->quickpay_splitpayment, 'testmode' => $method->quickpay_testmode);
     if ($post_variables['splitpayment'] == 0) {
         // Quickpay does not accept a value of 0, so we remove it completely if splitpay is not requested
         unset($post_variables['splitpayment']);
     }
     unset($post_variables['testmode']);
     // Not for apiv6, we keep if it at some point is enabled again
     // Calculate md5
     $md5String = '';
     foreach ($post_variables as $name => $value) {
         $md5String .= $value;
     }
     $md5String .= $method->quickpay_md5_key;
     $post_variables['md5check'] = md5($md5String);
     // Prepare data that should be stored in the database
     $dbValues['order_number'] = $order['details']['BT']->order_number;
     $dbValues['payment_name'] = $this->renderPluginName($method, $order);
     $dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;
     $dbValues['cost_per_transaction'] = $method->cost_per_transaction;
     $dbValues['cost_percent_total'] = $method->cost_percent_total;
     $dbValues['payment_currency'] = $method->payment_currency;
     $dbValues['payment_order_total'] = $totalInPaymentCurrency;
     $dbValues['tax_id'] = $method->tax_id;
     $this->storePSPluginInternalData($dbValues);
     // add form data
     $html = '<form action="https://secure.quickpay.dk/form/" method="post" name="vm_quickpay_form" >';
     $html .= '<input type="image" name="submit" src="" alt="Click to pay with Quickpay" />';
     foreach ($post_variables as $name => $value) {
         $html .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
     }
     $html .= '</form>';
     $html .= ' <script type="text/javascript">';
     $html .= ' document.vm_quickpay_form.submit();';
     $html .= ' </script>';
     // 	2 = don't delete the cart, don't send email and don't redirect
     return $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $new_status);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:77,代码来源:quickpay.php

示例4: plgVmConfirmedOrder

 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;
     }
     $session = JFactory::getSession();
     $return_context = $session->getId();
     $this->_debug = $method->debug;
     $this->logInfo('plgVmConfirmedOrder order number: ' . $order['details']['BT']->order_number, 'message');
     if (!class_exists('VirtueMartModelOrders')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'orders.php';
     }
     if (!class_exists('VirtueMartModelCurrency')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'currency.php';
     }
     //$usr = & JFactory::getUser();
     $new_status = '';
     $usrBT = $order['details']['BT'];
     $address = isset($order['details']['ST']) ? $order['details']['ST'] : $order['details']['BT'];
     $vendorModel = new VirtueMartModelVendor();
     $vendorModel->setId(1);
     $vendor = $vendorModel->getVendor();
     $this->getPaymentCurrency($method);
     $q = 'SELECT `currency_code_3` FROM `#__virtuemart_currencies` WHERE `virtuemart_currency_id`="' . $method->payment_currency . '" ';
     $db =& JFactory::getDBO();
     $db->setQuery($q);
     $currency_code_3 = $db->loadResult();
     $paymentCurrency = CurrencyDisplay::getInstance($method->payment_currency);
     $totalInPaymentCurrency = round($paymentCurrency->convertCurrencyTo($method->payment_currency, $order['details']['BT']->order_total, false), 2);
     $cd = CurrencyDisplay::getInstance($cart->pricesCurrency);
     $merchant_email = $this->_getMerchantEmail($method);
     if (empty($merchant_email)) {
         vmInfo(JText::_('Tài khản Bảo Kim chưa được cài đặt'));
         return false;
     }
     $post_variables = array('business' => $merchant_email, 'merchant_id' => $method->baokim_merchant_id, 'order_description' => $order['details']['BT']->customer_note, 'order_id' => $cart->virtuemart_order_id, 'total_amount' => ceil($totalInPaymentCurrency));
     $str_combined = $method->baokim_secure_pass . implode('', $post_variables);
     $post_variables['checksum'] = strtoupper(md5($str_combined));
     $dbValues['order_number'] = $order['details']['BT']->order_number;
     $dbValues['payment_name'] = $this->renderPluginName($method, $order);
     $dbValues['virtuemart_paymentmethod_id'] = $cart->virtuemart_paymentmethod_id;
     $dbValues['baokim_custom'] = $return_context;
     $dbValues['cost_per_transaction'] = $method->cost_per_transaction;
     $dbValues['cost_percent_total'] = $method->cost_percent_total;
     $dbValues['payment_currency'] = $method->payment_currency;
     $dbValues['payment_order_total'] = $totalInPaymentCurrency;
     $dbValues['tax_id'] = $method->tax_id;
     $this->storePSPluginInternalData($dbValues);
     $url = "https://www.baokim.vn/payment/customize_payment/order?";
     $html = '<form action="' . $url . '" method="post" name="vm_baokim_form" >';
     foreach ($post_variables as $name => $value) {
         $html .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
     }
     $html .= '</form>';
     $html .= ' <script type="text/javascript">';
     $html .= ' document.vm_baokim_form.submit();';
     $html .= ' </script>';
     // 	2 = don't delete the cart, don't send email and don't redirect
     return $this->processConfirmedOrderPaymentResponse(2, $cart, $order, $html, $new_status);
 }
开发者ID:ngogiangthanh,项目名称:damtvnewversion,代码行数:64,代码来源:baokim.php


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