Version Notes
free
Download this release
Release Info
Developer | YoungJun |
Extension | Esellers_Ipay |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Esellers/Aboutep/Block/System/Config/Form/Fieldep.php +142 -0
- app/code/community/Esellers/Aboutep/Helper/Data.php +6 -0
- app/code/community/Esellers/Aboutep/Model/Createep.php +162 -0
- app/code/community/Esellers/Aboutep/controllers/EpController.php +17 -0
- app/code/community/Esellers/Aboutep/etc/adminhtml.xml +26 -0
- app/code/community/Esellers/Aboutep/etc/config.xml +95 -0
- app/code/community/Esellers/Aboutep/etc/system.xml +67 -0
- app/code/community/Esellers/Ipay/Block/Cart/Onepage.php +66 -0
- app/code/community/Esellers/Ipay/Block/Logo.php +17 -0
- app/code/community/Esellers/Ipay/Block/Onepage/Review/Info.php +45 -0
- app/code/community/Esellers/Ipay/Block/Sales/Order/View.php +323 -0
- app/code/community/Esellers/Ipay/Helper/Active.php +17 -0
- app/code/community/Esellers/Ipay/Helper/Data.php +6 -0
- app/code/community/Esellers/Ipay/Model/Carrier/ShippingMethod.php +61 -0
- app/code/community/Esellers/Ipay/Model/Ipay.php +45 -0
- app/code/community/Esellers/Ipay/Model/Mysql4/Setup.php +6 -0
- app/code/community/Esellers/Ipay/Model/Mysql4/ipay.php +11 -0
- app/code/community/Esellers/Ipay/Model/Observer.php +130 -0
- app/code/community/Esellers/Ipay/Model/PaymentMethod.php +17 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Color.php +42 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Company.php +7 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Escrow.php +60 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Font.php +46 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Layout.php +43 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Paymethod.php +64 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Roundoff.php +62 -0
- app/code/community/Esellers/Ipay/Model/System/Config/Source/Shiptype.php +62 -0
- app/code/community/Esellers/Ipay/controllers/PaymentController.php +54 -0
- app/code/community/Esellers/Ipay/controllers/Sales/Order/ShipmentController.php +365 -0
- app/code/community/Esellers/Ipay/etc/adminhtml.xml +26 -0
- app/code/community/Esellers/Ipay/etc/config.xml +150 -0
- app/code/community/Esellers/Ipay/etc/system.xml +246 -0
- app/code/community/Esellers/Ipay/sql/ipay_setup/mysql4-upgrade-1.0.0-1.1.0.php +41 -0
- app/code/community/Esellers/Naverep/Block/System/Config/Form/Fieldep.php +142 -0
- app/code/community/Esellers/Naverep/Helper/Data.php +6 -0
- app/code/community/Esellers/Naverep/Model/Createep.php +157 -0
- app/code/community/Esellers/Naverep/Model/Createep_.php +153 -0
- app/code/community/Esellers/Naverep/Model/Createep__.php +157 -0
- app/code/community/Esellers/Naverep/Model/System/Config/Source/EPUrl.php +40 -0
- app/code/community/Esellers/Naverep/controllers/EpController.php +17 -0
- app/code/community/Esellers/Naverep/etc/adminhtml.xml +26 -0
- app/code/community/Esellers/Naverep/etc/config.xml +92 -0
- app/code/community/Esellers/Naverep/etc/system.xml +67 -0
- app/code/community/Esellers/Salesgrid/Block/Sales/Order.php +50 -0
- app/code/community/Esellers/Salesgrid/Block/Sales/Order/Grid.php +232 -0
- app/code/community/Esellers/Salesgrid/controllers/Sales/OrderController.php +36 -0
- app/code/community/Esellers/Salesgrid/etc/config.xml +89 -0
- app/code/community/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php +102 -0
- app/code/community/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php +158 -0
- app/code/community/Mage/Adminhtml/Controller/Action.php +387 -0
- app/code/community/Mage/Adminhtml/Controller/Report/Abstract.php +124 -0
- app/code/community/Mage/Adminhtml/Controller/Sales/Creditmemo.php +141 -0
- app/code/community/Mage/Adminhtml/Controller/Sales/Invoice.php +154 -0
- app/code/community/Mage/Adminhtml/Controller/Sales/Shipment.php +119 -0
- app/code/community/Mage/Adminhtml/controllers/Action.php +387 -0
- app/code/community/Mage/Adminhtml/controllers/Block/Sales/Order/Shipment/Create/Tracking.php +102 -0
- app/code/community/Mage/Adminhtml/controllers/Controller/Action.php +387 -0
- app/code/community/Mage/Adminhtml/controllers/Controller/Report/Abstract.php +124 -0
- app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Creditmemo.php +141 -0
- app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Invoice.php +154 -0
- app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Shipment.php +119 -0
- app/code/community/Mage/Adminhtml/controllers/Report/Abstract.php +124 -0
- app/code/community/Mage/Adminhtml/controllers/Sales/Creditmemo.php +141 -0
- app/code/community/Mage/Adminhtml/controllers/Sales/Invoice.php +154 -0
- app/code/community/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php +787 -0
- app/code/community/Mage/Adminhtml/controllers/Sales/Shipment.php +119 -0
- app/code/community/Mage/Directory/Model/Currency.php +312 -0
- app/code/community/Mage/Directory/Model/Currency.php.bak +309 -0
- app/design/adminhtml/default/default/layout/ipay.xml +51 -0
- app/design/adminhtml/default/default/locale/en_US/translate.csv +201 -0
- app/design/adminhtml/default/default/locale/ko_KR/translate.csv +612 -0
- app/design/adminhtml/default/default/template/ipay/form.phtml +129 -0
- app/design/adminhtml/default/default/template/ipay/info.phtml +148 -0
- app/design/adminhtml/default/default/template/ipay/items.phtml +203 -0
- app/design/frontend/base/default/template/ipay/available.phtml +72 -0
- app/design/frontend/base/default/template/ipay/billing.phtml +157 -0
- app/design/frontend/base/default/template/ipay/button.phtml +24 -0
- app/design/frontend/base/default/template/ipay/cart.phtml +242 -0
- app/design/frontend/base/default/template/ipay/cart.phtml_ +0 -0
- app/design/frontend/base/default/template/ipay/cart.phtml_today +407 -0
- app/design/frontend/base/default/template/ipay/footer.phtml +19 -0
- app/design/frontend/base/default/template/ipay/info.phtml +55 -0
- app/design/frontend/base/default/template/ipay/ipay.phtml +19 -0
- app/design/frontend/base/default/template/ipay/ipayInfo.phtml +63 -0
- app/design/frontend/base/default/template/ipay/ipayInfo_.phtml +61 -0
- app/design/frontend/base/default/template/ipay/ipayservice.phtml +11 -0
- app/design/frontend/base/default/template/ipay/item.phtml +262 -0
- app/design/frontend/base/default/template/ipay/links.phtml +30 -0
- app/design/frontend/base/default/template/ipay/methods.phtml +46 -0
- app/design/frontend/base/default/template/ipay/overview.phtml +152 -0
- app/design/frontend/base/default/template/ipay/progress.phtml +55 -0
- app/design/frontend/base/default/template/ipay/success.phtml +65 -0
- app/design/frontend/base/default/template/ipay/totals.phtml +18 -0
- app/design/frontend/default/default/layout/ipay.xml +203 -0
- app/design/frontend/default/default/locale/en_US/translate.csv +1 -0
- app/design/frontend/default/default/locale/ko_KR/translate.csv +218 -0
- app/design/frontend/default/default/template/ipay/billing.phtml +223 -0
- app/design/frontend/default/default/template/ipay/logo.phtml +10 -0
- app/design/frontend/default/default/template/ipay/top.links.phtml +48 -0
- app/etc/modules/Esellers_Ipay.xml +15 -0
- js/esellers/ipay.js +26 -0
- lib/Zend/Locale/Data/ko_KR.xml +9 -0
- lib/class.ipay.php +512 -0
- lib/func.xml.php +135 -0
- lib/ipaySession.php +469 -0
- lib/nusoap.php +6800 -0
- package.xml +18 -0
- skin/frontend/default/default/images/ipay/logo_ipay01.gif +0 -0
- skin/frontend/default/default/images/ipay/logo_ipay02.gif +0 -0
- skin/frontend/default/default/images/ipay/sbtn_ipay.gif +0 -0
app/code/community/Esellers/Aboutep/Block/System/Config/Form/Fieldep.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Form element default renderer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Aboutep_Block_System_Config_Form_Fieldep extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface
|
35 |
+
{
|
36 |
+
protected $_element;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Enter description here...
|
40 |
+
*
|
41 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
45 |
+
{
|
46 |
+
$id = $element->getHtmlId();
|
47 |
+
|
48 |
+
$html = '<td class="label"><label for="'.$id.'">'.$element->getLabel().'</label></td>';
|
49 |
+
|
50 |
+
//$isDefault = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
|
51 |
+
$isMultiple = $element->getExtType()==='multiple';
|
52 |
+
|
53 |
+
// replace [value] with [inherit]
|
54 |
+
$namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName());
|
55 |
+
|
56 |
+
$options = $element->getValues();
|
57 |
+
|
58 |
+
$addInheritCheckbox = false;
|
59 |
+
if ($element->getCanUseWebsiteValue()) {
|
60 |
+
$addInheritCheckbox = true;
|
61 |
+
$checkboxLabel = Mage::helper('adminhtml')->__('Use Website');
|
62 |
+
}
|
63 |
+
elseif ($element->getCanUseDefaultValue()) {
|
64 |
+
$addInheritCheckbox = true;
|
65 |
+
$checkboxLabel = Mage::helper('adminhtml')->__('Use Default');
|
66 |
+
}
|
67 |
+
|
68 |
+
if ($addInheritCheckbox) {
|
69 |
+
$inherit = $element->getInherit()==1 ? 'checked="checked"' : '';
|
70 |
+
if ($inherit) {
|
71 |
+
$element->setDisabled(true);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
if ($element->getTooltip()) {
|
76 |
+
$html .= '<td class="value with-tooltip">';
|
77 |
+
$html .= $this->_getElementHtml($element);
|
78 |
+
$html .= '<div class="field-tooltip"><div>' . $element->getTooltip() . '</div></div>';
|
79 |
+
} else {
|
80 |
+
$html .= '<td class="value">';
|
81 |
+
$html .= $this->_getElementHtml($element);
|
82 |
+
};
|
83 |
+
if ($element->getComment()) {
|
84 |
+
$html.= '<p class="note"><span>'.$element->getComment().'</span></p>';
|
85 |
+
}
|
86 |
+
$html.= '</td>';
|
87 |
+
|
88 |
+
if ($addInheritCheckbox) {
|
89 |
+
|
90 |
+
$defText = $element->getDefaultValue();
|
91 |
+
if ($options) {
|
92 |
+
$defTextArr = array();
|
93 |
+
foreach ($options as $k=>$v) {
|
94 |
+
if ($isMultiple) {
|
95 |
+
if (is_array($v['value']) && in_array($k, $v['value'])) {
|
96 |
+
$defTextArr[] = $v['label'];
|
97 |
+
}
|
98 |
+
} elseif ($v['value']==$defText) {
|
99 |
+
$defTextArr[] = $v['label'];
|
100 |
+
break;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
$defText = join(', ', $defTextArr);
|
104 |
+
}
|
105 |
+
|
106 |
+
// default value
|
107 |
+
$html.= '<td class="use-default">';
|
108 |
+
//$html.= '<input id="'.$id.'_inherit" name="'.$namePrefix.'[inherit]" type="checkbox" value="1" class="input-checkbox config-inherit" '.$inherit.' onclick="$(\''.$id.'\').disabled = this.checked">';
|
109 |
+
$html.= '<input id="'.$id.'_inherit" name="'.$namePrefix.'[inherit]" type="checkbox" value="1" class="checkbox config-inherit" '.$inherit.' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
|
110 |
+
$html.= '<label for="'.$id.'_inherit" class="inherit" title="'.htmlspecialchars($defText).'">'.$checkboxLabel.'</label>';
|
111 |
+
$html.= '</td>';
|
112 |
+
}
|
113 |
+
|
114 |
+
$html.= '<td class="scope-label">';
|
115 |
+
if ($element->getScope()) {
|
116 |
+
$html .= $element->getScopeLabel();
|
117 |
+
}
|
118 |
+
$html.= '</td>';
|
119 |
+
|
120 |
+
$html.= '<td class="">';
|
121 |
+
if ($element->getHint()) {
|
122 |
+
$html.= '<div class="hint" >';
|
123 |
+
$html.= '<div style="display: none;">' . $element->getHint() . '</div>';
|
124 |
+
$html.= '</div>';
|
125 |
+
}
|
126 |
+
$html.= '</td>';
|
127 |
+
|
128 |
+
return $this->_decorateRowHtml($element, $html);
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Decorate field row html
|
133 |
+
*
|
134 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
135 |
+
* @param string $html
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
protected function _decorateRowHtml($element, $html)
|
139 |
+
{
|
140 |
+
return '<tr id="row_' . $element->getHtmlId() . '">' . $html . '</tr>';
|
141 |
+
}
|
142 |
+
}
|
app/code/community/Esellers/Aboutep/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Esellers_Aboutep_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Esellers/Aboutep/Model/Createep.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Aboutep_Model_Createep extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
var $fp;
|
5 |
+
|
6 |
+
public function makeEp() {
|
7 |
+
$productIds=$this->getProductIds(1);
|
8 |
+
$data = "";
|
9 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds);
|
10 |
+
|
11 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
12 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
13 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
14 |
+
|
15 |
+
|
16 |
+
Mage::log("start");
|
17 |
+
foreach ($collection as $product){
|
18 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
19 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
20 |
+
$pgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).$product->getUrlPath();
|
21 |
+
$data .= $product->getSku()."<!>";
|
22 |
+
$data .= "C<!>";
|
23 |
+
$data .= $product->getName()."<!>";
|
24 |
+
$data .= $price."<!>";
|
25 |
+
$data .= $imgurl."<!>";
|
26 |
+
$data .= $pgurl."<!>";
|
27 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
28 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
29 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel())."<!>";
|
30 |
+
}
|
31 |
+
|
32 |
+
$data .= $product->getModel()."<!>";
|
33 |
+
$data .= $product->getBrand()."<!>";
|
34 |
+
$data .= $product->getAttributeText('manufacturer')."<!>";
|
35 |
+
$data .= $product->getAttributeText('country_of_manufacture')."<!>";
|
36 |
+
$data .= $product->getCreateDt()."<!>";
|
37 |
+
$data .= $shipfee."<!>";
|
38 |
+
$data .= "<!>"; //이벤트
|
39 |
+
$data .= "<!>"; //쿠폰금액
|
40 |
+
$data .= "<!>"; //무이자
|
41 |
+
$data .= "<!>"; //적립금
|
42 |
+
$data .= "<!>"; //이미지 변경여부
|
43 |
+
$data .= "<!>"; //물품특성정보
|
44 |
+
$data .= "<!>"; //상점내 매출비율
|
45 |
+
$data .= "<!>"; //특별할인카드명
|
46 |
+
$data .= "<!>"; //특별할인 할인 금액
|
47 |
+
$data .= "<!>"; //상품정보 변경시간
|
48 |
+
|
49 |
+
$data .= "\n";
|
50 |
+
}
|
51 |
+
Mage::log("end");
|
52 |
+
|
53 |
+
header("Cache-Control: no-cache, must-revalidate");
|
54 |
+
header("Content-Type: text/plain; charset=euc-kr");
|
55 |
+
echo $data;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getCategoryData($category_id,$data,$cate){
|
59 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
60 |
+
$level = $category->getLevel();
|
61 |
+
$cate=$category_id.$cate;
|
62 |
+
if($level>2){
|
63 |
+
if($data=="")
|
64 |
+
$data=$category_id.$data."<!>";
|
65 |
+
else
|
66 |
+
$data=$cate."<i>".$category_id.$data;
|
67 |
+
return $this->getCategoryData($category->getParentId(),$data,$cate);
|
68 |
+
}else{
|
69 |
+
$data=$category_id."<!>".$data;
|
70 |
+
return $data;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
public function makeSummaryep() {
|
75 |
+
$data = "<<<begin>>>\n";
|
76 |
+
$productIds=$this->getProductIds(1);
|
77 |
+
$nowtime=date("Y-m-d", time()-86400)." 08:00:00";
|
78 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addFieldToFilter("updated_at",array("gt"=>"$nowtime"))->addIdFilter($productIds);
|
79 |
+
|
80 |
+
$data .= $this->makeTxt("in",$collection);
|
81 |
+
|
82 |
+
|
83 |
+
$productIds_out=$this->getProductIds(0);
|
84 |
+
|
85 |
+
$collection_out = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds_out);
|
86 |
+
$data .= $this->makeTxt("out",$collection_out);
|
87 |
+
|
88 |
+
|
89 |
+
$data .= "<<<ftend>>>\n";
|
90 |
+
|
91 |
+
|
92 |
+
echo $data;
|
93 |
+
}
|
94 |
+
|
95 |
+
public function getProductIds($status){
|
96 |
+
$stockCollection = Mage::getModel('cataloginventory/stock_item')->getCollection()->addFieldToFilter('is_in_stock',$status);
|
97 |
+
$productIds = array();
|
98 |
+
|
99 |
+
foreach ($stockCollection as $item){
|
100 |
+
$productIds[] = $item->getOrigData('product_id');
|
101 |
+
}
|
102 |
+
return $productIds;
|
103 |
+
}
|
104 |
+
|
105 |
+
public function makeTxt($mode,$collection){
|
106 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
107 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
108 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
109 |
+
$data="";
|
110 |
+
|
111 |
+
foreach ($collection as $product){
|
112 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
113 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
114 |
+
|
115 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
116 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
117 |
+
$data .= "<<<price>>>".$price."\n";
|
118 |
+
$data .= "<<<pgurl>>>".$product->getProductUrl()."\n";
|
119 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
120 |
+
|
121 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
122 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
123 |
+
$data.= $this->getCategoryData($category_id,"","");
|
124 |
+
}
|
125 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
126 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
127 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
128 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
129 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
130 |
+
|
131 |
+
$data .=" <<<utime>>>".$product->getUpdatedAt()."\n";
|
132 |
+
|
133 |
+
if($mode=="in"){
|
134 |
+
$data .=" <<<class>>U\n";
|
135 |
+
}else if($mode=="out"){
|
136 |
+
$data .=" <<<class>>D\n";
|
137 |
+
}
|
138 |
+
|
139 |
+
$data .= "<<<event>>>\n";
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
return $data;
|
145 |
+
|
146 |
+
}
|
147 |
+
|
148 |
+
public function getAllShippingPrice()
|
149 |
+
{
|
150 |
+
$store=Mage::app()->getStore()->getId();
|
151 |
+
$carriers = Mage::getStoreConfig('carriers', $store);
|
152 |
+
foreach ($carriers as $carrierCode => $carrierConfig) {
|
153 |
+
if (Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/active', $store)) {
|
154 |
+
if($carrierCode=="flatrate"){
|
155 |
+
return $carrierConfig["price"];
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
return 0;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
?>
|
app/code/community/Esellers/Aboutep/controllers/EpController.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Aboutep_EpController extends Mage_Core_Controller_Front_Action {
|
3 |
+
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$model=Mage::getModel("aboutep/createep");
|
7 |
+
$model->makeEp();
|
8 |
+
//$this->loadLayout();
|
9 |
+
//$this->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
public function summaryAction()
|
13 |
+
{
|
14 |
+
$model=Mage::getModel("aboutep/createep");
|
15 |
+
$model->makeSummaryep();
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Esellers/Aboutep/etc/adminhtml.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<acl>
|
5 |
+
<resources>
|
6 |
+
<all>
|
7 |
+
<title>Esellers About EP</title>
|
8 |
+
</all>
|
9 |
+
<admin>
|
10 |
+
<children>
|
11 |
+
<system>
|
12 |
+
<children>
|
13 |
+
<config>
|
14 |
+
<children>
|
15 |
+
<aboutep translate="label">
|
16 |
+
<title>About Ep</title>
|
17 |
+
</aboutep>
|
18 |
+
</children>
|
19 |
+
</config>
|
20 |
+
</children>
|
21 |
+
</system>
|
22 |
+
</children>
|
23 |
+
</admin>
|
24 |
+
</resources>
|
25 |
+
</acl>
|
26 |
+
</config>
|
app/code/community/Esellers/Aboutep/etc/config.xml
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Esellers_Aboutep>
|
6 |
+
<version>1.1.0</version>
|
7 |
+
</Esellers_Aboutep>
|
8 |
+
</modules>
|
9 |
+
<frontend>
|
10 |
+
<routers>
|
11 |
+
<aboutep>
|
12 |
+
<use>standard</use>
|
13 |
+
<args>
|
14 |
+
<module>Esellers_Aboutep</module>
|
15 |
+
<frontName>aboutep</frontName>
|
16 |
+
</args>
|
17 |
+
</aboutep>
|
18 |
+
</routers>
|
19 |
+
<default>
|
20 |
+
<router>aboutep</router>
|
21 |
+
</default>
|
22 |
+
<layout>
|
23 |
+
<updates>
|
24 |
+
<aboutep>
|
25 |
+
<file>aboutep.xml</file>
|
26 |
+
</aboutep>
|
27 |
+
</updates>
|
28 |
+
</layout>
|
29 |
+
</frontend>
|
30 |
+
<adminhtml>
|
31 |
+
<layout>
|
32 |
+
<updates>
|
33 |
+
<aboutep>
|
34 |
+
<file>aboutep.xml</file>
|
35 |
+
</aboutep>
|
36 |
+
</updates>
|
37 |
+
</layout>
|
38 |
+
</adminhtml>
|
39 |
+
<global>
|
40 |
+
<models>
|
41 |
+
<aboutep>
|
42 |
+
<class>Esellers_Aboutep_Model</class>
|
43 |
+
<resourceModel>aboutep_mysql4</resourceModel>
|
44 |
+
</aboutep>
|
45 |
+
<createep>
|
46 |
+
<rewrite>
|
47 |
+
<po>Esellers_Aboutep_Model_Createep</po>
|
48 |
+
<!-- statement>Unirgy_DropshipPo_Model_Statement</statement -->
|
49 |
+
</rewrite>
|
50 |
+
</createep>
|
51 |
+
|
52 |
+
</models>
|
53 |
+
<resources>
|
54 |
+
<aboutep_setup>
|
55 |
+
<setup>
|
56 |
+
<module>Esellers_Aboutep</module>
|
57 |
+
</setup>
|
58 |
+
<connection>
|
59 |
+
<use>core_setup</use>
|
60 |
+
</connection>
|
61 |
+
</aboutep_setup>
|
62 |
+
<aboutep_write>
|
63 |
+
<connection>
|
64 |
+
<use>core_write</use>
|
65 |
+
</connection>
|
66 |
+
</aboutep_write>
|
67 |
+
<aboutep_read>
|
68 |
+
<connection>
|
69 |
+
<use>core_read</use>
|
70 |
+
</connection>
|
71 |
+
</aboutep_read>
|
72 |
+
</resources>
|
73 |
+
<blocks>
|
74 |
+
<aboutep>
|
75 |
+
<class>Esellers_Aboutep_Block</class>
|
76 |
+
</aboutep>
|
77 |
+
</blocks>
|
78 |
+
<helpers>
|
79 |
+
<aboutep>
|
80 |
+
<class>Esellers_Aboutep_Helper</class>
|
81 |
+
</aboutep>
|
82 |
+
</helpers>
|
83 |
+
</global>
|
84 |
+
<default>
|
85 |
+
<aboutep>
|
86 |
+
<ENABLED>1</ENABLED>
|
87 |
+
<DBEngine>
|
88 |
+
<fullepurl>{{base_url}}/ep.txt</fullepurl>
|
89 |
+
<shortepurl>{{base_url}}/ep_summary.txt</shortepurl>
|
90 |
+
</DBEngine>
|
91 |
+
</aboutep>
|
92 |
+
</default>
|
93 |
+
|
94 |
+
|
95 |
+
</config>
|
app/code/community/Esellers/Aboutep/etc/system.xml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<esellers translate="label" module="aboutep">
|
5 |
+
<label>Product DB EP</label>
|
6 |
+
<sort_order>200</sort_order>
|
7 |
+
</esellers>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<aboutep translate="label">
|
11 |
+
<label>eBay korea about</label>
|
12 |
+
<tab>esellers</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<!-- New groups go here -->
|
20 |
+
<DBEngine translate="label">
|
21 |
+
<label>Product DB Enging Page Information</label>
|
22 |
+
<frontend_type>text</frontend_type>
|
23 |
+
<sort_order>100</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<fields>
|
28 |
+
<active translate="label">
|
29 |
+
<label>EP USE</label>
|
30 |
+
<frontend_type>select</frontend_type>
|
31 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
32 |
+
<sort_order>1</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>0</show_in_store>
|
36 |
+
</active>
|
37 |
+
|
38 |
+
<fullepurl translate="label">
|
39 |
+
<label>Full EP URL</label>
|
40 |
+
<frontend_type>linkep</frontend_type>
|
41 |
+
<sort_order>1</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>0</show_in_store>
|
45 |
+
</fullepurl>
|
46 |
+
<shortepurl translate="label">
|
47 |
+
<label>Short EP URL</label>
|
48 |
+
<frontend_type>linksummaryep</frontend_type>
|
49 |
+
<sort_order>2</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>0</show_in_store>
|
53 |
+
</shortepurl>
|
54 |
+
<eplabel>
|
55 |
+
<frontend_type>labelAboutep</frontend_type>
|
56 |
+
<sort_order>3</sort_order>
|
57 |
+
<show_in_default>1</show_in_default>
|
58 |
+
<show_in_website>1</show_in_website>
|
59 |
+
<show_in_store>0</show_in_store>
|
60 |
+
</eplabel>
|
61 |
+
</fields>
|
62 |
+
</DBEngine>
|
63 |
+
</groups>
|
64 |
+
</aboutep>
|
65 |
+
</sections>
|
66 |
+
|
67 |
+
</config>
|
app/code/community/Esellers/Ipay/Block/Cart/Onepage.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Checkout
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Onepage checkout block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Checkout
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Ipay_Block_Onepage extends Mage_Checkout_Block_Onepage
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Get 'one step checkout' step data
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function getSteps()
|
42 |
+
{
|
43 |
+
$steps = array();
|
44 |
+
$stepCodes = $this->_getStepCodes();
|
45 |
+
|
46 |
+
if ($this->isCustomerLoggedIn()) {
|
47 |
+
$stepCodes = array_diff($stepCodes, array('login'));
|
48 |
+
}
|
49 |
+
|
50 |
+
foreach ($stepCodes as $step) {
|
51 |
+
$steps[$step] = $this->getCheckout()->getStepData($step);
|
52 |
+
}
|
53 |
+
|
54 |
+
return $steps;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get active step
|
59 |
+
*
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function getActiveStep()
|
63 |
+
{
|
64 |
+
return $this->isCustomerLoggedIn() ? 'billing' : 'login';
|
65 |
+
}
|
66 |
+
}
|
app/code/community/Esellers/Ipay/Block/Logo.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Esellers_Ipay_Block_Logo extends Mage_Core_Block_Template {
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Disable block output if logo turned off
|
10 |
+
*
|
11 |
+
* @return string
|
12 |
+
*/
|
13 |
+
protected function _toHtml()
|
14 |
+
{
|
15 |
+
return parent::_toHtml();
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Esellers/Ipay/Block/Onepage/Review/Info.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Checkout
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* One page checkout order review
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Checkout
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Ipay_Block_Onepage_Review_Info extends Mage_Sales_Block_Items_Abstract
|
35 |
+
{
|
36 |
+
public function getItems()
|
37 |
+
{
|
38 |
+
return Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
|
39 |
+
}
|
40 |
+
|
41 |
+
public function getTotals()
|
42 |
+
{
|
43 |
+
return Mage::getSingleton('checkout/session')->getQuote()->getTotals();
|
44 |
+
}
|
45 |
+
}
|
app/code/community/Esellers/Ipay/Block/Sales/Order/View.php
ADDED
@@ -0,0 +1,323 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales order view
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Ipay_Block_Sales_Order_View extends Mage_Adminhtml_Block_Sales_Order_View
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
$this->_objectId = 'order_id';
|
40 |
+
$this->_controller = 'sales_order';
|
41 |
+
$this->_mode = 'view';
|
42 |
+
|
43 |
+
parent::__construct();
|
44 |
+
|
45 |
+
$this->_removeButton('delete');
|
46 |
+
$this->_removeButton('reset');
|
47 |
+
$this->_removeButton('save');
|
48 |
+
$this->setId('sales_order_view');
|
49 |
+
$order = $this->getOrder();
|
50 |
+
|
51 |
+
if ($this->_isAllowedAction('edit') && $order->canEdit()) {
|
52 |
+
$onclickJs = 'deleteConfirm(\''
|
53 |
+
. Mage::helper('sales')->__('Are you sure? This order will be canceled and a new one will be created instead')
|
54 |
+
. '\', \'' . $this->getEditUrl() . '\');';
|
55 |
+
$this->_addButton('order_edit', array(
|
56 |
+
'label' => Mage::helper('sales')->__('Edit'),
|
57 |
+
'onclick' => $onclickJs,
|
58 |
+
));
|
59 |
+
// see if order has non-editable products as items
|
60 |
+
$nonEditableTypes = array_keys($this->getOrder()->getResource()->aggregateProductsByTypes(
|
61 |
+
$order->getId(),
|
62 |
+
array_keys(Mage::getConfig()
|
63 |
+
->getNode('adminhtml/sales/order/create/available_product_types')
|
64 |
+
->asArray()
|
65 |
+
),
|
66 |
+
false
|
67 |
+
));
|
68 |
+
if ($nonEditableTypes) {
|
69 |
+
$this->_updateButton('order_edit', 'onclick',
|
70 |
+
'if (!confirm(\'' .
|
71 |
+
Mage::helper('sales')->__('This order contains (%s) items and therefore cannot be edited through the admin interface at this time, if you wish to continue editing the (%s) items will be removed, the order will be canceled and a new order will be placed.', implode(', ', $nonEditableTypes), implode(', ', $nonEditableTypes)) . '\')) return false;' . $onclickJs
|
72 |
+
);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
if ($this->_isAllowedAction('cancel') && $order->canCancel()) {
|
77 |
+
$message = Mage::helper('sales')->__('Are you sure you want to cancel this order?');
|
78 |
+
$this->_addButton('order_cancel', array(
|
79 |
+
'label' => Mage::helper('sales')->__('Cancel'),
|
80 |
+
'onclick' => 'deleteConfirm(\''.$message.'\', \'' . $this->getCancelUrl() . '\')',
|
81 |
+
));
|
82 |
+
}
|
83 |
+
|
84 |
+
if ($this->_isAllowedAction('emails') && !$order->isCanceled()) {
|
85 |
+
$message = Mage::helper('sales')->__('Are you sure you want to send order email to customer?');
|
86 |
+
$this->addButton('send_notification', array(
|
87 |
+
'label' => Mage::helper('sales')->__('Send Email'),
|
88 |
+
'onclick' => "confirmSetLocation('{$message}', '{$this->getEmailUrl()}')",
|
89 |
+
));
|
90 |
+
}
|
91 |
+
|
92 |
+
if ($this->_isAllowedAction('creditmemo') && $order->canCreditmemo()) {
|
93 |
+
$message = Mage::helper('sales')->__('This will create an offline refund. To create an online refund, open an invoice and create credit memo for it. Do you wish to proceed?');
|
94 |
+
$onClick = "setLocation('{$this->getCreditmemoUrl()}')";
|
95 |
+
if ($order->getPayment()->getMethodInstance()->isGateway()) {
|
96 |
+
$onClick = "confirmSetLocation('{$message}', '{$this->getCreditmemoUrl()}')";
|
97 |
+
}
|
98 |
+
$this->_addButton('order_creditmemo', array(
|
99 |
+
'label' => Mage::helper('sales')->__('Credit Memo'),
|
100 |
+
'onclick' => $onClick,
|
101 |
+
'class' => 'go'
|
102 |
+
));
|
103 |
+
}
|
104 |
+
|
105 |
+
// invoice action intentionally
|
106 |
+
if ($this->_isAllowedAction('invoice') && $order->canVoidPayment()) {
|
107 |
+
$message = Mage::helper('sales')->__('Are you sure you want to void the payment?');
|
108 |
+
$this->addButton('void_payment', array(
|
109 |
+
'label' => Mage::helper('sales')->__('Void'),
|
110 |
+
'onclick' => "confirmSetLocation('{$message}', '{$this->getVoidPaymentUrl()}')",
|
111 |
+
));
|
112 |
+
}
|
113 |
+
|
114 |
+
if ($this->_isAllowedAction('hold') && $order->canHold()) {
|
115 |
+
$this->_addButton('order_hold', array(
|
116 |
+
'label' => Mage::helper('sales')->__('Hold'),
|
117 |
+
'onclick' => 'setLocation(\'' . $this->getHoldUrl() . '\')',
|
118 |
+
));
|
119 |
+
}
|
120 |
+
|
121 |
+
if ($this->_isAllowedAction('unhold') && $order->canUnhold()) {
|
122 |
+
$this->_addButton('order_unhold', array(
|
123 |
+
'label' => Mage::helper('sales')->__('Unhold'),
|
124 |
+
'onclick' => 'setLocation(\'' . $this->getUnholdUrl() . '\')',
|
125 |
+
));
|
126 |
+
}
|
127 |
+
|
128 |
+
if ($this->_isAllowedAction('review_payment')) {
|
129 |
+
if ($order->canReviewPayment()) {
|
130 |
+
$message = Mage::helper('sales')->__('Are you sure you want to accept this payment?');
|
131 |
+
$this->_addButton('accept_payment', array(
|
132 |
+
'label' => Mage::helper('sales')->__('Accept Payment'),
|
133 |
+
'onclick' => "confirmSetLocation('{$message}', '{$this->getReviewPaymentUrl('accept')}')",
|
134 |
+
));
|
135 |
+
$message = Mage::helper('sales')->__('Are you sure you want to deny this payment?');
|
136 |
+
$this->_addButton('deny_payment', array(
|
137 |
+
'label' => Mage::helper('sales')->__('Deny Payment'),
|
138 |
+
'onclick' => "confirmSetLocation('{$message}', '{$this->getReviewPaymentUrl('deny')}')",
|
139 |
+
));
|
140 |
+
}
|
141 |
+
if ($order->canFetchPaymentReviewUpdate()) {
|
142 |
+
$this->_addButton('get_review_payment_update', array(
|
143 |
+
'label' => Mage::helper('sales')->__('Get Payment Update'),
|
144 |
+
'onclick' => 'setLocation(\'' . $this->getReviewPaymentUrl('update') . '\')',
|
145 |
+
));
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
if ($this->_isAllowedAction('invoice') && $order->canInvoice()) {
|
150 |
+
$_label = $order->getForcedDoShipmentWithInvoice() ?
|
151 |
+
Mage::helper('sales')->__('Invoice and Ship') :
|
152 |
+
Mage::helper('sales')->__('Invoice');
|
153 |
+
$this->_addButton('order_invoice', array(
|
154 |
+
'label' => $_label,
|
155 |
+
'onclick' => 'setLocation(\'' . $this->getInvoiceUrl() . '\')',
|
156 |
+
'class' => 'go'
|
157 |
+
));
|
158 |
+
}
|
159 |
+
|
160 |
+
if ($this->_isAllowedAction('ship') && $order->canShip()
|
161 |
+
&& !$order->getForcedDoShipmentWithInvoice()) {
|
162 |
+
$this->_addButton('order_ship', array(
|
163 |
+
'label' => Mage::helper('sales')->__('Ship'),
|
164 |
+
'onclick' => 'setLocation(\'' . $this->getShipUrl() . '\')',
|
165 |
+
'class' => 'go'
|
166 |
+
));
|
167 |
+
}
|
168 |
+
|
169 |
+
if ($this->_isAllowedAction('reorder')
|
170 |
+
&& $this->helper('sales/reorder')->isAllowed($order->getStore())
|
171 |
+
&& $order->canReorderIgnoreSalable()
|
172 |
+
) {
|
173 |
+
$this->_addButton('order_reorder', array(
|
174 |
+
'label' => Mage::helper('sales')->__('Reorder'),
|
175 |
+
'onclick' => 'setLocation(\'' . $this->getReorderUrl() . '\')',
|
176 |
+
'class' => 'go'
|
177 |
+
));
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Retrieve order model object
|
183 |
+
*
|
184 |
+
* @return Mage_Sales_Model_Order
|
185 |
+
*/
|
186 |
+
public function getOrder()
|
187 |
+
{
|
188 |
+
return Mage::registry('sales_order');
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Retrieve Order Identifier
|
193 |
+
*
|
194 |
+
* @return int
|
195 |
+
*/
|
196 |
+
public function getOrderId()
|
197 |
+
{
|
198 |
+
return $this->getOrder()->getId();
|
199 |
+
}
|
200 |
+
|
201 |
+
public function getHeaderText()
|
202 |
+
{
|
203 |
+
if ($_extOrderId = $this->getOrder()->getExtOrderId()) {
|
204 |
+
$_extOrderId = '[' . $_extOrderId . '] ';
|
205 |
+
} else {
|
206 |
+
$_extOrderId = '';
|
207 |
+
}
|
208 |
+
return Mage::helper('sales')->__('Order # %s %s | %s', $this->getOrder()->getRealOrderId(), $_extOrderId, $this->formatDate($this->getOrder()->getCreatedAtDate(), 'medium', true));
|
209 |
+
}
|
210 |
+
|
211 |
+
public function getUrl($params='', $params2=array())
|
212 |
+
{
|
213 |
+
$params2['order_id'] = $this->getOrderId();
|
214 |
+
return parent::getUrl($params, $params2);
|
215 |
+
}
|
216 |
+
|
217 |
+
public function getEditUrl()
|
218 |
+
{
|
219 |
+
return $this->getUrl('*/sales_order_edit/start');
|
220 |
+
}
|
221 |
+
|
222 |
+
public function getEmailUrl()
|
223 |
+
{
|
224 |
+
return $this->getUrl('*/*/email');
|
225 |
+
}
|
226 |
+
|
227 |
+
public function getCancelUrl()
|
228 |
+
{
|
229 |
+
return $this->getUrl('*/*/cancel');
|
230 |
+
}
|
231 |
+
|
232 |
+
public function getInvoiceUrl()
|
233 |
+
{
|
234 |
+
return $this->getUrl('*/sales_order_invoice/start');
|
235 |
+
}
|
236 |
+
|
237 |
+
public function getCreditmemoUrl()
|
238 |
+
{
|
239 |
+
return $this->getUrl('*/sales_order_creditmemo/start');
|
240 |
+
}
|
241 |
+
|
242 |
+
public function getHoldUrl()
|
243 |
+
{
|
244 |
+
return $this->getUrl('*/*/hold');
|
245 |
+
}
|
246 |
+
|
247 |
+
public function getUnholdUrl()
|
248 |
+
{
|
249 |
+
return $this->getUrl('*/*/unhold');
|
250 |
+
}
|
251 |
+
|
252 |
+
public function getShipUrl()
|
253 |
+
{
|
254 |
+
return $this->getUrl('*/sales_order_shipment/start');
|
255 |
+
}
|
256 |
+
|
257 |
+
public function getCommentUrl()
|
258 |
+
{
|
259 |
+
return $this->getUrl('*/*/comment');
|
260 |
+
}
|
261 |
+
|
262 |
+
public function getReorderUrl()
|
263 |
+
{
|
264 |
+
return $this->getUrl('*/sales_order_create/reorder');
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Payment void URL getter
|
269 |
+
*/
|
270 |
+
public function getVoidPaymentUrl()
|
271 |
+
{
|
272 |
+
return $this->getUrl('*/*/voidPayment');
|
273 |
+
}
|
274 |
+
|
275 |
+
protected function _isAllowedAction($action)
|
276 |
+
{
|
277 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/' . $action);
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Return back url for view grid
|
282 |
+
*
|
283 |
+
* @return string
|
284 |
+
*/
|
285 |
+
public function getBackUrl()
|
286 |
+
{
|
287 |
+
if ($this->getOrder()->getBackUrl()) {
|
288 |
+
return $this->getOrder()->getBackUrl();
|
289 |
+
}
|
290 |
+
|
291 |
+
return $this->getUrl('*/*/');
|
292 |
+
}
|
293 |
+
|
294 |
+
public function getReviewPaymentUrl($action)
|
295 |
+
{
|
296 |
+
return $this->getUrl('*/*/reviewPayment', array('action' => $action));
|
297 |
+
}
|
298 |
+
//
|
299 |
+
// /**
|
300 |
+
// * Return URL for accept payment action
|
301 |
+
// *
|
302 |
+
// * @return string
|
303 |
+
// */
|
304 |
+
// public function getAcceptPaymentUrl()
|
305 |
+
// {
|
306 |
+
// return $this->getUrl('*/*/reviewPayment', array('action' => 'accept'));
|
307 |
+
// }
|
308 |
+
//
|
309 |
+
// /**
|
310 |
+
// * Return URL for deny payment action
|
311 |
+
// *
|
312 |
+
// * @return string
|
313 |
+
// */
|
314 |
+
// public function getDenyPaymentUrl()
|
315 |
+
// {
|
316 |
+
// return $this->getUrl('*/*/reviewPayment', array('action' => 'deny'));
|
317 |
+
// }
|
318 |
+
//
|
319 |
+
// public function getPaymentReviewUpdateUrl()
|
320 |
+
// {
|
321 |
+
// return $this->getUrl('*/*/reviewPaymentUpdate');
|
322 |
+
// }
|
323 |
+
}
|
app/code/community/Esellers/Ipay/Helper/Active.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Esellers_Ipay_Helper_Active extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
public function getAppId() {
|
6 |
+
return Mage::getStoreConfig('ipay/settings/appid');
|
7 |
+
}
|
8 |
+
|
9 |
+
public function getSecretKey() {
|
10 |
+
return Mage::getStoreConfig('ipay/settings/secret');
|
11 |
+
}
|
12 |
+
|
13 |
+
public function isActiveActivity()
|
14 |
+
{
|
15 |
+
return Mage::getStoreConfig('ipay/activity/enabled');
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Esellers/Ipay/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Esellers_Ipay_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Esellers/Ipay/Model/Carrier/ShippingMethod.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Our test shipping method module adapter
|
5 |
+
*/
|
6 |
+
class Esellers_Ipay_Model_Carrier_ShippingMethod extends Mage_Shipping_Model_Carrier_Abstract
|
7 |
+
{
|
8 |
+
/**
|
9 |
+
* unique internal shipping method identifier
|
10 |
+
*
|
11 |
+
* @var string [a-z0-9_]
|
12 |
+
*/
|
13 |
+
protected $_code = 'ipay';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Collect rates for this shipping method based on information in $request
|
17 |
+
*
|
18 |
+
* @param Mage_Shipping_Model_Rate_Request $data
|
19 |
+
* @return Mage_Shipping_Model_Rate_Result
|
20 |
+
*/
|
21 |
+
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
22 |
+
{
|
23 |
+
// skip if not enabled
|
24 |
+
if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
|
28 |
+
/**
|
29 |
+
* here we are retrieving shipping rates from external service
|
30 |
+
* or using internal logic to calculate the rate from $request
|
31 |
+
* you can see an example in Mage_Usa_Model_Shipping_Carrier_Ups::setRequest()
|
32 |
+
*/
|
33 |
+
|
34 |
+
// get necessary configuration values
|
35 |
+
$handling = Mage::getStoreConfig('carriers/'.$this->_code.'/handling_fee');
|
36 |
+
|
37 |
+
// this object will be returned as result of this method
|
38 |
+
// containing all the shipping rates of this method
|
39 |
+
$result = Mage::getModel('shipping/rate_result');
|
40 |
+
$rate = Mage::getModel('shipping/rate_result_method');
|
41 |
+
|
42 |
+
$rate->setCarrier($this->_code);
|
43 |
+
$rate->setCarrierTitle($this->getConfigdata('title'));
|
44 |
+
$rate->setMethod('ipay');
|
45 |
+
$rate->setMethodTitle('Cash on Delivery');
|
46 |
+
$rate->setCost(2500);
|
47 |
+
$rate->setPrice($handling); //You should calculate this or obtain in a service
|
48 |
+
|
49 |
+
$result->append($rate);
|
50 |
+
|
51 |
+
return $result;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* This method is used when viewing / listing Shipping Methods with Codes programmatically
|
56 |
+
*/
|
57 |
+
public function getAllowedMethods() {
|
58 |
+
return array($this->_code => $this->getConfigData('name'));
|
59 |
+
}
|
60 |
+
}
|
61 |
+
?>
|
app/code/community/Esellers/Ipay/Model/Ipay.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Esellers_Ipay_Model_Ipay extends Mage_Core_Model_Abstract {
|
4 |
+
|
5 |
+
var $orderno;
|
6 |
+
var $ipaycartno;
|
7 |
+
var $insdate;
|
8 |
+
var $paydate;
|
9 |
+
var $payprice;
|
10 |
+
var $paymenttype;
|
11 |
+
var $serviceurl;
|
12 |
+
var $redirecturl;
|
13 |
+
var $emoney;
|
14 |
+
var $itemnos;
|
15 |
+
var $cardname;
|
16 |
+
var $nointerestyn;
|
17 |
+
var $cardmonth;
|
18 |
+
var $cardnumb;
|
19 |
+
var $payno;
|
20 |
+
var $auctionorderno;
|
21 |
+
var $apprnumb;
|
22 |
+
var $cardcode;
|
23 |
+
|
24 |
+
public function _construct()
|
25 |
+
{
|
26 |
+
parent::_construct();
|
27 |
+
$this->_init('ipay/ipay');
|
28 |
+
}
|
29 |
+
|
30 |
+
function ipay(){
|
31 |
+
include dirname(__FILE__)."/conf.php";
|
32 |
+
$this->cfg = $cfg[ipay];
|
33 |
+
}
|
34 |
+
|
35 |
+
function reset(){
|
36 |
+
unset($this->orderno); unset($this->payno); unset($this->cartno); unset($this->itemno); unset($this->sdate);
|
37 |
+
unset($this->edate); unset($this->data); unset($this->error); unset($this->errormsg);
|
38 |
+
unset($this->request); unset($this->response);
|
39 |
+
}
|
40 |
+
|
41 |
+
function setAuctionOrderNo($auctionorderno){
|
42 |
+
$this->auctionorderno=$auctionorderno;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
?>
|
app/code/community/Esellers/Ipay/Model/Mysql4/Setup.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Esellers_Ipay_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
|
5 |
+
{
|
6 |
+
}
|
app/code/community/Esellers/Ipay/Model/Mysql4/ipay.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class Esellers_Ipay_Model_Mysql4_Ipay extends Mage_Core_Model_Mysql4_Abstract
|
5 |
+
{
|
6 |
+
public function _construct()
|
7 |
+
{
|
8 |
+
parent::_construct();
|
9 |
+
$this->_init('ipay/ipay', 'id');
|
10 |
+
}
|
11 |
+
}
|
app/code/community/Esellers/Ipay/Model/Observer.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
include "ipaySession.php";
|
3 |
+
class Esellers_Ipay_Model_Observer {
|
4 |
+
const FLAG_SHOW_CONFIG = 'showConfig';
|
5 |
+
const FLAG_SHOW_CONFIG_FORMAT = 'showConfigFormat';
|
6 |
+
|
7 |
+
private $request;
|
8 |
+
|
9 |
+
public function cancel(Varien_Event_Observer $observer)
|
10 |
+
{
|
11 |
+
$ticket = Mage::getStoreConfig("payment/ipay/certification");
|
12 |
+
$id = Mage::getStoreConfig("payment/ipay/auctionid");
|
13 |
+
$requestOrderNo = new requestOrderNo ($ticket,$id);
|
14 |
+
|
15 |
+
$event = $observer->getEvent();
|
16 |
+
$order = $event->getPayment()->getOrder();
|
17 |
+
$orderid = $order->getIncrementId();
|
18 |
+
|
19 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
20 |
+
$sql = "select * from ipay where order_id='$orderid'";
|
21 |
+
|
22 |
+
$result = $read->query($sql);
|
23 |
+
|
24 |
+
$payinfo = $result->fetch();
|
25 |
+
$ItemNos = $payinfo["auction_item_no"];
|
26 |
+
$OrderNo = $payinfo["auction_order_no"];
|
27 |
+
|
28 |
+
if($OrderNo!=""){
|
29 |
+
$nosArr = explode("@",$ItemNos);
|
30 |
+
$orderArr = explode("@",$OrderNo);
|
31 |
+
|
32 |
+
foreach($nosArr as $key=> $val){
|
33 |
+
if($val!=""){
|
34 |
+
$itemNo = explode("=",$val);
|
35 |
+
$requestResult = $requestOrderNo->doCancel($itemNo[1], $orderArr[$key]);
|
36 |
+
}
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
public function registerInvoice(Varien_Event_Observer $observer)
|
42 |
+
{
|
43 |
+
$ticket = Mage::getStoreConfig("payment/ipay/certification");
|
44 |
+
$id = Mage::getStoreConfig("payment/ipay/auctionid");
|
45 |
+
$requestOrderNo = new requestOrderNo ($ticket,$id);
|
46 |
+
|
47 |
+
if(Mage::getStoreConfig("payment/ipay/placeorderenable")){
|
48 |
+
$order = $observer->getData('order');
|
49 |
+
$orderid = $order->getIncrementId();
|
50 |
+
|
51 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
52 |
+
$sql = "select * from ipay where order_id='$orderid'";
|
53 |
+
|
54 |
+
$result = $read->query($sql);
|
55 |
+
|
56 |
+
$payinfo = $result->fetch();
|
57 |
+
$ItemNos = $payinfo["auction_item_no"];
|
58 |
+
$OrderNo = $payinfo["auction_order_no"];
|
59 |
+
|
60 |
+
$orderList = explode("@",$OrderNo);
|
61 |
+
|
62 |
+
foreach($orderList as $key=> $val){
|
63 |
+
if($val!=""){
|
64 |
+
$requestResult = $requestOrderNo->doPlaceOrder($val);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
public function startShipment(Varien_Event_Observer $observer)
|
71 |
+
{
|
72 |
+
$ticket = Mage::getStoreConfig("payment/ipay/certification");
|
73 |
+
$id = Mage::getStoreConfig("payment/ipay/auctionid");
|
74 |
+
$requestOrderNo = new requestOrderNo ($ticket,$id);
|
75 |
+
|
76 |
+
if(Mage::getStoreConfig("payment/ipay/shipmentenable")){
|
77 |
+
$order = $observer->getEvent()->getShipment();
|
78 |
+
//$order = $shipment->getOrder();
|
79 |
+
//$order = $observer->getData('shipment');
|
80 |
+
$orderid = $order->getOrderId();
|
81 |
+
|
82 |
+
foreach($order->getAllTracks() as $tracknum)
|
83 |
+
{
|
84 |
+
$tracknums[]=$tracknum->getNumber();
|
85 |
+
$trackcode[]=$tracknum->getCarrierCode();
|
86 |
+
}
|
87 |
+
$carriercode = $trackcode[0];
|
88 |
+
$numbers = $tracknums[0];
|
89 |
+
|
90 |
+
$read = Mage::getSingleton('core/resource')->getConnection('core_read');
|
91 |
+
$sql = "select entity_id,auction_order_no from sales_flat_order A,ipay B where A.increment_id=B.order_id and entity_id='$orderid'";
|
92 |
+
|
93 |
+
$result = $read->query($sql);
|
94 |
+
|
95 |
+
$payinfo = $result->fetch();
|
96 |
+
$OrderNo = $payinfo["auction_order_no"];
|
97 |
+
|
98 |
+
$orderList = explode("@",$OrderNo);
|
99 |
+
foreach($orderList as $key=> $val){
|
100 |
+
if($val!=""){
|
101 |
+
$requestResult = $requestOrderNo->doShipment($val,$numbers,$carriercode);
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
public function checkForConfigRequest($observer) {
|
108 |
+
$this->request = $observer->getEvent()->getData('front')->getRequest();
|
109 |
+
if($this->request->{self::FLAG_SHOW_CONFIG} === 'true'){
|
110 |
+
$this->setHeader();
|
111 |
+
$this->outputConfig();
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
private function setHeader() {
|
116 |
+
$format = isset($this->request->{self::FLAG_SHOW_CONFIG_FORMAT}) ?
|
117 |
+
$this->request->{self::FLAG_SHOW_CONFIG_FORMAT} : 'xml';
|
118 |
+
switch($format){
|
119 |
+
case 'text':
|
120 |
+
header("Content-Type: text/plain");
|
121 |
+
break;
|
122 |
+
default:
|
123 |
+
header("Content-Type: text/xml");
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
private function outputConfig() {
|
128 |
+
die(Mage::app()->getConfig()->getNode()->asXML());
|
129 |
+
}
|
130 |
+
}
|
app/code/community/Esellers/Ipay/Model/PaymentMethod.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_IPay_Model_PaymentMethod extends Mage_Payment_Model_Method_Checkmo
|
3 |
+
{
|
4 |
+
protected $_code = 'ipay';
|
5 |
+
protected $_isGateway = false;
|
6 |
+
protected $_canAuthorize = false;
|
7 |
+
protected $_canCapture = false;
|
8 |
+
protected $_canCapturePartial = false;
|
9 |
+
protected $_canRefund = false;
|
10 |
+
protected $_canVoid = false;
|
11 |
+
protected $_canUseInternal = true;
|
12 |
+
protected $_canUseCheckout = true;
|
13 |
+
protected $_canUseForMultishipping = true;
|
14 |
+
protected $_canSaveCc = false;
|
15 |
+
|
16 |
+
}
|
17 |
+
?>
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Color.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BelVG LLC.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
11 |
+
*
|
12 |
+
/***************************************
|
13 |
+
* MAGENTO EDITION USAGE NOTICE *
|
14 |
+
*****************************************/
|
15 |
+
/* This package designed for Magento COMMUNITY edition
|
16 |
+
* BelVG does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* BelVG does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
/***************************************
|
21 |
+
* DISCLAIMER *
|
22 |
+
*****************************************/
|
23 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
24 |
+
* versions in the future.
|
25 |
+
*****************************************************
|
26 |
+
* @category Esellers
|
27 |
+
* @package Esellers_Ipay
|
28 |
+
* @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
|
29 |
+
* @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
30 |
+
*/
|
31 |
+
|
32 |
+
class Esellers_Ipay_Model_System_Config_Source_Color
|
33 |
+
{
|
34 |
+
public function toOptionArray()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
//array('value'=>'', 'label'=>''),
|
38 |
+
array('value'=>'light', 'label'=>Mage::helper('ipay')->__('Light')),
|
39 |
+
array('value'=>'dark', 'label'=>Mage::helper('ipay')->__('Dark')),
|
40 |
+
);
|
41 |
+
}
|
42 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Company.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this template, choose Tools | Templates
|
5 |
+
* and open the template in the editor.
|
6 |
+
*/
|
7 |
+
?>
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Escrow.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Used in creating options for Yes|No config value selection
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Esellers_Ipay_Model_System_Config_Source_Escrow
|
32 |
+
{
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Options getter
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function toOptionArray()
|
40 |
+
{
|
41 |
+
return array(
|
42 |
+
array('value' => Mage::getStoreConfig("web/unsecure/base_url")."skin/frontend/default/default/images/ipay/logo_ipay01.gif", 'label'=>Mage::helper('ipay')->__('Logo 1')),
|
43 |
+
array('value' => Mage::getStoreConfig("web/unsecure/base_url")."skin/frontend/default/default/images/ipay/logo_ipay02.gif", 'label'=>Mage::helper('ipay')->__('Logo 2')),
|
44 |
+
);
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get options in "key-value" format
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
public function toArray()
|
53 |
+
{
|
54 |
+
return array(
|
55 |
+
Mage::getStoreConfig("web/unsecure/base_url")."skin/frontend/default/default/images/ipay/logo_ipay01.gif" => Mage::helper('ipay')->__('Logo 1'),
|
56 |
+
Mage::getStoreConfig("web/unsecure/base_url")."skin/frontend/default/default/images/ipay/logo_ipay02.gif" => Mage::helper('ipay')->__('Logo 2'),
|
57 |
+
);
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Font.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BelVG LLC.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
11 |
+
*
|
12 |
+
/***************************************
|
13 |
+
* MAGENTO EDITION USAGE NOTICE *
|
14 |
+
*****************************************/
|
15 |
+
/* This package designed for Magento COMMUNITY edition
|
16 |
+
* BelVG does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* BelVG does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
/***************************************
|
21 |
+
* DISCLAIMER *
|
22 |
+
*****************************************/
|
23 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
24 |
+
* versions in the future.
|
25 |
+
*****************************************************
|
26 |
+
* @category Esellers
|
27 |
+
* @package Esellers_Ipay
|
28 |
+
* @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
|
29 |
+
* @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
30 |
+
*/
|
31 |
+
|
32 |
+
class Esellers_Ipay_Model_System_Config_Source_Font
|
33 |
+
{
|
34 |
+
public function toOptionArray()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
//array('value'=>'', 'label'=>''),
|
38 |
+
array('value'=>'arial', 'label'=>Mage::helper('facebookall')->__('Arial')),
|
39 |
+
array('value'=>'lucida grande', 'label'=>Mage::helper('facebookall')->__('Lucida Grande')),
|
40 |
+
array('value'=>'segoe ui', 'label'=>Mage::helper('facebookall')->__('Segoe Ui')),
|
41 |
+
array('value'=>'tahoma', 'label'=>Mage::helper('facebookall')->__('Tahoma')),
|
42 |
+
array('value'=>'trebuchet ms', 'label'=>Mage::helper('facebookall')->__('Trebuchet MS')),
|
43 |
+
array('value'=>'verdana', 'label'=>Mage::helper('facebookall')->__('Verdana')),
|
44 |
+
);
|
45 |
+
}
|
46 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Layout.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BelVG LLC.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
11 |
+
*
|
12 |
+
/***************************************
|
13 |
+
* MAGENTO EDITION USAGE NOTICE *
|
14 |
+
*****************************************/
|
15 |
+
/* This package designed for Magento COMMUNITY edition
|
16 |
+
* BelVG does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* BelVG does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
/***************************************
|
21 |
+
* DISCLAIMER *
|
22 |
+
*****************************************/
|
23 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
24 |
+
* versions in the future.
|
25 |
+
*****************************************************
|
26 |
+
* @category Belvg
|
27 |
+
* @package Belvg_FacebookFree
|
28 |
+
* @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
|
29 |
+
* @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
30 |
+
*/
|
31 |
+
|
32 |
+
class Belvg_FacebookFree_Model_System_Config_Source_Layout
|
33 |
+
{
|
34 |
+
public function toOptionArray()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
//array('value'=>'', 'label'=>''),
|
38 |
+
array('value'=>'standart', 'label'=>Mage::helper('ipay')->__('Standart')),
|
39 |
+
array('value'=>'button_count', 'label'=>Mage::helper('ipay')->__('Button Count')),
|
40 |
+
array('value'=>'box_count', 'label'=>Mage::helper('ipay')->__('Box Count')),
|
41 |
+
);
|
42 |
+
}
|
43 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Paymethod.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Used in creating options for Yes|No config value selection
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Esellers_Ipay_Model_System_Config_Source_Paymethod
|
32 |
+
{
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Options getter
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function toOptionArray()
|
40 |
+
{
|
41 |
+
return array(
|
42 |
+
array('value' => 0, 'label'=>Mage::helper('ipay')->__('All')),
|
43 |
+
array('value' => 1, 'label'=>Mage::helper('ipay')->__('VBank,Bank,CPhone')),
|
44 |
+
array('value' => 2, 'label'=>Mage::helper('ipay')->__('Card,Bank,CPhone')),
|
45 |
+
array('value' => 3, 'label'=>Mage::helper('ipay')->__('VBank,Bank')),
|
46 |
+
);
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get options in "key-value" format
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public function toArray()
|
55 |
+
{
|
56 |
+
return array(
|
57 |
+
0 => Mage::helper('ipay')->__('All'),
|
58 |
+
1 => Mage::helper('ipay')->__('VBank,Bank,CPhone'),
|
59 |
+
2 => Mage::helper('ipay')->__('Card,Bank,CPhone'),
|
60 |
+
3 => Mage::helper('ipay')->__('VBank,CPhone'),
|
61 |
+
);
|
62 |
+
}
|
63 |
+
|
64 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Roundoff.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Used in creating options for Yes|No config value selection
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Esellers_Ipay_Model_System_Config_Source_Roundoff
|
32 |
+
{
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Options getter
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function toOptionArray()
|
40 |
+
{
|
41 |
+
return array(
|
42 |
+
array('value' => 'Floor', 'label'=>Mage::helper('ipay')->__('Floor')),
|
43 |
+
array('value' => 'Round off', 'label'=>Mage::helper('ipay')->__('Round off')),
|
44 |
+
array('value' => 'Ceil', 'label'=>Mage::helper('ipay')->__('Ceil')),
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get options in "key-value" format
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
public function toArray()
|
54 |
+
{
|
55 |
+
return array(
|
56 |
+
1 => Mage::helper('ipay')->__('Free'),
|
57 |
+
2 => Mage::helper('ipay')->__('Cash on arrival'),
|
58 |
+
3 => Mage::helper('ipay')->__('Prepaid'),
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Esellers/Ipay/Model/System/Config/Source/Shiptype.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Used in creating options for Yes|No config value selection
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Esellers_Ipay_Model_System_Config_Source_Shiptype
|
32 |
+
{
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Options getter
|
36 |
+
*
|
37 |
+
* @return array
|
38 |
+
*/
|
39 |
+
public function toOptionArray()
|
40 |
+
{
|
41 |
+
return array(
|
42 |
+
array('value' => 1, 'label'=>Mage::helper('ipay')->__('Free')),
|
43 |
+
array('value' => 2, 'label'=>Mage::helper('ipay')->__('FREIGHT PREPAID')),
|
44 |
+
array('value' => 3, 'label'=>Mage::helper('ipay')->__('Prepaid')),
|
45 |
+
);
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get options in "key-value" format
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
public function toArray()
|
54 |
+
{
|
55 |
+
return array(
|
56 |
+
1 => Mage::helper('ipay')->__('Free'),
|
57 |
+
2 => Mage::helper('ipay')->__('Cash on arrival'),
|
58 |
+
3 => Mage::helper('ipay')->__('Prepaid'),
|
59 |
+
);
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/community/Esellers/Ipay/controllers/PaymentController.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Ipay_PaymentController extends Mage_Core_Controller_Front_Action {
|
3 |
+
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$this->loadLayout();
|
7 |
+
$this->renderLayout();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function reviewAction()
|
11 |
+
{
|
12 |
+
$this->loadLayout();
|
13 |
+
$this->renderLayout();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function cancelAction()
|
17 |
+
{
|
18 |
+
include "class.ipay.php";
|
19 |
+
//include "func.xml.php";
|
20 |
+
|
21 |
+
$xml = xml2array($GLOBALS['HTTP_RAW_POST_DATA']);
|
22 |
+
$_POST= $xml['IpayResponse'];
|
23 |
+
$url = Mage::getStoreConfig("web/secure/base_url");
|
24 |
+
|
25 |
+
$client = new SoapClient($url.'index.php/api/soap/?wsdl');
|
26 |
+
|
27 |
+
// If somestuff requires api authentification,
|
28 |
+
// then get a session token
|
29 |
+
$api_user = Mage::getStoreConfig("payment/ipay/apiuser");
|
30 |
+
$api_pass = Mage::getStoreConfig("payment/ipay/apipass");
|
31 |
+
$session = $client->login($api_user, $api_pass);
|
32 |
+
$orderNo = $_POST["AuctionOrderNo"];
|
33 |
+
|
34 |
+
$read = Mage::getSingleton("core/resource")->getConnection("core_read");
|
35 |
+
|
36 |
+
$sql = "select order_id from ipay where auction_order_no='$orderNo@'";
|
37 |
+
$result = $read->query($sql);
|
38 |
+
$payinfo = $result->fetch();
|
39 |
+
$ipayNo = $payinfo["order_id"];
|
40 |
+
|
41 |
+
try{
|
42 |
+
if($ipayNo!=""){
|
43 |
+
$result2 = $client->call($session, 'sales_order.info', "$ipayNo");
|
44 |
+
|
45 |
+
Mage::log($url.$ipayNo . " was canceling");
|
46 |
+
$client->call($session, 'sales_order.cancel', "$ipayNo");
|
47 |
+
Mage::log($ipayNo . " was canceled");
|
48 |
+
}
|
49 |
+
|
50 |
+
} catch (soapFault $fault){
|
51 |
+
Mage::log($fault->faultstring);
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
app/code/community/Esellers/Ipay/controllers/Sales/Order/ShipmentController.php
ADDED
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* To change this template, choose Tools | Templates
|
4 |
+
* and open the template in the editor.
|
5 |
+
*/
|
6 |
+
require_once 'Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php';
|
7 |
+
|
8 |
+
class Esellers_Ipay_Sales_Order_ShipmentController extends Mage_Adminhtml_Sales_Order_ShipmentController
|
9 |
+
{
|
10 |
+
/**
|
11 |
+
* Initialize shipment items QTY
|
12 |
+
*/
|
13 |
+
protected function _getItemQtys()
|
14 |
+
{
|
15 |
+
parent::_getItemQtys();
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Initialize shipment model instance
|
20 |
+
*
|
21 |
+
* @return Mage_Sales_Model_Order_Shipment|bool
|
22 |
+
*/
|
23 |
+
protected function _initShipment()
|
24 |
+
{
|
25 |
+
$this->_title($this->__('Sales'))->_title($this->__('Shipments'));
|
26 |
+
|
27 |
+
$shipment = false;
|
28 |
+
$shipmentId = $this->getRequest()->getParam('shipment_id');
|
29 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
30 |
+
|
31 |
+
if ($shipmentId) {
|
32 |
+
$shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);
|
33 |
+
} elseif ($orderId) {
|
34 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Check order existing
|
38 |
+
*/
|
39 |
+
if (!$order->getId()) {
|
40 |
+
$this->_getSession()->addError($this->__('The order no longer exists.'));
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
/**
|
44 |
+
* Check shipment is available to create separate from invoice
|
45 |
+
*/
|
46 |
+
if ($order->getForcedDoShipmentWithInvoice()) {
|
47 |
+
$this->_getSession()->addError($this->__('Cannot do shipment for the order separately from invoice.'));
|
48 |
+
return false;
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* Check shipment create availability
|
52 |
+
*/
|
53 |
+
if (!$order->canShip()) {
|
54 |
+
$this->_getSession()->addError($this->__('Cannot do shipment for the order.'));
|
55 |
+
return false;
|
56 |
+
}
|
57 |
+
$savedQtys = $this->_getItemQtys();
|
58 |
+
$shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($savedQtys);
|
59 |
+
|
60 |
+
$tracks = $this->getRequest()->getPost('tracking');
|
61 |
+
if ($tracks) {
|
62 |
+
foreach ($tracks as $data) {
|
63 |
+
if (empty($data['number'])) {
|
64 |
+
Mage::throwException($this->__('Tracking number cannot1 be empty.'));
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
69 |
+
->addData($data);
|
70 |
+
$shipment->addTrack($track);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
Mage::register('current_shipment', $shipment);
|
76 |
+
return $shipment;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Save shipment and order in one transaction
|
81 |
+
*
|
82 |
+
* @param Mage_Sales_Model_Order_Shipment $shipment
|
83 |
+
* @return Mage_Adminhtml_Sales_Order_ShipmentController
|
84 |
+
*/
|
85 |
+
protected function _saveShipment($shipment)
|
86 |
+
{
|
87 |
+
parent::_saveShipment($shipment);
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Shipment information page
|
92 |
+
*/
|
93 |
+
public function viewAction()
|
94 |
+
{
|
95 |
+
if ($this->_initShipment()) {
|
96 |
+
$this->_title($this->__('View Shipment'));
|
97 |
+
|
98 |
+
$this->loadLayout();
|
99 |
+
$this->getLayout()->getBlock('sales_shipment_view')
|
100 |
+
->updateBackButtonUrl($this->getRequest()->getParam('come_from'));
|
101 |
+
$this->_setActiveMenu('sales/order')
|
102 |
+
->renderLayout();
|
103 |
+
} else {
|
104 |
+
$this->_forward('noRoute');
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Start create shipment action
|
110 |
+
*/
|
111 |
+
public function startAction()
|
112 |
+
{
|
113 |
+
/**
|
114 |
+
* Clear old values for shipment qty's
|
115 |
+
*/
|
116 |
+
$this->_redirect('*/*/new', array('order_id'=>$this->getRequest()->getParam('order_id')));
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Shipment create page
|
121 |
+
*/
|
122 |
+
public function newAction()
|
123 |
+
{
|
124 |
+
parent::newAction();
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Save shipment
|
129 |
+
* We can save only new shipment. Existing shipments are not editable
|
130 |
+
*
|
131 |
+
* @return null
|
132 |
+
*/
|
133 |
+
public function saveAction()
|
134 |
+
{
|
135 |
+
$data = $this->getRequest()->getPost('shipment');
|
136 |
+
if (!empty($data['comment_text'])) {
|
137 |
+
Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);
|
138 |
+
}
|
139 |
+
|
140 |
+
try {
|
141 |
+
$shipment = $this->_initShipment();
|
142 |
+
if (!$shipment) {
|
143 |
+
$this->_forward('noRoute');
|
144 |
+
return;
|
145 |
+
}
|
146 |
+
|
147 |
+
$shipment->register();
|
148 |
+
$comment = '';
|
149 |
+
if (!empty($data['comment_text'])) {
|
150 |
+
$shipment->addComment(
|
151 |
+
$data['comment_text'],
|
152 |
+
isset($data['comment_customer_notify']),
|
153 |
+
isset($data['is_visible_on_front'])
|
154 |
+
);
|
155 |
+
if (isset($data['comment_customer_notify'])) {
|
156 |
+
$comment = $data['comment_text'];
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
if (!empty($data['send_email'])) {
|
161 |
+
$shipment->setEmailSent(true);
|
162 |
+
}
|
163 |
+
|
164 |
+
|
165 |
+
$shipment->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
|
166 |
+
$responseAjax = new Varien_Object();
|
167 |
+
$isNeedCreateLabel = isset($data['create_shipping_label']) && $data['create_shipping_label'];
|
168 |
+
|
169 |
+
if ($isNeedCreateLabel && $this->_createShippingLabel($shipment)) {
|
170 |
+
$responseAjax->setOk(true);
|
171 |
+
}
|
172 |
+
|
173 |
+
$tracking = $this->getRequest()->getPost('tracking');
|
174 |
+
|
175 |
+
if(Mage::getStoreConfig("payment/ipay/active")){
|
176 |
+
foreach($tracking as $key=>$arr){
|
177 |
+
$tracknums = $arr["number"];
|
178 |
+
$trackcode = $arr["carrier_code"];
|
179 |
+
|
180 |
+
$flag=$this->chk($tracknums,$trackcode);
|
181 |
+
if($flag==false){
|
182 |
+
Mage::throwException($this->__('Invalid tracking number.'));
|
183 |
+
}
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
if($flag){
|
188 |
+
$this->_saveShipment($shipment);
|
189 |
+
|
190 |
+
$shipment->sendEmail(!empty($data['send_email']), $comment);
|
191 |
+
|
192 |
+
$shipmentCreatedMessage = $this->__('The shipment has been created.');
|
193 |
+
$labelCreatedMessage = $this->__('The shipping label has been created.');
|
194 |
+
|
195 |
+
$this->_getSession()->addSuccess($isNeedCreateLabel ? $shipmentCreatedMessage . ' ' . $labelCreatedMessage
|
196 |
+
: $shipmentCreatedMessage);
|
197 |
+
Mage::getSingleton('adminhtml/session')->getCommentText(true);
|
198 |
+
}
|
199 |
+
} catch (Mage_Core_Exception $e) {
|
200 |
+
if ($isNeedCreateLabel) {
|
201 |
+
$responseAjax->setError(true);
|
202 |
+
$responseAjax->setMessage($e->getMessage());
|
203 |
+
} else {
|
204 |
+
$this->_getSession()->addError($e->getMessage());
|
205 |
+
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
206 |
+
}
|
207 |
+
} catch (Exception $e) {
|
208 |
+
Mage::logException($e);
|
209 |
+
if ($isNeedCreateLabel) {
|
210 |
+
$responseAjax->setError(true);
|
211 |
+
$responseAjax->setMessage(
|
212 |
+
Mage::helper('sales')->__('An error occurred while creating shipping label.'));
|
213 |
+
} else {
|
214 |
+
$this->_getSession()->addError($this->__('Cannot save shipment.'));
|
215 |
+
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
216 |
+
}
|
217 |
+
}
|
218 |
+
if ($isNeedCreateLabel) {
|
219 |
+
$this->getResponse()->setBody($responseAjax->toJson());
|
220 |
+
} else {
|
221 |
+
$this->_redirect('*/sales_order/view', array('order_id' => $shipment->getOrderId()));
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Send email with shipment data to customer
|
227 |
+
*/
|
228 |
+
public function emailAction()
|
229 |
+
{
|
230 |
+
parent::emailAction();
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Add new tracking number action
|
235 |
+
*/
|
236 |
+
public function addTrackAction()
|
237 |
+
{
|
238 |
+
try {
|
239 |
+
$carrier = $this->getRequest()->getPost('carrier');
|
240 |
+
$number = $this->getRequest()->getPost('number');
|
241 |
+
$title = $this->getRequest()->getPost('title');
|
242 |
+
if (empty($carrier)) {
|
243 |
+
Mage::throwException($this->__('The carrier needs to be specified.'));
|
244 |
+
}
|
245 |
+
|
246 |
+
if (empty($number)) {
|
247 |
+
Mage::throwException($this->__('Tracking number cannot be empty.'));
|
248 |
+
}
|
249 |
+
|
250 |
+
$flag=$this->chk($number,$carrier);
|
251 |
+
if($flag==false){
|
252 |
+
Mage::throwException($this->__("$flag".'Invalid tracking number.'));
|
253 |
+
}
|
254 |
+
|
255 |
+
$shipment = $this->_initShipment();
|
256 |
+
|
257 |
+
if ($shipment) {
|
258 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
259 |
+
->setNumber($number)
|
260 |
+
->setCarrierCode($carrier)
|
261 |
+
->setTitle($title);
|
262 |
+
$shipment->addTrack($track)
|
263 |
+
->save();
|
264 |
+
|
265 |
+
$this->loadLayout();
|
266 |
+
$response = $this->getLayout()->getBlock('shipment_tracking')->toHtml();
|
267 |
+
} else {
|
268 |
+
$response = array(
|
269 |
+
'error' => true,
|
270 |
+
'message' => $this->__('Cannot initialize shipment for adding tracking number.1'),
|
271 |
+
);
|
272 |
+
}
|
273 |
+
} catch (Mage_Core_Exception $e) {
|
274 |
+
$response = array(
|
275 |
+
'error' => true,
|
276 |
+
'message' => $e->getMessage(),
|
277 |
+
);
|
278 |
+
} catch (Exception $e) {
|
279 |
+
$response = array(
|
280 |
+
'error' => true,
|
281 |
+
'message' => $this->__('Cannot add tracking number.'),
|
282 |
+
);
|
283 |
+
}
|
284 |
+
if (is_array($response)) {
|
285 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
286 |
+
}
|
287 |
+
$this->getResponse()->setBody($response);
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Return grid with shipping items for Ajax request
|
292 |
+
*
|
293 |
+
* @return Mage_Core_Controller_Response_Http
|
294 |
+
*/
|
295 |
+
public function getShippingItemsGridAction()
|
296 |
+
{
|
297 |
+
$this->_initShipment();
|
298 |
+
return $this->getResponse()->setBody(
|
299 |
+
$this->getLayout()
|
300 |
+
->createBlock('adminhtml/sales_order_shipment_packaging_grid')
|
301 |
+
->setIndex($this->getRequest()->getParam('index'))
|
302 |
+
->toHtml()
|
303 |
+
);
|
304 |
+
}
|
305 |
+
|
306 |
+
public function chk($invoiceNo,$company)
|
307 |
+
{
|
308 |
+
$digit=1;
|
309 |
+
if($company=="cjgls"){
|
310 |
+
if(strlen($invoiceNo)==12)
|
311 |
+
$digit=2;
|
312 |
+
else if(strlen($invoiceNo==11))
|
313 |
+
$digit=3;
|
314 |
+
}
|
315 |
+
$array = $this->invoiceNoLength();
|
316 |
+
$companyLength = $array[$company];
|
317 |
+
|
318 |
+
if(array_search($company,$array)!==false){
|
319 |
+
return true;
|
320 |
+
}
|
321 |
+
|
322 |
+
if(!$companyLength)
|
323 |
+
return true;
|
324 |
+
|
325 |
+
if(!array_search(strlen($invoiceNo),$companyLength)){
|
326 |
+
return false;
|
327 |
+
}
|
328 |
+
|
329 |
+
if($companyLength["flag"]){
|
330 |
+
$lastNum = substr($invoiceNo,-1);
|
331 |
+
$firstNum = substr($invoiceNo,0+($digit-1),-1);
|
332 |
+
if($firstNum%7 == $lastNum)
|
333 |
+
return true;
|
334 |
+
else
|
335 |
+
return false;
|
336 |
+
}else{
|
337 |
+
if($company=="epost" ){
|
338 |
+
$fnum = substr($invoiceNo,0,1);
|
339 |
+
$keyArr = array( 1=>6, 2=>7, 3=>8);
|
340 |
+
if(!array_search($fnum,$keyArr)){
|
341 |
+
return false;
|
342 |
+
}
|
343 |
+
}
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
public function invoiceNoLength(){
|
348 |
+
return array( "hanjin" => array("flag"=>true, 1=>10 ,2=>12),
|
349 |
+
"cjgls" => array("flag"=>true, 1=>10 ,2=>11 ,3=>12),
|
350 |
+
"kyungdong" => array("flag"=>false, 1=>8 ,2=>9 ,3=>10 ,4=>11 ,5=>12 ,6=>13 ,7=>14 ,8=>15 ,9=>16),
|
351 |
+
"korex" => array("flag"=>false, 1=>10),
|
352 |
+
"dongbu" => array("flag"=>true, 1=>12),
|
353 |
+
"innogis" => array("flag"=>false, 1=>10 ,2=>11 ,3=>12 ,4=>13),
|
354 |
+
"hanaro" => array("flag"=>true, 1=>10),
|
355 |
+
"hyundai" => array("flag"=>true, 1=>10 ,2=>12),
|
356 |
+
"yellow" => array("flag"=>true, 1=>11),
|
357 |
+
"kgb" => array("flag"=>true, 1=>11),
|
358 |
+
"epost" => array("flag"=>false, 1=>13),
|
359 |
+
"etc" => array(1=>10),
|
360 |
+
);
|
361 |
+
}
|
362 |
+
}
|
363 |
+
|
364 |
+
|
365 |
+
?>
|
app/code/community/Esellers/Ipay/etc/adminhtml.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<acl>
|
5 |
+
<resources>
|
6 |
+
<all>
|
7 |
+
<title>Esellers IPAY</title>
|
8 |
+
</all>
|
9 |
+
<admin>
|
10 |
+
<children>
|
11 |
+
<system>
|
12 |
+
<children>
|
13 |
+
<config>
|
14 |
+
<children>
|
15 |
+
<ipay translate="label">
|
16 |
+
<title>Ipay Section</title>
|
17 |
+
</ipay>
|
18 |
+
</children>
|
19 |
+
</config>
|
20 |
+
</children>
|
21 |
+
</system>
|
22 |
+
</children>
|
23 |
+
</admin>
|
24 |
+
</resources>
|
25 |
+
</acl>
|
26 |
+
</config>
|
app/code/community/Esellers/Ipay/etc/config.xml
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Esellers_Ipay>
|
6 |
+
<version>1.1.0</version>
|
7 |
+
</Esellers_Ipay>
|
8 |
+
</modules>
|
9 |
+
<frontend>
|
10 |
+
<routers>
|
11 |
+
<ipay>
|
12 |
+
<use>standard</use>
|
13 |
+
<args>
|
14 |
+
<module>Esellers_Ipay</module>
|
15 |
+
<frontName>ipay</frontName>
|
16 |
+
</args>
|
17 |
+
</ipay>
|
18 |
+
</routers>
|
19 |
+
<default>
|
20 |
+
<router>ipay</router>
|
21 |
+
</default>
|
22 |
+
<layout>
|
23 |
+
<updates>
|
24 |
+
<ipay>
|
25 |
+
<file>ipay.xml</file>
|
26 |
+
</ipay>
|
27 |
+
</updates>
|
28 |
+
</layout>
|
29 |
+
</frontend>
|
30 |
+
<adminhtml>
|
31 |
+
<layout>
|
32 |
+
<updates>
|
33 |
+
<ipay>
|
34 |
+
<file>ipay.xml</file>
|
35 |
+
</ipay>
|
36 |
+
</updates>
|
37 |
+
</layout>
|
38 |
+
</adminhtml>
|
39 |
+
<global>
|
40 |
+
<rewrite>
|
41 |
+
<esellers_ipay_shipment>
|
42 |
+
<from><![CDATA[#^/admin/sales_order_shipment/addTrack/#]]></from>
|
43 |
+
<to>/ipay/sales_order_shipment/addTrack/</to>
|
44 |
+
<from><![CDATA[#^/admin/sales_order_shipment/save/#]]></from>
|
45 |
+
<to>/ipay/sales_order_shipment/save/</to>
|
46 |
+
</esellers_ipay_shipment>
|
47 |
+
</rewrite>
|
48 |
+
<models>
|
49 |
+
<ipay>
|
50 |
+
<class>Esellers_Ipay_Model</class>
|
51 |
+
<resourceModel>ipay_mysql4</resourceModel>
|
52 |
+
</ipay>
|
53 |
+
<ipay_mysql4>
|
54 |
+
<class>Esellers_Ipay_Model</class>
|
55 |
+
<entities>
|
56 |
+
<ipay>
|
57 |
+
<table>ipay_ipay</table>
|
58 |
+
</ipay>
|
59 |
+
</entities>
|
60 |
+
</ipay_mysql4>
|
61 |
+
</models>
|
62 |
+
<resources>
|
63 |
+
<ipay_setup>
|
64 |
+
<setup>
|
65 |
+
<module>Esellers_Ipay</module>
|
66 |
+
</setup>
|
67 |
+
<connection>
|
68 |
+
<use>core_setup</use>
|
69 |
+
</connection>
|
70 |
+
</ipay_setup>
|
71 |
+
<ipay_write>
|
72 |
+
<connection>
|
73 |
+
<use>core_write</use>
|
74 |
+
</connection>
|
75 |
+
</ipay_write>
|
76 |
+
<ipay_read>
|
77 |
+
<connection>
|
78 |
+
<use>core_read</use>
|
79 |
+
</connection>
|
80 |
+
</ipay_read>
|
81 |
+
</resources>
|
82 |
+
<blocks>
|
83 |
+
<ipay>
|
84 |
+
<class>Esellers_Ipay_Block</class>
|
85 |
+
</ipay>
|
86 |
+
</blocks>
|
87 |
+
<helpers>
|
88 |
+
<ipay>
|
89 |
+
<class>Esellers_Ipay_Helper</class>
|
90 |
+
</ipay>
|
91 |
+
</helpers>
|
92 |
+
|
93 |
+
<events>
|
94 |
+
<sales_order_payment_cancel>
|
95 |
+
<observers>
|
96 |
+
<esellers_ipay_observer>
|
97 |
+
<type>singleton</type>
|
98 |
+
<class>Esellers_Ipay_Model_Observer</class>
|
99 |
+
<method>cancel</method>
|
100 |
+
</esellers_ipay_observer>
|
101 |
+
</observers>
|
102 |
+
</sales_order_payment_cancel>
|
103 |
+
<sales_order_invoice_register>
|
104 |
+
<observers>
|
105 |
+
<esellers_ipay_observer>
|
106 |
+
<type>singleton</type>
|
107 |
+
<class>Esellers_Ipay_Model_Observer</class>
|
108 |
+
<method>registerInvoice</method>
|
109 |
+
</esellers_ipay_observer>
|
110 |
+
</observers>
|
111 |
+
</sales_order_invoice_register>
|
112 |
+
<sales_order_shipment_save_after>
|
113 |
+
<observers>
|
114 |
+
<esellers_ipay_observer>
|
115 |
+
<type>singleton</type>
|
116 |
+
<class>Esellers_Ipay_Model_Observer</class>
|
117 |
+
<method>startShipment</method>
|
118 |
+
</esellers_ipay_observer>
|
119 |
+
</observers>
|
120 |
+
</sales_order_shipment_save_after>
|
121 |
+
</events>
|
122 |
+
</global>
|
123 |
+
<default>
|
124 |
+
<ipay>
|
125 |
+
<style>
|
126 |
+
<logo>nowAccepting_150x60</logo>z`
|
127 |
+
</style>
|
128 |
+
<activity>
|
129 |
+
<enabled>0</enabled>
|
130 |
+
<width>200</width>
|
131 |
+
<height>300</height>
|
132 |
+
<header>1</header>
|
133 |
+
<color>light</color>
|
134 |
+
<recommendations>1</recommendations>
|
135 |
+
<maxage>0</maxage>
|
136 |
+
</activity>
|
137 |
+
</ipay>
|
138 |
+
<payment>
|
139 |
+
<ipay>
|
140 |
+
<active>1</active>
|
141 |
+
<model>ipay/paymentMethod</model>
|
142 |
+
<order_status>pending</order_status>
|
143 |
+
<title>ipay</title>
|
144 |
+
<allowspecific>0</allowspecific>
|
145 |
+
<cancelrestriction>1</cancelrestriction>
|
146 |
+
<address_required>1</address_required>
|
147 |
+
</ipay>
|
148 |
+
</payment>
|
149 |
+
</default>
|
150 |
+
</config>
|
app/code/community/Esellers/Ipay/etc/system.xml
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<esellers translate="label" module="ipay">
|
5 |
+
<label>Ipay</label>
|
6 |
+
<sort_order>200</sort_order>
|
7 |
+
</esellers>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<ipay translate="label">
|
11 |
+
<label>Ipay setting</label>
|
12 |
+
<tab>esellers</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<!-- New groups go here -->
|
20 |
+
<logo_image translate="label">
|
21 |
+
</logo_image>
|
22 |
+
</groups>
|
23 |
+
</ipay>
|
24 |
+
<carriers>
|
25 |
+
<groups>
|
26 |
+
<ipay translate="label" module="shipping">
|
27 |
+
<label>iPay Shipping Fee</label>
|
28 |
+
<frontend_type>text</frontend_type>
|
29 |
+
<sort_order>13</sort_order>
|
30 |
+
<show_in_default>1</show_in_default>
|
31 |
+
<show_in_website>1</show_in_website>
|
32 |
+
<show_in_store>1</show_in_store>
|
33 |
+
<fields>
|
34 |
+
<active translate="label">
|
35 |
+
<label>Enabled</label>
|
36 |
+
<frontend_type>select</frontend_type>
|
37 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
38 |
+
<sort_order>1</sort_order>
|
39 |
+
<show_in_default>1</show_in_default>
|
40 |
+
<show_in_website>1</show_in_website>
|
41 |
+
<show_in_store>1</show_in_store>
|
42 |
+
</active>
|
43 |
+
<!--
|
44 |
+
If the free_shipping_enable flag enable, the system will check free_shipping_subtotal to give free shipping
|
45 |
+
otherwise will use shopping cart price rule behaviour
|
46 |
+
-->
|
47 |
+
|
48 |
+
<sort_order translate="label">
|
49 |
+
<label>Sort order</label>
|
50 |
+
<frontend_type>text</frontend_type>
|
51 |
+
<sort_order>100</sort_order>
|
52 |
+
<show_in_default>1</show_in_default>
|
53 |
+
<show_in_website>1</show_in_website>
|
54 |
+
<show_in_store>1</show_in_store>
|
55 |
+
</sort_order>
|
56 |
+
<title translate="label">
|
57 |
+
<label>Title</label>
|
58 |
+
<frontend_type>text</frontend_type>
|
59 |
+
<sort_order>2</sort_order>
|
60 |
+
<show_in_default>1</show_in_default>
|
61 |
+
<show_in_website>1</show_in_website>
|
62 |
+
<show_in_store>1</show_in_store>
|
63 |
+
</title>
|
64 |
+
|
65 |
+
</fields>
|
66 |
+
</ipay>
|
67 |
+
</groups>
|
68 |
+
</carriers>
|
69 |
+
|
70 |
+
|
71 |
+
<payment>
|
72 |
+
<groups>
|
73 |
+
<!-- newmodule fieldset -->
|
74 |
+
<ipay translate="label" module="paygate">
|
75 |
+
<!-- will have title 'New Module' -->
|
76 |
+
<label>iPay</label>
|
77 |
+
<frontend_type>text</frontend_type>
|
78 |
+
<!-- position between other payment methods -->
|
79 |
+
<sort_order>670</sort_order>
|
80 |
+
|
81 |
+
<!-- do not show this configuration options in store scope -->
|
82 |
+
<show_in_default>1</show_in_default>
|
83 |
+
<show_in_website>1</show_in_website>
|
84 |
+
<show_in_store>1</show_in_store>
|
85 |
+
<fields>
|
86 |
+
<!-- is this payment method active for the website? -->
|
87 |
+
<active translate="label">
|
88 |
+
<!-- label for the field -->
|
89 |
+
<label>Enabled</label>
|
90 |
+
<!-- input type for configuration value -->
|
91 |
+
<frontend_type>select</frontend_type>
|
92 |
+
<!-- model to take the option values from -->
|
93 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
94 |
+
<!-- field position -->
|
95 |
+
<sort_order>1</sort_order>
|
96 |
+
<!-- do not show this field in store scope -->
|
97 |
+
<show_in_default>1</show_in_default>
|
98 |
+
<show_in_website>1</show_in_website>
|
99 |
+
<show_in_store>0</show_in_store>
|
100 |
+
</active>
|
101 |
+
|
102 |
+
<title translate="label">
|
103 |
+
<label>Title</label>
|
104 |
+
<frontend_type>text</frontend_type>
|
105 |
+
<sort_order>1</sort_order>
|
106 |
+
<show_in_default>1</show_in_default>
|
107 |
+
<show_in_website>1</show_in_website>
|
108 |
+
<show_in_store>0</show_in_store>
|
109 |
+
</title>
|
110 |
+
<certification translate="label">
|
111 |
+
<label>key</label>
|
112 |
+
<frontend_type>text</frontend_type>
|
113 |
+
<source_model>ipay/system_config_source_shiptype</source_model>
|
114 |
+
<sort_order>3</sort_order>
|
115 |
+
<show_in_default>1</show_in_default>
|
116 |
+
<show_in_website>1</show_in_website>
|
117 |
+
<show_in_store>0</show_in_store>
|
118 |
+
|
119 |
+
<comment><![CDATA[
|
120 |
+
<a href="javascript:window.open('http://ipay.auction.co.kr/ipay/SellerRegister.aspx',500,500);void(0)"><img src="http://click4.checkoutshop.co.kr/skin/frontend/default/default/images/ipay/sbtn_ipay.gif" vspace="5" align="absmiddle"></a>
|
121 |
+
<span class="stxt gray"></span>
|
122 |
+
]]></comment>
|
123 |
+
</certification>
|
124 |
+
|
125 |
+
<auctionid translate="label">
|
126 |
+
<label>auction id</label>
|
127 |
+
<frontend_type>text</frontend_type>
|
128 |
+
<sort_order>4</sort_order>
|
129 |
+
<show_in_default>1</show_in_default>
|
130 |
+
<show_in_website>1</show_in_website>
|
131 |
+
<show_in_store>0</show_in_store>
|
132 |
+
</auctionid>
|
133 |
+
|
134 |
+
<apiuser translate="label">
|
135 |
+
<label>API User Name</label>
|
136 |
+
<frontend_type>text</frontend_type>
|
137 |
+
<sort_order>5</sort_order>
|
138 |
+
<show_in_default>1</show_in_default>
|
139 |
+
<show_in_website>1</show_in_website>
|
140 |
+
<show_in_store>0</show_in_store>
|
141 |
+
</apiuser>
|
142 |
+
|
143 |
+
<apipass translate="label">
|
144 |
+
<label>API Key</label>
|
145 |
+
<frontend_type>password</frontend_type>
|
146 |
+
<sort_order>6</sort_order>
|
147 |
+
<show_in_default>1</show_in_default>
|
148 |
+
<show_in_website>1</show_in_website>
|
149 |
+
<show_in_store>0</show_in_store>
|
150 |
+
</apipass>
|
151 |
+
|
152 |
+
<ipay_payment_method translate="label">
|
153 |
+
<label>payment method</label>
|
154 |
+
<frontend_type>select</frontend_type>
|
155 |
+
<source_model>ipay/system_config_source_paymethod</source_model>
|
156 |
+
<sort_order>7</sort_order>
|
157 |
+
<show_in_default>1</show_in_default>
|
158 |
+
<show_in_website>1</show_in_website>
|
159 |
+
<show_in_store>0</show_in_store>
|
160 |
+
</ipay_payment_method>
|
161 |
+
|
162 |
+
<cancelrestriction translate="label">
|
163 |
+
<label>cancel restriction/auto place order</label>
|
164 |
+
<frontend_type>select</frontend_type>
|
165 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
166 |
+
<sort_order>8</sort_order>
|
167 |
+
<show_in_default>1</show_in_default>
|
168 |
+
<show_in_website>1</show_in_website>
|
169 |
+
<show_in_store>0</show_in_store>
|
170 |
+
</cancelrestriction>
|
171 |
+
|
172 |
+
|
173 |
+
|
174 |
+
|
175 |
+
|
176 |
+
<escrow translate="label">
|
177 |
+
<label>Escrow Image</label>
|
178 |
+
<frontend_type>select</frontend_type>
|
179 |
+
<source_model>ipay/system_config_source_escrow</source_model>
|
180 |
+
<sort_order>101</sort_order>
|
181 |
+
<show_in_default>1</show_in_default>
|
182 |
+
<show_in_website>1</show_in_website>
|
183 |
+
<show_in_store>1</show_in_store>
|
184 |
+
<comment><![CDATA[
|
185 |
+
<span ><table width='100%' >
|
186 |
+
<tr><td align=center width=50%>Logo 1</td><td align=center width=50%>Logo 2</td></tr>
|
187 |
+
<tr><td align=center><img src='http://click4.checkoutshop.co.kr/skin/frontend/default/default/images/ipay/logo_ipay01.gif'></td><td align=center><img src='http://click4.checkoutshop.co.kr/skin/frontend/default/default/images/ipay/logo_ipay02.gif'></td></tr></table>
|
188 |
+
</span>
|
189 |
+
]]>
|
190 |
+
</comment>
|
191 |
+
</escrow>
|
192 |
+
|
193 |
+
<escrow_enable translate="label">
|
194 |
+
<label>Enable Escrow Image</label>
|
195 |
+
<frontend_type>select</frontend_type>
|
196 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
197 |
+
<sort_order>100</sort_order>
|
198 |
+
<show_in_default>1</show_in_default>
|
199 |
+
<show_in_website>1</show_in_website>
|
200 |
+
<show_in_store>1</show_in_store>
|
201 |
+
</escrow_enable>
|
202 |
+
|
203 |
+
<placeorderenable translate="label">
|
204 |
+
<label>Place Order When Invoice created</label>
|
205 |
+
<frontend_type>select</frontend_type>
|
206 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
207 |
+
<sort_order>102</sort_order>
|
208 |
+
<show_in_default>1</show_in_default>
|
209 |
+
<show_in_website>1</show_in_website>
|
210 |
+
<show_in_store>1</show_in_store>
|
211 |
+
</placeorderenable>
|
212 |
+
|
213 |
+
<shipmentenable translate="label">
|
214 |
+
<label>Create iPay Ship When shipped</label>
|
215 |
+
<frontend_type>select</frontend_type>
|
216 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
217 |
+
<sort_order>103</sort_order>
|
218 |
+
<show_in_default>1</show_in_default>
|
219 |
+
<show_in_website>1</show_in_website>
|
220 |
+
<show_in_store>1</show_in_store>
|
221 |
+
</shipmentenable>
|
222 |
+
<address_required>
|
223 |
+
<label>Address Required</label>
|
224 |
+
<frontend_type>select</frontend_type>
|
225 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
226 |
+
<sort_order>104</sort_order>
|
227 |
+
<show_in_default>1</show_in_default>
|
228 |
+
<show_in_website>1</show_in_website>
|
229 |
+
<show_in_store>1</show_in_store>
|
230 |
+
</address_required>
|
231 |
+
|
232 |
+
<!--shipcompany translate="label">
|
233 |
+
<label>shipment company</label>
|
234 |
+
<frontend_type>select</frontend_type>
|
235 |
+
<source_model>ipay/system_config_source_company</source_model>
|
236 |
+
<sort_order>104</sort_order>
|
237 |
+
<show_in_default>1</show_in_default>
|
238 |
+
<show_in_website>1</show_in_website>
|
239 |
+
<show_in_store>1</show_in_store>
|
240 |
+
</shipcompany-->
|
241 |
+
</fields>
|
242 |
+
</ipay>
|
243 |
+
</groups>
|
244 |
+
</payment>
|
245 |
+
</sections>
|
246 |
+
</config>
|
app/code/community/Esellers/Ipay/sql/ipay_setup/mysql4-upgrade-1.0.0-1.1.0.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* To change this template, choose Tools | Templates
|
4 |
+
* and open the template in the editor.
|
5 |
+
*/
|
6 |
+
$installer = $this;
|
7 |
+
$installer->startSetup();
|
8 |
+
|
9 |
+
$installer->run("
|
10 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('ipay')} (
|
11 |
+
`ipay_id` int(11) unsigned NOT NULL auto_increment,
|
12 |
+
`auction_order_no` varchar(50) NOT NULL,
|
13 |
+
`ipay_cart_no` int(10) NOT NULL,
|
14 |
+
`orderdate` date,
|
15 |
+
`bankcode` varchar(20) ,
|
16 |
+
`bankname` varchar(50) ,
|
17 |
+
`paydate` date,
|
18 |
+
`payprice` int(10),
|
19 |
+
`payment_type` char(1),
|
20 |
+
`expire_date` date,
|
21 |
+
`card_name` varchar(20),
|
22 |
+
`auction_pay_no` varchar(20),
|
23 |
+
`quote_id` int(11),
|
24 |
+
`order_id` varchar(30),
|
25 |
+
`checkoutsession` varchar(200),
|
26 |
+
`auction_item_no` varchar(20),
|
27 |
+
PRIMARY KEY (`ipay_id`)
|
28 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
29 |
+
|
30 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/model','Esellers_Ipay_Model_Carrier_ShippingMethod');
|
31 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/handling_fee','0');
|
32 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/active','1');
|
33 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/title','Cash On Delivery');
|
34 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/handling_action','O');
|
35 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/handling_type','F');
|
36 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'carriers/ipay/shiptype','3');
|
37 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'pament/ipay/ipayuse','1');
|
38 |
+
insert into core_config_data (scope, scope_id,path,value) values ('default',0,'pament/ipay/ipay_payment_method','0')
|
39 |
+
");
|
40 |
+
$installer->endSetup();
|
41 |
+
?>
|
app/code/community/Esellers/Naverep/Block/System/Config/Form/Fieldep.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Form element default renderer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Naverep_Block_System_Config_Form_Fieldep extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface
|
35 |
+
{
|
36 |
+
protected $_element;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Enter description here...
|
40 |
+
*
|
41 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
42 |
+
* @return string
|
43 |
+
*/
|
44 |
+
public function render(Varien_Data_Form_Element_Abstract $element)
|
45 |
+
{
|
46 |
+
$id = $element->getHtmlId();
|
47 |
+
|
48 |
+
$html = '<td class="label"><label for="'.$id.'">'.$element->getLabel().'</label></td>';
|
49 |
+
|
50 |
+
//$isDefault = !$this->getRequest()->getParam('website') && !$this->getRequest()->getParam('store');
|
51 |
+
$isMultiple = $element->getExtType()==='multiple';
|
52 |
+
|
53 |
+
// replace [value] with [inherit]
|
54 |
+
$namePrefix = preg_replace('#\[value\](\[\])?$#', '', $element->getName());
|
55 |
+
|
56 |
+
$options = $element->getValues();
|
57 |
+
|
58 |
+
$addInheritCheckbox = false;
|
59 |
+
if ($element->getCanUseWebsiteValue()) {
|
60 |
+
$addInheritCheckbox = true;
|
61 |
+
$checkboxLabel = Mage::helper('adminhtml')->__('Use Website');
|
62 |
+
}
|
63 |
+
elseif ($element->getCanUseDefaultValue()) {
|
64 |
+
$addInheritCheckbox = true;
|
65 |
+
$checkboxLabel = Mage::helper('adminhtml')->__('Use Default');
|
66 |
+
}
|
67 |
+
|
68 |
+
if ($addInheritCheckbox) {
|
69 |
+
$inherit = $element->getInherit()==1 ? 'checked="checked"' : '';
|
70 |
+
if ($inherit) {
|
71 |
+
$element->setDisabled(true);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
|
75 |
+
if ($element->getTooltip()) {
|
76 |
+
$html .= '<td class="value with-tooltip">';
|
77 |
+
$html .= $this->_getElementHtml($element);
|
78 |
+
$html .= '<div class="field-tooltip"><div>' . $element->getTooltip() . '</div></div>';
|
79 |
+
} else {
|
80 |
+
$html .= '<td class="value">';
|
81 |
+
$html .= $this->_getElementHtml($element);
|
82 |
+
};
|
83 |
+
if ($element->getComment()) {
|
84 |
+
$html.= '<p class="note"><span>'.$element->getComment().'</span></p>';
|
85 |
+
}
|
86 |
+
$html.= '</td>';
|
87 |
+
|
88 |
+
if ($addInheritCheckbox) {
|
89 |
+
|
90 |
+
$defText = $element->getDefaultValue();
|
91 |
+
if ($options) {
|
92 |
+
$defTextArr = array();
|
93 |
+
foreach ($options as $k=>$v) {
|
94 |
+
if ($isMultiple) {
|
95 |
+
if (is_array($v['value']) && in_array($k, $v['value'])) {
|
96 |
+
$defTextArr[] = $v['label'];
|
97 |
+
}
|
98 |
+
} elseif ($v['value']==$defText) {
|
99 |
+
$defTextArr[] = $v['label'];
|
100 |
+
break;
|
101 |
+
}
|
102 |
+
}
|
103 |
+
$defText = join(', ', $defTextArr);
|
104 |
+
}
|
105 |
+
|
106 |
+
// default value
|
107 |
+
$html.= '<td class="use-default">';
|
108 |
+
//$html.= '<input id="'.$id.'_inherit" name="'.$namePrefix.'[inherit]" type="checkbox" value="1" class="input-checkbox config-inherit" '.$inherit.' onclick="$(\''.$id.'\').disabled = this.checked">';
|
109 |
+
$html.= '<input id="'.$id.'_inherit" name="'.$namePrefix.'[inherit]" type="checkbox" value="1" class="checkbox config-inherit" '.$inherit.' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ';
|
110 |
+
$html.= '<label for="'.$id.'_inherit" class="inherit" title="'.htmlspecialchars($defText).'">'.$checkboxLabel.'</label>';
|
111 |
+
$html.= '</td>';
|
112 |
+
}
|
113 |
+
|
114 |
+
$html.= '<td class="scope-label">';
|
115 |
+
if ($element->getScope()) {
|
116 |
+
$html .= $element->getScopeLabel();
|
117 |
+
}
|
118 |
+
$html.= '</td>';
|
119 |
+
|
120 |
+
$html.= '<td class="">';
|
121 |
+
if ($element->getHint()) {
|
122 |
+
$html.= '<div class="hint" >';
|
123 |
+
$html.= '<div style="display: none;">' . $element->getHint() . '</div>';
|
124 |
+
$html.= '</div>';
|
125 |
+
}
|
126 |
+
$html.= '</td>';
|
127 |
+
|
128 |
+
return $this->_decorateRowHtml($element, $html);
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Decorate field row html
|
133 |
+
*
|
134 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
135 |
+
* @param string $html
|
136 |
+
* @return string
|
137 |
+
*/
|
138 |
+
protected function _decorateRowHtml($element, $html)
|
139 |
+
{
|
140 |
+
return '<tr id="row_' . $element->getHtmlId() . '">' . $html . '</tr>';
|
141 |
+
}
|
142 |
+
}
|
app/code/community/Esellers/Naverep/Helper/Data.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Esellers_Naverep_Helper_Data extends Mage_Core_Helper_Abstract
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Esellers/Naverep/Model/Createep.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Naverep_Model_Createep extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
var $fp;
|
5 |
+
|
6 |
+
public function makeEp() {
|
7 |
+
$productIds=$this->getProductIds(1);
|
8 |
+
|
9 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds);
|
10 |
+
|
11 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
12 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
13 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
14 |
+
|
15 |
+
//$fp = fopen(Mage::getBaseDir()."/ep.txt","w+");
|
16 |
+
$data = "<<<begin>>>\n";
|
17 |
+
|
18 |
+
foreach ($collection as $product){
|
19 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
20 |
+
|
21 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
22 |
+
$pgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).$product->getUrlPath();
|
23 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
24 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
25 |
+
$data .= "<<<price>>>".$price."\n";
|
26 |
+
$data .= "<<<pgurl>>>".$pgurl."\n";
|
27 |
+
$data .= "<<<mourl>>>".$pgurl."\n";
|
28 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
29 |
+
|
30 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
31 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
32 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
33 |
+
}
|
34 |
+
|
35 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
36 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
37 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
38 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
39 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
40 |
+
$data .= "<<<event>>>\n";
|
41 |
+
}
|
42 |
+
$data .= "<<<ftend>>>\n";
|
43 |
+
header("Cache-Control: no-cache, must-revalidate");
|
44 |
+
header("Content-Type: text/plain; charset=euc-kr");
|
45 |
+
echo $data;
|
46 |
+
//fwrite($fp,$data);
|
47 |
+
//fclose($fp);
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getCategoryData($category_id,$data,$initLevel){
|
51 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
52 |
+
$level = $category->getLevel();
|
53 |
+
if($level>1){
|
54 |
+
$data="<<<cate".($level-1).">>>".$category->getName()."\n".$data;
|
55 |
+
$data="<<<caid".($level-1).">>>".$category_id."\n".$data;
|
56 |
+
|
57 |
+
return $this->getCategoryData($category->getParentId(),$data,$initLevel);
|
58 |
+
}else{
|
59 |
+
for($i=$initLevel;$i<5;$i++){
|
60 |
+
$data.="<<<cate".($i).">>>\n";
|
61 |
+
$data.="<<<caid".($i).">>>\n";
|
62 |
+
}
|
63 |
+
return $data;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
public function makeSummaryep() {
|
68 |
+
|
69 |
+
$data = "<<<begin>>>\n";
|
70 |
+
$productIds=$this->getProductIds(1);
|
71 |
+
$nowtime=date("Y-m-d", time()-86400)." 08:00:00";
|
72 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addFieldToFilter("updated_at",array("gt"=>"$nowtime"))->addIdFilter($productIds);
|
73 |
+
|
74 |
+
$data .= $this->makeTxt("in",$collection);
|
75 |
+
|
76 |
+
|
77 |
+
$productIds_out=$this->getProductIds(0);
|
78 |
+
|
79 |
+
$collection_out = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds_out);
|
80 |
+
$data .= $this->makeTxt("out",$collection_out);
|
81 |
+
|
82 |
+
|
83 |
+
$data .= "<<<ftend>>>\n";
|
84 |
+
|
85 |
+
|
86 |
+
header("Cache-Control: no-cache, must-revalidate");
|
87 |
+
header("Content-Type: text/plain; charset=euc-kr");
|
88 |
+
echo $data;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function getProductIds($status){
|
92 |
+
$stockCollection = Mage::getModel('cataloginventory/stock_item')->getCollection()->addFieldToFilter('is_in_stock',$status);
|
93 |
+
$productIds = array();
|
94 |
+
|
95 |
+
foreach ($stockCollection as $item){
|
96 |
+
$productIds[] = $item->getOrigData('product_id');
|
97 |
+
}
|
98 |
+
return $productIds;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function makeTxt($mode,$collection){
|
102 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
103 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
104 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
105 |
+
$data="";
|
106 |
+
|
107 |
+
foreach ($collection as $product){
|
108 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
109 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
110 |
+
|
111 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
112 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
113 |
+
$data .= "<<<price>>>".$price."\n";
|
114 |
+
$data .= "<<<pgurl>>>".$product->getProductUrl()."\n";
|
115 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
116 |
+
|
117 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
118 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
119 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
120 |
+
}
|
121 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
122 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
123 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
124 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
125 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
126 |
+
|
127 |
+
$data .="<<<utime>>>".$product->getUpdatedAt()."\n";
|
128 |
+
|
129 |
+
if($mode=="in"){
|
130 |
+
$data .="<<<class>>U\n";
|
131 |
+
}else if($mode=="out"){
|
132 |
+
$data .="<<<class>>D\n";
|
133 |
+
}
|
134 |
+
|
135 |
+
$data .= "<<<event>>>\n";
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
return $data;
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
public function getAllShippingPrice()
|
144 |
+
{
|
145 |
+
$store=Mage::app()->getStore()->getId();
|
146 |
+
$carriers = Mage::getStoreConfig('carriers', $store);
|
147 |
+
foreach ($carriers as $carrierCode => $carrierConfig) {
|
148 |
+
if (Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/active', $store)) {
|
149 |
+
if($carrierCode=="flatrate"){
|
150 |
+
return $carrierConfig["price"];
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return 0;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
?>
|
app/code/community/Esellers/Naverep/Model/Createep_.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Naverep_Model_Createep extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
var $fp;
|
5 |
+
|
6 |
+
public function makeEp() {
|
7 |
+
$productIds=$this->getProductIds(1);
|
8 |
+
|
9 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds);
|
10 |
+
|
11 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
12 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
13 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
14 |
+
|
15 |
+
$fp = fopen(Mage::getBaseDir()."/ep.txt","w+");
|
16 |
+
$data = "<<<begin>>>\n";
|
17 |
+
|
18 |
+
foreach ($collection as $product){
|
19 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
20 |
+
|
21 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
22 |
+
$pgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).$product->getUrlPath();
|
23 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
24 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
25 |
+
$data .= "<<<price>>>".$price."\n";
|
26 |
+
$data .= "<<<pgurl>>>".$pgurl."\n";
|
27 |
+
$data .= "<<<mourl>>>".$pgurl."\n";
|
28 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
29 |
+
|
30 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
31 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
32 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
33 |
+
}
|
34 |
+
|
35 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
36 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
37 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
38 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
39 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
40 |
+
$data .= "<<<event>>>\n";
|
41 |
+
}
|
42 |
+
$data .= "<<<ftend>>>\n";
|
43 |
+
fwrite($fp,$data);
|
44 |
+
fclose($fp);
|
45 |
+
}
|
46 |
+
|
47 |
+
public function getCategoryData($category_id,$data,$initLevel){
|
48 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
49 |
+
$level = $category->getLevel();
|
50 |
+
if($level>1){
|
51 |
+
$data="<<<cate".($level-1).">>>".$category->getName()."\n".$data;
|
52 |
+
$data="<<<caid".($level-1).">>>".$category_id."\n".$data;
|
53 |
+
|
54 |
+
return $this->getCategoryData($category->getParentId(),$data,$initLevel);
|
55 |
+
}else{
|
56 |
+
for($i=$initLevel;$i<5;$i++){
|
57 |
+
$data.="<<<cate".($i).">>>\n";
|
58 |
+
$data.="<<<caid".($i).">>>\n";
|
59 |
+
}
|
60 |
+
return $data;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
public function makeSummaryep() {
|
65 |
+
$fp = fopen(Mage::getBaseDir()."/ep_summary.txt","w+");
|
66 |
+
$data = "<<<begin>>>\n";
|
67 |
+
$productIds=$this->getProductIds(1);
|
68 |
+
$nowtime=date("Y-m-d", time()-86400)." 08:00:00";
|
69 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addFieldToFilter("updated_at",array("gt"=>"$nowtime"))->addIdFilter($productIds);
|
70 |
+
|
71 |
+
$data .= $this->makeTxt("in",$collection);
|
72 |
+
|
73 |
+
|
74 |
+
$productIds_out=$this->getProductIds(0);
|
75 |
+
|
76 |
+
$collection_out = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds_out);
|
77 |
+
$data .= $this->makeTxt("out",$collection_out);
|
78 |
+
|
79 |
+
|
80 |
+
$data .= "<<<ftend>>>\n";
|
81 |
+
|
82 |
+
|
83 |
+
fwrite($fp,$data);
|
84 |
+
fclose($fp);
|
85 |
+
}
|
86 |
+
|
87 |
+
public function getProductIds($status){
|
88 |
+
$stockCollection = Mage::getModel('cataloginventory/stock_item')->getCollection()->addFieldToFilter('is_in_stock',$status);
|
89 |
+
$productIds = array();
|
90 |
+
|
91 |
+
foreach ($stockCollection as $item){
|
92 |
+
$productIds[] = $item->getOrigData('product_id');
|
93 |
+
}
|
94 |
+
return $productIds;
|
95 |
+
}
|
96 |
+
|
97 |
+
public function makeTxt($mode,$collection){
|
98 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
99 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
100 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
101 |
+
$data="";
|
102 |
+
|
103 |
+
foreach ($collection as $product){
|
104 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
105 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
106 |
+
|
107 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
108 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
109 |
+
$data .= "<<<price>>>".$price."\n";
|
110 |
+
$data .= "<<<pgurl>>>".$product->getProductUrl()."\n";
|
111 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
112 |
+
|
113 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
114 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
115 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
116 |
+
}
|
117 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
118 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
119 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
120 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
121 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
122 |
+
|
123 |
+
$data .=" <<<utime>>>".$product->getUpdatedAt()."\n";
|
124 |
+
|
125 |
+
if($mode=="in"){
|
126 |
+
$data .=" <<<class>>U\n";
|
127 |
+
}else if($mode=="out"){
|
128 |
+
$data .=" <<<class>>D\n";
|
129 |
+
}
|
130 |
+
|
131 |
+
$data .= "<<<event>>>\n";
|
132 |
+
}
|
133 |
+
|
134 |
+
|
135 |
+
return $data;
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
public function getAllShippingPrice()
|
140 |
+
{
|
141 |
+
$store=Mage::app()->getStore()->getId();
|
142 |
+
$carriers = Mage::getStoreConfig('carriers', $store);
|
143 |
+
foreach ($carriers as $carrierCode => $carrierConfig) {
|
144 |
+
if (Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/active', $store)) {
|
145 |
+
if($carrierCode=="flatrate"){
|
146 |
+
return $carrierConfig["price"];
|
147 |
+
}
|
148 |
+
}
|
149 |
+
}
|
150 |
+
return 0;
|
151 |
+
}
|
152 |
+
}
|
153 |
+
?>
|
app/code/community/Esellers/Naverep/Model/Createep__.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Naverep_Model_Createep extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
var $fp;
|
5 |
+
|
6 |
+
public function makeEp() {
|
7 |
+
$productIds=$this->getProductIds(1);
|
8 |
+
|
9 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds);
|
10 |
+
|
11 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
12 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
13 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
14 |
+
|
15 |
+
//$fp = fopen(Mage::getBaseDir()."/ep.txt","w+");
|
16 |
+
$data = "<<<begin>>>\n";
|
17 |
+
|
18 |
+
foreach ($collection as $product){
|
19 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
20 |
+
|
21 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
22 |
+
$pgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).$product->getUrlPath();
|
23 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
24 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
25 |
+
$data .= "<<<price>>>".$price."\n";
|
26 |
+
$data .= "<<<pgurl>>>".$pgurl."\n";
|
27 |
+
$data .= "<<<mourl>>>".$pgurl."\n";
|
28 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
29 |
+
|
30 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
31 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
32 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
33 |
+
}
|
34 |
+
|
35 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
36 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
37 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
38 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
39 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
40 |
+
$data .= "<<<event>>>\n";
|
41 |
+
}
|
42 |
+
$data .= "<<<ftend>>>\n";
|
43 |
+
header("Cache-Control: no-cache, must-revalidate");
|
44 |
+
header("Content-Type: text/plain; charset=euc-kr");
|
45 |
+
echo $data;
|
46 |
+
//fwrite($fp,$data);
|
47 |
+
//fclose($fp);
|
48 |
+
}
|
49 |
+
|
50 |
+
public function getCategoryData($category_id,$data,$initLevel){
|
51 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
52 |
+
$level = $category->getLevel();
|
53 |
+
if($level>1){
|
54 |
+
$data="<<<cate".($level-1).">>>".$category->getName()."\n".$data;
|
55 |
+
$data="<<<caid".($level-1).">>>".$category_id."\n".$data;
|
56 |
+
|
57 |
+
return $this->getCategoryData($category->getParentId(),$data,$initLevel);
|
58 |
+
}else{
|
59 |
+
for($i=$initLevel;$i<5;$i++){
|
60 |
+
$data.="<<<cate".($i).">>>\n";
|
61 |
+
$data.="<<<caid".($i).">>>\n";
|
62 |
+
}
|
63 |
+
return $data;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
public function makeSummaryep() {
|
68 |
+
|
69 |
+
$data = "<<<begin>>>\n";
|
70 |
+
$productIds=$this->getProductIds(1);
|
71 |
+
$nowtime=date("Y-m-d", time()-86400)." 08:00:00";
|
72 |
+
$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addFieldToFilter("updated_at",array("gt"=>"$nowtime"))->addIdFilter($productIds);
|
73 |
+
|
74 |
+
$data .= $this->makeTxt("in",$collection);
|
75 |
+
|
76 |
+
|
77 |
+
$productIds_out=$this->getProductIds(0);
|
78 |
+
|
79 |
+
$collection_out = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addIdFilter($productIds_out);
|
80 |
+
$data .= $this->makeTxt("out",$collection_out);
|
81 |
+
|
82 |
+
|
83 |
+
$data .= "<<<ftend>>>\n";
|
84 |
+
|
85 |
+
|
86 |
+
header("Cache-Control: no-cache, must-revalidate");
|
87 |
+
header("Content-Type: text/plain; charset=euc-kr");
|
88 |
+
echo $data;
|
89 |
+
}
|
90 |
+
|
91 |
+
public function getProductIds($status){
|
92 |
+
$stockCollection = Mage::getModel('cataloginventory/stock_item')->getCollection()->addFieldToFilter('is_in_stock',$status);
|
93 |
+
$productIds = array();
|
94 |
+
|
95 |
+
foreach ($stockCollection as $item){
|
96 |
+
$productIds[] = $item->getOrigData('product_id');
|
97 |
+
}
|
98 |
+
return $productIds;
|
99 |
+
}
|
100 |
+
|
101 |
+
public function makeTxt($mode,$collection){
|
102 |
+
$baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode();
|
103 |
+
$currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
104 |
+
$shipfee = (int)Mage::helper('directory')->currencyConvert($this->getAllShippingPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
105 |
+
$data="";
|
106 |
+
|
107 |
+
foreach ($collection as $product){
|
108 |
+
$price = (int)Mage::helper('directory')->currencyConvert($product->getPrice(), $baseCurrencyCode, $currentCurrencyCode);
|
109 |
+
$imgurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$product->getImage();
|
110 |
+
|
111 |
+
$data .= "<<<mapid>>>".$product->getSku()."\n";
|
112 |
+
$data .= "<<<pname>>>".$product->getName()."\n";
|
113 |
+
$data .= "<<<price>>>".$price."\n";
|
114 |
+
$data .= "<<<pgurl>>>".$product->getProductUrl()."\n";
|
115 |
+
$data .= "<<<igurl>>>".$imgurl."\n";
|
116 |
+
|
117 |
+
foreach ($product->getCategoryIds() as $category_id) {
|
118 |
+
$category = Mage::getModel('catalog/category')->load($category_id);
|
119 |
+
$data.= $this->getCategoryData($category_id,"",$category->getLevel());
|
120 |
+
}
|
121 |
+
$data .= "<<<model>>>".$product->getModel()."\n";
|
122 |
+
//$data .= "<<<brand>>>".$product->getAttributeText('computer_manufacturers')."\n";
|
123 |
+
$data .= "<<<maker>>>".$product->getAttributeText('manufacturer')."\n";
|
124 |
+
$data .= "<<<origi>>>".$product->getAttributeText('country_of_manufacture')."\n";
|
125 |
+
$data .= "<<<deliv>>>$shipfee\n";
|
126 |
+
|
127 |
+
$data .="<<<utime>>>".$product->getUpdatedAt()."\n";
|
128 |
+
|
129 |
+
if($mode=="in"){
|
130 |
+
$data .="<<<class>>U\n";
|
131 |
+
}else if($mode=="out"){
|
132 |
+
$data .="<<<class>>D\n";
|
133 |
+
}
|
134 |
+
|
135 |
+
$data .= "<<<event>>>\n";
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
return $data;
|
140 |
+
|
141 |
+
}
|
142 |
+
|
143 |
+
public function getAllShippingPrice()
|
144 |
+
{
|
145 |
+
$store=Mage::app()->getStore()->getId();
|
146 |
+
$carriers = Mage::getStoreConfig('carriers', $store);
|
147 |
+
foreach ($carriers as $carrierCode => $carrierConfig) {
|
148 |
+
if (Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/active', $store)) {
|
149 |
+
if($carrierCode=="flatrate"){
|
150 |
+
return $carrierConfig["price"];
|
151 |
+
}
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return 0;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
?>
|
app/code/community/Esellers/Naverep/Model/System/Config/Source/EPUrl.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* BelVG LLC.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
11 |
+
*
|
12 |
+
/***************************************
|
13 |
+
* MAGENTO EDITION USAGE NOTICE *
|
14 |
+
*****************************************/
|
15 |
+
/* This package designed for Magento COMMUNITY edition
|
16 |
+
* BelVG does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* BelVG does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
/***************************************
|
21 |
+
* DISCLAIMER *
|
22 |
+
*****************************************/
|
23 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
24 |
+
* versions in the future.
|
25 |
+
*****************************************************
|
26 |
+
* @category Esellers
|
27 |
+
* @package Esellers_Ipay
|
28 |
+
* @copyright Copyright (c) 2010 - 2011 BelVG LLC. (http://www.belvg.com)
|
29 |
+
* @license http://store.belvg.com/BelVG-LICENSE-COMMUNITY.txt
|
30 |
+
*/
|
31 |
+
|
32 |
+
class Esellers_Naverep_Model_System_Config_Source_Epurl
|
33 |
+
{
|
34 |
+
public function toOptionArray()
|
35 |
+
{
|
36 |
+
return array(
|
37 |
+
array('value'=>Mage::getStoreConfig('web/unsecure/base_url')."ep.txt", 'label'=>Mage::helper('ipay')->__(Mage::getStoreConfig('web/unsecure/base_url')."ep.txt")),
|
38 |
+
);
|
39 |
+
}
|
40 |
+
}
|
app/code/community/Esellers/Naverep/controllers/EpController.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Esellers_Naverep_EpController extends Mage_Core_Controller_Front_Action {
|
3 |
+
|
4 |
+
public function indexAction()
|
5 |
+
{
|
6 |
+
$model=Mage::getModel("naverep/createep");
|
7 |
+
$model->makeEp();
|
8 |
+
//$this->loadLayout();
|
9 |
+
//$this->renderLayout();
|
10 |
+
}
|
11 |
+
|
12 |
+
public function summaryAction()
|
13 |
+
{
|
14 |
+
$model=Mage::getModel("naverep/createep");
|
15 |
+
$model->makeSummaryep();
|
16 |
+
}
|
17 |
+
}
|
app/code/community/Esellers/Naverep/etc/adminhtml.xml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<acl>
|
5 |
+
<resources>
|
6 |
+
<all>
|
7 |
+
<title>Esellers Naver EP</title>
|
8 |
+
</all>
|
9 |
+
<admin>
|
10 |
+
<children>
|
11 |
+
<system>
|
12 |
+
<children>
|
13 |
+
<config>
|
14 |
+
<children>
|
15 |
+
<naverep translate="label">
|
16 |
+
<title>Naver Ep</title>
|
17 |
+
</naverep>
|
18 |
+
</children>
|
19 |
+
</config>
|
20 |
+
</children>
|
21 |
+
</system>
|
22 |
+
</children>
|
23 |
+
</admin>
|
24 |
+
</resources>
|
25 |
+
</acl>
|
26 |
+
</config>
|
app/code/community/Esellers/Naverep/etc/config.xml
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Esellers_Naverep>
|
5 |
+
<version>1.1.0</version>
|
6 |
+
</Esellers_Naverep>
|
7 |
+
</modules>
|
8 |
+
<frontend>
|
9 |
+
<routers>
|
10 |
+
<naverep>
|
11 |
+
<use>standard</use>
|
12 |
+
<args>
|
13 |
+
<module>Esellers_Naverep</module>
|
14 |
+
<frontName>naverep</frontName>
|
15 |
+
</args>
|
16 |
+
</naverep>
|
17 |
+
</routers>
|
18 |
+
<default>
|
19 |
+
<router>naverep</router>
|
20 |
+
</default>
|
21 |
+
<layout>
|
22 |
+
<updates>
|
23 |
+
<naverep>
|
24 |
+
<file>naverep.xml</file>
|
25 |
+
</naverep>
|
26 |
+
</updates>
|
27 |
+
</layout>
|
28 |
+
</frontend>
|
29 |
+
<adminhtml>
|
30 |
+
<layout>
|
31 |
+
<updates>
|
32 |
+
<naverep>
|
33 |
+
<file>naverep.xml</file>
|
34 |
+
</naverep>
|
35 |
+
</updates>
|
36 |
+
</layout>
|
37 |
+
</adminhtml>
|
38 |
+
<global>
|
39 |
+
<models>
|
40 |
+
<naverep>
|
41 |
+
<class>Esellers_Naverep_Model</class>
|
42 |
+
<resourceModel>naverep_mysql4</resourceModel>
|
43 |
+
</naverep>
|
44 |
+
<createep>
|
45 |
+
<rewrite>
|
46 |
+
<po>Esellers_Naverep_Model_Createep</po>
|
47 |
+
<!-- statement>Unirgy_DropshipPo_Model_Statement</statement -->
|
48 |
+
</rewrite>
|
49 |
+
</createep>
|
50 |
+
|
51 |
+
</models>
|
52 |
+
<resources>
|
53 |
+
<naverep_setup>
|
54 |
+
<setup>
|
55 |
+
<module>Esellers_Naverep</module>
|
56 |
+
</setup>
|
57 |
+
<connection>
|
58 |
+
<use>core_setup</use>
|
59 |
+
</connection>
|
60 |
+
</naverep_setup>
|
61 |
+
<naverep_write>
|
62 |
+
<connection>
|
63 |
+
<use>core_write</use>
|
64 |
+
</connection>
|
65 |
+
</naverep_write>
|
66 |
+
<naverep_read>
|
67 |
+
<connection>
|
68 |
+
<use>core_read</use>
|
69 |
+
</connection>
|
70 |
+
</naverep_read>
|
71 |
+
</resources>
|
72 |
+
<blocks>
|
73 |
+
<naverep>
|
74 |
+
<class>Esellers_Naverep_Block</class>
|
75 |
+
</naverep>
|
76 |
+
</blocks>
|
77 |
+
<helpers>
|
78 |
+
<naverep>
|
79 |
+
<class>Esellers_Naverep_Helper</class>
|
80 |
+
</naverep>
|
81 |
+
</helpers>
|
82 |
+
</global>
|
83 |
+
<default>
|
84 |
+
<naverep>
|
85 |
+
<ENABLED>1</ENABLED>
|
86 |
+
<DBEngine>
|
87 |
+
<fullepurl>{{base_url}}/ep.txt</fullepurl>
|
88 |
+
<shortepurl>{{base_url}}/ep_summary.txt</shortepurl>
|
89 |
+
</DBEngine>
|
90 |
+
</naverep>
|
91 |
+
</default>
|
92 |
+
</config>
|
app/code/community/Esellers/Naverep/etc/system.xml
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<tabs>
|
4 |
+
<esellers translate="label" module="naverep">
|
5 |
+
<label>Product DB EP</label>
|
6 |
+
<sort_order>200</sort_order>
|
7 |
+
</esellers>
|
8 |
+
</tabs>
|
9 |
+
<sections>
|
10 |
+
<naverep translate="label">
|
11 |
+
<label>NAVER Knowledge Shopping</label>
|
12 |
+
<tab>esellers</tab>
|
13 |
+
<frontend_type>text</frontend_type>
|
14 |
+
<sort_order>1000</sort_order>
|
15 |
+
<show_in_default>1</show_in_default>
|
16 |
+
<show_in_website>1</show_in_website>
|
17 |
+
<show_in_store>1</show_in_store>
|
18 |
+
<groups>
|
19 |
+
<!-- New groups go here -->
|
20 |
+
<DBEngine translate="label">
|
21 |
+
<label>Product DB Enging Page Information</label>
|
22 |
+
<frontend_type>text</frontend_type>
|
23 |
+
<sort_order>100</sort_order>
|
24 |
+
<show_in_default>1</show_in_default>
|
25 |
+
<show_in_website>1</show_in_website>
|
26 |
+
<show_in_store>1</show_in_store>
|
27 |
+
<fields>
|
28 |
+
<active translate="label">
|
29 |
+
<label>EP USE</label>
|
30 |
+
<frontend_type>select</frontend_type>
|
31 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
32 |
+
<sort_order>1</sort_order>
|
33 |
+
<show_in_default>1</show_in_default>
|
34 |
+
<show_in_website>1</show_in_website>
|
35 |
+
<show_in_store>0</show_in_store>
|
36 |
+
</active>
|
37 |
+
|
38 |
+
<fullepurl translate="label">
|
39 |
+
<label>Full EP URL</label>
|
40 |
+
<frontend_type>linkep</frontend_type>
|
41 |
+
<sort_order>1</sort_order>
|
42 |
+
<show_in_default>1</show_in_default>
|
43 |
+
<show_in_website>1</show_in_website>
|
44 |
+
<show_in_store>0</show_in_store>
|
45 |
+
</fullepurl>
|
46 |
+
<shortepurl translate="label">
|
47 |
+
<label>Short EP URL</label>
|
48 |
+
<frontend_type>linksummaryep</frontend_type>
|
49 |
+
<sort_order>2</sort_order>
|
50 |
+
<show_in_default>1</show_in_default>
|
51 |
+
<show_in_website>1</show_in_website>
|
52 |
+
<show_in_store>0</show_in_store>
|
53 |
+
</shortepurl>
|
54 |
+
<eplabel>
|
55 |
+
<frontend_type>labelep</frontend_type>
|
56 |
+
<sort_order>3</sort_order>
|
57 |
+
<show_in_default>1</show_in_default>
|
58 |
+
<show_in_website>1</show_in_website>
|
59 |
+
<show_in_store>0</show_in_store>
|
60 |
+
</eplabel>
|
61 |
+
</fields>
|
62 |
+
</DBEngine>
|
63 |
+
</groups>
|
64 |
+
</naverep>
|
65 |
+
</sections>
|
66 |
+
|
67 |
+
</config>
|
app/code/community/Esellers/Salesgrid/Block/Sales/Order.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Salesgrid_Block_Sales_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
$this->_controller = 'sales_order';
|
40 |
+
|
41 |
+
parent::__construct();
|
42 |
+
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders grid
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Esellers_Salesgrid_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
35 |
+
{
|
36 |
+
public function __construct()
|
37 |
+
{
|
38 |
+
parent::__construct();
|
39 |
+
$this->setId('sales_order_grid');
|
40 |
+
$this->setUseAjax(true);
|
41 |
+
$this->setDefaultSort('created_at');
|
42 |
+
$this->setDefaultDir('DESC');
|
43 |
+
$this->setSaveParametersInSession(true);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Retrieve collection class
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
protected function _getCollectionClass()
|
52 |
+
{
|
53 |
+
return 'sales/order_grid_collection';
|
54 |
+
}
|
55 |
+
|
56 |
+
protected function _prepareCollection()
|
57 |
+
{
|
58 |
+
$collection = Mage::getResourceModel($this->_getCollectionClass());
|
59 |
+
|
60 |
+
// grid 추가
|
61 |
+
$collection->getSelect()
|
62 |
+
->joinLeft(
|
63 |
+
array('sfoi' => 'sales_flat_order_item'),
|
64 |
+
'sfoi.order_id=main_table.entity_id',
|
65 |
+
array()
|
66 |
+
)
|
67 |
+
->columns(array('sku' => new Zend_Db_Expr('GROUP_CONCAT(sfoi.sku)')))
|
68 |
+
->group('entity_id');
|
69 |
+
//
|
70 |
+
|
71 |
+
|
72 |
+
$this->setCollection($collection);
|
73 |
+
return parent::_prepareCollection();
|
74 |
+
}
|
75 |
+
|
76 |
+
protected function _prepareColumns()
|
77 |
+
{
|
78 |
+
|
79 |
+
$this->addColumn('real_order_id', array(
|
80 |
+
'header'=> Mage::helper('sales')->__('Order #'),
|
81 |
+
'width' => '80px',
|
82 |
+
'type' => 'text',
|
83 |
+
'index' => 'increment_id',
|
84 |
+
));
|
85 |
+
|
86 |
+
|
87 |
+
if (!Mage::app()->isSingleStoreMode()) {
|
88 |
+
$this->addColumn('store_id', array(
|
89 |
+
'header' => Mage::helper('sales')->__('Purchased From (Store)'),
|
90 |
+
'index' => 'store_id',
|
91 |
+
'type' => 'store',
|
92 |
+
'store_view'=> true,
|
93 |
+
'display_deleted' => true,
|
94 |
+
));
|
95 |
+
}
|
96 |
+
|
97 |
+
$this->addColumn('created_at', array(
|
98 |
+
'header' => Mage::helper('sales')->__('Purchased On'),
|
99 |
+
'index' => 'created_at',
|
100 |
+
'type' => 'datetime',
|
101 |
+
'width' => '100px',
|
102 |
+
));
|
103 |
+
|
104 |
+
$this->addColumn('billing_name', array(
|
105 |
+
'header' => Mage::helper('sales')->__('Bill to Name'),
|
106 |
+
'index' => 'billing_name',
|
107 |
+
));
|
108 |
+
|
109 |
+
$this->addColumn('shipping_name', array(
|
110 |
+
'header' => Mage::helper('sales')->__('Ship to Name'),
|
111 |
+
'index' => 'shipping_name',
|
112 |
+
));
|
113 |
+
|
114 |
+
$this->addColumn('base_grand_total', array(
|
115 |
+
'header' => Mage::helper('sales')->__('G.T. (Base)'),
|
116 |
+
'index' => 'base_grand_total',
|
117 |
+
'type' => 'currency',
|
118 |
+
'currency' => 'base_currency_code',
|
119 |
+
));
|
120 |
+
|
121 |
+
$this->addColumn('grand_total', array(
|
122 |
+
'header' => Mage::helper('sales')->__('G.T. (Purchased)'),
|
123 |
+
'index' => 'grand_total',
|
124 |
+
'type' => 'currency',
|
125 |
+
'currency' => 'order_currency_code',
|
126 |
+
));
|
127 |
+
|
128 |
+
$this->addColumn('status', array(
|
129 |
+
'header' => Mage::helper('sales')->__('Status'),
|
130 |
+
'index' => 'status',
|
131 |
+
'type' => 'options',
|
132 |
+
'width' => '70px',
|
133 |
+
'options' => Mage::getSingleton('sales/order_config')->getStatuses(),
|
134 |
+
));
|
135 |
+
|
136 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
137 |
+
$this->addColumn('action',
|
138 |
+
array(
|
139 |
+
'header' => Mage::helper('sales')->__('Action'),
|
140 |
+
'width' => '50px',
|
141 |
+
'type' => 'action',
|
142 |
+
'getter' => 'getId',
|
143 |
+
'actions' => array(
|
144 |
+
array(
|
145 |
+
'caption' => Mage::helper('sales')->__('View'),
|
146 |
+
'url' => array('base'=>'admin/sales_order/view'),
|
147 |
+
'field' => 'order_id'
|
148 |
+
)
|
149 |
+
),
|
150 |
+
'filter' => false,
|
151 |
+
'sortable' => false,
|
152 |
+
'index' => 'stores',
|
153 |
+
'is_system' => true,
|
154 |
+
));
|
155 |
+
}
|
156 |
+
$this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));
|
157 |
+
|
158 |
+
$this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
|
159 |
+
$this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));
|
160 |
+
|
161 |
+
return parent::_prepareColumns();
|
162 |
+
}
|
163 |
+
|
164 |
+
protected function _prepareMassaction()
|
165 |
+
{
|
166 |
+
$this->setMassactionIdField('entity_id');
|
167 |
+
$this->getMassactionBlock()->setFormFieldName('order_ids');
|
168 |
+
$this->getMassactionBlock()->setUseSelectAll(false);
|
169 |
+
|
170 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/cancel')) {
|
171 |
+
$this->getMassactionBlock()->addItem('cancel_order', array(
|
172 |
+
'label'=> Mage::helper('sales')->__('Cancel'),
|
173 |
+
'url' => $this->getUrl('*/sales_order/massCancel'),
|
174 |
+
));
|
175 |
+
}
|
176 |
+
|
177 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/hold')) {
|
178 |
+
$this->getMassactionBlock()->addItem('hold_order', array(
|
179 |
+
'label'=> Mage::helper('sales')->__('Hold'),
|
180 |
+
'url' => $this->getUrl('*/sales_order/massHold'),
|
181 |
+
));
|
182 |
+
}
|
183 |
+
|
184 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/unhold')) {
|
185 |
+
$this->getMassactionBlock()->addItem('unhold_order', array(
|
186 |
+
'label'=> Mage::helper('sales')->__('Unhold'),
|
187 |
+
'url' => $this->getUrl('*/sales_order/massUnhold'),
|
188 |
+
));
|
189 |
+
}
|
190 |
+
|
191 |
+
$this->getMassactionBlock()->addItem('pdfinvoices_order', array(
|
192 |
+
'label'=> Mage::helper('sales')->__('Print Invoices'),
|
193 |
+
'url' => $this->getUrl('*/sales_order/pdfinvoices'),
|
194 |
+
));
|
195 |
+
|
196 |
+
$this->getMassactionBlock()->addItem('pdfshipments_order', array(
|
197 |
+
'label'=> Mage::helper('sales')->__('Print Packingslips'),
|
198 |
+
'url' => $this->getUrl('*/sales_order/pdfshipments'),
|
199 |
+
));
|
200 |
+
|
201 |
+
$this->getMassactionBlock()->addItem('pdfcreditmemos_order', array(
|
202 |
+
'label'=> Mage::helper('sales')->__('Print Credit Memos'),
|
203 |
+
'url' => $this->getUrl('*/sales_order/pdfcreditmemos'),
|
204 |
+
));
|
205 |
+
|
206 |
+
$this->getMassactionBlock()->addItem('pdfdocs_order', array(
|
207 |
+
'label'=> Mage::helper('sales')->__('Print All'),
|
208 |
+
'url' => $this->getUrl('*/sales_order/pdfdocs'),
|
209 |
+
));
|
210 |
+
|
211 |
+
$this->getMassactionBlock()->addItem('print_shipping_label', array(
|
212 |
+
'label'=> Mage::helper('sales')->__('Print Shipping Labels'),
|
213 |
+
'url' => $this->getUrl('*/sales_order_shipment/massPrintShippingLabel'),
|
214 |
+
));
|
215 |
+
|
216 |
+
return $this;
|
217 |
+
}
|
218 |
+
|
219 |
+
public function getRowUrl($row)
|
220 |
+
{
|
221 |
+
if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
|
222 |
+
return $this->getUrl('/sales_order/view', array('order_id' => $row->getId()));
|
223 |
+
}
|
224 |
+
return false;
|
225 |
+
}
|
226 |
+
|
227 |
+
public function getGridUrl()
|
228 |
+
{
|
229 |
+
return $this->getUrl('*/*/grid', array('_current'=>true));
|
230 |
+
}
|
231 |
+
|
232 |
+
}
|
app/code/community/Esellers/Salesgrid/controllers/Sales/OrderController.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* To change this template, choose Tools | Templates
|
5 |
+
* and open the template in the editor.
|
6 |
+
*/
|
7 |
+
|
8 |
+
include_once "Mage".DS."Adminhtml".DS."controllers".DS."Sales".DS."OrderController.php";
|
9 |
+
class Esellers_Salesgrid_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController
|
10 |
+
{
|
11 |
+
public function indexAction()
|
12 |
+
{
|
13 |
+
$this->loadLayout();
|
14 |
+
$this->_setActiveMenu('sales/salesgrid');
|
15 |
+
|
16 |
+
$this->_addContent(
|
17 |
+
$this->getLayout()->createBlock('adminhtml/sales_order')
|
18 |
+
);
|
19 |
+
|
20 |
+
$this->renderLayout();
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
}
|
25 |
+
|
26 |
+
public function gridAction()
|
27 |
+
{
|
28 |
+
parent::gridAction();
|
29 |
+
}
|
30 |
+
|
31 |
+
protected function _isAllowed()
|
32 |
+
{
|
33 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/order');
|
34 |
+
}
|
35 |
+
}
|
36 |
+
?>
|
app/code/community/Esellers/Salesgrid/etc/config.xml
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
To change this template, choose Tools | Templates
|
4 |
+
and open the template in the editor.
|
5 |
+
-->
|
6 |
+
|
7 |
+
|
8 |
+
<config>
|
9 |
+
<modules>
|
10 |
+
<Esellers_Salesgrid>
|
11 |
+
<version>1.0.0.0</version>
|
12 |
+
</Esellers_Salesgrid>
|
13 |
+
</modules>
|
14 |
+
<admin>
|
15 |
+
<routers>
|
16 |
+
<salesgrid>
|
17 |
+
<!-- should be set to "admin" when overloading admin stuff (?) -->
|
18 |
+
<use>admin</use>
|
19 |
+
<args>
|
20 |
+
<module>Esellers_Salesgrid</module>
|
21 |
+
<!-- This is used when "catching" the rewrite above -->
|
22 |
+
<frontName>salesgrid</frontName>
|
23 |
+
</args>
|
24 |
+
</salesgrid>
|
25 |
+
</routers>
|
26 |
+
</admin>
|
27 |
+
<global>
|
28 |
+
<blocks>
|
29 |
+
<salesgrid>
|
30 |
+
<class>Esellers_Salesgrid_Block</class>
|
31 |
+
</salesgrid>
|
32 |
+
</blocks>
|
33 |
+
<helpers>
|
34 |
+
<salesgrid>
|
35 |
+
<class>Esellers_Salesgrid_Helper</class>
|
36 |
+
</salesgrid>
|
37 |
+
</helpers>
|
38 |
+
|
39 |
+
|
40 |
+
<models>
|
41 |
+
<salesgrid>
|
42 |
+
<class>Esellers_Salesgrid_Model</class>
|
43 |
+
</salesgrid>
|
44 |
+
</models>
|
45 |
+
|
46 |
+
|
47 |
+
<resources>
|
48 |
+
<salesgrid_setup>
|
49 |
+
<setup>
|
50 |
+
<module>Esellers_Salesgrid</module>
|
51 |
+
</setup>
|
52 |
+
<connection>
|
53 |
+
<use>core_setup</use>
|
54 |
+
</connection>
|
55 |
+
</salesgrid_setup>
|
56 |
+
<salesgrid_write>
|
57 |
+
<connection>
|
58 |
+
<use>core_write</use>
|
59 |
+
</connection>
|
60 |
+
</salesgrid_write>
|
61 |
+
<salesgrid_read>
|
62 |
+
<connection>
|
63 |
+
<use>core_read</use>
|
64 |
+
</connection>
|
65 |
+
</salesgrid_read>
|
66 |
+
</resources>
|
67 |
+
</global>
|
68 |
+
|
69 |
+
<adminhtml>
|
70 |
+
<layout>
|
71 |
+
<updates>
|
72 |
+
<salesgrid>
|
73 |
+
<file>esellers_salesgrid.xml</file>
|
74 |
+
</salesgrid>
|
75 |
+
</updates>
|
76 |
+
</layout>
|
77 |
+
<menu>
|
78 |
+
<sales module="salesgrid">
|
79 |
+
<children>
|
80 |
+
<order module="salesgrid" translate="title">
|
81 |
+
<title>Manage Products*</title>
|
82 |
+
<sort_order>0</sort_order>
|
83 |
+
<action>salesgrid/sales_order</action>
|
84 |
+
</order>
|
85 |
+
</children>
|
86 |
+
</sales>
|
87 |
+
</menu>
|
88 |
+
</adminhtml>
|
89 |
+
</config>
|
app/code/community/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Shipment tracking control form
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking extends Mage_Adminhtml_Block_Template
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Prepares layout of block
|
38 |
+
*
|
39 |
+
* @return Mage_Adminhtml_Block_Sales_Order_View_Giftmessage
|
40 |
+
*/
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
$this->setChild('add_button',
|
44 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
45 |
+
->setData(array(
|
46 |
+
'label' => Mage::helper('sales')->__('Add Tracking Number'),
|
47 |
+
'class' => '',
|
48 |
+
'onclick' => 'trackingControl.add()'
|
49 |
+
))
|
50 |
+
|
51 |
+
);
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve shipment model instance
|
57 |
+
*
|
58 |
+
* @return Mage_Sales_Model_Order_Shipment
|
59 |
+
*/
|
60 |
+
public function getShipment()
|
61 |
+
{
|
62 |
+
return Mage::registry('current_shipment');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Retrieve
|
67 |
+
*
|
68 |
+
* @return unknown
|
69 |
+
*/
|
70 |
+
public function getCarriers()
|
71 |
+
{
|
72 |
+
$carriers = array();
|
73 |
+
$carrierInstances = Mage::getSingleton('shipping/config')->getAllCarriers(
|
74 |
+
$this->getShipment()->getStoreId()
|
75 |
+
);
|
76 |
+
$carriers['custom'] = Mage::helper('sales')->__('Custom Value');
|
77 |
+
foreach ($carrierInstances as $code => $carrier) {
|
78 |
+
if ($carrier->isTrackingAvailable()) {
|
79 |
+
$carriers[$code] = $carrier->getConfigData('title');
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
$carriers['hanjin'] = Mage::helper('sales')->__('한진택배');
|
84 |
+
$carriers['kyungdong'] = Mage::helper('sales')->__('경동택배');
|
85 |
+
$carriers['korex'] = Mage::helper('sales')->__('대한통운');
|
86 |
+
$carriers['dongbu'] = Mage::helper('sales')->__('동부익스프레스');
|
87 |
+
$carriers['innogis'] = Mage::helper('sales')->__('이노지스');
|
88 |
+
$carriers['hanaro'] = Mage::helper('sales')->__('하나로택배');
|
89 |
+
$carriers['hyundai'] = Mage::helper('sales')->__('현대로지엠');
|
90 |
+
$carriers['cjgls'] = Mage::helper('sales')->__('CJGLS');
|
91 |
+
$carriers['yellow'] = Mage::helper('sales')->__('옐로우캡');
|
92 |
+
$carriers['kgb'] = Mage::helper('sales')->__('로젠택배');
|
93 |
+
$carriers['epost'] = Mage::helper('sales')->__('우체국택배');
|
94 |
+
$carriers['etc'] = Mage::helper('sales')->__('한덱스택배');
|
95 |
+
$carriers['etc'] = Mage::helper('sales')->__('호남택배');
|
96 |
+
$carriers['etc'] = Mage::helper('sales')->__('DHL택배');
|
97 |
+
$carriers['etc'] = Mage::helper('sales')->__('KGB택배');
|
98 |
+
|
99 |
+
|
100 |
+
return $carriers;
|
101 |
+
}
|
102 |
+
}
|
app/code/community/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Shipment tracking control form
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Sales_Order_Shipment_View_Tracking extends Mage_Adminhtml_Block_Template
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Prepares layout of block
|
38 |
+
*
|
39 |
+
* @return Mage_Adminhtml_Block_Sales_Order_View_Giftmessage
|
40 |
+
*/
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
$onclick = "submitAndReloadArea($('shipment_tracking_info').parentNode, '".$this->getSubmitUrl()."')";
|
44 |
+
$this->setChild('save_button',
|
45 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
46 |
+
->setData(array(
|
47 |
+
'label' => Mage::helper('sales')->__('Add'),
|
48 |
+
'class' => 'save',
|
49 |
+
'onclick' => $onclick
|
50 |
+
))
|
51 |
+
|
52 |
+
);
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve shipment model instance
|
57 |
+
*
|
58 |
+
* @return Mage_Sales_Model_Order_Shipment
|
59 |
+
*/
|
60 |
+
public function getShipment()
|
61 |
+
{
|
62 |
+
return Mage::registry('current_shipment');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Retrieve save url
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
public function getSubmitUrl()
|
71 |
+
{
|
72 |
+
return $this->getUrl('ipay/sales_order_shipment/addTrack/', array('shipment_id'=>$this->getShipment()->getId()));
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Retrive save button html
|
77 |
+
*
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function getSaveButtonHtml()
|
81 |
+
{
|
82 |
+
return $this->getChildHtml('save_button');
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Retrieve remove url
|
87 |
+
*
|
88 |
+
* @return string
|
89 |
+
*/
|
90 |
+
public function getRemoveUrl($track)
|
91 |
+
{
|
92 |
+
return $this->getUrl('*/*/removeTrack/', array(
|
93 |
+
'shipment_id' => $this->getShipment()->getId(),
|
94 |
+
'track_id' => $track->getId()
|
95 |
+
));
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Retrieve remove url
|
100 |
+
*
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
public function getTrackInfoUrl($track)
|
104 |
+
{
|
105 |
+
return $this->getUrl('*/*/viewTrack/', array(
|
106 |
+
'shipment_id' => $this->getShipment()->getId(),
|
107 |
+
'track_id' => $track->getId()
|
108 |
+
));
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Retrieve
|
113 |
+
*
|
114 |
+
* @return unknown
|
115 |
+
*/
|
116 |
+
public function getCarriers()
|
117 |
+
{
|
118 |
+
$carriers = array();
|
119 |
+
$carrierInstances = Mage::getSingleton('shipping/config')->getAllCarriers(
|
120 |
+
$this->getShipment()->getStoreId()
|
121 |
+
);
|
122 |
+
$carriers['custom'] = Mage::helper('sales')->__('Custom Value');
|
123 |
+
foreach ($carrierInstances as $code => $carrier) {
|
124 |
+
if ($carrier->isTrackingAvailable()) {
|
125 |
+
$carriers[$code] = $carrier->getConfigData('title');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
$carriers['hanjin'] = Mage::helper('sales')->__('한진택배');
|
130 |
+
$carriers['kyungdong'] = Mage::helper('sales')->__('경동택배');
|
131 |
+
$carriers['korex'] = Mage::helper('sales')->__('대한통운');
|
132 |
+
$carriers['dongbu'] = Mage::helper('sales')->__('동부익스프레스');
|
133 |
+
$carriers['innogis'] = Mage::helper('sales')->__('이노지스');
|
134 |
+
$carriers['hanaro'] = Mage::helper('sales')->__('하나로택배');
|
135 |
+
$carriers['hyundai'] = Mage::helper('sales')->__('현대로지엠');
|
136 |
+
$carriers['cjgls'] = Mage::helper('sales')->__('CJGLS');
|
137 |
+
$carriers['yellow'] = Mage::helper('sales')->__('옐로우캡');
|
138 |
+
$carriers['kgb'] = Mage::helper('sales')->__('로젠택배');
|
139 |
+
$carriers['epost'] = Mage::helper('sales')->__('우체국택배');
|
140 |
+
$carriers['etc'] = Mage::helper('sales')->__('한덱스택배');
|
141 |
+
$carriers['etc'] = Mage::helper('sales')->__('호남택배');
|
142 |
+
$carriers['etc'] = Mage::helper('sales')->__('DHL택배');
|
143 |
+
$carriers['etc'] = Mage::helper('sales')->__('KGB택배');
|
144 |
+
|
145 |
+
return $carriers;
|
146 |
+
}
|
147 |
+
|
148 |
+
public function getCarrierTitle($code)
|
149 |
+
{
|
150 |
+
if ($carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($code)) {
|
151 |
+
return $carrier->getConfigData('title');
|
152 |
+
}
|
153 |
+
else {
|
154 |
+
return Mage::helper('sales')->__('Custom Value');
|
155 |
+
}
|
156 |
+
return false;
|
157 |
+
}
|
158 |
+
}
|
app/code/community/Mage/Adminhtml/Controller/Action.php
ADDED
@@ -0,0 +1,387 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Base adminhtml controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Action
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Name of "is URLs checked" flag
|
38 |
+
*/
|
39 |
+
const FLAG_IS_URLS_CHECKED = 'check_url_settings';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Session namespace to refer in other places
|
43 |
+
*/
|
44 |
+
const SESSION_NAMESPACE = 'adminhtml';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of actions which can be processed without secret key validation
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
protected $_publicActions = array();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Used module name in current adminhtml controller
|
55 |
+
*/
|
56 |
+
protected $_usedModuleName = 'adminhtml';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Currently used area
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
protected $_currentArea = 'adminhtml';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Namespace for session.
|
67 |
+
*
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
protected $_sessionNamespace = self::SESSION_NAMESPACE;
|
71 |
+
|
72 |
+
protected function _isAllowed()
|
73 |
+
{
|
74 |
+
return true;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Retrieve adminhtml session model object
|
79 |
+
*
|
80 |
+
* @return Mage_Adminhtml_Model_Session
|
81 |
+
*/
|
82 |
+
protected function _getSession()
|
83 |
+
{
|
84 |
+
return Mage::getSingleton('adminhtml/session');
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Retrieve base admihtml helper
|
89 |
+
*
|
90 |
+
* @return Mage_Adminhtml_Helper_Data
|
91 |
+
*/
|
92 |
+
protected function _getHelper()
|
93 |
+
{
|
94 |
+
return Mage::helper('adminhtml');
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Define active menu item in menu block
|
99 |
+
*
|
100 |
+
* @return Mage_Adminhtml_Controller_Action
|
101 |
+
*/
|
102 |
+
protected function _setActiveMenu($menuPath)
|
103 |
+
{
|
104 |
+
$this->getLayout()->getBlock('menu')->setActive($menuPath);
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @return Mage_Adminhtml_Controller_Action
|
110 |
+
*/
|
111 |
+
protected function _addBreadcrumb($label, $title, $link=null)
|
112 |
+
{
|
113 |
+
$this->getLayout()->getBlock('breadcrumbs')->addLink($label, $title, $link);
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @return Mage_Adminhtml_Controller_Action
|
119 |
+
*/
|
120 |
+
protected function _addContent(Mage_Core_Block_Abstract $block)
|
121 |
+
{
|
122 |
+
$this->getLayout()->getBlock('content')->append($block);
|
123 |
+
return $this;
|
124 |
+
}
|
125 |
+
|
126 |
+
protected function _addLeft(Mage_Core_Block_Abstract $block)
|
127 |
+
{
|
128 |
+
$this->getLayout()->getBlock('left')->append($block);
|
129 |
+
return $this;
|
130 |
+
}
|
131 |
+
|
132 |
+
protected function _addJs(Mage_Core_Block_Abstract $block)
|
133 |
+
{
|
134 |
+
$this->getLayout()->getBlock('js')->append($block);
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Controller predispatch method
|
140 |
+
*
|
141 |
+
* @return Mage_Adminhtml_Controller_Action
|
142 |
+
*/
|
143 |
+
public function preDispatch()
|
144 |
+
{
|
145 |
+
// override admin store design settings via stores section
|
146 |
+
Mage::getDesign()
|
147 |
+
->setArea($this->_currentArea)
|
148 |
+
->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
|
149 |
+
->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
|
150 |
+
;
|
151 |
+
foreach (array('layout', 'template', 'skin', 'locale') as $type) {
|
152 |
+
if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
|
153 |
+
Mage::getDesign()->setTheme($type, $value);
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
$this->getLayout()->setArea($this->_currentArea);
|
158 |
+
|
159 |
+
Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
|
160 |
+
parent::preDispatch();
|
161 |
+
$_isValidFormKey = true;
|
162 |
+
$_isValidSecretKey = true;
|
163 |
+
$_keyErrorMsg = '';
|
164 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
165 |
+
if ($this->getRequest()->isPost()) {
|
166 |
+
$_isValidFormKey = $this->_validateFormKey();
|
167 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
|
168 |
+
} elseif (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
|
169 |
+
$_isValidSecretKey = $this->_validateSecretKey();
|
170 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
|
171 |
+
}
|
172 |
+
}
|
173 |
+
if (!$_isValidFormKey || !$_isValidSecretKey) {
|
174 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
175 |
+
$this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
|
176 |
+
if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) {
|
177 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
|
178 |
+
'error' => true,
|
179 |
+
'message' => $_keyErrorMsg
|
180 |
+
)));
|
181 |
+
} else {
|
182 |
+
$this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
|
183 |
+
}
|
184 |
+
return $this;
|
185 |
+
}
|
186 |
+
|
187 |
+
if ($this->getRequest()->isDispatched()
|
188 |
+
&& $this->getRequest()->getActionName() !== 'denied'
|
189 |
+
&& !$this->_isAllowed()) {
|
190 |
+
$this->_forward('denied');
|
191 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
192 |
+
return $this;
|
193 |
+
}
|
194 |
+
|
195 |
+
if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
|
196 |
+
&& !$this->getRequest()->getParam('forwarded')
|
197 |
+
&& !$this->_getSession()->getIsUrlNotice(true)
|
198 |
+
&& !Mage::getConfig()->getNode('global/can_use_base_url')) {
|
199 |
+
//$this->_checkUrlSettings();
|
200 |
+
$this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
|
201 |
+
}
|
202 |
+
if (is_null(Mage::getSingleton('adminhtml/session')->getLocale())) {
|
203 |
+
Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
|
204 |
+
}
|
205 |
+
|
206 |
+
return $this;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @deprecated after 1.4.0.0 alpha, logic moved to Mage_Adminhtml_Block_Notification_Baseurl
|
211 |
+
* @return Mage_Adminhtml_Controller_Action
|
212 |
+
*/
|
213 |
+
protected function _checkUrlSettings()
|
214 |
+
{
|
215 |
+
/**
|
216 |
+
* Don't check for data saving actions
|
217 |
+
*/
|
218 |
+
if ($this->getRequest()->getPost() || $this->getRequest()->getQuery('isAjax')) {
|
219 |
+
return $this;
|
220 |
+
}
|
221 |
+
|
222 |
+
$configData = Mage::getModel('core/config_data');
|
223 |
+
|
224 |
+
$defaultUnsecure = (string)Mage::getConfig()->getNode(
|
225 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
|
226 |
+
);
|
227 |
+
$defaultSecure = (string)Mage::getConfig()->getNode(
|
228 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL
|
229 |
+
);
|
230 |
+
|
231 |
+
if ($defaultSecure == '{{base_url}}' || $defaultUnsecure == '{{base_url}}') {
|
232 |
+
$this->_getSession()->addNotice(
|
233 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $this->getUrl('adminhtml/system_config/edit', array('section'=>'web')))
|
234 |
+
);
|
235 |
+
return $this;
|
236 |
+
}
|
237 |
+
|
238 |
+
$dataCollection = $configData->getCollection()
|
239 |
+
->addValueFilter('{{base_url}}');
|
240 |
+
|
241 |
+
$url = false;
|
242 |
+
foreach ($dataCollection as $data) {
|
243 |
+
if ($data->getScope() == 'stores') {
|
244 |
+
$code = Mage::app()->getStore($data->getScopeId())->getCode();
|
245 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'store'=>$code));
|
246 |
+
}
|
247 |
+
if ($data->getScope() == 'websites') {
|
248 |
+
$code = Mage::app()->getWebsite($data->getScopeId())->getCode();
|
249 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'website'=>$code));
|
250 |
+
}
|
251 |
+
|
252 |
+
if ($url) {
|
253 |
+
$this->_getSession()->addNotice(
|
254 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $url)
|
255 |
+
);
|
256 |
+
return $this;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
|
262 |
+
public function deniedAction()
|
263 |
+
{
|
264 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
265 |
+
if (!Mage::getSingleton('admin/session')->isLoggedIn()) {
|
266 |
+
$this->_redirect('*/index/login');
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
$this->loadLayout(array('default', 'adminhtml_denied'));
|
270 |
+
$this->renderLayout();
|
271 |
+
}
|
272 |
+
|
273 |
+
public function loadLayout($ids=null, $generateBlocks=true, $generateXml=true)
|
274 |
+
{
|
275 |
+
parent::loadLayout($ids, $generateBlocks, $generateXml);
|
276 |
+
$this->_initLayoutMessages('adminhtml/session');
|
277 |
+
return $this;
|
278 |
+
}
|
279 |
+
|
280 |
+
public function norouteAction($coreRoute = null)
|
281 |
+
{
|
282 |
+
$this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
|
283 |
+
$this->getResponse()->setHeader('Status','404 File not found');
|
284 |
+
$this->loadLayout(array('default', 'adminhtml_noroute'));
|
285 |
+
$this->renderLayout();
|
286 |
+
}
|
287 |
+
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Retrieve currently used module name
|
291 |
+
*
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getUsedModuleName()
|
295 |
+
{
|
296 |
+
return $this->_usedModuleName;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Set currently used module name
|
301 |
+
*
|
302 |
+
* @param string $moduleName
|
303 |
+
* @return Mage_Adminhtml_Controller_Action
|
304 |
+
*/
|
305 |
+
public function setUsedModuleName($moduleName)
|
306 |
+
{
|
307 |
+
$this->_usedModuleName = $moduleName;
|
308 |
+
return $this;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Translate a phrase
|
313 |
+
*
|
314 |
+
* @return string
|
315 |
+
*/
|
316 |
+
public function __()
|
317 |
+
{
|
318 |
+
$args = func_get_args();
|
319 |
+
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getUsedModuleName());
|
320 |
+
array_unshift($args, $expr);
|
321 |
+
return Mage::app()->getTranslator()->translate($args);
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Set referer url for redirect in responce
|
326 |
+
*
|
327 |
+
* Is overriden here to set defaultUrl to admin url
|
328 |
+
*
|
329 |
+
* @param string $defaultUrl
|
330 |
+
* @return Mage_Adminhtml_Controller_Action
|
331 |
+
*/
|
332 |
+
protected function _redirectReferer($defaultUrl=null)
|
333 |
+
{
|
334 |
+
$defaultUrl = empty($defaultUrl) ? $this->getUrl('*') : $defaultUrl;
|
335 |
+
parent::_redirectReferer($defaultUrl);
|
336 |
+
return $this;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Set redirect into responce
|
341 |
+
*
|
342 |
+
* @param string $path
|
343 |
+
* @param array $arguments
|
344 |
+
*/
|
345 |
+
protected function _redirect($path, $arguments=array())
|
346 |
+
{
|
347 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
348 |
+
$this->getResponse()->setRedirect($this->getUrl($path, $arguments));
|
349 |
+
return $this;
|
350 |
+
}
|
351 |
+
|
352 |
+
protected function _forward($action, $controller = null, $module = null, array $params = null)
|
353 |
+
{
|
354 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
355 |
+
return parent::_forward($action, $controller, $module, $params);
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Generate url by route and parameters
|
360 |
+
*
|
361 |
+
* @param string $route
|
362 |
+
* @param array $params
|
363 |
+
* @return string
|
364 |
+
*/
|
365 |
+
public function getUrl($route='', $params=array())
|
366 |
+
{
|
367 |
+
return Mage::helper('adminhtml')->getUrl($route, $params);
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Validate Secret Key
|
372 |
+
*
|
373 |
+
* @return bool
|
374 |
+
*/
|
375 |
+
protected function _validateSecretKey()
|
376 |
+
{
|
377 |
+
if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {
|
378 |
+
return true;
|
379 |
+
}
|
380 |
+
|
381 |
+
if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null))
|
382 |
+
|| $secretKey != Mage::getSingleton('adminhtml/url')->getSecretKey()) {
|
383 |
+
return false;
|
384 |
+
}
|
385 |
+
return true;
|
386 |
+
}
|
387 |
+
}
|
app/code/community/Mage/Adminhtml/Controller/Report/Abstract.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Admin abstract reports controller
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
abstract class Mage_Adminhtml_Controller_Report_Abstract extends Mage_Adminhtml_Controller_Action
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Admin session model
|
39 |
+
*
|
40 |
+
* @var null|Mage_Admin_Model_Session
|
41 |
+
*/
|
42 |
+
protected $_adminSession = null;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve admin session model
|
46 |
+
*
|
47 |
+
* @return Mage_Admin_Model_Session
|
48 |
+
*/
|
49 |
+
protected function _getSession()
|
50 |
+
{
|
51 |
+
if (is_null($this->_adminSession)) {
|
52 |
+
$this->_adminSession = Mage::getSingleton('admin/session');
|
53 |
+
}
|
54 |
+
return $this->_adminSession;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add report breadcrumbs
|
59 |
+
*
|
60 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
61 |
+
*/
|
62 |
+
public function _initAction()
|
63 |
+
{
|
64 |
+
$this->loadLayout()
|
65 |
+
->_addBreadcrumb(Mage::helper('reports')->__('Reports'), Mage::helper('reports')->__('Reports'));
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Report action init operations
|
71 |
+
*
|
72 |
+
* @param array|Varien_Object $blocks
|
73 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
74 |
+
*/
|
75 |
+
public function _initReportAction($blocks)
|
76 |
+
{
|
77 |
+
if (!is_array($blocks)) {
|
78 |
+
$blocks = array($blocks);
|
79 |
+
}
|
80 |
+
|
81 |
+
$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
|
82 |
+
$requestData = $this->_filterDates($requestData, array('from', 'to'));
|
83 |
+
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
|
84 |
+
$params = new Varien_Object();
|
85 |
+
|
86 |
+
foreach ($requestData as $key => $value) {
|
87 |
+
if (!empty($value)) {
|
88 |
+
$params->setData($key, $value);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
foreach ($blocks as $block) {
|
93 |
+
if ($block) {
|
94 |
+
$block->setPeriodType($params->getData('period_type'));
|
95 |
+
$block->setFilterData($params);
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Add refresh statistics links
|
104 |
+
*
|
105 |
+
* @param string $flagCode
|
106 |
+
* @param string $refreshCode
|
107 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
108 |
+
*/
|
109 |
+
protected function _showLastExecutionTime($flagCode, $refreshCode)
|
110 |
+
{
|
111 |
+
$flag = Mage::getModel('reports/flag')->setReportFlagCode($flagCode)->loadSelf();
|
112 |
+
$updatedAt = ($flag->hasData())
|
113 |
+
? Mage::app()->getLocale()->storeDate(
|
114 |
+
0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true
|
115 |
+
)
|
116 |
+
: 'undefined';
|
117 |
+
|
118 |
+
$refreshStatsLink = $this->getUrl('*/report_statistics');
|
119 |
+
$directRefreshLink = $this->getUrl('*/report_statistics/refreshRecent', array('code' => $refreshCode));
|
120 |
+
|
121 |
+
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('Last updated: %s. To refresh last day\'s <a href="%s">statistics</a>, click <a href="%s">here</a>.', $updatedAt, $refreshStatsLink, $directRefreshLink));
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
}
|
app/code/community/Mage/Adminhtml/Controller/Sales/Creditmemo.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Creditmemo extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_CreditmemoController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Credit Memos'),$this->__('Credit Memos'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Creditmemos grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_initAction()
|
63 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_creditmemo'))
|
64 |
+
->renderLayout();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Creditmemo information page
|
69 |
+
*/
|
70 |
+
public function viewAction()
|
71 |
+
{
|
72 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
73 |
+
$this->_forward('view', 'sales_order_creditmemo', null, array('come_from' => 'sales_creditmemo'));
|
74 |
+
} else {
|
75 |
+
$this->_forward('noRoute');
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Notify user
|
81 |
+
*/
|
82 |
+
public function emailAction()
|
83 |
+
{
|
84 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
85 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
86 |
+
$creditmemo->sendEmail();
|
87 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
88 |
+
->getUnnotifiedForInstance($creditmemo, Mage_Sales_Model_Order_Creditmemo::HISTORY_ENTITY_NAME);
|
89 |
+
if ($historyItem) {
|
90 |
+
$historyItem->setIsCustomerNotified(1);
|
91 |
+
$historyItem->save();
|
92 |
+
}
|
93 |
+
|
94 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message was sent.'));
|
95 |
+
$this->_redirect('*/sales_order_creditmemo/view', array(
|
96 |
+
'creditmemo_id' => $creditmemoId
|
97 |
+
));
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
public function pdfcreditmemosAction(){
|
103 |
+
$creditmemosIds = $this->getRequest()->getPost('creditmemo_ids');
|
104 |
+
if (!empty($creditmemosIds)) {
|
105 |
+
$invoices = Mage::getResourceModel('sales/order_creditmemo_collection')
|
106 |
+
->addAttributeToSelect('*')
|
107 |
+
->addAttributeToFilter('entity_id', array('in' => $creditmemosIds))
|
108 |
+
->load();
|
109 |
+
if (!isset($pdf)){
|
110 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
111 |
+
} else {
|
112 |
+
$pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
113 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
114 |
+
}
|
115 |
+
|
116 |
+
return $this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
117 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
118 |
+
}
|
119 |
+
$this->_redirect('*/*/');
|
120 |
+
}
|
121 |
+
|
122 |
+
public function printAction()
|
123 |
+
{
|
124 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
125 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
126 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
127 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
128 |
+
$this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
129 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
$this->_forward('noRoute');
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
protected function _isAllowed()
|
138 |
+
{
|
139 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/creditmemo');
|
140 |
+
}
|
141 |
+
}
|
app/code/community/Mage/Adminhtml/Controller/Sales/Invoice.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Invoice extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_InvoiceController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Invoices'),$this->__('Invoices'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Order grid
|
59 |
+
*/
|
60 |
+
public function gridAction()
|
61 |
+
{
|
62 |
+
$this->loadLayout();
|
63 |
+
$this->getResponse()->setBody(
|
64 |
+
$this->getLayout()->createBlock('adminhtml/sales_invoice_grid')->toHtml()
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Invoices grid
|
70 |
+
*/
|
71 |
+
public function indexAction()
|
72 |
+
{
|
73 |
+
$this->_title($this->__('Sales'))->_title($this->__('Invoices'));
|
74 |
+
|
75 |
+
$this->_initAction()
|
76 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_invoice'))
|
77 |
+
->renderLayout();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Invoice information page
|
82 |
+
*/
|
83 |
+
public function viewAction()
|
84 |
+
{
|
85 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
86 |
+
$this->_forward('view', 'sales_order_invoice', null, array('come_from'=>'invoice'));
|
87 |
+
} else {
|
88 |
+
$this->_forward('noRoute');
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Notify user
|
94 |
+
*/
|
95 |
+
public function emailAction()
|
96 |
+
{
|
97 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
98 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
99 |
+
$invoice->sendEmail();
|
100 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
101 |
+
->getUnnotifiedForInstance($invoice, Mage_Sales_Model_Order_Invoice::HISTORY_ENTITY_NAME);
|
102 |
+
if ($historyItem) {
|
103 |
+
$historyItem->setIsCustomerNotified(1);
|
104 |
+
$historyItem->save();
|
105 |
+
}
|
106 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message has been sent.'));
|
107 |
+
$this->_redirect('*/sales_invoice/view', array(
|
108 |
+
'order_id' => $invoice->getOrder()->getId(),
|
109 |
+
'invoice_id'=> $invoiceId,
|
110 |
+
));
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
public function printAction()
|
116 |
+
{
|
117 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
118 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
119 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
120 |
+
$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
121 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
122 |
+
}
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
$this->_forward('noRoute');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
public function pdfinvoicesAction(){
|
130 |
+
$invoicesIds = $this->getRequest()->getPost('invoice_ids');
|
131 |
+
if (!empty($invoicesIds)) {
|
132 |
+
$invoices = Mage::getResourceModel('sales/order_invoice_collection')
|
133 |
+
->addAttributeToSelect('*')
|
134 |
+
->addAttributeToFilter('entity_id', array('in' => $invoicesIds))
|
135 |
+
->load();
|
136 |
+
if (!isset($pdf)){
|
137 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
138 |
+
} else {
|
139 |
+
$pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
140 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
141 |
+
}
|
142 |
+
|
143 |
+
return $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
144 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
145 |
+
}
|
146 |
+
$this->_redirect('*/*/');
|
147 |
+
}
|
148 |
+
|
149 |
+
protected function _isAllowed()
|
150 |
+
{
|
151 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/invoice');
|
152 |
+
}
|
153 |
+
|
154 |
+
}
|
app/code/community/Mage/Adminhtml/Controller/Sales/Shipment.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Shipment extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_ShipmentController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Shipments'),$this->__('Shipments'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Shipments grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_title($this->__('Sales'))->_title($this->__('Shipments'));
|
63 |
+
|
64 |
+
$this->_initAction()
|
65 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_shipment'))
|
66 |
+
->renderLayout();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Shipment information page
|
71 |
+
*/
|
72 |
+
public function viewAction()
|
73 |
+
{
|
74 |
+
if ($shipmentId = $this->getRequest()->getParam('shipment_id')) {
|
75 |
+
$this->_forward('view', 'sales_order_shipment', null, array('come_from'=>'shipment'));
|
76 |
+
} else {
|
77 |
+
$this->_forward('noRoute');
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
public function pdfshipmentsAction(){
|
82 |
+
$shipmentIds = $this->getRequest()->getPost('shipment_ids');
|
83 |
+
if (!empty($shipmentIds)) {
|
84 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
85 |
+
->addAttributeToSelect('*')
|
86 |
+
->addAttributeToFilter('entity_id', array('in' => $shipmentIds))
|
87 |
+
->load();
|
88 |
+
if (!isset($pdf)){
|
89 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
90 |
+
} else {
|
91 |
+
$pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
92 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
96 |
+
}
|
97 |
+
$this->_redirect('*/*/');
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
public function printAction()
|
102 |
+
{
|
103 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
104 |
+
if ($shipmentId = $this->getRequest()->getParam('invoice_id')) { // invoice_id o_0
|
105 |
+
if ($shipment = Mage::getModel('sales/order_shipment')->load($shipmentId)) {
|
106 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
107 |
+
$this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
108 |
+
}
|
109 |
+
}
|
110 |
+
else {
|
111 |
+
$this->_forward('noRoute');
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function _isAllowed()
|
116 |
+
{
|
117 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/shipment');
|
118 |
+
}
|
119 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Action.php
ADDED
@@ -0,0 +1,387 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Base adminhtml controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Action
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Name of "is URLs checked" flag
|
38 |
+
*/
|
39 |
+
const FLAG_IS_URLS_CHECKED = 'check_url_settings';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Session namespace to refer in other places
|
43 |
+
*/
|
44 |
+
const SESSION_NAMESPACE = 'adminhtml';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of actions which can be processed without secret key validation
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
protected $_publicActions = array();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Used module name in current adminhtml controller
|
55 |
+
*/
|
56 |
+
protected $_usedModuleName = 'adminhtml';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Currently used area
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
protected $_currentArea = 'adminhtml';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Namespace for session.
|
67 |
+
*
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
protected $_sessionNamespace = self::SESSION_NAMESPACE;
|
71 |
+
|
72 |
+
protected function _isAllowed()
|
73 |
+
{
|
74 |
+
return true;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Retrieve adminhtml session model object
|
79 |
+
*
|
80 |
+
* @return Mage_Adminhtml_Model_Session
|
81 |
+
*/
|
82 |
+
protected function _getSession()
|
83 |
+
{
|
84 |
+
return Mage::getSingleton('adminhtml/session');
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Retrieve base admihtml helper
|
89 |
+
*
|
90 |
+
* @return Mage_Adminhtml_Helper_Data
|
91 |
+
*/
|
92 |
+
protected function _getHelper()
|
93 |
+
{
|
94 |
+
return Mage::helper('adminhtml');
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Define active menu item in menu block
|
99 |
+
*
|
100 |
+
* @return Mage_Adminhtml_Controller_Action
|
101 |
+
*/
|
102 |
+
protected function _setActiveMenu($menuPath)
|
103 |
+
{
|
104 |
+
$this->getLayout()->getBlock('menu')->setActive($menuPath);
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @return Mage_Adminhtml_Controller_Action
|
110 |
+
*/
|
111 |
+
protected function _addBreadcrumb($label, $title, $link=null)
|
112 |
+
{
|
113 |
+
$this->getLayout()->getBlock('breadcrumbs')->addLink($label, $title, $link);
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @return Mage_Adminhtml_Controller_Action
|
119 |
+
*/
|
120 |
+
protected function _addContent(Mage_Core_Block_Abstract $block)
|
121 |
+
{
|
122 |
+
$this->getLayout()->getBlock('content')->append($block);
|
123 |
+
return $this;
|
124 |
+
}
|
125 |
+
|
126 |
+
protected function _addLeft(Mage_Core_Block_Abstract $block)
|
127 |
+
{
|
128 |
+
$this->getLayout()->getBlock('left')->append($block);
|
129 |
+
return $this;
|
130 |
+
}
|
131 |
+
|
132 |
+
protected function _addJs(Mage_Core_Block_Abstract $block)
|
133 |
+
{
|
134 |
+
$this->getLayout()->getBlock('js')->append($block);
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Controller predispatch method
|
140 |
+
*
|
141 |
+
* @return Mage_Adminhtml_Controller_Action
|
142 |
+
*/
|
143 |
+
public function preDispatch()
|
144 |
+
{
|
145 |
+
// override admin store design settings via stores section
|
146 |
+
Mage::getDesign()
|
147 |
+
->setArea($this->_currentArea)
|
148 |
+
->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
|
149 |
+
->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
|
150 |
+
;
|
151 |
+
foreach (array('layout', 'template', 'skin', 'locale') as $type) {
|
152 |
+
if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
|
153 |
+
Mage::getDesign()->setTheme($type, $value);
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
$this->getLayout()->setArea($this->_currentArea);
|
158 |
+
|
159 |
+
Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
|
160 |
+
parent::preDispatch();
|
161 |
+
$_isValidFormKey = true;
|
162 |
+
$_isValidSecretKey = true;
|
163 |
+
$_keyErrorMsg = '';
|
164 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
165 |
+
if ($this->getRequest()->isPost()) {
|
166 |
+
$_isValidFormKey = $this->_validateFormKey();
|
167 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
|
168 |
+
} elseif (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
|
169 |
+
$_isValidSecretKey = $this->_validateSecretKey();
|
170 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
|
171 |
+
}
|
172 |
+
}
|
173 |
+
if (!$_isValidFormKey || !$_isValidSecretKey) {
|
174 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
175 |
+
$this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
|
176 |
+
if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) {
|
177 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
|
178 |
+
'error' => true,
|
179 |
+
'message' => $_keyErrorMsg
|
180 |
+
)));
|
181 |
+
} else {
|
182 |
+
$this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
|
183 |
+
}
|
184 |
+
return $this;
|
185 |
+
}
|
186 |
+
|
187 |
+
if ($this->getRequest()->isDispatched()
|
188 |
+
&& $this->getRequest()->getActionName() !== 'denied'
|
189 |
+
&& !$this->_isAllowed()) {
|
190 |
+
$this->_forward('denied');
|
191 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
192 |
+
return $this;
|
193 |
+
}
|
194 |
+
|
195 |
+
if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
|
196 |
+
&& !$this->getRequest()->getParam('forwarded')
|
197 |
+
&& !$this->_getSession()->getIsUrlNotice(true)
|
198 |
+
&& !Mage::getConfig()->getNode('global/can_use_base_url')) {
|
199 |
+
//$this->_checkUrlSettings();
|
200 |
+
$this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
|
201 |
+
}
|
202 |
+
if (is_null(Mage::getSingleton('adminhtml/session')->getLocale())) {
|
203 |
+
Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
|
204 |
+
}
|
205 |
+
|
206 |
+
return $this;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @deprecated after 1.4.0.0 alpha, logic moved to Mage_Adminhtml_Block_Notification_Baseurl
|
211 |
+
* @return Mage_Adminhtml_Controller_Action
|
212 |
+
*/
|
213 |
+
protected function _checkUrlSettings()
|
214 |
+
{
|
215 |
+
/**
|
216 |
+
* Don't check for data saving actions
|
217 |
+
*/
|
218 |
+
if ($this->getRequest()->getPost() || $this->getRequest()->getQuery('isAjax')) {
|
219 |
+
return $this;
|
220 |
+
}
|
221 |
+
|
222 |
+
$configData = Mage::getModel('core/config_data');
|
223 |
+
|
224 |
+
$defaultUnsecure = (string)Mage::getConfig()->getNode(
|
225 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
|
226 |
+
);
|
227 |
+
$defaultSecure = (string)Mage::getConfig()->getNode(
|
228 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL
|
229 |
+
);
|
230 |
+
|
231 |
+
if ($defaultSecure == '{{base_url}}' || $defaultUnsecure == '{{base_url}}') {
|
232 |
+
$this->_getSession()->addNotice(
|
233 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $this->getUrl('adminhtml/system_config/edit', array('section'=>'web')))
|
234 |
+
);
|
235 |
+
return $this;
|
236 |
+
}
|
237 |
+
|
238 |
+
$dataCollection = $configData->getCollection()
|
239 |
+
->addValueFilter('{{base_url}}');
|
240 |
+
|
241 |
+
$url = false;
|
242 |
+
foreach ($dataCollection as $data) {
|
243 |
+
if ($data->getScope() == 'stores') {
|
244 |
+
$code = Mage::app()->getStore($data->getScopeId())->getCode();
|
245 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'store'=>$code));
|
246 |
+
}
|
247 |
+
if ($data->getScope() == 'websites') {
|
248 |
+
$code = Mage::app()->getWebsite($data->getScopeId())->getCode();
|
249 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'website'=>$code));
|
250 |
+
}
|
251 |
+
|
252 |
+
if ($url) {
|
253 |
+
$this->_getSession()->addNotice(
|
254 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $url)
|
255 |
+
);
|
256 |
+
return $this;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
|
262 |
+
public function deniedAction()
|
263 |
+
{
|
264 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
265 |
+
if (!Mage::getSingleton('admin/session')->isLoggedIn()) {
|
266 |
+
$this->_redirect('*/index/login');
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
$this->loadLayout(array('default', 'adminhtml_denied'));
|
270 |
+
$this->renderLayout();
|
271 |
+
}
|
272 |
+
|
273 |
+
public function loadLayout($ids=null, $generateBlocks=true, $generateXml=true)
|
274 |
+
{
|
275 |
+
parent::loadLayout($ids, $generateBlocks, $generateXml);
|
276 |
+
$this->_initLayoutMessages('adminhtml/session');
|
277 |
+
return $this;
|
278 |
+
}
|
279 |
+
|
280 |
+
public function norouteAction($coreRoute = null)
|
281 |
+
{
|
282 |
+
$this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
|
283 |
+
$this->getResponse()->setHeader('Status','404 File not found');
|
284 |
+
$this->loadLayout(array('default', 'adminhtml_noroute'));
|
285 |
+
$this->renderLayout();
|
286 |
+
}
|
287 |
+
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Retrieve currently used module name
|
291 |
+
*
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getUsedModuleName()
|
295 |
+
{
|
296 |
+
return $this->_usedModuleName;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Set currently used module name
|
301 |
+
*
|
302 |
+
* @param string $moduleName
|
303 |
+
* @return Mage_Adminhtml_Controller_Action
|
304 |
+
*/
|
305 |
+
public function setUsedModuleName($moduleName)
|
306 |
+
{
|
307 |
+
$this->_usedModuleName = $moduleName;
|
308 |
+
return $this;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Translate a phrase
|
313 |
+
*
|
314 |
+
* @return string
|
315 |
+
*/
|
316 |
+
public function __()
|
317 |
+
{
|
318 |
+
$args = func_get_args();
|
319 |
+
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getUsedModuleName());
|
320 |
+
array_unshift($args, $expr);
|
321 |
+
return Mage::app()->getTranslator()->translate($args);
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Set referer url for redirect in responce
|
326 |
+
*
|
327 |
+
* Is overriden here to set defaultUrl to admin url
|
328 |
+
*
|
329 |
+
* @param string $defaultUrl
|
330 |
+
* @return Mage_Adminhtml_Controller_Action
|
331 |
+
*/
|
332 |
+
protected function _redirectReferer($defaultUrl=null)
|
333 |
+
{
|
334 |
+
$defaultUrl = empty($defaultUrl) ? $this->getUrl('*') : $defaultUrl;
|
335 |
+
parent::_redirectReferer($defaultUrl);
|
336 |
+
return $this;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Set redirect into responce
|
341 |
+
*
|
342 |
+
* @param string $path
|
343 |
+
* @param array $arguments
|
344 |
+
*/
|
345 |
+
protected function _redirect($path, $arguments=array())
|
346 |
+
{
|
347 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
348 |
+
$this->getResponse()->setRedirect($this->getUrl($path, $arguments));
|
349 |
+
return $this;
|
350 |
+
}
|
351 |
+
|
352 |
+
protected function _forward($action, $controller = null, $module = null, array $params = null)
|
353 |
+
{
|
354 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
355 |
+
return parent::_forward($action, $controller, $module, $params);
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Generate url by route and parameters
|
360 |
+
*
|
361 |
+
* @param string $route
|
362 |
+
* @param array $params
|
363 |
+
* @return string
|
364 |
+
*/
|
365 |
+
public function getUrl($route='', $params=array())
|
366 |
+
{
|
367 |
+
return Mage::helper('adminhtml')->getUrl($route, $params);
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Validate Secret Key
|
372 |
+
*
|
373 |
+
* @return bool
|
374 |
+
*/
|
375 |
+
protected function _validateSecretKey()
|
376 |
+
{
|
377 |
+
if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {
|
378 |
+
return true;
|
379 |
+
}
|
380 |
+
|
381 |
+
if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null))
|
382 |
+
|| $secretKey != Mage::getSingleton('adminhtml/url')->getSecretKey()) {
|
383 |
+
return false;
|
384 |
+
}
|
385 |
+
return true;
|
386 |
+
}
|
387 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Block/Sales/Order/Shipment/Create/Tracking.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Shipment tracking control form
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Sales_Order_Shipment_Create_Tracking extends Mage_Adminhtml_Block_Template
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Prepares layout of block
|
38 |
+
*
|
39 |
+
* @return Mage_Adminhtml_Block_Sales_Order_View_Giftmessage
|
40 |
+
*/
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
$this->setChild('add_button',
|
44 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
45 |
+
->setData(array(
|
46 |
+
'label' => Mage::helper('sales')->__('Add Tracking Number'),
|
47 |
+
'class' => '',
|
48 |
+
'onclick' => 'trackingControl.add()'
|
49 |
+
))
|
50 |
+
|
51 |
+
);
|
52 |
+
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Retrieve shipment model instance
|
57 |
+
*
|
58 |
+
* @return Mage_Sales_Model_Order_Shipment
|
59 |
+
*/
|
60 |
+
public function getShipment()
|
61 |
+
{
|
62 |
+
return Mage::registry('current_shipment');
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Retrieve
|
67 |
+
*
|
68 |
+
* @return unknown
|
69 |
+
*/
|
70 |
+
public function getCarriers()
|
71 |
+
{
|
72 |
+
$carriers = array();
|
73 |
+
$carrierInstances = Mage::getSingleton('shipping/config')->getAllCarriers(
|
74 |
+
$this->getShipment()->getStoreId()
|
75 |
+
);
|
76 |
+
$carriers['custom'] = Mage::helper('sales')->__('Custom Value');
|
77 |
+
foreach ($carrierInstances as $code => $carrier) {
|
78 |
+
if ($carrier->isTrackingAvailable()) {
|
79 |
+
$carriers[$code] = $carrier->getConfigData('title');
|
80 |
+
}
|
81 |
+
}
|
82 |
+
|
83 |
+
$carriers['hanjin'] = Mage::helper('sales')->__('한진택배');
|
84 |
+
$carriers['kyungdong'] = Mage::helper('sales')->__('경동택배');
|
85 |
+
$carriers['korex'] = Mage::helper('sales')->__('대한통운');
|
86 |
+
$carriers['dongbu'] = Mage::helper('sales')->__('동부익스프레스');
|
87 |
+
$carriers['innogis'] = Mage::helper('sales')->__('이노지스');
|
88 |
+
$carriers['hanaro'] = Mage::helper('sales')->__('하나로택배');
|
89 |
+
$carriers['hyundai'] = Mage::helper('sales')->__('현대로지엠');
|
90 |
+
$carriers['cjgls'] = Mage::helper('sales')->__('CJGLS');
|
91 |
+
$carriers['yellow'] = Mage::helper('sales')->__('KG옐로우캡');
|
92 |
+
$carriers['kgb'] = Mage::helper('sales')->__('로젠택배');
|
93 |
+
$carriers['epost'] = Mage::helper('sales')->__('우체국택배');
|
94 |
+
$carriers['etc'] = Mage::helper('sales')->__('한덱스택배');
|
95 |
+
$carriers['etc'] = Mage::helper('sales')->__('호남택배');
|
96 |
+
$carriers['etc'] = Mage::helper('sales')->__('DHL택배');
|
97 |
+
$carriers['etc'] = Mage::helper('sales')->__('KGB택배');
|
98 |
+
|
99 |
+
|
100 |
+
return $carriers;
|
101 |
+
}
|
102 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Controller/Action.php
ADDED
@@ -0,0 +1,387 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Base adminhtml controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Controller_Action extends Mage_Core_Controller_Varien_Action
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Name of "is URLs checked" flag
|
38 |
+
*/
|
39 |
+
const FLAG_IS_URLS_CHECKED = 'check_url_settings';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Session namespace to refer in other places
|
43 |
+
*/
|
44 |
+
const SESSION_NAMESPACE = 'adminhtml';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Array of actions which can be processed without secret key validation
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
protected $_publicActions = array();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Used module name in current adminhtml controller
|
55 |
+
*/
|
56 |
+
protected $_usedModuleName = 'adminhtml';
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Currently used area
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
protected $_currentArea = 'adminhtml';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Namespace for session.
|
67 |
+
*
|
68 |
+
* @var string
|
69 |
+
*/
|
70 |
+
protected $_sessionNamespace = self::SESSION_NAMESPACE;
|
71 |
+
|
72 |
+
protected function _isAllowed()
|
73 |
+
{
|
74 |
+
return true;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Retrieve adminhtml session model object
|
79 |
+
*
|
80 |
+
* @return Mage_Adminhtml_Model_Session
|
81 |
+
*/
|
82 |
+
protected function _getSession()
|
83 |
+
{
|
84 |
+
return Mage::getSingleton('adminhtml/session');
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Retrieve base admihtml helper
|
89 |
+
*
|
90 |
+
* @return Mage_Adminhtml_Helper_Data
|
91 |
+
*/
|
92 |
+
protected function _getHelper()
|
93 |
+
{
|
94 |
+
return Mage::helper('adminhtml');
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Define active menu item in menu block
|
99 |
+
*
|
100 |
+
* @return Mage_Adminhtml_Controller_Action
|
101 |
+
*/
|
102 |
+
protected function _setActiveMenu($menuPath)
|
103 |
+
{
|
104 |
+
$this->getLayout()->getBlock('menu')->setActive($menuPath);
|
105 |
+
return $this;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @return Mage_Adminhtml_Controller_Action
|
110 |
+
*/
|
111 |
+
protected function _addBreadcrumb($label, $title, $link=null)
|
112 |
+
{
|
113 |
+
$this->getLayout()->getBlock('breadcrumbs')->addLink($label, $title, $link);
|
114 |
+
return $this;
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* @return Mage_Adminhtml_Controller_Action
|
119 |
+
*/
|
120 |
+
protected function _addContent(Mage_Core_Block_Abstract $block)
|
121 |
+
{
|
122 |
+
$this->getLayout()->getBlock('content')->append($block);
|
123 |
+
return $this;
|
124 |
+
}
|
125 |
+
|
126 |
+
protected function _addLeft(Mage_Core_Block_Abstract $block)
|
127 |
+
{
|
128 |
+
$this->getLayout()->getBlock('left')->append($block);
|
129 |
+
return $this;
|
130 |
+
}
|
131 |
+
|
132 |
+
protected function _addJs(Mage_Core_Block_Abstract $block)
|
133 |
+
{
|
134 |
+
$this->getLayout()->getBlock('js')->append($block);
|
135 |
+
return $this;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Controller predispatch method
|
140 |
+
*
|
141 |
+
* @return Mage_Adminhtml_Controller_Action
|
142 |
+
*/
|
143 |
+
public function preDispatch()
|
144 |
+
{
|
145 |
+
// override admin store design settings via stores section
|
146 |
+
Mage::getDesign()
|
147 |
+
->setArea($this->_currentArea)
|
148 |
+
->setPackageName((string)Mage::getConfig()->getNode('stores/admin/design/package/name'))
|
149 |
+
->setTheme((string)Mage::getConfig()->getNode('stores/admin/design/theme/default'))
|
150 |
+
;
|
151 |
+
foreach (array('layout', 'template', 'skin', 'locale') as $type) {
|
152 |
+
if ($value = (string)Mage::getConfig()->getNode("stores/admin/design/theme/{$type}")) {
|
153 |
+
Mage::getDesign()->setTheme($type, $value);
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
$this->getLayout()->setArea($this->_currentArea);
|
158 |
+
|
159 |
+
Mage::dispatchEvent('adminhtml_controller_action_predispatch_start', array());
|
160 |
+
parent::preDispatch();
|
161 |
+
$_isValidFormKey = true;
|
162 |
+
$_isValidSecretKey = true;
|
163 |
+
$_keyErrorMsg = '';
|
164 |
+
if (Mage::getSingleton('admin/session')->isLoggedIn()) {
|
165 |
+
if ($this->getRequest()->isPost()) {
|
166 |
+
$_isValidFormKey = $this->_validateFormKey();
|
167 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Form Key. Please refresh the page.');
|
168 |
+
} elseif (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
|
169 |
+
$_isValidSecretKey = $this->_validateSecretKey();
|
170 |
+
$_keyErrorMsg = Mage::helper('adminhtml')->__('Invalid Secret Key. Please refresh the page.');
|
171 |
+
}
|
172 |
+
}
|
173 |
+
if (!$_isValidFormKey || !$_isValidSecretKey) {
|
174 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
175 |
+
$this->setFlag('', self::FLAG_NO_POST_DISPATCH, true);
|
176 |
+
if ($this->getRequest()->getQuery('isAjax', false) || $this->getRequest()->getQuery('ajax', false)) {
|
177 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array(
|
178 |
+
'error' => true,
|
179 |
+
'message' => $_keyErrorMsg
|
180 |
+
)));
|
181 |
+
} else {
|
182 |
+
$this->_redirect( Mage::getSingleton('admin/session')->getUser()->getStartupPageUrl() );
|
183 |
+
}
|
184 |
+
return $this;
|
185 |
+
}
|
186 |
+
|
187 |
+
if ($this->getRequest()->isDispatched()
|
188 |
+
&& $this->getRequest()->getActionName() !== 'denied'
|
189 |
+
&& !$this->_isAllowed()) {
|
190 |
+
$this->_forward('denied');
|
191 |
+
$this->setFlag('', self::FLAG_NO_DISPATCH, true);
|
192 |
+
return $this;
|
193 |
+
}
|
194 |
+
|
195 |
+
if (!$this->getFlag('', self::FLAG_IS_URLS_CHECKED)
|
196 |
+
&& !$this->getRequest()->getParam('forwarded')
|
197 |
+
&& !$this->_getSession()->getIsUrlNotice(true)
|
198 |
+
&& !Mage::getConfig()->getNode('global/can_use_base_url')) {
|
199 |
+
//$this->_checkUrlSettings();
|
200 |
+
$this->setFlag('', self::FLAG_IS_URLS_CHECKED, true);
|
201 |
+
}
|
202 |
+
if (is_null(Mage::getSingleton('adminhtml/session')->getLocale())) {
|
203 |
+
Mage::getSingleton('adminhtml/session')->setLocale(Mage::app()->getLocale()->getLocaleCode());
|
204 |
+
}
|
205 |
+
|
206 |
+
return $this;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* @deprecated after 1.4.0.0 alpha, logic moved to Mage_Adminhtml_Block_Notification_Baseurl
|
211 |
+
* @return Mage_Adminhtml_Controller_Action
|
212 |
+
*/
|
213 |
+
protected function _checkUrlSettings()
|
214 |
+
{
|
215 |
+
/**
|
216 |
+
* Don't check for data saving actions
|
217 |
+
*/
|
218 |
+
if ($this->getRequest()->getPost() || $this->getRequest()->getQuery('isAjax')) {
|
219 |
+
return $this;
|
220 |
+
}
|
221 |
+
|
222 |
+
$configData = Mage::getModel('core/config_data');
|
223 |
+
|
224 |
+
$defaultUnsecure = (string)Mage::getConfig()->getNode(
|
225 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_UNSECURE_BASE_URL
|
226 |
+
);
|
227 |
+
$defaultSecure = (string)Mage::getConfig()->getNode(
|
228 |
+
'default/' . Mage_Core_Model_Store::XML_PATH_SECURE_BASE_URL
|
229 |
+
);
|
230 |
+
|
231 |
+
if ($defaultSecure == '{{base_url}}' || $defaultUnsecure == '{{base_url}}') {
|
232 |
+
$this->_getSession()->addNotice(
|
233 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $this->getUrl('adminhtml/system_config/edit', array('section'=>'web')))
|
234 |
+
);
|
235 |
+
return $this;
|
236 |
+
}
|
237 |
+
|
238 |
+
$dataCollection = $configData->getCollection()
|
239 |
+
->addValueFilter('{{base_url}}');
|
240 |
+
|
241 |
+
$url = false;
|
242 |
+
foreach ($dataCollection as $data) {
|
243 |
+
if ($data->getScope() == 'stores') {
|
244 |
+
$code = Mage::app()->getStore($data->getScopeId())->getCode();
|
245 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'store'=>$code));
|
246 |
+
}
|
247 |
+
if ($data->getScope() == 'websites') {
|
248 |
+
$code = Mage::app()->getWebsite($data->getScopeId())->getCode();
|
249 |
+
$url = $this->getUrl('adminhtml/system_config/edit', array('section'=>'web', 'website'=>$code));
|
250 |
+
}
|
251 |
+
|
252 |
+
if ($url) {
|
253 |
+
$this->_getSession()->addNotice(
|
254 |
+
$this->__('{{base_url}} is not recommended to use in a production environment to declare the Base Unsecure URL / Base Secure URL. It is highly recommended to change this value in your Magento <a href="%s">configuration</a>.', $url)
|
255 |
+
);
|
256 |
+
return $this;
|
257 |
+
}
|
258 |
+
}
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
|
262 |
+
public function deniedAction()
|
263 |
+
{
|
264 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Forbidden');
|
265 |
+
if (!Mage::getSingleton('admin/session')->isLoggedIn()) {
|
266 |
+
$this->_redirect('*/index/login');
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
$this->loadLayout(array('default', 'adminhtml_denied'));
|
270 |
+
$this->renderLayout();
|
271 |
+
}
|
272 |
+
|
273 |
+
public function loadLayout($ids=null, $generateBlocks=true, $generateXml=true)
|
274 |
+
{
|
275 |
+
parent::loadLayout($ids, $generateBlocks, $generateXml);
|
276 |
+
$this->_initLayoutMessages('adminhtml/session');
|
277 |
+
return $this;
|
278 |
+
}
|
279 |
+
|
280 |
+
public function norouteAction($coreRoute = null)
|
281 |
+
{
|
282 |
+
$this->getResponse()->setHeader('HTTP/1.1','404 Not Found');
|
283 |
+
$this->getResponse()->setHeader('Status','404 File not found');
|
284 |
+
$this->loadLayout(array('default', 'adminhtml_noroute'));
|
285 |
+
$this->renderLayout();
|
286 |
+
}
|
287 |
+
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Retrieve currently used module name
|
291 |
+
*
|
292 |
+
* @return string
|
293 |
+
*/
|
294 |
+
public function getUsedModuleName()
|
295 |
+
{
|
296 |
+
return $this->_usedModuleName;
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Set currently used module name
|
301 |
+
*
|
302 |
+
* @param string $moduleName
|
303 |
+
* @return Mage_Adminhtml_Controller_Action
|
304 |
+
*/
|
305 |
+
public function setUsedModuleName($moduleName)
|
306 |
+
{
|
307 |
+
$this->_usedModuleName = $moduleName;
|
308 |
+
return $this;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Translate a phrase
|
313 |
+
*
|
314 |
+
* @return string
|
315 |
+
*/
|
316 |
+
public function __()
|
317 |
+
{
|
318 |
+
$args = func_get_args();
|
319 |
+
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getUsedModuleName());
|
320 |
+
array_unshift($args, $expr);
|
321 |
+
return Mage::app()->getTranslator()->translate($args);
|
322 |
+
}
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Set referer url for redirect in responce
|
326 |
+
*
|
327 |
+
* Is overriden here to set defaultUrl to admin url
|
328 |
+
*
|
329 |
+
* @param string $defaultUrl
|
330 |
+
* @return Mage_Adminhtml_Controller_Action
|
331 |
+
*/
|
332 |
+
protected function _redirectReferer($defaultUrl=null)
|
333 |
+
{
|
334 |
+
$defaultUrl = empty($defaultUrl) ? $this->getUrl('*') : $defaultUrl;
|
335 |
+
parent::_redirectReferer($defaultUrl);
|
336 |
+
return $this;
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Set redirect into responce
|
341 |
+
*
|
342 |
+
* @param string $path
|
343 |
+
* @param array $arguments
|
344 |
+
*/
|
345 |
+
protected function _redirect($path, $arguments=array())
|
346 |
+
{
|
347 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
348 |
+
$this->getResponse()->setRedirect($this->getUrl($path, $arguments));
|
349 |
+
return $this;
|
350 |
+
}
|
351 |
+
|
352 |
+
protected function _forward($action, $controller = null, $module = null, array $params = null)
|
353 |
+
{
|
354 |
+
$this->_getSession()->setIsUrlNotice($this->getFlag('', self::FLAG_IS_URLS_CHECKED));
|
355 |
+
return parent::_forward($action, $controller, $module, $params);
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Generate url by route and parameters
|
360 |
+
*
|
361 |
+
* @param string $route
|
362 |
+
* @param array $params
|
363 |
+
* @return string
|
364 |
+
*/
|
365 |
+
public function getUrl($route='', $params=array())
|
366 |
+
{
|
367 |
+
return Mage::helper('adminhtml')->getUrl($route, $params);
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Validate Secret Key
|
372 |
+
*
|
373 |
+
* @return bool
|
374 |
+
*/
|
375 |
+
protected function _validateSecretKey()
|
376 |
+
{
|
377 |
+
if (is_array($this->_publicActions) && in_array($this->getRequest()->getActionName(), $this->_publicActions)) {
|
378 |
+
return true;
|
379 |
+
}
|
380 |
+
|
381 |
+
if (!($secretKey = $this->getRequest()->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME, null))
|
382 |
+
|| $secretKey != Mage::getSingleton('adminhtml/url')->getSecretKey()) {
|
383 |
+
return false;
|
384 |
+
}
|
385 |
+
return true;
|
386 |
+
}
|
387 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Controller/Report/Abstract.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Admin abstract reports controller
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
abstract class Mage_Adminhtml_Controller_Report_Abstract extends Mage_Adminhtml_Controller_Action
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Admin session model
|
39 |
+
*
|
40 |
+
* @var null|Mage_Admin_Model_Session
|
41 |
+
*/
|
42 |
+
protected $_adminSession = null;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve admin session model
|
46 |
+
*
|
47 |
+
* @return Mage_Admin_Model_Session
|
48 |
+
*/
|
49 |
+
protected function _getSession()
|
50 |
+
{
|
51 |
+
if (is_null($this->_adminSession)) {
|
52 |
+
$this->_adminSession = Mage::getSingleton('admin/session');
|
53 |
+
}
|
54 |
+
return $this->_adminSession;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add report breadcrumbs
|
59 |
+
*
|
60 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
61 |
+
*/
|
62 |
+
public function _initAction()
|
63 |
+
{
|
64 |
+
$this->loadLayout()
|
65 |
+
->_addBreadcrumb(Mage::helper('reports')->__('Reports'), Mage::helper('reports')->__('Reports'));
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Report action init operations
|
71 |
+
*
|
72 |
+
* @param array|Varien_Object $blocks
|
73 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
74 |
+
*/
|
75 |
+
public function _initReportAction($blocks)
|
76 |
+
{
|
77 |
+
if (!is_array($blocks)) {
|
78 |
+
$blocks = array($blocks);
|
79 |
+
}
|
80 |
+
|
81 |
+
$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
|
82 |
+
$requestData = $this->_filterDates($requestData, array('from', 'to'));
|
83 |
+
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
|
84 |
+
$params = new Varien_Object();
|
85 |
+
|
86 |
+
foreach ($requestData as $key => $value) {
|
87 |
+
if (!empty($value)) {
|
88 |
+
$params->setData($key, $value);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
foreach ($blocks as $block) {
|
93 |
+
if ($block) {
|
94 |
+
$block->setPeriodType($params->getData('period_type'));
|
95 |
+
$block->setFilterData($params);
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Add refresh statistics links
|
104 |
+
*
|
105 |
+
* @param string $flagCode
|
106 |
+
* @param string $refreshCode
|
107 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
108 |
+
*/
|
109 |
+
protected function _showLastExecutionTime($flagCode, $refreshCode)
|
110 |
+
{
|
111 |
+
$flag = Mage::getModel('reports/flag')->setReportFlagCode($flagCode)->loadSelf();
|
112 |
+
$updatedAt = ($flag->hasData())
|
113 |
+
? Mage::app()->getLocale()->storeDate(
|
114 |
+
0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true
|
115 |
+
)
|
116 |
+
: 'undefined';
|
117 |
+
|
118 |
+
$refreshStatsLink = $this->getUrl('*/report_statistics');
|
119 |
+
$directRefreshLink = $this->getUrl('*/report_statistics/refreshRecent', array('code' => $refreshCode));
|
120 |
+
|
121 |
+
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('Last updated: %s. To refresh last day\'s <a href="%s">statistics</a>, click <a href="%s">here</a>.', $updatedAt, $refreshStatsLink, $directRefreshLink));
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Creditmemo.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Creditmemo extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_CreditmemoController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Credit Memos'),$this->__('Credit Memos'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Creditmemos grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_initAction()
|
63 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_creditmemo'))
|
64 |
+
->renderLayout();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Creditmemo information page
|
69 |
+
*/
|
70 |
+
public function viewAction()
|
71 |
+
{
|
72 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
73 |
+
$this->_forward('view', 'sales_order_creditmemo', null, array('come_from' => 'sales_creditmemo'));
|
74 |
+
} else {
|
75 |
+
$this->_forward('noRoute');
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Notify user
|
81 |
+
*/
|
82 |
+
public function emailAction()
|
83 |
+
{
|
84 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
85 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
86 |
+
$creditmemo->sendEmail();
|
87 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
88 |
+
->getUnnotifiedForInstance($creditmemo, Mage_Sales_Model_Order_Creditmemo::HISTORY_ENTITY_NAME);
|
89 |
+
if ($historyItem) {
|
90 |
+
$historyItem->setIsCustomerNotified(1);
|
91 |
+
$historyItem->save();
|
92 |
+
}
|
93 |
+
|
94 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message was sent.'));
|
95 |
+
$this->_redirect('*/sales_order_creditmemo/view', array(
|
96 |
+
'creditmemo_id' => $creditmemoId
|
97 |
+
));
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
public function pdfcreditmemosAction(){
|
103 |
+
$creditmemosIds = $this->getRequest()->getPost('creditmemo_ids');
|
104 |
+
if (!empty($creditmemosIds)) {
|
105 |
+
$invoices = Mage::getResourceModel('sales/order_creditmemo_collection')
|
106 |
+
->addAttributeToSelect('*')
|
107 |
+
->addAttributeToFilter('entity_id', array('in' => $creditmemosIds))
|
108 |
+
->load();
|
109 |
+
if (!isset($pdf)){
|
110 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
111 |
+
} else {
|
112 |
+
$pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
113 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
114 |
+
}
|
115 |
+
|
116 |
+
return $this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
117 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
118 |
+
}
|
119 |
+
$this->_redirect('*/*/');
|
120 |
+
}
|
121 |
+
|
122 |
+
public function printAction()
|
123 |
+
{
|
124 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
125 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
126 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
127 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
128 |
+
$this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
129 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
$this->_forward('noRoute');
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
protected function _isAllowed()
|
138 |
+
{
|
139 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/creditmemo');
|
140 |
+
}
|
141 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Invoice.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Invoice extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_InvoiceController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Invoices'),$this->__('Invoices'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Order grid
|
59 |
+
*/
|
60 |
+
public function gridAction()
|
61 |
+
{
|
62 |
+
$this->loadLayout();
|
63 |
+
$this->getResponse()->setBody(
|
64 |
+
$this->getLayout()->createBlock('adminhtml/sales_invoice_grid')->toHtml()
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Invoices grid
|
70 |
+
*/
|
71 |
+
public function indexAction()
|
72 |
+
{
|
73 |
+
$this->_title($this->__('Sales'))->_title($this->__('Invoices'));
|
74 |
+
|
75 |
+
$this->_initAction()
|
76 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_invoice'))
|
77 |
+
->renderLayout();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Invoice information page
|
82 |
+
*/
|
83 |
+
public function viewAction()
|
84 |
+
{
|
85 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
86 |
+
$this->_forward('view', 'sales_order_invoice', null, array('come_from'=>'invoice'));
|
87 |
+
} else {
|
88 |
+
$this->_forward('noRoute');
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Notify user
|
94 |
+
*/
|
95 |
+
public function emailAction()
|
96 |
+
{
|
97 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
98 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
99 |
+
$invoice->sendEmail();
|
100 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
101 |
+
->getUnnotifiedForInstance($invoice, Mage_Sales_Model_Order_Invoice::HISTORY_ENTITY_NAME);
|
102 |
+
if ($historyItem) {
|
103 |
+
$historyItem->setIsCustomerNotified(1);
|
104 |
+
$historyItem->save();
|
105 |
+
}
|
106 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message has been sent.'));
|
107 |
+
$this->_redirect('*/sales_invoice/view', array(
|
108 |
+
'order_id' => $invoice->getOrder()->getId(),
|
109 |
+
'invoice_id'=> $invoiceId,
|
110 |
+
));
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
public function printAction()
|
116 |
+
{
|
117 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
118 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
119 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
120 |
+
$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
121 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
122 |
+
}
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
$this->_forward('noRoute');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
public function pdfinvoicesAction(){
|
130 |
+
$invoicesIds = $this->getRequest()->getPost('invoice_ids');
|
131 |
+
if (!empty($invoicesIds)) {
|
132 |
+
$invoices = Mage::getResourceModel('sales/order_invoice_collection')
|
133 |
+
->addAttributeToSelect('*')
|
134 |
+
->addAttributeToFilter('entity_id', array('in' => $invoicesIds))
|
135 |
+
->load();
|
136 |
+
if (!isset($pdf)){
|
137 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
138 |
+
} else {
|
139 |
+
$pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
140 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
141 |
+
}
|
142 |
+
|
143 |
+
return $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
144 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
145 |
+
}
|
146 |
+
$this->_redirect('*/*/');
|
147 |
+
}
|
148 |
+
|
149 |
+
protected function _isAllowed()
|
150 |
+
{
|
151 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/invoice');
|
152 |
+
}
|
153 |
+
|
154 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Controller/Sales/Shipment.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Shipment extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_ShipmentController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Shipments'),$this->__('Shipments'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Shipments grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_title($this->__('Sales'))->_title($this->__('Shipments'));
|
63 |
+
|
64 |
+
$this->_initAction()
|
65 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_shipment'))
|
66 |
+
->renderLayout();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Shipment information page
|
71 |
+
*/
|
72 |
+
public function viewAction()
|
73 |
+
{
|
74 |
+
if ($shipmentId = $this->getRequest()->getParam('shipment_id')) {
|
75 |
+
$this->_forward('view', 'sales_order_shipment', null, array('come_from'=>'shipment'));
|
76 |
+
} else {
|
77 |
+
$this->_forward('noRoute');
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
public function pdfshipmentsAction(){
|
82 |
+
$shipmentIds = $this->getRequest()->getPost('shipment_ids');
|
83 |
+
if (!empty($shipmentIds)) {
|
84 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
85 |
+
->addAttributeToSelect('*')
|
86 |
+
->addAttributeToFilter('entity_id', array('in' => $shipmentIds))
|
87 |
+
->load();
|
88 |
+
if (!isset($pdf)){
|
89 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
90 |
+
} else {
|
91 |
+
$pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
92 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
96 |
+
}
|
97 |
+
$this->_redirect('*/*/');
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
public function printAction()
|
102 |
+
{
|
103 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
104 |
+
if ($shipmentId = $this->getRequest()->getParam('invoice_id')) { // invoice_id o_0
|
105 |
+
if ($shipment = Mage::getModel('sales/order_shipment')->load($shipmentId)) {
|
106 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
107 |
+
$this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
108 |
+
}
|
109 |
+
}
|
110 |
+
else {
|
111 |
+
$this->_forward('noRoute');
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function _isAllowed()
|
116 |
+
{
|
117 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/shipment');
|
118 |
+
}
|
119 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Report/Abstract.php
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Admin abstract reports controller
|
30 |
+
*
|
31 |
+
* @category Mage
|
32 |
+
* @package Mage_Adminhtml
|
33 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
+
*/
|
35 |
+
abstract class Mage_Adminhtml_Controller_Report_Abstract extends Mage_Adminhtml_Controller_Action
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Admin session model
|
39 |
+
*
|
40 |
+
* @var null|Mage_Admin_Model_Session
|
41 |
+
*/
|
42 |
+
protected $_adminSession = null;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Retrieve admin session model
|
46 |
+
*
|
47 |
+
* @return Mage_Admin_Model_Session
|
48 |
+
*/
|
49 |
+
protected function _getSession()
|
50 |
+
{
|
51 |
+
if (is_null($this->_adminSession)) {
|
52 |
+
$this->_adminSession = Mage::getSingleton('admin/session');
|
53 |
+
}
|
54 |
+
return $this->_adminSession;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add report breadcrumbs
|
59 |
+
*
|
60 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
61 |
+
*/
|
62 |
+
public function _initAction()
|
63 |
+
{
|
64 |
+
$this->loadLayout()
|
65 |
+
->_addBreadcrumb(Mage::helper('reports')->__('Reports'), Mage::helper('reports')->__('Reports'));
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Report action init operations
|
71 |
+
*
|
72 |
+
* @param array|Varien_Object $blocks
|
73 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
74 |
+
*/
|
75 |
+
public function _initReportAction($blocks)
|
76 |
+
{
|
77 |
+
if (!is_array($blocks)) {
|
78 |
+
$blocks = array($blocks);
|
79 |
+
}
|
80 |
+
|
81 |
+
$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
|
82 |
+
$requestData = $this->_filterDates($requestData, array('from', 'to'));
|
83 |
+
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
|
84 |
+
$params = new Varien_Object();
|
85 |
+
|
86 |
+
foreach ($requestData as $key => $value) {
|
87 |
+
if (!empty($value)) {
|
88 |
+
$params->setData($key, $value);
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
foreach ($blocks as $block) {
|
93 |
+
if ($block) {
|
94 |
+
$block->setPeriodType($params->getData('period_type'));
|
95 |
+
$block->setFilterData($params);
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
return $this;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Add refresh statistics links
|
104 |
+
*
|
105 |
+
* @param string $flagCode
|
106 |
+
* @param string $refreshCode
|
107 |
+
* @return Mage_Adminhtml_Controller_Report_Abstract
|
108 |
+
*/
|
109 |
+
protected function _showLastExecutionTime($flagCode, $refreshCode)
|
110 |
+
{
|
111 |
+
$flag = Mage::getModel('reports/flag')->setReportFlagCode($flagCode)->loadSelf();
|
112 |
+
$updatedAt = ($flag->hasData())
|
113 |
+
? Mage::app()->getLocale()->storeDate(
|
114 |
+
0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true
|
115 |
+
)
|
116 |
+
: 'undefined';
|
117 |
+
|
118 |
+
$refreshStatsLink = $this->getUrl('*/report_statistics');
|
119 |
+
$directRefreshLink = $this->getUrl('*/report_statistics/refreshRecent', array('code' => $refreshCode));
|
120 |
+
|
121 |
+
Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('Last updated: %s. To refresh last day\'s <a href="%s">statistics</a>, click <a href="%s">here</a>.', $updatedAt, $refreshStatsLink, $directRefreshLink));
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Sales/Creditmemo.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Creditmemo extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_CreditmemoController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Credit Memos'),$this->__('Credit Memos'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Creditmemos grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_initAction()
|
63 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_creditmemo'))
|
64 |
+
->renderLayout();
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Creditmemo information page
|
69 |
+
*/
|
70 |
+
public function viewAction()
|
71 |
+
{
|
72 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
73 |
+
$this->_forward('view', 'sales_order_creditmemo', null, array('come_from' => 'sales_creditmemo'));
|
74 |
+
} else {
|
75 |
+
$this->_forward('noRoute');
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Notify user
|
81 |
+
*/
|
82 |
+
public function emailAction()
|
83 |
+
{
|
84 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
85 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
86 |
+
$creditmemo->sendEmail();
|
87 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
88 |
+
->getUnnotifiedForInstance($creditmemo, Mage_Sales_Model_Order_Creditmemo::HISTORY_ENTITY_NAME);
|
89 |
+
if ($historyItem) {
|
90 |
+
$historyItem->setIsCustomerNotified(1);
|
91 |
+
$historyItem->save();
|
92 |
+
}
|
93 |
+
|
94 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message was sent.'));
|
95 |
+
$this->_redirect('*/sales_order_creditmemo/view', array(
|
96 |
+
'creditmemo_id' => $creditmemoId
|
97 |
+
));
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
public function pdfcreditmemosAction(){
|
103 |
+
$creditmemosIds = $this->getRequest()->getPost('creditmemo_ids');
|
104 |
+
if (!empty($creditmemosIds)) {
|
105 |
+
$invoices = Mage::getResourceModel('sales/order_creditmemo_collection')
|
106 |
+
->addAttributeToSelect('*')
|
107 |
+
->addAttributeToFilter('entity_id', array('in' => $creditmemosIds))
|
108 |
+
->load();
|
109 |
+
if (!isset($pdf)){
|
110 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
111 |
+
} else {
|
112 |
+
$pages = Mage::getModel('sales/order_pdf_creditmemo')->getPdf($invoices);
|
113 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
114 |
+
}
|
115 |
+
|
116 |
+
return $this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
117 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
118 |
+
}
|
119 |
+
$this->_redirect('*/*/');
|
120 |
+
}
|
121 |
+
|
122 |
+
public function printAction()
|
123 |
+
{
|
124 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
125 |
+
if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) {
|
126 |
+
if ($creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId)) {
|
127 |
+
$pdf = Mage::getModel('sales/order_pdf_creditmemo')->getPdf(array($creditmemo));
|
128 |
+
$this->_prepareDownloadResponse('creditmemo'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
129 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
130 |
+
}
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
$this->_forward('noRoute');
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
protected function _isAllowed()
|
138 |
+
{
|
139 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/creditmemo');
|
140 |
+
}
|
141 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Sales/Invoice.php
ADDED
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Invoice extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_InvoiceController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Invoices'),$this->__('Invoices'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Order grid
|
59 |
+
*/
|
60 |
+
public function gridAction()
|
61 |
+
{
|
62 |
+
$this->loadLayout();
|
63 |
+
$this->getResponse()->setBody(
|
64 |
+
$this->getLayout()->createBlock('adminhtml/sales_invoice_grid')->toHtml()
|
65 |
+
);
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Invoices grid
|
70 |
+
*/
|
71 |
+
public function indexAction()
|
72 |
+
{
|
73 |
+
$this->_title($this->__('Sales'))->_title($this->__('Invoices'));
|
74 |
+
|
75 |
+
$this->_initAction()
|
76 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_invoice'))
|
77 |
+
->renderLayout();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Invoice information page
|
82 |
+
*/
|
83 |
+
public function viewAction()
|
84 |
+
{
|
85 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
86 |
+
$this->_forward('view', 'sales_order_invoice', null, array('come_from'=>'invoice'));
|
87 |
+
} else {
|
88 |
+
$this->_forward('noRoute');
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Notify user
|
94 |
+
*/
|
95 |
+
public function emailAction()
|
96 |
+
{
|
97 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
98 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
99 |
+
$invoice->sendEmail();
|
100 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
101 |
+
->getUnnotifiedForInstance($invoice, Mage_Sales_Model_Order_Invoice::HISTORY_ENTITY_NAME);
|
102 |
+
if ($historyItem) {
|
103 |
+
$historyItem->setIsCustomerNotified(1);
|
104 |
+
$historyItem->save();
|
105 |
+
}
|
106 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The message has been sent.'));
|
107 |
+
$this->_redirect('*/sales_invoice/view', array(
|
108 |
+
'order_id' => $invoice->getOrder()->getId(),
|
109 |
+
'invoice_id'=> $invoiceId,
|
110 |
+
));
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
public function printAction()
|
116 |
+
{
|
117 |
+
if ($invoiceId = $this->getRequest()->getParam('invoice_id')) {
|
118 |
+
if ($invoice = Mage::getModel('sales/order_invoice')->load($invoiceId)) {
|
119 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array($invoice));
|
120 |
+
$this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
121 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
122 |
+
}
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
$this->_forward('noRoute');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
public function pdfinvoicesAction(){
|
130 |
+
$invoicesIds = $this->getRequest()->getPost('invoice_ids');
|
131 |
+
if (!empty($invoicesIds)) {
|
132 |
+
$invoices = Mage::getResourceModel('sales/order_invoice_collection')
|
133 |
+
->addAttributeToSelect('*')
|
134 |
+
->addAttributeToFilter('entity_id', array('in' => $invoicesIds))
|
135 |
+
->load();
|
136 |
+
if (!isset($pdf)){
|
137 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
138 |
+
} else {
|
139 |
+
$pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);
|
140 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
141 |
+
}
|
142 |
+
|
143 |
+
return $this->_prepareDownloadResponse('invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').
|
144 |
+
'.pdf', $pdf->render(), 'application/pdf');
|
145 |
+
}
|
146 |
+
$this->_redirect('*/*/');
|
147 |
+
}
|
148 |
+
|
149 |
+
protected function _isAllowed()
|
150 |
+
{
|
151 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/invoice');
|
152 |
+
}
|
153 |
+
|
154 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php
ADDED
@@ -0,0 +1,787 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales order shipment controller
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Sales_Order_ShipmentController extends Mage_Adminhtml_Controller_Sales_Shipment
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* Initialize shipment items QTY
|
38 |
+
*/
|
39 |
+
protected function _getItemQtys()
|
40 |
+
{
|
41 |
+
$data = $this->getRequest()->getParam('shipment');
|
42 |
+
if (isset($data['items'])) {
|
43 |
+
$qtys = $data['items'];
|
44 |
+
} else {
|
45 |
+
$qtys = array();
|
46 |
+
}
|
47 |
+
return $qtys;
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Initialize shipment model instance
|
52 |
+
*
|
53 |
+
* @return Mage_Sales_Model_Order_Shipment|bool
|
54 |
+
*/
|
55 |
+
protected function _initShipment()
|
56 |
+
{
|
57 |
+
$this->_title($this->__('Sales'))->_title($this->__('Shipments'));
|
58 |
+
|
59 |
+
$shipment = false;
|
60 |
+
$shipmentId = $this->getRequest()->getParam('shipment_id');
|
61 |
+
$orderId = $this->getRequest()->getParam('order_id');
|
62 |
+
if ($shipmentId) {
|
63 |
+
$shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);
|
64 |
+
} elseif ($orderId) {
|
65 |
+
$order = Mage::getModel('sales/order')->load($orderId);
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Check order existing
|
69 |
+
*/
|
70 |
+
if (!$order->getId()) {
|
71 |
+
$this->_getSession()->addError($this->__('The order no longer exists.'));
|
72 |
+
return false;
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Check shipment is available to create separate from invoice
|
76 |
+
*/
|
77 |
+
if ($order->getForcedDoShipmentWithInvoice()) {
|
78 |
+
$this->_getSession()->addError($this->__('Cannot do shipment for the order separately from invoice.'));
|
79 |
+
return false;
|
80 |
+
}
|
81 |
+
/**
|
82 |
+
* Check shipment create availability
|
83 |
+
*/
|
84 |
+
if (!$order->canShip()) {
|
85 |
+
$this->_getSession()->addError($this->__('Cannot do shipment for the order.'));
|
86 |
+
return false;
|
87 |
+
}
|
88 |
+
$savedQtys = $this->_getItemQtys();
|
89 |
+
$shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($savedQtys);
|
90 |
+
|
91 |
+
$tracks = $this->getRequest()->getPost('tracking');
|
92 |
+
if ($tracks) {
|
93 |
+
foreach ($tracks as $data) {
|
94 |
+
if (empty($data['number'])) {
|
95 |
+
Mage::throwException($this->__('Tracking number cannot be empty.'));
|
96 |
+
}
|
97 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
98 |
+
->addData($data);
|
99 |
+
$shipment->addTrack($track);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
Mage::register('current_shipment', $shipment);
|
105 |
+
return $shipment;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Save shipment and order in one transaction
|
110 |
+
*
|
111 |
+
* @param Mage_Sales_Model_Order_Shipment $shipment
|
112 |
+
* @return Mage_Adminhtml_Sales_Order_ShipmentController
|
113 |
+
*/
|
114 |
+
protected function _saveShipment($shipment)
|
115 |
+
{
|
116 |
+
$shipment->getOrder()->setIsInProcess(true);
|
117 |
+
$transactionSave = Mage::getModel('core/resource_transaction')
|
118 |
+
->addObject($shipment)
|
119 |
+
->addObject($shipment->getOrder())
|
120 |
+
->save();
|
121 |
+
|
122 |
+
return $this;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Shipment information page
|
127 |
+
*/
|
128 |
+
public function viewAction()
|
129 |
+
{
|
130 |
+
if ($this->_initShipment()) {
|
131 |
+
$this->_title($this->__('View Shipment'));
|
132 |
+
|
133 |
+
$this->loadLayout();
|
134 |
+
$this->getLayout()->getBlock('sales_shipment_view')
|
135 |
+
->updateBackButtonUrl($this->getRequest()->getParam('come_from'));
|
136 |
+
$this->_setActiveMenu('sales/order')
|
137 |
+
->renderLayout();
|
138 |
+
} else {
|
139 |
+
$this->_forward('noRoute');
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* Start create shipment action
|
145 |
+
*/
|
146 |
+
public function startAction()
|
147 |
+
{
|
148 |
+
/**
|
149 |
+
* Clear old values for shipment qty's
|
150 |
+
*/
|
151 |
+
$this->_redirect('*/*/new', array('order_id'=>$this->getRequest()->getParam('order_id')));
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Shipment create page
|
156 |
+
*/
|
157 |
+
public function newAction()
|
158 |
+
{
|
159 |
+
if ($shipment = $this->_initShipment()) {
|
160 |
+
$this->_title($this->__('New Shipment'));
|
161 |
+
|
162 |
+
$comment = Mage::getSingleton('adminhtml/session')->getCommentText(true);
|
163 |
+
if ($comment) {
|
164 |
+
$shipment->setCommentText($comment);
|
165 |
+
}
|
166 |
+
|
167 |
+
$this->loadLayout()
|
168 |
+
->_setActiveMenu('sales/order')
|
169 |
+
->renderLayout();
|
170 |
+
} else {
|
171 |
+
$this->_redirect('*/sales_order/view', array('order_id'=>$this->getRequest()->getParam('order_id')));
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Save shipment
|
177 |
+
* We can save only new shipment. Existing shipments are not editable
|
178 |
+
*
|
179 |
+
* @return null
|
180 |
+
*/
|
181 |
+
public function saveAction()
|
182 |
+
{
|
183 |
+
$data = $this->getRequest()->getPost('shipment');
|
184 |
+
if (!empty($data['comment_text'])) {
|
185 |
+
Mage::getSingleton('adminhtml/session')->setCommentText($data['comment_text']);
|
186 |
+
}
|
187 |
+
|
188 |
+
try {
|
189 |
+
$shipment = $this->_initShipment();
|
190 |
+
if (!$shipment) {
|
191 |
+
$this->_forward('noRoute');
|
192 |
+
return;
|
193 |
+
}
|
194 |
+
|
195 |
+
$shipment->register();
|
196 |
+
$comment = '';
|
197 |
+
if (!empty($data['comment_text'])) {
|
198 |
+
$shipment->addComment(
|
199 |
+
$data['comment_text'],
|
200 |
+
isset($data['comment_customer_notify']),
|
201 |
+
isset($data['is_visible_on_front'])
|
202 |
+
);
|
203 |
+
if (isset($data['comment_customer_notify'])) {
|
204 |
+
$comment = $data['comment_text'];
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
if (!empty($data['send_email'])) {
|
209 |
+
$shipment->setEmailSent(true);
|
210 |
+
}
|
211 |
+
|
212 |
+
$shipment->getOrder()->setCustomerNoteNotify(!empty($data['send_email']));
|
213 |
+
$responseAjax = new Varien_Object();
|
214 |
+
$isNeedCreateLabel = isset($data['create_shipping_label']) && $data['create_shipping_label'];
|
215 |
+
|
216 |
+
if ($isNeedCreateLabel && $this->_createShippingLabel($shipment)) {
|
217 |
+
$responseAjax->setOk(true);
|
218 |
+
}
|
219 |
+
|
220 |
+
$this->_saveShipment($shipment);
|
221 |
+
|
222 |
+
$shipment->sendEmail(!empty($data['send_email']), $comment);
|
223 |
+
|
224 |
+
$shipmentCreatedMessage = $this->__('The shipment has been created.');
|
225 |
+
$labelCreatedMessage = $this->__('The shipping label has been created.');
|
226 |
+
|
227 |
+
$this->_getSession()->addSuccess($isNeedCreateLabel ? $shipmentCreatedMessage . ' ' . $labelCreatedMessage
|
228 |
+
: $shipmentCreatedMessage);
|
229 |
+
Mage::getSingleton('adminhtml/session')->getCommentText(true);
|
230 |
+
} catch (Mage_Core_Exception $e) {
|
231 |
+
if ($isNeedCreateLabel) {
|
232 |
+
$responseAjax->setError(true);
|
233 |
+
$responseAjax->setMessage($e->getMessage());
|
234 |
+
} else {
|
235 |
+
$this->_getSession()->addError($e->getMessage());
|
236 |
+
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
237 |
+
}
|
238 |
+
} catch (Exception $e) {
|
239 |
+
Mage::logException($e);
|
240 |
+
if ($isNeedCreateLabel) {
|
241 |
+
$responseAjax->setError(true);
|
242 |
+
$responseAjax->setMessage(
|
243 |
+
Mage::helper('sales')->__('An error occurred while creating shipping label.'));
|
244 |
+
} else {
|
245 |
+
$this->_getSession()->addError($this->__('Cannot save shipment.'));
|
246 |
+
$this->_redirect('*/*/new', array('order_id' => $this->getRequest()->getParam('order_id')));
|
247 |
+
}
|
248 |
+
|
249 |
+
}
|
250 |
+
if ($isNeedCreateLabel) {
|
251 |
+
$this->getResponse()->setBody($responseAjax->toJson());
|
252 |
+
} else {
|
253 |
+
$this->_redirect('*/sales_order/view', array('order_id' => $shipment->getOrderId()));
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Send email with shipment data to customer
|
259 |
+
*/
|
260 |
+
public function emailAction()
|
261 |
+
{
|
262 |
+
try {
|
263 |
+
$shipment = $this->_initShipment();
|
264 |
+
if ($shipment) {
|
265 |
+
$shipment->sendEmail(true)
|
266 |
+
->setEmailSent(true)
|
267 |
+
->save();
|
268 |
+
$historyItem = Mage::getResourceModel('sales/order_status_history_collection')
|
269 |
+
->getUnnotifiedForInstance($shipment, Mage_Sales_Model_Order_Shipment::HISTORY_ENTITY_NAME);
|
270 |
+
if ($historyItem) {
|
271 |
+
$historyItem->setIsCustomerNotified(1);
|
272 |
+
$historyItem->save();
|
273 |
+
}
|
274 |
+
$this->_getSession()->addSuccess($this->__('The shipment has been sent.'));
|
275 |
+
}
|
276 |
+
} catch (Mage_Core_Exception $e) {
|
277 |
+
$this->_getSession()->addError($e->getMessage());
|
278 |
+
} catch (Exception $e) {
|
279 |
+
$this->_getSession()->addError($this->__('Cannot send shipment information.'));
|
280 |
+
}
|
281 |
+
$this->_redirect('*/*/view', array(
|
282 |
+
'shipment_id' => $this->getRequest()->getParam('shipment_id')
|
283 |
+
));
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* Add new tracking number action
|
288 |
+
*/
|
289 |
+
public function addTrackAction()
|
290 |
+
{
|
291 |
+
try {
|
292 |
+
$carrier = $this->getRequest()->getPost('carrier');
|
293 |
+
$number = $this->getRequest()->getPost('number');
|
294 |
+
$title = $this->getRequest()->getPost('title');
|
295 |
+
if (empty($carrier)) {
|
296 |
+
Mage::throwException($this->__('The carrier needs to be specified.'));
|
297 |
+
}
|
298 |
+
|
299 |
+
if (empty($number)) {
|
300 |
+
Mage::throwException($this->__('Tracking4 number cannot be empty.'));
|
301 |
+
}
|
302 |
+
$shipment = $this->_initShipment();
|
303 |
+
if ($shipment) {
|
304 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
305 |
+
->setNumber($number)
|
306 |
+
->setCarrierCode($carrier)
|
307 |
+
->setTitle($title);
|
308 |
+
$shipment->addTrack($track)
|
309 |
+
->save();
|
310 |
+
|
311 |
+
$this->loadLayout();
|
312 |
+
$response = $this->getLayout()->getBlock('shipment_tracking')->toHtml();
|
313 |
+
} else {
|
314 |
+
$response = array(
|
315 |
+
'error' => true,
|
316 |
+
'message' => $this->__('Cannot initialize shipment for adding tracking number.'),
|
317 |
+
);
|
318 |
+
}
|
319 |
+
} catch (Mage_Core_Exception $e) {
|
320 |
+
$response = array(
|
321 |
+
'error' => true,
|
322 |
+
'message' => $e->getMessage(),
|
323 |
+
);
|
324 |
+
} catch (Exception $e) {
|
325 |
+
$response = array(
|
326 |
+
'error' => true,
|
327 |
+
'message' => $this->__('Cannot add tracking number.'),
|
328 |
+
);
|
329 |
+
}
|
330 |
+
if (is_array($response)) {
|
331 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
332 |
+
}
|
333 |
+
$this->getResponse()->setBody($response);
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Remove tracking number from shipment
|
338 |
+
*/
|
339 |
+
public function removeTrackAction()
|
340 |
+
{
|
341 |
+
$trackId = $this->getRequest()->getParam('track_id');
|
342 |
+
$shipmentId = $this->getRequest()->getParam('shipment_id');
|
343 |
+
$track = Mage::getModel('sales/order_shipment_track')->load($trackId);
|
344 |
+
if ($track->getId()) {
|
345 |
+
try {
|
346 |
+
if ($this->_initShipment()) {
|
347 |
+
$track->delete();
|
348 |
+
|
349 |
+
$this->loadLayout();
|
350 |
+
$response = $this->getLayout()->getBlock('shipment_tracking')->toHtml();
|
351 |
+
} else {
|
352 |
+
$response = array(
|
353 |
+
'error' => true,
|
354 |
+
'message' => $this->__('Cannot initialize shipment for delete tracking number.'),
|
355 |
+
);
|
356 |
+
}
|
357 |
+
} catch (Exception $e) {
|
358 |
+
$response = array(
|
359 |
+
'error' => true,
|
360 |
+
'message' => $this->__('Cannot delete tracking number.'),
|
361 |
+
);
|
362 |
+
}
|
363 |
+
} else {
|
364 |
+
$response = array(
|
365 |
+
'error' => true,
|
366 |
+
'message' => $this->__('Cannot load track with retrieving identifier.'),
|
367 |
+
);
|
368 |
+
}
|
369 |
+
if (is_array($response)) {
|
370 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
371 |
+
}
|
372 |
+
$this->getResponse()->setBody($response);
|
373 |
+
}
|
374 |
+
|
375 |
+
/**
|
376 |
+
* View shipment tracking information
|
377 |
+
*/
|
378 |
+
public function viewTrackAction()
|
379 |
+
{
|
380 |
+
$trackId = $this->getRequest()->getParam('track_id');
|
381 |
+
$shipmentId = $this->getRequest()->getParam('shipment_id');
|
382 |
+
$track = Mage::getModel('sales/order_shipment_track')->load($trackId);
|
383 |
+
if ($track->getId()) {
|
384 |
+
try {
|
385 |
+
$response = $track->getNumberDetail();
|
386 |
+
} catch (Exception $e) {
|
387 |
+
$response = array(
|
388 |
+
'error' => true,
|
389 |
+
'message' => $this->__('Cannot retrieve tracking number detail.'),
|
390 |
+
);
|
391 |
+
}
|
392 |
+
} else {
|
393 |
+
$response = array(
|
394 |
+
'error' => true,
|
395 |
+
'message' => $this->__('Cannot load track with retrieving identifier.'),
|
396 |
+
);
|
397 |
+
}
|
398 |
+
|
399 |
+
if ( is_object($response)){
|
400 |
+
$className = Mage::getConfig()->getBlockClassName('adminhtml/template');
|
401 |
+
$block = new $className();
|
402 |
+
$block->setType('adminhtml/template')
|
403 |
+
->setIsAnonymous(true)
|
404 |
+
->setTemplate('sales/order/shipment/tracking/info.phtml');
|
405 |
+
|
406 |
+
$block->setTrackingInfo($response);
|
407 |
+
|
408 |
+
$this->getResponse()->setBody($block->toHtml());
|
409 |
+
} else {
|
410 |
+
if (is_array($response)) {
|
411 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
412 |
+
}
|
413 |
+
|
414 |
+
$this->getResponse()->setBody($response);
|
415 |
+
}
|
416 |
+
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Add comment to shipment history
|
420 |
+
*/
|
421 |
+
public function addCommentAction()
|
422 |
+
{
|
423 |
+
try {
|
424 |
+
$this->getRequest()->setParam(
|
425 |
+
'shipment_id',
|
426 |
+
$this->getRequest()->getParam('id')
|
427 |
+
);
|
428 |
+
$data = $this->getRequest()->getPost('comment');
|
429 |
+
if (empty($data['comment'])) {
|
430 |
+
Mage::throwException($this->__('Comment text field cannot be empty.'));
|
431 |
+
}
|
432 |
+
$shipment = $this->_initShipment();
|
433 |
+
$shipment->addComment(
|
434 |
+
$data['comment'],
|
435 |
+
isset($data['is_customer_notified']),
|
436 |
+
isset($data['is_visible_on_front'])
|
437 |
+
);
|
438 |
+
$shipment->sendUpdateEmail(!empty($data['is_customer_notified']), $data['comment']);
|
439 |
+
$shipment->save();
|
440 |
+
|
441 |
+
$this->loadLayout(false);
|
442 |
+
$response = $this->getLayout()->getBlock('shipment_comments')->toHtml();
|
443 |
+
} catch (Mage_Core_Exception $e) {
|
444 |
+
$response = array(
|
445 |
+
'error' => true,
|
446 |
+
'message' => $e->getMessage()
|
447 |
+
);
|
448 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
449 |
+
} catch (Exception $e) {
|
450 |
+
$response = array(
|
451 |
+
'error' => true,
|
452 |
+
'message' => $this->__('Cannot add new comment.')
|
453 |
+
);
|
454 |
+
$response = Mage::helper('core')->jsonEncode($response);
|
455 |
+
}
|
456 |
+
$this->getResponse()->setBody($response);
|
457 |
+
}
|
458 |
+
|
459 |
+
|
460 |
+
|
461 |
+
/**
|
462 |
+
* Decides if we need to create dummy shipment item or not
|
463 |
+
* for eaxample we don't need create dummy parent if all
|
464 |
+
* children are not in process
|
465 |
+
*
|
466 |
+
* @deprecated after 1.4, Mage_Sales_Model_Service_Order used
|
467 |
+
* @param Mage_Sales_Model_Order_Item $item
|
468 |
+
* @param array $qtys
|
469 |
+
* @return bool
|
470 |
+
*/
|
471 |
+
protected function _needToAddDummy($item, $qtys) {
|
472 |
+
if ($item->getHasChildren()) {
|
473 |
+
foreach ($item->getChildrenItems() as $child) {
|
474 |
+
if ($child->getIsVirtual()) {
|
475 |
+
continue;
|
476 |
+
}
|
477 |
+
if ((isset($qtys[$child->getId()]) && $qtys[$child->getId()] > 0)
|
478 |
+
|| (!isset($qtys[$child->getId()]) && $child->getQtyToShip())) {
|
479 |
+
return true;
|
480 |
+
}
|
481 |
+
}
|
482 |
+
return false;
|
483 |
+
} else if($item->getParentItem()) {
|
484 |
+
if ($item->getIsVirtual()) {
|
485 |
+
return false;
|
486 |
+
}
|
487 |
+
if ((isset($qtys[$item->getParentItem()->getId()]) && $qtys[$item->getParentItem()->getId()] > 0)
|
488 |
+
|| (!isset($qtys[$item->getParentItem()->getId()]) && $item->getParentItem()->getQtyToShip())) {
|
489 |
+
return true;
|
490 |
+
}
|
491 |
+
return false;
|
492 |
+
}
|
493 |
+
}
|
494 |
+
|
495 |
+
/**
|
496 |
+
* Create shipping label for specific shipment with validation.
|
497 |
+
*
|
498 |
+
* @param Mage_Sales_Model_Order_Shipment $shipment
|
499 |
+
* @return bool
|
500 |
+
*/
|
501 |
+
protected function _createShippingLabel(Mage_Sales_Model_Order_Shipment $shipment)
|
502 |
+
{
|
503 |
+
if (!$shipment) {
|
504 |
+
return false;
|
505 |
+
}
|
506 |
+
$carrier = $shipment->getOrder()->getShippingCarrier();
|
507 |
+
if (!$carrier->isShippingLabelsAvailable()) {
|
508 |
+
return false;
|
509 |
+
}
|
510 |
+
$shipment->setPackages($this->getRequest()->getParam('packages'));
|
511 |
+
$response = Mage::getModel('shipping/shipping')->requestToShipment($shipment);
|
512 |
+
if ($response->hasErrors()) {
|
513 |
+
Mage::throwException($response->getErrors());
|
514 |
+
}
|
515 |
+
if (!$response->hasInfo()) {
|
516 |
+
return false;
|
517 |
+
}
|
518 |
+
$labelsContent = array();
|
519 |
+
$trackingNumbers = array();
|
520 |
+
$info = $response->getInfo();
|
521 |
+
foreach ($info as $inf) {
|
522 |
+
if (!empty($inf['tracking_number']) && !empty($inf['label_content'])) {
|
523 |
+
$labelsContent[] = $inf['label_content'];
|
524 |
+
$trackingNumbers[] = $inf['tracking_number'];
|
525 |
+
}
|
526 |
+
}
|
527 |
+
$outputPdf = $this->_combineLabelsPdf($labelsContent);
|
528 |
+
$shipment->setShippingLabel($outputPdf->render());
|
529 |
+
$carrierCode = $carrier->getCarrierCode();
|
530 |
+
$carrierTitle = Mage::getStoreConfig('carriers/'.$carrierCode.'/title', $shipment->getStoreId());
|
531 |
+
if ($trackingNumbers) {
|
532 |
+
foreach ($trackingNumbers as $trackingNumber) {
|
533 |
+
$track = Mage::getModel('sales/order_shipment_track')
|
534 |
+
->setNumber($trackingNumber)
|
535 |
+
->setCarrierCode($carrierCode)
|
536 |
+
->setTitle($carrierTitle);
|
537 |
+
$shipment->addTrack($track);
|
538 |
+
}
|
539 |
+
}
|
540 |
+
return true;
|
541 |
+
}
|
542 |
+
|
543 |
+
/**
|
544 |
+
* Create shipping label action for specific shipment
|
545 |
+
*
|
546 |
+
*/
|
547 |
+
public function createLabelAction()
|
548 |
+
{
|
549 |
+
$response = new Varien_Object();
|
550 |
+
try {
|
551 |
+
$shipment = $this->_initShipment();
|
552 |
+
if ($this->_createShippingLabel($shipment)) {
|
553 |
+
$shipment->save();
|
554 |
+
$this->_getSession()->addSuccess(Mage::helper('sales')->__('The shipping label has been created.'));
|
555 |
+
$response->setOk(true);
|
556 |
+
}
|
557 |
+
} catch (Mage_Core_Exception $e) {
|
558 |
+
$response->setError(true);
|
559 |
+
$response->setMessage($e->getMessage());
|
560 |
+
} catch (Exception $e) {
|
561 |
+
Mage::logException($e);
|
562 |
+
$response->setError(true);
|
563 |
+
$response->setMessage(Mage::helper('sales')->__('An error occurred while creating shipping label.'));
|
564 |
+
}
|
565 |
+
|
566 |
+
$this->getResponse()->setBody($response->toJson());
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Print label for one specific shipment
|
571 |
+
*
|
572 |
+
*/
|
573 |
+
public function printLabelAction()
|
574 |
+
{
|
575 |
+
try {
|
576 |
+
$shipment = $this->_initShipment();
|
577 |
+
$labelContent = $shipment->getShippingLabel();
|
578 |
+
if ($labelContent) {
|
579 |
+
$pdfContent = null;
|
580 |
+
if (stripos($labelContent, '%PDF-') !== false) {
|
581 |
+
$pdfContent = $labelContent;
|
582 |
+
} else {
|
583 |
+
$pdf = new Zend_Pdf();
|
584 |
+
$page = $this->_createPdfPageFromImageString($labelContent);
|
585 |
+
if (!$page) {
|
586 |
+
$this->_getSession()->addError(Mage::helper('sales')->__('File extension not known or unsupported type in the following shipment: %s', $shipment->getIncrementId()));
|
587 |
+
}
|
588 |
+
$pdf->pages[] = $page;
|
589 |
+
$pdfContent = $pdf->render();
|
590 |
+
}
|
591 |
+
|
592 |
+
return $this->_prepareDownloadResponse(
|
593 |
+
'ShippingLabel(' . $shipment->getIncrementId() . ').pdf',
|
594 |
+
$pdfContent,
|
595 |
+
'application/pdf'
|
596 |
+
);
|
597 |
+
}
|
598 |
+
} catch (Mage_Core_Exception $e) {
|
599 |
+
$this->_getSession()->addError($e->getMessage());
|
600 |
+
} catch (Exception $e) {
|
601 |
+
Mage::logException($e);
|
602 |
+
$this->_getSession()
|
603 |
+
->addError(Mage::helper('sales')->__('An error occurred while creating shipping label.'));
|
604 |
+
}
|
605 |
+
$this->_redirect('*/sales_order_shipment/view', array(
|
606 |
+
'shipment_id' => $this->getRequest()->getParam('shipment_id')
|
607 |
+
));
|
608 |
+
}
|
609 |
+
|
610 |
+
/**
|
611 |
+
* Create pdf document with information about packages
|
612 |
+
*
|
613 |
+
* @return void
|
614 |
+
*/
|
615 |
+
public function printPackageAction()
|
616 |
+
{
|
617 |
+
$shipment = $this->_initShipment();
|
618 |
+
|
619 |
+
if ($shipment) {
|
620 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment_packaging')->getPdf($shipment);
|
621 |
+
$this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf',
|
622 |
+
$pdf->render(), 'application/pdf'
|
623 |
+
);
|
624 |
+
}
|
625 |
+
else {
|
626 |
+
$this->_forward('noRoute');
|
627 |
+
}
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Batch print shipping labels for whole shipments.
|
632 |
+
* Push pdf document with shipping labels to user browser
|
633 |
+
*
|
634 |
+
* @return null
|
635 |
+
*/
|
636 |
+
public function massPrintShippingLabelAction()
|
637 |
+
{
|
638 |
+
$request = $this->getRequest();
|
639 |
+
$ids = $request->getParam('order_ids');
|
640 |
+
$createdFromOrders = !empty($ids);
|
641 |
+
$shipments = null;
|
642 |
+
$labelsContent = array();
|
643 |
+
switch ($request->getParam('massaction_prepare_key')) {
|
644 |
+
case 'shipment_ids':
|
645 |
+
$ids = $request->getParam('shipment_ids');
|
646 |
+
array_filter($ids, 'intval');
|
647 |
+
if (!empty($ids)) {
|
648 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
649 |
+
->addFieldToFilter('entity_id', array('in' => $ids));
|
650 |
+
}
|
651 |
+
break;
|
652 |
+
case 'order_ids':
|
653 |
+
$ids = $request->getParam('order_ids');
|
654 |
+
array_filter($ids, 'intval');
|
655 |
+
if (!empty($ids)) {
|
656 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
657 |
+
->setOrderFilter(array('in' => $ids));
|
658 |
+
}
|
659 |
+
break;
|
660 |
+
}
|
661 |
+
|
662 |
+
if ($shipments && $shipments->getSize()) {
|
663 |
+
foreach ($shipments as $shipment) {
|
664 |
+
$labelContent = $shipment->getShippingLabel();
|
665 |
+
if ($labelContent) {
|
666 |
+
$labelsContent[] = $labelContent;
|
667 |
+
}
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
if (!empty($labelsContent)) {
|
672 |
+
$outputPdf = $this->_combineLabelsPdf($labelsContent);
|
673 |
+
$this->_prepareDownloadResponse('ShippingLabels.pdf', $outputPdf->render(), 'application/pdf');
|
674 |
+
return;
|
675 |
+
} else {
|
676 |
+
$createdFromPartErrorMsg = $createdFromOrders ? 'orders' : 'shipments';
|
677 |
+
$this->_getSession()
|
678 |
+
->addError(Mage::helper('sales')->__('There are no shipping labels related to selected %s.', $createdFromPartErrorMsg));
|
679 |
+
}
|
680 |
+
if ($createdFromOrders) {
|
681 |
+
$this->_redirect('*/sales_order/index');
|
682 |
+
} else {
|
683 |
+
$this->_redirect('*/sales_order_shipment/index');
|
684 |
+
}
|
685 |
+
}
|
686 |
+
|
687 |
+
/**
|
688 |
+
* Combine array of labels as instance PDF
|
689 |
+
*
|
690 |
+
* @param array $labelsContent
|
691 |
+
* @return Zend_Pdf
|
692 |
+
*/
|
693 |
+
protected function _combineLabelsPdf(array $labelsContent)
|
694 |
+
{
|
695 |
+
$outputPdf = new Zend_Pdf();
|
696 |
+
foreach ($labelsContent as $content) {
|
697 |
+
if (stripos($content, '%PDF-') !== false) {
|
698 |
+
$pdfLabel = Zend_Pdf::parse($content);
|
699 |
+
foreach ($pdfLabel->pages as $page) {
|
700 |
+
$outputPdf->pages[] = clone $page;
|
701 |
+
}
|
702 |
+
} else {
|
703 |
+
$page = $this->_createPdfPageFromImageString($content);
|
704 |
+
if ($page) {
|
705 |
+
$outputPdf->pages[] = $page;
|
706 |
+
}
|
707 |
+
}
|
708 |
+
}
|
709 |
+
return $outputPdf;
|
710 |
+
}
|
711 |
+
|
712 |
+
/**
|
713 |
+
* Create Zend_Pdf_Page instance with image from $imageString. Supports JPEG, PNG, GIF, WBMP, and GD2 formats.
|
714 |
+
*
|
715 |
+
* @param string $imageString
|
716 |
+
* @return Zend_Pdf_Page|bool
|
717 |
+
*/
|
718 |
+
protected function _createPdfPageFromImageString($imageString)
|
719 |
+
{
|
720 |
+
$image = imagecreatefromstring($imageString);
|
721 |
+
if (!$image) {
|
722 |
+
return false;
|
723 |
+
}
|
724 |
+
|
725 |
+
$xSize = imagesx($image);
|
726 |
+
$ySize = imagesy($image);
|
727 |
+
$page = new Zend_Pdf_Page($xSize, $ySize);
|
728 |
+
|
729 |
+
imageinterlace($image, 0);
|
730 |
+
$tmpFileName = sys_get_temp_dir() . DS . 'shipping_labels_'
|
731 |
+
. uniqid(mt_rand()) . time() . '.png';
|
732 |
+
imagepng($image, $tmpFileName);
|
733 |
+
$pdfImage = Zend_Pdf_Image::imageWithPath($tmpFileName);
|
734 |
+
$page->drawImage($pdfImage, 0, 0, $xSize, $ySize);
|
735 |
+
unlink($tmpFileName);
|
736 |
+
return $page;
|
737 |
+
}
|
738 |
+
|
739 |
+
/**
|
740 |
+
* Return grid with shipping items for Ajax request
|
741 |
+
*
|
742 |
+
* @return Mage_Core_Controller_Response_Http
|
743 |
+
*/
|
744 |
+
public function getShippingItemsGridAction()
|
745 |
+
{
|
746 |
+
$this->_initShipment();
|
747 |
+
return $this->getResponse()->setBody(
|
748 |
+
$this->getLayout()
|
749 |
+
->createBlock('adminhtml/sales_order_shipment_packaging_grid')
|
750 |
+
->setIndex($this->getRequest()->getParam('index'))
|
751 |
+
->toHtml()
|
752 |
+
);
|
753 |
+
}
|
754 |
+
|
755 |
+
public function invoiceNoLength(){
|
756 |
+
return array( "한진택배" => array(10,12),
|
757 |
+
"CJGLS" => array(10,11,12),
|
758 |
+
"경동택배" => array(8,9,10,11,12,13,14,15,16),
|
759 |
+
"대한통운" => array(10),
|
760 |
+
"동부익스프레스" => array(12),
|
761 |
+
"이노지스" => array(10,11,12,13),
|
762 |
+
"하나로택배" => array(10),
|
763 |
+
"현대로지엠" => array(10,12),
|
764 |
+
"CJGLS" => array(10,11,12),
|
765 |
+
"KG옐로우캡" => array(11),
|
766 |
+
"로젠택배" => array(11),
|
767 |
+
"우체국택배" => array(13),
|
768 |
+
"KGB택배" => array(10),
|
769 |
+
);
|
770 |
+
|
771 |
+
}
|
772 |
+
|
773 |
+
public function chk1($invoiceNo){
|
774 |
+
//가장 보편적인 체크 방법
|
775 |
+
//마지막 수를 제외한 숫자를 7로 나눈 나머지가 마지막 숫자와 같은지 검토
|
776 |
+
$lastNum = substr($invoiceNo,-1);
|
777 |
+
$firstNum = substr($invoiceNo,0,-1);
|
778 |
+
|
779 |
+
if($firstNum % 7 == $lastNum)
|
780 |
+
return true;
|
781 |
+
else
|
782 |
+
return false;
|
783 |
+
}
|
784 |
+
public function invoicdNoValidation($deliveryName, $invoiceNo){
|
785 |
+
|
786 |
+
}
|
787 |
+
}
|
app/code/community/Mage/Adminhtml/controllers/Sales/Shipment.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml sales orders controller
|
29 |
+
*
|
30 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
+
*/
|
32 |
+
class Mage_Adminhtml_Controller_Sales_Shipment extends Mage_Adminhtml_Controller_Action
|
33 |
+
{
|
34 |
+
/**
|
35 |
+
* Additional initialization
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
protected function _construct()
|
39 |
+
{
|
40 |
+
$this->setUsedModuleName('Mage_Sales');
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Init layout, menu and breadcrumb
|
45 |
+
*
|
46 |
+
* @return Mage_Adminhtml_Sales_ShipmentController
|
47 |
+
*/
|
48 |
+
protected function _initAction()
|
49 |
+
{
|
50 |
+
$this->loadLayout()
|
51 |
+
->_setActiveMenu('sales/order')
|
52 |
+
->_addBreadcrumb($this->__('Sales'), $this->__('Sales'))
|
53 |
+
->_addBreadcrumb($this->__('Shipments'),$this->__('Shipments'));
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Shipments grid
|
59 |
+
*/
|
60 |
+
public function indexAction()
|
61 |
+
{
|
62 |
+
$this->_title($this->__('Sales'))->_title($this->__('Shipments'));
|
63 |
+
|
64 |
+
$this->_initAction()
|
65 |
+
->_addContent($this->getLayout()->createBlock('adminhtml/sales_shipment'))
|
66 |
+
->renderLayout();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Shipment information page
|
71 |
+
*/
|
72 |
+
public function viewAction()
|
73 |
+
{
|
74 |
+
if ($shipmentId = $this->getRequest()->getParam('shipment_id')) {
|
75 |
+
$this->_forward('view', 'sales_order_shipment', null, array('come_from'=>'shipment'));
|
76 |
+
} else {
|
77 |
+
$this->_forward('noRoute');
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
public function pdfshipmentsAction(){
|
82 |
+
$shipmentIds = $this->getRequest()->getPost('shipment_ids');
|
83 |
+
if (!empty($shipmentIds)) {
|
84 |
+
$shipments = Mage::getResourceModel('sales/order_shipment_collection')
|
85 |
+
->addAttributeToSelect('*')
|
86 |
+
->addAttributeToFilter('entity_id', array('in' => $shipmentIds))
|
87 |
+
->load();
|
88 |
+
if (!isset($pdf)){
|
89 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
90 |
+
} else {
|
91 |
+
$pages = Mage::getModel('sales/order_pdf_shipment')->getPdf($shipments);
|
92 |
+
$pdf->pages = array_merge ($pdf->pages, $pages->pages);
|
93 |
+
}
|
94 |
+
|
95 |
+
return $this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
96 |
+
}
|
97 |
+
$this->_redirect('*/*/');
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
public function printAction()
|
102 |
+
{
|
103 |
+
/** @see Mage_Adminhtml_Sales_Order_InvoiceController */
|
104 |
+
if ($shipmentId = $this->getRequest()->getParam('invoice_id')) { // invoice_id o_0
|
105 |
+
if ($shipment = Mage::getModel('sales/order_shipment')->load($shipmentId)) {
|
106 |
+
$pdf = Mage::getModel('sales/order_pdf_shipment')->getPdf(array($shipment));
|
107 |
+
$this->_prepareDownloadResponse('packingslip'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(), 'application/pdf');
|
108 |
+
}
|
109 |
+
}
|
110 |
+
else {
|
111 |
+
$this->_forward('noRoute');
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function _isAllowed()
|
116 |
+
{
|
117 |
+
return Mage::getSingleton('admin/session')->isAllowed('sales/shipment');
|
118 |
+
}
|
119 |
+
}
|
app/code/community/Mage/Directory/Model/Currency.php
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Directory
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Currency model
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Directory
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* CONFIG path constants
|
38 |
+
*/
|
39 |
+
const XML_PATH_CURRENCY_ALLOW = 'currency/options/allow';
|
40 |
+
const XML_PATH_CURRENCY_DEFAULT = 'currency/options/default';
|
41 |
+
const XML_PATH_CURRENCY_BASE = 'currency/options/base';
|
42 |
+
|
43 |
+
protected $_filter;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Currency Rates
|
47 |
+
*
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
protected $_rates;
|
51 |
+
|
52 |
+
|
53 |
+
protected function _construct()
|
54 |
+
{
|
55 |
+
$this->_init('directory/currency');
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get currency code
|
60 |
+
*
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function getCode()
|
64 |
+
{
|
65 |
+
return $this->_getData('currency_code');
|
66 |
+
}
|
67 |
+
|
68 |
+
public function getCurrencyCode()
|
69 |
+
{
|
70 |
+
return $this->_getData('currency_code');
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Currency Rates getter
|
75 |
+
*
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
public function getRates()
|
79 |
+
{
|
80 |
+
return $this->_rates;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Currency Rates setter
|
85 |
+
*
|
86 |
+
* @param array Currency Rates
|
87 |
+
* @return Mage_Directory_Model_Currency
|
88 |
+
*/
|
89 |
+
public function setRates(array $rates)
|
90 |
+
{
|
91 |
+
$this->_rates = $rates;
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Loading currency data
|
97 |
+
*
|
98 |
+
* @param string $id
|
99 |
+
* @param string $field
|
100 |
+
* @return Mage_Directory_Model_Currency
|
101 |
+
*/
|
102 |
+
public function load($id, $field=null)
|
103 |
+
{
|
104 |
+
$this->unsRate();
|
105 |
+
$this->setData('currency_code', $id);
|
106 |
+
return $this;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get currency rate (only base=>allowed)
|
111 |
+
*
|
112 |
+
* @param string $toCurrency
|
113 |
+
* @return double
|
114 |
+
*/
|
115 |
+
public function getRate($toCurrency)
|
116 |
+
{
|
117 |
+
if (is_string($toCurrency)) {
|
118 |
+
$code = $toCurrency;
|
119 |
+
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
|
120 |
+
$code = $toCurrency->getCurrencyCode();
|
121 |
+
} else {
|
122 |
+
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
|
123 |
+
}
|
124 |
+
$rates = $this->getRates();
|
125 |
+
if (!isset($rates[$code])) {
|
126 |
+
$rates[$code] = $this->_getResource()->getRate($this->getCode(), $toCurrency);
|
127 |
+
$this->setRates($rates);
|
128 |
+
}
|
129 |
+
return $rates[$code];
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Get currency rate (base=>allowed or allowed=>base)
|
134 |
+
*
|
135 |
+
* @param string $toCurrency
|
136 |
+
* @return double
|
137 |
+
*/
|
138 |
+
public function getAnyRate($toCurrency)
|
139 |
+
{
|
140 |
+
if (is_string($toCurrency)) {
|
141 |
+
$code = $toCurrency;
|
142 |
+
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
|
143 |
+
$code = $toCurrency->getCurrencyCode();
|
144 |
+
} else {
|
145 |
+
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
|
146 |
+
}
|
147 |
+
$rates = $this->getRates();
|
148 |
+
if (!isset($rates[$code])) {
|
149 |
+
$rates[$code] = $this->_getResource()->getAnyRate($this->getCode(), $toCurrency);
|
150 |
+
$this->setRates($rates);
|
151 |
+
}
|
152 |
+
return $rates[$code];
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Convert price to currency format
|
157 |
+
*
|
158 |
+
* @param double $price
|
159 |
+
* @param string $toCurrency
|
160 |
+
* @return double
|
161 |
+
*/
|
162 |
+
public function convert($price, $toCurrency=null)
|
163 |
+
{
|
164 |
+
if (is_null($toCurrency)) {
|
165 |
+
return $price;
|
166 |
+
}
|
167 |
+
elseif ($rate = $this->getRate($toCurrency)) {
|
168 |
+
return $price*$rate;
|
169 |
+
}
|
170 |
+
|
171 |
+
throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(), $toCurrency->getCode()));
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Get currency filter
|
176 |
+
*
|
177 |
+
* @return Mage_Directory_Model_Currency_Filter
|
178 |
+
*/
|
179 |
+
public function getFilter()
|
180 |
+
{
|
181 |
+
if (!$this->_filter) {
|
182 |
+
$this->_filter = new Mage_Directory_Model_Currency_Filter($this->getCode());
|
183 |
+
}
|
184 |
+
|
185 |
+
return $this->_filter;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Format price to currency format
|
190 |
+
*
|
191 |
+
* @param double $price
|
192 |
+
* @param bool $includeContainer
|
193 |
+
* @return string
|
194 |
+
*/
|
195 |
+
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
|
196 |
+
{
|
197 |
+
$CurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();
|
198 |
+
if($CurrencyCode=="KRW" && Mage::getStoreConfig("payment/ipay/active")==1){
|
199 |
+
return $this->formatPrecision(floor($price), 0, $options, $includeContainer, $addBrackets);
|
200 |
+
}else
|
201 |
+
return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Apply currency format to number with specific rounding precision
|
206 |
+
*
|
207 |
+
* @param float $price
|
208 |
+
* @param int $precision
|
209 |
+
* @param array $options
|
210 |
+
* @param bool $includeContainer
|
211 |
+
* @param bool $addBrackets
|
212 |
+
* @return string
|
213 |
+
*/
|
214 |
+
public function formatPrecision($price, $precision, $options=array(), $includeContainer = true, $addBrackets = false)
|
215 |
+
{
|
216 |
+
if (!isset($options['precision'])) {
|
217 |
+
$options['precision'] = $precision;
|
218 |
+
}
|
219 |
+
if ($includeContainer) {
|
220 |
+
return '<span class="price">' . ($addBrackets ? '[' : '') . $this->formatTxt($price, $options) . ($addBrackets ? ']' : '') . '</span>';
|
221 |
+
}
|
222 |
+
return $this->formatTxt($price, $options);
|
223 |
+
}
|
224 |
+
|
225 |
+
public function formatTxt($price, $options=array())
|
226 |
+
{
|
227 |
+
if (!is_numeric($price)) {
|
228 |
+
$price = Mage::app()->getLocale()->getNumber($price);
|
229 |
+
}
|
230 |
+
/**
|
231 |
+
* Fix problem with 12 000 000, 1 200 000
|
232 |
+
*
|
233 |
+
* %f - the argument is treated as a float, and presented as a floating-point number (locale aware).
|
234 |
+
* %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
|
235 |
+
*/
|
236 |
+
$price = sprintf("%F", $price);
|
237 |
+
return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
|
238 |
+
}
|
239 |
+
|
240 |
+
public function getOutputFormat()
|
241 |
+
{
|
242 |
+
$formated = $this->formatTxt(0);
|
243 |
+
$number = $this->formatTxt(0, array('display'=>Zend_Currency::NO_SYMBOL));
|
244 |
+
return str_replace($number, '%s', $formated);
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Retrieve allowed currencies according to config
|
249 |
+
*
|
250 |
+
*/
|
251 |
+
public function getConfigAllowCurrencies()
|
252 |
+
{
|
253 |
+
$allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);
|
254 |
+
$appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();
|
255 |
+
if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {
|
256 |
+
$allowedCurrencies[] = $appBaseCurrencyCode;
|
257 |
+
}
|
258 |
+
foreach (Mage::app()->getStores() as $store) {
|
259 |
+
$code = $store->getBaseCurrencyCode();
|
260 |
+
if (!in_array($code, $allowedCurrencies)) {
|
261 |
+
$allowedCurrencies[] = $code;
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
return $allowedCurrencies;
|
266 |
+
}
|
267 |
+
|
268 |
+
/**
|
269 |
+
* Retrieve default currencies according to config
|
270 |
+
*
|
271 |
+
*/
|
272 |
+
public function getConfigDefaultCurrencies()
|
273 |
+
{
|
274 |
+
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_DEFAULT);
|
275 |
+
return $defaultCurrencies;
|
276 |
+
}
|
277 |
+
|
278 |
+
|
279 |
+
public function getConfigBaseCurrencies()
|
280 |
+
{
|
281 |
+
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);
|
282 |
+
return $defaultCurrencies;
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Retrieve currency rates to other currencies
|
287 |
+
*
|
288 |
+
* @param string $currency
|
289 |
+
* @param array $toCurrencies
|
290 |
+
* @return array
|
291 |
+
*/
|
292 |
+
public function getCurrencyRates($currency, $toCurrencies=null)
|
293 |
+
{
|
294 |
+
if ($currency instanceof Mage_Directory_Model_Currency) {
|
295 |
+
$currency = $currency->getCode();
|
296 |
+
}
|
297 |
+
$data = $this->_getResource()->getCurrencyRates($currency, $toCurrencies);
|
298 |
+
return $data;
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Save currency rates
|
303 |
+
*
|
304 |
+
* @param array $rates
|
305 |
+
* @return object
|
306 |
+
*/
|
307 |
+
public function saveRates($rates)
|
308 |
+
{
|
309 |
+
$this->_getResource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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Directory
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Currency model
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Directory
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
35 |
+
{
|
36 |
+
/**
|
37 |
+
* CONFIG path constants
|
38 |
+
*/
|
39 |
+
const XML_PATH_CURRENCY_ALLOW = 'currency/options/allow';
|
40 |
+
const XML_PATH_CURRENCY_DEFAULT = 'currency/options/default';
|
41 |
+
const XML_PATH_CURRENCY_BASE = 'currency/options/base';
|
42 |
+
|
43 |
+
protected $_filter;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Currency Rates
|
47 |
+
*
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
protected $_rates;
|
51 |
+
|
52 |
+
|
53 |
+
protected function _construct()
|
54 |
+
{
|
55 |
+
$this->_init('directory/currency');
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get currency code
|
60 |
+
*
|
61 |
+
* @return string
|
62 |
+
*/
|
63 |
+
public function getCode()
|
64 |
+
{
|
65 |
+
return $this->_getData('currency_code');
|
66 |
+
}
|
67 |
+
|
68 |
+
public function getCurrencyCode()
|
69 |
+
{
|
70 |
+
return $this->_getData('currency_code');
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Currency Rates getter
|
75 |
+
*
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
public function getRates()
|
79 |
+
{
|
80 |
+
return $this->_rates;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Currency Rates setter
|
85 |
+
*
|
86 |
+
* @param array Currency Rates
|
87 |
+
* @return Mage_Directory_Model_Currency
|
88 |
+
*/
|
89 |
+
public function setRates(array $rates)
|
90 |
+
{
|
91 |
+
$this->_rates = $rates;
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Loading currency data
|
97 |
+
*
|
98 |
+
* @param string $id
|
99 |
+
* @param string $field
|
100 |
+
* @return Mage_Directory_Model_Currency
|
101 |
+
*/
|
102 |
+
public function load($id, $field=null)
|
103 |
+
{
|
104 |
+
$this->unsRate();
|
105 |
+
$this->setData('currency_code', $id);
|
106 |
+
return $this;
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get currency rate (only base=>allowed)
|
111 |
+
*
|
112 |
+
* @param string $toCurrency
|
113 |
+
* @return double
|
114 |
+
*/
|
115 |
+
public function getRate($toCurrency)
|
116 |
+
{
|
117 |
+
if (is_string($toCurrency)) {
|
118 |
+
$code = $toCurrency;
|
119 |
+
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
|
120 |
+
$code = $toCurrency->getCurrencyCode();
|
121 |
+
} else {
|
122 |
+
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
|
123 |
+
}
|
124 |
+
$rates = $this->getRates();
|
125 |
+
if (!isset($rates[$code])) {
|
126 |
+
$rates[$code] = $this->_getResource()->getRate($this->getCode(), $toCurrency);
|
127 |
+
$this->setRates($rates);
|
128 |
+
}
|
129 |
+
return $rates[$code];
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Get currency rate (base=>allowed or allowed=>base)
|
134 |
+
*
|
135 |
+
* @param string $toCurrency
|
136 |
+
* @return double
|
137 |
+
*/
|
138 |
+
public function getAnyRate($toCurrency)
|
139 |
+
{
|
140 |
+
if (is_string($toCurrency)) {
|
141 |
+
$code = $toCurrency;
|
142 |
+
} elseif ($toCurrency instanceof Mage_Directory_Model_Currency) {
|
143 |
+
$code = $toCurrency->getCurrencyCode();
|
144 |
+
} else {
|
145 |
+
throw Mage::exception('Mage_Directory', Mage::helper('directory')->__('Invalid target currency.'));
|
146 |
+
}
|
147 |
+
$rates = $this->getRates();
|
148 |
+
if (!isset($rates[$code])) {
|
149 |
+
$rates[$code] = $this->_getResource()->getAnyRate($this->getCode(), $toCurrency);
|
150 |
+
$this->setRates($rates);
|
151 |
+
}
|
152 |
+
return $rates[$code];
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Convert price to currency format
|
157 |
+
*
|
158 |
+
* @param double $price
|
159 |
+
* @param string $toCurrency
|
160 |
+
* @return double
|
161 |
+
*/
|
162 |
+
public function convert($price, $toCurrency=null)
|
163 |
+
{
|
164 |
+
if (is_null($toCurrency)) {
|
165 |
+
return $price;
|
166 |
+
}
|
167 |
+
elseif ($rate = $this->getRate($toCurrency)) {
|
168 |
+
return $price*$rate;
|
169 |
+
}
|
170 |
+
|
171 |
+
throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(), $toCurrency->getCode()));
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* Get currency filter
|
176 |
+
*
|
177 |
+
* @return Mage_Directory_Model_Currency_Filter
|
178 |
+
*/
|
179 |
+
public function getFilter()
|
180 |
+
{
|
181 |
+
if (!$this->_filter) {
|
182 |
+
$this->_filter = new Mage_Directory_Model_Currency_Filter($this->getCode());
|
183 |
+
}
|
184 |
+
|
185 |
+
return $this->_filter;
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Format price to currency format
|
190 |
+
*
|
191 |
+
* @param double $price
|
192 |
+
* @param bool $includeContainer
|
193 |
+
* @return string
|
194 |
+
*/
|
195 |
+
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
|
196 |
+
{
|
197 |
+
Mage::log("community code pool use");
|
198 |
+
return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Apply currency format to number with specific rounding precision
|
203 |
+
*
|
204 |
+
* @param float $price
|
205 |
+
* @param int $precision
|
206 |
+
* @param array $options
|
207 |
+
* @param bool $includeContainer
|
208 |
+
* @param bool $addBrackets
|
209 |
+
* @return string
|
210 |
+
*/
|
211 |
+
public function formatPrecision($price, $precision, $options=array(), $includeContainer = true, $addBrackets = false)
|
212 |
+
{
|
213 |
+
if (!isset($options['precision'])) {
|
214 |
+
$options['precision'] = $precision;
|
215 |
+
}
|
216 |
+
if ($includeContainer) {
|
217 |
+
return '<span class="price">' . ($addBrackets ? '[' : '') . $this->formatTxt($price, $options) . ($addBrackets ? ']' : '') . '</span>';
|
218 |
+
}
|
219 |
+
return $this->formatTxt($price, $options);
|
220 |
+
}
|
221 |
+
|
222 |
+
public function formatTxt($price, $options=array())
|
223 |
+
{
|
224 |
+
if (!is_numeric($price)) {
|
225 |
+
$price = Mage::app()->getLocale()->getNumber($price);
|
226 |
+
}
|
227 |
+
/**
|
228 |
+
* Fix problem with 12 000 000, 1 200 000
|
229 |
+
*
|
230 |
+
* %f - the argument is treated as a float, and presented as a floating-point number (locale aware).
|
231 |
+
* %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
|
232 |
+
*/
|
233 |
+
$price = sprintf("%F", $price);
|
234 |
+
return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
|
235 |
+
}
|
236 |
+
|
237 |
+
public function getOutputFormat()
|
238 |
+
{
|
239 |
+
$formated = $this->formatTxt(0);
|
240 |
+
$number = $this->formatTxt(0, array('display'=>Zend_Currency::NO_SYMBOL));
|
241 |
+
return str_replace($number, '%s', $formated);
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Retrieve allowed currencies according to config
|
246 |
+
*
|
247 |
+
*/
|
248 |
+
public function getConfigAllowCurrencies()
|
249 |
+
{
|
250 |
+
$allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);
|
251 |
+
$appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();
|
252 |
+
if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {
|
253 |
+
$allowedCurrencies[] = $appBaseCurrencyCode;
|
254 |
+
}
|
255 |
+
foreach (Mage::app()->getStores() as $store) {
|
256 |
+
$code = $store->getBaseCurrencyCode();
|
257 |
+
if (!in_array($code, $allowedCurrencies)) {
|
258 |
+
$allowedCurrencies[] = $code;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
return $allowedCurrencies;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Retrieve default currencies according to config
|
267 |
+
*
|
268 |
+
*/
|
269 |
+
public function getConfigDefaultCurrencies()
|
270 |
+
{
|
271 |
+
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_DEFAULT);
|
272 |
+
return $defaultCurrencies;
|
273 |
+
}
|
274 |
+
|
275 |
+
|
276 |
+
public function getConfigBaseCurrencies()
|
277 |
+
{
|
278 |
+
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);
|
279 |
+
return $defaultCurrencies;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Retrieve currency rates to other currencies
|
284 |
+
*
|
285 |
+
* @param string $currency
|
286 |
+
* @param array $toCurrencies
|
287 |
+
* @return array
|
288 |
+
*/
|
289 |
+
public function getCurrencyRates($currency, $toCurrencies=null)
|
290 |
+
{
|
291 |
+
if ($currency instanceof Mage_Directory_Model_Currency) {
|
292 |
+
$currency = $currency->getCode();
|
293 |
+
}
|
294 |
+
$data = $this->_getResource()->getCurrencyRates($currency, $toCurrencies);
|
295 |
+
return $data;
|
296 |
+
}
|
297 |
+
|
298 |
+
/**
|
299 |
+
* Save currency rates
|
300 |
+
*
|
301 |
+
* @param array $rates
|
302 |
+
* @return object
|
303 |
+
*/
|
304 |
+
public function saveRates($rates)
|
305 |
+
{
|
306 |
+
$this->_getResource()->saveRates($rates);
|
307 |
+
return $this;
|
308 |
+
}
|
309 |
+
}
|
app/design/adminhtml/default/default/layout/ipay.xml
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/afl-3.0.php
|
12 |
+
* If you did not receive a copy of the license and are unable to
|
13 |
+
* obtain it through the world-wide-web, please send an email
|
14 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
15 |
+
*
|
16 |
+
* DISCLAIMER
|
17 |
+
*
|
18 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
19 |
+
* versions in the future. If you wish to customize Magento for your
|
20 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
21 |
+
*
|
22 |
+
* @category design
|
23 |
+
* @package default_default
|
24 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
25 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
26 |
+
*/
|
27 |
+
-->
|
28 |
+
|
29 |
+
<layout>
|
30 |
+
<adminhtml_sales_order_shipment_new>
|
31 |
+
<reference name="order_items" as="order_items">
|
32 |
+
<action method="setTemplate" ifconfig="payment/ipay/active">
|
33 |
+
<template>ipay/items.phtml</template>
|
34 |
+
</action>
|
35 |
+
</reference>
|
36 |
+
</adminhtml_sales_order_shipment_new>
|
37 |
+
<adminhtml_sales_order_view>
|
38 |
+
<reference name="order_tab_info" as="order_tab_info">
|
39 |
+
<action method="setTemplate" ifconfig="payment/ipay/active">
|
40 |
+
<template>ipay/info.phtml</template>
|
41 |
+
</action>
|
42 |
+
</reference>
|
43 |
+
</adminhtml_sales_order_view>
|
44 |
+
<adminhtml_sales_order_shipment_view>
|
45 |
+
<reference name="form" as="form">
|
46 |
+
<action method="setTemplate" ifconfig="payment/ipay/active">
|
47 |
+
<template>ipay/form.phtml</template>
|
48 |
+
</action>
|
49 |
+
</reference>
|
50 |
+
</adminhtml_sales_order_shipment_view>
|
51 |
+
</layout>
|
app/design/adminhtml/default/default/locale/en_US/translate.csv
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Credit Card Type","Credit Card Type"
|
2 |
+
"Add New User","Add New User"
|
3 |
+
"Items that you don","Items that you don"
|
4 |
+
"State/Province","State/Province"
|
5 |
+
"Magento Commerce - Administrative Panel","Magento Commerce - Administrative Panel"
|
6 |
+
"3 stars","3 stars"
|
7 |
+
"Credit Memo Date","Credit Memo Date"
|
8 |
+
"Double click on a group to rename it","Double click on a group to rename it"
|
9 |
+
"Rating Not Available","Rating Not Available"
|
10 |
+
"Gift Certificate","Gift Certificate"
|
11 |
+
"Assigned Answers","Assigned Answers"
|
12 |
+
"Fax","Fax"
|
13 |
+
"Magento Admin","Magento Admin"
|
14 |
+
"Newsletter Message Preview","Newsletter Message Preview"
|
15 |
+
"4 stars","4 stars"
|
16 |
+
"Company","Company"
|
17 |
+
"Invoice Date","Invoice Date"
|
18 |
+
"Qty Returned","Qty Returned"
|
19 |
+
"Add New Customer Group","Add New Customer Group"
|
20 |
+
"Visitors","Visitors"
|
21 |
+
"Shipping Method","Shipping Method"
|
22 |
+
"Subtotal","Subtotal"
|
23 |
+
"5 stars","5 stars"
|
24 |
+
"Choose Store","Choose Store"
|
25 |
+
"Import Tax Rates","Import Tax Rates"
|
26 |
+
"Roles","Roles"
|
27 |
+
"If you do not specify an option value for a store then the default value will be used.","If you do not specify an option value for a store then the default value will be used."
|
28 |
+
"Shipping","Shipping"
|
29 |
+
"Select from existing customer addresses:","Select from existing customer addresses:"
|
30 |
+
"Products","Products"
|
31 |
+
"Edit User ","Edit User "
|
32 |
+
"Item Status","Item Status"
|
33 |
+
"Set as default billing address","Set as default billing address"
|
34 |
+
"Position","Position"
|
35 |
+
"Items Ordered","Items Ordered"
|
36 |
+
"Fixed","Fixed"
|
37 |
+
"%s","%s"
|
38 |
+
"Same as Billing Address","Same as Billing Address"
|
39 |
+
"Product In Stores","Product In Stores"
|
40 |
+
"Working...","Working..."
|
41 |
+
"Apply coupon code","Apply coupon code"
|
42 |
+
"per page","per page"
|
43 |
+
"Tax","Tax"
|
44 |
+
"Telephone","Telephone"
|
45 |
+
"Wishlist","Wishlist"
|
46 |
+
"Magento","Magento"
|
47 |
+
"Expiration Date","Expiration Date"
|
48 |
+
"Add New Class","Add New Class"
|
49 |
+
"Super product attributes configuration","Super product attributes configuration"
|
50 |
+
"Previus page","Previus page"
|
51 |
+
"Something went wrong...","Something went wrong..."
|
52 |
+
"Lifetime Sales","Lifetime Sales"
|
53 |
+
"SKU","SKU"
|
54 |
+
"Log Out","Log Out"
|
55 |
+
"Failed","Failed"
|
56 |
+
"Billing Address","Billing Address"
|
57 |
+
"Log into Magento Admin Page","Log into Magento Admin Page"
|
58 |
+
"Invoice Status","Invoice Status"
|
59 |
+
"CC Type","CC Type"
|
60 |
+
"Percentage","Percentage"
|
61 |
+
"Are you sure?","Are you sure?"
|
62 |
+
"Email","Email"
|
63 |
+
"Customer Group:","Customer Group:"
|
64 |
+
"Option","Option"
|
65 |
+
"Primary Billing Address","Primary Billing Address"
|
66 |
+
"Create Backup","Create Backup"
|
67 |
+
"Manage Options (values for your attribute)","Manage Options (values for your attribute)"
|
68 |
+
"Total Due","Total Due"
|
69 |
+
"Copyright 2007","Copyright 2007"
|
70 |
+
"Newsletter Subscribers","Newsletter Subscribers"
|
71 |
+
"CC Number","CC Number"
|
72 |
+
"Add New Tax Rate","Add New Tax Rate"
|
73 |
+
"Product Name","Product Name"
|
74 |
+
"Country","Country"
|
75 |
+
"Purchase order number","Purchase order number"
|
76 |
+
"Date and Time","Date and Time"
|
77 |
+
"Categories","Categories"
|
78 |
+
"Qty Cancelled","Qty Cancelled"
|
79 |
+
"Card Verification Number","Card Verification Number"
|
80 |
+
"Order Date","Order Date"
|
81 |
+
"This tab contains invalid data. Please correct before saving.","This tab contains invalid data. Please correct before saving."
|
82 |
+
"Customer Balance","Customer Balance"
|
83 |
+
"Update Qty","Update Qty"
|
84 |
+
"Customer Groups","Customer Groups"
|
85 |
+
"Export to","Export to"
|
86 |
+
"configuration","configuration"
|
87 |
+
"Sorry, no quotes are available for this order at this time.","Sorry, no quotes are available for this order at this time."
|
88 |
+
"Options","Options"
|
89 |
+
"Attribute Name","Attribute Name"
|
90 |
+
"Total <strong>%d</strong> records found","Total <strong>%d</strong> records found"
|
91 |
+
"Comment","Comment"
|
92 |
+
"Set as default shipping address","Set as default shipping address"
|
93 |
+
"Last Name","Last Name"
|
94 |
+
"of","of"
|
95 |
+
"Newsletter Problem Reports","Newsletter Problem Reports"
|
96 |
+
"Sales Statistics","Sales Statistics"
|
97 |
+
"Qty To Return","Qty To Return"
|
98 |
+
"New Customer Address","New Customer Address"
|
99 |
+
"Roles Resources","Roles Resources"
|
100 |
+
"Zip/Post Code","Zip/Post Code"
|
101 |
+
"Order Status","Order Status"
|
102 |
+
"Store","Store"
|
103 |
+
"Product Categories","Product Categories"
|
104 |
+
"Online Customers","Online Customers"
|
105 |
+
"Next page","Next page"
|
106 |
+
"Items Shipped","Items Shipped"
|
107 |
+
"Unassigned Attributes","Unassigned Attributes"
|
108 |
+
"Not Charged Yet","Not Charged Yet"
|
109 |
+
"This group contains system attributes.\nPlease, move system attributes to another group and try again.","This group contains system attributes.\nPlease, move system attributes to another group and try again."
|
110 |
+
"copy data from","copy data from"
|
111 |
+
"Add","Add"
|
112 |
+
"Total Payed","Total Payed"
|
113 |
+
"Shopping Cart","Shopping Cart"
|
114 |
+
"Order History","Order History"
|
115 |
+
"Empty","Empty"
|
116 |
+
"Unable to complete request. Please, try again later.","Unable to complete request. Please, try again later."
|
117 |
+
"Customers","Customers"
|
118 |
+
"Customer does not have any addresses","Customer does not have any addresses"
|
119 |
+
"Add New Role","Add New Role"
|
120 |
+
"Street Address","Street Address"
|
121 |
+
"Are You Sure?","Are You Sure?"
|
122 |
+
"Shipping Address","Shipping Address"
|
123 |
+
"Paid","Paid"
|
124 |
+
"Page","Page"
|
125 |
+
"Discount","Discount"
|
126 |
+
"Set root category for this store in","Set root category for this store in"
|
127 |
+
"Groups","Groups"
|
128 |
+
"View","View"
|
129 |
+
"Qty Ordered","Qty Ordered"
|
130 |
+
"Global Record Search","Global Record Search"
|
131 |
+
"Card Number","Card Number"
|
132 |
+
"PO Number","PO Number"
|
133 |
+
"Grand Total","Grand Total"
|
134 |
+
"Please select one or more attributes.","Please select one or more attributes."
|
135 |
+
"Dashboard","Dashboard"
|
136 |
+
"Are you sure you want to do this?","Are you sure you want to do this?"
|
137 |
+
"Please add one or more options","Please add one or more options"
|
138 |
+
"Role Users","Role Users"
|
139 |
+
"Add New Tax Rule","Add New Tax Rule"
|
140 |
+
"Subscribe to newsletter","Subscribe to newsletter"
|
141 |
+
"Dashboard Control","Dashboard Control"
|
142 |
+
"Default Shipping","Default Shipping"
|
143 |
+
"Qty","Qty"
|
144 |
+
"Add to Queue","Add to Queue"
|
145 |
+
"Average Sale","Average Sale"
|
146 |
+
"Cancel","Cancel"
|
147 |
+
"All stores","All stores"
|
148 |
+
"Personal Information","Personal Information"
|
149 |
+
"City","City"
|
150 |
+
"Export Tax Rates","Export Tax Rates"
|
151 |
+
"1 star","1 star"
|
152 |
+
"Current Configuration Scope","Current Configuration Scope"
|
153 |
+
"Add New Template","Add New Template"
|
154 |
+
"Move to:","Move to:"
|
155 |
+
"First Name","First Name"
|
156 |
+
"Change Order Status","Change Order Status"
|
157 |
+
"Are you sure you want to delete this address?","Are you sure you want to delete this address?"
|
158 |
+
"Are you sure you want to do it?","Are you sure you want to do it?"
|
159 |
+
"Add to Order","Add to Order"
|
160 |
+
"Product ID","Product ID"
|
161 |
+
"Payment Method","Payment Method"
|
162 |
+
"What is this?","What is this?"
|
163 |
+
"Users","Users"
|
164 |
+
"Customer Addresses","Customer Addresses"
|
165 |
+
"Qty Backordered","Qty Backordered"
|
166 |
+
"You can not remove system attribute from this set.","You can not remove system attribute from this set."
|
167 |
+
"Price","Price"
|
168 |
+
"Who","Who"
|
169 |
+
"Rating Not Alvailable","Rating Not Alvailable"
|
170 |
+
"Order Comment","Order Comment"
|
171 |
+
"Edit Role","Edit Role"
|
172 |
+
"Tax Rates Import / Export","Tax Rates Import / Export"
|
173 |
+
"Magento Logo","Magento Logo"
|
174 |
+
"A name is required","A name is required"
|
175 |
+
"Assigned options","Assigned options"
|
176 |
+
"Please Enter New Group Name","Please Enter New Group Name"
|
177 |
+
"Name","Name"
|
178 |
+
"Email Preview","Email Preview"
|
179 |
+
"Newsletter Queue","Newsletter Queue"
|
180 |
+
"Remove","Remove"
|
181 |
+
"Last Log In:","Last Log In:"
|
182 |
+
"Logged in as <strong>%s</strong>","Logged in as <strong>%s</strong>"
|
183 |
+
"Name on Card","Name on Card"
|
184 |
+
"All Stores","All Stores"
|
185 |
+
"Send comment to customer","Send comment to customer"
|
186 |
+
"Account Created on:","Account Created on:"
|
187 |
+
"Backups Control","Backups Control"
|
188 |
+
"Add New Address","Add New Address"
|
189 |
+
"Account Created in:","Account Created in:"
|
190 |
+
"Default Billing","Default Billing"
|
191 |
+
"Manage Titles (Size, Color, etc.)","Manage Titles (Size, Color, etc.)"
|
192 |
+
"Please confirm site switching. All data not saved will be lost.","Please confirm site switching. All data not saved will be lost."
|
193 |
+
"Please select from each ratings above","Please select from each ratings above"
|
194 |
+
"Qty Shipped","Qty Shipped"
|
195 |
+
"Are you sure you want to cancel add this address?","Are you sure you want to cancel add this address?"
|
196 |
+
"The information in this tab has been changed.","The information in this tab has been changed."
|
197 |
+
"2 stars","2 stars"
|
198 |
+
"Apply","Apply"
|
199 |
+
"Total","Total"
|
200 |
+
"User roles","User roles"
|
201 |
+
"Wishlist Report","Wishlist Report"
|
app/design/adminhtml/default/default/locale/ko_KR/translate.csv
ADDED
@@ -0,0 +1,612 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Credit Card Type","신용 카드 타입"
|
2 |
+
"Add New User","새 사용자 추가"
|
3 |
+
"Items that you don","Items that you don"
|
4 |
+
"State/Province","시/도"
|
5 |
+
"Magento Commerce - Administrative Panel","Magento Commerce - Administrative Panel"
|
6 |
+
"3 stars","3 stars"
|
7 |
+
"Credit Memo Date","Credit Memo Date"
|
8 |
+
"Double click on a group to rename it","Double click on a group to rename it"
|
9 |
+
"Rating Not Available","Rating Not Available"
|
10 |
+
"Gift Certificate","상품권"
|
11 |
+
"Assigned Answers","Assigned Answers"
|
12 |
+
"Fax","팩스"
|
13 |
+
"Magento Admin","마젠토 관리자"
|
14 |
+
"Newsletter Message Preview","Newsletter Message Preview"
|
15 |
+
"4 stars","4 stars"
|
16 |
+
"Company","회사"
|
17 |
+
"Invoice Date","청구일"
|
18 |
+
"Qty Returned","Qty Returned"
|
19 |
+
"Add New Customer Group","새 고객그룹 추가"
|
20 |
+
"Visitors","방문객"
|
21 |
+
"Shipping Method","배송방법"
|
22 |
+
"Subtotal","소계"
|
23 |
+
"5 stars","5 stars"
|
24 |
+
"Choose Store","매장 선택"
|
25 |
+
"Import Tax Rates","Import Tax Rates"
|
26 |
+
"Roles","Roles"
|
27 |
+
"If you do not specify an option value for a store then the default value will be used.","If you do not specify an option value for a store then the default value will be used."
|
28 |
+
"Shipping","Shipping"
|
29 |
+
"Select from existing customer addresses:","Select from existing customer addresses:"
|
30 |
+
"Products","Products"
|
31 |
+
"Edit User ","Edit User "
|
32 |
+
"Item Status","Item Status"
|
33 |
+
"Set as default billing address","Set as default billing address"
|
34 |
+
"Position","Position"
|
35 |
+
"Items Ordered","Items Ordered"
|
36 |
+
"Fixed","Fixed"
|
37 |
+
"%s","%s"
|
38 |
+
"Same as Billing Address","Same as Billing Address"
|
39 |
+
"Product In Stores","Product In Stores"
|
40 |
+
"Working...","Working..."
|
41 |
+
"Apply coupon code","Apply coupon code"
|
42 |
+
"per page","per page"
|
43 |
+
"Tax","Tax"
|
44 |
+
"Telephone","전화"
|
45 |
+
"Wishlist","Wishlist"
|
46 |
+
"Magento","Magento"
|
47 |
+
"Expiration Date","Expiration Date"
|
48 |
+
"Add New Class","새 클래스 추가"
|
49 |
+
"Super product attributes configuration","Super product attributes configuration"
|
50 |
+
"Previus page","Previus page"
|
51 |
+
"Something went wrong...","Something went wrong..."
|
52 |
+
"Lifetime Sales","Lifetime Sales"
|
53 |
+
"SKU","SKU"
|
54 |
+
"Log Out","로그아웃"
|
55 |
+
"Failed","실패"
|
56 |
+
"Billing Address","Billing Address"
|
57 |
+
"Log into Magento Admin Page","Log into Magento Admin Page"
|
58 |
+
"Invoice Status","Invoice Status"
|
59 |
+
"CC Type","CC Type"
|
60 |
+
"Percentage","Percentage"
|
61 |
+
"Are you sure?","Are you sure?"
|
62 |
+
"Email","Email"
|
63 |
+
"Customer Group:","Customer Group:"
|
64 |
+
"Option","옵션"
|
65 |
+
"Primary Billing Address","Primary Billing Address"
|
66 |
+
"Create Backup","Create Backup"
|
67 |
+
"Manage Options (values for your attribute)","Manage Options (values for your attribute)"
|
68 |
+
"Total Due","Total Due"
|
69 |
+
"Copyright 2007","Copyright 2007"
|
70 |
+
"Newsletter Subscribers","Newsletter Subscribers"
|
71 |
+
"CC Number","CC Number"
|
72 |
+
"Add New Tax Rate","Add New Tax Rate"
|
73 |
+
"Product Name","Product Name"
|
74 |
+
"Country","Country"
|
75 |
+
"Purchase order number","Purchase order number"
|
76 |
+
"Date and Time","Date and Time"
|
77 |
+
"Categories","Categories"
|
78 |
+
"Qty Cancelled","Qty Cancelled"
|
79 |
+
"Card Verification Number","Card Verification Number"
|
80 |
+
"Order Date","Order Date"
|
81 |
+
"This tab contains invalid data. Please correct before saving.","This tab contains invalid data. Please correct before saving."
|
82 |
+
"Customer Balance","Customer Balance"
|
83 |
+
"Update Qty","Update Qty"
|
84 |
+
"Customer Groups","고객 그룹"
|
85 |
+
"Export to:","다음으로 내보내기"
|
86 |
+
"configuration","환경설정"
|
87 |
+
"Sorry, no quotes are available for this order at this time.","Sorry, no quotes are available for this order at this time."
|
88 |
+
"Options","옵션"
|
89 |
+
"Attribute Name","Attribute Name"
|
90 |
+
"Total <strong>%d</strong> records found","총 <strong>%d</strong> 자료"
|
91 |
+
"Comment","Comment"
|
92 |
+
"Set as default shipping address","Set as default shipping address"
|
93 |
+
"Last Name","성"
|
94 |
+
"of","of"
|
95 |
+
"Newsletter Problem Reports","Newsletter Problem Reports"
|
96 |
+
"Sales Statistics","Sales Statistics"
|
97 |
+
"Qty To Return","Qty To Return"
|
98 |
+
"New Customer Address","New Customer Address"
|
99 |
+
"Roles Resources","Roles Resources"
|
100 |
+
"Zip/Post Code","Zip/Post Code"
|
101 |
+
"Order Status","주문 상태"
|
102 |
+
"Store","스토어"
|
103 |
+
"Product Categories","Product Categories"
|
104 |
+
"Online Customers","온라인 고객"
|
105 |
+
"Next page","Next page"
|
106 |
+
"Items Shipped","Items Shipped"
|
107 |
+
"Unassigned Attributes","Unassigned Attributes"
|
108 |
+
"Not Charged Yet","Not Charged Yet"
|
109 |
+
"This group contains system attributes.\nPlease, move system attributes to another group and try again.","This group contains system attributes.\nPlease, move system attributes to another group and try again."
|
110 |
+
"copy data from","copy data from"
|
111 |
+
"Add","추가"
|
112 |
+
"Total Payed","Total Payed"
|
113 |
+
"Shopping Cart","장바구니"
|
114 |
+
"Order History","Order History"
|
115 |
+
"Empty","Empty"
|
116 |
+
"Unable to complete request. Please, try again later.","Unable to complete request. Please, try again later."
|
117 |
+
"Customers","고객"
|
118 |
+
"Customer does not have any addresses","Customer does not have any addresses"
|
119 |
+
"Add New Role","Add New Role"
|
120 |
+
"Street Address","Street Address"
|
121 |
+
"Are You Sure?","Are You Sure?"
|
122 |
+
"Shipping Address","Shipping Address"
|
123 |
+
"Paid","Paid"
|
124 |
+
"Page","페이지"
|
125 |
+
"Discount","Discount"
|
126 |
+
"Set root category for this store in","Set root category for this store in"
|
127 |
+
"Groups","그룹"
|
128 |
+
"View","보기"
|
129 |
+
"Qty Ordered","Qty Ordered"
|
130 |
+
"Global Record Search","Global Record Search"
|
131 |
+
"Card Number","카드번호"
|
132 |
+
"PO Number","PO Number"
|
133 |
+
"Grand Total","Grand Total"
|
134 |
+
"Please select one or more attributes.","Please select one or more attributes."
|
135 |
+
"Dashboard","대시보드"
|
136 |
+
"Are you sure you want to do this?","Are you sure you want to do this?"
|
137 |
+
"Please add one or more options","Please add one or more options"
|
138 |
+
"Role Users","Role Users"
|
139 |
+
"Add New Tax Rule","Add New Tax Rule"
|
140 |
+
"Subscribe to newsletter","Subscribe to newsletter"
|
141 |
+
"Dashboard Control","Dashboard Control"
|
142 |
+
"Default Shipping","Default Shipping"
|
143 |
+
"Qty","수량"
|
144 |
+
"Add to Queue","Add to Queue"
|
145 |
+
"Average Sale","Average Sale"
|
146 |
+
"Cancel","취소"
|
147 |
+
"All stores","모든 매장"
|
148 |
+
"Personal Information","Personal Information"
|
149 |
+
"City","City"
|
150 |
+
"Export Tax Rates","Export Tax Rates"
|
151 |
+
"1 star","1 star"
|
152 |
+
"Current Configuration Scope","Current Configuration Scope"
|
153 |
+
"Add New Template","Add New Template"
|
154 |
+
"Move to:","이동:"
|
155 |
+
"First Name","First Name"
|
156 |
+
"Change Order Status","Change Order Status"
|
157 |
+
"Are you sure you want to delete this address?","Are you sure you want to delete this address?"
|
158 |
+
"Are you sure you want to do it?","Are you sure you want to do it?"
|
159 |
+
"Add to Order","Add to Order"
|
160 |
+
"Product ID","제품ID"
|
161 |
+
"Payment Method","Payment Method"
|
162 |
+
"What is this?","What is this?"
|
163 |
+
"Users","사용자"
|
164 |
+
"Customer Addresses","Customer Addresses"
|
165 |
+
"Qty Backordered","Qty Backordered"
|
166 |
+
"You can not remove system attribute from this set.","You can not remove system attribute from this set."
|
167 |
+
"Price","가격"
|
168 |
+
"Who","Who"
|
169 |
+
"Rating Not Alvailable","Rating Not Alvailable"
|
170 |
+
"Order Comment","Order Comment"
|
171 |
+
"Edit Role","Edit Role"
|
172 |
+
"Tax Rates Import / Export","Tax Rates Import / Export"
|
173 |
+
"Magento Logo","Magento Logo"
|
174 |
+
"A name is required","A name is required"
|
175 |
+
"Assigned options","Assigned options"
|
176 |
+
"Please Enter New Group Name","Please Enter New Group Name"
|
177 |
+
"Name","이름"
|
178 |
+
"Email Preview","Email Preview"
|
179 |
+
"Newsletter Queue","Newsletter Queue"
|
180 |
+
"Remove","제거"
|
181 |
+
"Last Log In:","Last Log In:"
|
182 |
+
"Logged in as <strong>%s</strong>","<strong>%s</strong>로 로그인"
|
183 |
+
"Name on Card","Name on Card"
|
184 |
+
"All Stores","All Stores"
|
185 |
+
"Send comment to customer","Send comment to customer"
|
186 |
+
"Account Created on:","Account Created on:"
|
187 |
+
"Backups Control","Backups Control"
|
188 |
+
"Add New Address","Add New Address"
|
189 |
+
"Account Created in:","Account Created in:"
|
190 |
+
"Default Billing","Default Billing"
|
191 |
+
"Manage Titles (Size, Color, etc.)","Manage Titles (Size, Color, etc.)"
|
192 |
+
"Please confirm site switching. All data not saved will be lost.","Please confirm site switching. All data not saved will be lost."
|
193 |
+
"Please select from each ratings above","Please select from each ratings above"
|
194 |
+
"Qty Shipped","재고 수량"
|
195 |
+
"Are you sure you want to cancel add this address?","Are you sure you want to cancel add this address?"
|
196 |
+
"The information in this tab has been changed.","The information in this tab has been changed."
|
197 |
+
"2 stars","2 stars"
|
198 |
+
"Apply","신청"
|
199 |
+
"Total","합계"
|
200 |
+
"User roles","User roles"
|
201 |
+
"Wishlist Report","Wishlist Report"
|
202 |
+
"Select All","전체선택"
|
203 |
+
"Unselect All","전체해제"
|
204 |
+
"Reports","보고서"
|
205 |
+
"System","시스템"
|
206 |
+
"Newsletter","뉴스레터"
|
207 |
+
"Disabled","비활성화"
|
208 |
+
"Enabled","활성화"
|
209 |
+
"Sales","판매"
|
210 |
+
"Catalog","카타로그"
|
211 |
+
"Choose Store View:","스토어뷰 선택:"
|
212 |
+
"Orders","주문"
|
213 |
+
"No Data Found","데이터가 없습니다."
|
214 |
+
"Log Out ","로그아웃"
|
215 |
+
"Google Sitemap","구글 사이트맵"
|
216 |
+
"Mobile","모바일"
|
217 |
+
"Promotions","프로모션"
|
218 |
+
"Search Terms","검색어"
|
219 |
+
"Search Term","검색어"
|
220 |
+
"Top 5 Search Terms","인기 검색어(1~5위)"
|
221 |
+
"Last 5 Search Terms","최종 검색어"
|
222 |
+
"Average Orders","평균 주문"
|
223 |
+
"Amounts","총액"
|
224 |
+
"Select Range","범위 선택:"
|
225 |
+
"Help","도움말"
|
226 |
+
"Configuration","설정"
|
227 |
+
"Import/Export","가져오기/내보내기"
|
228 |
+
"Import","가져오기"
|
229 |
+
"Export","내보내기"
|
230 |
+
"Permissions","권한"
|
231 |
+
"My Account","내 계정"
|
232 |
+
"Account Information","계정 정보"
|
233 |
+
"Save Account","계정 저장"
|
234 |
+
"Reset","초기화"
|
235 |
+
"User Name","사용자 계정"
|
236 |
+
"First Name","이름"
|
237 |
+
"Last Name","성"
|
238 |
+
"Customer Last Name","성"
|
239 |
+
"Customer First Name","이름"
|
240 |
+
"Email","이메일"
|
241 |
+
"New Password","새로운 비밀번호"
|
242 |
+
"Password Confirmation","비밀번호 재 입력"
|
243 |
+
"Submit","확인"
|
244 |
+
"Search","검색"
|
245 |
+
"Actions","동작"
|
246 |
+
"No records found.","자료가 없습니다."
|
247 |
+
"Status","상태"
|
248 |
+
"Manage Products","상품 관리"
|
249 |
+
"Manage Categories","카테고리 관리"
|
250 |
+
"Invoices","발주확인"
|
251 |
+
"Tax","세금"
|
252 |
+
"Manage Apps","응용프로그램 관리"
|
253 |
+
"Add App","응용프로그램 추가"
|
254 |
+
"Reset Filter","필터 초기화"
|
255 |
+
"URL Rewrite Management","URL Rewrite 관리"
|
256 |
+
"Tags","태그"
|
257 |
+
"Manage Ratings","Manage Ratings"
|
258 |
+
"Shipments","배송"
|
259 |
+
"Transactions","거래"
|
260 |
+
"IP Address","IP주소"
|
261 |
+
"ID","아이디"
|
262 |
+
"Type","유형"
|
263 |
+
"Revenue","총 수입"
|
264 |
+
"Quantity","수량"
|
265 |
+
"Shipping","배송"
|
266 |
+
"Bestsellers","베스트 셀러"
|
267 |
+
"New Customers","신규 고객"
|
268 |
+
"Most Viewed Products","최고 많이 본 상품"
|
269 |
+
"Product Name","상품 명"
|
270 |
+
"Quantity Ordered","주문 수량"
|
271 |
+
"Results","결과"
|
272 |
+
"Items","물품"
|
273 |
+
"Grand Total","총 계"
|
274 |
+
"Customer","고객"
|
275 |
+
"Newsletter Subscribers","뉴스레터 가입자"
|
276 |
+
"Newsletter Queue","뉴스레터 대기열"
|
277 |
+
"Newsletter Problem Reports","뉴스레터 문제 보고서"
|
278 |
+
"Newsletter Templates","뉴스레터 견본"
|
279 |
+
"Manage Terms and Conditions","이용 약관 관리"
|
280 |
+
"Terms and conditions","이용 약관"
|
281 |
+
"Manage Attributes","속성 관리"
|
282 |
+
"Attribute Code","속성 코드"
|
283 |
+
"Attributes","속성"
|
284 |
+
"Create New Order","새 주문"
|
285 |
+
"Action","동작"
|
286 |
+
"Customer Reviews","고객 리뷰"
|
287 |
+
"Manage Ratings","평가 관리"
|
288 |
+
"Rating Name","평가명"
|
289 |
+
"Manage Customers","고객 관리"
|
290 |
+
"Reviews","리뷰"
|
291 |
+
"Products","상품"
|
292 |
+
"Listings","목록"
|
293 |
+
"Online Customers","온라인 고객"
|
294 |
+
"App Submission History","응용프로그램 제출 내역"
|
295 |
+
"Date Submitted","제출일"
|
296 |
+
"App Code","응용프로그램 코드"
|
297 |
+
"Activation Key","인증키"
|
298 |
+
"App Title","응용프로그램 제목"
|
299 |
+
"App Information","응용프로그램 정보"
|
300 |
+
"App Name","응용프로그램명"
|
301 |
+
"Store View","스토어 뷰"
|
302 |
+
"New App","새 응용프로그램"
|
303 |
+
"Device Information","장치 정보"
|
304 |
+
"Device Type","장치 종류"
|
305 |
+
"Device","장치"
|
306 |
+
"Manage Mobile App","모바일 응용프로그램 관리"
|
307 |
+
"Settings","설정"
|
308 |
+
"Please Select Device Type","장치를 선택해 주세요."
|
309 |
+
"Continue","계속"
|
310 |
+
"Back","뒤로"
|
311 |
+
"Save","저장"
|
312 |
+
"Save and Continue Edit","저장 후 계속 작성"
|
313 |
+
"iPad","아이패드"
|
314 |
+
"iPhone","아이폰"
|
315 |
+
"Android","안드로이드"
|
316 |
+
"General","일반"
|
317 |
+
"Design","디자인"
|
318 |
+
"Content","내용"
|
319 |
+
"Payment Methods","결제 방법"
|
320 |
+
"Submission History","제출 내역"
|
321 |
+
"Cache Management","캐시 관리"
|
322 |
+
"Social Networking","소셜 네트워킹"
|
323 |
+
"Yes","예"
|
324 |
+
"No","아니오"
|
325 |
+
"Push Notification","푸시 알림"
|
326 |
+
"Please Select a Customer","고객을 선택하세요"
|
327 |
+
"Country","나라"
|
328 |
+
"ZIP/Post Code","우편번호"
|
329 |
+
"Create New Customer","새 고객 만들기"
|
330 |
+
"Cancel","취소"
|
331 |
+
"Please Select a Store","매장을 선택하세요"
|
332 |
+
"Customer Group","고객 그룹"
|
333 |
+
"Product","상품"
|
334 |
+
"Discount","할인"
|
335 |
+
"Add Products","상품 추가"
|
336 |
+
"Items Ordered","주문 내역"
|
337 |
+
"Billing Address","청구서 배송지"
|
338 |
+
"Shipping Address","물건 배송지"
|
339 |
+
"Submit Order","주문 확인"
|
340 |
+
"Zip/Postal Code","우편 번호"
|
341 |
+
"Street Address","주소"
|
342 |
+
"City","도시"
|
343 |
+
"Order History","주문 내역"
|
344 |
+
"Order Totals","총 주문"
|
345 |
+
"Save in address book","주소록에 저장"
|
346 |
+
"Same As Billing Address","청구서 배송지와 동일"
|
347 |
+
"Payment Method","결제 방법"
|
348 |
+
"Select from existing customer addresses:","기존 고객 주소에서 선택:"
|
349 |
+
"Apply Coupon Code","쿠폰 코드 신청"
|
350 |
+
"Row Subtotal","소계"
|
351 |
+
"Add New Address","새 주소 추가"
|
352 |
+
"Total %d product(s)","총 %d 상품"
|
353 |
+
"Custom Price","사용자 정의 금액"
|
354 |
+
"Subtotal:","총 합계:"
|
355 |
+
"Update Items and Qty's","항목 및 수량 업데이트"
|
356 |
+
"Order Currency:","주문 화폐:"
|
357 |
+
"Order View","주문 내역"
|
358 |
+
"Information","정보"
|
359 |
+
"Customer Name","고객 이름"
|
360 |
+
"Order Date","주문 날짜"
|
361 |
+
"Order Status","주문 상태"
|
362 |
+
"Edit","수정"
|
363 |
+
"Payment Information","결제 정보"
|
364 |
+
"Send Email","메일 보내기"
|
365 |
+
"Comment","코멘트"
|
366 |
+
"Submit Comment","댓글 등록"
|
367 |
+
"Pending","보류중"
|
368 |
+
"Processing","처리중"
|
369 |
+
"Purchased On","구매일"
|
370 |
+
"Purchased From (Store)","구매 위치 (매장)"
|
371 |
+
"Bill to Name","청구인"
|
372 |
+
"Ship to Name","받는 사람"
|
373 |
+
"Tax Percent","세금 비율"
|
374 |
+
"Tax Amount","세금"
|
375 |
+
"Discount Amount","할인 금액 "
|
376 |
+
"Row Total","총 합계"
|
377 |
+
"Item Status","항목 상태"
|
378 |
+
"Original Price","원가"
|
379 |
+
"Shipping & Handling","배송처리"
|
380 |
+
"Shipping & Handling Information","배송처리 정보"
|
381 |
+
"Notify Customer by Email","Email로 고객에게 알림"
|
382 |
+
"Add Order Comments","주문 코멘트를 추가하십시오."
|
383 |
+
"Invoice","발주"
|
384 |
+
"Reorder","재 주문"
|
385 |
+
"Hold","잠금"
|
386 |
+
"Customer Email","이메일"
|
387 |
+
"Refunded","환급"
|
388 |
+
"Canceled","취소됨"
|
389 |
+
"Any","모두"
|
390 |
+
"per page","페이지 당"
|
391 |
+
"Total %d records found","총 %d 자료"
|
392 |
+
"items selected","항목 선택"
|
393 |
+
"Unhold","잠금 풀기"
|
394 |
+
"Print Invoices","송장 출력"
|
395 |
+
"Print All","모두 출력"
|
396 |
+
"Print Packingslips","포장 전표 출력"
|
397 |
+
"Group","그룹"
|
398 |
+
"ZIP","우편번호"
|
399 |
+
"Add New Customer","새 고객 추가"
|
400 |
+
"Select Visible","보이는 항목 선택"
|
401 |
+
"Paid","결제"
|
402 |
+
"Shipping Information","배송 정보"
|
403 |
+
"Print","인쇄"
|
404 |
+
"Are you sure you want to send Invoice email to customer?","고객에게 송장 메일을 보내시겠습니까?"
|
405 |
+
"Total Qty","총 수량"
|
406 |
+
"Unselect Visible","보이는 항목 해제"
|
407 |
+
"Model","모델"
|
408 |
+
"Weight","무게"
|
409 |
+
"Manufacturer","재조사"
|
410 |
+
"Prices","가격"
|
411 |
+
"Tax Class","세금 등급"]
|
412 |
+
"-- Please Select --","-- 선택해 주세요 --"
|
413 |
+
"Catalog, Search","카탈로그, 검색"
|
414 |
+
"default","기본"
|
415 |
+
"Descriptions","설명"
|
416 |
+
"Images","이미지"
|
417 |
+
"Create New Attribute","새 속성 추가"
|
418 |
+
"Country of Manufacture","제조 국가"
|
419 |
+
"add New Option","새 옵션 추가"
|
420 |
+
"Categories","카테고리"
|
421 |
+
"Product Categories","상품 카테고리"
|
422 |
+
"Product Reviews","상품 리뷰"
|
423 |
+
"Custom Options","사용자 정의 옵션"
|
424 |
+
"Product Information","상품 정보"
|
425 |
+
"All Store Views","모든 스토어 뷰"
|
426 |
+
"Add Product","상품 추가"
|
427 |
+
"Backups","백업"
|
428 |
+
"Compilation","편집"
|
429 |
+
"Disable","비활성화"
|
430 |
+
"Compilation State","편집 상태"
|
431 |
+
"No records found for this period.","이 기간 동안 기록을 찾을 수 없습니다."
|
432 |
+
"Order ID","주문 ID"
|
433 |
+
"Transaction ID","거래 ID"
|
434 |
+
"Payment Method Name","결제 방법"
|
435 |
+
"Transaction Type","거래 유형
|
436 |
+
"Attrib. Set Name","속성 이름"
|
437 |
+
"Visibility","보기"
|
438 |
+
"SKU","재고 코드"
|
439 |
+
"Approved","승인"
|
440 |
+
"Tag","태그"
|
441 |
+
"All Tags","전체 태그"
|
442 |
+
"Edit Attribute Set '%s'","속성 세트 편집 '%s'"
|
443 |
+
"Edit Set Name","세트 이름 편집"
|
444 |
+
"Add New","새로 추가"
|
445 |
+
"Delete Selected Group","선택된 그룹 제거"
|
446 |
+
"Delete Attribute Set","속성 세트 제거"
|
447 |
+
"Save Attribute Set","속성 세트 저장"
|
448 |
+
"Unassigned Attributes","비활당된 특성"
|
449 |
+
"Double click on a group to rename it","이름을 변경하려면 그룹을 더블클릭 하세요."
|
450 |
+
"Get help for this page ","이 페이지에 대한 도움말"
|
451 |
+
"Manage Attribute Sets","속성 세트 관리"
|
452 |
+
"Reviews and Ratings","리뷰 & 평가"
|
453 |
+
"Expired","만료됨"
|
454 |
+
"Suspended","보류됨"
|
455 |
+
"Payment Reference ID","지불 조회 ID"
|
456 |
+
"Terms and Conditions Information","이용 약관 안내"
|
457 |
+
"Condition Name","약관 이름"
|
458 |
+
"Tax Rate","세율"
|
459 |
+
"Product Tax Class","상품 세금 등급"
|
460 |
+
"Customer Tax Class","고객 상품 등급"
|
461 |
+
"Delete Rule","규칙 제거"
|
462 |
+
"Save Rule","규칙 저장"
|
463 |
+
"Tax Rule Information","세금 규칙 정보"
|
464 |
+
"Edit Rule","규칙 수정"
|
465 |
+
"Priority","우선 순위"
|
466 |
+
"Sort Order","정렬 순서"
|
467 |
+
"Manage Tax Rules","세금 규칙 관리"
|
468 |
+
"Manage Tax Zones & Rates","Manage Tax Zones & Rates"
|
469 |
+
"Catalog Price Rules","카탈로그 가격 정책"
|
470 |
+
"Shopping Cart Price Rules","쇼핑카트 가격 정책"
|
471 |
+
"Web Services","웹 서비스"
|
472 |
+
"Notifications","알림"
|
473 |
+
"Read Details","자세히"
|
474 |
+
"Mark as Read","읽은 상태로 표시"
|
475 |
+
"Tools","도구"
|
476 |
+
"Severity","심각성"
|
477 |
+
"Message","메시지"
|
478 |
+
"System Backup","시스템 백업"
|
479 |
+
"Database and Media Backup","데이터베이스 & 미디어 백업"
|
480 |
+
"Database Backup","데이터베이스 백업"
|
481 |
+
"Delete","제거"
|
482 |
+
"Number of Uses","사용 횟수"
|
483 |
+
"Print Credit Memos","신용정보 출력"
|
484 |
+
"Countries Options","국가별 설정"
|
485 |
+
"Default Country","기본 국가"
|
486 |
+
"Allow Countries","허용된 국가"
|
487 |
+
"Postal Code is Optional for the following countries","우편번호가 옵션으로 적용"
|
488 |
+
"European Union Countries","유럽연합 국가"
|
489 |
+
"Timezone","시간대"
|
490 |
+
"First Day of Week","시작요일"
|
491 |
+
"Weekend Days","주말"
|
492 |
+
"Url Options","Url 옵션"
|
493 |
+
"Secure","보안"
|
494 |
+
"Comments History","코멘트 내역"
|
495 |
+
"CMS","컨텐츠관리"
|
496 |
+
"Polls","투표"
|
497 |
+
"eBay","이베이관리"
|
498 |
+
"Manage Currency Rates","환율관리"
|
499 |
+
"States Options","States 정보가 필요한 국가"
|
500 |
+
"Search Engines Optimization","검색엔진 최적화"
|
501 |
+
"Developer","개발자"
|
502 |
+
"Inventory","재고관리"
|
503 |
+
"Decrease Stock When Order is Placed","주문이 되었을대 재고 수량 감소"
|
504 |
+
"Set Items' Status to be In Stock When Order is Cancelled","주문이 취소 되었을때 아이템 상태 변경"
|
505 |
+
"Lifetime Sales","총 판매액"
|
506 |
+
"Average Sale","평균 판매"
|
507 |
+
"Recent Orders","최근 주문"
|
508 |
+
"Last 5 Orders","최근 주문 5건"
|
509 |
+
"Manage Stores","스토어 관리"
|
510 |
+
"Manage Currency","화폐(통화) 관리"
|
511 |
+
"Enable Escrow Image","에스크로 이미지 활성화"
|
512 |
+
"Escrow Image","에스크로 이미지"
|
513 |
+
"Ipay Payment Use","iPay 사용"
|
514 |
+
"Customer Configuration","고객관리"
|
515 |
+
"Sales Emails","판매 이메일"
|
516 |
+
"Shipping Settings","배송정보 셋팅"
|
517 |
+
"Shipping Method","배송방법"
|
518 |
+
"Shipping Methods","배송방법"
|
519 |
+
"Transactional Emails","트랜잭션 이메일"
|
520 |
+
"Currency Setup","화폐(통화) 설정"
|
521 |
+
"Store Email Address","스토어 이메일 주소"
|
522 |
+
"Store Email Addresses","스토어 이메일 주소"
|
523 |
+
"Content Management","컨텐츠 관리"
|
524 |
+
"Sender Name","보내는 사람"
|
525 |
+
"Sender Email", "보내는 이메일"
|
526 |
+
"Index Management","인덱스 관리"
|
527 |
+
"Forgot your password?","비밀번호 찾기"
|
528 |
+
"Login","로그인"
|
529 |
+
"Log in to Admin Panel","관리자 페이지 로그인"
|
530 |
+
"Locale Options","지역 설정"
|
531 |
+
"Store Information","스토어 설정"
|
532 |
+
"Store Name","스토어 이름"
|
533 |
+
"Store Contact Telephone","스토어 고객센터 전화번호"
|
534 |
+
"Store Contact Address","스토어 고객센터 주소"
|
535 |
+
"Import Settings","가져오기 설정"
|
536 |
+
"Order Statuses", "주문상태 관리"
|
537 |
+
"New Rule","새 정책"
|
538 |
+
"General Information","일반 정보"
|
539 |
+
"Rule Name","정책 이름"
|
540 |
+
"Description","설명"
|
541 |
+
"Websites","웹사이트"
|
542 |
+
"Website","웹사이트"
|
543 |
+
"Coupon","쿠폰"
|
544 |
+
"From Date","시작일"
|
545 |
+
"To Date","종료일"
|
546 |
+
"Current Configuration Scope:","현재 설정 영역:"
|
547 |
+
"Template Name","템플릿 이름"
|
548 |
+
"Date Added","생성일"
|
549 |
+
"Date Updated","수정일"
|
550 |
+
"Template Type","템플릿 타입"
|
551 |
+
"Add New Template","새 템플릿 추가"
|
552 |
+
"Load default template","기본 템플릿 불러오기"
|
553 |
+
"Template","템플릿"
|
554 |
+
"Load Template","템플릿 불러오기"
|
555 |
+
"Locale","국가/지역"
|
556 |
+
"Template Subject","템플릿 제목"
|
557 |
+
"Template Content","템플릿 내용"
|
558 |
+
"Template Styles","템플릿 스타일"
|
559 |
+
"Preview Template","템플릿 미리보기"
|
560 |
+
"Save Template","템플릿 저장하기"
|
561 |
+
"New Email Template","새 이메일 템플릿"
|
562 |
+
"Convert to Plain Text","텍스트로 보기"
|
563 |
+
"Return to Html Version","Html 버전으로 보기"
|
564 |
+
"User Name:","이름"
|
565 |
+
"Password:","비밀번호"
|
566 |
+
"Web","웹"
|
567 |
+
"Admin User Emails","관리자 이메일"
|
568 |
+
"Startup Page","시작페이지"
|
569 |
+
"Admin Base URL","관리자 기본 URL"
|
570 |
+
"Security", "보안설정"
|
571 |
+
"CAPTCHA","자동로그인방지"
|
572 |
+
"Enable CAPTCHA in Admin","자동로그인방지 설정"
|
573 |
+
"Enable CAPTCHA in Frontend","자동로그인방지 설정"
|
574 |
+
"Font","글꼴"
|
575 |
+
"Forms","로그인 폼"
|
576 |
+
"Number of Unsuccessful Attempts to Login","로그인 실패 허용횟수"
|
577 |
+
"CAPTCHA Timeout (minutes)","자동로그인방지 시간(분)"
|
578 |
+
"Number of Symbols","문자 갯수"
|
579 |
+
"Symbols Used in CAPTCHA","사용 문자"
|
580 |
+
"Case Sensitive","대소문자 구분"
|
581 |
+
"Email to a Friend","친구에게 메일 보내기"
|
582 |
+
"Admin","관리자"
|
583 |
+
"Personal Information","고객 개인정보"
|
584 |
+
"Last Logged In:","최근 로그인:"
|
585 |
+
"Last Logged In (%s):","최근 로그인(%s):"
|
586 |
+
"Confirmed email:","이메일 인증"
|
587 |
+
"Customer View","고객 프로필"
|
588 |
+
"Customer Information","고객 정보"
|
589 |
+
"Addresses","주소"
|
590 |
+
"Customer Addresses","고객 주소"
|
591 |
+
"Edit Customer's Address","고객 주소 수정"
|
592 |
+
"Newsletter Information","뉴스레터 정보"
|
593 |
+
"Product Tags","상품태그"
|
594 |
+
"Tag Name","태그명"
|
595 |
+
"Account Created on:","계정생성:"
|
596 |
+
"Account Created on (%s):","계정생성 (%s)"
|
597 |
+
"Account Created in:","계정생성 (shop)"
|
598 |
+
"Customer Group:","고객관리"
|
599 |
+
"Default Billing Address","기본 청구 주소"
|
600 |
+
"Create Order","주문 생성"
|
601 |
+
"Delete Customer","고객 삭제"
|
602 |
+
"Save Customer","저장하기"
|
603 |
+
"Save Config","저장하기"
|
604 |
+
"Forgot Password Email Template","비밀번호 찾기 이메일 템플릿"
|
605 |
+
"Forgot Password Email Template","비밀번호 찾기 이메일 보내는 사람"
|
606 |
+
"Order # %s","주문 # %s"
|
607 |
+
"Invoice #","송장번호 #"
|
608 |
+
"Custom Variables","사용자 변수"
|
609 |
+
"Magento Connect", "익스텐션 관리"
|
610 |
+
"Magento Connect Manager","익스텐션 설정/추가/삭제"
|
611 |
+
"Package Extensions", "익스텐션 패키지 만들기"
|
612 |
+
"cancel restriction/auto place order", "구매자 취소 제한(자동발주처리)"
|
app/design/adminhtml/default/default/template/ipay/form.phtml
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php $_order = $this->getShipment()->getOrder() ?>
|
28 |
+
<?php echo $this->getChildHtml('order_info') ?>
|
29 |
+
|
30 |
+
<div class="box-left">
|
31 |
+
<!--Billing Address-->
|
32 |
+
<div class="entry-edit">
|
33 |
+
<div class="entry-edit-head">
|
34 |
+
<h4 class="icon-head head-payment-method"><?php echo $this->helper('sales')->__('Payment Information') ?></h4>
|
35 |
+
</div>
|
36 |
+
<fieldset>
|
37 |
+
<div><?php echo $this->getChildHtml('order_payment') ?></div>
|
38 |
+
<div><?php echo Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
|
39 |
+
</fieldset>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="box-right">
|
43 |
+
<!--Shipping Address-->
|
44 |
+
<div class="entry-edit">
|
45 |
+
<div class="entry-edit-head">
|
46 |
+
<h4 class="icon-head head-shipping-method"><?php echo $this->helper('sales')->__('Shipping and Tracking Information') ?></h4>
|
47 |
+
</div>
|
48 |
+
<fieldset>
|
49 |
+
<div>
|
50 |
+
<?php if($this->getShipment()->getTracksCollection()->count()): ?>
|
51 |
+
<?php if($_order->getPayment()->getMethod()=="ipay"):?>
|
52 |
+
<?php
|
53 |
+
$read = Mage::getSingleton("core/resource")->getConnection("core_read");
|
54 |
+
$query = "select * from ipay where order_id='".$_order->getIncrementId()."'";
|
55 |
+
$result = $read->query($query);
|
56 |
+
$order_info=$result->fetch();
|
57 |
+
$auctionOrderNo = explode("@",$order_info["auction_order_no"]);
|
58 |
+
?>
|
59 |
+
<a href="#" id="linkId" onclick="popWin('http://ipay.auction.co.kr/seller/ShipmentDetail.aspx?OrderNo=<?=$auctionOrderNo[0]?>','trackorder','width=550,height=700,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track this shipment') ?>"><?php echo $this->__('Track this shipment') ?></a>
|
60 |
+
<br/>
|
61 |
+
<?php else :?>
|
62 |
+
<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($this->getShipment()) ?>','trackshipment','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track this shipment') ?>"><?php echo $this->__('Track this shipment') ?></a>
|
63 |
+
<br/>
|
64 |
+
<?php endif?>
|
65 |
+
<?php endif; ?>
|
66 |
+
<strong><?php echo $this->escapeHtml($_order->getShippingDescription()) ?></strong>
|
67 |
+
<?php echo $this->helper('sales')->__('Total Shipping Charges'); ?>:
|
68 |
+
|
69 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
70 |
+
<?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
|
71 |
+
<?php else: ?>
|
72 |
+
<?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
|
73 |
+
<?php endif; ?>
|
74 |
+
<?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
|
75 |
+
|
76 |
+
<?php echo $_excl; ?>
|
77 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
78 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
79 |
+
<?php endif; ?>
|
80 |
+
</div>
|
81 |
+
<?php if ($this->canCreateShippingLabel()): ?>
|
82 |
+
<div style="text-align: center; margin: 10px 0;">
|
83 |
+
<?php echo $this->getCreateLabelButton()?>
|
84 |
+
<?php if ($this->getShipment()->getShippingLabel()): ?>
|
85 |
+
<?php echo $this->getPrintLabelButton() ?>
|
86 |
+
<?php endif ?>
|
87 |
+
<?php if ($this->getShipment()->getPackages()): ?>
|
88 |
+
<?php echo $this->getShowPackagesButton() ?>
|
89 |
+
<?php endif ?>
|
90 |
+
</div>
|
91 |
+
<?php endif ?>
|
92 |
+
<div><?php echo $this->getChildHtml('shipment_tracking') ?></div>
|
93 |
+
</fieldset>
|
94 |
+
<?php echo $this->getChildHtml('shipment_packaging') ?>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
document.observe("dom:loaded", function() {
|
98 |
+
setTimeout(function(){
|
99 |
+
packaging.setConfirmPackagingCallback(function(){
|
100 |
+
packaging.sendCreateLabelRequest();
|
101 |
+
});
|
102 |
+
packaging.setLabelCreatedCallback(function(response){
|
103 |
+
setLocation("<?php echo $this->getUrl(
|
104 |
+
'*/sales_order_shipment/view',
|
105 |
+
array('shipment_id' => $this->getShipment()->getId())
|
106 |
+
); ?>");
|
107 |
+
});
|
108 |
+
}, 500);
|
109 |
+
});
|
110 |
+
//]]>
|
111 |
+
</script>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
<div class="clear"></div>
|
115 |
+
|
116 |
+
<div class="entry-edit">
|
117 |
+
<div class="entry-edit-head">
|
118 |
+
<h4 class="icon-head head-products"><?php echo $this->helper('sales')->__('Items Shipped') ?></h4>
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<?php echo $this->getChildHtml('shipment_items') ?>
|
123 |
+
<?php echo $this->getChildHtml('shipment_packed') ?>
|
124 |
+
|
125 |
+
<div class="box-left entry-edit">
|
126 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Shipment History') ?></h4></div>
|
127 |
+
<fieldset><?php echo $this->getChildHtml('order_comments') ?></fieldset>
|
128 |
+
</div>
|
129 |
+
<div class="clear"></div>
|
app/design/adminhtml/default/default/template/ipay/info.phtml
ADDED
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php /** @var $this Mage_Adminhtml_Block_Sales_Order_View_Tab_Info */ ?>
|
28 |
+
<?php $_order = $this->getOrder(); ?>
|
29 |
+
|
30 |
+
<div>
|
31 |
+
<div id="order-messages">
|
32 |
+
<?php echo $this->getChildHtml('order_messages') ?>
|
33 |
+
</div>
|
34 |
+
<?php echo $this->getChildHtml('order_info') ?>
|
35 |
+
<input type="hidden" name="order_id" value="<?php echo $_order->getId() ?>"/>
|
36 |
+
<?php if ($_order->getIsVirtual()): ?>
|
37 |
+
<div class="box-right">
|
38 |
+
<?php else: ?>
|
39 |
+
<div class="box-left">
|
40 |
+
<?php endif; ?>
|
41 |
+
<!--Payment Method-->
|
42 |
+
<div class="entry-edit">
|
43 |
+
<div class="entry-edit-head">
|
44 |
+
<h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information') ?></h4>
|
45 |
+
</div>
|
46 |
+
<fieldset>
|
47 |
+
<?php echo $this->getPaymentHtml() ?>
|
48 |
+
<div><?php echo Mage::helper('sales')->__('Order was placed using %s', $_order->getOrderCurrencyCode()) ?></div>
|
49 |
+
</fieldset>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
<?php if (!$_order->getIsVirtual()): ?>
|
53 |
+
<div class="box-right">
|
54 |
+
<!--Shipping Method-->
|
55 |
+
<div class="entry-edit">
|
56 |
+
<div class="entry-edit-head">
|
57 |
+
<h4 class="icon-head head-shipping-method"><?php echo Mage::helper('sales')->__('Shipping & Handling Information') ?></h4>
|
58 |
+
</div>
|
59 |
+
<fieldset>
|
60 |
+
<?php if ($_order->getTracksCollection()->count()) : ?>
|
61 |
+
<?php if($_order->getPayment()->getMethod()=="ipay"):?>
|
62 |
+
<?php
|
63 |
+
$read = Mage::getSingleton("core/resource")->getConnection("core_read");
|
64 |
+
$query = "select * from ipay where order_id='".$_order->getIncrementId()."'";
|
65 |
+
$result = $read->query($query);
|
66 |
+
$order_info=$result->fetch();
|
67 |
+
$auctionOrderNo = explode("@",$order_info["auction_order_no"]);
|
68 |
+
?>
|
69 |
+
<a href="#" id="linkId" onclick="popWin('http://ipay.auction.co.kr/seller/ShipmentDetail.aspx?OrderNo=<?=$auctionOrderNo[0]?>','trackorder','width=550,height=700,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track Order') ?>"><?php echo $this->__('Track Order') ?></a>
|
70 |
+
<br/>
|
71 |
+
<?php else :?>
|
72 |
+
<a href="#" id="linkId" onclick="popWin('<?php echo $this->helper('shipping')->getTrackingPopupUrlBySalesModel($_order) ?>','trackorder','width=800,height=600,resizable=yes,scrollbars=yes')" title="<?php echo $this->__('Track Order') ?>"><?php echo $this->__('Track Order') ?></a>
|
73 |
+
<br/>
|
74 |
+
<?php endif?>
|
75 |
+
<?php endif; ?>
|
76 |
+
<?php if ($_order->getShippingDescription()): ?>
|
77 |
+
<strong><?php echo $this->escapeHtml($_order->getShippingDescription()) ?></strong>
|
78 |
+
|
79 |
+
<?php if ($this->helper('tax')->displayShippingPriceIncludingTax()): ?>
|
80 |
+
<?php $_excl = $this->displayShippingPriceInclTax($_order); ?>
|
81 |
+
<?php else: ?>
|
82 |
+
<?php $_excl = $this->displayPriceAttribute('shipping_amount', false, ' '); ?>
|
83 |
+
<?php endif; ?>
|
84 |
+
<?php $_incl = $this->displayShippingPriceInclTax($_order); ?>
|
85 |
+
|
86 |
+
<?php echo $_excl; ?>
|
87 |
+
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
88 |
+
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
89 |
+
<?php endif; ?>
|
90 |
+
<?php else: ?>
|
91 |
+
<?php echo $this->helper('sales')->__('No shipping information available'); ?>
|
92 |
+
<?php endif; ?>
|
93 |
+
</fieldset>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<?php endif; ?>
|
97 |
+
<div class="clear"></div>
|
98 |
+
<?php echo $this->getGiftOptionsHtml() ?>
|
99 |
+
<div class="clear"></div>
|
100 |
+
<div class="entry-edit">
|
101 |
+
<div class="entry-edit-head">
|
102 |
+
<h4 class="icon-head head-products"><?php echo Mage::helper('sales')->__('Items Ordered') ?></h4>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
<?php echo $this->getItemsHtml() ?>
|
106 |
+
<div class="clear"></div>
|
107 |
+
|
108 |
+
<div class="box-left">
|
109 |
+
<div class="entry-edit">
|
110 |
+
<div class="entry-edit-head">
|
111 |
+
<h4><?php echo Mage::helper('sales')->__('Comments History') ?></h4>
|
112 |
+
</div>
|
113 |
+
<fieldset><?php echo $this->getChildHtml('order_history') ?></fieldset>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
<div class="box-right entry-edit">
|
117 |
+
<div class="entry-edit-head"><h4><?php echo Mage::helper('sales')->__('Order Totals') ?></h4></div>
|
118 |
+
<div class="order-totals"><?php echo $this->getChildHtml('order_totals') ?></div>
|
119 |
+
</div>
|
120 |
+
<div class="clear"></div>
|
121 |
+
</div>
|
122 |
+
|
123 |
+
<?php echo $this->getChildHtml('popup_window');?>
|
124 |
+
<script type="text/javascript">
|
125 |
+
//<![CDATA[
|
126 |
+
/**
|
127 |
+
* Retrieve gift options tooltip content
|
128 |
+
*/
|
129 |
+
function getGiftOptionsTooltipContent(itemId) {
|
130 |
+
var contentLines = [];
|
131 |
+
var headerLine = null;
|
132 |
+
var contentLine = null;
|
133 |
+
|
134 |
+
$$('#gift_options_data_' + itemId + ' .gift-options-tooltip-content').each(function (element) {
|
135 |
+
if (element.down(0)) {
|
136 |
+
headerLine = element.down(0).innerHTML;
|
137 |
+
contentLine = element.down(0).next().innerHTML;
|
138 |
+
if (contentLine.length > 30) {
|
139 |
+
contentLine = contentLine.slice(0,30) + '...';
|
140 |
+
}
|
141 |
+
contentLines.push(headerLine + ' ' + contentLine);
|
142 |
+
}
|
143 |
+
});
|
144 |
+
return contentLines.join('<br/>');
|
145 |
+
}
|
146 |
+
giftOptionsTooltip.setTooltipContentLoaderFunction(getGiftOptionsTooltipContent);
|
147 |
+
//]]>
|
148 |
+
</script>
|
app/design/adminhtml/default/default/template/ipay/items.phtml
ADDED
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package default_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
?>
|
28 |
+
<div class="grid np">
|
29 |
+
<div class="hor-scroll">
|
30 |
+
<table cellspacing="0" class="data order-tables">
|
31 |
+
<col />
|
32 |
+
<col width="1" />
|
33 |
+
<col width="1" />
|
34 |
+
<?php if (!$this->canShipPartiallyItem()): ?>
|
35 |
+
<col width="20" />
|
36 |
+
<?php endif; ?>
|
37 |
+
<thead>
|
38 |
+
<tr class="headings">
|
39 |
+
<th><?php echo $this->helper('sales')->__('Product') ?></th>
|
40 |
+
<th class="a-center"><?php echo $this->helper('sales')->__('Qty') ?></th>
|
41 |
+
<th<?php if ($this->isShipmentRegular()): ?> class="last"<?php endif; ?>><span class="nobr"><?php echo $this->helper('sales')->__('Qt to Ship') ?></span></th>
|
42 |
+
|
43 |
+
<?php if (!$this->canShipPartiallyItem()): ?>
|
44 |
+
<th class="a-center last"><span class="nobr"><?php echo $this->helper('sales')->__('Ship') ?></span></th>
|
45 |
+
<?php endif; ?>
|
46 |
+
|
47 |
+
</tr>
|
48 |
+
</thead>
|
49 |
+
<?php $_items = $this->getShipment()->getAllItems() ?>
|
50 |
+
<?php $_i=0;foreach ($_items as $_item): if ($_item->getOrderItem()->getIsVirtual() || $_item->getOrderItem()->getParentItem()): continue; endif; $_i++ ?>
|
51 |
+
<tbody class="<?php echo $_i%2?'odd':'even' ?>">
|
52 |
+
<?php echo $this->getItemHtml($_item) ?>
|
53 |
+
<?php echo $this->getItemExtraInfoHtml($_item->getOrderItem()) ?>
|
54 |
+
</tbody>
|
55 |
+
<?php endforeach; ?>
|
56 |
+
</table>
|
57 |
+
</div>
|
58 |
+
</div>
|
59 |
+
<br />
|
60 |
+
<div class="box-left entry-edit">
|
61 |
+
<div class="entry-edit-head"><h4><?php echo $this->__('Shipment Comments') ?></h4></div>
|
62 |
+
<fieldset>
|
63 |
+
<div id="order-history_form">
|
64 |
+
<span class="field-row">
|
65 |
+
<label class="normal" for="shipment_comment_text"><?php echo Mage::helper('sales')->__('Shipment Comments') ?></label>
|
66 |
+
<textarea id="shipment_comment_text" name="shipment[comment_text]" rows="3" cols="5" style="height:6em; width:99%;"><?php echo $this->getShipment()->getCommentText(); ?></textarea>
|
67 |
+
</span>
|
68 |
+
<div class="clear"></div>
|
69 |
+
</div>
|
70 |
+
</fieldset>
|
71 |
+
</div>
|
72 |
+
|
73 |
+
<div class="box-right entry-edit">
|
74 |
+
<div class="order-totals">
|
75 |
+
<div class="order-totals-bottom">
|
76 |
+
<?php if ($this->canCreateShippingLabel()): ?>
|
77 |
+
<p>
|
78 |
+
<label class="normal" for="create_shipping_label"><?php echo Mage::helper('sales')->__('Create Shipping Label') ?></label>
|
79 |
+
<input id="create_shipping_label" name="shipment[create_shipping_label]" value="1" type="checkbox" onclick="toggleCreateLabelCheckbox();" />
|
80 |
+
</p>
|
81 |
+
<?php endif ?>
|
82 |
+
<p>
|
83 |
+
<label class="normal" for="notify_customer"><?php echo Mage::helper('sales')->__('Append Comments') ?></label>
|
84 |
+
<input id="notify_customer" name="shipment[comment_customer_notify]" value="1" type="checkbox" />
|
85 |
+
</p>
|
86 |
+
<?php if ($this->canSendShipmentEmail()): ?>
|
87 |
+
<p>
|
88 |
+
<label class="normal" for="send_email"><?php echo Mage::helper('sales')->__('Email Copy of Shipment') ?></label>
|
89 |
+
<input id="send_email" name="shipment[send_email]" value="1" type="checkbox" />
|
90 |
+
</p>
|
91 |
+
<?php endif; ?>
|
92 |
+
<div class="a-right">
|
93 |
+
<?php echo $this->getChildHtml('submit_button') ?>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
<div class="clear"></div>
|
99 |
+
<script type="text/javascript">
|
100 |
+
//<![CDATA[
|
101 |
+
var sendEmailCheckbox = $('send_email');
|
102 |
+
if (sendEmailCheckbox) {
|
103 |
+
var notifyCustomerCheckbox = $('notify_customer');
|
104 |
+
var shipmentCommentText = $('shipment_comment_text');
|
105 |
+
Event.observe(sendEmailCheckbox, 'change', bindSendEmail);
|
106 |
+
bindSendEmail();
|
107 |
+
}
|
108 |
+
function bindSendEmail()
|
109 |
+
{
|
110 |
+
if (sendEmailCheckbox.checked == true) {
|
111 |
+
notifyCustomerCheckbox.disabled = false;
|
112 |
+
//shipmentCommentText.disabled = false;
|
113 |
+
}
|
114 |
+
else {
|
115 |
+
notifyCustomerCheckbox.disabled = true;
|
116 |
+
//shipmentCommentText.disabled = true;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
function toggleCreateLabelCheckbox(){
|
120 |
+
var checkbox = $('create_shipping_label');
|
121 |
+
var submitButton = checkbox.up('.order-totals').select('.submit-button span')[0];
|
122 |
+
if (checkbox.checked) {
|
123 |
+
submitButton.innerText += '...';
|
124 |
+
} else {
|
125 |
+
submitButton.innerText = submitButton.innerText.replace(/\.\.\.$/, '');
|
126 |
+
}
|
127 |
+
}
|
128 |
+
function submitShipment(btn){
|
129 |
+
var checkbox = $(btn).up('.order-totals').select('#create_shipping_label')[0];
|
130 |
+
|
131 |
+
var carrierCode = $('trackingC1').value;
|
132 |
+
var carrierTitle = $('trackingT1').value;
|
133 |
+
var trackingNumber = $('trackingN1').value;
|
134 |
+
if(chk(trackingNumber,carrierCode)){
|
135 |
+
if (checkbox && checkbox.checked) {
|
136 |
+
packaging.showWindow();
|
137 |
+
} else if(editForm.submit()) {
|
138 |
+
disableElements('submit-button');
|
139 |
+
}
|
140 |
+
}else {
|
141 |
+
alert("invalid tracking number");
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
function chk(invoiceNo,company)
|
146 |
+
{
|
147 |
+
var digit=1;
|
148 |
+
if(company=="cjgls"){
|
149 |
+
if(invoiceNo.length==12)
|
150 |
+
digit=3;
|
151 |
+
else if(invoiceNo.length==11)
|
152 |
+
digit=4;
|
153 |
+
}
|
154 |
+
|
155 |
+
var hanjin = [true,10,12];
|
156 |
+
var cjgls = [true,10,11,12];
|
157 |
+
var kyungdong = [false,8,9,10,11,12,13,14,15,16];
|
158 |
+
var korex = [false,10];
|
159 |
+
var dongbu = [true,12];
|
160 |
+
var innogis = [false,10,11,12,13];
|
161 |
+
var hanaro = [true,10];
|
162 |
+
var hyundai = [true,10,12];
|
163 |
+
var yellow = [true,11];
|
164 |
+
var kgb = [true,11];
|
165 |
+
var epost = [false,13];
|
166 |
+
var etc = [10];
|
167 |
+
eval("var companyLength ="+ company);
|
168 |
+
|
169 |
+
if(!companyLength)
|
170 |
+
return true;
|
171 |
+
|
172 |
+
if(!array_search(invoiceNo.length,companyLength)){
|
173 |
+
return false;
|
174 |
+
}
|
175 |
+
|
176 |
+
if(companyLength[0]){
|
177 |
+
lastNum = invoiceNo.substring(invoiceNo.length-1);
|
178 |
+
firstNum = invoiceNo.substring(0+(digit-1),invoiceNo.length-1);
|
179 |
+
if(firstNum%7 == lastNum){
|
180 |
+
return true;
|
181 |
+
}else
|
182 |
+
return false;
|
183 |
+
}else{
|
184 |
+
if(company=="epost" ){
|
185 |
+
fnum = invoiceNo.substring(0,1);
|
186 |
+
keyArr = [6,7,8];
|
187 |
+
if(!array_search(fnum,keyArr)){
|
188 |
+
return false;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
function array_search(str, arr){
|
195 |
+
for( var key in arr ){
|
196 |
+
if( arr[key] == str ) break;
|
197 |
+
key = false;
|
198 |
+
}
|
199 |
+
return false || key;
|
200 |
+
}
|
201 |
+
|
202 |
+
//]]>
|
203 |
+
</script>
|
app/design/frontend/base/default/template/ipay/available.phtml
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPwzI6+mSyVzLmw6TZi+e796HwHKgdVSnZ/onfw30MrgRQ2YZ8JxoTJqRxvmBpuxrZshyqZPD
|
5 |
+
lpf4ggONU2mAiQ7RJMKFsP1BnBsV0m8kO0JlmShLlM2QcuROb3uc+ddEVv5mkwZEfMdS2BUmm62M
|
6 |
+
aH/rODQZu2TQ6KpAA69OCo6GyauarLWGdIok77O/tNdcT1oYABXiO8sCJTVHCTXpDFBo9fP1iGgb
|
7 |
+
bq4qwjKXjCZDThjLXrkVosimvtE0KIka66O22nUR+BEEsmqEXmwFtb+CfFFilGZ+ZtpXv4LmJPfz
|
8 |
+
LoD2DjUOb7XZK0T3yg6NXvhayjpwE9IrVtcMtT8xnP5BFaCmMmhvqVqKjPnyzmegmyBmDiB8Vk3i
|
9 |
+
lIFKgmnmUQM3myLoR36J0F2jjC7IFTa4dNwneigRgrcEMiXnLN1d6c4dDqaqusEMoB8+AHwqZdKP
|
10 |
+
bNApPeEstLCNwhS5xTy3m0mpsnXBKwm5JWtOs88draDtCI25KgIWX76l74MIhgPX3EfatV+OZofp
|
11 |
+
QXnHEHR+Nd+VHnnIRg2679k0v/YGDD01OykBC6q9YML2OowhItuONnB73/qZDvGIR61NZa5lTxvc
|
12 |
+
VYkwgcNptGFHVga9WMX+k0nDuN3/pUsdMTJCWnuF304xoS4KtDhyTSaLWrwVs+Wj5gjyf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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cP+vOIM3X7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RoC75EAUsGMPCzK0n8xMbfUA2yKRMkcyVHDtBdqeJnXJGIMoJ2SyYPZQYuNVo87TdP
|
156 |
+
pXiZOWAffePeWD4VUhI4LjsvKFirMARwS9wpp71M34V+UHLcbPLTV7hWAu0NMM0UKAJI20oaxS19
|
157 |
+
hLZiLw2ZmzGhk9c3tEe+jgPsy74=
|
app/design/frontend/base/default/template/ipay/button.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPmFppTpqM3OJ+KPO/piANAEU1nzgW9p8IjrXP3hv4aNMpWVrByINp0JwerkINdwxHrDvajOa
|
5 |
+
lXIiHj9ToE+Z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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPn5x8O2myvctMPwqesa1pDGqm4EGZWjUFS5bBf/IYgaW7d/wEKZMDnxBNQDMcMCPs9ZY8n0f
|
5 |
+
XJMRL6bU0sbc+O7UZpszXKKIWgjzXqS/ST4Mi+HkZopFbWOVn3i54Zgs4ibMgH5PR7Q1i+DXj7gE
|
6 |
+
gtdlbCfarYXJ0f+bxMndqP+yHiU3jQo5lTCxWd+2uwNED3QJ31V7nlaxIEj9EkYDmVK3OF5PA4yH
|
7 |
+
7sM15UuA61LMZTsRm+/63GDrfrT0sYJfPnjjl/pWEvy4O4FtZKUkw7A1LtK8YeXTUeviZt7w1MuO
|
8 |
+
XzAl1+l/feMeqM8Xb3UeWjUKPYCEg9Gplelf0ye3GYss3uYSOuTTqbsWOLIj/ZDes/kFZcTme+NH
|
9 |
+
QfcOfjkx590/fDvpxesoz5jTlXwMrPUXyq8kVneVG2cC/GX6UaE5q9KaPyk7fNutzKwW5RtMQE0n
|
10 |
+
Qp3CMkgmKYZZ9qcw/cgMa8qGtS8CcaK43Edppj2MhNZet73swuH7GYD4yebMLnunNZc7i642mi3Z
|
11 |
+
O/b2IiJ3gGLfmsNtsvJ3HJFRJ8B/BZy7o9+Xzwk9VOT8J2QFI24w8PL8wk9RZUiPOohIH5FTfW01
|
12 |
+
xh/uTpaQIZBU+iTVi/BXd8+OX5oC6wE4ivFm6dOPicT7MC7jEpFmH7+jHqb81v/S4R1cMSjVpV0H
|
13 |
+
0yITrdX0f6Ww17KU8KqjiXbgpoo7/YmV2/KhZd+OeIoCn2z8PH0Ci37u4HJ3BPC0B832SHsgd6db
|
14 |
+
ziNlx8uwvmEQrJuEtp4uJNutuA3PyJgXANwk2VxGD49UCqfQFbtR1X909AcdiC5DZDDivfs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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
|
28 |
+
|
29 |
+
<?php
|
30 |
+
class auctionSession
|
31 |
+
{
|
32 |
+
private $serverUrl;
|
33 |
+
private $soapAuction;
|
34 |
+
|
35 |
+
public function __construct($serverUrl, $soapAuction)
|
36 |
+
{
|
37 |
+
$this->serverUrl = $serverUrl;
|
38 |
+
$this->soapAuction = $soapAuction;
|
39 |
+
}
|
40 |
+
|
41 |
+
/** sendHttpRequest
|
42 |
+
Sends a HTTP request to the server for this session
|
43 |
+
Input: $requestBody
|
44 |
+
Output: The HTTP Response as a String
|
45 |
+
*/
|
46 |
+
public function sendHttpRequest($requestBody)
|
47 |
+
{
|
48 |
+
//build auction headers using variables passed via constructor
|
49 |
+
$headers = $this->buildAuctionHeaders(strlen($requestBody));
|
50 |
+
|
51 |
+
//initialise a CURL session
|
52 |
+
$connection = curl_init();
|
53 |
+
|
54 |
+
|
55 |
+
//set the server we are using (could be Sandbox or Production server)
|
56 |
+
curl_setopt($connection, CURLOPT_URL, $this->serverUrl);
|
57 |
+
|
58 |
+
//stop CURL from verifying the peer's certificate
|
59 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
|
60 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
|
61 |
+
|
62 |
+
//set the headers using the array of headers
|
63 |
+
curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
|
64 |
+
|
65 |
+
//set method as POST
|
66 |
+
curl_setopt($connection, CURLOPT_POST, 1);
|
67 |
+
|
68 |
+
//set the XML body of the request
|
69 |
+
curl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);
|
70 |
+
|
71 |
+
//set it to return the transfer as a string from curl_exec
|
72 |
+
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
|
73 |
+
|
74 |
+
//Send the Request
|
75 |
+
$response = curl_exec($connection);
|
76 |
+
|
77 |
+
//close the connection
|
78 |
+
curl_close($connection);
|
79 |
+
|
80 |
+
//return the response
|
81 |
+
return $response;
|
82 |
+
}
|
83 |
+
|
84 |
+
private function buildAuctionHeaders($requestBodyLength)
|
85 |
+
{
|
86 |
+
$headers = array (
|
87 |
+
"Content-Type: text/xml; charset=utf-8",
|
88 |
+
"Content-Length: $requestBodyLength",
|
89 |
+
"SOAPAction: $this->soapAuction"
|
90 |
+
);
|
91 |
+
|
92 |
+
return $headers;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
?>
|
96 |
+
<?php
|
97 |
+
|
98 |
+
/*
|
99 |
+
* requestCartNo
|
100 |
+
* 상품정보를 전달하고 발급된 카트번호를 요청합니다.
|
101 |
+
* http://www.auction.co.kr/IpayService/Ipay/InsertIpayOrder
|
102 |
+
* 서비스 문의시에 Request SOAP과 Response SOAP을 보내주시면 됩니다.
|
103 |
+
* 옥션 API 개발자 커뮤니티 : http://api.auction.co.kr/developer
|
104 |
+
*/
|
105 |
+
class requestCartNo
|
106 |
+
{
|
107 |
+
private $serverUrl = "https://api.auction.co.kr/ArcheSystem/IpayService.asmx"; //실제 운영 서버 주소
|
108 |
+
private $action = "http://www.auction.co.kr/IpayService/Ipay/InsertIpayOrder";
|
109 |
+
private $ticket;
|
110 |
+
|
111 |
+
|
112 |
+
public function __construct($ticket){
|
113 |
+
$this->ticket = $ticket;
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
+
/*** 서비스를 실행(호출)한다.*/
|
118 |
+
public function doService($orderQuery){
|
119 |
+
|
120 |
+
// Set Request SOAP Message
|
121 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?> ';
|
122 |
+
$requestXmlBody .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ';
|
123 |
+
$requestXmlBody .= ' <soap:Header> ';
|
124 |
+
$requestXmlBody .= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security"> ';
|
125 |
+
$requestXmlBody .= ' <Value>' . $this->ticket . '</Value> ';
|
126 |
+
$requestXmlBody .= ' </EncryptedTicket> ';
|
127 |
+
$requestXmlBody .= ' </soap:Header> ';
|
128 |
+
$requestXmlBody .= ' <soap:Body> ';
|
129 |
+
$requestXmlBody .= ' <InsertIpayOrder xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
130 |
+
$requestXmlBody .= $orderQuery;
|
131 |
+
$requestXmlBody .= '</InsertIpayOrder> ';
|
132 |
+
$requestXmlBody .= '</soap:Body> ';
|
133 |
+
$requestXmlBody .= '</soap:Envelope> ';
|
134 |
+
|
135 |
+
//echo $requestXmlBody;
|
136 |
+
|
137 |
+
|
138 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
139 |
+
|
140 |
+
|
141 |
+
// Load the XML Document to Print Request SOAP
|
142 |
+
$requestDoc = new DomDocument();
|
143 |
+
$requestDoc->loadXML($requestXmlBody);
|
144 |
+
|
145 |
+
// Print Request SOAP
|
146 |
+
//echo "<PRE>";
|
147 |
+
//echo "<STRONG>* REQUEST SOAP</STRONG><BR>";
|
148 |
+
//echo htmlentities ($requestDoc->saveXML());
|
149 |
+
//echo "</PRE>";
|
150 |
+
|
151 |
+
|
152 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
153 |
+
$session = new auctionSession($this->serverUrl, $this->action);
|
154 |
+
|
155 |
+
|
156 |
+
//send the request and get response
|
157 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
158 |
+
|
159 |
+
// Process Response
|
160 |
+
return $this->processResponse ($responseXml);
|
161 |
+
}
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Request SOAP Message를 서버에 요청하고 받아온 Response SOAP Message를 가지고 처리한다.
|
165 |
+
* $responseXml : Response SOAP Message
|
166 |
+
*/
|
167 |
+
private function processResponse($responseXml){
|
168 |
+
|
169 |
+
if(stristr($responseXml, 'HTTP 404') || $responseXml == '') {
|
170 |
+
die('<P>$responseXml Error sending request');
|
171 |
+
} else {
|
172 |
+
//Xml string is parsed and creates a DOM Document object
|
173 |
+
$responseDoc = new DomDocument();
|
174 |
+
$responseDoc->loadXML($responseXml);
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
+
// Print Response SOAP
|
179 |
+
//echo "<PRE>";
|
180 |
+
//echo "<STRONG>* RESPONSE SOAP</STRONG><BR>";
|
181 |
+
//echo "<BR>".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($responseDoc->saveXML(), ENT_NOQUOTES, "UTF-8")) );
|
182 |
+
//echo "</PRE>";
|
183 |
+
|
184 |
+
|
185 |
+
// Error
|
186 |
+
$eleFaultcode = $responseDoc->getElementsByTagName('faultcode')->item(0);
|
187 |
+
$eleFaultstring = $responseDoc->getElementsByTagName('faultstring')->item(0);
|
188 |
+
$eleResult = $responseDoc->getElementsByTagName('InsertIpayOrderResult')->item(0);
|
189 |
+
|
190 |
+
if ((empty($eleFaultcode)) && (!empty($eleResult)))
|
191 |
+
{
|
192 |
+
return $eleResult->firstChild->nodeValue;
|
193 |
+
}
|
194 |
+
else{
|
195 |
+
$this->processError($eleFaultcode, $eleFaultstring);
|
196 |
+
}
|
197 |
+
}
|
198 |
+
return "";
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
/**
|
203 |
+
* 에러 처리를 한다.
|
204 |
+
* $eleFaultcode : 오류 코드 메시지
|
205 |
+
* $eleFaultstring : 오류 메시지
|
206 |
+
*/
|
207 |
+
private function processError($eleFaultcode, $eleFaultstring){
|
208 |
+
if ($eleFaultcode != null) echo "faultcode : ".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($eleFaultcode->nodeValue, ENT_NOQUOTES, "UTF-8")))."<BR>";
|
209 |
+
if ($eleFaultstring != null) echo "faultstring : ".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($eleFaultstring->nodeValue, ENT_NOQUOTES, "UTF-8")))."<BR>";
|
210 |
+
}
|
211 |
+
}
|
212 |
+
?>
|
213 |
+
|
214 |
+
|
215 |
+
|
216 |
+
<?php
|
217 |
+
/**
|
218 |
+
* Shopping cart template
|
219 |
+
*
|
220 |
+
* @see Mage_Checkout_Block_Cart
|
221 |
+
*/
|
222 |
+
?>
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
<div class="cart">
|
228 |
+
<div class="page-title title-buttons">
|
229 |
+
<?php if(!$this->hasError()): ?>
|
230 |
+
<ul class="checkout-types">
|
231 |
+
<?php foreach ($this->getMethods('top_methods') as $method): ?>
|
232 |
+
<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
|
233 |
+
<li><?php echo $methodHtml; ?></li>
|
234 |
+
<?php endif; ?>
|
235 |
+
<?php endforeach; ?>
|
236 |
+
</ul>
|
237 |
+
<?php endif; ?>
|
238 |
+
</div>
|
239 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
240 |
+
<?php echo $this->getChildHtml('form_before') ?>
|
241 |
+
<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
|
242 |
+
<fieldset>
|
243 |
+
<table id="shopping-cart-table" class="data-table cart-table">
|
244 |
+
<col width="1" />
|
245 |
+
<col />
|
246 |
+
<col width="1" />
|
247 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
248 |
+
<col width="1" />
|
249 |
+
<?php endif ?>
|
250 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
251 |
+
<col width="1" />
|
252 |
+
<?php endif; ?>
|
253 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
254 |
+
<col width="1" />
|
255 |
+
<?php endif; ?>
|
256 |
+
<col width="1" />
|
257 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
258 |
+
<col width="1" />
|
259 |
+
<?php endif; ?>
|
260 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
261 |
+
<col width="1" />
|
262 |
+
<?php endif; ?>
|
263 |
+
<col width="1" />
|
264 |
+
|
265 |
+
<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
|
266 |
+
<thead>
|
267 |
+
<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
|
268 |
+
<tr>
|
269 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
270 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
271 |
+
<th class="a-right"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
|
272 |
+
<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
|
273 |
+
</tr>
|
274 |
+
<?php endif; ?>
|
275 |
+
</thead>
|
276 |
+
<tbody>
|
277 |
+
|
278 |
+
|
279 |
+
|
280 |
+
<?
|
281 |
+
|
282 |
+
$itemsQuery = "<ITEMS>";
|
283 |
+
|
284 |
+
|
285 |
+
/*
|
286 |
+
' 상품셋팅정보 작성
|
287 |
+
*/
|
288 |
+
/*
|
289 |
+
$ticket = API 인증티켓;
|
290 |
+
$price = 상품가격;
|
291 |
+
$sellerid = 이용자 아이디
|
292 |
+
*/
|
293 |
+
|
294 |
+
$quote = Mage::getSingleton('checkout/cart')->getQuote();
|
295 |
+
$address = $quote->getAddress();
|
296 |
+
$method = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod();
|
297 |
+
$shipfee = Ceil(Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingAmount());
|
298 |
+
$title=Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod();
|
299 |
+
|
300 |
+
if($title=="ipay_ipay")
|
301 |
+
$shiptype=2;
|
302 |
+
else if($title=="freeshipping_freeshipping")
|
303 |
+
$shiptype=1;
|
304 |
+
else
|
305 |
+
$shiptype=3;
|
306 |
+
|
307 |
+
echo "aaaa".$title;
|
308 |
+
|
309 |
+
//$shipfee = Mage::getStoreConfig("carriers/ipay/handling_fee");
|
310 |
+
$shiptype = Mage::getStoreConfig("payment/ipay/shiptype");
|
311 |
+
$paymethod = Mage::getStoreConfig("payment/ipay/ipay_payment_method");
|
312 |
+
$ticket = Mage::getStoreConfig("payment/ipay/certification");
|
313 |
+
$sellerid = Mage::getStoreConfig("payment/ipay/auctionid");
|
314 |
+
|
315 |
+
if($ticket != "" && $sellerid !="" ){
|
316 |
+
if($shiptype==1 || $shiptype==2)
|
317 |
+
$shipfee=0;
|
318 |
+
|
319 |
+
$price=0;
|
320 |
+
|
321 |
+
foreach($this->getItems() as $_item){
|
322 |
+
$optionValue="";
|
323 |
+
$this->getItemHtml($_item);
|
324 |
+
$renderer = $this->getItemRenderer($_item->getProductType());
|
325 |
+
if ($_options = $renderer->getOptionList()){
|
326 |
+
foreach ($_options as $_option){
|
327 |
+
$_formatedOptionValue = $renderer->getFormatedOptionValue($_option);
|
328 |
+
$optionValue .= $renderer->htmlEscape($_option['label']);
|
329 |
+
$optionValue .= "(".$_formatedOptionValue['value'].")";
|
330 |
+
|
331 |
+
if (isset($_formatedOptionValue['full_view'])){
|
332 |
+
$optionValue .= $_option['label'] ;
|
333 |
+
$optionValue .= $_formatedOptionValue['full_view'];
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
|
338 |
+
$sum += (int)$_item->getCalculationPrice()*$_item->getQty();
|
339 |
+
|
340 |
+
//$price = Mage::getModel('directory/currency')->formatTxt($sum,array('display' => Zend_Currency::NO_SYMBOL));
|
341 |
+
//$item_price = (int)Mage::getModel('directory/currency')->formatTxt($_item->getCalculationPrice(),array('display' => Zend_Currency::NO_SYMBOL));
|
342 |
+
$price = (int)$sum;
|
343 |
+
$item_price = (int)$_item->getCalculationPrice();
|
344 |
+
|
345 |
+
|
346 |
+
|
347 |
+
$itemName = str_replace("'","",$_item->getProduct()->getName());
|
348 |
+
$itemName = str_replace("\"","",$_item->getProduct()->getName());
|
349 |
+
$itemName = $_item->getProduct()->getName();
|
350 |
+
$itemsQuery = $itemsQuery
|
351 |
+
. "<IpayServiceItems item_name=" . "\""."AAA"."\""
|
352 |
+
. " ipay_itemno=" . "'".$_item->getProduct()->getId()."'"
|
353 |
+
. " item_option_name=" . "'222'"
|
354 |
+
. " item_price='" . str_replace(",","",$item_price) . "'"
|
355 |
+
. " order_qty='". $_item->getQty() ."'"
|
356 |
+
. " item_url=" . "'".Mage::getStoreConfig("web/unsecure/base_url")."'"
|
357 |
+
. " partner_code='ESELLERS'"
|
358 |
+
. " thumbnail_url=" . "'".Mage::getBaseUrl('media')."catalog/product".Mage::getModel('catalog/product')->load($_item->getProductId())->getThumbnail()."'" . "/> ";
|
359 |
+
}
|
360 |
+
echo $itemQuery;
|
361 |
+
}else{
|
362 |
+
echo "<script>alert('There is no certified key or auction id');window.close()</script>";
|
363 |
+
}
|
364 |
+
?>
|
365 |
+
</tbody>
|
366 |
+
</table>
|
367 |
+
<script type="text/javascript">decorateTable('shopping-cart-table')</script>
|
368 |
+
</fieldset>
|
369 |
+
</form>
|
370 |
+
|
371 |
+
</div>
|
372 |
+
|
373 |
+
|
374 |
+
|
375 |
+
<?php
|
376 |
+
|
377 |
+
$price = str_replace(",","",$price) + $shipfee;
|
378 |
+
|
379 |
+
/* 상품정보 xml 셋팅 */
|
380 |
+
$orderQuery = "<ORDER payment_rule='$paymethod' pay_price='$price' shipping_price='$shipfee' shipping_type='3' back_url='www.url.co.kr' service_url='www.url.com/receiveXml.asp' redirect_url='".Mage::getStoreConfig("web/unsecure/base_url")."index.php/ipay/payment/review' move_to_redirect_url='true'/>";
|
381 |
+
|
382 |
+
$orderQuery = $orderQuery . $itemsQuery . "</ITEMS>";
|
383 |
+
|
384 |
+
$requestCartNo = new requestCartNo ($ticket);
|
385 |
+
|
386 |
+
//echo "resultCode:".$requestCartNo."<BR>";
|
387 |
+
$requestResult = $requestCartNo->doService($orderQuery); // 서비스를 호출하고 새 카트번호를 가져온다
|
388 |
+
|
389 |
+
?>
|
390 |
+
<html>
|
391 |
+
<body>
|
392 |
+
<form name="frm" method="get" action="https://ssl.auction.co.kr/ipay/IpayStdOrder.aspx">
|
393 |
+
<input type="hidden" name="cartnos" value="<?php echo $requestResult ?>">
|
394 |
+
<input type="hidden" name="sellerid" value="<?php echo $sellerid ?>">
|
395 |
+
<input type="hidden" name="price" value="<?php echo $price ?>">
|
396 |
+
<p align=center>
|
397 |
+
<img name=:myImg" src="loading.gif" style="border=0"/><br />
|
398 |
+
|
399 |
+
<b>Please Wait a Minute...</b>
|
400 |
+
</p>
|
401 |
+
</form>
|
402 |
+
<br /><br /><br /><br />
|
403 |
+
</body>
|
404 |
+
<script>
|
405 |
+
document.frm.submit();
|
406 |
+
</script>
|
407 |
+
</html>
|
app/design/frontend/base/default/template/ipay/footer.phtml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPtKkWcGBz7PBgfeNHzLn9YmfI5L+K0OPDEwEy0qwxYxTRvln+FGOfzfJWf4Gl0Y0qg1QvLmm
|
5 |
+
kK7PUeBAwlRRFgFxPgytGA5Z8w7krlgGS54vvUwM8AbMJRsy/bPTAkT0NAIU6kYIDAqFIXrsEQ9i
|
6 |
+
6XsLjcCvbuEyWhUr0IAtYtCYRiA/AExjpZR2HMdXQWqTcQ+DtSGiBRE/NTbMrKiLhUvmzq9JCoHj
|
7 |
+
Y+iYxQyLlLkJGy+87s9hqRi9/1WJSZKBuJzS+GcsD3wN0EXp3hiEZzvVZAJpxBq8/ezyuUJPRS7l
|
8 |
+
Nz6ysX/zNzW8NUu6MIpxoSdCO8YwwS0pL/Rj0VK8GDKoVg6hVDp+FvHN/HfDSQJOdI2ufcDw9OHc
|
9 |
+
Lvd7J1PTImb0rXDI5qOX+ltC7pW7hd2ANPqzZ50/krm79mNwbjCCZpd5JsZOvu+QpK+1Ar79ySkM
|
10 |
+
7b+HmrMwBOzwQC7L1YZe68XA4rN+yYQ7qW27QB3+4VB+Fwfm+XC98euk1LxpaRMjE0tUXIn75eK9
|
11 |
+
rNEPBcX7FYEwqjOIdgyMlHtANbrQzTlelYOL5UDxkMKrL5bg6JQIdxdrN2AGZ/3gmMm0bdl+6fB6
|
12 |
+
sYN5qbeFmfVsGxG9dcR/EL8bTpdJh7zrQwj8AN+xjFqCaKHfS/4Q12yjogkNUn0H/mLklo9all0P
|
13 |
+
4wPeKbdzMdmQNm2o5lFZg6/Irez1AtCsg7hRsT2rTIqpHcyYeKbThR8RsXeNJiGpswlRI8JY/cQj
|
14 |
+
44M7Upvu9ePE5ZGGp0QIAzyZORo+Kk6X9s22fJ6+SVcpvU3sev1OBv7682xdgW8mb4W8nh1y0oyb
|
15 |
+
AIRl+TOzQFs8FZ5JGpI9DcLMMXyziuyK15isUVpkZFhVQoB3eBP+MsKUW1tyI2eD/VRKEx5dcNfx
|
16 |
+
QvW5twdxT5d5I0GaDJd2mAw5IO//k0sj3b5Cs8KdPP6CklbdUQb4EjJtYjzzSBwiDlFf1P+71RQH
|
17 |
+
009ImWD/xfG1N9MhwENcvywIS2Xp0DEej/oioRa9NiL0SrLPWS1CABaDlaQXK5h4CBJCyNSgHJKS
|
18 |
+
SUgDKd/UzV3Kyt8b24Rx3y3qh0BxvRbzkbhaNTFCxAG2wcFUpPFANT/oenrW+r+hO+n33wOXBdMx
|
19 |
+
P37w6LSJhZTV5561jPEkqXeSEYapRRd+DndP
|
app/design/frontend/base/default/template/ipay/info.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPsqpjFz309CCyAN/No7SduzOlLStxrl+8EfZjmh8KeN5maLKPe9cl076/rXHkMtbmA35jm94
|
5 |
+
zi45aQzvRkP62hXQe2ZRIM4ZTC2OJw/TuwHC4/qv3RBjWovb+pUxrshMc6Nu1xo+AWFJ1PEXi0Ep
|
6 |
+
G6BroU5+fn4oP9dYaXjcz4tI79hmKT8L2cDDSLSf/U99ZQXKqGGY0C+8uiUkw13f/wWhBqAF1iki
|
7 |
+
p1VWb7fJflUl+V0Fkmb2QjOWuFLPTztH0r7DG4QMVYk/QKJK3eGEZzvVZAJpxBq8/ezyuUGjSyf4
|
8 |
+
b/LFZhEedMe8zV06DF+mlXpHXFK/yUk7gAV5wnv9yaihKCCNrfeXagWAd58RAzt5lvMQeY7rkNGu
|
9 |
+
uoi9bi3EW4Jes/IWZE0grXlM83jiM0OuxIXMeWmLEdvfcBhvKCI/UEppLpPpNhVQSX9+avWJho1X
|
10 |
+
hjMP2xCVEFA8fLdEPAsNQUWGWNjKj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AWnOpL
|
48 |
+
EWhi7Zix/lHP+VPJH08i+S/Ahr9y73Gaqol8InklnXqXb/6Wdu+pEOSfWRTIClhrLRPeVjqzrDMn
|
49 |
+
mW+bogT7UCxtTOfMYBb1tWefp+A0tkMiDk5Wkbo8WYtPBW35S/sEGqh4PMCtWejlD4aA4Hk+Uq8Q
|
50 |
+
+DDx/FEcV4mG7L9NgN9AqLUdj5ni7cZij4jswryx1T4u1w5NdQY4clILJPoXfeGAcctgMkB8RX0E
|
51 |
+
rF8cqg0c8rT8gvRarE9alhmXQEw9tlcX3y04bzzpItc+jhEAC3UCryj7u4/Q4Z3kAJlr4dDCtg/f
|
52 |
+
q4lWeQgldw3NS/XxKL+KTOBMG01Xr4oV7eTzKjpMWe+B72sX9pyuMFVCiTFZB+6ltzeB82TmPlHk
|
53 |
+
VEst8TuSMJVlsYyqKVVwYA5aynMe0wAMlsyTIsplb8kFzkrILgiOe6GRVyPTqg/T82x64yuHuafi
|
54 |
+
Nys+XE3CFyldSOZLoWPU3SD7cltZXeEzurHklBSxNw3uI7IcMGkdgxNP/nHv6rHFV5G6+m0qS+V5
|
55 |
+
HpFqeDqrzEdNZ1F5uED+WLIS9GKuaUU5iREFnxteJO1tcP758UXnhjqz7ze=
|
app/design/frontend/base/default/template/ipay/ipay.phtml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPrjWi0T8jmWeRTib94vTDiU/9bI1domp9SXmMEpnQiaJsSSC4KBT61cTtzX1ZNh7footvjyP
|
5 |
+
1V9oenq+VSEaujafQNwCCtnNS1qLcaU9ItJpmJGxXikMIOfibpd5wY7V85I0Ih8Vi4wP9wLv0Qz+
|
6 |
+
7ToNM22qURkHFfMRp4scsNm1Y644garBnX5PjCb09+CCK+2QIlJOXbW41IIt3lTWanmfrN3jgUKO
|
7 |
+
nVfHD9kwVwrj9kCcQefuN6B2Eix4A6rHYrNgzBAbHTh6Xb+43eeEZzvVZAJpxBq8/ezyuUGDQ/ac
|
8 |
+
fv8Dw6LzFSy8fUm6NFz4tQAhmX+XsH9RR6vwPeeSn70H15zjYQ9QscQX6s++FcxAtxenBUbTKe14
|
9 |
+
Qec5wrHOIzRmAt/MK2ibvi/VJPGwPzNgVYQJPtqapUmEk2K4J1kEsTH4nKMKHy3dMXaunyxYPK4U
|
10 |
+
nyipK0cins9lTCWorSEP1hq3W4j/GhRasjOPNJACrcURVSP6xfCLiOjzLHnXq6bIdYDMdyL153Cs
|
11 |
+
HmnyhcKeRTBYW7MnOih3mmN8IvZk+SJHAQNjsLblvJvMUyYmRyHk8pxrJbJosQDDm42vlAG5zXwv
|
12 |
+
me+hLa5tMBXsW2/bVx40lEwN42khWftisj1b/U6QfgQkM/aurdtjDkba7F72C6MYA8birRm6v+6P
|
13 |
+
82zgq/4b8oyrbPEkZ3Q4+15/so4r5sDpLGujx3Y7PbPbi7ZRUTop0WeQYyrqcoTWVjQ7krZLWYl+
|
14 |
+
7eOU46wMwbBKQaBoU6WSnIjJJrjPxJOUOOacFj4/ZE8DKPoSdvQbaK0rCBS/P19TLdS+NS8VlIAn
|
15 |
+
4fGau3tybDYiPyJTUk26ev6xTp7w8oUIRAO1EwXa5v6616Bwe4TnkGw2C2liIl3caOT+0taqRtkN
|
16 |
+
Dsa4xv62KqQSUG7RqXMGVbX7yo4Dx/qbQSuM9Z9usvIugGqFAq8C3Bqsp/xRWENdzPc8FpHU/Bhp
|
17 |
+
hw8/VpupInjIJ8J59E1uNPiYgIvQ9/V6zYF9lDyixEefazv3DxE8ykJq01lJFMg7pB1FBo5DQZjv
|
18 |
+
DvzvXxf9Frmt1ayfPaXKunfE5R4Z1Y1bjgkEZ3NsV4dly+as34F0GyMucj/+p2HQKKpONyQJlzGh
|
19 |
+
Gky=
|
app/design/frontend/base/default/template/ipay/ipayInfo.phtml
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPz6W6f2Y8VzkfyDjZxCoqK/Kj/7iao0Mxi4vxFVVdIda+FCo/1EAZzrXz7ZTYSkeoG9GvgJX
|
5 |
+
nWFyK+tGPke108/V6zAmI5wKxl8EbO9POWcR1Gdqqn9OE8N+aM2kCwQJs8tQ8M+uc174FoU3GzK8
|
6 |
+
amUQJZElEgNhgoMPjnwZu41Kc9GNAX3mLMlkDs/XycIxOmJwKVHbtEX3cIOUjSMFO8+6BTm9/gTP
|
7 |
+
IVKaettCbEyhTeQXBp2pzotvh3+pdU7rzwReZTGWK0b2M6OES18EiWwFtb+CfFFilGZ+ZtpXv29t
|
8 |
+
ZkJdyUJ57KAzU0ZjhmSDTE/MeJGoQH+Xc1+wKtlWgjIrsMXvAqMDYLTGwy2y/lazTlx/VtGXODCa
|
9 |
+
Lx57EHj9TbE9W6Ppbv/AX3DLI83F9KED0qRNM89nSRz8QFQCr/dP8s15MAW+yrfdtIgM2hwdMGUu
|
10 |
+
9/niv99II1QR+cG6uzgwvccjZNTOYeGfWGSw9L3o7fmlNI4KQmp1bZEnZYHJVd4bLr6zm9QX279M
|
11 |
+
MOpLzvitUKjgWzSV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HeKhokNjOpuRGDoRvSxl
|
62 |
+
S6iVZu9cPckWORG9vmOY3ElaXJPekPkcSDbQO7D7NZcWISvNd8+AJ1K3Q/GF0VXKWv0CsHr7Fq3L
|
63 |
+
/lrasXciXmj5jBMb6+Kc1HwWN7ObgkZj5ga=
|
app/design/frontend/base/default/template/ipay/ipayInfo_.phtml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to ass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fnMJpWCg3LBobkb04oEFSUvg3R9B+GA8x0aMrezfz1x8iegu847c1Ab
|
55 |
+
HLYCuWnA8Z86/spLmJ6tvQ7F7lTHW4aJdKe+hNDRzJbv6Rk3WjZlCWhx3vg06BYnESlnDqPdljpY
|
56 |
+
v5fkULCCGyFUQwDMwcNViNbyrrD/gxmphAk6nGlDH71eoAxnOXnbgy8U6+R+6Fmkwg79c7W4vMFX
|
57 |
+
TjP4n1IWbGLHN/mVwOnXsIOEXi+L3zecBW8i4e3rv58WQIvuCMD/cNJ7zHXLywTNiHlRqxsD2AXW
|
58 |
+
MzyF2mC6oX/f2B42dHodJurSIcLWMXOQKG5NSfC/lfoMFj4dAPFH9xNpbjQcyNr3RvP0ytk2ASSq
|
59 |
+
zRwchbzDatFgLExnJWorkKy6Gvuq82L+32UDHs7rf/09r5MjM0LPg7aeXGePX+K7MYOG3bN2YNcZ
|
60 |
+
iO9F0Qhxggq2JFJ0if1Z14W/wVgyn7Pa+sEjlNbWjRy36RmBM8pU4Ir17O8NWiBvqI3Co/YGLksv
|
61 |
+
LTZBqm==
|
app/design/frontend/base/default/template/ipay/ipayservice.phtml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPyXvY3k0td3/gYN37HWnbyyoziacHEDIjUYnvTTQtsjuYKnZ+40BL8W1iLErWcc5vfH+H5tA
|
5 |
+
bUKGeVhdEFjhkX4SwScK869ixv3/pZRbtpN6YRGo5TThSVRKNJwHoWV4V0cd0E39Ow5vHfm1gsVX
|
6 |
+
dj/6egHlDQ0pL9WU1GY+Vp9LiY6K5rFpBp+WndIXq5eG9l/y3WDrvlmONQF3nCnb1pSgQlzWxdc3
|
7 |
+
AxnYQnXPVnoqqb9E1ghOX0xcnVVQlBEMWOSh8JGlz72rVCCEW0wFtb+CfFFilGZ+ZtpXv9fnMGmS
|
8 |
+
+rvkG1aQH0YDgWSO4/9S97xS77Tp4udxvgNdeOYrw5EO27oNe3ddy82z9VddGJdBteHcx/921uu8
|
9 |
+
zUEQ6mp5J3ysLPvFt572rka2lLD4pMF9rXU4L7OYrEMZsNiEy/N3754Dl8aRjWa5T6eXr0hZm9Oi
|
10 |
+
L4mzjwWLcPs1iG6o1iT6V0R8TIxA8FF67paH4G6+8q/7taJPazWNlZkf1FklRyj49CSjqBRDEOxf
|
11 |
+
zOJzw7Kidg8BayPLt4E7ZxMfM7hE
|
app/design/frontend/base/default/template/ipay/item.phtml
ADDED
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPsbeXAy517s0g8eHZE5yVQ2LvqMG1GF64T+ntC9p11rsBfMPW3IduzkZFdy4jDnp2Xif4yk6
|
5 |
+
+nIeS4CHTV2GooCM4ZUDrDsrCh+0PGjq2YlLGFw6WRQk20g+Dkal+SF9GZZ0p9O2vSjTE+ZAEIOu
|
6 |
+
5VpGLgvb2hi3vrzOjX2taEZnk46oMp9xHhQRBWXyguF5b9Yb1FxcaQlf93Aif1KrfT8OtNCQkdkx
|
7 |
+
PbBYMwuZ+Gx8jVC8ixBGiox37OAfapcHktL0QpIVCVOahjuElWwFtb+CfFFilGZ+ZtpXvB1jhpyl
|
8 |
+
7LKVeb7UNmZbPmSusmYXuVpLoB+c2Zyo1s9YXgEbeDl1lFSY2ScDrQG/PnfYiRqCMpHszGCsV3iF
|
9 |
+
euSlESzZzIFLgUzhomcicOTiih/ynXrw/COKGicqN8c0/EaQfJ3XN/6IRb8Fus5SoENI2TIjeoVX
|
10 |
+
M3OSJDsJ7zurUUM4Z3yZx+g7sKUMYASqszhX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JIAFo6icLhVJaK+giApKJDHI
|
262 |
+
hODwOnUgChYm2ltvRX4eKUQlU7WSuJ4J7QyBCMnp
|
app/design/frontend/base/default/template/ipay/links.phtml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPrXn3FhCs/JzySUPsNkHkQdZq1eBYAqp6C08EfZQMzuFKURPWn7yvK8sakngRqfPkECueVMc
|
5 |
+
LO4NLUaru0yGVvQIo1EPQFw1WZgpVSF4GQVWMUk2JsX47g/ICRE73HWx6VEtt3RHJSTpZEh6V2cL
|
6 |
+
n0cYLRGvYUmGNlyUP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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cP+xR7LEF9EPaBcc8S94M2lCzJ4mQLHJbNwaxTh/RMyxcgC9iRYuUUw5/GwlksAaNEkxBI161
|
5 |
+
H7kxBA2rP4ArS2esEbcXqa79lsoFll8oqj8lC8K8B2tm0G3QHrn01Bi5WEI6Eby35pysjfA6BnD0
|
6 |
+
qLgfvmDJEqYgCnRAWdX3IJ1avR58lSdSv5hoXH3iga9rxgzfLo83IPQIBT1lAOLZ9gOexYmj8HZr
|
7 |
+
QeJFJ6VlgVJTvs+PmwnXUNj4UtuiGUXTD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sE8SX2sKwPkia6QphvABSYxJQYHbw3oamn3x3Sbjh8abZAeFbIwaN1gUIU3yqrtL16wTgdflBL
|
46 |
+
wQSXD4f7Ifg2Bq8/0aMuz1hExXnVSyBOQ2vLqvvnabPFmgC6tXQA5C0n1ZsuhhRoe0v0H/0=
|
app/design/frontend/base/default/template/ipay/overview.phtml
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPzbzfvuE/XlHhwGolK0qgSpu4GFI6G5wpSIZtiIlSOO4De7DVCD+wrkadtmdNyv20nGsrO4d
|
5 |
+
7k95hE2RpqnBbkQ9jc6YwVOK2hpX1tHao6ArATizwnh9Ja8kvlNP6tm22hNL3J/rbs+guwyp+LUP
|
6 |
+
SA4AVXmTfkwqV2pqol+C6FpCj1qS8mzybZkmZHmzsrFGB8VFTn4mPsje4RyWCerdm54HvYd3PKvO
|
7 |
+
gbORMwV6MLfwii5Yg5kfZyXWTfqkgk0DroXho2chk2QCZIJ/3fOEZzvVZAJpxBq8/ezyuUHmReIu
|
8 |
+
arh9tmZuHoW8JNS7R//meRz1gU+aLoTeHi6yVT01rdJyhvxaXWZf5/zz58rsgX8BHB6GzWvSAuKY
|
9 |
+
6t2hUFNBGaoFZj3rYxhHNZFdBujqvbnMX2E1Rjij6yjNb2YDgSsUEGD7CTiwB2JriS8jDRCpRBJX
|
10 |
+
4Xcbg1D5DNwDJSS1ZYGWNTPEJqh9mEJZsvoIz3ePLIcbSZP9Nq0+LT/he82tePGUf/foSM6V+KpP
|
11 |
+
rN6G1zQ9EDoTL9ncrBjPyaYSNfLcFv/5DXVsK6GgQY4vKl6NI/QJHHbvw63N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cRrJny3t5FeWVOuZirecRMNpkKiJ/m80t
|
151 |
+
4wtv6edSIXx0uSUehwhdSci2UXHZiYBZ4VSWFjajOvE2+JxA+NCrOtFbE2bLEhouy8t691W42KCO
|
152 |
+
tuIarQgBKbPKm8l9TUyl22dOoo4UgDTazXgIqDxqj+IeklGLp0==
|
app/design/frontend/base/default/template/ipay/progress.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
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Oc2sNceTrQzdc7LUrdt8vGba4o/ICAprFFKZXJ1uIvCbo+0plwvMjP2LV1U5VTpXq
|
55 |
+
2Lag8WmW9AQgHAUi8I+GlW==
|
app/design/frontend/base/default/template/ipay/success.phtml
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPuARJukVIB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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php //0046a
|
2 |
+
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file <b>'.__FILE__.'</b> requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation.');exit(199);
|
3 |
+
?>
|
4 |
+
HR+cPmTWFP6HjeMc5DkeicZM2IxxrYs68HtNvzkn7eaeu2R758uZIVCz5x2j+GwThiK1O/L5U9vs
|
5 |
+
tZXyYCkBual3/Afx+1lBFSMylFmnjR3FpjghBk8UthK3cnfmAi3bjH8qerS30MXxC8MGyzMq3y4U
|
6 |
+
kE+xHZwhm9sYX9h0dHgWX49merUk+j7oV9Dnp+qEGT8wMzh0RIKAfnOXrmfvBKD1z7ISPfY4qJ7x
|
7 |
+
qtsiZ6YssElF0sWAqVXKnPSa2Wvz1Gn27LzaZoShZ5FGLWyEfGwFtb+CfFFilGZ+ZtpXv0jm6RW6
|
8 |
+
NAWfZo10pmZLZ0TVoK8l/f4aSoBlWE8YRKKPuFkWprWCvehvPu3gD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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
*
|
5 |
+
* DISCLAIMER *
|
6 |
+
*****************************************/
|
7 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
8 |
+
* versions in the future.
|
9 |
+
*****************************************************
|
10 |
+
* @category Esellers
|
11 |
+
* @package Esellers_Ipay
|
12 |
+
* @copyright Copyright (c) 2010 - 2011 BelVG LLC.
|
13 |
+
|
14 |
+
*/
|
15 |
+
-->
|
16 |
+
<layout version="0.1.0">
|
17 |
+
<default>
|
18 |
+
|
19 |
+
<reference name="right">
|
20 |
+
<block type="ipay/logo" name="ipay.logo" template="ipay/logo.phtml"/>
|
21 |
+
</reference>
|
22 |
+
<reference name="head">
|
23 |
+
<action method="addJs"><script>esellers/ipay.js</script></action>
|
24 |
+
</reference>
|
25 |
+
</default>
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
<checkout_onepage_index>
|
31 |
+
<reference name="checkout.onepage.billing" as="billing">
|
32 |
+
<action method="setTemplate" ifconfig="payment/ipay/active"><template>ipay/billing.phtml</template></action>
|
33 |
+
</reference>
|
34 |
+
<reference name="checkout.onepage.shipping_method.available" as="available">
|
35 |
+
<action method="setTemplate" ifconfig="payment/ipay/active"><template>ipay/available.phtml</template></action>
|
36 |
+
</reference>
|
37 |
+
</checkout_onepage_index>
|
38 |
+
|
39 |
+
|
40 |
+
<checkout_cart_index>
|
41 |
+
<reference name="checkout.cart.methods.onepage">
|
42 |
+
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" as="login" template="checkout/onepage/link.phtml">
|
43 |
+
<action method="setTemplate" ifconfig="payment/ipay/active">
|
44 |
+
<template>ipay/ipay.phtml</template>
|
45 |
+
</action>
|
46 |
+
</block>
|
47 |
+
</reference>
|
48 |
+
</checkout_cart_index>
|
49 |
+
|
50 |
+
<checkout_onepage_shippingmethod>
|
51 |
+
<!-- Mage_Checkout -->
|
52 |
+
<remove name="right"/>
|
53 |
+
<remove name="left"/>
|
54 |
+
<reference name="checkout.onepage.shipping_method.available" as="available">
|
55 |
+
<block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="ipay/available.phtml" ifconfig="payment/ipay/active"/>
|
56 |
+
</reference>
|
57 |
+
</checkout_onepage_shippingmethod>
|
58 |
+
|
59 |
+
<checkout_onepage_success translate="label">
|
60 |
+
<reference name="root">
|
61 |
+
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
|
62 |
+
</reference>
|
63 |
+
<reference name="checkout.onepage.success">
|
64 |
+
<block type="checkout/onepage_success" name="checkout.success" template="ipay/success.phtml" ifconfig="payment/ipay/active"/>
|
65 |
+
</reference>
|
66 |
+
</checkout_onepage_success>
|
67 |
+
|
68 |
+
|
69 |
+
<checkout_onepage_progress>
|
70 |
+
<!-- Mage_Checkout -->
|
71 |
+
<remove name="right"/>
|
72 |
+
<remove name="left"/>
|
73 |
+
|
74 |
+
<reference name="checkout.onepage.progress" as="progress">
|
75 |
+
<block type="checkout/onepage_progress" name="root" output="toHtml" template="ipay/progress.phtml" ifconfig="payment/ipay/active">
|
76 |
+
<block type="checkout/onepage_payment_info" name="payment_info">
|
77 |
+
<action method="setInfoTemplate"><method></method><template></template></action>
|
78 |
+
</block>
|
79 |
+
</block>
|
80 |
+
</reference>
|
81 |
+
</checkout_onepage_progress>
|
82 |
+
|
83 |
+
<checkout_onepage_paymentmethod>
|
84 |
+
<remove name="right"/>
|
85 |
+
<remove name="left"/>
|
86 |
+
|
87 |
+
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="ipay/methods.phtml" ifconfig="payment/ipay/active">
|
88 |
+
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
89 |
+
</block>
|
90 |
+
</checkout_onepage_paymentmethod>
|
91 |
+
|
92 |
+
<checkout_onepage_review translate="label">
|
93 |
+
<label>One Page Checkout Overview</label>
|
94 |
+
<!-- Mage_Checkout -->
|
95 |
+
<remove name="right"/>
|
96 |
+
<remove name="left"/>
|
97 |
+
|
98 |
+
<block type="checkout/onepage_review_info" name="root" output="toHtml" template="ipay/info.phtml" ifconfig="payment/ipay/active">
|
99 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>ipay/item.phtml</template></action>
|
100 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>ipay/item.phtml</template></action>
|
101 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>ipay/item.phtml</template></action>
|
102 |
+
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="ipay/totals.phtml"/>
|
103 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
|
104 |
+
<label>Items Before</label>
|
105 |
+
</block>
|
106 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
|
107 |
+
<label>Items After</label>
|
108 |
+
</block>
|
109 |
+
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
|
110 |
+
<block type="core/template" name="checkout.onepage.review.button" as="button" template="ipay/button.phtml"/>
|
111 |
+
</block>
|
112 |
+
|
113 |
+
</checkout_onepage_review>
|
114 |
+
|
115 |
+
<checkout_multishipping_overview translate="label">
|
116 |
+
<!-- Mage_Checkout -->
|
117 |
+
<reference name="checkout.multishipping.overview">
|
118 |
+
<block type="checkout/multishipping_overview" name="checkout_overview" template="ipay/overview.phtml">
|
119 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/multishipping/item/default.phtml</template></action>
|
120 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/item/default.phtml</template></action>
|
121 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/item/default.phtml</template></action>
|
122 |
+
<action method="addRowItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/multishipping/overview/item.phtml</template></action>
|
123 |
+
<action method="addRowItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/multishipping/overview/item.phtml</template></action>
|
124 |
+
<block type="checkout/multishipping_payment_info" name="payment_info">
|
125 |
+
<action method="setInfoTemplate"><method></method><template></template></action>
|
126 |
+
</block>
|
127 |
+
<block type="checkout/agreements" name="checkout.multishipping.agreements" as="agreements" template="checkout/multishipping/agreements.phtml"/>
|
128 |
+
<block type="checkout/cart_totals" name="totals" />
|
129 |
+
<block type="core/text_list" name="checkout.multishipping.overview.items.after" as="items_after" translate="label">
|
130 |
+
<label>Overview Items After</label>
|
131 |
+
</block>
|
132 |
+
</block>
|
133 |
+
</reference>
|
134 |
+
</checkout_multishipping_overview>
|
135 |
+
|
136 |
+
|
137 |
+
<ipay_payment_review>
|
138 |
+
<label>One Page Checkout Overview</label>
|
139 |
+
<!-- Mage_Checkout -->
|
140 |
+
<remove name="right"/>
|
141 |
+
<remove name="left"/>
|
142 |
+
<reference name="checkout.onepage.review_info" as="review">
|
143 |
+
<block type="checkout/onepage_review_info" name="root" output="toHtml" template="ipay/ipayInfo.phtml" ifconfig="payment/ipay/active">
|
144 |
+
<action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>ipay/item.phtml</template></action>
|
145 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>ipay/item.phtml</template></action>
|
146 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>ipay/item.phtml</template></action>
|
147 |
+
<block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="ipay/totals.phtml"/>
|
148 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before" translate="label">
|
149 |
+
<label>Items Before</label>
|
150 |
+
</block>
|
151 |
+
<block type="core/text_list" name="checkout.onepage.review.info.items.after" as="items_after" translate="label">
|
152 |
+
<label>Items After</label>
|
153 |
+
</block>
|
154 |
+
<block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/>
|
155 |
+
<block type="core/template" name="checkout.onepage.review.button" as="button" template="ipay/button.phtml"/>
|
156 |
+
</block>
|
157 |
+
</reference>
|
158 |
+
|
159 |
+
|
160 |
+
</ipay_payment_review>
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
|
166 |
+
<ipay_payment_index translate="label">
|
167 |
+
<label>IPay Payment</label>
|
168 |
+
<!-- Mage_Catalog -->
|
169 |
+
<reference name="root">
|
170 |
+
<action method="setTemplate"><template>ipay/ipayservice.phtml</template></action>
|
171 |
+
</reference>
|
172 |
+
<reference name="head">
|
173 |
+
<action method="addJs"><script>scriptaculous/scriptaculous.js</script></action>
|
174 |
+
<action method="addJs"><script>varien/product.js</script></action>
|
175 |
+
</reference>
|
176 |
+
<reference name="content">
|
177 |
+
<block type="checkout/cart" name="checkout.cart" template="ipay/cart.phtml" ifconfig="payment/ipay/active">
|
178 |
+
<action method="setCartTemplate"><value>ipay/cart.phtml</value></action>
|
179 |
+
<action method="setEmptyTemplate"><value>checkout/cart/noItems.phtml</value></action>
|
180 |
+
<action method="chooseTemplate"/>
|
181 |
+
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action>
|
182 |
+
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action>
|
183 |
+
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action>
|
184 |
+
|
185 |
+
<block type="page/html_wrapper" name="checkout.cart.form.before" as="form_before" translate="label">
|
186 |
+
<label>Shopping Cart Form Before</label>
|
187 |
+
</block>
|
188 |
+
|
189 |
+
<block type="core/text_list" name="checkout.cart.methods" as="methods" translate="label">
|
190 |
+
<label>Payment Methods After Checkout Button</label>
|
191 |
+
<block type="checkout/onepage_link" name="checkout.cart.methods.onepage" template="checkout/onepage/link.phtml"/>
|
192 |
+
<block type="checkout/multishipping_link" name="checkout.cart.methods.multishipping" template="checkout/multishipping/link.phtml"/>
|
193 |
+
</block>
|
194 |
+
|
195 |
+
<block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>
|
196 |
+
<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>
|
197 |
+
<block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
|
198 |
+
|
199 |
+
<block type="checkout/cart_totals" name="checkout.cart.totals" as="totals" template="checkout/cart/totals.phtml"/>
|
200 |
+
</block>
|
201 |
+
</reference>
|
202 |
+
</ipay_payment_index>
|
203 |
+
</layout>
|
app/design/frontend/default/default/locale/en_US/translate.csv
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
"Keep your eyes open for our special Back to School items and save A LOT!","Keep your eyes open for our special Back to School items and save A LOT!"
|
app/design/frontend/default/default/locale/ko_KR/translate.csv
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Keep your eyes open for our special Back to School items and save A LOT!","Keep your eyes open for our special Back to School items and save A LOT!"
|
2 |
+
"My Account","내 계정"
|
3 |
+
"My Cart","장바구니"
|
4 |
+
"Furniture","가구"
|
5 |
+
"Living Room","주방용품"
|
6 |
+
"Log In","로그인"
|
7 |
+
"You have no items in your shopping cart.","장바구니 내역이 없습니다."
|
8 |
+
"You have no items to compare.","비교할 상품이 없습니다."
|
9 |
+
"Compare Products","상품 비교"
|
10 |
+
"Add to Cart","장바구니담기"
|
11 |
+
"Community Poll","투표하기"
|
12 |
+
"Add to Wishlist","위시리스트 추가"
|
13 |
+
"Add to Compare","비교하기 추가"
|
14 |
+
"My Wishlist","내 위시리스트"
|
15 |
+
"Checkout","체크아웃"
|
16 |
+
"Your Language:","언어"
|
17 |
+
"Privacy Policy","개인정보보호정책"
|
18 |
+
"Popular Tags","인기태그"
|
19 |
+
"Email to a Friend","친구에게 메일보내기"
|
20 |
+
"Be the first to review this product","상품 리뷰 남기기"
|
21 |
+
"Details","상세설명"
|
22 |
+
"Additional Information","추가정보"
|
23 |
+
"Product Tags","상품태그"
|
24 |
+
"Vote","투표하기"
|
25 |
+
"Shoe Size","신발크기"
|
26 |
+
"Add Your Tags:","태그 추가:"
|
27 |
+
"Add Tags","태그입력"
|
28 |
+
"Use spaces to separate tags. Use single quotes (') for phrases.","공백으로 태그 구분,single quote(')로 단어구분"
|
29 |
+
"Qty:","수량:"
|
30 |
+
"Qty","수량"
|
31 |
+
"Quick Overview","개요"
|
32 |
+
"In stock","있음"
|
33 |
+
"Availability:","재고:"
|
34 |
+
"Out of stock","품절"
|
35 |
+
"Double click on above image to view full picture","이미지를 더블클릭하면 상세이미지를 볼 수 있습니다."
|
36 |
+
"More Views","더보기"
|
37 |
+
"Model","모델"
|
38 |
+
"Sort By","정렬기준"
|
39 |
+
"Category","카테고리"
|
40 |
+
"Price","가격"
|
41 |
+
"Color","색상"
|
42 |
+
"Recently Viewed Products","최근 본 상품"
|
43 |
+
"Newsletter","소식지"
|
44 |
+
"Sign Up for Our Newsletter:","소식지 신청 주소"
|
45 |
+
"Subscribe","구독하기"
|
46 |
+
"Manufacturer","제조사"
|
47 |
+
"Brand","브랜드"
|
48 |
+
"Product Name","상품명"
|
49 |
+
"Unit Price","단가"
|
50 |
+
"Subtotal","소계"
|
51 |
+
"Continue Shopping","계속 쇼핑하기"
|
52 |
+
"Clear Shopping Cart","장바구니 지우기"
|
53 |
+
"Update Shopping Cart","장바구니 업데이트"
|
54 |
+
"Grand Total","합계"
|
55 |
+
"Discount Codes","쿠폰등록"
|
56 |
+
"Apply Coupon","쿠폰적용하기"
|
57 |
+
"OR","또는"
|
58 |
+
"Related Products","관련 제품"
|
59 |
+
"Check items to add to the cart or","장바구니에 추가 할 상품 선택 또는"
|
60 |
+
"select all","모두 선택"
|
61 |
+
"%d Review(s)","%d 리뷰"
|
62 |
+
"Add Your Review","당신의 리뷰를 추가하세요"
|
63 |
+
"Shopping Options","쇼핑 옵션"
|
64 |
+
"Shoe Type","신발 타입"
|
65 |
+
"Choose an Option...","옵션을 선택..."
|
66 |
+
"* Required Fields","* 필수 필드"
|
67 |
+
"Name","이름"
|
68 |
+
"per page","페이지"
|
69 |
+
"Living Room","거실"
|
70 |
+
"Megapixels","화소"
|
71 |
+
"Contrast Ratio","명암비"
|
72 |
+
"Create an Account","계정 생성"
|
73 |
+
"Login","로그인"
|
74 |
+
"Email Address","이메일"
|
75 |
+
"Password","비밀번호"
|
76 |
+
"Forgot Your Password?","비밀번호를 잊으셨나요?"
|
77 |
+
"Login or Create an Account","로그인 또는 계정 생성"
|
78 |
+
"Registered Customers","등록된 고객"
|
79 |
+
"New Customers","새 고객"
|
80 |
+
"Shopping Cart is Empty","장바구니가 비어있습니다"
|
81 |
+
"Search","검색"
|
82 |
+
"Search entire store here...","이곳에서 매장 전체 검색..."
|
83 |
+
"Account Information","계정 정보"
|
84 |
+
"Edit Account Information","계정정보 수정"
|
85 |
+
"First Name","이름"
|
86 |
+
"Last Name","성"
|
87 |
+
"Change Password","비밀번호 변경"
|
88 |
+
"Company","회사"
|
89 |
+
"Telephone","전화번호"
|
90 |
+
"Fax","팩스"
|
91 |
+
"City","도시"
|
92 |
+
"State/Province","시/도"
|
93 |
+
"Zip/Postal Code","우편번호"
|
94 |
+
"Country","나라"
|
95 |
+
"Street Address","주소"
|
96 |
+
"Add New Address","새 주소 추가"
|
97 |
+
"Address Book","주소록"
|
98 |
+
"Default Shipping Address","기본 배송지 주소"
|
99 |
+
"Newsletters","소식지"
|
100 |
+
"Contact Information","연락처 정보"
|
101 |
+
"Recent Orders","최근 주문"
|
102 |
+
"Order #","주문 번호"
|
103 |
+
"Date","날짜"
|
104 |
+
"Ship To","받는 사람"
|
105 |
+
"Status","상태"
|
106 |
+
"Order Total","주문 합계"
|
107 |
+
"View Order","주문 보기"
|
108 |
+
"Reorder","재주문"
|
109 |
+
"View All","모두 보기"
|
110 |
+
"Edit","편집"
|
111 |
+
"Manage Addresses","주소 관리"
|
112 |
+
"Default Billing Address","기본 청구서 수신 주소"
|
113 |
+
"Order Status","주문 상태"
|
114 |
+
"You have not set a default billing address.","당신의 기본 청구서 수신 주소가 설정 되지 않았습니다."
|
115 |
+
"You have not set a default shipping address.","당신의 기본 배송지 주소가 설정 되지 않았습니다."
|
116 |
+
"You are currently not subscribed to any newsletter.","당신은 소식지 구독 신청을 하지 않았습니다."
|
117 |
+
"My Downloadable Products","내 다운로드 가능한 상품"
|
118 |
+
"Back","뒤로"
|
119 |
+
"Newsletter Subscription","소식지 구독"
|
120 |
+
"Newsletter Subscriptions","소식지 구독"
|
121 |
+
"Save","저장"
|
122 |
+
"General Subscription","일반 구독"
|
123 |
+
"My Applications","내 응용프로그램"
|
124 |
+
"My Product Reviews","내 상품 리뷰"
|
125 |
+
"Confirm Password","비밀번호 재 입력"
|
126 |
+
"Login Information","로그인 정보"
|
127 |
+
"Personal Information","개인 정보"
|
128 |
+
"Submit","등록"
|
129 |
+
"Sign Up for Newsletter","소식지에 가입"
|
130 |
+
"If you have an account with us, please log in.","당신의 계정이 있다면 로그인 하세요."
|
131 |
+
"%s Item(s)","%s 항목"
|
132 |
+
"Show","보기"
|
133 |
+
"Account Dashboard","계정 대시보드"
|
134 |
+
"My Orders","내 주문"
|
135 |
+
"Recurring Profiles","Recurring Profiles"
|
136 |
+
"My Tags","내 태그"
|
137 |
+
"My Cart (%s item)","내 장바구니(%s 항목)"
|
138 |
+
"My Cart (%s items)","내 장바구니(%s 항목)"
|
139 |
+
"Billing Agreements","계약 결제"
|
140 |
+
"You have not purchased any downloadable products yet.","당신은 아직 다운로드 가능한 상품을 구입하지 않았습니다."
|
141 |
+
"You are currently subscribed to 'General Subscription'.","당신은 현재 '일반 구독'에 가입되어 있습니다."
|
142 |
+
"My Recent Reviews","내 최근 리뷰"
|
143 |
+
"My Dashboard","내 대시보드"
|
144 |
+
"Shipping Address","배송 주소"
|
145 |
+
"Billing Address","청구서 주소"
|
146 |
+
"Payment Method","결제 방법"
|
147 |
+
"Shipping Method","배송 방법"
|
148 |
+
"Track your order","당신의 주문 추적"
|
149 |
+
"Tracking Information","추적 정보"
|
150 |
+
"Close Window","창 닫기"
|
151 |
+
"Tracking Number:","추적 번호:"
|
152 |
+
"Carrier:","배송사:"
|
153 |
+
"Error:","에러"
|
154 |
+
"Order Information","주문 정보"
|
155 |
+
"Order Date:%d","주문 일자:%d"
|
156 |
+
"Print Order","주문 출력"
|
157 |
+
"Log Out","로그 아웃"
|
158 |
+
"Print Shipment","배송 출력"
|
159 |
+
"Track all shipments","모든 배송 추적"
|
160 |
+
"Print All Shipments","모든 배송 출력"
|
161 |
+
"Qty Shipped","배송 수량"
|
162 |
+
"SKU","재고 관리 코드"
|
163 |
+
"Cart Subtotal:","장바구니 합계:"
|
164 |
+
"Last Ordered Items","마지막 주문 항목"
|
165 |
+
"There is %s item in your cart.","장바구니에 %s 항목이 있습니다."
|
166 |
+
"Are you sure you would like to remove this item from the shopping cart?","장바구니목록에서 이 항목을 제거 하시겠습니까?"
|
167 |
+
"Are you sure you would like to remove this item from the compare products?","상품 비교 목록에서 이 항목을 제거 하시겠습니까?"
|
168 |
+
"Recently added item(s)","최근에 추가된 항목(들)"
|
169 |
+
"Screensize","스크린 사이즈"
|
170 |
+
"Dimensions","크기"
|
171 |
+
"In Depth","상세 설명"
|
172 |
+
"Hardrive","하드디스크"
|
173 |
+
"Processor","프로세서"
|
174 |
+
"Memory","메모리"
|
175 |
+
"View All Tags","전체 태그 보기"
|
176 |
+
"Rating:","평가:"
|
177 |
+
"View All Reviews","전체 리뷰 보기"
|
178 |
+
"Edit Address","주소 편집"
|
179 |
+
"Move to Wishlist","위시리스트로 이동"
|
180 |
+
"Move","이동"
|
181 |
+
"Save Address","주소 저장"
|
182 |
+
"Learn More","자세히 보기"
|
183 |
+
"Address","주소"
|
184 |
+
"View Details","자세히 보기"
|
185 |
+
"Activation Information","활성화 정보"
|
186 |
+
"Shopping Cart","장바구니"
|
187 |
+
"Estimate Shipping and Tax", "배송 및 세금 계산"
|
188 |
+
"Enter your destination to get a shipping estimate.","배송지를 입력하세요"
|
189 |
+
"CMS","컨텐츠관리"
|
190 |
+
"Checkout Method", "체크아웃 방법"
|
191 |
+
"Checkout as a Guest or Register", "손님으로 구매하기 / 회원 등록"
|
192 |
+
"Register with us for future convenience:", "회원 가입하시면 다양한 장점이 있습니다.."
|
193 |
+
"Register and save time!","회원 가입하시고 시간을 절약 하세요"
|
194 |
+
"Fast and easy check out", "빠르고 쉬운 결제"
|
195 |
+
"Easy access to your order history and status", "주문내역과 배송상태를 한눈에 확인 할 수 있습니다."
|
196 |
+
"Checkout as Guest","비회원으로 구매하기"
|
197 |
+
"Register","회원가입하기"
|
198 |
+
"Already registered?","등록된 아이디가 있으신가요?"
|
199 |
+
"Please log in below:","이메일주소/비밀번호 입력 후 로그인 하세요"
|
200 |
+
"Forgot your password?","비밀번호를 잊어버리셨나요?"
|
201 |
+
"Billing Information","신청자정보"
|
202 |
+
"Shipping Information","배송정보"
|
203 |
+
"Payment Information","결제정보"
|
204 |
+
"Order Review","주문확인"
|
205 |
+
"Ship to this address", "배송정보 동일"
|
206 |
+
"Ship to different address","배송정보 다름"
|
207 |
+
"Use Billing Address","신청주소 동일"
|
208 |
+
"Based on your selection, you may be interested in the following items:","이 상품을 선택한 사람이 선택한 상품"
|
209 |
+
"Checkout with Multiple Addresses", "여러주소로 결제하기"
|
210 |
+
"Proceed to Checkout","결제하기"
|
211 |
+
"This is a required field.","입력하세요"
|
212 |
+
"Your Checkout Progress","결제진행상황"
|
213 |
+
"Privacy Policy","개인정보 보호정책"
|
214 |
+
"Customer Service","고객관리"
|
215 |
+
"Other people marked this product with these tags:","이 상품에 등록된 태그:"
|
216 |
+
"You may also be interested in the following product(s)","관련상품"
|
217 |
+
"The product %s has been removed from comparison list.","상품 % 은 비교 리스트에서 제거 되었습니다."
|
218 |
+
"Cash on Delivery","착불"
|
app/design/frontend/default/default/template/ipay/billing.phtml
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<form id="co-billing-form" action="">
|
28 |
+
<fieldset>
|
29 |
+
<ul class="form-list">
|
30 |
+
<?php if ($this->customerHasAddresses()): ?>
|
31 |
+
<li class="wide">
|
32 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
33 |
+
<div class="input-box">
|
34 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
35 |
+
</div>
|
36 |
+
</li>
|
37 |
+
<?php endif; ?>
|
38 |
+
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
39 |
+
<fieldset>
|
40 |
+
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
41 |
+
<ul>
|
42 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
43 |
+
<li class="fields">
|
44 |
+
<div class="field">
|
45 |
+
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
46 |
+
<div class="input-box">
|
47 |
+
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
51 |
+
<div class="field">
|
52 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
53 |
+
<div class="input-box">
|
54 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<?php endif; ?>
|
58 |
+
</li>
|
59 |
+
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
60 |
+
<li class="wide">
|
61 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
62 |
+
<div class="input-box">
|
63 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
64 |
+
</div>
|
65 |
+
</li>
|
66 |
+
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
67 |
+
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
68 |
+
<li class="wide">
|
69 |
+
<div class="input-box">
|
70 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
71 |
+
</div>
|
72 |
+
</li>
|
73 |
+
<?php endfor; ?>
|
74 |
+
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
75 |
+
<li class="wide">
|
76 |
+
<label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
|
77 |
+
<div class="input-box">
|
78 |
+
<input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
79 |
+
</div>
|
80 |
+
</li>
|
81 |
+
<?php endif; ?>
|
82 |
+
<li class="fields">
|
83 |
+
<div class="field">
|
84 |
+
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
85 |
+
<div class="input-box">
|
86 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<div class="field">
|
90 |
+
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
91 |
+
<div class="input-box">
|
92 |
+
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
93 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
94 |
+
</select>
|
95 |
+
<script type="text/javascript">
|
96 |
+
//<![CDATA[
|
97 |
+
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
98 |
+
//]]>
|
99 |
+
</script>
|
100 |
+
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
</li>
|
104 |
+
<li class="fields">
|
105 |
+
<div class="field">
|
106 |
+
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
107 |
+
<div class="input-box">
|
108 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
<div class="field">
|
112 |
+
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
113 |
+
<div class="input-box">
|
114 |
+
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
115 |
+
</div>
|
116 |
+
</div>
|
117 |
+
</li>
|
118 |
+
<li class="fields">
|
119 |
+
<div class="field">
|
120 |
+
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
121 |
+
<div class="input-box">
|
122 |
+
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
|
123 |
+
</div>
|
124 |
+
</div>
|
125 |
+
<div class="field">
|
126 |
+
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
127 |
+
<div class="input-box">
|
128 |
+
<input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
</li>
|
132 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
133 |
+
|
134 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
135 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
136 |
+
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
137 |
+
<li class="fields">
|
138 |
+
<?php if ($_dob->isEnabled()): ?>
|
139 |
+
<div class="field">
|
140 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
141 |
+
</div>
|
142 |
+
<?php endif; ?>
|
143 |
+
<?php if ($_gender->isEnabled()): ?>
|
144 |
+
<div class="field">
|
145 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
146 |
+
</div>
|
147 |
+
<?php endif ?>
|
148 |
+
</li>
|
149 |
+
<?php endif ?>
|
150 |
+
|
151 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
152 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
153 |
+
<li>
|
154 |
+
<?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
155 |
+
</li>
|
156 |
+
<?php endif ?>
|
157 |
+
|
158 |
+
<li class="fields" id="register-customer-password">
|
159 |
+
<div class="field">
|
160 |
+
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
161 |
+
<div class="input-box">
|
162 |
+
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
163 |
+
</div>
|
164 |
+
</div>
|
165 |
+
<div class="field">
|
166 |
+
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
167 |
+
<div class="input-box">
|
168 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
</li>
|
172 |
+
<?php endif; ?>
|
173 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
174 |
+
<li class="control">
|
175 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
176 |
+
</li>
|
177 |
+
<?php else:?>
|
178 |
+
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
179 |
+
<?php endif; ?>
|
180 |
+
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
181 |
+
</ul>
|
182 |
+
</fieldset>
|
183 |
+
</li>
|
184 |
+
<?php /* Extensions placeholder */ ?>
|
185 |
+
<?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
|
186 |
+
<?php if ($this->canShip()): ?>
|
187 |
+
<li class="control">
|
188 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
|
189 |
+
<li class="control">
|
190 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
|
191 |
+
</li>
|
192 |
+
<?php endif; ?>
|
193 |
+
</ul>
|
194 |
+
<?php if (!$this->canShip()): ?>
|
195 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
196 |
+
<?php endif; ?>
|
197 |
+
<div class="buttons-set" id="billing-buttons-container">
|
198 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
199 |
+
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
200 |
+
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
201 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
202 |
+
</span>
|
203 |
+
</div>
|
204 |
+
</fieldset>
|
205 |
+
</form>
|
206 |
+
<?php
|
207 |
+
$rStr="index/";
|
208 |
+
foreach($this->getRequest()->getParams() as $key=>$value) {
|
209 |
+
$rStr .= "$key"."/"."$value/";
|
210 |
+
}
|
211 |
+
$rStr = $rStr.substr($rStr,0,strlen($rStr)-1);
|
212 |
+
?>
|
213 |
+
<script type="text/javascript">
|
214 |
+
//<![CDATA[
|
215 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
216 |
+
var billingForm = new VarienForm('co-billing-form');
|
217 |
+
|
218 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
219 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
220 |
+
|
221 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
|
222 |
+
//]]>
|
223 |
+
</script>
|
app/design/frontend/default/default/template/ipay/logo.phtml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$enable_escrow = Mage::getStoreConfig("payment/ipay/escrow_enable");
|
3 |
+
$escrow_img = Mage::getStoreConfig("payment/ipay/escrow");
|
4 |
+
?>
|
5 |
+
<div >
|
6 |
+
<?php if($enable_escrow==1){?>
|
7 |
+
<p align="center"><a href="http://ipay.auction.co.kr/Popup/JoinConfirm2.aspx" target="_ipayLogo"><img src="<?php echo $escrow_img?>"></a></p>
|
8 |
+
<?php }?>
|
9 |
+
|
10 |
+
</div>
|
app/design/frontend/default/default/template/ipay/top.links.phtml
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* esellers LLC.
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the EULA
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://esellers.co.kr/esellers-LICENSE-COMMUNITY.txt
|
11 |
+
*
|
12 |
+
/***************************************
|
13 |
+
* MAGENTO EDITION USAGE NOTICE *
|
14 |
+
*****************************************/
|
15 |
+
/* This package designed for Magento COMMUNITY edition
|
16 |
+
* esellers does not guarantee correct work of this extension
|
17 |
+
* on any other Magento edition except Magento COMMUNITY edition.
|
18 |
+
* esellers does not provide extension support in case of
|
19 |
+
* incorrect edition usage.
|
20 |
+
/***************************************
|
21 |
+
* DISCLAIMER *
|
22 |
+
*****************************************/
|
23 |
+
/* Do not edit or add to this file if you wish to upgrade Magento to newer
|
24 |
+
* versions in the future.
|
25 |
+
*****************************************************
|
26 |
+
* @category Esellers
|
27 |
+
* @package Esellers_Ipay
|
28 |
+
* @copyright Copyright (c) 2010 - 2011 esellers LLC. (http://www.belvg.com)
|
29 |
+
* @license http://esellers.co.kr/esellers-LICENSE-COMMUNITY.txt
|
30 |
+
*/
|
31 |
+
?>
|
32 |
+
|
33 |
+
<?php $_links = $this->getLinks(); ?>
|
34 |
+
<div id="fb-root"></div>
|
35 |
+
<?php if(!Mage::getSingleton('customer/session')->isLoggedIn()):?>
|
36 |
+
<a href="#" onclick="return fblogin();" class="fb_button_ps"><img src="<?php echo $this->helper('ipay/active')->getLoginImg()?>" alt="<?php echo $this->__('Connect with Facebook')?>" /></a>
|
37 |
+
<?php endif?>
|
38 |
+
<?php if(count($_links)>0): ?>
|
39 |
+
<ul class="links"<?php if($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif;?>>
|
40 |
+
<?php foreach($_links as $_link): ?>
|
41 |
+
<li<?php if($_link->getIsFirst()||$_link->getIsLast()): ?> class="<?php if($_link->getIsFirst()): ?>first<?php endif; ?><?php if($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?></a><?php echo $_link->getAfterText() ?></li>
|
42 |
+
<?php endforeach; ?>
|
43 |
+
</ul>
|
44 |
+
<?php endif; ?>
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
|
app/etc/modules/Esellers_Ipay.xml
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Esellers_Ipay>
|
6 |
+
<active>true</active>
|
7 |
+
<codePool>community</codePool>
|
8 |
+
<version>1.0.0</version>
|
9 |
+
<depends>
|
10 |
+
<Mage_Payment />
|
11 |
+
<Mage_Adminhtml />
|
12 |
+
</depends>
|
13 |
+
</Esellers_Ipay>
|
14 |
+
</modules>
|
15 |
+
</config>
|
js/esellers/ipay.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
var submitted = false;
|
3 |
+
|
4 |
+
function showLoader(url,win,para)
|
5 |
+
{
|
6 |
+
if ($('checkout-agreements')) {
|
7 |
+
var checkboxes = $$('#checkout-agreements input');
|
8 |
+
for (var i=0, l=checkboxes.length; i<l; i++) {
|
9 |
+
if (!checkboxes[i].checked) {
|
10 |
+
alert('Please agree to all Terms and Conditions before placing the orders.');
|
11 |
+
return false;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
}
|
15 |
+
|
16 |
+
submitted = true;
|
17 |
+
var step='review';
|
18 |
+
Element.show(step+'-please-wait');
|
19 |
+
$(step+'-buttons-container').setStyle({opacity:.5});
|
20 |
+
$(step+'-buttons-container').descendants().each(function(s) {
|
21 |
+
s.disabled = true;
|
22 |
+
});
|
23 |
+
|
24 |
+
window.open(url,win,para);
|
25 |
+
return true;
|
26 |
+
}
|
lib/Zend/Locale/Data/ko_KR.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" ?>
|
2 |
+
<ldml>
|
3 |
+
<identity>
|
4 |
+
<version number="$Revision: 1.57 $"/>
|
5 |
+
<generation date="$Date: 2009/05/05 23:06:38 $"/>
|
6 |
+
<language type="ko"/>
|
7 |
+
<territory type="KR"/>
|
8 |
+
</identity>
|
9 |
+
</ldml>
|
lib/class.ipay.php
ADDED
@@ -0,0 +1,512 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?
|
2 |
+
|
3 |
+
class auctionSession
|
4 |
+
{
|
5 |
+
private $serverUrl;
|
6 |
+
private $soapAuction;
|
7 |
+
|
8 |
+
public function __construct($serverUrl, $soapAuction)
|
9 |
+
{
|
10 |
+
$this->serverUrl = $serverUrl;
|
11 |
+
$this->soapAuction = $soapAuction;
|
12 |
+
}
|
13 |
+
|
14 |
+
/** sendHttpRequest
|
15 |
+
Sends a HTTP request to the server for this session
|
16 |
+
Input: $requestBody
|
17 |
+
Output: The HTTP Response as a String
|
18 |
+
*/
|
19 |
+
public function sendHttpRequest($requestBody)
|
20 |
+
{
|
21 |
+
//build auction headers using variables passed via constructor
|
22 |
+
$headers = $this->buildAuctionHeaders(strlen($requestBody));
|
23 |
+
|
24 |
+
//initialise a CURL session
|
25 |
+
$connection = curl_init();
|
26 |
+
|
27 |
+
|
28 |
+
//set the server we are using (could be Sandbox or Production server)
|
29 |
+
curl_setopt($connection, CURLOPT_URL, $this->serverUrl);
|
30 |
+
|
31 |
+
//stop CURL from verifying the peer's certificate
|
32 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
|
33 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
|
34 |
+
|
35 |
+
//set the headers using the array of headers
|
36 |
+
curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
|
37 |
+
|
38 |
+
//set method as POST
|
39 |
+
curl_setopt($connection, CURLOPT_POST, 1);
|
40 |
+
|
41 |
+
//set the XML body of the request
|
42 |
+
curl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);
|
43 |
+
|
44 |
+
//set it to return the transfer as a string from curl_exec
|
45 |
+
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
|
46 |
+
|
47 |
+
//Send the Request
|
48 |
+
$response = curl_exec($connection);
|
49 |
+
|
50 |
+
//close the connection
|
51 |
+
curl_close($connection);
|
52 |
+
|
53 |
+
//return the response
|
54 |
+
return $response;
|
55 |
+
}
|
56 |
+
|
57 |
+
private function buildAuctionHeaders($requestBodyLength)
|
58 |
+
{
|
59 |
+
$headers = array (
|
60 |
+
"Content-Type: text/xml; charset=utf-8",
|
61 |
+
"Content-Length: $requestBodyLength",
|
62 |
+
"SOAPAction: $this->soapAuction"
|
63 |
+
);
|
64 |
+
|
65 |
+
return $headers;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
|
69 |
+
class requestCartNo
|
70 |
+
{
|
71 |
+
private $serverUrl = "https://api.auction.co.kr/ArcheSystem/IpayService.asmx"; //실제 운영 서버 주소
|
72 |
+
private $action = "http://www.auction.co.kr/IpayService/Ipay/InsertIpayOrder";
|
73 |
+
private $ticket;
|
74 |
+
|
75 |
+
|
76 |
+
public function __construct($ticket){
|
77 |
+
$this->ticket = $ticket;
|
78 |
+
}
|
79 |
+
|
80 |
+
/*** 서비스를 실행(호출)한다.*/
|
81 |
+
public function doService($orderQuery){
|
82 |
+
|
83 |
+
// Set Request SOAP Message
|
84 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?> ';
|
85 |
+
$requestXmlBody .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ';
|
86 |
+
$requestXmlBody .= ' <soap:Header> ';
|
87 |
+
$requestXmlBody .= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security"> ';
|
88 |
+
$requestXmlBody .= ' <Value>' . $this->ticket . '</Value> ';
|
89 |
+
$requestXmlBody .= ' </EncryptedTicket> ';
|
90 |
+
$requestXmlBody .= ' </soap:Header> ';
|
91 |
+
$requestXmlBody .= ' <soap:Body> ';
|
92 |
+
$requestXmlBody .= ' <InsertIpayOrder xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
93 |
+
$requestXmlBody .= $orderQuery;
|
94 |
+
$requestXmlBody .= '</InsertIpayOrder> ';
|
95 |
+
$requestXmlBody .= '</soap:Body> ';
|
96 |
+
$requestXmlBody .= '</soap:Envelope> ';
|
97 |
+
|
98 |
+
|
99 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
100 |
+
|
101 |
+
|
102 |
+
// Load the XML Document to Print Request SOAP
|
103 |
+
$requestDoc = new DomDocument();
|
104 |
+
$requestDoc->loadXML($requestXmlBody);
|
105 |
+
|
106 |
+
// Print Request SOAP
|
107 |
+
/*echo "<PRE>";
|
108 |
+
echo "<STRONG>* REQUEST SOAP</STRONG><BR>";
|
109 |
+
echo htmlentities ($requestDoc->saveXML());
|
110 |
+
echo "</PRE>";*/
|
111 |
+
|
112 |
+
|
113 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
114 |
+
$session = new auctionSession($this->serverUrl, $this->action);
|
115 |
+
|
116 |
+
//send the request and get response
|
117 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
118 |
+
|
119 |
+
// Process Response
|
120 |
+
return $this->processResponse ($responseXml);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Request SOAP Message를 서버에 요청하고 받아온 Response SOAP Message를 가지고 처리한다.
|
125 |
+
* $responseXml : Response SOAP Message
|
126 |
+
*/
|
127 |
+
private function processResponse($responseXml){
|
128 |
+
|
129 |
+
if(stristr($responseXml, 'HTTP 404') || $responseXml == '') {
|
130 |
+
die('<P>Error sending request');
|
131 |
+
} else {
|
132 |
+
//Xml string is parsed and creates a DOM Document object
|
133 |
+
$responseDoc = new DomDocument();
|
134 |
+
$responseDoc->loadXML($responseXml);
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
+
// Print Response SOAP
|
139 |
+
/*echo "<PRE>";
|
140 |
+
echo "<STRONG>* RESPONSE SOAP</STRONG><BR>";
|
141 |
+
echo "<BR>".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($responseDoc->saveXML(), ENT_NOQUOTES, "UTF-8")) );
|
142 |
+
echo "</PRE>"; */
|
143 |
+
|
144 |
+
|
145 |
+
// Error
|
146 |
+
$eleFaultcode = $responseDoc->getElementsByTagName('faultcode')->item(0);
|
147 |
+
$eleFaultstring = $responseDoc->getElementsByTagName('faultstring')->item(0);
|
148 |
+
$eleResult = $responseDoc->getElementsByTagName('InsertIpayOrderResult')->item(0);
|
149 |
+
|
150 |
+
if ((empty($eleFaultcode)) && (!empty($eleResult)))
|
151 |
+
{
|
152 |
+
return $eleResult->firstChild->nodeValue;
|
153 |
+
}
|
154 |
+
else{
|
155 |
+
$this->processError($eleFaultcode, $eleFaultstring);
|
156 |
+
}
|
157 |
+
}
|
158 |
+
return "";
|
159 |
+
}
|
160 |
+
|
161 |
+
|
162 |
+
/**
|
163 |
+
* 에러 처리를 한다.
|
164 |
+
* $eleFaultcode : 오류 코드 메시지
|
165 |
+
* $eleFaultstring : 오류 메시지
|
166 |
+
*/
|
167 |
+
private function processError($eleFaultcode, $eleFaultstring){
|
168 |
+
if ($eleFaultcode != null) echo "faultcode : ".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($eleFaultcode->nodeValue, ENT_NOQUOTES, "UTF-8")))."<BR>";
|
169 |
+
if ($eleFaultstring != null) echo "faultstring : ".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($eleFaultstring->nodeValue, ENT_NOQUOTES, "UTF-8")))."<BR>";
|
170 |
+
}
|
171 |
+
}
|
172 |
+
|
173 |
+
include_once dirname(__FILE__)."/nusoap.php";
|
174 |
+
include_once dirname(__FILE__)."/func.xml.php";
|
175 |
+
@include_once dirname(__FILE__)."/var.ipay.php";
|
176 |
+
|
177 |
+
class ipay {
|
178 |
+
|
179 |
+
var $items = array(), $pay_price = 0;
|
180 |
+
var $cfg, $mode, $data, $request, $response, $error, $errormsg;
|
181 |
+
var $orderno, $payno, $cartno, $itemno, $sdate, $edate;
|
182 |
+
|
183 |
+
function ipay(){
|
184 |
+
include dirname(__FILE__)."/conf.php";
|
185 |
+
$this->cfg = $cfg[ipay];
|
186 |
+
}
|
187 |
+
|
188 |
+
function reset(){
|
189 |
+
unset($this->orderno); unset($this->payno); unset($this->cartno); unset($this->itemno); unset($this->sdate);
|
190 |
+
unset($this->edate); unset($this->data); unset($this->error); unset($this->errormsg);
|
191 |
+
unset($this->request); unset($this->response);
|
192 |
+
}
|
193 |
+
|
194 |
+
function mksoapheader(){
|
195 |
+
global $client;
|
196 |
+
$client = new soap_client('https://api.auction.co.kr/ArcheSystem/IpayService.asmx?WSDL', true);
|
197 |
+
$err = $client->getError();
|
198 |
+
$header = '<EncryptedTicket xmlns="http://www.auction.co.kr/Security"><Value>'.$this->cfg[ticket].'</Value></EncryptedTicket>';
|
199 |
+
$client->setHeaders($header);
|
200 |
+
}
|
201 |
+
|
202 |
+
function setOrderQueryXml($data){
|
203 |
+
$r_items = array();
|
204 |
+
$goods_price = 0;
|
205 |
+
foreach ($this->items as $item){
|
206 |
+
$goods_price += $item[item_price] * $item[order_qty];
|
207 |
+
$r_items[] = "<IpayServiceItems item_name='$item[item_name]' ipay_itemno='$item[ipay_itemno]' item_option_name='$item[item_option_name]' item_price='$item[item_price]' order_qty='$item[order_qty]' item_url='$item[item_url]' thumbnail_url='$item[thumbnail_url]' partner_code='ESELLERS' />";
|
208 |
+
/*add_shipping_price_jeju='' add_shipping_price_etc=''*/
|
209 |
+
}
|
210 |
+
rsort($r_items);
|
211 |
+
|
212 |
+
$ipay->pay_price = $goods_price + $data[shipping_price];
|
213 |
+
|
214 |
+
/*
|
215 |
+
$shipping_type 배송타입 1 - 무료 , 2 - 착불 , 3 - 선배송료결제
|
216 |
+
(1,2)일때 는 Shipping_price가 0이여 함
|
217 |
+
*/
|
218 |
+
|
219 |
+
if ($data[shipping_price]) $data[shipping_type] = 3;
|
220 |
+
|
221 |
+
if (!$data[back_url]) $data[back_url] = $_SERVER[HTTP_REFERER];
|
222 |
+
if (!$data[service_url]) $data[service_url] = "http://$_SERVER[HTTP_HOST]/ipay/receiveXml.php";
|
223 |
+
if (!$data[redirect_url]) $data[redirect_url] = "http://$_SERVER[HTTP_HOST]/ipay/return.php";
|
224 |
+
if (!$data[move_to_redirect_url]) $data[move_to_redirect_url] = "true";
|
225 |
+
|
226 |
+
$xml = "<ORDER payment_rule='0' pay_price='$ipay->pay_price' shipping_price='$data[shipping_price]' shipping_type='$data[shipping_type]' back_url='$data[back_url]' service_url='$data[service_url]' redirect_url='$data[redirect_url]' is_address_required='false' buyer_name='$data[buyer_name]' buyer_tel_no='$data[buyer_tel_no]' buyer_email='$data[buyer_email]' move_to_redirect_url='$data[move_to_redirect_url]' />
|
227 |
+
<ITEMS>".implode("",$r_items)."</ITEMS>";
|
228 |
+
return $xml;
|
229 |
+
}
|
230 |
+
|
231 |
+
function setparam(){
|
232 |
+
switch ($this->mode){
|
233 |
+
case "GetIpayPaidOrderList":
|
234 |
+
$params = array(
|
235 |
+
'req' => array(
|
236 |
+
'SearchType' => 'OrderNo',
|
237 |
+
'SearchValue' => $this->orderno,
|
238 |
+
)
|
239 |
+
);
|
240 |
+
break;
|
241 |
+
case "GetIpayAccountNumb":
|
242 |
+
$params = array('payNo' => $this->payno);
|
243 |
+
break;
|
244 |
+
case "IpayConfirmReceivingOrder":
|
245 |
+
$params = array(
|
246 |
+
'req' => array(
|
247 |
+
'OrderNo' => $this->orderno,
|
248 |
+
)
|
249 |
+
);
|
250 |
+
break;
|
251 |
+
case "GetIpayOrderConfirm":
|
252 |
+
$params = array('ipayCartNo' => $this->cartno);
|
253 |
+
break;
|
254 |
+
case "GetIpayReturnList":
|
255 |
+
$params = array(
|
256 |
+
'req' => array(
|
257 |
+
'SearchFlags' => 'All',
|
258 |
+
'SearchType' => 'None',
|
259 |
+
'SearchDateType'=> 'None',
|
260 |
+
'PageSize' => 100,
|
261 |
+
)
|
262 |
+
);
|
263 |
+
break;
|
264 |
+
case "GetIpayExchangeRequestList":
|
265 |
+
$params = array(
|
266 |
+
'req' => array(
|
267 |
+
'PageNumber' => '1',
|
268 |
+
)
|
269 |
+
);
|
270 |
+
break;
|
271 |
+
case "":
|
272 |
+
$params = array(
|
273 |
+
'ipayCartNo' => $this->cartno,
|
274 |
+
'ipayItemNo' => $this->itemno,
|
275 |
+
);
|
276 |
+
break;
|
277 |
+
}
|
278 |
+
return array($params);
|
279 |
+
}
|
280 |
+
|
281 |
+
function exec($mode,$params=''){
|
282 |
+
|
283 |
+
global $client;
|
284 |
+
$this->mode = $mode;
|
285 |
+
|
286 |
+
$this->mksoapheader();
|
287 |
+
if (!$params) $params = $this->setparam();
|
288 |
+
|
289 |
+
//debug($params);
|
290 |
+
|
291 |
+
$result = $client->call($this->mode, $params);
|
292 |
+
//debug($client->request);
|
293 |
+
//debug($client->response);
|
294 |
+
|
295 |
+
$this->request = $client->request;
|
296 |
+
$this->response = $client->response;
|
297 |
+
|
298 |
+
preg_match("/<\?xml(.*?)<\/soap:Envelope>/s",$client->response,$match);
|
299 |
+
$ret = xml2array($match[0]);
|
300 |
+
|
301 |
+
//debug($ret);
|
302 |
+
switch ($this->mode){
|
303 |
+
case "GetIpayPaidOrderList":
|
304 |
+
$data = $ret["soap:Envelope"]["soap:Body"]["GetIpayPaidOrderListResponse"]["GetIpayPaidOrderListResult"]["GetOrderListResponseT_attr"];
|
305 |
+
if ($data[DistPostNo]) $data[DistPostNo] = substr($data[DistPostNo],0,3)."-".substr($data[DistPostNo],3);
|
306 |
+
break;
|
307 |
+
case "GetIpayReturnList":
|
308 |
+
$loop = $ret["soap:Envelope"]["soap:Body"][$this->mode."Response"][$this->mode."Result"]["ReturnList"];
|
309 |
+
foreach ($loop as $k=>$v){
|
310 |
+
if (strpos($k,"_attr")!==false){
|
311 |
+
$key = str_replace("_attr","",$k);
|
312 |
+
$loop[$key] = array_merge($loop[$key],$v);
|
313 |
+
unset($loop[$k]);
|
314 |
+
}
|
315 |
+
}
|
316 |
+
$data = $loop;
|
317 |
+
|
318 |
+
//debug($data);
|
319 |
+
break;
|
320 |
+
case "GetIpayExchangeRequestList":
|
321 |
+
$loop = $ret["soap:Envelope"]["soap:Body"][$this->mode."Response"][$this->mode."Result"];
|
322 |
+
$data = $loop;
|
323 |
+
break;
|
324 |
+
/*
|
325 |
+
case "GetIpayOrderConfirm":
|
326 |
+
$data = $ret["soap:Envelope"]["soap:Body"][$this->mode."Response"][$this->mode."Result"];
|
327 |
+
break;
|
328 |
+
*/
|
329 |
+
default:
|
330 |
+
$data = $ret["soap:Envelope"]["soap:Body"][$this->mode."Response"][$this->mode."Result_attr"];
|
331 |
+
break;
|
332 |
+
}
|
333 |
+
$err = $ret["soap:Envelope"]["soap:Body"]["soap:Fault"];
|
334 |
+
|
335 |
+
if ($this->mode=="IpayDenySell" && $data[DenySellResponseType]=="Fail") $err[faultstring] = "error";
|
336 |
+
if ($err){
|
337 |
+
$this->data = array();
|
338 |
+
$this->error = 1;
|
339 |
+
$this->errormsg = $err[faultstring];
|
340 |
+
} else {
|
341 |
+
$this->data = $data;
|
342 |
+
$this->error = 0;
|
343 |
+
}
|
344 |
+
}
|
345 |
+
|
346 |
+
function getOrderInfo($payno){
|
347 |
+
$this->reset();
|
348 |
+
$this->payno = $payno;
|
349 |
+
$this->exec("GetIpayAccountNumb");
|
350 |
+
return $this->data;
|
351 |
+
}
|
352 |
+
|
353 |
+
function getOrderItemInfo($orderno){
|
354 |
+
$this->reset();
|
355 |
+
$this->orderno = $orderno;
|
356 |
+
$this->exec("GetIpayPaidOrderList");
|
357 |
+
return $this->data;
|
358 |
+
}
|
359 |
+
|
360 |
+
function getReturnList(){
|
361 |
+
$this->reset();
|
362 |
+
$this->exec("GetIpayReturnList");
|
363 |
+
return $this->data;
|
364 |
+
}
|
365 |
+
|
366 |
+
function getExchangeList(){
|
367 |
+
$this->reset();
|
368 |
+
$this->exec("GetIpayExchangeRequestList");
|
369 |
+
return $this->data;
|
370 |
+
}
|
371 |
+
|
372 |
+
function getOrderData($payno){
|
373 |
+
$r_orderno = array();
|
374 |
+
$data = $this->getOrderInfo($payno);
|
375 |
+
$r_orderno = explode("@",$data[AuctionOrderNos]);
|
376 |
+
$r_orderno = array_notnull($r_orderno);
|
377 |
+
$data[items] = array();
|
378 |
+
foreach ($r_orderno as $orderno){
|
379 |
+
$data[items][] = $this->getOrderItemInfo($orderno);
|
380 |
+
}
|
381 |
+
return $data;
|
382 |
+
}
|
383 |
+
|
384 |
+
function confirmOrder($orderno){
|
385 |
+
$this->reset();
|
386 |
+
$this->orderno = $orderno;
|
387 |
+
$this->exec("IpayConfirmReceivingOrder");
|
388 |
+
//return $this->data;
|
389 |
+
return 1-$this->error;
|
390 |
+
}
|
391 |
+
|
392 |
+
function shippingOrder($orderno,$shippingcomp,$shippingcode){
|
393 |
+
global $r_shippingcomp;
|
394 |
+
$this->reset();
|
395 |
+
$params = array(
|
396 |
+
'req' => array(
|
397 |
+
'SellerID' => $this->cfg[sellerid],
|
398 |
+
'OrderNo' => $orderno,
|
399 |
+
'RemittanceMethod' => array(
|
400 |
+
'RemittanceMethodType' => 'Emoney',
|
401 |
+
'RemittanceAccountName' => '',
|
402 |
+
'RemittanceAccountNumber' => '',
|
403 |
+
'RemittanceBankCode' => '',
|
404 |
+
),
|
405 |
+
'ShippingMethod' => array(
|
406 |
+
'SendDate' => date("Y-m-d"),
|
407 |
+
'InvoiceNo' => $shippingcode,
|
408 |
+
'MessageForBuyer' => '',
|
409 |
+
'ShippingMethodClassficationType' => 'Door2Door',
|
410 |
+
'DeliveryAgency' => $shippingcomp,
|
411 |
+
'DeliveryAgencyName' => $r_shippingcomp[$shippingcomp],
|
412 |
+
'ShippingEtcMethod' => 'Nothing',
|
413 |
+
'ShippingEtcAgencyName' => '',
|
414 |
+
),
|
415 |
+
),
|
416 |
+
);
|
417 |
+
$this->exec("DoIpayShippingGeneral",array($params));
|
418 |
+
return 1-$this->error;
|
419 |
+
}
|
420 |
+
|
421 |
+
function cancelOrder($orderno,$itemno){
|
422 |
+
$this->reset();
|
423 |
+
$params = array(
|
424 |
+
'req' => array(
|
425 |
+
'SellerID' => $this->cfg[sellerid],
|
426 |
+
'ItemID' => $itemno,
|
427 |
+
'OrderNo' => $orderno,
|
428 |
+
'DenySellReason' => 'RunOutOfStock',
|
429 |
+
),
|
430 |
+
);
|
431 |
+
$this->exec("IpayDenySell",array($params));
|
432 |
+
return 1-$this->error;
|
433 |
+
}
|
434 |
+
|
435 |
+
/*
|
436 |
+
|
437 |
+
function isConfirmedOrder($cartno){
|
438 |
+
$this->reset();
|
439 |
+
$this->cartno = $cartno;
|
440 |
+
$this->exec("GetIpayOrderConfirm");
|
441 |
+
return $this->data;
|
442 |
+
}
|
443 |
+
|
444 |
+
### 옥션주문정보추출
|
445 |
+
function GetIpayPaidOrderList($auctionordno){
|
446 |
+
|
447 |
+
global $client;
|
448 |
+
$this->mksoapheader();
|
449 |
+
|
450 |
+
$params = array(
|
451 |
+
'req' => array(
|
452 |
+
'SearchType' => 'OrderNo',
|
453 |
+
'SearchValue' => $auctionordno,
|
454 |
+
)
|
455 |
+
);
|
456 |
+
$params = array($params);
|
457 |
+
|
458 |
+
$result = $client->call('GetIpayPaidOrderList', $params);
|
459 |
+
//debug(str_replace(">",">\r\n",$client->request));
|
460 |
+
//debug(str_replace(">",">\r\n",$client->response));
|
461 |
+
|
462 |
+
preg_match("/<\?xml(.*?)<\/soap:Envelope>/s",$client->response,$match);
|
463 |
+
$ret = xml2array($match[0]);
|
464 |
+
|
465 |
+
$data = $ret["soap:Envelope"]["soap:Body"]["GetIpayPaidOrderListResponse"]["GetIpayPaidOrderListResult"]["GetOrderListResponseT_attr"];
|
466 |
+
$data[DistPostNo] = substr($data[DistPostNo],0,3)."-".substr($data[DistPostNo],3);
|
467 |
+
return $data;
|
468 |
+
}
|
469 |
+
|
470 |
+
function GetIpayAccountNumb($payno){
|
471 |
+
global $client;
|
472 |
+
$this->mksoapheader();
|
473 |
+
|
474 |
+
$params = array(
|
475 |
+
'payNo' => $payno,
|
476 |
+
);
|
477 |
+
$params = array($params);
|
478 |
+
|
479 |
+
$result = $client->call('GetIpayAccountNumb', $params);
|
480 |
+
//debug(str_replace(">",">\r\n",$client->request));
|
481 |
+
//debug(str_replace(">",">\r\n",$client->response));
|
482 |
+
|
483 |
+
preg_match("/<\?xml(.*?)<\/soap:Envelope>/s",$client->response,$match);
|
484 |
+
$ret = xml2array($match[0]);
|
485 |
+
|
486 |
+
$data = $ret["soap:Envelope"]["soap:Body"]["GetIpayAccountNumbResponse"]["GetIpayAccountNumbResult_attr"];
|
487 |
+
return $data;
|
488 |
+
}
|
489 |
+
|
490 |
+
*/
|
491 |
+
|
492 |
+
}
|
493 |
+
|
494 |
+
### 배열 null 제거 함수
|
495 |
+
if (!function_exists('array_notnull')) {
|
496 |
+
function array_notnull($arr){
|
497 |
+
if (!is_array($arr)) return;
|
498 |
+
foreach ($arr as $k=>$v) if (!$v) unset($arr[$k]);
|
499 |
+
return $arr;
|
500 |
+
}
|
501 |
+
}
|
502 |
+
|
503 |
+
### 배열/클래스 출력 함수
|
504 |
+
if (!function_exists('debug')) {
|
505 |
+
function debug($data){
|
506 |
+
print "<div style='background:#000000;color:#00ff00;padding:10px;text-align:left'><xmp style=\"font:8pt 'Courier New'\">";
|
507 |
+
print_r($data);
|
508 |
+
print "</xmp></div>";
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
?>
|
lib/func.xml.php
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?
|
2 |
+
|
3 |
+
function xml2array($contents, $get_attributes=1, $priority = 'tag') {
|
4 |
+
if(!$contents) return array();
|
5 |
+
|
6 |
+
if(!function_exists('xml_parser_create')) {
|
7 |
+
//print "'xml_parser_create()' function not found!";
|
8 |
+
return array();
|
9 |
+
}
|
10 |
+
|
11 |
+
//Get the XML parser of PHP - PHP must have this module for the parser to work
|
12 |
+
$parser = xml_parser_create('');
|
13 |
+
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
|
14 |
+
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
|
15 |
+
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
|
16 |
+
xml_parse_into_struct($parser, trim($contents), $xml_values);
|
17 |
+
xml_parser_free($parser);
|
18 |
+
|
19 |
+
if(!$xml_values) return;//Hmm...
|
20 |
+
|
21 |
+
//Initializations
|
22 |
+
$xml_array = array();
|
23 |
+
$parents = array();
|
24 |
+
$opened_tags = array();
|
25 |
+
$arr = array();
|
26 |
+
|
27 |
+
$current = &$xml_array; //Refference
|
28 |
+
|
29 |
+
//Go through the tags.
|
30 |
+
$repeated_tag_index = array();//Multiple tags with same name will be turned into an array
|
31 |
+
foreach($xml_values as $data) {
|
32 |
+
unset($attributes,$value);//Remove existing values, or there will be trouble
|
33 |
+
|
34 |
+
//This command will extract these variables into the foreach scope
|
35 |
+
// tag(string), type(string), level(int), attributes(array).
|
36 |
+
extract($data);//We could use the array by itself, but this cooler.
|
37 |
+
|
38 |
+
$result = array();
|
39 |
+
$attributes_data = array();
|
40 |
+
|
41 |
+
if(isset($value)) {
|
42 |
+
if($priority == 'tag') $result = $value;
|
43 |
+
else $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode
|
44 |
+
}
|
45 |
+
|
46 |
+
//Set the attributes too.
|
47 |
+
if(isset($attributes) and $get_attributes) {
|
48 |
+
foreach($attributes as $attr => $val) {
|
49 |
+
if($priority == 'tag') $attributes_data[$attr] = $val;
|
50 |
+
else $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
//See tag status and do the needed.
|
55 |
+
if($type == "open") {//The starting of the tag '<tag>'
|
56 |
+
$parent[$level-1] = &$current;
|
57 |
+
if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
|
58 |
+
$current[$tag] = $result;
|
59 |
+
if($attributes_data) $current[$tag. '_attr'] = $attributes_data;
|
60 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
61 |
+
|
62 |
+
$current = &$current[$tag];
|
63 |
+
|
64 |
+
} else { //There was another element with the same tag name
|
65 |
+
|
66 |
+
if(isset($current[$tag][0])) {//If there is a 0th element it is already an array
|
67 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
68 |
+
$repeated_tag_index[$tag.'_'.$level]++;
|
69 |
+
} else {//This section will make the value an array if multiple tags with the same name appear together
|
70 |
+
$current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array
|
71 |
+
$repeated_tag_index[$tag.'_'.$level] = 2;
|
72 |
+
|
73 |
+
if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
74 |
+
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
75 |
+
unset($current[$tag.'_attr']);
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
$last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;
|
80 |
+
$current = &$current[$tag][$last_item_index];
|
81 |
+
}
|
82 |
+
|
83 |
+
} elseif($type == "complete") { //Tags that ends in 1 line '<tag />'
|
84 |
+
//See if the key is already taken.
|
85 |
+
if(!isset($current[$tag])) { //New Key
|
86 |
+
$current[$tag] = $result;
|
87 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
88 |
+
if($priority == 'tag' and $attributes_data) $current[$tag. '_attr'] = $attributes_data;
|
89 |
+
|
90 |
+
} else { //If taken, put all things inside a list(array)
|
91 |
+
if(isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...
|
92 |
+
|
93 |
+
// ...push the new element into that array.
|
94 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
95 |
+
|
96 |
+
if($priority == 'tag' and $get_attributes and $attributes_data) {
|
97 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
98 |
+
}
|
99 |
+
$repeated_tag_index[$tag.'_'.$level]++;
|
100 |
+
|
101 |
+
} else { //If it is not an array...
|
102 |
+
$current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
|
103 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
104 |
+
if($priority == 'tag' and $get_attributes) {
|
105 |
+
if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
106 |
+
|
107 |
+
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
108 |
+
unset($current[$tag.'_attr']);
|
109 |
+
}
|
110 |
+
|
111 |
+
if($attributes_data) {
|
112 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
113 |
+
}
|
114 |
+
}
|
115 |
+
$repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
} elseif($type == 'close') { //End of tag '</tag>'
|
120 |
+
$current = &$parent[$level-1];
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
return($xml_array);
|
125 |
+
}
|
126 |
+
|
127 |
+
?><html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
|
128 |
+
<!--[if gte mso 9]><xml>
|
129 |
+
<mso:CustomDocumentProperties>
|
130 |
+
<mso:_dlc_DocId msdt:dt="string">HEAU3ZUFWW6Z-50-268</mso:_dlc_DocId>
|
131 |
+
<mso:_dlc_DocIdItemGuid msdt:dt="string">b15ae2f8-e4ef-4dd6-aa4d-4999ac17974f</mso:_dlc_DocIdItemGuid>
|
132 |
+
<mso:_dlc_DocIdUrl msdt:dt="string">http://hq/sites/Team/Hosting/_layouts/DocIdRedir.aspx?ID=HEAU3ZUFWW6Z-50-268, HEAU3ZUFWW6Z-50-268</mso:_dlc_DocIdUrl>
|
133 |
+
</mso:CustomDocumentProperties>
|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0)
|
8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category design
|
22 |
+
* @package base_default
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
+
*/
|
26 |
+
?>
|
27 |
+
<?php
|
28 |
+
class ipaySession
|
29 |
+
{
|
30 |
+
private $serverUrl;
|
31 |
+
private $soapAuction;
|
32 |
+
|
33 |
+
public function __construct($serverUrl, $soapAuction)
|
34 |
+
{
|
35 |
+
$this->serverUrl = $serverUrl;
|
36 |
+
$this->soapAuction = $soapAuction;
|
37 |
+
}
|
38 |
+
|
39 |
+
/** sendHttpRequest
|
40 |
+
Sends a HTTP request to the server for this session
|
41 |
+
Input: $requestBody
|
42 |
+
Output: The HTTP Response as a String
|
43 |
+
*/
|
44 |
+
public function sendHttpRequest($requestBody)
|
45 |
+
{
|
46 |
+
//build auction headers using variables passed via constructor
|
47 |
+
$headers = $this->buildAuctionHeaders(strlen($requestBody));
|
48 |
+
|
49 |
+
//initialise a CURL session
|
50 |
+
$connection = curl_init();
|
51 |
+
|
52 |
+
|
53 |
+
//set the server we are using (could be Sandbox or Production server)
|
54 |
+
curl_setopt($connection, CURLOPT_URL, $this->serverUrl);
|
55 |
+
|
56 |
+
//stop CURL from verifying the peer's certificate
|
57 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
|
58 |
+
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
|
59 |
+
|
60 |
+
//set the headers using the array of headers
|
61 |
+
curl_setopt($connection, CURLOPT_HTTPHEADER, $headers);
|
62 |
+
|
63 |
+
//set method as POST
|
64 |
+
curl_setopt($connection, CURLOPT_POST, 1);
|
65 |
+
|
66 |
+
//set the XML body of the request
|
67 |
+
curl_setopt($connection, CURLOPT_POSTFIELDS, $requestBody);
|
68 |
+
|
69 |
+
//set it to return the transfer as a string from curl_exec
|
70 |
+
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
|
71 |
+
|
72 |
+
//Send the Request
|
73 |
+
$response = curl_exec($connection);
|
74 |
+
|
75 |
+
//close the connection
|
76 |
+
curl_close($connection);
|
77 |
+
|
78 |
+
//return the response
|
79 |
+
return $response;
|
80 |
+
}
|
81 |
+
|
82 |
+
private function buildAuctionHeaders($requestBodyLength)
|
83 |
+
{
|
84 |
+
$headers = array (
|
85 |
+
"Content-Type: text/xml; charset=utf-8",
|
86 |
+
"Content-Length: $requestBodyLength",
|
87 |
+
"SOAPAction: $this->soapAuction"
|
88 |
+
);
|
89 |
+
|
90 |
+
return $headers;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
/*
|
94 |
+
* requestOrderNo
|
95 |
+
* 상품정보를 전달하고 발급된 카트번호를 요청합니다.
|
96 |
+
* http://www.auction.co.kr/IpayService/Ipay/InsertIpayOrder
|
97 |
+
* 서비스 문의시에 Request SOAP과 Response SOAP을 보내주시면 됩니다.
|
98 |
+
* 옥션 API 개발자 커뮤니티 : http://api.auction.co.kr/developer
|
99 |
+
*/
|
100 |
+
class requestOrderNo
|
101 |
+
{
|
102 |
+
private $serverUrl = "https://api.auction.co.kr/ArcheSystem/IpayService.asmx"; //실제 운영 서버 주소
|
103 |
+
private $action = "http://www.auction.co.kr/IpayService/Ipay/IpayDenySell";
|
104 |
+
private $ticket;
|
105 |
+
private $auction_id;
|
106 |
+
|
107 |
+
|
108 |
+
public function __construct($ticket,$auction_id){
|
109 |
+
$this->ticket = $ticket;
|
110 |
+
$this->auction_id = $auction_id;
|
111 |
+
}
|
112 |
+
|
113 |
+
public function xml2array($contents, $get_attributes=1, $priority = 'tag') {
|
114 |
+
if(!$contents) return array();
|
115 |
+
|
116 |
+
if(!function_exists('xml_parser_create')) {
|
117 |
+
//print "'xml_parser_create()' function not found!";
|
118 |
+
return array();
|
119 |
+
}
|
120 |
+
|
121 |
+
//Get the XML parser of PHP - PHP must have this module for the parser to work
|
122 |
+
$parser = xml_parser_create('');
|
123 |
+
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
|
124 |
+
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
|
125 |
+
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
|
126 |
+
xml_parse_into_struct($parser, trim($contents), $xml_values);
|
127 |
+
xml_parser_free($parser);
|
128 |
+
|
129 |
+
if(!$xml_values) return;//Hmm...
|
130 |
+
|
131 |
+
//Initializations
|
132 |
+
$xml_array = array();
|
133 |
+
$parents = array();
|
134 |
+
$opened_tags = array();
|
135 |
+
$arr = array();
|
136 |
+
|
137 |
+
$current = &$xml_array; //Refference
|
138 |
+
|
139 |
+
//Go through the tags.
|
140 |
+
$repeated_tag_index = array();//Multiple tags with same name will be turned into an array
|
141 |
+
foreach($xml_values as $data) {
|
142 |
+
unset($attributes,$value);//Remove existing values, or there will be trouble
|
143 |
+
|
144 |
+
//This command will extract these variables into the foreach scope
|
145 |
+
// tag(string), type(string), level(int), attributes(array).
|
146 |
+
extract($data);//We could use the array by itself, but this cooler.
|
147 |
+
|
148 |
+
$result = array();
|
149 |
+
$attributes_data = array();
|
150 |
+
|
151 |
+
if(isset($value)) {
|
152 |
+
if($priority == 'tag') $result = $value;
|
153 |
+
else $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode
|
154 |
+
}
|
155 |
+
|
156 |
+
//Set the attributes too.
|
157 |
+
if(isset($attributes) and $get_attributes) {
|
158 |
+
foreach($attributes as $attr => $val) {
|
159 |
+
if($priority == 'tag') $attributes_data[$attr] = $val;
|
160 |
+
else $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
//See tag status and do the needed.
|
165 |
+
if($type == "open") {//The starting of the tag '<tag>'
|
166 |
+
$parent[$level-1] = &$current;
|
167 |
+
if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
|
168 |
+
$current[$tag] = $result;
|
169 |
+
if($attributes_data) $current[$tag. '_attr'] = $attributes_data;
|
170 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
171 |
+
|
172 |
+
$current = &$current[$tag];
|
173 |
+
|
174 |
+
} else { //There was another element with the same tag name
|
175 |
+
|
176 |
+
if(isset($current[$tag][0])) {//If there is a 0th element it is already an array
|
177 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
178 |
+
$repeated_tag_index[$tag.'_'.$level]++;
|
179 |
+
} else {//This section will make the value an array if multiple tags with the same name appear together
|
180 |
+
$current[$tag] = array($current[$tag],$result);//This will combine the existing item and the new item together to make an array
|
181 |
+
$repeated_tag_index[$tag.'_'.$level] = 2;
|
182 |
+
|
183 |
+
if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
184 |
+
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
185 |
+
unset($current[$tag.'_attr']);
|
186 |
+
}
|
187 |
+
|
188 |
+
}
|
189 |
+
$last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;
|
190 |
+
$current = &$current[$tag][$last_item_index];
|
191 |
+
}
|
192 |
+
|
193 |
+
} elseif($type == "complete") { //Tags that ends in 1 line '<tag />'
|
194 |
+
//See if the key is already taken.
|
195 |
+
if(!isset($current[$tag])) { //New Key
|
196 |
+
$current[$tag] = $result;
|
197 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
198 |
+
if($priority == 'tag' and $attributes_data) $current[$tag. '_attr'] = $attributes_data;
|
199 |
+
|
200 |
+
} else { //If taken, put all things inside a list(array)
|
201 |
+
if(isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...
|
202 |
+
|
203 |
+
// ...push the new element into that array.
|
204 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;
|
205 |
+
|
206 |
+
if($priority == 'tag' and $get_attributes and $attributes_data) {
|
207 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
208 |
+
}
|
209 |
+
$repeated_tag_index[$tag.'_'.$level]++;
|
210 |
+
|
211 |
+
} else { //If it is not an array...
|
212 |
+
$current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value
|
213 |
+
$repeated_tag_index[$tag.'_'.$level] = 1;
|
214 |
+
if($priority == 'tag' and $get_attributes) {
|
215 |
+
if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well
|
216 |
+
|
217 |
+
$current[$tag]['0_attr'] = $current[$tag.'_attr'];
|
218 |
+
unset($current[$tag.'_attr']);
|
219 |
+
}
|
220 |
+
|
221 |
+
if($attributes_data) {
|
222 |
+
$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
$repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
} elseif($type == 'close') { //End of tag '</tag>'
|
230 |
+
$current = &$parent[$level-1];
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
return($xml_array);
|
235 |
+
}
|
236 |
+
|
237 |
+
//결제정보수신
|
238 |
+
public function getPayInfo($ticket,$payno){
|
239 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?>';
|
240 |
+
$requestXmlBody .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
|
241 |
+
$requestXmlBody .= '<soap:Header>';
|
242 |
+
$requestXmlBody .= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security">';
|
243 |
+
$requestXmlBody .= ' <Value>'.$ticket.'</Value>';
|
244 |
+
$requestXmlBody .= ' </EncryptedTicket>';
|
245 |
+
$requestXmlBody .= '</soap:Header>';
|
246 |
+
$requestXmlBody .= '<soap:Body>';
|
247 |
+
$requestXmlBody .= ' <GetIpayAccountNumb xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
248 |
+
$requestXmlBody .= ' <payNo>'.$payno.'</payNo>';
|
249 |
+
$requestXmlBody .= '</GetIpayAccountNumb>';
|
250 |
+
$requestXmlBody .= '</soap:Body>';
|
251 |
+
$requestXmlBody .= '</soap:Envelope>';
|
252 |
+
|
253 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
254 |
+
|
255 |
+
|
256 |
+
// Load the XML Document to Print Request SOAP
|
257 |
+
$requestDoc = new DomDocument();
|
258 |
+
$requestDoc->loadXML($requestXmlBody);
|
259 |
+
|
260 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
261 |
+
$session = new ipaySession($this->serverUrl, "http://www.auction.co.kr/IpayService/Ipay/GetIpayAccountNumb");
|
262 |
+
|
263 |
+
//send the request and get response
|
264 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
265 |
+
|
266 |
+
Mage::log("requestXmlBody:".$requestXmlBody);
|
267 |
+
Mage::log("responseXml :".$responseXml);
|
268 |
+
|
269 |
+
|
270 |
+
// Process Response
|
271 |
+
return $this->xml2array($responseXml);
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
|
276 |
+
//주문취소요청
|
277 |
+
public function doCancel($itemid,$orderno){
|
278 |
+
$requestXmlBody= '<?xml version="1.0" encoding="utf-8"?>' ;
|
279 |
+
$requestXmlBody.= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
|
280 |
+
$requestXmlBody.= ' <soap:Header>';
|
281 |
+
$requestXmlBody.= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security">';
|
282 |
+
$requestXmlBody.= ' <Value>'.$this->ticket.'</Value>';
|
283 |
+
$requestXmlBody.= ' </EncryptedTicket>';
|
284 |
+
$requestXmlBody.= ' </soap:Header>';
|
285 |
+
$requestXmlBody.= ' <soap:Body>';
|
286 |
+
$requestXmlBody.= ' <IpayDenySell xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
287 |
+
$requestXmlBody.= ' <req SellerID="'.$this->auction_id.'" ItemID="'.$itemid.'" OrderNo="'.$orderno.'" DenySellReason="OtherReason" />';
|
288 |
+
$requestXmlBody.= ' </IpayDenySell>';
|
289 |
+
$requestXmlBody.= ' </soap:Body>';
|
290 |
+
$requestXmlBody.= ' </soap:Envelope>';
|
291 |
+
|
292 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
293 |
+
// Load the XML Document to Print Request SOAP
|
294 |
+
$requestDoc = new DomDocument();
|
295 |
+
$requestDoc->loadXML($requestXmlBody);
|
296 |
+
|
297 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
298 |
+
$session = new ipaySession($this->serverUrl, $this->action);
|
299 |
+
|
300 |
+
//send the request and get response
|
301 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
302 |
+
Mage::log("requestXmlBodyCancel:".$requestXmlBody);
|
303 |
+
Mage::log("responseXmlCancel :".$responseXml);
|
304 |
+
|
305 |
+
// Process Response
|
306 |
+
return $this->processResponse ($responseXml);
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
//*** 발주확인하기*/
|
311 |
+
public function doPlaceOrder($orderno){
|
312 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?>';
|
313 |
+
$requestXmlBody .= '<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">';
|
314 |
+
$requestXmlBody .= '<soap12:Header>';
|
315 |
+
$requestXmlBody .= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security">';
|
316 |
+
$requestXmlBody .= ' <Value>'.$this->ticket.'</Value>';
|
317 |
+
$requestXmlBody .= ' </EncryptedTicket>';
|
318 |
+
$requestXmlBody .= '</soap12:Header>';
|
319 |
+
$requestXmlBody .= '<soap12:Body>';
|
320 |
+
$requestXmlBody .= '<IpayConfirmReceivingOrder xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
321 |
+
$requestXmlBody .= '<req OrderNo="'.$orderno.'" />';
|
322 |
+
$requestXmlBody .= '</IpayConfirmReceivingOrder>';
|
323 |
+
$requestXmlBody .= '</soap12:Body>';
|
324 |
+
$requestXmlBody .= '</soap12:Envelope>';
|
325 |
+
|
326 |
+
|
327 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
328 |
+
|
329 |
+
|
330 |
+
// Load the XML Document to Print Request SOAP
|
331 |
+
$requestDoc = new DomDocument();
|
332 |
+
$requestDoc->loadXML($requestXmlBody);
|
333 |
+
|
334 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
335 |
+
$session = new ipaySession($this->serverUrl, "http://www.auction.co.kr/IpayService/Ipay/IpayConfirmReceivingOrder");
|
336 |
+
|
337 |
+
//send the request and get response
|
338 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
339 |
+
|
340 |
+
Mage::log("requestXmlBodyInvoice:".$requestXmlBody);
|
341 |
+
Mage::log("responseXmlInvoice :".$responseXml);
|
342 |
+
|
343 |
+
// Process Response
|
344 |
+
return $this->processResponse ($responseXml);
|
345 |
+
}
|
346 |
+
|
347 |
+
//*** 배송하기*/
|
348 |
+
public function doShipment($orderno,$invoiceno,$carriercode){
|
349 |
+
$shipcompany = new Esellers_Ipay_Model_System_Config_Source_Company();
|
350 |
+
$shiparr = $shipcompany->toArray();
|
351 |
+
//$company_code = Mage::getStoreConfig("payment/ipay/shipcompany");
|
352 |
+
|
353 |
+
$company_name = iconv("UTF-8","EUC-KR",$shiparr[$carriercode]);
|
354 |
+
|
355 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?>';
|
356 |
+
$requestXmlBody .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
|
357 |
+
$requestXmlBody .= ' <soap:Header>';
|
358 |
+
$requestXmlBody .= '<EncryptedTicket xmlns="http://www.auction.co.kr/Security">';
|
359 |
+
$requestXmlBody .= '<Value>'.$this->ticket.'</Value>';
|
360 |
+
$requestXmlBody .= '</EncryptedTicket>';
|
361 |
+
$requestXmlBody .= '</soap:Header>';
|
362 |
+
$requestXmlBody .= '<soap:Body>';
|
363 |
+
$requestXmlBody .= '<DoIpayShippingGeneral xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
364 |
+
$requestXmlBody .= '<req SellerID="'.$this->auction_id.'" OrderNo="'.$orderno.'">';
|
365 |
+
$requestXmlBody .= '<RemittanceMethod RemittanceMethodType="Emoney" RemittanceAccountName="" RemittanceAccountNumber="" RemittanceBankCode="" xmlns="http://schema.auction.co.kr/Arche.API.xsd" />';
|
366 |
+
$requestXmlBody .= '<ShippingMethod SendDate="'.date("Y-m-d").'" InvoiceNo="'.$invoiceno.'" MessageForBuyer="" ShippingMethodClassficationType="Door2Door" DeliveryAgency="'.$carriercode.'" DeliveryAgencyName="'.iconv("UTF-8", "EUC-KR",$company_name).'" ShippingEtcMethod="Nothing" ShippingEtcAgencyName="" xmlns="http://schema.auction.co.kr/Arche.API.xsd" />';
|
367 |
+
$requestXmlBody .= '</req>';
|
368 |
+
$requestXmlBody .= '</DoIpayShippingGeneral>';
|
369 |
+
$requestXmlBody .= '</soap:Body>';
|
370 |
+
$requestXmlBody .= '</soap:Envelope>';
|
371 |
+
|
372 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
373 |
+
|
374 |
+
|
375 |
+
// Load the XML Document to Print Request SOAP
|
376 |
+
$requestDoc = new DomDocument();
|
377 |
+
$requestDoc->loadXML($requestXmlBody);
|
378 |
+
|
379 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
380 |
+
$session = new ipaySession($this->serverUrl, "http://www.auction.co.kr/IpayService/Ipay/DoIpayShippingGeneral");
|
381 |
+
|
382 |
+
//send the request and get response
|
383 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
384 |
+
|
385 |
+
Mage::log("requestXmlBodyShipment:".$requestXmlBody);
|
386 |
+
Mage::log("responseXmlShipment :".$responseXml);
|
387 |
+
|
388 |
+
// Process Response
|
389 |
+
return $this->processResponse ($responseXml);
|
390 |
+
}
|
391 |
+
|
392 |
+
/*** 서비스를 실행(호출)한다.*/
|
393 |
+
public function doService($orderQuery){
|
394 |
+
|
395 |
+
// Set Request SOAP Message
|
396 |
+
$requestXmlBody = '<?xml version="1.0" encoding="utf-8"?> ';
|
397 |
+
$requestXmlBody .= '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ';
|
398 |
+
$requestXmlBody .= ' <soap:Header> ';
|
399 |
+
$requestXmlBody .= ' <EncryptedTicket xmlns="http://www.auction.co.kr/Security"> ';
|
400 |
+
$requestXmlBody .= ' <Value>' . $this->ticket . '</Value> ';
|
401 |
+
$requestXmlBody .= ' </EncryptedTicket> ';
|
402 |
+
$requestXmlBody .= ' </soap:Header> ';
|
403 |
+
$requestXmlBody .= ' <soap:Body> ';
|
404 |
+
$requestXmlBody .= ' <InsertIpayOrder xmlns="http://www.auction.co.kr/IpayService/Ipay">';
|
405 |
+
$requestXmlBody .= $orderQuery;
|
406 |
+
$requestXmlBody .= '</InsertIpayOrder> ';
|
407 |
+
$requestXmlBody .= '</soap:Body> ';
|
408 |
+
$requestXmlBody .= '</soap:Envelope> ';
|
409 |
+
|
410 |
+
|
411 |
+
$requestXmlBody = str_replace("&", "&", $requestXmlBody);
|
412 |
+
|
413 |
+
|
414 |
+
// Load the XML Document to Print Request SOAP
|
415 |
+
$requestDoc = new DomDocument();
|
416 |
+
$requestDoc->loadXML($requestXmlBody);
|
417 |
+
|
418 |
+
//Create a new auction session with all details pulled in from included auctionSession.php
|
419 |
+
$session = new ipaySession($this->serverUrl, $this->action);
|
420 |
+
|
421 |
+
//send the request and get response
|
422 |
+
$responseXml = $session->sendHttpRequest($requestXmlBody);
|
423 |
+
|
424 |
+
// Process Response
|
425 |
+
return $this->processResponse ($responseXml);
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* Request SOAP Message를 서버에 요청하고 받아온 Response SOAP Message를 가지고 처리한다.
|
430 |
+
* $responseXml : Response SOAP Message
|
431 |
+
*/
|
432 |
+
private function processResponse($responseXml){
|
433 |
+
|
434 |
+
if(stristr($responseXml, 'HTTP 404') || $responseXml == '') {
|
435 |
+
die('<P>$responseXml Error sending request');
|
436 |
+
} else {
|
437 |
+
//Xml string is parsed and creates a DOM Document object
|
438 |
+
$responseDoc = new DomDocument();
|
439 |
+
$responseDoc->loadXML($responseXml);
|
440 |
+
|
441 |
+
|
442 |
+
// Error
|
443 |
+
$eleFaultcode = $responseDoc->getElementsByTagName('faultcode')->item(0);
|
444 |
+
$eleFaultstring = $responseDoc->getElementsByTagName('faultstring')->item(0);
|
445 |
+
$eleResult = $responseDoc->getElementsByTagName('InsertIpayOrderResult')->item(0);
|
446 |
+
|
447 |
+
if ((empty($eleFaultcode)) && (!empty($eleResult)))
|
448 |
+
{
|
449 |
+
return $eleResult->firstChild->nodeValue;
|
450 |
+
}
|
451 |
+
else{
|
452 |
+
$this->processError($eleFaultcode, $eleFaultstring);
|
453 |
+
}
|
454 |
+
}
|
455 |
+
return "";
|
456 |
+
}
|
457 |
+
|
458 |
+
|
459 |
+
/**
|
460 |
+
* 에러 처리를 한다.
|
461 |
+
* $eleFaultcode : 오류 코드 메시지
|
462 |
+
* $eleFaultstring : 오류 메시지
|
463 |
+
*/
|
464 |
+
private function processError($eleFaultcode, $eleFaultstring){
|
465 |
+
if ($eleFaultcode != null) Mage::log( htmlentities ($eleFaultcode->nodeValue, ENT_NOQUOTES, "UTF-8"));
|
466 |
+
if ($eleFaultstring != null) Mage::log("faultstring : ".iconv("UTF-8", "EUC-KR", urldecode (htmlentities ($eleFaultstring->nodeValue, ENT_NOQUOTES, "UTF-8"))));
|
467 |
+
}
|
468 |
+
}
|
469 |
+
?>
|
lib/nusoap.php
ADDED
@@ -0,0 +1,6800 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
$Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
5 |
+
|
6 |
+
NuSOAP - Web Services Toolkit for PHP
|
7 |
+
|
8 |
+
Copyright (c) 2002 NuSphere Corporation
|
9 |
+
|
10 |
+
This library is free software; you can redistribute it and/or
|
11 |
+
modify it under the terms of the GNU Lesser General Public
|
12 |
+
License as published by the Free Software Foundation; either
|
13 |
+
version 2.1 of the License, or (at your option) any later version.
|
14 |
+
|
15 |
+
This library is distributed in the hope that it will be useful,
|
16 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
18 |
+
Lesser General Public License for more details.
|
19 |
+
|
20 |
+
You should have received a copy of the GNU Lesser General Public
|
21 |
+
License along with this library; if not, write to the Free Software
|
22 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23 |
+
|
24 |
+
If you have any questions or comments, please email:
|
25 |
+
|
26 |
+
Dietrich Ayala
|
27 |
+
dietrich@ganx4.com
|
28 |
+
http://dietrich.ganx4.com/nusoap
|
29 |
+
|
30 |
+
NuSphere Corporation
|
31 |
+
http://www.nusphere.com
|
32 |
+
|
33 |
+
*/
|
34 |
+
|
35 |
+
/* load classes
|
36 |
+
|
37 |
+
// necessary classes
|
38 |
+
require_once('class.soap_client.php');
|
39 |
+
require_once('class.soap_val.php');
|
40 |
+
require_once('class.soap_parser.php');
|
41 |
+
require_once('class.soap_fault.php');
|
42 |
+
|
43 |
+
// transport classes
|
44 |
+
require_once('class.soap_transport_http.php');
|
45 |
+
|
46 |
+
// optional add-on classes
|
47 |
+
require_once('class.xmlschema.php');
|
48 |
+
require_once('class.wsdl.php');
|
49 |
+
|
50 |
+
// server class
|
51 |
+
require_once('class.soap_server.php');*/
|
52 |
+
|
53 |
+
// class variable emulation
|
54 |
+
// cf. http://www.webkreator.com/php/techniques/php-static-class-variables.html
|
55 |
+
$GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 9;
|
56 |
+
|
57 |
+
/**
|
58 |
+
*
|
59 |
+
* nusoap_base
|
60 |
+
*
|
61 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
62 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
63 |
+
* @access public
|
64 |
+
*/
|
65 |
+
class nusoap_base {
|
66 |
+
/**
|
67 |
+
* Identification for HTTP headers.
|
68 |
+
*
|
69 |
+
* @var string
|
70 |
+
* @access private
|
71 |
+
*/
|
72 |
+
var $title = 'NuSOAP';
|
73 |
+
/**
|
74 |
+
* Version for HTTP headers.
|
75 |
+
*
|
76 |
+
* @var string
|
77 |
+
* @access private
|
78 |
+
*/
|
79 |
+
var $version = '0.7.2';
|
80 |
+
/**
|
81 |
+
* CVS revision for HTTP headers.
|
82 |
+
*
|
83 |
+
* @var string
|
84 |
+
* @access private
|
85 |
+
*/
|
86 |
+
var $revision = '$Revision: 1.2 $';
|
87 |
+
/**
|
88 |
+
* Current error string (manipulated by getError/setError)
|
89 |
+
*
|
90 |
+
* @var string
|
91 |
+
* @access private
|
92 |
+
*/
|
93 |
+
var $error_str = '';
|
94 |
+
/**
|
95 |
+
* Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)
|
96 |
+
*
|
97 |
+
* @var string
|
98 |
+
* @access private
|
99 |
+
*/
|
100 |
+
var $debug_str = '';
|
101 |
+
/**
|
102 |
+
* toggles automatic encoding of special characters as entities
|
103 |
+
* (should always be true, I think)
|
104 |
+
*
|
105 |
+
* @var boolean
|
106 |
+
* @access private
|
107 |
+
*/
|
108 |
+
var $charencoding = true;
|
109 |
+
/**
|
110 |
+
* the debug level for this instance
|
111 |
+
*
|
112 |
+
* @var integer
|
113 |
+
* @access private
|
114 |
+
*/
|
115 |
+
var $debugLevel;
|
116 |
+
|
117 |
+
/**
|
118 |
+
* set schema version
|
119 |
+
*
|
120 |
+
* @var string
|
121 |
+
* @access public
|
122 |
+
*/
|
123 |
+
var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema';
|
124 |
+
|
125 |
+
/**
|
126 |
+
* charset encoding for outgoing messages
|
127 |
+
*
|
128 |
+
* @var string
|
129 |
+
* @access public
|
130 |
+
*/
|
131 |
+
//var $soap_defencoding = 'ISO-8859-1';
|
132 |
+
var $soap_defencoding = 'UTF-8';
|
133 |
+
|
134 |
+
/**
|
135 |
+
* namespaces in an array of prefix => uri
|
136 |
+
*
|
137 |
+
* this is "seeded" by a set of constants, but it may be altered by code
|
138 |
+
*
|
139 |
+
* @var array
|
140 |
+
* @access public
|
141 |
+
*/
|
142 |
+
var $namespaces = array(
|
143 |
+
'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/',
|
144 |
+
'xsd' => 'http://www.w3.org/2001/XMLSchema',
|
145 |
+
'xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
146 |
+
'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/'
|
147 |
+
);
|
148 |
+
|
149 |
+
/**
|
150 |
+
* namespaces used in the current context, e.g. during serialization
|
151 |
+
*
|
152 |
+
* @var array
|
153 |
+
* @access private
|
154 |
+
*/
|
155 |
+
var $usedNamespaces = array();
|
156 |
+
|
157 |
+
/**
|
158 |
+
* XML Schema types in an array of uri => (array of xml type => php type)
|
159 |
+
* is this legacy yet?
|
160 |
+
* no, this is used by the xmlschema class to verify type => namespace mappings.
|
161 |
+
* @var array
|
162 |
+
* @access public
|
163 |
+
*/
|
164 |
+
var $typemap = array(
|
165 |
+
'http://www.w3.org/2001/XMLSchema' => array(
|
166 |
+
'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double',
|
167 |
+
'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'',
|
168 |
+
'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string',
|
169 |
+
// abstract "any" types
|
170 |
+
'anyType'=>'string','anySimpleType'=>'string',
|
171 |
+
// derived datatypes
|
172 |
+
'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'',
|
173 |
+
'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer',
|
174 |
+
'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer',
|
175 |
+
'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''),
|
176 |
+
'http://www.w3.org/2000/10/XMLSchema' => array(
|
177 |
+
'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double',
|
178 |
+
'float'=>'double','dateTime'=>'string',
|
179 |
+
'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
|
180 |
+
'http://www.w3.org/1999/XMLSchema' => array(
|
181 |
+
'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double',
|
182 |
+
'float'=>'double','dateTime'=>'string',
|
183 |
+
'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
|
184 |
+
'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'),
|
185 |
+
'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'),
|
186 |
+
'http://xml.apache.org/xml-soap' => array('Map')
|
187 |
+
);
|
188 |
+
|
189 |
+
/**
|
190 |
+
* XML entities to convert
|
191 |
+
*
|
192 |
+
* @var array
|
193 |
+
* @access public
|
194 |
+
* @deprecated
|
195 |
+
* @see expandEntities
|
196 |
+
*/
|
197 |
+
var $xmlEntities = array('quot' => '"','amp' => '&',
|
198 |
+
'lt' => '<','gt' => '>','apos' => "'");
|
199 |
+
|
200 |
+
/**
|
201 |
+
* constructor
|
202 |
+
*
|
203 |
+
* @access public
|
204 |
+
*/
|
205 |
+
function nusoap_base() {
|
206 |
+
$this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel;
|
207 |
+
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* gets the global debug level, which applies to future instances
|
211 |
+
*
|
212 |
+
* @return integer Debug level 0-9, where 0 turns off
|
213 |
+
* @access public
|
214 |
+
*/
|
215 |
+
function getGlobalDebugLevel() {
|
216 |
+
return $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* sets the global debug level, which applies to future instances
|
221 |
+
*
|
222 |
+
* @param int $level Debug level 0-9, where 0 turns off
|
223 |
+
* @access public
|
224 |
+
*/
|
225 |
+
function setGlobalDebugLevel($level) {
|
226 |
+
$GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = $level;
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* gets the debug level for this instance
|
231 |
+
*
|
232 |
+
* @return int Debug level 0-9, where 0 turns off
|
233 |
+
* @access public
|
234 |
+
*/
|
235 |
+
function getDebugLevel() {
|
236 |
+
return $this->debugLevel;
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* sets the debug level for this instance
|
241 |
+
*
|
242 |
+
* @param int $level Debug level 0-9, where 0 turns off
|
243 |
+
* @access public
|
244 |
+
*/
|
245 |
+
function setDebugLevel($level) {
|
246 |
+
$this->debugLevel = $level;
|
247 |
+
}
|
248 |
+
|
249 |
+
|
250 |
+
/**
|
251 |
+
* clears the current debug data for this instance
|
252 |
+
*
|
253 |
+
* @access public
|
254 |
+
*/
|
255 |
+
function clearDebug() {
|
256 |
+
// it would be nice to use a memory stream here to use
|
257 |
+
// memory more efficiently
|
258 |
+
$this->debug_str = '';
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* gets the current debug data for this instance
|
263 |
+
*
|
264 |
+
* @return debug data
|
265 |
+
* @access public
|
266 |
+
*/
|
267 |
+
function &getDebug() {
|
268 |
+
// it would be nice to use a memory stream here to use
|
269 |
+
// memory more efficiently
|
270 |
+
return $this->debug_str;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* gets the current debug data for this instance as an XML comment
|
275 |
+
* this may change the contents of the debug data
|
276 |
+
*
|
277 |
+
* @return debug data as an XML comment
|
278 |
+
* @access public
|
279 |
+
*/
|
280 |
+
function &getDebugAsXMLComment() {
|
281 |
+
// it would be nice to use a memory stream here to use
|
282 |
+
// memory more efficiently
|
283 |
+
while (strpos($this->debug_str, '--')) {
|
284 |
+
$this->debug_str = str_replace('--', '- -', $this->debug_str);
|
285 |
+
}
|
286 |
+
return "<!--\n" . $this->debug_str . "\n-->";
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* expands entities, e.g. changes '<' to '<'.
|
291 |
+
*
|
292 |
+
* @param string $val The string in which to expand entities.
|
293 |
+
* @access private
|
294 |
+
*/
|
295 |
+
function expandEntities($val) {
|
296 |
+
if ($this->charencoding) {
|
297 |
+
$val = str_replace('&', '&', $val);
|
298 |
+
$val = str_replace("'", ''', $val);
|
299 |
+
$val = str_replace('"', '"', $val);
|
300 |
+
$val = str_replace('<', '<', $val);
|
301 |
+
$val = str_replace('>', '>', $val);
|
302 |
+
}
|
303 |
+
return $val;
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* returns error string if present
|
308 |
+
*
|
309 |
+
* @return mixed error string or false
|
310 |
+
* @access public
|
311 |
+
*/
|
312 |
+
function getError(){
|
313 |
+
if($this->error_str != ''){
|
314 |
+
return $this->error_str;
|
315 |
+
}
|
316 |
+
return false;
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* sets error string
|
321 |
+
*
|
322 |
+
* @return boolean $string error string
|
323 |
+
* @access private
|
324 |
+
*/
|
325 |
+
function setError($str){
|
326 |
+
$this->error_str = $str;
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* detect if array is a simple array or a struct (associative array)
|
331 |
+
*
|
332 |
+
* @param mixed $val The PHP array
|
333 |
+
* @return string (arraySimple|arrayStruct)
|
334 |
+
* @access private
|
335 |
+
*/
|
336 |
+
function isArraySimpleOrStruct($val) {
|
337 |
+
$keyList = array_keys($val);
|
338 |
+
foreach ($keyList as $keyListValue) {
|
339 |
+
if (!is_int($keyListValue)) {
|
340 |
+
return 'arrayStruct';
|
341 |
+
}
|
342 |
+
}
|
343 |
+
return 'arraySimple';
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* serializes PHP values in accordance w/ section 5. Type information is
|
348 |
+
* not serialized if $use == 'literal'.
|
349 |
+
*
|
350 |
+
* @param mixed $val The value to serialize
|
351 |
+
* @param string $name The name (local part) of the XML element
|
352 |
+
* @param string $type The XML schema type (local part) for the element
|
353 |
+
* @param string $name_ns The namespace for the name of the XML element
|
354 |
+
* @param string $type_ns The namespace for the type of the element
|
355 |
+
* @param array $attributes The attributes to serialize as name=>value pairs
|
356 |
+
* @param string $use The WSDL "use" (encoded|literal)
|
357 |
+
* @return string The serialized element, possibly with child elements
|
358 |
+
* @access public
|
359 |
+
*/
|
360 |
+
function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded'){
|
361 |
+
|
362 |
+
if(is_object($val) && get_class($val) == 'soapval'){
|
363 |
+
return $val->serialize($use);
|
364 |
+
}
|
365 |
+
// force valid name if necessary
|
366 |
+
if (is_numeric($name)) {
|
367 |
+
$name = '__numeric_' . $name;
|
368 |
+
} elseif (! $name) {
|
369 |
+
$name = 'noname';
|
370 |
+
}
|
371 |
+
// if name has ns, add ns prefix to name
|
372 |
+
$xmlns = '';
|
373 |
+
if($name_ns){
|
374 |
+
$prefix = 'nu'.rand(1000,9999);
|
375 |
+
$name = $prefix.':'.$name;
|
376 |
+
$xmlns .= " xmlns:$prefix=\"$name_ns\"";
|
377 |
+
}
|
378 |
+
// if type is prefixed, create type prefix
|
379 |
+
if($type_ns != '' && $type_ns == $this->namespaces['xsd']){
|
380 |
+
// need to fix this. shouldn't default to xsd if no ns specified
|
381 |
+
// w/o checking against typemap
|
382 |
+
$type_prefix = 'xsd';
|
383 |
+
} elseif($type_ns){
|
384 |
+
$type_prefix = 'ns'.rand(1000,9999);
|
385 |
+
$xmlns .= " xmlns:$type_prefix=\"$type_ns\"";
|
386 |
+
}
|
387 |
+
// serialize attributes if present
|
388 |
+
$atts = '';
|
389 |
+
if($attributes){
|
390 |
+
foreach($attributes as $k => $v){
|
391 |
+
$atts .= " $k=\"".$this->expandEntities($v).'"';
|
392 |
+
}
|
393 |
+
}
|
394 |
+
// serialize null value
|
395 |
+
if (is_null($val)) {
|
396 |
+
if ($use == 'literal') {
|
397 |
+
// TODO: depends on minOccurs
|
398 |
+
return "<$name$xmlns $atts/>";
|
399 |
+
} else {
|
400 |
+
if (isset($type) && isset($type_prefix)) {
|
401 |
+
$type_str = " xsi:type=\"$type_prefix:$type\"";
|
402 |
+
} else {
|
403 |
+
$type_str = '';
|
404 |
+
}
|
405 |
+
return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>";
|
406 |
+
}
|
407 |
+
}
|
408 |
+
// serialize if an xsd built-in primitive type
|
409 |
+
if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){
|
410 |
+
if (is_bool($val)) {
|
411 |
+
if ($type == 'boolean') {
|
412 |
+
$val = $val ? 'true' : 'false';
|
413 |
+
} elseif (! $val) {
|
414 |
+
$val = 0;
|
415 |
+
}
|
416 |
+
} else if (is_string($val)) {
|
417 |
+
$val = $this->expandEntities($val);
|
418 |
+
}
|
419 |
+
if ($use == 'literal') {
|
420 |
+
return "<$name$xmlns $atts>$val</$name>";
|
421 |
+
} else {
|
422 |
+
return "<$name$xmlns $atts xsi:type=\"xsd:$type\">$val</$name>";
|
423 |
+
}
|
424 |
+
}
|
425 |
+
// detect type and serialize
|
426 |
+
$xml = '';
|
427 |
+
switch(true) {
|
428 |
+
case (is_bool($val) || $type == 'boolean'):
|
429 |
+
if ($type == 'boolean') {
|
430 |
+
$val = $val ? 'true' : 'false';
|
431 |
+
} elseif (! $val) {
|
432 |
+
$val = 0;
|
433 |
+
}
|
434 |
+
if ($use == 'literal') {
|
435 |
+
$xml .= "<$name$xmlns $atts>$val</$name>";
|
436 |
+
} else {
|
437 |
+
$xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val</$name>";
|
438 |
+
}
|
439 |
+
break;
|
440 |
+
case (is_int($val) || is_long($val) || $type == 'int'):
|
441 |
+
if ($use == 'literal') {
|
442 |
+
$xml .= "<$name$xmlns $atts>$val</$name>";
|
443 |
+
} else {
|
444 |
+
$xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val</$name>";
|
445 |
+
}
|
446 |
+
break;
|
447 |
+
case (is_float($val)|| is_double($val) || $type == 'float'):
|
448 |
+
if ($use == 'literal') {
|
449 |
+
$xml .= "<$name$xmlns $atts>$val</$name>";
|
450 |
+
} else {
|
451 |
+
$xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val</$name>";
|
452 |
+
}
|
453 |
+
break;
|
454 |
+
case (is_string($val) || $type == 'string'):
|
455 |
+
$val = $this->expandEntities($val);
|
456 |
+
if ($use == 'literal') {
|
457 |
+
$xml .= "<$name$xmlns $atts>$val</$name>";
|
458 |
+
} else {
|
459 |
+
$xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val</$name>";
|
460 |
+
}
|
461 |
+
break;
|
462 |
+
case is_object($val):
|
463 |
+
if (! $name) {
|
464 |
+
$name = get_class($val);
|
465 |
+
} else {
|
466 |
+
}
|
467 |
+
foreach(get_object_vars($val) as $k => $v){
|
468 |
+
$pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use);
|
469 |
+
}
|
470 |
+
$xml .= '<'.$name.'>'.$pXml.'</'.$name.'>';
|
471 |
+
break;
|
472 |
+
break;
|
473 |
+
case (is_array($val) || $type):
|
474 |
+
// detect if struct or array
|
475 |
+
$valueType = $this->isArraySimpleOrStruct($val);
|
476 |
+
if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){
|
477 |
+
$i = 0;
|
478 |
+
if(is_array($val) && count($val)> 0){
|
479 |
+
foreach($val as $v){
|
480 |
+
if(is_object($v) && get_class($v) == 'soapval'){
|
481 |
+
$tt_ns = $v->type_ns;
|
482 |
+
$tt = $v->type;
|
483 |
+
} elseif (is_array($v)) {
|
484 |
+
$tt = $this->isArraySimpleOrStruct($v);
|
485 |
+
} else {
|
486 |
+
$tt = gettype($v);
|
487 |
+
}
|
488 |
+
$array_types[$tt] = 1;
|
489 |
+
// TODO: for literal, the name should be $name
|
490 |
+
$xml .= $this->serialize_val($v,'item',false,false,false,false,$use);
|
491 |
+
++$i;
|
492 |
+
}
|
493 |
+
if(count($array_types) > 1){
|
494 |
+
$array_typename = 'xsd:anyType';
|
495 |
+
} elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) {
|
496 |
+
if ($tt == 'integer') {
|
497 |
+
$tt = 'int';
|
498 |
+
}
|
499 |
+
$array_typename = 'xsd:'.$tt;
|
500 |
+
} elseif(isset($tt) && $tt == 'arraySimple'){
|
501 |
+
$array_typename = 'SOAP-ENC:Array';
|
502 |
+
} elseif(isset($tt) && $tt == 'arrayStruct'){
|
503 |
+
$array_typename = 'unnamed_struct_use_soapval';
|
504 |
+
} else {
|
505 |
+
// if type is prefixed, create type prefix
|
506 |
+
if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){
|
507 |
+
$array_typename = 'xsd:' . $tt;
|
508 |
+
} elseif ($tt_ns) {
|
509 |
+
$tt_prefix = 'ns' . rand(1000, 9999);
|
510 |
+
$array_typename = "$tt_prefix:$tt";
|
511 |
+
$xmlns .= " xmlns:$tt_prefix=\"$tt_ns\"";
|
512 |
+
} else {
|
513 |
+
$array_typename = $tt;
|
514 |
+
}
|
515 |
+
}
|
516 |
+
$array_type = $i;
|
517 |
+
if ($use == 'literal') {
|
518 |
+
$type_str = '';
|
519 |
+
} else if (isset($type) && isset($type_prefix)) {
|
520 |
+
$type_str = " xsi:type=\"$type_prefix:$type\"";
|
521 |
+
} else {
|
522 |
+
$type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\"";
|
523 |
+
}
|
524 |
+
// empty array
|
525 |
+
} else {
|
526 |
+
if ($use == 'literal') {
|
527 |
+
$type_str = '';
|
528 |
+
} else if (isset($type) && isset($type_prefix)) {
|
529 |
+
$type_str = " xsi:type=\"$type_prefix:$type\"";
|
530 |
+
} else {
|
531 |
+
$type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\"";
|
532 |
+
}
|
533 |
+
}
|
534 |
+
// TODO: for array in literal, there is no wrapper here
|
535 |
+
$xml = "<$name$xmlns$type_str$atts>".$xml."</$name>";
|
536 |
+
} else {
|
537 |
+
// got a struct
|
538 |
+
if(isset($type) && isset($type_prefix)){
|
539 |
+
$type_str = " xsi:type=\"$type_prefix:$type\"";
|
540 |
+
} else {
|
541 |
+
$type_str = '';
|
542 |
+
}
|
543 |
+
if ($use == 'literal') {
|
544 |
+
$xml .= "<$name$xmlns $atts>";
|
545 |
+
} else {
|
546 |
+
$xml .= "<$name$xmlns$type_str$atts>";
|
547 |
+
}
|
548 |
+
foreach($val as $k => $v){
|
549 |
+
// Apache Map
|
550 |
+
if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') {
|
551 |
+
$xml .= '<item>';
|
552 |
+
$xml .= $this->serialize_val($k,'key',false,false,false,false,$use);
|
553 |
+
$xml .= $this->serialize_val($v,'value',false,false,false,false,$use);
|
554 |
+
$xml .= '</item>';
|
555 |
+
} else {
|
556 |
+
$xml .= $this->serialize_val($v,$k,false,false,false,false,$use);
|
557 |
+
}
|
558 |
+
}
|
559 |
+
$xml .= "</$name>";
|
560 |
+
}
|
561 |
+
break;
|
562 |
+
default:
|
563 |
+
$xml .= 'not detected, got '.gettype($val).' for '.$val;
|
564 |
+
break;
|
565 |
+
}
|
566 |
+
return $xml;
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* serializes a message
|
571 |
+
*
|
572 |
+
* @param string $body the XML of the SOAP body
|
573 |
+
* @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers
|
574 |
+
* @param array $namespaces optional the namespaces used in generating the body and headers
|
575 |
+
* @param string $style optional (rpc|document)
|
576 |
+
* @param string $use optional (encoded|literal)
|
577 |
+
* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
|
578 |
+
* @return string the message
|
579 |
+
* @access public
|
580 |
+
*/
|
581 |
+
function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){
|
582 |
+
// TODO: add an option to automatically run utf8_encode on $body and $headers
|
583 |
+
// if $this->soap_defencoding is UTF-8. Not doing this automatically allows
|
584 |
+
// one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1
|
585 |
+
|
586 |
+
|
587 |
+
// serialize namespaces
|
588 |
+
$ns_string = '';
|
589 |
+
foreach(array_merge($this->namespaces,$namespaces) as $k => $v){
|
590 |
+
$ns_string .= " xmlns:$k=\"$v\"";
|
591 |
+
}
|
592 |
+
if($encodingStyle) {
|
593 |
+
$ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string";
|
594 |
+
}
|
595 |
+
|
596 |
+
// serialize headers
|
597 |
+
if($headers){
|
598 |
+
if (is_array($headers)) {
|
599 |
+
$xml = '';
|
600 |
+
foreach ($headers as $header) {
|
601 |
+
$xml .= $this->serialize_val($header, false, false, false, false, false, $use);
|
602 |
+
}
|
603 |
+
$headers = $xml;
|
604 |
+
}
|
605 |
+
$headers = "<SOAP-ENV:Header>".$headers."</SOAP-ENV:Header>";
|
606 |
+
}
|
607 |
+
// serialize envelope
|
608 |
+
return
|
609 |
+
'<?xml version="1.0" encoding="'.$this->soap_defencoding .'"?'.">".
|
610 |
+
'<SOAP-ENV:Envelope'.$ns_string.">".
|
611 |
+
$headers.
|
612 |
+
"<SOAP-ENV:Body>".
|
613 |
+
$body.
|
614 |
+
"</SOAP-ENV:Body>".
|
615 |
+
"</SOAP-ENV:Envelope>";
|
616 |
+
}
|
617 |
+
|
618 |
+
/**
|
619 |
+
* formats a string to be inserted into an HTML stream
|
620 |
+
*
|
621 |
+
* @param string $str The string to format
|
622 |
+
* @return string The formatted string
|
623 |
+
* @access public
|
624 |
+
* @deprecated
|
625 |
+
*/
|
626 |
+
function formatDump($str){
|
627 |
+
$str = htmlspecialchars($str);
|
628 |
+
return nl2br($str);
|
629 |
+
}
|
630 |
+
|
631 |
+
/**
|
632 |
+
* contracts (changes namespace to prefix) a qualified name
|
633 |
+
*
|
634 |
+
* @param string $qname qname
|
635 |
+
* @return string contracted qname
|
636 |
+
* @access private
|
637 |
+
*/
|
638 |
+
function contractQname($qname){
|
639 |
+
// get element namespace
|
640 |
+
if (strrpos($qname, ':')) {
|
641 |
+
// get unqualified name
|
642 |
+
$name = substr($qname, strrpos($qname, ':') + 1);
|
643 |
+
// get ns
|
644 |
+
$ns = substr($qname, 0, strrpos($qname, ':'));
|
645 |
+
$p = $this->getPrefixFromNamespace($ns);
|
646 |
+
if ($p) {
|
647 |
+
return $p . ':' . $name;
|
648 |
+
}
|
649 |
+
return $qname;
|
650 |
+
} else {
|
651 |
+
return $qname;
|
652 |
+
}
|
653 |
+
}
|
654 |
+
|
655 |
+
/**
|
656 |
+
* expands (changes prefix to namespace) a qualified name
|
657 |
+
*
|
658 |
+
* @param string $string qname
|
659 |
+
* @return string expanded qname
|
660 |
+
* @access private
|
661 |
+
*/
|
662 |
+
function expandQname($qname){
|
663 |
+
// get element prefix
|
664 |
+
if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){
|
665 |
+
// get unqualified name
|
666 |
+
$name = substr(strstr($qname,':'),1);
|
667 |
+
// get ns prefix
|
668 |
+
$prefix = substr($qname,0,strpos($qname,':'));
|
669 |
+
if(isset($this->namespaces[$prefix])){
|
670 |
+
return $this->namespaces[$prefix].':'.$name;
|
671 |
+
} else {
|
672 |
+
return $qname;
|
673 |
+
}
|
674 |
+
} else {
|
675 |
+
return $qname;
|
676 |
+
}
|
677 |
+
}
|
678 |
+
|
679 |
+
/**
|
680 |
+
* returns the local part of a prefixed string
|
681 |
+
* returns the original string, if not prefixed
|
682 |
+
*
|
683 |
+
* @param string $str The prefixed string
|
684 |
+
* @return string The local part
|
685 |
+
* @access public
|
686 |
+
*/
|
687 |
+
function getLocalPart($str){
|
688 |
+
if($sstr = strrchr($str,':')){
|
689 |
+
// get unqualified name
|
690 |
+
return substr( $sstr, 1 );
|
691 |
+
} else {
|
692 |
+
return $str;
|
693 |
+
}
|
694 |
+
}
|
695 |
+
|
696 |
+
/**
|
697 |
+
* returns the prefix part of a prefixed string
|
698 |
+
* returns false, if not prefixed
|
699 |
+
*
|
700 |
+
* @param string $str The prefixed string
|
701 |
+
* @return mixed The prefix or false if there is no prefix
|
702 |
+
* @access public
|
703 |
+
*/
|
704 |
+
function getPrefix($str){
|
705 |
+
if($pos = strrpos($str,':')){
|
706 |
+
// get prefix
|
707 |
+
return substr($str,0,$pos);
|
708 |
+
}
|
709 |
+
return false;
|
710 |
+
}
|
711 |
+
|
712 |
+
/**
|
713 |
+
* pass it a prefix, it returns a namespace
|
714 |
+
*
|
715 |
+
* @param string $prefix The prefix
|
716 |
+
* @return mixed The namespace, false if no namespace has the specified prefix
|
717 |
+
* @access public
|
718 |
+
*/
|
719 |
+
function getNamespaceFromPrefix($prefix){
|
720 |
+
if (isset($this->namespaces[$prefix])) {
|
721 |
+
return $this->namespaces[$prefix];
|
722 |
+
}
|
723 |
+
//$this->setError("No namespace registered for prefix '$prefix'");
|
724 |
+
return false;
|
725 |
+
}
|
726 |
+
|
727 |
+
/**
|
728 |
+
* returns the prefix for a given namespace (or prefix)
|
729 |
+
* or false if no prefixes registered for the given namespace
|
730 |
+
*
|
731 |
+
* @param string $ns The namespace
|
732 |
+
* @return mixed The prefix, false if the namespace has no prefixes
|
733 |
+
* @access public
|
734 |
+
*/
|
735 |
+
function getPrefixFromNamespace($ns) {
|
736 |
+
foreach ($this->namespaces as $p => $n) {
|
737 |
+
if ($ns == $n || $ns == $p) {
|
738 |
+
$this->usedNamespaces[$p] = $n;
|
739 |
+
return $p;
|
740 |
+
}
|
741 |
+
}
|
742 |
+
return false;
|
743 |
+
}
|
744 |
+
|
745 |
+
/**
|
746 |
+
* returns the time in ODBC canonical form with microseconds
|
747 |
+
*
|
748 |
+
* @return string The time in ODBC canonical form with microseconds
|
749 |
+
* @access public
|
750 |
+
*/
|
751 |
+
function getmicrotime() {
|
752 |
+
if (function_exists('gettimeofday')) {
|
753 |
+
$tod = gettimeofday();
|
754 |
+
$sec = $tod['sec'];
|
755 |
+
$usec = $tod['usec'];
|
756 |
+
} else {
|
757 |
+
$sec = time();
|
758 |
+
$usec = 0;
|
759 |
+
}
|
760 |
+
return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
|
761 |
+
}
|
762 |
+
|
763 |
+
/**
|
764 |
+
* Returns a string with the output of var_dump
|
765 |
+
*
|
766 |
+
* @param mixed $data The variable to var_dump
|
767 |
+
* @return string The output of var_dump
|
768 |
+
* @access public
|
769 |
+
*/
|
770 |
+
function varDump($data) {
|
771 |
+
ob_start();
|
772 |
+
var_dump($data);
|
773 |
+
$ret_val = ob_get_contents();
|
774 |
+
ob_end_clean();
|
775 |
+
return $ret_val;
|
776 |
+
}
|
777 |
+
}
|
778 |
+
|
779 |
+
// XML Schema Datatype Helper Functions
|
780 |
+
|
781 |
+
//xsd:dateTime helpers
|
782 |
+
|
783 |
+
/**
|
784 |
+
* convert unix timestamp to ISO 8601 compliant date string
|
785 |
+
*
|
786 |
+
* @param string $timestamp Unix time stamp
|
787 |
+
* @access public
|
788 |
+
*/
|
789 |
+
function timestamp_to_iso8601($timestamp,$utc=true){
|
790 |
+
$datestr = date('Y-m-d\TH:i:sO',$timestamp);
|
791 |
+
if($utc){
|
792 |
+
$eregStr =
|
793 |
+
'/([0-9]{4})-'. // centuries & years CCYY-
|
794 |
+
'([0-9]{2})-'. // months MM-
|
795 |
+
'([0-9]{2})'. // days DD
|
796 |
+
'T'. // separator T
|
797 |
+
'([0-9]{2}):'. // hours hh:
|
798 |
+
'([0-9]{2}):'. // minutes mm:
|
799 |
+
'([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
|
800 |
+
'(Z|[+\-][0-9]{2}:?[0-9]{2})?/'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
|
801 |
+
|
802 |
+
if(preg_match($eregStr,$datestr,$regs)){
|
803 |
+
return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
|
804 |
+
}
|
805 |
+
return false;
|
806 |
+
} else {
|
807 |
+
return $datestr;
|
808 |
+
}
|
809 |
+
}
|
810 |
+
|
811 |
+
/**
|
812 |
+
* convert ISO 8601 compliant date string to unix timestamp
|
813 |
+
*
|
814 |
+
* @param string $datestr ISO 8601 compliant date string
|
815 |
+
* @access public
|
816 |
+
*/
|
817 |
+
function iso8601_to_timestamp($datestr){
|
818 |
+
$eregStr =
|
819 |
+
'/([0-9]{4})-'. // centuries & years CCYY-
|
820 |
+
'([0-9]{2})-'. // months MM-
|
821 |
+
'([0-9]{2})'. // days DD
|
822 |
+
'T'. // separator T
|
823 |
+
'([0-9]{2}):'. // hours hh:
|
824 |
+
'([0-9]{2}):'. // minutes mm:
|
825 |
+
'([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
|
826 |
+
'(Z|[+\-][0-9]{2}:?[0-9]{2})?/'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
|
827 |
+
if(ereg($eregStr,$datestr,$regs)){
|
828 |
+
// not utc
|
829 |
+
if($regs[8] != 'Z'){
|
830 |
+
$op = substr($regs[8],0,1);
|
831 |
+
$h = substr($regs[8],1,2);
|
832 |
+
$m = substr($regs[8],strlen($regs[8])-2,2);
|
833 |
+
if($op == '-'){
|
834 |
+
$regs[4] = $regs[4] + $h;
|
835 |
+
$regs[5] = $regs[5] + $m;
|
836 |
+
} elseif($op == '+'){
|
837 |
+
$regs[4] = $regs[4] - $h;
|
838 |
+
$regs[5] = $regs[5] - $m;
|
839 |
+
}
|
840 |
+
}
|
841 |
+
return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
|
842 |
+
} else {
|
843 |
+
return false;
|
844 |
+
}
|
845 |
+
}
|
846 |
+
|
847 |
+
/**
|
848 |
+
* sleeps some number of microseconds
|
849 |
+
*
|
850 |
+
* @param string $usec the number of microseconds to sleep
|
851 |
+
* @access public
|
852 |
+
* @deprecated
|
853 |
+
*/
|
854 |
+
function usleepWindows($usec)
|
855 |
+
{
|
856 |
+
$start = gettimeofday();
|
857 |
+
|
858 |
+
do
|
859 |
+
{
|
860 |
+
$stop = gettimeofday();
|
861 |
+
$timePassed = 1000000 * ($stop['sec'] - $start['sec'])
|
862 |
+
+ $stop['usec'] - $start['usec'];
|
863 |
+
}
|
864 |
+
while ($timePassed < $usec);
|
865 |
+
}
|
866 |
+
|
867 |
+
?><?php
|
868 |
+
|
869 |
+
|
870 |
+
|
871 |
+
/**
|
872 |
+
* Contains information for a SOAP fault.
|
873 |
+
* Mainly used for returning faults from deployed functions
|
874 |
+
* in a server instance.
|
875 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
876 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
877 |
+
* @access public
|
878 |
+
*/
|
879 |
+
class soap_fault extends nusoap_base {
|
880 |
+
/**
|
881 |
+
* The fault code (client|server)
|
882 |
+
* @var string
|
883 |
+
* @access private
|
884 |
+
*/
|
885 |
+
var $faultcode;
|
886 |
+
/**
|
887 |
+
* The fault actor
|
888 |
+
* @var string
|
889 |
+
* @access private
|
890 |
+
*/
|
891 |
+
var $faultactor;
|
892 |
+
/**
|
893 |
+
* The fault string, a description of the fault
|
894 |
+
* @var string
|
895 |
+
* @access private
|
896 |
+
*/
|
897 |
+
var $faultstring;
|
898 |
+
/**
|
899 |
+
* The fault detail, typically a string or array of string
|
900 |
+
* @var mixed
|
901 |
+
* @access private
|
902 |
+
*/
|
903 |
+
var $faultdetail;
|
904 |
+
|
905 |
+
/**
|
906 |
+
* constructor
|
907 |
+
*
|
908 |
+
* @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server)
|
909 |
+
* @param string $faultactor only used when msg routed between multiple actors
|
910 |
+
* @param string $faultstring human readable error message
|
911 |
+
* @param mixed $faultdetail detail, typically a string or array of string
|
912 |
+
*/
|
913 |
+
function soap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
|
914 |
+
parent::nusoap_base();
|
915 |
+
$this->faultcode = $faultcode;
|
916 |
+
$this->faultactor = $faultactor;
|
917 |
+
$this->faultstring = $faultstring;
|
918 |
+
$this->faultdetail = $faultdetail;
|
919 |
+
}
|
920 |
+
|
921 |
+
/**
|
922 |
+
* serialize a fault
|
923 |
+
*
|
924 |
+
* @return string The serialization of the fault instance.
|
925 |
+
* @access public
|
926 |
+
*/
|
927 |
+
function serialize(){
|
928 |
+
$ns_string = '';
|
929 |
+
foreach($this->namespaces as $k => $v){
|
930 |
+
$ns_string .= "\n xmlns:$k=\"$v\"";
|
931 |
+
}
|
932 |
+
$return_msg =
|
933 |
+
'<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>'.
|
934 |
+
'<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"'.$ns_string.">\n".
|
935 |
+
'<SOAP-ENV:Body>'.
|
936 |
+
'<SOAP-ENV:Fault>'.
|
937 |
+
$this->serialize_val($this->faultcode, 'faultcode').
|
938 |
+
$this->serialize_val($this->faultactor, 'faultactor').
|
939 |
+
$this->serialize_val($this->faultstring, 'faultstring').
|
940 |
+
$this->serialize_val($this->faultdetail, 'detail').
|
941 |
+
'</SOAP-ENV:Fault>'.
|
942 |
+
'</SOAP-ENV:Body>'.
|
943 |
+
'</SOAP-ENV:Envelope>';
|
944 |
+
return $return_msg;
|
945 |
+
}
|
946 |
+
}
|
947 |
+
|
948 |
+
|
949 |
+
|
950 |
+
?><?php
|
951 |
+
|
952 |
+
|
953 |
+
|
954 |
+
/**
|
955 |
+
* parses an XML Schema, allows access to it's data, other utility methods
|
956 |
+
* no validation... yet.
|
957 |
+
* very experimental and limited. As is discussed on XML-DEV, I'm one of the people
|
958 |
+
* that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty
|
959 |
+
* tutorials I refer to :)
|
960 |
+
*
|
961 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
962 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
963 |
+
* @access public
|
964 |
+
*/
|
965 |
+
class XMLSchema extends nusoap_base {
|
966 |
+
|
967 |
+
// files
|
968 |
+
var $schema = '';
|
969 |
+
var $xml = '';
|
970 |
+
// namespaces
|
971 |
+
var $enclosingNamespaces;
|
972 |
+
// schema info
|
973 |
+
var $schemaInfo = array();
|
974 |
+
var $schemaTargetNamespace = '';
|
975 |
+
// types, elements, attributes defined by the schema
|
976 |
+
var $attributes = array();
|
977 |
+
var $complexTypes = array();
|
978 |
+
var $complexTypeStack = array();
|
979 |
+
var $currentComplexType = null;
|
980 |
+
var $elements = array();
|
981 |
+
var $elementStack = array();
|
982 |
+
var $currentElement = null;
|
983 |
+
var $simpleTypes = array();
|
984 |
+
var $simpleTypeStack = array();
|
985 |
+
var $currentSimpleType = null;
|
986 |
+
// imports
|
987 |
+
var $imports = array();
|
988 |
+
// parser vars
|
989 |
+
var $parser;
|
990 |
+
var $position = 0;
|
991 |
+
var $depth = 0;
|
992 |
+
var $depth_array = array();
|
993 |
+
var $message = array();
|
994 |
+
var $defaultNamespace = array();
|
995 |
+
|
996 |
+
/**
|
997 |
+
* constructor
|
998 |
+
*
|
999 |
+
* @param string $schema schema document URI
|
1000 |
+
* @param string $xml xml document URI
|
1001 |
+
* @param string $namespaces namespaces defined in enclosing XML
|
1002 |
+
* @access public
|
1003 |
+
*/
|
1004 |
+
function XMLSchema($schema='',$xml='',$namespaces=array()){
|
1005 |
+
parent::nusoap_base();
|
1006 |
+
// files
|
1007 |
+
$this->schema = $schema;
|
1008 |
+
$this->xml = $xml;
|
1009 |
+
|
1010 |
+
// namespaces
|
1011 |
+
$this->enclosingNamespaces = $namespaces;
|
1012 |
+
$this->namespaces = array_merge($this->namespaces, $namespaces);
|
1013 |
+
|
1014 |
+
// parse schema file
|
1015 |
+
if($schema != ''){
|
1016 |
+
$this->parseFile($schema, 'schema');
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
// parse xml file
|
1020 |
+
if($xml != ''){
|
1021 |
+
$this->parseFile($xml, 'xml');
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
/**
|
1027 |
+
* parse an XML file
|
1028 |
+
*
|
1029 |
+
* @param string $xml, path/URL to XML file
|
1030 |
+
* @param string $type, (schema | xml)
|
1031 |
+
* @return boolean
|
1032 |
+
* @access public
|
1033 |
+
*/
|
1034 |
+
function parseFile($xml,$type){
|
1035 |
+
// parse xml file
|
1036 |
+
if($xml != ""){
|
1037 |
+
$xmlStr = @join("",@file($xml));
|
1038 |
+
if($xmlStr == ""){
|
1039 |
+
$msg = 'Error reading XML from '.$xml;
|
1040 |
+
$this->setError($msg);
|
1041 |
+
return false;
|
1042 |
+
} else {
|
1043 |
+
$this->parseString($xmlStr,$type);
|
1044 |
+
return true;
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
return false;
|
1048 |
+
}
|
1049 |
+
|
1050 |
+
/**
|
1051 |
+
* parse an XML string
|
1052 |
+
*
|
1053 |
+
* @param string $xml path or URL
|
1054 |
+
* @param string $type, (schema|xml)
|
1055 |
+
* @access private
|
1056 |
+
*/
|
1057 |
+
function parseString($xml,$type){
|
1058 |
+
// parse xml string
|
1059 |
+
if($xml != ""){
|
1060 |
+
|
1061 |
+
// Create an XML parser.
|
1062 |
+
$this->parser = xml_parser_create();
|
1063 |
+
// Set the options for parsing the XML data.
|
1064 |
+
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
|
1065 |
+
|
1066 |
+
// Set the object for the parser.
|
1067 |
+
xml_set_object($this->parser, $this);
|
1068 |
+
|
1069 |
+
// Set the element handlers for the parser.
|
1070 |
+
if($type == "schema"){
|
1071 |
+
xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement');
|
1072 |
+
xml_set_character_data_handler($this->parser,'schemaCharacterData');
|
1073 |
+
} elseif($type == "xml"){
|
1074 |
+
xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement');
|
1075 |
+
xml_set_character_data_handler($this->parser,'xmlCharacterData');
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
// Parse the XML file.
|
1079 |
+
if(!xml_parse($this->parser,$xml,true)){
|
1080 |
+
// Display an error message.
|
1081 |
+
$errstr = sprintf('XML error parsing XML schema on line %d: %s',
|
1082 |
+
xml_get_current_line_number($this->parser),
|
1083 |
+
xml_error_string(xml_get_error_code($this->parser))
|
1084 |
+
);
|
1085 |
+
$this->setError($errstr);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
xml_parser_free($this->parser);
|
1089 |
+
} else{
|
1090 |
+
$this->setError('no xml passed to parseString()!!');
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
/**
|
1095 |
+
* start-element handler
|
1096 |
+
*
|
1097 |
+
* @param string $parser XML parser object
|
1098 |
+
* @param string $name element name
|
1099 |
+
* @param string $attrs associative array of attributes
|
1100 |
+
* @access private
|
1101 |
+
*/
|
1102 |
+
function schemaStartElement($parser, $name, $attrs) {
|
1103 |
+
|
1104 |
+
// position in the total number of elements, starting from 0
|
1105 |
+
$pos = $this->position++;
|
1106 |
+
$depth = $this->depth++;
|
1107 |
+
// set self as current value for this depth
|
1108 |
+
$this->depth_array[$depth] = $pos;
|
1109 |
+
$this->message[$pos] = array('cdata' => '');
|
1110 |
+
if ($depth > 0) {
|
1111 |
+
$this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]];
|
1112 |
+
} else {
|
1113 |
+
$this->defaultNamespace[$pos] = false;
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
// get element prefix
|
1117 |
+
if($prefix = $this->getPrefix($name)){
|
1118 |
+
// get unqualified name
|
1119 |
+
$name = $this->getLocalPart($name);
|
1120 |
+
} else {
|
1121 |
+
$prefix = '';
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
// loop thru attributes, expanding, and registering namespace declarations
|
1125 |
+
if(count($attrs) > 0){
|
1126 |
+
foreach($attrs as $k => $v){
|
1127 |
+
// if ns declarations, add to class level array of valid namespaces
|
1128 |
+
if(preg_match("/^xmlns/",$k)){
|
1129 |
+
if($ns_prefix = substr(strrchr($k,':'),1)){
|
1130 |
+
$this->namespaces[$ns_prefix] = $v;
|
1131 |
+
} else {
|
1132 |
+
$this->defaultNamespace[$pos] = $v;
|
1133 |
+
if (! $this->getPrefixFromNamespace($v)) {
|
1134 |
+
$this->namespaces['ns'.(count($this->namespaces)+1)] = $v;
|
1135 |
+
}
|
1136 |
+
}
|
1137 |
+
if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){
|
1138 |
+
$this->XMLSchemaVersion = $v;
|
1139 |
+
$this->namespaces['xsi'] = $v.'-instance';
|
1140 |
+
}
|
1141 |
+
}
|
1142 |
+
}
|
1143 |
+
foreach($attrs as $k => $v){
|
1144 |
+
// expand each attribute
|
1145 |
+
$k = strpos($k,':') ? $this->expandQname($k) : $k;
|
1146 |
+
$v = strpos($v,':') ? $this->expandQname($v) : $v;
|
1147 |
+
$eAttrs[$k] = $v;
|
1148 |
+
}
|
1149 |
+
$attrs = $eAttrs;
|
1150 |
+
} else {
|
1151 |
+
$attrs = array();
|
1152 |
+
}
|
1153 |
+
// find status, register data
|
1154 |
+
switch($name){
|
1155 |
+
case 'all': // (optional) compositor content for a complexType
|
1156 |
+
case 'choice':
|
1157 |
+
case 'group':
|
1158 |
+
case 'sequence':
|
1159 |
+
$this->complexTypes[$this->currentComplexType]['compositor'] = $name;
|
1160 |
+
//if($name == 'all' || $name == 'sequence'){
|
1161 |
+
// $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
|
1162 |
+
//}
|
1163 |
+
break;
|
1164 |
+
case 'attribute': // complexType attribute
|
1165 |
+
if (!isset($attrs['form'])) {
|
1166 |
+
$attrs['form'] = $this->schemaInfo['attributeFormDefault'];
|
1167 |
+
}
|
1168 |
+
if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
|
1169 |
+
$v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
|
1170 |
+
if (!strpos($v, ':')) {
|
1171 |
+
// no namespace in arrayType attribute value...
|
1172 |
+
if ($this->defaultNamespace[$pos]) {
|
1173 |
+
// ...so use the default
|
1174 |
+
$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
|
1175 |
+
}
|
1176 |
+
}
|
1177 |
+
}
|
1178 |
+
if(isset($attrs['name'])){
|
1179 |
+
$this->attributes[$attrs['name']] = $attrs;
|
1180 |
+
$aname = $attrs['name'];
|
1181 |
+
} elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){
|
1182 |
+
if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
|
1183 |
+
$aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
|
1184 |
+
} else {
|
1185 |
+
$aname = '';
|
1186 |
+
}
|
1187 |
+
} elseif(isset($attrs['ref'])){
|
1188 |
+
$aname = $attrs['ref'];
|
1189 |
+
$this->attributes[$attrs['ref']] = $attrs;
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
if($this->currentComplexType){ // This should *always* be
|
1193 |
+
$this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs;
|
1194 |
+
}
|
1195 |
+
// arrayType attribute
|
1196 |
+
if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){
|
1197 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
|
1198 |
+
$prefix = $this->getPrefix($aname);
|
1199 |
+
if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){
|
1200 |
+
$v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
|
1201 |
+
} else {
|
1202 |
+
$v = '';
|
1203 |
+
}
|
1204 |
+
if(strpos($v,'[,]')){
|
1205 |
+
$this->complexTypes[$this->currentComplexType]['multidimensional'] = true;
|
1206 |
+
}
|
1207 |
+
$v = substr($v,0,strpos($v,'[')); // clip the []
|
1208 |
+
if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){
|
1209 |
+
$v = $this->XMLSchemaVersion.':'.$v;
|
1210 |
+
}
|
1211 |
+
$this->complexTypes[$this->currentComplexType]['arrayType'] = $v;
|
1212 |
+
}
|
1213 |
+
break;
|
1214 |
+
case 'complexContent': // (optional) content for a complexType
|
1215 |
+
break;
|
1216 |
+
case 'complexType':
|
1217 |
+
array_push($this->complexTypeStack, $this->currentComplexType);
|
1218 |
+
if(isset($attrs['name'])){
|
1219 |
+
//$this->currentElement = false;
|
1220 |
+
$this->currentComplexType = $attrs['name'];
|
1221 |
+
$this->complexTypes[$this->currentComplexType] = $attrs;
|
1222 |
+
$this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
|
1223 |
+
// This is for constructs like
|
1224 |
+
// <complexType name="ListOfString" base="soap:Array">
|
1225 |
+
// <sequence>
|
1226 |
+
// <element name="string" type="xsd:string"
|
1227 |
+
// minOccurs="0" maxOccurs="unbounded" />
|
1228 |
+
// </sequence>
|
1229 |
+
// </complexType>
|
1230 |
+
if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
|
1231 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
|
1232 |
+
} else {
|
1233 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
|
1234 |
+
}
|
1235 |
+
}else{
|
1236 |
+
$this->currentComplexType = $this->currentElement . '_ContainedType';
|
1237 |
+
//$this->currentElement = false;
|
1238 |
+
$this->complexTypes[$this->currentComplexType] = $attrs;
|
1239 |
+
$this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
|
1240 |
+
// This is for constructs like
|
1241 |
+
// <complexType name="ListOfString" base="soap:Array">
|
1242 |
+
// <sequence>
|
1243 |
+
// <element name="string" type="xsd:string"
|
1244 |
+
// minOccurs="0" maxOccurs="unbounded" />
|
1245 |
+
// </sequence>
|
1246 |
+
// </complexType>
|
1247 |
+
if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
|
1248 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
|
1249 |
+
} else {
|
1250 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
|
1251 |
+
}
|
1252 |
+
}
|
1253 |
+
break;
|
1254 |
+
case 'element':
|
1255 |
+
array_push($this->elementStack, $this->currentElement);
|
1256 |
+
// elements defined as part of a complex type should
|
1257 |
+
// not really be added to $this->elements, but for some
|
1258 |
+
// reason, they are
|
1259 |
+
if (!isset($attrs['form'])) {
|
1260 |
+
$attrs['form'] = $this->schemaInfo['elementFormDefault'];
|
1261 |
+
}
|
1262 |
+
if(isset($attrs['type'])){
|
1263 |
+
if (! $this->getPrefix($attrs['type'])) {
|
1264 |
+
if ($this->defaultNamespace[$pos]) {
|
1265 |
+
$attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type'];
|
1266 |
+
}
|
1267 |
+
}
|
1268 |
+
// This is for constructs like
|
1269 |
+
// <complexType name="ListOfString" base="soap:Array">
|
1270 |
+
// <sequence>
|
1271 |
+
// <element name="string" type="xsd:string"
|
1272 |
+
// minOccurs="0" maxOccurs="unbounded" />
|
1273 |
+
// </sequence>
|
1274 |
+
// </complexType>
|
1275 |
+
if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') {
|
1276 |
+
$this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type'];
|
1277 |
+
}
|
1278 |
+
$this->currentElement = $attrs['name'];
|
1279 |
+
$this->elements[ $attrs['name'] ] = $attrs;
|
1280 |
+
$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
|
1281 |
+
$ename = $attrs['name'];
|
1282 |
+
} elseif(isset($attrs['ref'])){
|
1283 |
+
$this->currentElement = "ref to ".$attrs['ref'];
|
1284 |
+
$ename = $this->getLocalPart($attrs['ref']);
|
1285 |
+
} else {
|
1286 |
+
$this->currentElement = $attrs['name'];
|
1287 |
+
$this->elements[ $attrs['name'] ] = $attrs;
|
1288 |
+
$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
|
1289 |
+
$attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['name'] . '_ContainedType';
|
1290 |
+
$this->elements[ $attrs['name'] ]['type'] = $attrs['type'];
|
1291 |
+
$ename = $attrs['name'];
|
1292 |
+
}
|
1293 |
+
if(isset($ename) && $this->currentComplexType){
|
1294 |
+
$this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs;
|
1295 |
+
}
|
1296 |
+
break;
|
1297 |
+
case 'enumeration': // restriction value list member
|
1298 |
+
if ($this->currentSimpleType) {
|
1299 |
+
$this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value'];
|
1300 |
+
} elseif ($this->currentComplexType) {
|
1301 |
+
$this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value'];
|
1302 |
+
}
|
1303 |
+
break;
|
1304 |
+
case 'extension': // simpleContent or complexContent type extension
|
1305 |
+
if ($this->currentComplexType) {
|
1306 |
+
$this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base'];
|
1307 |
+
}
|
1308 |
+
break;
|
1309 |
+
case 'import':
|
1310 |
+
if (isset($attrs['schemaLocation'])) {
|
1311 |
+
$this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false);
|
1312 |
+
} else {
|
1313 |
+
$this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
|
1314 |
+
if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
|
1315 |
+
$this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace'];
|
1316 |
+
}
|
1317 |
+
}
|
1318 |
+
break;
|
1319 |
+
case 'list': // simpleType value list
|
1320 |
+
break;
|
1321 |
+
case 'restriction': // simpleType, simpleContent or complexContent value restriction
|
1322 |
+
if($this->currentSimpleType){
|
1323 |
+
$this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base'];
|
1324 |
+
} elseif($this->currentComplexType){
|
1325 |
+
$this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base'];
|
1326 |
+
if(strstr($attrs['base'],':') == ':Array'){
|
1327 |
+
$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
|
1328 |
+
}
|
1329 |
+
}
|
1330 |
+
break;
|
1331 |
+
case 'schema':
|
1332 |
+
$this->schemaInfo = $attrs;
|
1333 |
+
$this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix);
|
1334 |
+
if (isset($attrs['targetNamespace'])) {
|
1335 |
+
$this->schemaTargetNamespace = $attrs['targetNamespace'];
|
1336 |
+
}
|
1337 |
+
if (!isset($attrs['elementFormDefault'])) {
|
1338 |
+
$this->schemaInfo['elementFormDefault'] = 'unqualified';
|
1339 |
+
}
|
1340 |
+
if (!isset($attrs['attributeFormDefault'])) {
|
1341 |
+
$this->schemaInfo['attributeFormDefault'] = 'unqualified';
|
1342 |
+
}
|
1343 |
+
break;
|
1344 |
+
case 'simpleContent': // (optional) content for a complexType
|
1345 |
+
break;
|
1346 |
+
case 'simpleType':
|
1347 |
+
array_push($this->simpleTypeStack, $this->currentSimpleType);
|
1348 |
+
if(isset($attrs['name'])){
|
1349 |
+
$this->currentSimpleType = $attrs['name'];
|
1350 |
+
$this->simpleTypes[ $attrs['name'] ] = $attrs;
|
1351 |
+
$this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType';
|
1352 |
+
$this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar';
|
1353 |
+
} else {
|
1354 |
+
$this->currentSimpleType = $this->currentElement . '_ContainedType';
|
1355 |
+
//$this->currentElement = false;
|
1356 |
+
$this->simpleTypes[$this->currentSimpleType] = $attrs;
|
1357 |
+
$this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar';
|
1358 |
+
}
|
1359 |
+
break;
|
1360 |
+
case 'union': // simpleType type list
|
1361 |
+
break;
|
1362 |
+
default:
|
1363 |
+
}
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
/**
|
1367 |
+
* end-element handler
|
1368 |
+
*
|
1369 |
+
* @param string $parser XML parser object
|
1370 |
+
* @param string $name element name
|
1371 |
+
* @access private
|
1372 |
+
*/
|
1373 |
+
function schemaEndElement($parser, $name) {
|
1374 |
+
// bring depth down a notch
|
1375 |
+
$this->depth--;
|
1376 |
+
// position of current element is equal to the last value left in depth_array for my depth
|
1377 |
+
if(isset($this->depth_array[$this->depth])){
|
1378 |
+
$pos = $this->depth_array[$this->depth];
|
1379 |
+
}
|
1380 |
+
// get element prefix
|
1381 |
+
if ($prefix = $this->getPrefix($name)){
|
1382 |
+
// get unqualified name
|
1383 |
+
$name = $this->getLocalPart($name);
|
1384 |
+
} else {
|
1385 |
+
$prefix = '';
|
1386 |
+
}
|
1387 |
+
// move on...
|
1388 |
+
if($name == 'complexType'){
|
1389 |
+
$this->currentComplexType = array_pop($this->complexTypeStack);
|
1390 |
+
//$this->currentElement = false;
|
1391 |
+
}
|
1392 |
+
if($name == 'element'){
|
1393 |
+
$this->currentElement = array_pop($this->elementStack);
|
1394 |
+
}
|
1395 |
+
if($name == 'simpleType'){
|
1396 |
+
$this->currentSimpleType = array_pop($this->simpleTypeStack);
|
1397 |
+
}
|
1398 |
+
}
|
1399 |
+
|
1400 |
+
/**
|
1401 |
+
* element content handler
|
1402 |
+
*
|
1403 |
+
* @param string $parser XML parser object
|
1404 |
+
* @param string $data element content
|
1405 |
+
* @access private
|
1406 |
+
*/
|
1407 |
+
function schemaCharacterData($parser, $data){
|
1408 |
+
$pos = $this->depth_array[$this->depth - 1];
|
1409 |
+
$this->message[$pos]['cdata'] .= $data;
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
/**
|
1413 |
+
* serialize the schema
|
1414 |
+
*
|
1415 |
+
* @access public
|
1416 |
+
*/
|
1417 |
+
function serializeSchema(){
|
1418 |
+
|
1419 |
+
$schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion);
|
1420 |
+
$xml = '';
|
1421 |
+
// imports
|
1422 |
+
if (sizeof($this->imports) > 0) {
|
1423 |
+
foreach($this->imports as $ns => $list) {
|
1424 |
+
foreach ($list as $ii) {
|
1425 |
+
if ($ii['location'] != '') {
|
1426 |
+
$xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n";
|
1427 |
+
} else {
|
1428 |
+
$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n";
|
1429 |
+
}
|
1430 |
+
}
|
1431 |
+
}
|
1432 |
+
}
|
1433 |
+
// complex types
|
1434 |
+
foreach($this->complexTypes as $typeName => $attrs){
|
1435 |
+
$contentStr = '';
|
1436 |
+
// serialize child elements
|
1437 |
+
if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){
|
1438 |
+
foreach($attrs['elements'] as $element => $eParts){
|
1439 |
+
if(isset($eParts['ref'])){
|
1440 |
+
$contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n";
|
1441 |
+
} else {
|
1442 |
+
$contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\"";
|
1443 |
+
foreach ($eParts as $aName => $aValue) {
|
1444 |
+
// handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable
|
1445 |
+
if ($aName != 'name' && $aName != 'type') {
|
1446 |
+
$contentStr .= " $aName=\"$aValue\"";
|
1447 |
+
}
|
1448 |
+
}
|
1449 |
+
$contentStr .= "/>\n";
|
1450 |
+
}
|
1451 |
+
}
|
1452 |
+
// compositor wraps elements
|
1453 |
+
if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) {
|
1454 |
+
$contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." </$schemaPrefix:$attrs[compositor]>\n";
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
// attributes
|
1458 |
+
if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){
|
1459 |
+
foreach($attrs['attrs'] as $attr => $aParts){
|
1460 |
+
$contentStr .= " <$schemaPrefix:attribute";
|
1461 |
+
foreach ($aParts as $a => $v) {
|
1462 |
+
if ($a == 'ref' || $a == 'type') {
|
1463 |
+
$contentStr .= " $a=\"".$this->contractQName($v).'"';
|
1464 |
+
} elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') {
|
1465 |
+
$this->usedNamespaces['wsdl'] = $this->namespaces['wsdl'];
|
1466 |
+
$contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"';
|
1467 |
+
} else {
|
1468 |
+
$contentStr .= " $a=\"$v\"";
|
1469 |
+
}
|
1470 |
+
}
|
1471 |
+
$contentStr .= "/>\n";
|
1472 |
+
}
|
1473 |
+
}
|
1474 |
+
// if restriction
|
1475 |
+
if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){
|
1476 |
+
$contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." </$schemaPrefix:restriction>\n";
|
1477 |
+
// complex or simple content
|
1478 |
+
if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){
|
1479 |
+
$contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." </$schemaPrefix:complexContent>\n";
|
1480 |
+
}
|
1481 |
+
}
|
1482 |
+
// finalize complex type
|
1483 |
+
if($contentStr != ''){
|
1484 |
+
$contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." </$schemaPrefix:complexType>\n";
|
1485 |
+
} else {
|
1486 |
+
$contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n";
|
1487 |
+
}
|
1488 |
+
$xml .= $contentStr;
|
1489 |
+
}
|
1490 |
+
// simple types
|
1491 |
+
if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){
|
1492 |
+
foreach($this->simpleTypes as $typeName => $eParts){
|
1493 |
+
$xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\"/>\n";
|
1494 |
+
if (isset($eParts['enumeration'])) {
|
1495 |
+
foreach ($eParts['enumeration'] as $e) {
|
1496 |
+
$xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n";
|
1497 |
+
}
|
1498 |
+
}
|
1499 |
+
$xml .= " </$schemaPrefix:simpleType>";
|
1500 |
+
}
|
1501 |
+
}
|
1502 |
+
// elements
|
1503 |
+
if(isset($this->elements) && count($this->elements) > 0){
|
1504 |
+
foreach($this->elements as $element => $eParts){
|
1505 |
+
$xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n";
|
1506 |
+
}
|
1507 |
+
}
|
1508 |
+
// attributes
|
1509 |
+
if(isset($this->attributes) && count($this->attributes) > 0){
|
1510 |
+
foreach($this->attributes as $attr => $aParts){
|
1511 |
+
$xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>";
|
1512 |
+
}
|
1513 |
+
}
|
1514 |
+
// finish 'er up
|
1515 |
+
$el = "<$schemaPrefix:schema targetNamespace=\"$this->schemaTargetNamespace\"\n";
|
1516 |
+
foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) {
|
1517 |
+
$el .= " xmlns:$nsp=\"$ns\"";
|
1518 |
+
}
|
1519 |
+
$xml = $el . ">\n".$xml."</$schemaPrefix:schema>\n";
|
1520 |
+
return $xml;
|
1521 |
+
}
|
1522 |
+
|
1523 |
+
/**
|
1524 |
+
* get the PHP type of a user defined type in the schema
|
1525 |
+
* PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays
|
1526 |
+
* returns false if no type exists, or not w/ the given namespace
|
1527 |
+
* else returns a string that is either a native php type, or 'struct'
|
1528 |
+
*
|
1529 |
+
* @param string $type, name of defined type
|
1530 |
+
* @param string $ns, namespace of type
|
1531 |
+
* @return mixed
|
1532 |
+
* @access public
|
1533 |
+
* @deprecated
|
1534 |
+
*/
|
1535 |
+
function getPHPType($type,$ns){
|
1536 |
+
if(isset($this->typemap[$ns][$type])){
|
1537 |
+
//print "found type '$type' and ns $ns in typemap<br>";
|
1538 |
+
return $this->typemap[$ns][$type];
|
1539 |
+
} elseif(isset($this->complexTypes[$type])){
|
1540 |
+
//print "getting type '$type' and ns $ns from complexTypes array<br>";
|
1541 |
+
return $this->complexTypes[$type]['phpType'];
|
1542 |
+
}
|
1543 |
+
return false;
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
/**
|
1547 |
+
* returns an associative array of information about a given type
|
1548 |
+
* returns false if no type exists by the given name
|
1549 |
+
*
|
1550 |
+
* For a complexType typeDef = array(
|
1551 |
+
* 'restrictionBase' => '',
|
1552 |
+
* 'phpType' => '',
|
1553 |
+
* 'compositor' => '(sequence|all)',
|
1554 |
+
* 'elements' => array(), // refs to elements array
|
1555 |
+
* 'attrs' => array() // refs to attributes array
|
1556 |
+
* ... and so on (see addComplexType)
|
1557 |
+
* )
|
1558 |
+
*
|
1559 |
+
* For simpleType or element, the array has different keys.
|
1560 |
+
*
|
1561 |
+
* @param string
|
1562 |
+
* @return mixed
|
1563 |
+
* @access public
|
1564 |
+
* @see addComplexType
|
1565 |
+
* @see addSimpleType
|
1566 |
+
* @see addElement
|
1567 |
+
*/
|
1568 |
+
function getTypeDef($type){
|
1569 |
+
if(isset($this->complexTypes[$type])){
|
1570 |
+
return $this->complexTypes[$type];
|
1571 |
+
} elseif(isset($this->simpleTypes[$type])){
|
1572 |
+
if (!isset($this->simpleTypes[$type]['phpType'])) {
|
1573 |
+
// get info for type to tack onto the simple type
|
1574 |
+
// TODO: can this ever really apply (i.e. what is a simpleType really?)
|
1575 |
+
$uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1);
|
1576 |
+
$ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':'));
|
1577 |
+
$etype = $this->getTypeDef($uqType);
|
1578 |
+
if ($etype) {
|
1579 |
+
if (isset($etype['phpType'])) {
|
1580 |
+
$this->simpleTypes[$type]['phpType'] = $etype['phpType'];
|
1581 |
+
}
|
1582 |
+
if (isset($etype['elements'])) {
|
1583 |
+
$this->simpleTypes[$type]['elements'] = $etype['elements'];
|
1584 |
+
}
|
1585 |
+
}
|
1586 |
+
}
|
1587 |
+
return $this->simpleTypes[$type];
|
1588 |
+
} elseif(isset($this->elements[$type])){
|
1589 |
+
if (!isset($this->elements[$type]['phpType'])) {
|
1590 |
+
// get info for type to tack onto the element
|
1591 |
+
$uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1);
|
1592 |
+
$ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':'));
|
1593 |
+
$etype = $this->getTypeDef($uqType);
|
1594 |
+
if ($etype) {
|
1595 |
+
if (isset($etype['phpType'])) {
|
1596 |
+
$this->elements[$type]['phpType'] = $etype['phpType'];
|
1597 |
+
}
|
1598 |
+
if (isset($etype['elements'])) {
|
1599 |
+
$this->elements[$type]['elements'] = $etype['elements'];
|
1600 |
+
}
|
1601 |
+
} elseif ($ns == 'http://www.w3.org/2001/XMLSchema') {
|
1602 |
+
$this->elements[$type]['phpType'] = 'scalar';
|
1603 |
+
}
|
1604 |
+
}
|
1605 |
+
return $this->elements[$type];
|
1606 |
+
} elseif(isset($this->attributes[$type])){
|
1607 |
+
return $this->attributes[$type];
|
1608 |
+
} elseif (ereg('_ContainedType$', $type)) {
|
1609 |
+
$typeDef['typeClass'] = 'simpleType';
|
1610 |
+
$typeDef['phpType'] = 'scalar';
|
1611 |
+
$typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string';
|
1612 |
+
return $typeDef;
|
1613 |
+
}
|
1614 |
+
return false;
|
1615 |
+
}
|
1616 |
+
|
1617 |
+
/**
|
1618 |
+
* returns a sample serialization of a given type, or false if no type by the given name
|
1619 |
+
*
|
1620 |
+
* @param string $type, name of type
|
1621 |
+
* @return mixed
|
1622 |
+
* @access public
|
1623 |
+
* @deprecated
|
1624 |
+
*/
|
1625 |
+
function serializeTypeDef($type){
|
1626 |
+
//print "in sTD() for type $type<br>";
|
1627 |
+
if($typeDef = $this->getTypeDef($type)){
|
1628 |
+
$str .= '<'.$type;
|
1629 |
+
if(is_array($typeDef['attrs'])){
|
1630 |
+
foreach($attrs as $attName => $data){
|
1631 |
+
$str .= " $attName=\"{type = ".$data['type']."}\"";
|
1632 |
+
}
|
1633 |
+
}
|
1634 |
+
$str .= " xmlns=\"".$this->schema['targetNamespace']."\"";
|
1635 |
+
if(count($typeDef['elements']) > 0){
|
1636 |
+
$str .= ">";
|
1637 |
+
foreach($typeDef['elements'] as $element => $eData){
|
1638 |
+
$str .= $this->serializeTypeDef($element);
|
1639 |
+
}
|
1640 |
+
$str .= "</$type>";
|
1641 |
+
} elseif($typeDef['typeClass'] == 'element') {
|
1642 |
+
$str .= "></$type>";
|
1643 |
+
} else {
|
1644 |
+
$str .= "/>";
|
1645 |
+
}
|
1646 |
+
return $str;
|
1647 |
+
}
|
1648 |
+
return false;
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
/**
|
1652 |
+
* returns HTML form elements that allow a user
|
1653 |
+
* to enter values for creating an instance of the given type.
|
1654 |
+
*
|
1655 |
+
* @param string $name, name for type instance
|
1656 |
+
* @param string $type, name of type
|
1657 |
+
* @return string
|
1658 |
+
* @access public
|
1659 |
+
* @deprecated
|
1660 |
+
*/
|
1661 |
+
function typeToForm($name,$type){
|
1662 |
+
// get typedef
|
1663 |
+
if($typeDef = $this->getTypeDef($type)){
|
1664 |
+
// if struct
|
1665 |
+
if($typeDef['phpType'] == 'struct'){
|
1666 |
+
$buffer .= '<table>';
|
1667 |
+
foreach($typeDef['elements'] as $child => $childDef){
|
1668 |
+
$buffer .= "
|
1669 |
+
<tr><td align='right'>$childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):</td>
|
1670 |
+
<td><input type='text' name='parameters[".$name."][$childDef[name]]'></td></tr>";
|
1671 |
+
}
|
1672 |
+
$buffer .= '</table>';
|
1673 |
+
// if array
|
1674 |
+
} elseif($typeDef['phpType'] == 'array'){
|
1675 |
+
$buffer .= '<table>';
|
1676 |
+
for($i=0;$i < 3; $i++){
|
1677 |
+
$buffer .= "
|
1678 |
+
<tr><td align='right'>array item (type: $typeDef[arrayType]):</td>
|
1679 |
+
<td><input type='text' name='parameters[".$name."][]'></td></tr>";
|
1680 |
+
}
|
1681 |
+
$buffer .= '</table>';
|
1682 |
+
// if scalar
|
1683 |
+
} else {
|
1684 |
+
$buffer .= "<input type='text' name='parameters[$name]'>";
|
1685 |
+
}
|
1686 |
+
} else {
|
1687 |
+
$buffer .= "<input type='text' name='parameters[$name]'>";
|
1688 |
+
}
|
1689 |
+
return $buffer;
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
/**
|
1693 |
+
* adds a complex type to the schema
|
1694 |
+
*
|
1695 |
+
* example: array
|
1696 |
+
*
|
1697 |
+
* addType(
|
1698 |
+
* 'ArrayOfstring',
|
1699 |
+
* 'complexType',
|
1700 |
+
* 'array',
|
1701 |
+
* '',
|
1702 |
+
* 'SOAP-ENC:Array',
|
1703 |
+
* array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'),
|
1704 |
+
* 'xsd:string'
|
1705 |
+
* );
|
1706 |
+
*
|
1707 |
+
* example: PHP associative array ( SOAP Struct )
|
1708 |
+
*
|
1709 |
+
* addType(
|
1710 |
+
* 'SOAPStruct',
|
1711 |
+
* 'complexType',
|
1712 |
+
* 'struct',
|
1713 |
+
* 'all',
|
1714 |
+
* array('myVar'=> array('name'=>'myVar','type'=>'string')
|
1715 |
+
* );
|
1716 |
+
*
|
1717 |
+
* @param name
|
1718 |
+
* @param typeClass (complexType|simpleType|attribute)
|
1719 |
+
* @param phpType: currently supported are array and struct (php assoc array)
|
1720 |
+
* @param compositor (all|sequence|choice)
|
1721 |
+
* @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
|
1722 |
+
* @param elements = array ( name = array(name=>'',type=>'') )
|
1723 |
+
* @param attrs = array(
|
1724 |
+
* array(
|
1725 |
+
* 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType",
|
1726 |
+
* "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]"
|
1727 |
+
* )
|
1728 |
+
* )
|
1729 |
+
* @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string)
|
1730 |
+
* @access public
|
1731 |
+
* @see getTypeDef
|
1732 |
+
*/
|
1733 |
+
function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){
|
1734 |
+
$this->complexTypes[$name] = array(
|
1735 |
+
'name' => $name,
|
1736 |
+
'typeClass' => $typeClass,
|
1737 |
+
'phpType' => $phpType,
|
1738 |
+
'compositor'=> $compositor,
|
1739 |
+
'restrictionBase' => $restrictionBase,
|
1740 |
+
'elements' => $elements,
|
1741 |
+
'attrs' => $attrs,
|
1742 |
+
'arrayType' => $arrayType
|
1743 |
+
);
|
1744 |
+
|
1745 |
+
}
|
1746 |
+
|
1747 |
+
/**
|
1748 |
+
* adds a simple type to the schema
|
1749 |
+
*
|
1750 |
+
* @param string $name
|
1751 |
+
* @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
|
1752 |
+
* @param string $typeClass (should always be simpleType)
|
1753 |
+
* @param string $phpType (should always be scalar)
|
1754 |
+
* @param array $enumeration array of values
|
1755 |
+
* @access public
|
1756 |
+
* @see xmlschema
|
1757 |
+
* @see getTypeDef
|
1758 |
+
*/
|
1759 |
+
function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
|
1760 |
+
$this->simpleTypes[$name] = array(
|
1761 |
+
'name' => $name,
|
1762 |
+
'typeClass' => $typeClass,
|
1763 |
+
'phpType' => $phpType,
|
1764 |
+
'type' => $restrictionBase,
|
1765 |
+
'enumeration' => $enumeration
|
1766 |
+
);
|
1767 |
+
|
1768 |
+
}
|
1769 |
+
|
1770 |
+
/**
|
1771 |
+
* adds an element to the schema
|
1772 |
+
*
|
1773 |
+
* @param array $attrs attributes that must include name and type
|
1774 |
+
* @see xmlschema
|
1775 |
+
* @access public
|
1776 |
+
*/
|
1777 |
+
function addElement($attrs) {
|
1778 |
+
if (! $this->getPrefix($attrs['type'])) {
|
1779 |
+
$attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
|
1780 |
+
}
|
1781 |
+
$this->elements[ $attrs['name'] ] = $attrs;
|
1782 |
+
$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
|
1783 |
+
|
1784 |
+
}
|
1785 |
+
}
|
1786 |
+
|
1787 |
+
|
1788 |
+
|
1789 |
+
?><?php
|
1790 |
+
|
1791 |
+
|
1792 |
+
|
1793 |
+
/**
|
1794 |
+
* For creating serializable abstractions of native PHP types. This class
|
1795 |
+
* allows element name/namespace, XSD type, and XML attributes to be
|
1796 |
+
* associated with a value. This is extremely useful when WSDL is not
|
1797 |
+
* used, but is also useful when WSDL is used with polymorphic types, including
|
1798 |
+
* xsd:anyType and user-defined types.
|
1799 |
+
*
|
1800 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
1801 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
1802 |
+
* @access public
|
1803 |
+
*/
|
1804 |
+
class soapval extends nusoap_base {
|
1805 |
+
/**
|
1806 |
+
* The XML element name
|
1807 |
+
*
|
1808 |
+
* @var string
|
1809 |
+
* @access private
|
1810 |
+
*/
|
1811 |
+
var $name;
|
1812 |
+
/**
|
1813 |
+
* The XML type name (string or false)
|
1814 |
+
*
|
1815 |
+
* @var mixed
|
1816 |
+
* @access private
|
1817 |
+
*/
|
1818 |
+
var $type;
|
1819 |
+
/**
|
1820 |
+
* The PHP value
|
1821 |
+
*
|
1822 |
+
* @var mixed
|
1823 |
+
* @access private
|
1824 |
+
*/
|
1825 |
+
var $value;
|
1826 |
+
/**
|
1827 |
+
* The XML element namespace (string or false)
|
1828 |
+
*
|
1829 |
+
* @var mixed
|
1830 |
+
* @access private
|
1831 |
+
*/
|
1832 |
+
var $element_ns;
|
1833 |
+
/**
|
1834 |
+
* The XML type namespace (string or false)
|
1835 |
+
*
|
1836 |
+
* @var mixed
|
1837 |
+
* @access private
|
1838 |
+
*/
|
1839 |
+
var $type_ns;
|
1840 |
+
/**
|
1841 |
+
* The XML element attributes (array or false)
|
1842 |
+
*
|
1843 |
+
* @var mixed
|
1844 |
+
* @access private
|
1845 |
+
*/
|
1846 |
+
var $attributes;
|
1847 |
+
|
1848 |
+
/**
|
1849 |
+
* constructor
|
1850 |
+
*
|
1851 |
+
* @param string $name optional name
|
1852 |
+
* @param mixed $type optional type name
|
1853 |
+
* @param mixed $value optional value
|
1854 |
+
* @param mixed $element_ns optional namespace of value
|
1855 |
+
* @param mixed $type_ns optional namespace of type
|
1856 |
+
* @param mixed $attributes associative array of attributes to add to element serialization
|
1857 |
+
* @access public
|
1858 |
+
*/
|
1859 |
+
function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
|
1860 |
+
parent::nusoap_base();
|
1861 |
+
$this->name = $name;
|
1862 |
+
$this->type = $type;
|
1863 |
+
$this->value = $value;
|
1864 |
+
$this->element_ns = $element_ns;
|
1865 |
+
$this->type_ns = $type_ns;
|
1866 |
+
$this->attributes = $attributes;
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
/**
|
1870 |
+
* return serialized value
|
1871 |
+
*
|
1872 |
+
* @param string $use The WSDL use value (encoded|literal)
|
1873 |
+
* @return string XML data
|
1874 |
+
* @access public
|
1875 |
+
*/
|
1876 |
+
function serialize($use='encoded') {
|
1877 |
+
return $this->serialize_val($this->value,$this->name,$this->type,$this->element_ns,$this->type_ns,$this->attributes,$use);
|
1878 |
+
}
|
1879 |
+
|
1880 |
+
/**
|
1881 |
+
* decodes a soapval object into a PHP native type
|
1882 |
+
*
|
1883 |
+
* @return mixed
|
1884 |
+
* @access public
|
1885 |
+
*/
|
1886 |
+
function decode(){
|
1887 |
+
return $this->value;
|
1888 |
+
}
|
1889 |
+
}
|
1890 |
+
|
1891 |
+
|
1892 |
+
|
1893 |
+
?><?php
|
1894 |
+
|
1895 |
+
|
1896 |
+
|
1897 |
+
/**
|
1898 |
+
* transport class for sending/receiving data via HTTP and HTTPS
|
1899 |
+
* NOTE: PHP must be compiled with the CURL extension for HTTPS support
|
1900 |
+
*
|
1901 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
1902 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
1903 |
+
* @access public
|
1904 |
+
*/
|
1905 |
+
class soap_transport_http extends nusoap_base {
|
1906 |
+
|
1907 |
+
var $url = '';
|
1908 |
+
var $uri = '';
|
1909 |
+
var $digest_uri = '';
|
1910 |
+
var $scheme = '';
|
1911 |
+
var $host = '';
|
1912 |
+
var $port = '';
|
1913 |
+
var $path = '';
|
1914 |
+
var $request_method = 'POST';
|
1915 |
+
var $protocol_version = '1.1';
|
1916 |
+
var $encoding = '';
|
1917 |
+
var $outgoing_headers = array();
|
1918 |
+
var $incoming_headers = array();
|
1919 |
+
var $incoming_cookies = array();
|
1920 |
+
var $outgoing_payload = '';
|
1921 |
+
var $incoming_payload = '';
|
1922 |
+
var $useSOAPAction = true;
|
1923 |
+
var $persistentConnection = false;
|
1924 |
+
var $ch = false; // cURL handle
|
1925 |
+
var $username = '';
|
1926 |
+
var $password = '';
|
1927 |
+
var $authtype = '';
|
1928 |
+
var $digestRequest = array();
|
1929 |
+
var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional)
|
1930 |
+
// cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem'
|
1931 |
+
// sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem'
|
1932 |
+
// sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem'
|
1933 |
+
// passphrase: SSL key password/passphrase
|
1934 |
+
// verifypeer: default is 1
|
1935 |
+
// verifyhost: default is 1
|
1936 |
+
|
1937 |
+
/**
|
1938 |
+
* constructor
|
1939 |
+
*/
|
1940 |
+
function soap_transport_http($url){
|
1941 |
+
parent::nusoap_base();
|
1942 |
+
$this->setURL($url);
|
1943 |
+
ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev);
|
1944 |
+
$this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')';
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
function setURL($url) {
|
1948 |
+
$this->url = $url;
|
1949 |
+
|
1950 |
+
$u = parse_url($url);
|
1951 |
+
foreach($u as $k => $v){
|
1952 |
+
$this->$k = $v;
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
// add any GET params to path
|
1956 |
+
if(isset($u['query']) && $u['query'] != ''){
|
1957 |
+
$this->path .= '?' . $u['query'];
|
1958 |
+
}
|
1959 |
+
|
1960 |
+
// set default port
|
1961 |
+
if(!isset($u['port'])){
|
1962 |
+
if($u['scheme'] == 'https'){
|
1963 |
+
$this->port = 443;
|
1964 |
+
} else {
|
1965 |
+
$this->port = 80;
|
1966 |
+
}
|
1967 |
+
}
|
1968 |
+
|
1969 |
+
$this->uri = $this->path;
|
1970 |
+
$this->digest_uri = $this->uri;
|
1971 |
+
|
1972 |
+
// build headers
|
1973 |
+
if (!isset($u['port'])) {
|
1974 |
+
$this->outgoing_headers['Host'] = $this->host;
|
1975 |
+
} else {
|
1976 |
+
$this->outgoing_headers['Host'] = $this->host.':'.$this->port;
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
if (isset($u['user']) && $u['user'] != '') {
|
1980 |
+
$this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : '');
|
1981 |
+
}
|
1982 |
+
}
|
1983 |
+
|
1984 |
+
function connect($connection_timeout=0,$response_timeout=30){
|
1985 |
+
// For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
|
1986 |
+
// "regular" socket.
|
1987 |
+
// TODO: disabled for now because OpenSSL must be *compiled* in (not just
|
1988 |
+
// loaded), and until PHP5 stream_get_wrappers is not available.
|
1989 |
+
// if ($this->scheme == 'https') {
|
1990 |
+
// if (version_compare(phpversion(), '4.3.0') >= 0) {
|
1991 |
+
// if (extension_loaded('openssl')) {
|
1992 |
+
// $this->scheme = 'ssl';
|
1993 |
+
// }
|
1994 |
+
// }
|
1995 |
+
// }
|
1996 |
+
if ($this->scheme == 'http' || $this->scheme == 'ssl') {
|
1997 |
+
// use persistent connection
|
1998 |
+
if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){
|
1999 |
+
if (!feof($this->fp)) {
|
2000 |
+
return true;
|
2001 |
+
}
|
2002 |
+
fclose($this->fp);
|
2003 |
+
}
|
2004 |
+
|
2005 |
+
// munge host if using OpenSSL
|
2006 |
+
if ($this->scheme == 'ssl') {
|
2007 |
+
$host = 'ssl://' . $this->host;
|
2008 |
+
} else {
|
2009 |
+
$host = $this->host;
|
2010 |
+
}
|
2011 |
+
|
2012 |
+
// open socket
|
2013 |
+
if($connection_timeout > 0){
|
2014 |
+
$this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout);
|
2015 |
+
} else {
|
2016 |
+
$this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str);
|
2017 |
+
}
|
2018 |
+
|
2019 |
+
// test pointer
|
2020 |
+
if(!$this->fp) {
|
2021 |
+
$msg = 'Couldn\'t open socket connection to server ' . $this->url;
|
2022 |
+
if ($this->errno) {
|
2023 |
+
$msg .= ', Error ('.$this->errno.'): '.$this->error_str;
|
2024 |
+
} else {
|
2025 |
+
$msg .= ' prior to connect(). This is often a problem looking up the host name.';
|
2026 |
+
}
|
2027 |
+
$this->setError($msg);
|
2028 |
+
return false;
|
2029 |
+
}
|
2030 |
+
|
2031 |
+
// set response timeout
|
2032 |
+
socket_set_timeout( $this->fp, $response_timeout);
|
2033 |
+
|
2034 |
+
return true;
|
2035 |
+
} else if ($this->scheme == 'https') {
|
2036 |
+
if (!extension_loaded('curl')) {
|
2037 |
+
$this->setError('CURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS');
|
2038 |
+
return false;
|
2039 |
+
}
|
2040 |
+
// init CURL
|
2041 |
+
$this->ch = curl_init();
|
2042 |
+
// set url
|
2043 |
+
$hostURL = ($this->port != '') ? "https://$this->host:$this->port" : "https://$this->host";
|
2044 |
+
// add path
|
2045 |
+
$hostURL .= $this->path;
|
2046 |
+
curl_setopt($this->ch, CURLOPT_URL, $hostURL);
|
2047 |
+
// follow location headers (re-directs)
|
2048 |
+
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1);
|
2049 |
+
// ask for headers in the response output
|
2050 |
+
curl_setopt($this->ch, CURLOPT_HEADER, 1);
|
2051 |
+
// ask for the response output as the return value
|
2052 |
+
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
|
2053 |
+
// encode
|
2054 |
+
// We manage this ourselves through headers and encoding
|
2055 |
+
// if(function_exists('gzuncompress')){
|
2056 |
+
// curl_setopt($this->ch, CURLOPT_ENCODING, 'deflate');
|
2057 |
+
// }
|
2058 |
+
// persistent connection
|
2059 |
+
if ($this->persistentConnection) {
|
2060 |
+
// The way we send data, we cannot use persistent connections, since
|
2061 |
+
// there will be some "junk" at the end of our request.
|
2062 |
+
//curl_setopt($this->ch, CURL_HTTP_VERSION_1_1, true);
|
2063 |
+
$this->persistentConnection = false;
|
2064 |
+
$this->outgoing_headers['Connection'] = 'close';
|
2065 |
+
}
|
2066 |
+
// set timeout
|
2067 |
+
if ($connection_timeout != 0) {
|
2068 |
+
curl_setopt($this->ch, CURLOPT_TIMEOUT, $connection_timeout);
|
2069 |
+
}
|
2070 |
+
// TODO: cURL has added a connection timeout separate from the response timeout
|
2071 |
+
//if ($connection_timeout != 0) {
|
2072 |
+
// curl_setopt($this->ch, CURLOPT_CONNECTIONTIMEOUT, $connection_timeout);
|
2073 |
+
//}
|
2074 |
+
//if ($response_timeout != 0) {
|
2075 |
+
// curl_setopt($this->ch, CURLOPT_TIMEOUT, $response_timeout);
|
2076 |
+
//}
|
2077 |
+
|
2078 |
+
// recent versions of cURL turn on peer/host checking by default,
|
2079 |
+
// while PHP binaries are not compiled with a default location for the
|
2080 |
+
// CA cert bundle, so disable peer/host checking.
|
2081 |
+
//curl_setopt($this->ch, CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');
|
2082 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);
|
2083 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
|
2084 |
+
|
2085 |
+
// support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo)
|
2086 |
+
if ($this->authtype == 'certificate') {
|
2087 |
+
if (isset($this->certRequest['cainfofile'])) {
|
2088 |
+
curl_setopt($this->ch, CURLOPT_CAINFO, $this->certRequest['cainfofile']);
|
2089 |
+
}
|
2090 |
+
if (isset($this->certRequest['verifypeer'])) {
|
2091 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']);
|
2092 |
+
} else {
|
2093 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 1);
|
2094 |
+
}
|
2095 |
+
if (isset($this->certRequest['verifyhost'])) {
|
2096 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']);
|
2097 |
+
} else {
|
2098 |
+
curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 1);
|
2099 |
+
}
|
2100 |
+
if (isset($this->certRequest['sslcertfile'])) {
|
2101 |
+
curl_setopt($this->ch, CURLOPT_SSLCERT, $this->certRequest['sslcertfile']);
|
2102 |
+
}
|
2103 |
+
if (isset($this->certRequest['sslkeyfile'])) {
|
2104 |
+
curl_setopt($this->ch, CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']);
|
2105 |
+
}
|
2106 |
+
if (isset($this->certRequest['passphrase'])) {
|
2107 |
+
curl_setopt($this->ch, CURLOPT_SSLKEYPASSWD , $this->certRequest['passphrase']);
|
2108 |
+
}
|
2109 |
+
}
|
2110 |
+
return true;
|
2111 |
+
} else {
|
2112 |
+
$this->setError('Unknown scheme ' . $this->scheme);
|
2113 |
+
return false;
|
2114 |
+
}
|
2115 |
+
}
|
2116 |
+
|
2117 |
+
/**
|
2118 |
+
* send the SOAP message via HTTP
|
2119 |
+
*
|
2120 |
+
* @param string $data message data
|
2121 |
+
* @param integer $timeout set connection timeout in seconds
|
2122 |
+
* @param integer $response_timeout set response timeout in seconds
|
2123 |
+
* @param array $cookies cookies to send
|
2124 |
+
* @return string data
|
2125 |
+
* @access public
|
2126 |
+
*/
|
2127 |
+
function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) {
|
2128 |
+
|
2129 |
+
|
2130 |
+
$this->tryagain = true;
|
2131 |
+
$tries = 0;
|
2132 |
+
while ($this->tryagain) {
|
2133 |
+
$this->tryagain = false;
|
2134 |
+
if ($tries++ < 2) {
|
2135 |
+
// make connnection
|
2136 |
+
if (!$this->connect($timeout, $response_timeout)){
|
2137 |
+
return false;
|
2138 |
+
}
|
2139 |
+
|
2140 |
+
// send request
|
2141 |
+
if (!$this->sendRequest($data, $cookies)){
|
2142 |
+
return false;
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
// get response
|
2146 |
+
$respdata = $this->getResponse();
|
2147 |
+
} else {
|
2148 |
+
$this->setError('Too many tries to get an OK response');
|
2149 |
+
}
|
2150 |
+
}
|
2151 |
+
return $respdata;
|
2152 |
+
}
|
2153 |
+
|
2154 |
+
|
2155 |
+
/**
|
2156 |
+
* send the SOAP message via HTTPS 1.0 using CURL
|
2157 |
+
*
|
2158 |
+
* @param string $msg message data
|
2159 |
+
* @param integer $timeout set connection timeout in seconds
|
2160 |
+
* @param integer $response_timeout set response timeout in seconds
|
2161 |
+
* @param array $cookies cookies to send
|
2162 |
+
* @return string data
|
2163 |
+
* @access public
|
2164 |
+
*/
|
2165 |
+
function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) {
|
2166 |
+
return $this->send($data, $timeout, $response_timeout, $cookies);
|
2167 |
+
}
|
2168 |
+
|
2169 |
+
/**
|
2170 |
+
* if authenticating, set user credentials here
|
2171 |
+
*
|
2172 |
+
* @param string $username
|
2173 |
+
* @param string $password
|
2174 |
+
* @param string $authtype (basic, digest, certificate)
|
2175 |
+
* @param array $digestRequest (keys must be nonce, nc, realm, qop)
|
2176 |
+
* @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
|
2177 |
+
* @access public
|
2178 |
+
*/
|
2179 |
+
function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) {
|
2180 |
+
// cf. RFC 2617
|
2181 |
+
if ($authtype == 'basic') {
|
2182 |
+
$this->outgoing_headers['Authorization'] = 'Basic '.base64_encode(str_replace(':','',$username).':'.$password);
|
2183 |
+
} elseif ($authtype == 'digest') {
|
2184 |
+
if (isset($digestRequest['nonce'])) {
|
2185 |
+
$digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1;
|
2186 |
+
|
2187 |
+
// calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html)
|
2188 |
+
|
2189 |
+
// A1 = unq(username-value) ":" unq(realm-value) ":" passwd
|
2190 |
+
$A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password;
|
2191 |
+
|
2192 |
+
// H(A1) = MD5(A1)
|
2193 |
+
$HA1 = md5($A1);
|
2194 |
+
|
2195 |
+
// A2 = Method ":" digest-uri-value
|
2196 |
+
$A2 = 'POST:' . $this->digest_uri;
|
2197 |
+
|
2198 |
+
// H(A2)
|
2199 |
+
$HA2 = md5($A2);
|
2200 |
+
|
2201 |
+
// KD(secret, data) = H(concat(secret, ":", data))
|
2202 |
+
// if qop == auth:
|
2203 |
+
// request-digest = <"> < KD ( H(A1), unq(nonce-value)
|
2204 |
+
// ":" nc-value
|
2205 |
+
// ":" unq(cnonce-value)
|
2206 |
+
// ":" unq(qop-value)
|
2207 |
+
// ":" H(A2)
|
2208 |
+
// ) <">
|
2209 |
+
// if qop is missing,
|
2210 |
+
// request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <">
|
2211 |
+
|
2212 |
+
$unhashedDigest = '';
|
2213 |
+
$nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : '';
|
2214 |
+
$cnonce = $nonce;
|
2215 |
+
if ($digestRequest['qop'] != '') {
|
2216 |
+
$unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2;
|
2217 |
+
} else {
|
2218 |
+
$unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2;
|
2219 |
+
}
|
2220 |
+
|
2221 |
+
$hashedDigest = md5($unhashedDigest);
|
2222 |
+
|
2223 |
+
$this->outgoing_headers['Authorization'] = 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"';
|
2224 |
+
}
|
2225 |
+
} elseif ($authtype == 'certificate') {
|
2226 |
+
$this->certRequest = $certRequest;
|
2227 |
+
}
|
2228 |
+
$this->username = $username;
|
2229 |
+
$this->password = $password;
|
2230 |
+
$this->authtype = $authtype;
|
2231 |
+
$this->digestRequest = $digestRequest;
|
2232 |
+
|
2233 |
+
if (isset($this->outgoing_headers['Authorization'])) {
|
2234 |
+
} else {
|
2235 |
+
}
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
/**
|
2239 |
+
* set the soapaction value
|
2240 |
+
*
|
2241 |
+
* @param string $soapaction
|
2242 |
+
* @access public
|
2243 |
+
*/
|
2244 |
+
function setSOAPAction($soapaction) {
|
2245 |
+
$this->outgoing_headers['SOAPAction'] = '"' . $soapaction . '"';
|
2246 |
+
}
|
2247 |
+
|
2248 |
+
/**
|
2249 |
+
* use http encoding
|
2250 |
+
*
|
2251 |
+
* @param string $enc encoding style. supported values: gzip, deflate, or both
|
2252 |
+
* @access public
|
2253 |
+
*/
|
2254 |
+
function setEncoding($enc='gzip, deflate') {
|
2255 |
+
if (function_exists('gzdeflate')) {
|
2256 |
+
$this->protocol_version = '1.1';
|
2257 |
+
$this->outgoing_headers['Accept-Encoding'] = $enc;
|
2258 |
+
if (!isset($this->outgoing_headers['Connection'])) {
|
2259 |
+
$this->outgoing_headers['Connection'] = 'close';
|
2260 |
+
$this->persistentConnection = false;
|
2261 |
+
}
|
2262 |
+
set_magic_quotes_runtime(0);
|
2263 |
+
// deprecated
|
2264 |
+
$this->encoding = $enc;
|
2265 |
+
}
|
2266 |
+
}
|
2267 |
+
|
2268 |
+
/**
|
2269 |
+
* set proxy info here
|
2270 |
+
*
|
2271 |
+
* @param string $proxyhost
|
2272 |
+
* @param string $proxyport
|
2273 |
+
* @param string $proxyusername
|
2274 |
+
* @param string $proxypassword
|
2275 |
+
* @access public
|
2276 |
+
*/
|
2277 |
+
function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') {
|
2278 |
+
$this->uri = $this->url;
|
2279 |
+
$this->host = $proxyhost;
|
2280 |
+
$this->port = $proxyport;
|
2281 |
+
if ($proxyusername != '' && $proxypassword != '') {
|
2282 |
+
$this->outgoing_headers['Proxy-Authorization'] = ' Basic '.base64_encode($proxyusername.':'.$proxypassword);
|
2283 |
+
}
|
2284 |
+
}
|
2285 |
+
|
2286 |
+
/**
|
2287 |
+
* decode a string that is encoded w/ "chunked' transfer encoding
|
2288 |
+
* as defined in RFC2068 19.4.6
|
2289 |
+
*
|
2290 |
+
* @param string $buffer
|
2291 |
+
* @param string $lb
|
2292 |
+
* @returns string
|
2293 |
+
* @access public
|
2294 |
+
* @deprecated
|
2295 |
+
*/
|
2296 |
+
function decodeChunked($buffer, $lb){
|
2297 |
+
// length := 0
|
2298 |
+
$length = 0;
|
2299 |
+
$new = '';
|
2300 |
+
|
2301 |
+
// read chunk-size, chunk-extension (if any) and CRLF
|
2302 |
+
// get the position of the linebreak
|
2303 |
+
$chunkend = strpos($buffer, $lb);
|
2304 |
+
if ($chunkend == FALSE) {
|
2305 |
+
return $new;
|
2306 |
+
}
|
2307 |
+
$temp = substr($buffer,0,$chunkend);
|
2308 |
+
$chunk_size = hexdec( trim($temp) );
|
2309 |
+
$chunkstart = $chunkend + strlen($lb);
|
2310 |
+
// while (chunk-size > 0) {
|
2311 |
+
while ($chunk_size > 0) {
|
2312 |
+
$chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size);
|
2313 |
+
|
2314 |
+
// Just in case we got a broken connection
|
2315 |
+
if ($chunkend == FALSE) {
|
2316 |
+
$chunk = substr($buffer,$chunkstart);
|
2317 |
+
// append chunk-data to entity-body
|
2318 |
+
$new .= $chunk;
|
2319 |
+
$length += strlen($chunk);
|
2320 |
+
break;
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
// read chunk-data and CRLF
|
2324 |
+
$chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart);
|
2325 |
+
// append chunk-data to entity-body
|
2326 |
+
$new .= $chunk;
|
2327 |
+
// length := length + chunk-size
|
2328 |
+
$length += strlen($chunk);
|
2329 |
+
// read chunk-size and CRLF
|
2330 |
+
$chunkstart = $chunkend + strlen($lb);
|
2331 |
+
|
2332 |
+
$chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
|
2333 |
+
if ($chunkend == FALSE) {
|
2334 |
+
break; //Just in case we got a broken connection
|
2335 |
+
}
|
2336 |
+
$temp = substr($buffer,$chunkstart,$chunkend-$chunkstart);
|
2337 |
+
$chunk_size = hexdec( trim($temp) );
|
2338 |
+
$chunkstart = $chunkend;
|
2339 |
+
}
|
2340 |
+
return $new;
|
2341 |
+
}
|
2342 |
+
|
2343 |
+
/*
|
2344 |
+
* Writes payload, including HTTP headers, to $this->outgoing_payload.
|
2345 |
+
*/
|
2346 |
+
function buildPayload($data, $cookie_str = '') {
|
2347 |
+
// add content-length header
|
2348 |
+
$this->outgoing_headers['Content-Length'] = strlen($data);
|
2349 |
+
|
2350 |
+
// start building outgoing payload:
|
2351 |
+
$req = "$this->request_method $this->uri HTTP/$this->protocol_version";
|
2352 |
+
$this->outgoing_payload = "$req\r\n";
|
2353 |
+
|
2354 |
+
// loop thru headers, serializing
|
2355 |
+
foreach($this->outgoing_headers as $k => $v){
|
2356 |
+
$hdr = $k.': '.$v;
|
2357 |
+
$this->outgoing_payload .= "$hdr\r\n";
|
2358 |
+
}
|
2359 |
+
|
2360 |
+
// add any cookies
|
2361 |
+
if ($cookie_str != '') {
|
2362 |
+
$hdr = 'Cookie: '.$cookie_str;
|
2363 |
+
$this->outgoing_payload .= "$hdr\r\n";
|
2364 |
+
}
|
2365 |
+
|
2366 |
+
// header/body separator
|
2367 |
+
$this->outgoing_payload .= "\r\n";
|
2368 |
+
|
2369 |
+
// add data
|
2370 |
+
$this->outgoing_payload .= $data;
|
2371 |
+
}
|
2372 |
+
|
2373 |
+
function sendRequest($data, $cookies = NULL) {
|
2374 |
+
// build cookie string
|
2375 |
+
$cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https')));
|
2376 |
+
|
2377 |
+
// build payload
|
2378 |
+
$this->buildPayload($data, $cookie_str);
|
2379 |
+
|
2380 |
+
if ($this->scheme == 'http' || $this->scheme == 'ssl') {
|
2381 |
+
// send payload
|
2382 |
+
if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {
|
2383 |
+
$this->setError('couldn\'t write message data to socket');
|
2384 |
+
return false;
|
2385 |
+
}
|
2386 |
+
return true;
|
2387 |
+
} else if ($this->scheme == 'https') {
|
2388 |
+
// set payload
|
2389 |
+
// TODO: cURL does say this should only be the verb, and in fact it
|
2390 |
+
// turns out that the URI and HTTP version are appended to this, which
|
2391 |
+
// some servers refuse to work with
|
2392 |
+
//curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $this->outgoing_payload);
|
2393 |
+
foreach($this->outgoing_headers as $k => $v){
|
2394 |
+
$curl_headers[] = "$k: $v";
|
2395 |
+
}
|
2396 |
+
if ($cookie_str != '') {
|
2397 |
+
$curl_headers[] = 'Cookie: ' . $cookie_str;
|
2398 |
+
}
|
2399 |
+
curl_setopt($this->ch, CURLOPT_HTTPHEADER, $curl_headers);
|
2400 |
+
if ($this->request_method == "POST") {
|
2401 |
+
curl_setopt($this->ch, CURLOPT_POST, 1);
|
2402 |
+
curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data);
|
2403 |
+
} else {
|
2404 |
+
}
|
2405 |
+
return true;
|
2406 |
+
}
|
2407 |
+
}
|
2408 |
+
|
2409 |
+
function getResponse(){
|
2410 |
+
$this->incoming_payload = '';
|
2411 |
+
|
2412 |
+
if ($this->scheme == 'http' || $this->scheme == 'ssl') {
|
2413 |
+
// loop until headers have been retrieved
|
2414 |
+
$data = '';
|
2415 |
+
while (!isset($lb)){
|
2416 |
+
|
2417 |
+
// We might EOF during header read.
|
2418 |
+
if(feof($this->fp)) {
|
2419 |
+
$this->incoming_payload = $data;
|
2420 |
+
$this->setError('server failed to send headers');
|
2421 |
+
return false;
|
2422 |
+
}
|
2423 |
+
|
2424 |
+
$tmp = fgets($this->fp, 256);
|
2425 |
+
$tmplen = strlen($tmp);
|
2426 |
+
|
2427 |
+
if ($tmplen == 0) {
|
2428 |
+
$this->incoming_payload = $data;
|
2429 |
+
$this->setError('socket read of headers timed out');
|
2430 |
+
return false;
|
2431 |
+
}
|
2432 |
+
|
2433 |
+
$data .= $tmp;
|
2434 |
+
$pos = strpos($data,"\r\n\r\n");
|
2435 |
+
if($pos > 1){
|
2436 |
+
$lb = "\r\n";
|
2437 |
+
} else {
|
2438 |
+
$pos = strpos($data,"\n\n");
|
2439 |
+
if($pos > 1){
|
2440 |
+
$lb = "\n";
|
2441 |
+
}
|
2442 |
+
}
|
2443 |
+
// remove 100 header
|
2444 |
+
if(isset($lb) && ereg('^HTTP/1.1 100',$data)){
|
2445 |
+
unset($lb);
|
2446 |
+
$data = '';
|
2447 |
+
}//
|
2448 |
+
}
|
2449 |
+
// store header data
|
2450 |
+
$this->incoming_payload .= $data;
|
2451 |
+
// process headers
|
2452 |
+
$header_data = trim(substr($data,0,$pos));
|
2453 |
+
$header_array = explode($lb,$header_data);
|
2454 |
+
$this->incoming_headers = array();
|
2455 |
+
$this->incoming_cookies = array();
|
2456 |
+
foreach($header_array as $header_line){
|
2457 |
+
$arr = explode(':',$header_line, 2);
|
2458 |
+
if(count($arr) > 1){
|
2459 |
+
$header_name = strtolower(trim($arr[0]));
|
2460 |
+
$this->incoming_headers[$header_name] = trim($arr[1]);
|
2461 |
+
if ($header_name == 'set-cookie') {
|
2462 |
+
// TODO: allow multiple cookies from parseCookie
|
2463 |
+
$cookie = $this->parseCookie(trim($arr[1]));
|
2464 |
+
if ($cookie) {
|
2465 |
+
$this->incoming_cookies[] = $cookie;
|
2466 |
+
} else {
|
2467 |
+
}
|
2468 |
+
}
|
2469 |
+
} else if (isset($header_name)) {
|
2470 |
+
// append continuation line to previous header
|
2471 |
+
$this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
|
2472 |
+
}
|
2473 |
+
}
|
2474 |
+
|
2475 |
+
// loop until msg has been received
|
2476 |
+
if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') {
|
2477 |
+
$content_length = 2147483647; // ignore any content-length header
|
2478 |
+
$chunked = true;
|
2479 |
+
} elseif (isset($this->incoming_headers['content-length'])) {
|
2480 |
+
$content_length = $this->incoming_headers['content-length'];
|
2481 |
+
$chunked = false;
|
2482 |
+
} else {
|
2483 |
+
$content_length = 2147483647;
|
2484 |
+
$chunked = false;
|
2485 |
+
}
|
2486 |
+
$data = '';
|
2487 |
+
do {
|
2488 |
+
if ($chunked) {
|
2489 |
+
$tmp = fgets($this->fp, 256);
|
2490 |
+
$tmplen = strlen($tmp);
|
2491 |
+
if ($tmplen == 0) {
|
2492 |
+
$this->incoming_payload = $data;
|
2493 |
+
$this->setError('socket read of chunk length timed out');
|
2494 |
+
return false;
|
2495 |
+
}
|
2496 |
+
$content_length = hexdec(trim($tmp));
|
2497 |
+
}
|
2498 |
+
$strlen = 0;
|
2499 |
+
while (($strlen < $content_length) && (!feof($this->fp))) {
|
2500 |
+
$readlen = min(8192, $content_length - $strlen);
|
2501 |
+
$tmp = fread($this->fp, $readlen);
|
2502 |
+
$tmplen = strlen($tmp);
|
2503 |
+
if (($tmplen == 0) && (!feof($this->fp))) {
|
2504 |
+
$this->incoming_payload = $data;
|
2505 |
+
$this->setError('socket read of body timed out');
|
2506 |
+
return false;
|
2507 |
+
}
|
2508 |
+
$strlen += $tmplen;
|
2509 |
+
$data .= $tmp;
|
2510 |
+
}
|
2511 |
+
if ($chunked && ($content_length > 0)) {
|
2512 |
+
$tmp = fgets($this->fp, 256);
|
2513 |
+
$tmplen = strlen($tmp);
|
2514 |
+
if ($tmplen == 0) {
|
2515 |
+
$this->incoming_payload = $data;
|
2516 |
+
$this->setError('socket read of chunk terminator timed out');
|
2517 |
+
return false;
|
2518 |
+
}
|
2519 |
+
}
|
2520 |
+
} while ($chunked && ($content_length > 0) && (!feof($this->fp)));
|
2521 |
+
if (feof($this->fp)) {
|
2522 |
+
}
|
2523 |
+
$this->incoming_payload .= $data;
|
2524 |
+
|
2525 |
+
// close filepointer
|
2526 |
+
if(
|
2527 |
+
(isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') ||
|
2528 |
+
(! $this->persistentConnection) || feof($this->fp)){
|
2529 |
+
fclose($this->fp);
|
2530 |
+
$this->fp = false;
|
2531 |
+
}
|
2532 |
+
|
2533 |
+
// connection was closed unexpectedly
|
2534 |
+
if($this->incoming_payload == ''){
|
2535 |
+
$this->setError('no response from server');
|
2536 |
+
return false;
|
2537 |
+
}
|
2538 |
+
|
2539 |
+
// decode transfer-encoding
|
2540 |
+
// if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){
|
2541 |
+
// if(!$data = $this->decodeChunked($data, $lb)){
|
2542 |
+
// $this->setError('Decoding of chunked data failed');
|
2543 |
+
// return false;
|
2544 |
+
// }
|
2545 |
+
//print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>";
|
2546 |
+
// set decoded payload
|
2547 |
+
// $this->incoming_payload = $header_data.$lb.$lb.$data;
|
2548 |
+
// }
|
2549 |
+
|
2550 |
+
} else if ($this->scheme == 'https') {
|
2551 |
+
// send and receive
|
2552 |
+
$this->incoming_payload = curl_exec($this->ch);
|
2553 |
+
$data = $this->incoming_payload;
|
2554 |
+
|
2555 |
+
$cErr = curl_error($this->ch);
|
2556 |
+
if ($cErr != '') {
|
2557 |
+
$err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>';
|
2558 |
+
// TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE
|
2559 |
+
foreach(curl_getinfo($this->ch) as $k => $v){
|
2560 |
+
$err .= "$k: $v<br>";
|
2561 |
+
}
|
2562 |
+
$this->setError($err);
|
2563 |
+
curl_close($this->ch);
|
2564 |
+
return false;
|
2565 |
+
} else {
|
2566 |
+
//echo '<pre>';
|
2567 |
+
//var_dump(curl_getinfo($this->ch));
|
2568 |
+
//echo '</pre>';
|
2569 |
+
}
|
2570 |
+
// close curl
|
2571 |
+
curl_close($this->ch);
|
2572 |
+
|
2573 |
+
// remove 100 header(s)
|
2574 |
+
while (ereg('^HTTP/1.1 100',$data)) {
|
2575 |
+
if ($pos = strpos($data,"\r\n\r\n")) {
|
2576 |
+
$data = ltrim(substr($data,$pos));
|
2577 |
+
} elseif($pos = strpos($data,"\n\n") ) {
|
2578 |
+
$data = ltrim(substr($data,$pos));
|
2579 |
+
}
|
2580 |
+
}
|
2581 |
+
|
2582 |
+
// separate content from HTTP headers
|
2583 |
+
if ($pos = strpos($data,"\r\n\r\n")) {
|
2584 |
+
$lb = "\r\n";
|
2585 |
+
} elseif( $pos = strpos($data,"\n\n")) {
|
2586 |
+
$lb = "\n";
|
2587 |
+
} else {
|
2588 |
+
$this->setError('no proper separation of headers and document');
|
2589 |
+
return false;
|
2590 |
+
}
|
2591 |
+
$header_data = trim(substr($data,0,$pos));
|
2592 |
+
$header_array = explode($lb,$header_data);
|
2593 |
+
$data = ltrim(substr($data,$pos));
|
2594 |
+
// clean headers
|
2595 |
+
foreach ($header_array as $header_line) {
|
2596 |
+
$arr = explode(':',$header_line,2);
|
2597 |
+
if(count($arr) > 1){
|
2598 |
+
$header_name = strtolower(trim($arr[0]));
|
2599 |
+
$this->incoming_headers[$header_name] = trim($arr[1]);
|
2600 |
+
if ($header_name == 'set-cookie') {
|
2601 |
+
// TODO: allow multiple cookies from parseCookie
|
2602 |
+
$cookie = $this->parseCookie(trim($arr[1]));
|
2603 |
+
if ($cookie) {
|
2604 |
+
$this->incoming_cookies[] = $cookie;
|
2605 |
+
} else {
|
2606 |
+
}
|
2607 |
+
}
|
2608 |
+
} else if (isset($header_name)) {
|
2609 |
+
// append continuation line to previous header
|
2610 |
+
$this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
|
2611 |
+
}
|
2612 |
+
}
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
$arr = explode(' ', $header_array[0], 3);
|
2616 |
+
$http_version = $arr[0];
|
2617 |
+
$http_status = intval($arr[1]);
|
2618 |
+
$http_reason = count($arr) > 2 ? $arr[2] : '';
|
2619 |
+
|
2620 |
+
// see if we need to resend the request with http digest authentication
|
2621 |
+
if (isset($this->incoming_headers['location']) && $http_status == 301) {
|
2622 |
+
$this->setURL($this->incoming_headers['location']);
|
2623 |
+
$this->tryagain = true;
|
2624 |
+
return false;
|
2625 |
+
}
|
2626 |
+
|
2627 |
+
// see if we need to resend the request with http digest authentication
|
2628 |
+
if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) {
|
2629 |
+
if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) {
|
2630 |
+
// remove "Digest " from our elements
|
2631 |
+
$digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']);
|
2632 |
+
|
2633 |
+
// parse elements into array
|
2634 |
+
$digestElements = explode(',', $digestString);
|
2635 |
+
foreach ($digestElements as $val) {
|
2636 |
+
$tempElement = explode('=', trim($val), 2);
|
2637 |
+
$digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]);
|
2638 |
+
}
|
2639 |
+
|
2640 |
+
// should have (at least) qop, realm, nonce
|
2641 |
+
if (isset($digestRequest['nonce'])) {
|
2642 |
+
$this->setCredentials($this->username, $this->password, 'digest', $digestRequest);
|
2643 |
+
$this->tryagain = true;
|
2644 |
+
return false;
|
2645 |
+
}
|
2646 |
+
}
|
2647 |
+
$this->setError('HTTP authentication failed');
|
2648 |
+
return false;
|
2649 |
+
}
|
2650 |
+
|
2651 |
+
if (
|
2652 |
+
($http_status >= 300 && $http_status <= 307) ||
|
2653 |
+
($http_status >= 400 && $http_status <= 417) ||
|
2654 |
+
($http_status >= 501 && $http_status <= 505)
|
2655 |
+
) {
|
2656 |
+
$this->setError("Unsupported HTTP response status $http_status $http_reason (soap_client->response has contents of the response)");
|
2657 |
+
return false;
|
2658 |
+
}
|
2659 |
+
|
2660 |
+
// decode content-encoding
|
2661 |
+
if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){
|
2662 |
+
if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){
|
2663 |
+
// if decoding works, use it. else assume data wasn't gzencoded
|
2664 |
+
if(function_exists('gzinflate')){
|
2665 |
+
//$timer->setMarker('starting decoding of gzip/deflated content');
|
2666 |
+
// IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress)
|
2667 |
+
// this means there are no Zlib headers, although there should be
|
2668 |
+
$datalen = strlen($data);
|
2669 |
+
if ($this->incoming_headers['content-encoding'] == 'deflate') {
|
2670 |
+
if ($degzdata = @gzinflate($data)) {
|
2671 |
+
$data = $degzdata;
|
2672 |
+
if (strlen($data) < $datalen) {
|
2673 |
+
// test for the case that the payload has been compressed twice
|
2674 |
+
if ($degzdata = @gzinflate($data)) {
|
2675 |
+
$data = $degzdata;
|
2676 |
+
}
|
2677 |
+
}
|
2678 |
+
} else {
|
2679 |
+
$this->setError('Error using gzinflate to inflate the payload');
|
2680 |
+
}
|
2681 |
+
} elseif ($this->incoming_headers['content-encoding'] == 'gzip') {
|
2682 |
+
if ($degzdata = @gzinflate(substr($data, 10))) { // do our best
|
2683 |
+
$data = $degzdata;
|
2684 |
+
if (strlen($data) < $datalen) {
|
2685 |
+
// test for the case that the payload has been compressed twice
|
2686 |
+
if ($degzdata = @gzinflate(substr($data, 10))) {
|
2687 |
+
$data = $degzdata;
|
2688 |
+
}
|
2689 |
+
}
|
2690 |
+
} else {
|
2691 |
+
$this->setError('Error using gzinflate to un-gzip the payload');
|
2692 |
+
}
|
2693 |
+
}
|
2694 |
+
//$timer->setMarker('finished decoding of gzip/deflated content');
|
2695 |
+
//print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>";
|
2696 |
+
// set decoded payload
|
2697 |
+
$this->incoming_payload = $header_data.$lb.$lb.$data;
|
2698 |
+
} else {
|
2699 |
+
$this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.');
|
2700 |
+
}
|
2701 |
+
} else {
|
2702 |
+
$this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']);
|
2703 |
+
}
|
2704 |
+
} else {
|
2705 |
+
}
|
2706 |
+
|
2707 |
+
if(strlen($data) == 0){
|
2708 |
+
$this->setError('no data present after HTTP headers');
|
2709 |
+
return false;
|
2710 |
+
}
|
2711 |
+
|
2712 |
+
return $data;
|
2713 |
+
}
|
2714 |
+
|
2715 |
+
function setContentType($type, $charset = false) {
|
2716 |
+
$this->outgoing_headers['Content-Type'] = $type . ($charset ? '; charset=' . $charset : '');
|
2717 |
+
}
|
2718 |
+
|
2719 |
+
function usePersistentConnection(){
|
2720 |
+
if (isset($this->outgoing_headers['Accept-Encoding'])) {
|
2721 |
+
return false;
|
2722 |
+
}
|
2723 |
+
$this->protocol_version = '1.1';
|
2724 |
+
$this->persistentConnection = true;
|
2725 |
+
$this->outgoing_headers['Connection'] = 'Keep-Alive';
|
2726 |
+
return true;
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
/**
|
2730 |
+
* parse an incoming Cookie into it's parts
|
2731 |
+
*
|
2732 |
+
* @param string $cookie_str content of cookie
|
2733 |
+
* @return array with data of that cookie
|
2734 |
+
* @access private
|
2735 |
+
*/
|
2736 |
+
/*
|
2737 |
+
* TODO: allow a Set-Cookie string to be parsed into multiple cookies
|
2738 |
+
*/
|
2739 |
+
function parseCookie($cookie_str) {
|
2740 |
+
$cookie_str = str_replace('; ', ';', $cookie_str) . ';';
|
2741 |
+
$data = split(';', $cookie_str);
|
2742 |
+
$value_str = $data[0];
|
2743 |
+
|
2744 |
+
$cookie_param = 'domain=';
|
2745 |
+
$start = strpos($cookie_str, $cookie_param);
|
2746 |
+
if ($start > 0) {
|
2747 |
+
$domain = substr($cookie_str, $start + strlen($cookie_param));
|
2748 |
+
$domain = substr($domain, 0, strpos($domain, ';'));
|
2749 |
+
} else {
|
2750 |
+
$domain = '';
|
2751 |
+
}
|
2752 |
+
|
2753 |
+
$cookie_param = 'expires=';
|
2754 |
+
$start = strpos($cookie_str, $cookie_param);
|
2755 |
+
if ($start > 0) {
|
2756 |
+
$expires = substr($cookie_str, $start + strlen($cookie_param));
|
2757 |
+
$expires = substr($expires, 0, strpos($expires, ';'));
|
2758 |
+
} else {
|
2759 |
+
$expires = '';
|
2760 |
+
}
|
2761 |
+
|
2762 |
+
$cookie_param = 'path=';
|
2763 |
+
$start = strpos($cookie_str, $cookie_param);
|
2764 |
+
if ( $start > 0 ) {
|
2765 |
+
$path = substr($cookie_str, $start + strlen($cookie_param));
|
2766 |
+
$path = substr($path, 0, strpos($path, ';'));
|
2767 |
+
} else {
|
2768 |
+
$path = '/';
|
2769 |
+
}
|
2770 |
+
|
2771 |
+
$cookie_param = ';secure;';
|
2772 |
+
if (strpos($cookie_str, $cookie_param) !== FALSE) {
|
2773 |
+
$secure = true;
|
2774 |
+
} else {
|
2775 |
+
$secure = false;
|
2776 |
+
}
|
2777 |
+
|
2778 |
+
$sep_pos = strpos($value_str, '=');
|
2779 |
+
|
2780 |
+
if ($sep_pos) {
|
2781 |
+
$name = substr($value_str, 0, $sep_pos);
|
2782 |
+
$value = substr($value_str, $sep_pos + 1);
|
2783 |
+
$cookie= array( 'name' => $name,
|
2784 |
+
'value' => $value,
|
2785 |
+
'domain' => $domain,
|
2786 |
+
'path' => $path,
|
2787 |
+
'expires' => $expires,
|
2788 |
+
'secure' => $secure
|
2789 |
+
);
|
2790 |
+
return $cookie;
|
2791 |
+
}
|
2792 |
+
return false;
|
2793 |
+
}
|
2794 |
+
|
2795 |
+
/**
|
2796 |
+
* sort out cookies for the current request
|
2797 |
+
*
|
2798 |
+
* @param array $cookies array with all cookies
|
2799 |
+
* @param boolean $secure is the send-content secure or not?
|
2800 |
+
* @return string for Cookie-HTTP-Header
|
2801 |
+
* @access private
|
2802 |
+
*/
|
2803 |
+
function getCookiesForRequest($cookies, $secure=false) {
|
2804 |
+
$cookie_str = '';
|
2805 |
+
if ((! is_null($cookies)) && (is_array($cookies))) {
|
2806 |
+
foreach ($cookies as $cookie) {
|
2807 |
+
if (! is_array($cookie)) {
|
2808 |
+
continue;
|
2809 |
+
}
|
2810 |
+
if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
|
2811 |
+
if (strtotime($cookie['expires']) <= time()) {
|
2812 |
+
continue;
|
2813 |
+
}
|
2814 |
+
}
|
2815 |
+
if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) {
|
2816 |
+
$domain = preg_quote($cookie['domain']);
|
2817 |
+
if (! preg_match("'.*$domain$'i", $this->host)) {
|
2818 |
+
continue;
|
2819 |
+
}
|
2820 |
+
}
|
2821 |
+
if ((isset($cookie['path'])) && (! empty($cookie['path']))) {
|
2822 |
+
$path = preg_quote($cookie['path']);
|
2823 |
+
if (! preg_match("'^$path.*'i", $this->path)) {
|
2824 |
+
continue;
|
2825 |
+
}
|
2826 |
+
}
|
2827 |
+
if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) {
|
2828 |
+
continue;
|
2829 |
+
}
|
2830 |
+
$cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; ';
|
2831 |
+
}
|
2832 |
+
}
|
2833 |
+
return $cookie_str;
|
2834 |
+
}
|
2835 |
+
}
|
2836 |
+
|
2837 |
+
?><?php
|
2838 |
+
|
2839 |
+
|
2840 |
+
|
2841 |
+
/**
|
2842 |
+
*
|
2843 |
+
* soap_server allows the user to create a SOAP server
|
2844 |
+
* that is capable of receiving messages and returning responses
|
2845 |
+
*
|
2846 |
+
* NOTE: WSDL functionality is experimental
|
2847 |
+
*
|
2848 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
2849 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
2850 |
+
* @access public
|
2851 |
+
*/
|
2852 |
+
class soap_server extends nusoap_base {
|
2853 |
+
/**
|
2854 |
+
* HTTP headers of request
|
2855 |
+
* @var array
|
2856 |
+
* @access private
|
2857 |
+
*/
|
2858 |
+
var $headers = array();
|
2859 |
+
/**
|
2860 |
+
* HTTP request
|
2861 |
+
* @var string
|
2862 |
+
* @access private
|
2863 |
+
*/
|
2864 |
+
var $request = '';
|
2865 |
+
/**
|
2866 |
+
* SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text)
|
2867 |
+
* @var string
|
2868 |
+
* @access public
|
2869 |
+
*/
|
2870 |
+
var $requestHeaders = '';
|
2871 |
+
/**
|
2872 |
+
* SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text)
|
2873 |
+
* @var string
|
2874 |
+
* @access public
|
2875 |
+
*/
|
2876 |
+
var $document = '';
|
2877 |
+
/**
|
2878 |
+
* SOAP payload for request (text)
|
2879 |
+
* @var string
|
2880 |
+
* @access public
|
2881 |
+
*/
|
2882 |
+
var $requestSOAP = '';
|
2883 |
+
/**
|
2884 |
+
* requested method namespace URI
|
2885 |
+
* @var string
|
2886 |
+
* @access private
|
2887 |
+
*/
|
2888 |
+
var $methodURI = '';
|
2889 |
+
/**
|
2890 |
+
* name of method requested
|
2891 |
+
* @var string
|
2892 |
+
* @access private
|
2893 |
+
*/
|
2894 |
+
var $methodname = '';
|
2895 |
+
/**
|
2896 |
+
* method parameters from request
|
2897 |
+
* @var array
|
2898 |
+
* @access private
|
2899 |
+
*/
|
2900 |
+
var $methodparams = array();
|
2901 |
+
/**
|
2902 |
+
* SOAP Action from request
|
2903 |
+
* @var string
|
2904 |
+
* @access private
|
2905 |
+
*/
|
2906 |
+
var $SOAPAction = '';
|
2907 |
+
/**
|
2908 |
+
* character set encoding of incoming (request) messages
|
2909 |
+
* @var string
|
2910 |
+
* @access public
|
2911 |
+
*/
|
2912 |
+
var $xml_encoding = '';
|
2913 |
+
/**
|
2914 |
+
* toggles whether the parser decodes element content w/ utf8_decode()
|
2915 |
+
* @var boolean
|
2916 |
+
* @access public
|
2917 |
+
*/
|
2918 |
+
var $decode_utf8 = true;
|
2919 |
+
|
2920 |
+
/**
|
2921 |
+
* HTTP headers of response
|
2922 |
+
* @var array
|
2923 |
+
* @access public
|
2924 |
+
*/
|
2925 |
+
var $outgoing_headers = array();
|
2926 |
+
/**
|
2927 |
+
* HTTP response
|
2928 |
+
* @var string
|
2929 |
+
* @access private
|
2930 |
+
*/
|
2931 |
+
var $response = '';
|
2932 |
+
/**
|
2933 |
+
* SOAP headers for response (text)
|
2934 |
+
* @var string
|
2935 |
+
* @access public
|
2936 |
+
*/
|
2937 |
+
var $responseHeaders = '';
|
2938 |
+
/**
|
2939 |
+
* SOAP payload for response (text)
|
2940 |
+
* @var string
|
2941 |
+
* @access private
|
2942 |
+
*/
|
2943 |
+
var $responseSOAP = '';
|
2944 |
+
/**
|
2945 |
+
* method return value to place in response
|
2946 |
+
* @var mixed
|
2947 |
+
* @access private
|
2948 |
+
*/
|
2949 |
+
var $methodreturn = false;
|
2950 |
+
/**
|
2951 |
+
* whether $methodreturn is a string of literal XML
|
2952 |
+
* @var boolean
|
2953 |
+
* @access public
|
2954 |
+
*/
|
2955 |
+
var $methodreturnisliteralxml = false;
|
2956 |
+
/**
|
2957 |
+
* SOAP fault for response (or false)
|
2958 |
+
* @var mixed
|
2959 |
+
* @access private
|
2960 |
+
*/
|
2961 |
+
var $fault = false;
|
2962 |
+
/**
|
2963 |
+
* text indication of result (for debugging)
|
2964 |
+
* @var string
|
2965 |
+
* @access private
|
2966 |
+
*/
|
2967 |
+
var $result = 'successful';
|
2968 |
+
|
2969 |
+
/**
|
2970 |
+
* assoc array of operations => opData; operations are added by the register()
|
2971 |
+
* method or by parsing an external WSDL definition
|
2972 |
+
* @var array
|
2973 |
+
* @access private
|
2974 |
+
*/
|
2975 |
+
var $operations = array();
|
2976 |
+
/**
|
2977 |
+
* wsdl instance (if one)
|
2978 |
+
* @var mixed
|
2979 |
+
* @access private
|
2980 |
+
*/
|
2981 |
+
var $wsdl = false;
|
2982 |
+
/**
|
2983 |
+
* URL for WSDL (if one)
|
2984 |
+
* @var mixed
|
2985 |
+
* @access private
|
2986 |
+
*/
|
2987 |
+
var $externalWSDLURL = false;
|
2988 |
+
/**
|
2989 |
+
* whether to append debug to response as XML comment
|
2990 |
+
* @var boolean
|
2991 |
+
* @access public
|
2992 |
+
*/
|
2993 |
+
var $debug_flag = false;
|
2994 |
+
|
2995 |
+
|
2996 |
+
/**
|
2997 |
+
* constructor
|
2998 |
+
* the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.
|
2999 |
+
*
|
3000 |
+
* @param mixed $wsdl file path or URL (string), or wsdl instance (object)
|
3001 |
+
* @access public
|
3002 |
+
*/
|
3003 |
+
function soap_server($wsdl=false){
|
3004 |
+
parent::nusoap_base();
|
3005 |
+
// turn on debugging?
|
3006 |
+
global $debug;
|
3007 |
+
global $HTTP_SERVER_VARS;
|
3008 |
+
|
3009 |
+
if (isset($_SERVER)) {
|
3010 |
+
} elseif (isset($HTTP_SERVER_VARS)) {
|
3011 |
+
} else {
|
3012 |
+
}
|
3013 |
+
|
3014 |
+
if (isset($debug)) {
|
3015 |
+
$this->debug_flag = $debug;
|
3016 |
+
} elseif (isset($_SERVER['QUERY_STRING'])) {
|
3017 |
+
$qs = explode('&', $_SERVER['QUERY_STRING']);
|
3018 |
+
foreach ($qs as $v) {
|
3019 |
+
if (substr($v, 0, 6) == 'debug=') {
|
3020 |
+
$this->debug_flag = substr($v, 6);
|
3021 |
+
}
|
3022 |
+
}
|
3023 |
+
} elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
|
3024 |
+
$qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']);
|
3025 |
+
foreach ($qs as $v) {
|
3026 |
+
if (substr($v, 0, 6) == 'debug=') {
|
3027 |
+
$this->debug_flag = substr($v, 6);
|
3028 |
+
}
|
3029 |
+
}
|
3030 |
+
}
|
3031 |
+
|
3032 |
+
// wsdl
|
3033 |
+
if($wsdl){
|
3034 |
+
if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) {
|
3035 |
+
$this->wsdl = $wsdl;
|
3036 |
+
$this->externalWSDLURL = $this->wsdl->wsdl;
|
3037 |
+
} else {
|
3038 |
+
$this->wsdl = new wsdl($wsdl);
|
3039 |
+
$this->externalWSDLURL = $wsdl;
|
3040 |
+
}
|
3041 |
+
$this->wsdl->clearDebug();
|
3042 |
+
if($err = $this->wsdl->getError()){
|
3043 |
+
die('WSDL ERROR: '.$err);
|
3044 |
+
}
|
3045 |
+
}
|
3046 |
+
}
|
3047 |
+
|
3048 |
+
/**
|
3049 |
+
* processes request and returns response
|
3050 |
+
*
|
3051 |
+
* @param string $data usually is the value of $HTTP_RAW_POST_DATA
|
3052 |
+
* @access public
|
3053 |
+
*/
|
3054 |
+
function service($data){
|
3055 |
+
global $HTTP_SERVER_VARS;
|
3056 |
+
|
3057 |
+
if (isset($_SERVER['QUERY_STRING'])) {
|
3058 |
+
$qs = $_SERVER['QUERY_STRING'];
|
3059 |
+
} elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
|
3060 |
+
$qs = $HTTP_SERVER_VARS['QUERY_STRING'];
|
3061 |
+
} else {
|
3062 |
+
$qs = '';
|
3063 |
+
}
|
3064 |
+
|
3065 |
+
if (ereg('wsdl', $qs) ){
|
3066 |
+
if($this->externalWSDLURL){
|
3067 |
+
if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL
|
3068 |
+
header('Location: '.$this->externalWSDLURL);
|
3069 |
+
} else { // assume file
|
3070 |
+
header("Content-Type: text/xml\r\n");
|
3071 |
+
$fp = fopen($this->externalWSDLURL, 'r');
|
3072 |
+
fpassthru($fp);
|
3073 |
+
}
|
3074 |
+
} elseif ($this->wsdl) {
|
3075 |
+
header("Content-Type: text/xml; charset=ISO-8859-1\r\n");
|
3076 |
+
print $this->wsdl->serialize($this->debug_flag);
|
3077 |
+
if ($this->debug_flag) {
|
3078 |
+
print $this->getDebugAsXMLComment();
|
3079 |
+
}
|
3080 |
+
} else {
|
3081 |
+
header("Content-Type: text/html; charset=ISO-8859-1\r\n");
|
3082 |
+
print "This service does not provide WSDL";
|
3083 |
+
}
|
3084 |
+
} elseif ($data == '' && $this->wsdl) {
|
3085 |
+
print $this->wsdl->webDescription();
|
3086 |
+
} else {
|
3087 |
+
$this->parse_request($data);
|
3088 |
+
if (! $this->fault) {
|
3089 |
+
$this->invoke_method();
|
3090 |
+
}
|
3091 |
+
if (! $this->fault) {
|
3092 |
+
$this->serialize_return();
|
3093 |
+
}
|
3094 |
+
$this->send_response();
|
3095 |
+
}
|
3096 |
+
}
|
3097 |
+
|
3098 |
+
/**
|
3099 |
+
* parses HTTP request headers.
|
3100 |
+
*
|
3101 |
+
* The following fields are set by this function (when successful)
|
3102 |
+
*
|
3103 |
+
* headers
|
3104 |
+
* request
|
3105 |
+
* xml_encoding
|
3106 |
+
* SOAPAction
|
3107 |
+
*
|
3108 |
+
* @access private
|
3109 |
+
*/
|
3110 |
+
function parse_http_headers() {
|
3111 |
+
global $HTTP_SERVER_VARS;
|
3112 |
+
|
3113 |
+
$this->request = '';
|
3114 |
+
$this->SOAPAction = '';
|
3115 |
+
if(function_exists('getallheaders')){
|
3116 |
+
$headers = getallheaders();
|
3117 |
+
foreach($headers as $k=>$v){
|
3118 |
+
$k = strtolower($k);
|
3119 |
+
$this->headers[$k] = $v;
|
3120 |
+
$this->request .= "$k: $v\r\n";
|
3121 |
+
}
|
3122 |
+
// get SOAPAction header
|
3123 |
+
if(isset($this->headers['soapaction'])){
|
3124 |
+
$this->SOAPAction = str_replace('"','',$this->headers['soapaction']);
|
3125 |
+
}
|
3126 |
+
// get the character encoding of the incoming request
|
3127 |
+
if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){
|
3128 |
+
$enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1));
|
3129 |
+
if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
|
3130 |
+
$this->xml_encoding = strtoupper($enc);
|
3131 |
+
} else {
|
3132 |
+
$this->xml_encoding = 'US-ASCII';
|
3133 |
+
}
|
3134 |
+
} else {
|
3135 |
+
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
|
3136 |
+
$this->xml_encoding = 'ISO-8859-1';
|
3137 |
+
}
|
3138 |
+
} elseif(isset($_SERVER) && is_array($_SERVER)){
|
3139 |
+
foreach ($_SERVER as $k => $v) {
|
3140 |
+
if (substr($k, 0, 5) == 'HTTP_') {
|
3141 |
+
$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5));
|
3142 |
+
} else {
|
3143 |
+
$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k);
|
3144 |
+
}
|
3145 |
+
if ($k == 'soapaction') {
|
3146 |
+
// get SOAPAction header
|
3147 |
+
$k = 'SOAPAction';
|
3148 |
+
$v = str_replace('"', '', $v);
|
3149 |
+
$v = str_replace('\\', '', $v);
|
3150 |
+
$this->SOAPAction = $v;
|
3151 |
+
} else if ($k == 'content-type') {
|
3152 |
+
// get the character encoding of the incoming request
|
3153 |
+
if (strpos($v, '=')) {
|
3154 |
+
$enc = substr(strstr($v, '='), 1);
|
3155 |
+
$enc = str_replace('"', '', $enc);
|
3156 |
+
$enc = str_replace('\\', '', $enc);
|
3157 |
+
if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
|
3158 |
+
$this->xml_encoding = strtoupper($enc);
|
3159 |
+
} else {
|
3160 |
+
$this->xml_encoding = 'US-ASCII';
|
3161 |
+
}
|
3162 |
+
} else {
|
3163 |
+
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
|
3164 |
+
$this->xml_encoding = 'ISO-8859-1';
|
3165 |
+
}
|
3166 |
+
}
|
3167 |
+
$this->headers[$k] = $v;
|
3168 |
+
$this->request .= "$k: $v\r\n";
|
3169 |
+
}
|
3170 |
+
} elseif (is_array($HTTP_SERVER_VARS)) {
|
3171 |
+
foreach ($HTTP_SERVER_VARS as $k => $v) {
|
3172 |
+
if (substr($k, 0, 5) == 'HTTP_') {
|
3173 |
+
$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5));
|
3174 |
+
} else {
|
3175 |
+
$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k);
|
3176 |
+
}
|
3177 |
+
if ($k == 'soapaction') {
|
3178 |
+
// get SOAPAction header
|
3179 |
+
$k = 'SOAPAction';
|
3180 |
+
$v = str_replace('"', '', $v);
|
3181 |
+
$v = str_replace('\\', '', $v);
|
3182 |
+
$this->SOAPAction = $v;
|
3183 |
+
} else if ($k == 'content-type') {
|
3184 |
+
// get the character encoding of the incoming request
|
3185 |
+
if (strpos($v, '=')) {
|
3186 |
+
$enc = substr(strstr($v, '='), 1);
|
3187 |
+
$enc = str_replace('"', '', $enc);
|
3188 |
+
$enc = str_replace('\\', '', $enc);
|
3189 |
+
if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) {
|
3190 |
+
$this->xml_encoding = strtoupper($enc);
|
3191 |
+
} else {
|
3192 |
+
$this->xml_encoding = 'US-ASCII';
|
3193 |
+
}
|
3194 |
+
} else {
|
3195 |
+
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
|
3196 |
+
$this->xml_encoding = 'ISO-8859-1';
|
3197 |
+
}
|
3198 |
+
}
|
3199 |
+
$this->headers[$k] = $v;
|
3200 |
+
$this->request .= "$k: $v\r\n";
|
3201 |
+
}
|
3202 |
+
} else {
|
3203 |
+
$this->setError("HTTP headers not accessible");
|
3204 |
+
}
|
3205 |
+
}
|
3206 |
+
|
3207 |
+
/**
|
3208 |
+
* parses a request
|
3209 |
+
*
|
3210 |
+
* The following fields are set by this function (when successful)
|
3211 |
+
*
|
3212 |
+
* headers
|
3213 |
+
* request
|
3214 |
+
* xml_encoding
|
3215 |
+
* SOAPAction
|
3216 |
+
* request
|
3217 |
+
* requestSOAP
|
3218 |
+
* methodURI
|
3219 |
+
* methodname
|
3220 |
+
* methodparams
|
3221 |
+
* requestHeaders
|
3222 |
+
* document
|
3223 |
+
*
|
3224 |
+
* This sets the fault field on error
|
3225 |
+
*
|
3226 |
+
* @param string $data XML string
|
3227 |
+
* @access private
|
3228 |
+
*/
|
3229 |
+
function parse_request($data='') {
|
3230 |
+
$this->parse_http_headers();
|
3231 |
+
// uncompress if necessary
|
3232 |
+
if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') {
|
3233 |
+
if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') {
|
3234 |
+
// if decoding works, use it. else assume data wasn't gzencoded
|
3235 |
+
if (function_exists('gzuncompress')) {
|
3236 |
+
if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) {
|
3237 |
+
$data = $degzdata;
|
3238 |
+
} elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) {
|
3239 |
+
$data = $degzdata;
|
3240 |
+
} else {
|
3241 |
+
$this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data');
|
3242 |
+
return;
|
3243 |
+
}
|
3244 |
+
} else {
|
3245 |
+
$this->fault('SOAP-ENV:Client', 'This Server does not support compressed data');
|
3246 |
+
return;
|
3247 |
+
}
|
3248 |
+
}
|
3249 |
+
}
|
3250 |
+
$this->request .= "\r\n".$data;
|
3251 |
+
$data = $this->parseRequest($this->headers, $data);
|
3252 |
+
$this->requestSOAP = $data;
|
3253 |
+
}
|
3254 |
+
|
3255 |
+
/**
|
3256 |
+
* invokes a PHP function for the requested SOAP method
|
3257 |
+
*
|
3258 |
+
* The following fields are set by this function (when successful)
|
3259 |
+
*
|
3260 |
+
* methodreturn
|
3261 |
+
*
|
3262 |
+
* Note that the PHP function that is called may also set the following
|
3263 |
+
* fields to affect the response sent to the client
|
3264 |
+
*
|
3265 |
+
* responseHeaders
|
3266 |
+
* outgoing_headers
|
3267 |
+
*
|
3268 |
+
* This sets the fault field on error
|
3269 |
+
*
|
3270 |
+
* @access private
|
3271 |
+
*/
|
3272 |
+
function invoke_method() {
|
3273 |
+
|
3274 |
+
if ($this->wsdl) {
|
3275 |
+
if ($this->opData = $this->wsdl->getOperationData($this->methodname)) {
|
3276 |
+
} elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) {
|
3277 |
+
// Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element
|
3278 |
+
$this->methodname = $this->opData['name'];
|
3279 |
+
} else {
|
3280 |
+
$this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service");
|
3281 |
+
return;
|
3282 |
+
}
|
3283 |
+
} else {
|
3284 |
+
}
|
3285 |
+
|
3286 |
+
// if a . is present in $this->methodname, we see if there is a class in scope,
|
3287 |
+
// which could be referred to. We will also distinguish between two deliminators,
|
3288 |
+
// to allow methods to be called a the class or an instance
|
3289 |
+
$class = '';
|
3290 |
+
$method = '';
|
3291 |
+
if (strpos($this->methodname, '..') > 0) {
|
3292 |
+
$delim = '..';
|
3293 |
+
} else if (strpos($this->methodname, '.') > 0) {
|
3294 |
+
$delim = '.';
|
3295 |
+
} else {
|
3296 |
+
$delim = '';
|
3297 |
+
}
|
3298 |
+
|
3299 |
+
if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1 &&
|
3300 |
+
class_exists(substr($this->methodname, 0, strpos($this->methodname, $delim)))) {
|
3301 |
+
// get the class and method name
|
3302 |
+
$class = substr($this->methodname, 0, strpos($this->methodname, $delim));
|
3303 |
+
$method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim));
|
3304 |
+
}
|
3305 |
+
|
3306 |
+
// does method exist?
|
3307 |
+
if ($class == '') {
|
3308 |
+
if (!function_exists($this->methodname)) {
|
3309 |
+
$this->result = 'fault: method not found';
|
3310 |
+
$this->fault('SOAP-ENV:Client',"method '$this->methodname' not defined in service");
|
3311 |
+
return;
|
3312 |
+
}
|
3313 |
+
} else {
|
3314 |
+
$method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method;
|
3315 |
+
if (!in_array($method_to_compare, get_class_methods($class))) {
|
3316 |
+
$this->result = 'fault: method not found';
|
3317 |
+
$this->fault('SOAP-ENV:Client',"method '$this->methodname' not defined in service");
|
3318 |
+
return;
|
3319 |
+
}
|
3320 |
+
}
|
3321 |
+
|
3322 |
+
// evaluate message, getting back parameters
|
3323 |
+
// verify that request parameters match the method's signature
|
3324 |
+
if(! $this->verify_method($this->methodname,$this->methodparams)){
|
3325 |
+
// debug
|
3326 |
+
$this->result = 'fault: request failed validation against method signature';
|
3327 |
+
// return fault
|
3328 |
+
$this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service.");
|
3329 |
+
return;
|
3330 |
+
}
|
3331 |
+
|
3332 |
+
// if there are parameters to pass
|
3333 |
+
if (!function_exists('call_user_func_array')) {
|
3334 |
+
if ($class == '') {
|
3335 |
+
$funcCall = "\$this->methodreturn = $this->methodname(";
|
3336 |
+
} else {
|
3337 |
+
if ($delim == '..') {
|
3338 |
+
$funcCall = "\$this->methodreturn = ".$class."::".$method."(";
|
3339 |
+
} else {
|
3340 |
+
// generate unique instance name
|
3341 |
+
$instname = "\$inst_".time();
|
3342 |
+
$funcCall = $instname." = new ".$class."(); ";
|
3343 |
+
$funcCall .= "\$this->methodreturn = ".$instname."->".$method."(";
|
3344 |
+
}
|
3345 |
+
}
|
3346 |
+
if ($this->methodparams) {
|
3347 |
+
foreach ($this->methodparams as $param) {
|
3348 |
+
if (is_array($param)) {
|
3349 |
+
$this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available');
|
3350 |
+
return;
|
3351 |
+
}
|
3352 |
+
$funcCall .= "\"$param\",";
|
3353 |
+
}
|
3354 |
+
$funcCall = substr($funcCall, 0, -1);
|
3355 |
+
}
|
3356 |
+
$funcCall .= ');';
|
3357 |
+
@eval($funcCall);
|
3358 |
+
} else {
|
3359 |
+
if ($class == '') {
|
3360 |
+
$call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array()
|
3361 |
+
} elseif ($delim == '..') {
|
3362 |
+
$call_arg = array ($class, $method);
|
3363 |
+
} else {
|
3364 |
+
$instance = new $class ();
|
3365 |
+
$call_arg = array(&$instance, $method);
|
3366 |
+
}
|
3367 |
+
$this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams));
|
3368 |
+
}
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
/**
|
3372 |
+
* serializes the return value from a PHP function into a full SOAP Envelope
|
3373 |
+
*
|
3374 |
+
* The following fields are set by this function (when successful)
|
3375 |
+
*
|
3376 |
+
* responseSOAP
|
3377 |
+
*
|
3378 |
+
* This sets the fault field on error
|
3379 |
+
*
|
3380 |
+
* @access private
|
3381 |
+
*/
|
3382 |
+
function serialize_return() {
|
3383 |
+
// if fault
|
3384 |
+
if (isset($this->methodreturn) && (get_class($this->methodreturn) == 'soap_fault')) {
|
3385 |
+
$this->fault = $this->methodreturn;
|
3386 |
+
return;
|
3387 |
+
} elseif ($this->methodreturnisliteralxml) {
|
3388 |
+
$return_val = $this->methodreturn;
|
3389 |
+
// returned value(s)
|
3390 |
+
} else {
|
3391 |
+
if($this->wsdl){
|
3392 |
+
// weak attempt at supporting multiple output params
|
3393 |
+
if(sizeof($this->opData['output']['parts']) > 1){
|
3394 |
+
$opParams = $this->methodreturn;
|
3395 |
+
} else {
|
3396 |
+
// TODO: is this really necessary?
|
3397 |
+
$opParams = array($this->methodreturn);
|
3398 |
+
}
|
3399 |
+
$return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams);
|
3400 |
+
$this->wsdl->clearDebug();
|
3401 |
+
if($errstr = $this->wsdl->getError()){
|
3402 |
+
$this->fault('SOAP-ENV:Server', 'unable to serialize result');
|
3403 |
+
return;
|
3404 |
+
}
|
3405 |
+
} else {
|
3406 |
+
if (isset($this->methodreturn)) {
|
3407 |
+
$return_val = $this->serialize_val($this->methodreturn, 'return');
|
3408 |
+
} else {
|
3409 |
+
$return_val = '';
|
3410 |
+
}
|
3411 |
+
}
|
3412 |
+
}
|
3413 |
+
|
3414 |
+
if ($this->wsdl) {
|
3415 |
+
if ($this->opData['style'] == 'rpc') {
|
3416 |
+
if ($this->opData['output']['use'] == 'literal') {
|
3417 |
+
$payload = '<'.$this->methodname.'Response xmlns="'.$this->methodURI.'">'.$return_val.'</'.$this->methodname."Response>";
|
3418 |
+
} else {
|
3419 |
+
$payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>";
|
3420 |
+
}
|
3421 |
+
} else {
|
3422 |
+
$payload = $return_val;
|
3423 |
+
}
|
3424 |
+
} else {
|
3425 |
+
$payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>";
|
3426 |
+
}
|
3427 |
+
$this->result = 'successful';
|
3428 |
+
if($this->wsdl){
|
3429 |
+
//if($this->debug_flag){
|
3430 |
+
// }
|
3431 |
+
if (isset($opData['output']['encodingStyle'])) {
|
3432 |
+
$encodingStyle = $opData['output']['encodingStyle'];
|
3433 |
+
} else {
|
3434 |
+
$encodingStyle = '';
|
3435 |
+
}
|
3436 |
+
// Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces.
|
3437 |
+
$this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$encodingStyle);
|
3438 |
+
} else {
|
3439 |
+
$this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders);
|
3440 |
+
}
|
3441 |
+
}
|
3442 |
+
|
3443 |
+
/**
|
3444 |
+
* sends an HTTP response
|
3445 |
+
*
|
3446 |
+
* The following fields are set by this function (when successful)
|
3447 |
+
*
|
3448 |
+
* outgoing_headers
|
3449 |
+
* response
|
3450 |
+
*
|
3451 |
+
* @access private
|
3452 |
+
*/
|
3453 |
+
function send_response() {
|
3454 |
+
if ($this->fault) {
|
3455 |
+
$payload = $this->fault->serialize();
|
3456 |
+
$this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error";
|
3457 |
+
$this->outgoing_headers[] = "Status: 500 Internal Server Error";
|
3458 |
+
} else {
|
3459 |
+
$payload = $this->responseSOAP;
|
3460 |
+
// Some combinations of PHP+Web server allow the Status
|
3461 |
+
// to come through as a header. Since OK is the default
|
3462 |
+
// just do nothing.
|
3463 |
+
// $this->outgoing_headers[] = "HTTP/1.0 200 OK";
|
3464 |
+
// $this->outgoing_headers[] = "Status: 200 OK";
|
3465 |
+
}
|
3466 |
+
// add debug data if in debug mode
|
3467 |
+
if(isset($this->debug_flag) && $this->debug_flag){
|
3468 |
+
$payload .= $this->getDebugAsXMLComment();
|
3469 |
+
}
|
3470 |
+
$this->outgoing_headers[] = "Server: $this->title Server v$this->version";
|
3471 |
+
ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev);
|
3472 |
+
$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")";
|
3473 |
+
// Let the Web server decide about this
|
3474 |
+
//$this->outgoing_headers[] = "Connection: Close\r\n";
|
3475 |
+
$payload = $this->getHTTPBody($payload);
|
3476 |
+
$type = $this->getHTTPContentType();
|
3477 |
+
$charset = $this->getHTTPContentTypeCharset();
|
3478 |
+
$this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : '');
|
3479 |
+
//begin code to compress payload - by John
|
3480 |
+
// NOTE: there is no way to know whether the Web server will also compress
|
3481 |
+
// this data.
|
3482 |
+
if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {
|
3483 |
+
if (strstr($this->headers['accept-encoding'], 'gzip')) {
|
3484 |
+
if (function_exists('gzencode')) {
|
3485 |
+
if (isset($this->debug_flag) && $this->debug_flag) {
|
3486 |
+
$payload .= "<!-- Content being gzipped -->";
|
3487 |
+
}
|
3488 |
+
$this->outgoing_headers[] = "Content-Encoding: gzip";
|
3489 |
+
$payload = gzencode($payload);
|
3490 |
+
} else {
|
3491 |
+
if (isset($this->debug_flag) && $this->debug_flag) {
|
3492 |
+
$payload .= "<!-- Content will not be gzipped: no gzencode -->";
|
3493 |
+
}
|
3494 |
+
}
|
3495 |
+
} elseif (strstr($this->headers['accept-encoding'], 'deflate')) {
|
3496 |
+
// Note: MSIE requires gzdeflate output (no Zlib header and checksum),
|
3497 |
+
// instead of gzcompress output,
|
3498 |
+
// which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5)
|
3499 |
+
if (function_exists('gzdeflate')) {
|
3500 |
+
if (isset($this->debug_flag) && $this->debug_flag) {
|
3501 |
+
$payload .= "<!-- Content being deflated -->";
|
3502 |
+
}
|
3503 |
+
$this->outgoing_headers[] = "Content-Encoding: deflate";
|
3504 |
+
$payload = gzdeflate($payload);
|
3505 |
+
} else {
|
3506 |
+
if (isset($this->debug_flag) && $this->debug_flag) {
|
3507 |
+
$payload .= "<!-- Content will not be deflated: no gzcompress -->";
|
3508 |
+
}
|
3509 |
+
}
|
3510 |
+
}
|
3511 |
+
}
|
3512 |
+
//end code
|
3513 |
+
$this->outgoing_headers[] = "Content-Length: ".strlen($payload);
|
3514 |
+
reset($this->outgoing_headers);
|
3515 |
+
foreach($this->outgoing_headers as $hdr){
|
3516 |
+
header($hdr, false);
|
3517 |
+
}
|
3518 |
+
print $payload;
|
3519 |
+
$this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload;
|
3520 |
+
}
|
3521 |
+
|
3522 |
+
/**
|
3523 |
+
* takes the value that was created by parsing the request
|
3524 |
+
* and compares to the method's signature, if available.
|
3525 |
+
*
|
3526 |
+
* @param string $operation The operation to be invoked
|
3527 |
+
* @param array $request The array of parameter values
|
3528 |
+
* @return boolean Whether the operation was found
|
3529 |
+
* @access private
|
3530 |
+
*/
|
3531 |
+
function verify_method($operation,$request){
|
3532 |
+
if(isset($this->wsdl) && is_object($this->wsdl)){
|
3533 |
+
if($this->wsdl->getOperationData($operation)){
|
3534 |
+
return true;
|
3535 |
+
}
|
3536 |
+
} elseif(isset($this->operations[$operation])){
|
3537 |
+
return true;
|
3538 |
+
}
|
3539 |
+
return false;
|
3540 |
+
}
|
3541 |
+
|
3542 |
+
/**
|
3543 |
+
* processes SOAP message received from client
|
3544 |
+
*
|
3545 |
+
* @param array $headers The HTTP headers
|
3546 |
+
* @param string $data unprocessed request data from client
|
3547 |
+
* @return mixed value of the message, decoded into a PHP type
|
3548 |
+
* @access private
|
3549 |
+
*/
|
3550 |
+
function parseRequest($headers, $data) {
|
3551 |
+
if (!strstr($headers['content-type'], 'text/xml')) {
|
3552 |
+
$this->setError('Request not of type text/xml');
|
3553 |
+
return false;
|
3554 |
+
}
|
3555 |
+
if (strpos($headers['content-type'], '=')) {
|
3556 |
+
$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
|
3557 |
+
if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
|
3558 |
+
$this->xml_encoding = strtoupper($enc);
|
3559 |
+
} else {
|
3560 |
+
$this->xml_encoding = 'US-ASCII';
|
3561 |
+
}
|
3562 |
+
} else {
|
3563 |
+
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
|
3564 |
+
$this->xml_encoding = 'ISO-8859-1';
|
3565 |
+
}
|
3566 |
+
// parse response, get soap parser obj
|
3567 |
+
$parser = new soap_parser($data,$this->xml_encoding,'',$this->decode_utf8);
|
3568 |
+
// parser debug
|
3569 |
+
// if fault occurred during message parsing
|
3570 |
+
if($err = $parser->getError()){
|
3571 |
+
$this->result = 'fault: error in msg parsing: '.$err;
|
3572 |
+
$this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err);
|
3573 |
+
// else successfully parsed request into soapval object
|
3574 |
+
} else {
|
3575 |
+
// get/set methodname
|
3576 |
+
$this->methodURI = $parser->root_struct_namespace;
|
3577 |
+
$this->methodname = $parser->root_struct_name;
|
3578 |
+
$this->methodparams = $parser->get_response();
|
3579 |
+
// get SOAP headers
|
3580 |
+
$this->requestHeaders = $parser->getHeaders();
|
3581 |
+
// add document for doclit support
|
3582 |
+
$this->document = $parser->document;
|
3583 |
+
}
|
3584 |
+
}
|
3585 |
+
|
3586 |
+
/**
|
3587 |
+
* gets the HTTP body for the current response.
|
3588 |
+
*
|
3589 |
+
* @param string $soapmsg The SOAP payload
|
3590 |
+
* @return string The HTTP body, which includes the SOAP payload
|
3591 |
+
* @access private
|
3592 |
+
*/
|
3593 |
+
function getHTTPBody($soapmsg) {
|
3594 |
+
return $soapmsg;
|
3595 |
+
}
|
3596 |
+
|
3597 |
+
/**
|
3598 |
+
* gets the HTTP content type for the current response.
|
3599 |
+
*
|
3600 |
+
* Note: getHTTPBody must be called before this.
|
3601 |
+
*
|
3602 |
+
* @return string the HTTP content type for the current response.
|
3603 |
+
* @access private
|
3604 |
+
*/
|
3605 |
+
function getHTTPContentType() {
|
3606 |
+
return 'text/xml';
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
/**
|
3610 |
+
* gets the HTTP content type charset for the current response.
|
3611 |
+
* returns false for non-text content types.
|
3612 |
+
*
|
3613 |
+
* Note: getHTTPBody must be called before this.
|
3614 |
+
*
|
3615 |
+
* @return string the HTTP content type charset for the current response.
|
3616 |
+
* @access private
|
3617 |
+
*/
|
3618 |
+
function getHTTPContentTypeCharset() {
|
3619 |
+
return $this->soap_defencoding;
|
3620 |
+
}
|
3621 |
+
|
3622 |
+
/**
|
3623 |
+
* add a method to the dispatch map (this has been replaced by the register method)
|
3624 |
+
*
|
3625 |
+
* @param string $methodname
|
3626 |
+
* @param string $in array of input values
|
3627 |
+
* @param string $out array of output values
|
3628 |
+
* @access public
|
3629 |
+
* @deprecated
|
3630 |
+
*/
|
3631 |
+
function add_to_map($methodname,$in,$out){
|
3632 |
+
$this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out);
|
3633 |
+
}
|
3634 |
+
|
3635 |
+
/**
|
3636 |
+
* register a service function with the server
|
3637 |
+
*
|
3638 |
+
* @param string $name the name of the PHP function, class.method or class..method
|
3639 |
+
* @param array $in assoc array of input values: key = param name, value = param type
|
3640 |
+
* @param array $out assoc array of output values: key = param name, value = param type
|
3641 |
+
* @param mixed $namespace the element namespace for the method or false
|
3642 |
+
* @param mixed $soapaction the soapaction for the method or false
|
3643 |
+
* @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically
|
3644 |
+
* @param mixed $use optional (encoded|literal) or false
|
3645 |
+
* @param string $documentation optional Description to include in WSDL
|
3646 |
+
* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
|
3647 |
+
* @access public
|
3648 |
+
*/
|
3649 |
+
function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){
|
3650 |
+
global $HTTP_SERVER_VARS;
|
3651 |
+
|
3652 |
+
if($this->externalWSDLURL){
|
3653 |
+
die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
|
3654 |
+
}
|
3655 |
+
if (! $name) {
|
3656 |
+
die('You must specify a name when you register an operation');
|
3657 |
+
}
|
3658 |
+
if (!is_array($in)) {
|
3659 |
+
die('You must provide an array for operation inputs');
|
3660 |
+
}
|
3661 |
+
if (!is_array($out)) {
|
3662 |
+
die('You must provide an array for operation outputs');
|
3663 |
+
}
|
3664 |
+
if(false == $namespace) {
|
3665 |
+
}
|
3666 |
+
if(false == $soapaction) {
|
3667 |
+
if (isset($_SERVER)) {
|
3668 |
+
$SERVER_NAME = $_SERVER['SERVER_NAME'];
|
3669 |
+
$SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
3670 |
+
} elseif (isset($HTTP_SERVER_VARS)) {
|
3671 |
+
$SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
|
3672 |
+
$SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
|
3673 |
+
} else {
|
3674 |
+
$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
|
3675 |
+
}
|
3676 |
+
$soapaction = "http://$SERVER_NAME$SCRIPT_NAME/$name";
|
3677 |
+
}
|
3678 |
+
if(false == $style) {
|
3679 |
+
$style = "rpc";
|
3680 |
+
}
|
3681 |
+
if(false == $use) {
|
3682 |
+
$use = "encoded";
|
3683 |
+
}
|
3684 |
+
if ($use == 'encoded' && $encodingStyle = '') {
|
3685 |
+
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
|
3686 |
+
}
|
3687 |
+
|
3688 |
+
$this->operations[$name] = array(
|
3689 |
+
'name' => $name,
|
3690 |
+
'in' => $in,
|
3691 |
+
'out' => $out,
|
3692 |
+
'namespace' => $namespace,
|
3693 |
+
'soapaction' => $soapaction,
|
3694 |
+
'style' => $style);
|
3695 |
+
if($this->wsdl){
|
3696 |
+
$this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle);
|
3697 |
+
}
|
3698 |
+
return true;
|
3699 |
+
}
|
3700 |
+
|
3701 |
+
/**
|
3702 |
+
* Specify a fault to be returned to the client.
|
3703 |
+
* This also acts as a flag to the server that a fault has occured.
|
3704 |
+
*
|
3705 |
+
* @param string $faultcode
|
3706 |
+
* @param string $faultstring
|
3707 |
+
* @param string $faultactor
|
3708 |
+
* @param string $faultdetail
|
3709 |
+
* @access public
|
3710 |
+
*/
|
3711 |
+
function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){
|
3712 |
+
if ($faultdetail == '' && $this->debug_flag) {
|
3713 |
+
$faultdetail = $this->getDebug();
|
3714 |
+
}
|
3715 |
+
$this->fault = new soap_fault($faultcode,$faultactor,$faultstring,$faultdetail);
|
3716 |
+
$this->fault->soap_defencoding = $this->soap_defencoding;
|
3717 |
+
}
|
3718 |
+
|
3719 |
+
/**
|
3720 |
+
* Sets up wsdl object.
|
3721 |
+
* Acts as a flag to enable internal WSDL generation
|
3722 |
+
*
|
3723 |
+
* @param string $serviceName, name of the service
|
3724 |
+
* @param mixed $namespace optional 'tns' service namespace or false
|
3725 |
+
* @param mixed $endpoint optional URL of service endpoint or false
|
3726 |
+
* @param string $style optional (rpc|document) WSDL style (also specified by operation)
|
3727 |
+
* @param string $transport optional SOAP transport
|
3728 |
+
* @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false
|
3729 |
+
*/
|
3730 |
+
function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
|
3731 |
+
{
|
3732 |
+
global $HTTP_SERVER_VARS;
|
3733 |
+
|
3734 |
+
if (isset($_SERVER)) {
|
3735 |
+
$SERVER_NAME = $_SERVER['SERVER_NAME'];
|
3736 |
+
$SERVER_PORT = $_SERVER['SERVER_PORT'];
|
3737 |
+
$SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
|
3738 |
+
$HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off');
|
3739 |
+
} elseif (isset($HTTP_SERVER_VARS)) {
|
3740 |
+
$SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
|
3741 |
+
$SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT'];
|
3742 |
+
$SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
|
3743 |
+
$HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off';
|
3744 |
+
} else {
|
3745 |
+
$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
|
3746 |
+
}
|
3747 |
+
if ($SERVER_PORT == 80) {
|
3748 |
+
$SERVER_PORT = '';
|
3749 |
+
} else {
|
3750 |
+
$SERVER_PORT = ':' . $SERVER_PORT;
|
3751 |
+
}
|
3752 |
+
if(false == $namespace) {
|
3753 |
+
$namespace = "http://$SERVER_NAME/soap/$serviceName";
|
3754 |
+
}
|
3755 |
+
|
3756 |
+
if(false == $endpoint) {
|
3757 |
+
if ($HTTPS == '1' || $HTTPS == 'on') {
|
3758 |
+
$SCHEME = 'https';
|
3759 |
+
} else {
|
3760 |
+
$SCHEME = 'http';
|
3761 |
+
}
|
3762 |
+
$endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME";
|
3763 |
+
}
|
3764 |
+
|
3765 |
+
if(false == $schemaTargetNamespace) {
|
3766 |
+
$schemaTargetNamespace = $namespace;
|
3767 |
+
}
|
3768 |
+
|
3769 |
+
$this->wsdl = new wsdl;
|
3770 |
+
$this->wsdl->serviceName = $serviceName;
|
3771 |
+
$this->wsdl->endpoint = $endpoint;
|
3772 |
+
$this->wsdl->namespaces['tns'] = $namespace;
|
3773 |
+
$this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/';
|
3774 |
+
$this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/';
|
3775 |
+
if ($schemaTargetNamespace != $namespace) {
|
3776 |
+
$this->wsdl->namespaces['types'] = $schemaTargetNamespace;
|
3777 |
+
}
|
3778 |
+
$this->wsdl->schemas[$schemaTargetNamespace][0] = new xmlschema('', '', $this->wsdl->namespaces);
|
3779 |
+
$this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace;
|
3780 |
+
$this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true);
|
3781 |
+
$this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true);
|
3782 |
+
$this->wsdl->bindings[$serviceName.'Binding'] = array(
|
3783 |
+
'name'=>$serviceName.'Binding',
|
3784 |
+
'style'=>$style,
|
3785 |
+
'transport'=>$transport,
|
3786 |
+
'portType'=>$serviceName.'PortType');
|
3787 |
+
$this->wsdl->ports[$serviceName.'Port'] = array(
|
3788 |
+
'binding'=>$serviceName.'Binding',
|
3789 |
+
'location'=>$endpoint,
|
3790 |
+
'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/');
|
3791 |
+
}
|
3792 |
+
}
|
3793 |
+
|
3794 |
+
|
3795 |
+
|
3796 |
+
?><?php
|
3797 |
+
|
3798 |
+
|
3799 |
+
|
3800 |
+
/**
|
3801 |
+
* parses a WSDL file, allows access to it's data, other utility methods
|
3802 |
+
*
|
3803 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
3804 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
3805 |
+
* @access public
|
3806 |
+
*/
|
3807 |
+
class wsdl extends nusoap_base {
|
3808 |
+
// URL or filename of the root of this WSDL
|
3809 |
+
var $wsdl;
|
3810 |
+
// define internal arrays of bindings, ports, operations, messages, etc.
|
3811 |
+
var $schemas = array();
|
3812 |
+
var $currentSchema;
|
3813 |
+
var $message = array();
|
3814 |
+
var $complexTypes = array();
|
3815 |
+
var $messages = array();
|
3816 |
+
var $currentMessage;
|
3817 |
+
var $currentOperation;
|
3818 |
+
var $portTypes = array();
|
3819 |
+
var $currentPortType;
|
3820 |
+
var $bindings = array();
|
3821 |
+
var $currentBinding;
|
3822 |
+
var $ports = array();
|
3823 |
+
var $currentPort;
|
3824 |
+
var $opData = array();
|
3825 |
+
var $status = '';
|
3826 |
+
var $documentation = false;
|
3827 |
+
var $endpoint = '';
|
3828 |
+
// array of wsdl docs to import
|
3829 |
+
var $import = array();
|
3830 |
+
// parser vars
|
3831 |
+
var $parser;
|
3832 |
+
var $position = 0;
|
3833 |
+
var $depth = 0;
|
3834 |
+
var $depth_array = array();
|
3835 |
+
// for getting wsdl
|
3836 |
+
var $proxyhost = '';
|
3837 |
+
var $proxyport = '';
|
3838 |
+
var $proxyusername = '';
|
3839 |
+
var $proxypassword = '';
|
3840 |
+
var $timeout = 0;
|
3841 |
+
var $response_timeout = 30;
|
3842 |
+
|
3843 |
+
/**
|
3844 |
+
* constructor
|
3845 |
+
*
|
3846 |
+
* @param string $wsdl WSDL document URL
|
3847 |
+
* @param string $proxyhost
|
3848 |
+
* @param string $proxyport
|
3849 |
+
* @param string $proxyusername
|
3850 |
+
* @param string $proxypassword
|
3851 |
+
* @param integer $timeout set the connection timeout
|
3852 |
+
* @param integer $response_timeout set the response timeout
|
3853 |
+
* @access public
|
3854 |
+
*/
|
3855 |
+
function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30){
|
3856 |
+
parent::nusoap_base();
|
3857 |
+
$this->wsdl = $wsdl;
|
3858 |
+
$this->proxyhost = $proxyhost;
|
3859 |
+
$this->proxyport = $proxyport;
|
3860 |
+
$this->proxyusername = $proxyusername;
|
3861 |
+
$this->proxypassword = $proxypassword;
|
3862 |
+
$this->timeout = $timeout;
|
3863 |
+
$this->response_timeout = $response_timeout;
|
3864 |
+
|
3865 |
+
// parse wsdl file
|
3866 |
+
if ($wsdl != "") {
|
3867 |
+
$this->parseWSDL($wsdl);
|
3868 |
+
}
|
3869 |
+
// imports
|
3870 |
+
// TODO: handle imports more properly, grabbing them in-line and nesting them
|
3871 |
+
$imported_urls = array();
|
3872 |
+
$imported = 1;
|
3873 |
+
while ($imported > 0) {
|
3874 |
+
$imported = 0;
|
3875 |
+
// Schema imports
|
3876 |
+
foreach ($this->schemas as $ns => $list) {
|
3877 |
+
foreach ($list as $xs) {
|
3878 |
+
$wsdlparts = parse_url($this->wsdl); // this is bogusly simple!
|
3879 |
+
foreach ($xs->imports as $ns2 => $list2) {
|
3880 |
+
for ($ii = 0; $ii < count($list2); $ii++) {
|
3881 |
+
if (! $list2[$ii]['loaded']) {
|
3882 |
+
$this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;
|
3883 |
+
$url = $list2[$ii]['location'];
|
3884 |
+
if ($url != '') {
|
3885 |
+
$urlparts = parse_url($url);
|
3886 |
+
if (!isset($urlparts['host'])) {
|
3887 |
+
$url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') .
|
3888 |
+
substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path'];
|
3889 |
+
}
|
3890 |
+
if (! in_array($url, $imported_urls)) {
|
3891 |
+
$this->parseWSDL($url);
|
3892 |
+
$imported++;
|
3893 |
+
$imported_urls[] = $url;
|
3894 |
+
}
|
3895 |
+
} else {
|
3896 |
+
}
|
3897 |
+
}
|
3898 |
+
}
|
3899 |
+
}
|
3900 |
+
}
|
3901 |
+
}
|
3902 |
+
// WSDL imports
|
3903 |
+
$wsdlparts = parse_url($this->wsdl); // this is bogusly simple!
|
3904 |
+
foreach ($this->import as $ns => $list) {
|
3905 |
+
for ($ii = 0; $ii < count($list); $ii++) {
|
3906 |
+
if (! $list[$ii]['loaded']) {
|
3907 |
+
$this->import[$ns][$ii]['loaded'] = true;
|
3908 |
+
$url = $list[$ii]['location'];
|
3909 |
+
if ($url != '') {
|
3910 |
+
$urlparts = parse_url($url);
|
3911 |
+
if (!isset($urlparts['host'])) {
|
3912 |
+
$url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') .
|
3913 |
+
substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path'];
|
3914 |
+
}
|
3915 |
+
if (! in_array($url, $imported_urls)) {
|
3916 |
+
$this->parseWSDL($url);
|
3917 |
+
$imported++;
|
3918 |
+
$imported_urls[] = $url;
|
3919 |
+
}
|
3920 |
+
} else {
|
3921 |
+
}
|
3922 |
+
}
|
3923 |
+
}
|
3924 |
+
}
|
3925 |
+
}
|
3926 |
+
// add new data to operation data
|
3927 |
+
foreach($this->bindings as $binding => $bindingData) {
|
3928 |
+
if (isset($bindingData['operations']) && is_array($bindingData['operations'])) {
|
3929 |
+
foreach($bindingData['operations'] as $operation => $data) {
|
3930 |
+
$this->bindings[$binding]['operations'][$operation]['input'] =
|
3931 |
+
isset($this->bindings[$binding]['operations'][$operation]['input']) ?
|
3932 |
+
array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) :
|
3933 |
+
$this->portTypes[ $bindingData['portType'] ][$operation]['input'];
|
3934 |
+
$this->bindings[$binding]['operations'][$operation]['output'] =
|
3935 |
+
isset($this->bindings[$binding]['operations'][$operation]['output']) ?
|
3936 |
+
array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) :
|
3937 |
+
$this->portTypes[ $bindingData['portType'] ][$operation]['output'];
|
3938 |
+
if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){
|
3939 |
+
$this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ];
|
3940 |
+
}
|
3941 |
+
if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){
|
3942 |
+
$this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ];
|
3943 |
+
}
|
3944 |
+
if (isset($bindingData['style'])) {
|
3945 |
+
$this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style'];
|
3946 |
+
}
|
3947 |
+
$this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : '';
|
3948 |
+
$this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : '';
|
3949 |
+
$this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : '';
|
3950 |
+
}
|
3951 |
+
}
|
3952 |
+
}
|
3953 |
+
}
|
3954 |
+
|
3955 |
+
/**
|
3956 |
+
* parses the wsdl document
|
3957 |
+
*
|
3958 |
+
* @param string $wsdl path or URL
|
3959 |
+
* @access private
|
3960 |
+
*/
|
3961 |
+
function parseWSDL($wsdl = '')
|
3962 |
+
{
|
3963 |
+
if ($wsdl == '') {
|
3964 |
+
$this->setError('no wsdl passed to parseWSDL()!!');
|
3965 |
+
return false;
|
3966 |
+
}
|
3967 |
+
|
3968 |
+
// parse $wsdl for url format
|
3969 |
+
$wsdl_props = parse_url($wsdl);
|
3970 |
+
|
3971 |
+
if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) {
|
3972 |
+
// get wsdl
|
3973 |
+
$tr = new soap_transport_http($wsdl);
|
3974 |
+
$tr->request_method = 'GET';
|
3975 |
+
$tr->useSOAPAction = false;
|
3976 |
+
if($this->proxyhost && $this->proxyport){
|
3977 |
+
$tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
|
3978 |
+
}
|
3979 |
+
$tr->setEncoding('gzip, deflate');
|
3980 |
+
$wsdl_string = $tr->send('', $this->timeout, $this->response_timeout);
|
3981 |
+
// catch errors
|
3982 |
+
if($err = $tr->getError() ){
|
3983 |
+
$errstr = 'HTTP ERROR: '.$err;
|
3984 |
+
$this->setError($errstr);
|
3985 |
+
unset($tr);
|
3986 |
+
return false;
|
3987 |
+
}
|
3988 |
+
unset($tr);
|
3989 |
+
} else {
|
3990 |
+
// $wsdl is not http(s), so treat it as a file URL or plain file path
|
3991 |
+
if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) {
|
3992 |
+
$path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path'];
|
3993 |
+
} else {
|
3994 |
+
$path = $wsdl;
|
3995 |
+
}
|
3996 |
+
if ($fp = @fopen($path, 'r')) {
|
3997 |
+
$wsdl_string = '';
|
3998 |
+
while ($data = fread($fp, 32768)) {
|
3999 |
+
$wsdl_string .= $data;
|
4000 |
+
}
|
4001 |
+
fclose($fp);
|
4002 |
+
} else {
|
4003 |
+
$errstr = "Bad path to WSDL file $path";
|
4004 |
+
$this->setError($errstr);
|
4005 |
+
return false;
|
4006 |
+
}
|
4007 |
+
}
|
4008 |
+
// end new code added
|
4009 |
+
// Create an XML parser.
|
4010 |
+
$this->parser = xml_parser_create();
|
4011 |
+
// Set the options for parsing the XML data.
|
4012 |
+
// xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
|
4013 |
+
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
|
4014 |
+
// Set the object for the parser.
|
4015 |
+
xml_set_object($this->parser, $this);
|
4016 |
+
// Set the element handlers for the parser.
|
4017 |
+
xml_set_element_handler($this->parser, 'start_element', 'end_element');
|
4018 |
+
xml_set_character_data_handler($this->parser, 'character_data');
|
4019 |
+
// Parse the XML file.
|
4020 |
+
if (!xml_parse($this->parser, $wsdl_string, true)) {
|
4021 |
+
// Display an error message.
|
4022 |
+
$errstr = sprintf(
|
4023 |
+
'XML error parsing WSDL from %s on line %d: %s',
|
4024 |
+
$wsdl,
|
4025 |
+
xml_get_current_line_number($this->parser),
|
4026 |
+
xml_error_string(xml_get_error_code($this->parser))
|
4027 |
+
);
|
4028 |
+
$this->setError($errstr);
|
4029 |
+
return false;
|
4030 |
+
}
|
4031 |
+
// free the parser
|
4032 |
+
xml_parser_free($this->parser);
|
4033 |
+
// catch wsdl parse errors
|
4034 |
+
if($this->getError()){
|
4035 |
+
return false;
|
4036 |
+
}
|
4037 |
+
return true;
|
4038 |
+
}
|
4039 |
+
|
4040 |
+
/**
|
4041 |
+
* start-element handler
|
4042 |
+
*
|
4043 |
+
* @param string $parser XML parser object
|
4044 |
+
* @param string $name element name
|
4045 |
+
* @param string $attrs associative array of attributes
|
4046 |
+
* @access private
|
4047 |
+
*/
|
4048 |
+
function start_element($parser, $name, $attrs)
|
4049 |
+
{
|
4050 |
+
if ($this->status == 'schema') {
|
4051 |
+
$this->currentSchema->schemaStartElement($parser, $name, $attrs);
|
4052 |
+
$this->currentSchema->clearDebug();
|
4053 |
+
} elseif (preg_match('/schema$/', $name)) {
|
4054 |
+
$this->status = 'schema';
|
4055 |
+
$this->currentSchema = new xmlschema('', '', $this->namespaces);
|
4056 |
+
$this->currentSchema->schemaStartElement($parser, $name, $attrs);
|
4057 |
+
$this->currentSchema->clearDebug();
|
4058 |
+
} else {
|
4059 |
+
// position in the total number of elements, starting from 0
|
4060 |
+
$pos = $this->position++;
|
4061 |
+
$depth = $this->depth++;
|
4062 |
+
// set self as current value for this depth
|
4063 |
+
$this->depth_array[$depth] = $pos;
|
4064 |
+
$this->message[$pos] = array('cdata' => '');
|
4065 |
+
// process attributes
|
4066 |
+
if (count($attrs) > 0) {
|
4067 |
+
// register namespace declarations
|
4068 |
+
foreach($attrs as $k => $v) {
|
4069 |
+
if (preg_match("/^xmlns/", $k)) {
|
4070 |
+
if ($ns_prefix = substr(strrchr($k, ':'), 1)) {
|
4071 |
+
$this->namespaces[$ns_prefix] = $v;
|
4072 |
+
} else {
|
4073 |
+
$this->namespaces['ns' . (count($this->namespaces) + 1)] = $v;
|
4074 |
+
}
|
4075 |
+
if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') {
|
4076 |
+
$this->XMLSchemaVersion = $v;
|
4077 |
+
$this->namespaces['xsi'] = $v . '-instance';
|
4078 |
+
}
|
4079 |
+
}
|
4080 |
+
}
|
4081 |
+
// expand each attribute prefix to its namespace
|
4082 |
+
foreach($attrs as $k => $v) {
|
4083 |
+
$k = strpos($k, ':') ? $this->expandQname($k) : $k;
|
4084 |
+
if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') {
|
4085 |
+
$v = strpos($v, ':') ? $this->expandQname($v) : $v;
|
4086 |
+
}
|
4087 |
+
$eAttrs[$k] = $v;
|
4088 |
+
}
|
4089 |
+
$attrs = $eAttrs;
|
4090 |
+
} else {
|
4091 |
+
$attrs = array();
|
4092 |
+
}
|
4093 |
+
// get element prefix, namespace and name
|
4094 |
+
if (preg_match('/:/', $name)) {
|
4095 |
+
// get ns prefix
|
4096 |
+
$prefix = substr($name, 0, strpos($name, ':'));
|
4097 |
+
// get ns
|
4098 |
+
$namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : '';
|
4099 |
+
// get unqualified name
|
4100 |
+
$name = substr(strstr($name, ':'), 1);
|
4101 |
+
}
|
4102 |
+
// process attributes, expanding any prefixes to namespaces
|
4103 |
+
// find status, register data
|
4104 |
+
switch ($this->status) {
|
4105 |
+
case 'message':
|
4106 |
+
if ($name == 'part') {
|
4107 |
+
if (isset($attrs['type'])) {
|
4108 |
+
$this->messages[$this->currentMessage][$attrs['name']] = $attrs['type'];
|
4109 |
+
}
|
4110 |
+
if (isset($attrs['element'])) {
|
4111 |
+
$this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'];
|
4112 |
+
}
|
4113 |
+
}
|
4114 |
+
break;
|
4115 |
+
case 'portType':
|
4116 |
+
switch ($name) {
|
4117 |
+
case 'operation':
|
4118 |
+
$this->currentPortOperation = $attrs['name'];
|
4119 |
+
if (isset($attrs['parameterOrder'])) {
|
4120 |
+
$this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder'];
|
4121 |
+
}
|
4122 |
+
break;
|
4123 |
+
case 'documentation':
|
4124 |
+
$this->documentation = true;
|
4125 |
+
break;
|
4126 |
+
// merge input/output data
|
4127 |
+
default:
|
4128 |
+
$m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : '';
|
4129 |
+
$this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m;
|
4130 |
+
break;
|
4131 |
+
}
|
4132 |
+
break;
|
4133 |
+
case 'binding':
|
4134 |
+
switch ($name) {
|
4135 |
+
case 'binding':
|
4136 |
+
// get ns prefix
|
4137 |
+
if (isset($attrs['style'])) {
|
4138 |
+
$this->bindings[$this->currentBinding]['prefix'] = $prefix;
|
4139 |
+
}
|
4140 |
+
$this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs);
|
4141 |
+
break;
|
4142 |
+
case 'header':
|
4143 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs;
|
4144 |
+
break;
|
4145 |
+
case 'operation':
|
4146 |
+
if (isset($attrs['soapAction'])) {
|
4147 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction'];
|
4148 |
+
}
|
4149 |
+
if (isset($attrs['style'])) {
|
4150 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style'];
|
4151 |
+
}
|
4152 |
+
if (isset($attrs['name'])) {
|
4153 |
+
$this->currentOperation = $attrs['name'];
|
4154 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name'];
|
4155 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding;
|
4156 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : '';
|
4157 |
+
}
|
4158 |
+
break;
|
4159 |
+
case 'input':
|
4160 |
+
$this->opStatus = 'input';
|
4161 |
+
break;
|
4162 |
+
case 'output':
|
4163 |
+
$this->opStatus = 'output';
|
4164 |
+
break;
|
4165 |
+
case 'body':
|
4166 |
+
if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) {
|
4167 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs);
|
4168 |
+
} else {
|
4169 |
+
$this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs;
|
4170 |
+
}
|
4171 |
+
break;
|
4172 |
+
}
|
4173 |
+
break;
|
4174 |
+
case 'service':
|
4175 |
+
switch ($name) {
|
4176 |
+
case 'port':
|
4177 |
+
$this->currentPort = $attrs['name'];
|
4178 |
+
$this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']);
|
4179 |
+
|
4180 |
+
break;
|
4181 |
+
case 'address':
|
4182 |
+
$this->ports[$this->currentPort]['location'] = $attrs['location'];
|
4183 |
+
$this->ports[$this->currentPort]['bindingType'] = $namespace;
|
4184 |
+
$this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace;
|
4185 |
+
$this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location'];
|
4186 |
+
break;
|
4187 |
+
}
|
4188 |
+
break;
|
4189 |
+
}
|
4190 |
+
// set status
|
4191 |
+
switch ($name) {
|
4192 |
+
case 'import':
|
4193 |
+
if (isset($attrs['location'])) {
|
4194 |
+
$this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false);
|
4195 |
+
} else {
|
4196 |
+
$this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
|
4197 |
+
if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
|
4198 |
+
$this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace'];
|
4199 |
+
}
|
4200 |
+
}
|
4201 |
+
break;
|
4202 |
+
//wait for schema
|
4203 |
+
//case 'types':
|
4204 |
+
// $this->status = 'schema';
|
4205 |
+
// break;
|
4206 |
+
case 'message':
|
4207 |
+
$this->status = 'message';
|
4208 |
+
$this->messages[$attrs['name']] = array();
|
4209 |
+
$this->currentMessage = $attrs['name'];
|
4210 |
+
break;
|
4211 |
+
case 'portType':
|
4212 |
+
$this->status = 'portType';
|
4213 |
+
$this->portTypes[$attrs['name']] = array();
|
4214 |
+
$this->currentPortType = $attrs['name'];
|
4215 |
+
break;
|
4216 |
+
case "binding":
|
4217 |
+
if (isset($attrs['name'])) {
|
4218 |
+
// get binding name
|
4219 |
+
if (strpos($attrs['name'], ':')) {
|
4220 |
+
$this->currentBinding = $this->getLocalPart($attrs['name']);
|
4221 |
+
} else {
|
4222 |
+
$this->currentBinding = $attrs['name'];
|
4223 |
+
}
|
4224 |
+
$this->status = 'binding';
|
4225 |
+
$this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']);
|
4226 |
+
}
|
4227 |
+
break;
|
4228 |
+
case 'service':
|
4229 |
+
$this->serviceName = $attrs['name'];
|
4230 |
+
$this->status = 'service';
|
4231 |
+
break;
|
4232 |
+
case 'definitions':
|
4233 |
+
foreach ($attrs as $name => $value) {
|
4234 |
+
$this->wsdl_info[$name] = $value;
|
4235 |
+
}
|
4236 |
+
break;
|
4237 |
+
}
|
4238 |
+
}
|
4239 |
+
}
|
4240 |
+
|
4241 |
+
/**
|
4242 |
+
* end-element handler
|
4243 |
+
*
|
4244 |
+
* @param string $parser XML parser object
|
4245 |
+
* @param string $name element name
|
4246 |
+
* @access private
|
4247 |
+
*/
|
4248 |
+
function end_element($parser, $name){
|
4249 |
+
// unset schema status
|
4250 |
+
if (/*ereg('types$', $name) ||*/ preg_match('/schema$/', $name)) {
|
4251 |
+
$this->status = "";
|
4252 |
+
$this->currentSchema->clearDebug();
|
4253 |
+
$this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema;
|
4254 |
+
}
|
4255 |
+
if ($this->status == 'schema') {
|
4256 |
+
$this->currentSchema->schemaEndElement($parser, $name);
|
4257 |
+
} else {
|
4258 |
+
// bring depth down a notch
|
4259 |
+
$this->depth--;
|
4260 |
+
}
|
4261 |
+
// end documentation
|
4262 |
+
if ($this->documentation) {
|
4263 |
+
//TODO: track the node to which documentation should be assigned; it can be a part, message, etc.
|
4264 |
+
//$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation;
|
4265 |
+
$this->documentation = false;
|
4266 |
+
}
|
4267 |
+
}
|
4268 |
+
|
4269 |
+
/**
|
4270 |
+
* element content handler
|
4271 |
+
*
|
4272 |
+
* @param string $parser XML parser object
|
4273 |
+
* @param string $data element content
|
4274 |
+
* @access private
|
4275 |
+
*/
|
4276 |
+
function character_data($parser, $data)
|
4277 |
+
{
|
4278 |
+
$pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0;
|
4279 |
+
if (isset($this->message[$pos]['cdata'])) {
|
4280 |
+
$this->message[$pos]['cdata'] .= $data;
|
4281 |
+
}
|
4282 |
+
if ($this->documentation) {
|
4283 |
+
$this->documentation .= $data;
|
4284 |
+
}
|
4285 |
+
}
|
4286 |
+
|
4287 |
+
function getBindingData($binding)
|
4288 |
+
{
|
4289 |
+
if (is_array($this->bindings[$binding])) {
|
4290 |
+
return $this->bindings[$binding];
|
4291 |
+
}
|
4292 |
+
}
|
4293 |
+
|
4294 |
+
/**
|
4295 |
+
* returns an assoc array of operation names => operation data
|
4296 |
+
*
|
4297 |
+
* @param string $bindingType eg: soap, smtp, dime (only soap is currently supported)
|
4298 |
+
* @return array
|
4299 |
+
* @access public
|
4300 |
+
*/
|
4301 |
+
function getOperations($bindingType = 'soap')
|
4302 |
+
{
|
4303 |
+
$ops = array();
|
4304 |
+
if ($bindingType == 'soap') {
|
4305 |
+
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
|
4306 |
+
}
|
4307 |
+
// loop thru ports
|
4308 |
+
foreach($this->ports as $port => $portData) {
|
4309 |
+
// binding type of port matches parameter
|
4310 |
+
if ($portData['bindingType'] == $bindingType) {
|
4311 |
+
// merge bindings
|
4312 |
+
if (isset($this->bindings[ $portData['binding'] ]['operations'])) {
|
4313 |
+
$ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']);
|
4314 |
+
}
|
4315 |
+
}
|
4316 |
+
}
|
4317 |
+
return $ops;
|
4318 |
+
}
|
4319 |
+
|
4320 |
+
/**
|
4321 |
+
* returns an associative array of data necessary for calling an operation
|
4322 |
+
*
|
4323 |
+
* @param string $operation , name of operation
|
4324 |
+
* @param string $bindingType , type of binding eg: soap
|
4325 |
+
* @return array
|
4326 |
+
* @access public
|
4327 |
+
*/
|
4328 |
+
function getOperationData($operation, $bindingType = 'soap')
|
4329 |
+
{
|
4330 |
+
if ($bindingType == 'soap') {
|
4331 |
+
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
|
4332 |
+
}
|
4333 |
+
// loop thru ports
|
4334 |
+
foreach($this->ports as $port => $portData) {
|
4335 |
+
// binding type of port matches parameter
|
4336 |
+
if ($portData['bindingType'] == $bindingType) {
|
4337 |
+
// get binding
|
4338 |
+
//foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
|
4339 |
+
foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) {
|
4340 |
+
// note that we could/should also check the namespace here
|
4341 |
+
if ($operation == $bOperation) {
|
4342 |
+
$opData = $this->bindings[ $portData['binding'] ]['operations'][$operation];
|
4343 |
+
return $opData;
|
4344 |
+
}
|
4345 |
+
}
|
4346 |
+
}
|
4347 |
+
}
|
4348 |
+
}
|
4349 |
+
|
4350 |
+
/**
|
4351 |
+
* returns an associative array of data necessary for calling an operation
|
4352 |
+
*
|
4353 |
+
* @param string $soapAction soapAction for operation
|
4354 |
+
* @param string $bindingType type of binding eg: soap
|
4355 |
+
* @return array
|
4356 |
+
* @access public
|
4357 |
+
*/
|
4358 |
+
function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') {
|
4359 |
+
if ($bindingType == 'soap') {
|
4360 |
+
$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
|
4361 |
+
}
|
4362 |
+
// loop thru ports
|
4363 |
+
foreach($this->ports as $port => $portData) {
|
4364 |
+
// binding type of port matches parameter
|
4365 |
+
if ($portData['bindingType'] == $bindingType) {
|
4366 |
+
// loop through operations for the binding
|
4367 |
+
foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
|
4368 |
+
if ($opData['soapAction'] == $soapAction) {
|
4369 |
+
return $opData;
|
4370 |
+
}
|
4371 |
+
}
|
4372 |
+
}
|
4373 |
+
}
|
4374 |
+
}
|
4375 |
+
|
4376 |
+
/**
|
4377 |
+
* returns an array of information about a given type
|
4378 |
+
* returns false if no type exists by the given name
|
4379 |
+
*
|
4380 |
+
* typeDef = array(
|
4381 |
+
* 'elements' => array(), // refs to elements array
|
4382 |
+
* 'restrictionBase' => '',
|
4383 |
+
* 'phpType' => '',
|
4384 |
+
* 'order' => '(sequence|all)',
|
4385 |
+
* 'attrs' => array() // refs to attributes array
|
4386 |
+
* )
|
4387 |
+
*
|
4388 |
+
* @param $type string the type
|
4389 |
+
* @param $ns string namespace (not prefix) of the type
|
4390 |
+
* @return mixed
|
4391 |
+
* @access public
|
4392 |
+
* @see xmlschema
|
4393 |
+
*/
|
4394 |
+
function getTypeDef($type, $ns) {
|
4395 |
+
if ((! $ns) && isset($this->namespaces['tns'])) {
|
4396 |
+
$ns = $this->namespaces['tns'];
|
4397 |
+
}
|
4398 |
+
if (isset($this->schemas[$ns])) {
|
4399 |
+
for ($i = 0; $i < count($this->schemas[$ns]); $i++) {
|
4400 |
+
$xs = &$this->schemas[$ns][$i];
|
4401 |
+
$t = $xs->getTypeDef($type);
|
4402 |
+
$xs->clearDebug();
|
4403 |
+
if ($t) {
|
4404 |
+
if (!isset($t['phpType'])) {
|
4405 |
+
// get info for type to tack onto the element
|
4406 |
+
$uqType = substr($t['type'], strrpos($t['type'], ':') + 1);
|
4407 |
+
$ns = substr($t['type'], 0, strrpos($t['type'], ':'));
|
4408 |
+
$etype = $this->getTypeDef($uqType, $ns);
|
4409 |
+
if ($etype) {
|
4410 |
+
if (isset($etype['phpType'])) {
|
4411 |
+
$t['phpType'] = $etype['phpType'];
|
4412 |
+
}
|
4413 |
+
if (isset($etype['elements'])) {
|
4414 |
+
$t['elements'] = $etype['elements'];
|
4415 |
+
}
|
4416 |
+
if (isset($etype['attrs'])) {
|
4417 |
+
$t['attrs'] = $etype['attrs'];
|
4418 |
+
}
|
4419 |
+
}
|
4420 |
+
}
|
4421 |
+
return $t;
|
4422 |
+
}
|
4423 |
+
}
|
4424 |
+
} else {
|
4425 |
+
}
|
4426 |
+
return false;
|
4427 |
+
}
|
4428 |
+
|
4429 |
+
/**
|
4430 |
+
* prints html description of services
|
4431 |
+
*
|
4432 |
+
* @access private
|
4433 |
+
*/
|
4434 |
+
function webDescription(){
|
4435 |
+
global $HTTP_SERVER_VARS;
|
4436 |
+
|
4437 |
+
if (isset($_SERVER)) {
|
4438 |
+
$PHP_SELF = $_SERVER['PHP_SELF'];
|
4439 |
+
} elseif (isset($HTTP_SERVER_VARS)) {
|
4440 |
+
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
|
4441 |
+
} else {
|
4442 |
+
$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
|
4443 |
+
}
|
4444 |
+
|
4445 |
+
$b = '
|
4446 |
+
<html><head><title>NuSOAP: '.$this->serviceName.'</title>
|
4447 |
+
<style type="text/css">
|
4448 |
+
body { font-family: arial; color: #000000; background-color: #ffffff; margin: 0px 0px 0px 0px; }
|
4449 |
+
p { font-family: arial; color: #000000; margin-top: 0px; margin-bottom: 12px; }
|
4450 |
+
pre { background-color: silver; padding: 5px; font-family: Courier New; font-size: x-small; color: #000000;}
|
4451 |
+
ul { margin-top: 10px; margin-left: 20px; }
|
4452 |
+
li { list-style-type: none; margin-top: 10px; color: #000000; }
|
4453 |
+
.content{
|
4454 |
+
margin-left: 0px; padding-bottom: 2em; }
|
4455 |
+
.nav {
|
4456 |
+
padding-top: 10px; padding-bottom: 10px; padding-left: 15px; font-size: .70em;
|
4457 |
+
margin-top: 10px; margin-left: 0px; color: #000000;
|
4458 |
+
background-color: #ccccff; width: 20%; margin-left: 20px; margin-top: 20px; }
|
4459 |
+
.title {
|
4460 |
+
font-family: arial; font-size: 26px; color: #ffffff;
|
4461 |
+
background-color: #999999; width: 105%; margin-left: 0px;
|
4462 |
+
padding-top: 10px; padding-bottom: 10px; padding-left: 15px;}
|
4463 |
+
.hidden {
|
4464 |
+
position: absolute; visibility: hidden; z-index: 200; left: 250px; top: 100px;
|
4465 |
+
font-family: arial; overflow: hidden; width: 600;
|
4466 |
+
padding: 20px; font-size: 10px; background-color: #999999;
|
4467 |
+
layer-background-color:#FFFFFF; }
|
4468 |
+
a,a:active { color: charcoal; font-weight: bold; }
|
4469 |
+
a:visited { color: #666666; font-weight: bold; }
|
4470 |
+
a:hover { color: cc3300; font-weight: bold; }
|
4471 |
+
</style>
|
4472 |
+
<script type="text/javascript">
|
4473 |
+
//<![CDATA[
|
4474 |
+
// POP-UP CAPTIONS...
|
4475 |
+
function lib_bwcheck(){ //Browsercheck (needed)
|
4476 |
+
this.ver=navigator.appVersion
|
4477 |
+
this.agent=navigator.userAgent
|
4478 |
+
this.dom=document.getElementById?1:0
|
4479 |
+
this.opera5=this.agent.indexOf("Opera 5")>-1
|
4480 |
+
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
|
4481 |
+
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
|
4482 |
+
this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
|
4483 |
+
this.ie=this.ie4||this.ie5||this.ie6
|
4484 |
+
this.mac=this.agent.indexOf("Mac")>-1
|
4485 |
+
this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
|
4486 |
+
this.ns4=(document.layers && !this.dom)?1:0;
|
4487 |
+
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
|
4488 |
+
return this
|
4489 |
+
}
|
4490 |
+
var bw = new lib_bwcheck()
|
4491 |
+
//Makes crossbrowser object.
|
4492 |
+
function makeObj(obj){
|
4493 |
+
this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
|
4494 |
+
if(!this.evnt) return false
|
4495 |
+
this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0;
|
4496 |
+
this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0;
|
4497 |
+
this.writeIt=b_writeIt;
|
4498 |
+
return this
|
4499 |
+
}
|
4500 |
+
// A unit of measure that will be added when setting the position of a layer.
|
4501 |
+
//var px = bw.ns4||window.opera?"":"px";
|
4502 |
+
function b_writeIt(text){
|
4503 |
+
if (bw.ns4){this.wref.write(text);this.wref.close()}
|
4504 |
+
else this.wref.innerHTML = text
|
4505 |
+
}
|
4506 |
+
//Shows the messages
|
4507 |
+
var oDesc;
|
4508 |
+
function popup(divid){
|
4509 |
+
if(oDesc = new makeObj(divid)){
|
4510 |
+
oDesc.css.visibility = "visible"
|
4511 |
+
}
|
4512 |
+
}
|
4513 |
+
function popout(){ // Hides message
|
4514 |
+
if(oDesc) oDesc.css.visibility = "hidden"
|
4515 |
+
}
|
4516 |
+
//]]>
|
4517 |
+
</script>
|
4518 |
+
</head>
|
4519 |
+
<body>
|
4520 |
+
<div class=content>
|
4521 |
+
<br><br>
|
4522 |
+
<div class=title>'.$this->serviceName.'</div>
|
4523 |
+
<div class=nav>
|
4524 |
+
<p>View the <a href="'.$PHP_SELF.'?wsdl">WSDL</a> for the service.
|
4525 |
+
Click on an operation name to view it's details.</p>
|
4526 |
+
<ul>';
|
4527 |
+
foreach($this->getOperations() as $op => $data){
|
4528 |
+
$b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>";
|
4529 |
+
// create hidden div
|
4530 |
+
$b .= "<div id='$op' class='hidden'>
|
4531 |
+
<a href='#' onclick='popout()'><font color='#ffffff'>Close</font></a><br><br>";
|
4532 |
+
foreach($data as $donnie => $marie){ // loop through opdata
|
4533 |
+
if($donnie == 'input' || $donnie == 'output'){ // show input/output data
|
4534 |
+
$b .= "<font color='white'>".ucfirst($donnie).':</font><br>';
|
4535 |
+
foreach($marie as $captain => $tenille){ // loop through data
|
4536 |
+
if($captain == 'parts'){ // loop thru parts
|
4537 |
+
$b .= " $captain:<br>";
|
4538 |
+
//if(is_array($tenille)){
|
4539 |
+
foreach($tenille as $joanie => $chachi){
|
4540 |
+
$b .= " $joanie: $chachi<br>";
|
4541 |
+
}
|
4542 |
+
//}
|
4543 |
+
} else {
|
4544 |
+
$b .= " $captain: $tenille<br>";
|
4545 |
+
}
|
4546 |
+
}
|
4547 |
+
} else {
|
4548 |
+
$b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>";
|
4549 |
+
}
|
4550 |
+
}
|
4551 |
+
$b .= '</div>';
|
4552 |
+
}
|
4553 |
+
$b .= '
|
4554 |
+
<ul>
|
4555 |
+
</div>
|
4556 |
+
</div></body></html>';
|
4557 |
+
return $b;
|
4558 |
+
}
|
4559 |
+
|
4560 |
+
/**
|
4561 |
+
* serialize the parsed wsdl
|
4562 |
+
*
|
4563 |
+
* @param mixed $debug whether to put debug=1 in endpoint URL
|
4564 |
+
* @return string serialization of WSDL
|
4565 |
+
* @access public
|
4566 |
+
*/
|
4567 |
+
function serialize($debug = 0)
|
4568 |
+
{
|
4569 |
+
$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
|
4570 |
+
$xml .= "\n<definitions";
|
4571 |
+
foreach($this->namespaces as $k => $v) {
|
4572 |
+
$xml .= " xmlns:$k=\"$v\"";
|
4573 |
+
}
|
4574 |
+
// 10.9.02 - add poulter fix for wsdl and tns declarations
|
4575 |
+
if (isset($this->namespaces['wsdl'])) {
|
4576 |
+
$xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\"";
|
4577 |
+
}
|
4578 |
+
if (isset($this->namespaces['tns'])) {
|
4579 |
+
$xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\"";
|
4580 |
+
}
|
4581 |
+
$xml .= '>';
|
4582 |
+
// imports
|
4583 |
+
if (sizeof($this->import) > 0) {
|
4584 |
+
foreach($this->import as $ns => $list) {
|
4585 |
+
foreach ($list as $ii) {
|
4586 |
+
if ($ii['location'] != '') {
|
4587 |
+
$xml .= '<import location="' . $ii['location'] . '" namespace="' . $ns . '" />';
|
4588 |
+
} else {
|
4589 |
+
$xml .= '<import namespace="' . $ns . '" />';
|
4590 |
+
}
|
4591 |
+
}
|
4592 |
+
}
|
4593 |
+
}
|
4594 |
+
// types
|
4595 |
+
if (count($this->schemas)>=1) {
|
4596 |
+
$xml .= "\n<types>\n";
|
4597 |
+
foreach ($this->schemas as $ns => $list) {
|
4598 |
+
foreach ($list as $xs) {
|
4599 |
+
$xml .= $xs->serializeSchema();
|
4600 |
+
}
|
4601 |
+
}
|
4602 |
+
$xml .= '</types>';
|
4603 |
+
}
|
4604 |
+
// messages
|
4605 |
+
if (count($this->messages) >= 1) {
|
4606 |
+
foreach($this->messages as $msgName => $msgParts) {
|
4607 |
+
$xml .= "\n<message name=\"" . $msgName . '">';
|
4608 |
+
if(is_array($msgParts)){
|
4609 |
+
foreach($msgParts as $partName => $partType) {
|
4610 |
+
// print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>';
|
4611 |
+
if (strpos($partType, ':')) {
|
4612 |
+
$typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType));
|
4613 |
+
} elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) {
|
4614 |
+
// print 'checking typemap: '.$this->XMLSchemaVersion.'<br>';
|
4615 |
+
$typePrefix = 'xsd';
|
4616 |
+
} else {
|
4617 |
+
foreach($this->typemap as $ns => $types) {
|
4618 |
+
if (isset($types[$partType])) {
|
4619 |
+
$typePrefix = $this->getPrefixFromNamespace($ns);
|
4620 |
+
}
|
4621 |
+
}
|
4622 |
+
if (!isset($typePrefix)) {
|
4623 |
+
die("$partType has no namespace!");
|
4624 |
+
}
|
4625 |
+
}
|
4626 |
+
$ns = $this->getNamespaceFromPrefix($typePrefix);
|
4627 |
+
$typeDef = $this->getTypeDef($this->getLocalPart($partType), $ns);
|
4628 |
+
if ($typeDef['typeClass'] == 'element') {
|
4629 |
+
$elementortype = 'element';
|
4630 |
+
} else {
|
4631 |
+
$elementortype = 'type';
|
4632 |
+
}
|
4633 |
+
$xml .= "\n" . ' <part name="' . $partName . '" ' . $elementortype . '="' . $typePrefix . ':' . $this->getLocalPart($partType) . '" />';
|
4634 |
+
}
|
4635 |
+
}
|
4636 |
+
$xml .= '</message>';
|
4637 |
+
}
|
4638 |
+
}
|
4639 |
+
// bindings & porttypes
|
4640 |
+
if (count($this->bindings) >= 1) {
|
4641 |
+
$binding_xml = '';
|
4642 |
+
$portType_xml = '';
|
4643 |
+
foreach($this->bindings as $bindingName => $attrs) {
|
4644 |
+
$binding_xml .= "\n<binding name=\"" . $bindingName . '" type="tns:' . $attrs['portType'] . '">';
|
4645 |
+
$binding_xml .= "\n" . ' <soap:binding style="' . $attrs['style'] . '" transport="' . $attrs['transport'] . '"/>';
|
4646 |
+
$portType_xml .= "\n<portType name=\"" . $attrs['portType'] . '">';
|
4647 |
+
foreach($attrs['operations'] as $opName => $opParts) {
|
4648 |
+
$binding_xml .= "\n" . ' <operation name="' . $opName . '">';
|
4649 |
+
$binding_xml .= "\n" . ' <soap:operation soapAction="' . $opParts['soapAction'] . '" style="'. $opParts['style'] . '"/>';
|
4650 |
+
if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') {
|
4651 |
+
$enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"';
|
4652 |
+
} else {
|
4653 |
+
$enc_style = '';
|
4654 |
+
}
|
4655 |
+
$binding_xml .= "\n" . ' <input><soap:body use="' . $opParts['input']['use'] . '" namespace="' . $opParts['input']['namespace'] . '"' . $enc_style . '/></input>';
|
4656 |
+
if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') {
|
4657 |
+
$enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"';
|
4658 |
+
} else {
|
4659 |
+
$enc_style = '';
|
4660 |
+
}
|
4661 |
+
$binding_xml .= "\n" . ' <output><soap:body use="' . $opParts['output']['use'] . '" namespace="' . $opParts['output']['namespace'] . '"' . $enc_style . '/></output>';
|
4662 |
+
$binding_xml .= "\n" . ' </operation>';
|
4663 |
+
$portType_xml .= "\n" . ' <operation name="' . $opParts['name'] . '"';
|
4664 |
+
if (isset($opParts['parameterOrder'])) {
|
4665 |
+
$portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"';
|
4666 |
+
}
|
4667 |
+
$portType_xml .= '>';
|
4668 |
+
if(isset($opParts['documentation']) && $opParts['documentation'] != '') {
|
4669 |
+
$portType_xml .= "\n" . ' <documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>';
|
4670 |
+
}
|
4671 |
+
$portType_xml .= "\n" . ' <input message="tns:' . $opParts['input']['message'] . '"/>';
|
4672 |
+
$portType_xml .= "\n" . ' <output message="tns:' . $opParts['output']['message'] . '"/>';
|
4673 |
+
$portType_xml .= "\n" . ' </operation>';
|
4674 |
+
}
|
4675 |
+
$portType_xml .= "\n" . '</portType>';
|
4676 |
+
$binding_xml .= "\n" . '</binding>';
|
4677 |
+
}
|
4678 |
+
$xml .= $portType_xml . $binding_xml;
|
4679 |
+
}
|
4680 |
+
// services
|
4681 |
+
$xml .= "\n<service name=\"" . $this->serviceName . '">';
|
4682 |
+
if (count($this->ports) >= 1) {
|
4683 |
+
foreach($this->ports as $pName => $attrs) {
|
4684 |
+
$xml .= "\n" . ' <port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">';
|
4685 |
+
$xml .= "\n" . ' <soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>';
|
4686 |
+
$xml .= "\n" . ' </port>';
|
4687 |
+
}
|
4688 |
+
}
|
4689 |
+
$xml .= "\n" . '</service>';
|
4690 |
+
return $xml . "\n</definitions>";
|
4691 |
+
}
|
4692 |
+
|
4693 |
+
/**
|
4694 |
+
* serialize PHP values according to a WSDL message definition
|
4695 |
+
*
|
4696 |
+
* TODO
|
4697 |
+
* - multi-ref serialization
|
4698 |
+
* - validate PHP values against type definitions, return errors if invalid
|
4699 |
+
*
|
4700 |
+
* @param string $operation operation name
|
4701 |
+
* @param string $direction (input|output)
|
4702 |
+
* @param mixed $parameters parameter value(s)
|
4703 |
+
* @return mixed parameters serialized as XML or false on error (e.g. operation not found)
|
4704 |
+
* @access public
|
4705 |
+
*/
|
4706 |
+
function serializeRPCParameters($operation, $direction, $parameters)
|
4707 |
+
{
|
4708 |
+
|
4709 |
+
if ($direction != 'input' && $direction != 'output') {
|
4710 |
+
$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
|
4711 |
+
return false;
|
4712 |
+
}
|
4713 |
+
if (!$opData = $this->getOperationData($operation)) {
|
4714 |
+
$this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
|
4715 |
+
return false;
|
4716 |
+
}
|
4717 |
+
|
4718 |
+
// Get encoding style for output and set to current
|
4719 |
+
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
|
4720 |
+
if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
|
4721 |
+
$encodingStyle = $opData['output']['encodingStyle'];
|
4722 |
+
$enc_style = $encodingStyle;
|
4723 |
+
}
|
4724 |
+
|
4725 |
+
// set input params
|
4726 |
+
$xml = '';
|
4727 |
+
if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
|
4728 |
+
|
4729 |
+
$use = $opData[$direction]['use'];
|
4730 |
+
if (is_array($parameters)) {
|
4731 |
+
$parametersArrayType = $this->isArraySimpleOrStruct($parameters);
|
4732 |
+
foreach($opData[$direction]['parts'] as $name => $type) {
|
4733 |
+
// Track encoding style
|
4734 |
+
if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
|
4735 |
+
$encodingStyle = $opData[$direction]['encodingStyle'];
|
4736 |
+
$enc_style = $encodingStyle;
|
4737 |
+
} else {
|
4738 |
+
$enc_style = false;
|
4739 |
+
}
|
4740 |
+
// NOTE: add error handling here
|
4741 |
+
// if serializeType returns false, then catch global error and fault
|
4742 |
+
if ($parametersArrayType == 'arraySimple') {
|
4743 |
+
$p = array_shift($parameters);
|
4744 |
+
$xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
|
4745 |
+
} elseif (isset($parameters[$name])) {
|
4746 |
+
$xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
|
4747 |
+
} else {
|
4748 |
+
// TODO: only send nillable
|
4749 |
+
$xml .= $this->serializeType($name, $type, null, $use, $enc_style);
|
4750 |
+
}
|
4751 |
+
}
|
4752 |
+
} else {
|
4753 |
+
}
|
4754 |
+
}
|
4755 |
+
return $xml;
|
4756 |
+
}
|
4757 |
+
|
4758 |
+
/**
|
4759 |
+
* serialize a PHP value according to a WSDL message definition
|
4760 |
+
*
|
4761 |
+
* TODO
|
4762 |
+
* - multi-ref serialization
|
4763 |
+
* - validate PHP values against type definitions, return errors if invalid
|
4764 |
+
*
|
4765 |
+
* @param string $ type name
|
4766 |
+
* @param mixed $ param value
|
4767 |
+
* @return mixed new param or false if initial value didn't validate
|
4768 |
+
* @access public
|
4769 |
+
* @deprecated
|
4770 |
+
*/
|
4771 |
+
function serializeParameters($operation, $direction, $parameters)
|
4772 |
+
{
|
4773 |
+
|
4774 |
+
if ($direction != 'input' && $direction != 'output') {
|
4775 |
+
$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
|
4776 |
+
return false;
|
4777 |
+
}
|
4778 |
+
if (!$opData = $this->getOperationData($operation)) {
|
4779 |
+
$this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
|
4780 |
+
return false;
|
4781 |
+
}
|
4782 |
+
|
4783 |
+
// Get encoding style for output and set to current
|
4784 |
+
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
|
4785 |
+
if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
|
4786 |
+
$encodingStyle = $opData['output']['encodingStyle'];
|
4787 |
+
$enc_style = $encodingStyle;
|
4788 |
+
}
|
4789 |
+
|
4790 |
+
// set input params
|
4791 |
+
$xml = '';
|
4792 |
+
if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
|
4793 |
+
|
4794 |
+
$use = $opData[$direction]['use'];
|
4795 |
+
if (is_array($parameters)) {
|
4796 |
+
$parametersArrayType = $this->isArraySimpleOrStruct($parameters);
|
4797 |
+
foreach($opData[$direction]['parts'] as $name => $type) {
|
4798 |
+
// Track encoding style
|
4799 |
+
if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
|
4800 |
+
$encodingStyle = $opData[$direction]['encodingStyle'];
|
4801 |
+
$enc_style = $encodingStyle;
|
4802 |
+
} else {
|
4803 |
+
$enc_style = false;
|
4804 |
+
}
|
4805 |
+
// NOTE: add error handling here
|
4806 |
+
// if serializeType returns false, then catch global error and fault
|
4807 |
+
if ($parametersArrayType == 'arraySimple') {
|
4808 |
+
$p = array_shift($parameters);
|
4809 |
+
$xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
|
4810 |
+
} elseif (isset($parameters[$name])) {
|
4811 |
+
$xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
|
4812 |
+
} else {
|
4813 |
+
// TODO: only send nillable
|
4814 |
+
$xml .= $this->serializeType($name, $type, null, $use, $enc_style);
|
4815 |
+
}
|
4816 |
+
}
|
4817 |
+
} else {
|
4818 |
+
}
|
4819 |
+
}
|
4820 |
+
return $xml;
|
4821 |
+
}
|
4822 |
+
|
4823 |
+
/**
|
4824 |
+
* serializes a PHP value according a given type definition
|
4825 |
+
*
|
4826 |
+
* @param string $name name of value (part or element)
|
4827 |
+
* @param string $type XML schema type of value (type or element)
|
4828 |
+
* @param mixed $value a native PHP value (parameter value)
|
4829 |
+
* @param string $use use for part (encoded|literal)
|
4830 |
+
* @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
|
4831 |
+
* @param boolean $unqualified a kludge for what should be XML namespace form handling
|
4832 |
+
* @return string value serialized as an XML string
|
4833 |
+
* @access private
|
4834 |
+
*/
|
4835 |
+
function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
|
4836 |
+
{
|
4837 |
+
if($use == 'encoded' && $encodingStyle) {
|
4838 |
+
$encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"';
|
4839 |
+
}
|
4840 |
+
|
4841 |
+
// if a soapval has been supplied, let its type override the WSDL
|
4842 |
+
if (is_object($value) && get_class($value) == 'soapval') {
|
4843 |
+
if ($value->type_ns) {
|
4844 |
+
$type = $value->type_ns . ':' . $value->type;
|
4845 |
+
$forceType = true;
|
4846 |
+
} elseif ($value->type) {
|
4847 |
+
$type = $value->type;
|
4848 |
+
$forceType = true;
|
4849 |
+
} else {
|
4850 |
+
$forceType = false;
|
4851 |
+
}
|
4852 |
+
$attrs = $value->attributes;
|
4853 |
+
$value = $value->value;
|
4854 |
+
if ($attrs) {
|
4855 |
+
if (!is_array($value)) {
|
4856 |
+
$value['!'] = $value;
|
4857 |
+
}
|
4858 |
+
foreach ($attrs as $n => $v) {
|
4859 |
+
$value['!' . $n] = $v;
|
4860 |
+
}
|
4861 |
+
}
|
4862 |
+
} else {
|
4863 |
+
$forceType = false;
|
4864 |
+
}
|
4865 |
+
|
4866 |
+
$xml = '';
|
4867 |
+
if (strpos($type, ':')) {
|
4868 |
+
$uqType = substr($type, strrpos($type, ':') + 1);
|
4869 |
+
$ns = substr($type, 0, strrpos($type, ':'));
|
4870 |
+
if ($this->getNamespaceFromPrefix($ns)) {
|
4871 |
+
$ns = $this->getNamespaceFromPrefix($ns);
|
4872 |
+
}
|
4873 |
+
|
4874 |
+
if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){
|
4875 |
+
if ($unqualified && $use == 'literal') {
|
4876 |
+
$elementNS = " xmlns=\"\"";
|
4877 |
+
} else {
|
4878 |
+
$elementNS = '';
|
4879 |
+
}
|
4880 |
+
if (is_null($value)) {
|
4881 |
+
if ($use == 'literal') {
|
4882 |
+
// TODO: depends on minOccurs
|
4883 |
+
$xml = "<$name$elementNS/>";
|
4884 |
+
} else {
|
4885 |
+
// TODO: depends on nillable, which should be checked before calling this method
|
4886 |
+
$xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>";
|
4887 |
+
}
|
4888 |
+
return $xml;
|
4889 |
+
}
|
4890 |
+
if ($uqType == 'Array') {
|
4891 |
+
// JBoss/Axis does this sometimes
|
4892 |
+
return $this->serialize_val($value, $name, false, false, false, false, $use);
|
4893 |
+
}
|
4894 |
+
if ($uqType == 'boolean') {
|
4895 |
+
if ((is_string($value) && $value == 'false') || (! $value)) {
|
4896 |
+
$value = 'false';
|
4897 |
+
} else {
|
4898 |
+
$value = 'true';
|
4899 |
+
}
|
4900 |
+
}
|
4901 |
+
if ($uqType == 'string' && gettype($value) == 'string') {
|
4902 |
+
$value = $this->expandEntities($value);
|
4903 |
+
}
|
4904 |
+
if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') {
|
4905 |
+
$value = sprintf("%.0lf", $value);
|
4906 |
+
}
|
4907 |
+
// it's a scalar
|
4908 |
+
// TODO: what about null/nil values?
|
4909 |
+
// check type isn't a custom type extending xmlschema namespace
|
4910 |
+
if (!$this->getTypeDef($uqType, $ns)) {
|
4911 |
+
if ($use == 'literal') {
|
4912 |
+
if ($forceType) {
|
4913 |
+
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>";
|
4914 |
+
} else {
|
4915 |
+
$xml = "<$name$elementNS>$value</$name>";
|
4916 |
+
}
|
4917 |
+
} else {
|
4918 |
+
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>";
|
4919 |
+
}
|
4920 |
+
return $xml;
|
4921 |
+
}
|
4922 |
+
} else if ($ns == 'http://xml.apache.org/xml-soap') {
|
4923 |
+
if ($uqType == 'Map') {
|
4924 |
+
$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
|
4925 |
+
if (! $tt_prefix) {
|
4926 |
+
$tt_prefix = 'ns' . rand(1000, 9999);
|
4927 |
+
$this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap';
|
4928 |
+
// force this to be added to usedNamespaces
|
4929 |
+
$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
|
4930 |
+
}
|
4931 |
+
$contents = '';
|
4932 |
+
foreach($value as $k => $v) {
|
4933 |
+
$contents .= '<item>';
|
4934 |
+
$contents .= $this->serialize_val($k,'key',false,false,false,false,$use);
|
4935 |
+
$contents .= $this->serialize_val($v,'value',false,false,false,false,$use);
|
4936 |
+
$contents .= '</item>';
|
4937 |
+
}
|
4938 |
+
if ($use == 'literal') {
|
4939 |
+
if ($forceType) {
|
4940 |
+
$xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents</$name>";
|
4941 |
+
} else {
|
4942 |
+
$xml = "<$name>$contents</$name>";
|
4943 |
+
}
|
4944 |
+
} else {
|
4945 |
+
$xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents</$name>";
|
4946 |
+
}
|
4947 |
+
return $xml;
|
4948 |
+
}
|
4949 |
+
}
|
4950 |
+
} else {
|
4951 |
+
// TODO: should the type be compared to types in XSD, and the namespace
|
4952 |
+
// set to XSD if the type matches?
|
4953 |
+
$ns = '';
|
4954 |
+
$uqType = $type;
|
4955 |
+
}
|
4956 |
+
if(!$typeDef = $this->getTypeDef($uqType, $ns)){
|
4957 |
+
$this->setError("$type ($uqType) is not a supported type.");
|
4958 |
+
return false;
|
4959 |
+
} else {
|
4960 |
+
}
|
4961 |
+
$phpType = $typeDef['phpType'];
|
4962 |
+
// if php type == struct, map value to the <all> element names
|
4963 |
+
if ($phpType == 'struct') {
|
4964 |
+
if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') {
|
4965 |
+
$elementName = $uqType;
|
4966 |
+
if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
|
4967 |
+
$elementNS = " xmlns=\"$ns\"";
|
4968 |
+
} else {
|
4969 |
+
$elementNS = " xmlns=\"\"";
|
4970 |
+
}
|
4971 |
+
} else {
|
4972 |
+
$elementName = $name;
|
4973 |
+
if ($unqualified) {
|
4974 |
+
$elementNS = " xmlns=\"\"";
|
4975 |
+
} else {
|
4976 |
+
$elementNS = '';
|
4977 |
+
}
|
4978 |
+
}
|
4979 |
+
|
4980 |
+
############################################### ipay
|
4981 |
+
$r_xmlns_case = array("RemittanceMethod","ShippingMethod","AuctionDelivery","Sender","Reciever");
|
4982 |
+
if (in_array($name,$r_xmlns_case)) $elementNS = ' xmlns="http://schema.auction.co.kr/Arche.API.xsd"';
|
4983 |
+
###############################################
|
4984 |
+
|
4985 |
+
if (is_null($value)) {
|
4986 |
+
if ($use == 'literal') {
|
4987 |
+
// TODO: depends on minOccurs
|
4988 |
+
$xml = "<$elementName$elementNS/>";
|
4989 |
+
} else {
|
4990 |
+
$xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>";
|
4991 |
+
}
|
4992 |
+
return $xml;
|
4993 |
+
}
|
4994 |
+
if (is_object($value)) {
|
4995 |
+
$value = get_object_vars($value);
|
4996 |
+
}
|
4997 |
+
if (is_array($value)) {
|
4998 |
+
$elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);
|
4999 |
+
if ($use == 'literal') {
|
5000 |
+
if ($forceType) {
|
5001 |
+
$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">";
|
5002 |
+
} else {
|
5003 |
+
$xml = "<$elementName$elementNS$elementAttrs>";
|
5004 |
+
}
|
5005 |
+
} else {
|
5006 |
+
$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>";
|
5007 |
+
}
|
5008 |
+
|
5009 |
+
$xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);
|
5010 |
+
$xml .= "</$elementName>";
|
5011 |
+
} else {
|
5012 |
+
$this->setError("phpType is struct, but value is not an array: see debug output for details");
|
5013 |
+
$xml = '';
|
5014 |
+
}
|
5015 |
+
} elseif ($phpType == 'array') {
|
5016 |
+
if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
|
5017 |
+
$elementNS = " xmlns=\"$ns\"";
|
5018 |
+
} else {
|
5019 |
+
if ($unqualified) {
|
5020 |
+
$elementNS = " xmlns=\"\"";
|
5021 |
+
} else {
|
5022 |
+
$elementNS = '';
|
5023 |
+
}
|
5024 |
+
}
|
5025 |
+
if (is_null($value)) {
|
5026 |
+
if ($use == 'literal') {
|
5027 |
+
// TODO: depends on minOccurs
|
5028 |
+
$xml = "<$name$elementNS/>";
|
5029 |
+
} else {
|
5030 |
+
$xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" .
|
5031 |
+
$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
|
5032 |
+
":Array\" " .
|
5033 |
+
$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
|
5034 |
+
':arrayType="' .
|
5035 |
+
$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .
|
5036 |
+
':' .
|
5037 |
+
$this->getLocalPart($typeDef['arrayType'])."[0]\"/>";
|
5038 |
+
}
|
5039 |
+
return $xml;
|
5040 |
+
}
|
5041 |
+
if (isset($typeDef['multidimensional'])) {
|
5042 |
+
$nv = array();
|
5043 |
+
foreach($value as $v) {
|
5044 |
+
$cols = ',' . sizeof($v);
|
5045 |
+
$nv = array_merge($nv, $v);
|
5046 |
+
}
|
5047 |
+
$value = $nv;
|
5048 |
+
} else {
|
5049 |
+
$cols = '';
|
5050 |
+
}
|
5051 |
+
if (is_array($value) && sizeof($value) >= 1) {
|
5052 |
+
$rows = sizeof($value);
|
5053 |
+
$contents = '';
|
5054 |
+
foreach($value as $k => $v) {
|
5055 |
+
//if (strpos($typeDef['arrayType'], ':') ) {
|
5056 |
+
if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) {
|
5057 |
+
$contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
|
5058 |
+
} else {
|
5059 |
+
$contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);
|
5060 |
+
}
|
5061 |
+
}
|
5062 |
+
} else {
|
5063 |
+
$rows = 0;
|
5064 |
+
$contents = null;
|
5065 |
+
}
|
5066 |
+
// TODO: for now, an empty value will be serialized as a zero element
|
5067 |
+
// array. Revisit this when coding the handling of null/nil values.
|
5068 |
+
if ($use == 'literal') {
|
5069 |
+
$xml = "<$name$elementNS>"
|
5070 |
+
.$contents
|
5071 |
+
."</$name>";
|
5072 |
+
} else {
|
5073 |
+
$xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '.
|
5074 |
+
$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/')
|
5075 |
+
.':arrayType="'
|
5076 |
+
.$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType']))
|
5077 |
+
.":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">"
|
5078 |
+
.$contents
|
5079 |
+
."</$name>";
|
5080 |
+
}
|
5081 |
+
} elseif ($phpType == 'scalar') {
|
5082 |
+
if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
|
5083 |
+
$elementNS = " xmlns=\"$ns\"";
|
5084 |
+
} else {
|
5085 |
+
if ($unqualified) {
|
5086 |
+
$elementNS = " xmlns=\"\"";
|
5087 |
+
} else {
|
5088 |
+
$elementNS = '';
|
5089 |
+
}
|
5090 |
+
}
|
5091 |
+
if ($use == 'literal') {
|
5092 |
+
if ($forceType) {
|
5093 |
+
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>";
|
5094 |
+
} else {
|
5095 |
+
$xml = "<$name$elementNS>$value</$name>";
|
5096 |
+
}
|
5097 |
+
} else {
|
5098 |
+
$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>";
|
5099 |
+
}
|
5100 |
+
}
|
5101 |
+
return $xml;
|
5102 |
+
}
|
5103 |
+
|
5104 |
+
/**
|
5105 |
+
* serializes the attributes for a complexType
|
5106 |
+
*
|
5107 |
+
* @param array $typeDef our internal representation of an XML schema type (or element)
|
5108 |
+
* @param mixed $value a native PHP value (parameter value)
|
5109 |
+
* @param string $ns the namespace of the type
|
5110 |
+
* @param string $uqType the local part of the type
|
5111 |
+
* @return string value serialized as an XML string
|
5112 |
+
* @access private
|
5113 |
+
*/
|
5114 |
+
function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) {
|
5115 |
+
$xml = '';
|
5116 |
+
if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) {
|
5117 |
+
if (is_array($value)) {
|
5118 |
+
$xvalue = $value;
|
5119 |
+
} elseif (is_object($value)) {
|
5120 |
+
$xvalue = get_object_vars($value);
|
5121 |
+
} else {
|
5122 |
+
$xvalue = array();
|
5123 |
+
}
|
5124 |
+
foreach ($typeDef['attrs'] as $aName => $attrs) {
|
5125 |
+
if (isset($xvalue['!' . $aName])) {
|
5126 |
+
$xname = '!' . $aName;
|
5127 |
+
} elseif (isset($xvalue[$aName])) {
|
5128 |
+
$xname = $aName;
|
5129 |
+
} elseif (isset($attrs['default'])) {
|
5130 |
+
$xname = '!' . $aName;
|
5131 |
+
$xvalue[$xname] = $attrs['default'];
|
5132 |
+
} else {
|
5133 |
+
$xname = '';
|
5134 |
+
}
|
5135 |
+
if ($xname) {
|
5136 |
+
$xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\"";
|
5137 |
+
}
|
5138 |
+
}
|
5139 |
+
} else {
|
5140 |
+
}
|
5141 |
+
if (isset($typeDef['extensionBase'])) {
|
5142 |
+
$ns = $this->getPrefix($typeDef['extensionBase']);
|
5143 |
+
$uqType = $this->getLocalPart($typeDef['extensionBase']);
|
5144 |
+
if ($this->getNamespaceFromPrefix($ns)) {
|
5145 |
+
$ns = $this->getNamespaceFromPrefix($ns);
|
5146 |
+
}
|
5147 |
+
if ($typeDef = $this->getTypeDef($uqType, $ns)) {
|
5148 |
+
$xml .= $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);
|
5149 |
+
} else {
|
5150 |
+
}
|
5151 |
+
}
|
5152 |
+
return $xml;
|
5153 |
+
}
|
5154 |
+
|
5155 |
+
/**
|
5156 |
+
* serializes the elements for a complexType
|
5157 |
+
*
|
5158 |
+
* @param array $typeDef our internal representation of an XML schema type (or element)
|
5159 |
+
* @param mixed $value a native PHP value (parameter value)
|
5160 |
+
* @param string $ns the namespace of the type
|
5161 |
+
* @param string $uqType the local part of the type
|
5162 |
+
* @param string $use use for part (encoded|literal)
|
5163 |
+
* @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
|
5164 |
+
* @return string value serialized as an XML string
|
5165 |
+
* @access private
|
5166 |
+
*/
|
5167 |
+
function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) {
|
5168 |
+
$xml = '';
|
5169 |
+
if (isset($typeDef['elements']) && is_array($typeDef['elements'])) {
|
5170 |
+
if (is_array($value)) {
|
5171 |
+
$xvalue = $value;
|
5172 |
+
} elseif (is_object($value)) {
|
5173 |
+
$xvalue = get_object_vars($value);
|
5174 |
+
} else {
|
5175 |
+
$xvalue = array();
|
5176 |
+
}
|
5177 |
+
// toggle whether all elements are present - ideally should validate against schema
|
5178 |
+
if (count($typeDef['elements']) != count($xvalue)){
|
5179 |
+
$optionals = true;
|
5180 |
+
}
|
5181 |
+
foreach ($typeDef['elements'] as $eName => $attrs) {
|
5182 |
+
if (!isset($xvalue[$eName])) {
|
5183 |
+
if (isset($attrs['default'])) {
|
5184 |
+
$xvalue[$eName] = $attrs['default'];
|
5185 |
+
}
|
5186 |
+
}
|
5187 |
+
// if user took advantage of a minOccurs=0, then only serialize named parameters
|
5188 |
+
if (isset($optionals)
|
5189 |
+
&& (!isset($xvalue[$eName]))
|
5190 |
+
&& ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true')
|
5191 |
+
){
|
5192 |
+
if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') {
|
5193 |
+
}
|
5194 |
+
// do nothing
|
5195 |
+
} else {
|
5196 |
+
// get value
|
5197 |
+
if (isset($xvalue[$eName])) {
|
5198 |
+
$v = $xvalue[$eName];
|
5199 |
+
} else {
|
5200 |
+
$v = null;
|
5201 |
+
}
|
5202 |
+
if (isset($attrs['form'])) {
|
5203 |
+
$unqualified = ($attrs['form'] == 'unqualified');
|
5204 |
+
} else {
|
5205 |
+
$unqualified = false;
|
5206 |
+
}
|
5207 |
+
if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') {
|
5208 |
+
$vv = $v;
|
5209 |
+
foreach ($vv as $k => $v) {
|
5210 |
+
if (isset($attrs['type']) || isset($attrs['ref'])) {
|
5211 |
+
// serialize schema-defined type
|
5212 |
+
$xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
|
5213 |
+
} else {
|
5214 |
+
// serialize generic type (can this ever really happen?)
|
5215 |
+
$xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
|
5216 |
+
}
|
5217 |
+
}
|
5218 |
+
} else {
|
5219 |
+
if (isset($attrs['type']) || isset($attrs['ref'])) {
|
5220 |
+
// serialize schema-defined type
|
5221 |
+
$xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
|
5222 |
+
} else {
|
5223 |
+
// serialize generic type (can this ever really happen?)
|
5224 |
+
$xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
|
5225 |
+
}
|
5226 |
+
}
|
5227 |
+
}
|
5228 |
+
}
|
5229 |
+
} else {
|
5230 |
+
}
|
5231 |
+
if (isset($typeDef['extensionBase'])) {
|
5232 |
+
$ns = $this->getPrefix($typeDef['extensionBase']);
|
5233 |
+
$uqType = $this->getLocalPart($typeDef['extensionBase']);
|
5234 |
+
if ($this->getNamespaceFromPrefix($ns)) {
|
5235 |
+
$ns = $this->getNamespaceFromPrefix($ns);
|
5236 |
+
}
|
5237 |
+
if ($typeDef = $this->getTypeDef($uqType, $ns)) {
|
5238 |
+
$xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);
|
5239 |
+
} else {
|
5240 |
+
}
|
5241 |
+
}
|
5242 |
+
return $xml;
|
5243 |
+
}
|
5244 |
+
|
5245 |
+
/**
|
5246 |
+
* adds an XML Schema complex type to the WSDL types
|
5247 |
+
*
|
5248 |
+
* @param string name
|
5249 |
+
* @param string typeClass (complexType|simpleType|attribute)
|
5250 |
+
* @param string phpType: currently supported are array and struct (php assoc array)
|
5251 |
+
* @param string compositor (all|sequence|choice)
|
5252 |
+
* @param string restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
|
5253 |
+
* @param array elements = array ( name => array(name=>'',type=>'') )
|
5254 |
+
* @param array attrs = array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
|
5255 |
+
* @param string arrayType: namespace:name (xsd:string)
|
5256 |
+
* @see xmlschema
|
5257 |
+
* @access public
|
5258 |
+
*/
|
5259 |
+
function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') {
|
5260 |
+
if (count($elements) > 0) {
|
5261 |
+
foreach($elements as $n => $e){
|
5262 |
+
// expand each element
|
5263 |
+
foreach ($e as $k => $v) {
|
5264 |
+
$k = strpos($k,':') ? $this->expandQname($k) : $k;
|
5265 |
+
$v = strpos($v,':') ? $this->expandQname($v) : $v;
|
5266 |
+
$ee[$k] = $v;
|
5267 |
+
}
|
5268 |
+
$eElements[$n] = $ee;
|
5269 |
+
}
|
5270 |
+
$elements = $eElements;
|
5271 |
+
}
|
5272 |
+
|
5273 |
+
if (count($attrs) > 0) {
|
5274 |
+
foreach($attrs as $n => $a){
|
5275 |
+
// expand each attribute
|
5276 |
+
foreach ($a as $k => $v) {
|
5277 |
+
$k = strpos($k,':') ? $this->expandQname($k) : $k;
|
5278 |
+
$v = strpos($v,':') ? $this->expandQname($v) : $v;
|
5279 |
+
$aa[$k] = $v;
|
5280 |
+
}
|
5281 |
+
$eAttrs[$n] = $aa;
|
5282 |
+
}
|
5283 |
+
$attrs = $eAttrs;
|
5284 |
+
}
|
5285 |
+
|
5286 |
+
$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase;
|
5287 |
+
$arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType;
|
5288 |
+
|
5289 |
+
$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
|
5290 |
+
$this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType);
|
5291 |
+
}
|
5292 |
+
|
5293 |
+
/**
|
5294 |
+
* adds an XML Schema simple type to the WSDL types
|
5295 |
+
*
|
5296 |
+
* @param string $name
|
5297 |
+
* @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
|
5298 |
+
* @param string $typeClass (should always be simpleType)
|
5299 |
+
* @param string $phpType (should always be scalar)
|
5300 |
+
* @param array $enumeration array of values
|
5301 |
+
* @see xmlschema
|
5302 |
+
* @access public
|
5303 |
+
*/
|
5304 |
+
function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
|
5305 |
+
$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase;
|
5306 |
+
|
5307 |
+
$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
|
5308 |
+
$this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration);
|
5309 |
+
}
|
5310 |
+
|
5311 |
+
/**
|
5312 |
+
* adds an element to the WSDL types
|
5313 |
+
*
|
5314 |
+
* @param array $attrs attributes that must include name and type
|
5315 |
+
* @see xmlschema
|
5316 |
+
* @access public
|
5317 |
+
*/
|
5318 |
+
function addElement($attrs) {
|
5319 |
+
$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
|
5320 |
+
$this->schemas[$typens][0]->addElement($attrs);
|
5321 |
+
}
|
5322 |
+
|
5323 |
+
/**
|
5324 |
+
* register an operation with the server
|
5325 |
+
*
|
5326 |
+
* @param string $name operation (method) name
|
5327 |
+
* @param array $in assoc array of input values: key = param name, value = param type
|
5328 |
+
* @param array $out assoc array of output values: key = param name, value = param type
|
5329 |
+
* @param string $namespace optional The namespace for the operation
|
5330 |
+
* @param string $soapaction optional The soapaction for the operation
|
5331 |
+
* @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically
|
5332 |
+
* @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now)
|
5333 |
+
* @param string $documentation optional The description to include in the WSDL
|
5334 |
+
* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
|
5335 |
+
* @access public
|
5336 |
+
*/
|
5337 |
+
function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
|
5338 |
+
if ($use == 'encoded' && $encodingStyle == '') {
|
5339 |
+
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
|
5340 |
+
}
|
5341 |
+
|
5342 |
+
if ($style == 'document') {
|
5343 |
+
$elements = array();
|
5344 |
+
foreach ($in as $n => $t) {
|
5345 |
+
$elements[$n] = array('name' => $n, 'type' => $t);
|
5346 |
+
}
|
5347 |
+
$this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements);
|
5348 |
+
$this->addElement(array('name' => $name, 'type' => $name . 'RequestType'));
|
5349 |
+
$in = array('parameters' => 'tns:' . $name);
|
5350 |
+
|
5351 |
+
$elements = array();
|
5352 |
+
foreach ($out as $n => $t) {
|
5353 |
+
$elements[$n] = array('name' => $n, 'type' => $t);
|
5354 |
+
}
|
5355 |
+
$this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements);
|
5356 |
+
$this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType'));
|
5357 |
+
$out = array('parameters' => 'tns:' . $name . 'Response');
|
5358 |
+
}
|
5359 |
+
|
5360 |
+
// get binding
|
5361 |
+
$this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] =
|
5362 |
+
array(
|
5363 |
+
'name' => $name,
|
5364 |
+
'binding' => $this->serviceName . 'Binding',
|
5365 |
+
'endpoint' => $this->endpoint,
|
5366 |
+
'soapAction' => $soapaction,
|
5367 |
+
'style' => $style,
|
5368 |
+
'input' => array(
|
5369 |
+
'use' => $use,
|
5370 |
+
'namespace' => $namespace,
|
5371 |
+
'encodingStyle' => $encodingStyle,
|
5372 |
+
'message' => $name . 'Request',
|
5373 |
+
'parts' => $in),
|
5374 |
+
'output' => array(
|
5375 |
+
'use' => $use,
|
5376 |
+
'namespace' => $namespace,
|
5377 |
+
'encodingStyle' => $encodingStyle,
|
5378 |
+
'message' => $name . 'Response',
|
5379 |
+
'parts' => $out),
|
5380 |
+
'namespace' => $namespace,
|
5381 |
+
'transport' => 'http://schemas.xmlsoap.org/soap/http',
|
5382 |
+
'documentation' => $documentation);
|
5383 |
+
// add portTypes
|
5384 |
+
// add messages
|
5385 |
+
if($in)
|
5386 |
+
{
|
5387 |
+
foreach($in as $pName => $pType)
|
5388 |
+
{
|
5389 |
+
if(strpos($pType,':')) {
|
5390 |
+
$pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
|
5391 |
+
}
|
5392 |
+
$this->messages[$name.'Request'][$pName] = $pType;
|
5393 |
+
}
|
5394 |
+
} else {
|
5395 |
+
$this->messages[$name.'Request']= '0';
|
5396 |
+
}
|
5397 |
+
if($out)
|
5398 |
+
{
|
5399 |
+
foreach($out as $pName => $pType)
|
5400 |
+
{
|
5401 |
+
if(strpos($pType,':')) {
|
5402 |
+
$pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
|
5403 |
+
}
|
5404 |
+
$this->messages[$name.'Response'][$pName] = $pType;
|
5405 |
+
}
|
5406 |
+
} else {
|
5407 |
+
$this->messages[$name.'Response']= '0';
|
5408 |
+
}
|
5409 |
+
return true;
|
5410 |
+
}
|
5411 |
+
}
|
5412 |
+
?><?php
|
5413 |
+
|
5414 |
+
|
5415 |
+
|
5416 |
+
/**
|
5417 |
+
*
|
5418 |
+
* soap_parser class parses SOAP XML messages into native PHP values
|
5419 |
+
*
|
5420 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
5421 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
5422 |
+
* @access public
|
5423 |
+
*/
|
5424 |
+
class soap_parser extends nusoap_base {
|
5425 |
+
|
5426 |
+
var $xml = '';
|
5427 |
+
var $xml_encoding = '';
|
5428 |
+
var $method = '';
|
5429 |
+
var $root_struct = '';
|
5430 |
+
var $root_struct_name = '';
|
5431 |
+
var $root_struct_namespace = '';
|
5432 |
+
var $root_header = '';
|
5433 |
+
var $document = ''; // incoming SOAP body (text)
|
5434 |
+
// determines where in the message we are (envelope,header,body,method)
|
5435 |
+
var $status = '';
|
5436 |
+
var $position = 0;
|
5437 |
+
var $depth = 0;
|
5438 |
+
var $default_namespace = '';
|
5439 |
+
var $namespaces = array();
|
5440 |
+
var $message = array();
|
5441 |
+
var $parent = '';
|
5442 |
+
var $fault = false;
|
5443 |
+
var $fault_code = '';
|
5444 |
+
var $fault_str = '';
|
5445 |
+
var $fault_detail = '';
|
5446 |
+
var $depth_array = array();
|
5447 |
+
var $debug_flag = true;
|
5448 |
+
var $soapresponse = NULL;
|
5449 |
+
var $responseHeaders = ''; // incoming SOAP headers (text)
|
5450 |
+
var $body_position = 0;
|
5451 |
+
// for multiref parsing:
|
5452 |
+
// array of id => pos
|
5453 |
+
var $ids = array();
|
5454 |
+
// array of id => hrefs => pos
|
5455 |
+
var $multirefs = array();
|
5456 |
+
// toggle for auto-decoding element content
|
5457 |
+
var $decode_utf8 = true;
|
5458 |
+
|
5459 |
+
/**
|
5460 |
+
* constructor that actually does the parsing
|
5461 |
+
*
|
5462 |
+
* @param string $xml SOAP message
|
5463 |
+
* @param string $encoding character encoding scheme of message
|
5464 |
+
* @param string $method method for which XML is parsed (unused?)
|
5465 |
+
* @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1
|
5466 |
+
* @access public
|
5467 |
+
*/
|
5468 |
+
function soap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
|
5469 |
+
parent::nusoap_base();
|
5470 |
+
$this->xml = $xml;
|
5471 |
+
$this->xml_encoding = $encoding;
|
5472 |
+
$this->method = $method;
|
5473 |
+
$this->decode_utf8 = $decode_utf8;
|
5474 |
+
|
5475 |
+
// Check whether content has been read.
|
5476 |
+
if(!empty($xml)){
|
5477 |
+
// Check XML encoding
|
5478 |
+
$pos_xml = strpos($xml, '<?xml');
|
5479 |
+
if ($pos_xml !== FALSE) {
|
5480 |
+
$xml_decl = substr($xml, $pos_xml, strpos($xml, '?>', $pos_xml + 2) - $pos_xml + 1);
|
5481 |
+
if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) {
|
5482 |
+
$xml_encoding = $res[1];
|
5483 |
+
if (strtoupper($xml_encoding) != $encoding) {
|
5484 |
+
$err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'";
|
5485 |
+
if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') {
|
5486 |
+
$this->setError($err);
|
5487 |
+
return;
|
5488 |
+
}
|
5489 |
+
// when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed
|
5490 |
+
} else {
|
5491 |
+
}
|
5492 |
+
} else {
|
5493 |
+
}
|
5494 |
+
} else {
|
5495 |
+
}
|
5496 |
+
// Create an XML parser - why not xml_parser_create_ns?
|
5497 |
+
$this->parser = xml_parser_create($this->xml_encoding);
|
5498 |
+
// Set the options for parsing the XML data.
|
5499 |
+
//xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
|
5500 |
+
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
|
5501 |
+
xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding);
|
5502 |
+
// Set the object for the parser.
|
5503 |
+
xml_set_object($this->parser, $this);
|
5504 |
+
// Set the element handlers for the parser.
|
5505 |
+
xml_set_element_handler($this->parser, 'start_element','end_element');
|
5506 |
+
xml_set_character_data_handler($this->parser,'character_data');
|
5507 |
+
|
5508 |
+
// Parse the XML file.
|
5509 |
+
if(!xml_parse($this->parser,$xml,true)){
|
5510 |
+
// Display an error message.
|
5511 |
+
$err = sprintf('XML error parsing SOAP payload on line %d: %s',
|
5512 |
+
xml_get_current_line_number($this->parser),
|
5513 |
+
xml_error_string(xml_get_error_code($this->parser)));
|
5514 |
+
$this->setError($err);
|
5515 |
+
} else {
|
5516 |
+
// get final value
|
5517 |
+
$this->soapresponse = $this->message[$this->root_struct]['result'];
|
5518 |
+
// get header value: no, because this is documented as XML string
|
5519 |
+
// if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){
|
5520 |
+
// $this->responseHeaders = $this->message[$this->root_header]['result'];
|
5521 |
+
// }
|
5522 |
+
// resolve hrefs/ids
|
5523 |
+
if(sizeof($this->multirefs) > 0){
|
5524 |
+
foreach($this->multirefs as $id => $hrefs){
|
5525 |
+
$idVal = $this->buildVal($this->ids[$id]);
|
5526 |
+
if (is_array($idVal) && isset($idVal['!id'])) {
|
5527 |
+
unset($idVal['!id']);
|
5528 |
+
}
|
5529 |
+
foreach($hrefs as $refPos => $ref){
|
5530 |
+
$this->multirefs[$id][$refPos] = $idVal;
|
5531 |
+
}
|
5532 |
+
}
|
5533 |
+
}
|
5534 |
+
}
|
5535 |
+
xml_parser_free($this->parser);
|
5536 |
+
} else {
|
5537 |
+
$this->setError('xml was empty, didn\'t parse!');
|
5538 |
+
}
|
5539 |
+
}
|
5540 |
+
|
5541 |
+
/**
|
5542 |
+
* start-element handler
|
5543 |
+
*
|
5544 |
+
* @param resource $parser XML parser object
|
5545 |
+
* @param string $name element name
|
5546 |
+
* @param array $attrs associative array of attributes
|
5547 |
+
* @access private
|
5548 |
+
*/
|
5549 |
+
function start_element($parser, $name, $attrs) {
|
5550 |
+
// position in a total number of elements, starting from 0
|
5551 |
+
// update class level pos
|
5552 |
+
$pos = $this->position++;
|
5553 |
+
// and set mine
|
5554 |
+
$this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>'');
|
5555 |
+
// depth = how many levels removed from root?
|
5556 |
+
// set mine as current global depth and increment global depth value
|
5557 |
+
$this->message[$pos]['depth'] = $this->depth++;
|
5558 |
+
|
5559 |
+
// else add self as child to whoever the current parent is
|
5560 |
+
if($pos != 0){
|
5561 |
+
$this->message[$this->parent]['children'] .= '|'.$pos;
|
5562 |
+
}
|
5563 |
+
// set my parent
|
5564 |
+
$this->message[$pos]['parent'] = $this->parent;
|
5565 |
+
// set self as current parent
|
5566 |
+
$this->parent = $pos;
|
5567 |
+
// set self as current value for this depth
|
5568 |
+
$this->depth_array[$this->depth] = $pos;
|
5569 |
+
// get element prefix
|
5570 |
+
if(strpos($name,':')){
|
5571 |
+
// get ns prefix
|
5572 |
+
$prefix = substr($name,0,strpos($name,':'));
|
5573 |
+
// get unqualified name
|
5574 |
+
$name = substr(strstr($name,':'),1);
|
5575 |
+
}
|
5576 |
+
// set status
|
5577 |
+
if($name == 'Envelope'){
|
5578 |
+
$this->status = 'envelope';
|
5579 |
+
} elseif($name == 'Header'){
|
5580 |
+
$this->root_header = $pos;
|
5581 |
+
$this->status = 'header';
|
5582 |
+
} elseif($name == 'Body'){
|
5583 |
+
$this->status = 'body';
|
5584 |
+
$this->body_position = $pos;
|
5585 |
+
// set method
|
5586 |
+
} elseif($this->status == 'body' && $pos == ($this->body_position+1)){
|
5587 |
+
$this->status = 'method';
|
5588 |
+
$this->root_struct_name = $name;
|
5589 |
+
$this->root_struct = $pos;
|
5590 |
+
$this->message[$pos]['type'] = 'struct';
|
5591 |
+
}
|
5592 |
+
// set my status
|
5593 |
+
$this->message[$pos]['status'] = $this->status;
|
5594 |
+
// set name
|
5595 |
+
$this->message[$pos]['name'] = htmlspecialchars($name);
|
5596 |
+
// set attrs
|
5597 |
+
$this->message[$pos]['attrs'] = $attrs;
|
5598 |
+
|
5599 |
+
// loop through atts, logging ns and type declarations
|
5600 |
+
$attstr = '';
|
5601 |
+
foreach($attrs as $key => $value){
|
5602 |
+
$key_prefix = $this->getPrefix($key);
|
5603 |
+
$key_localpart = $this->getLocalPart($key);
|
5604 |
+
// if ns declarations, add to class level array of valid namespaces
|
5605 |
+
if($key_prefix == 'xmlns'){
|
5606 |
+
if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){
|
5607 |
+
$this->XMLSchemaVersion = $value;
|
5608 |
+
$this->namespaces['xsd'] = $this->XMLSchemaVersion;
|
5609 |
+
$this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance';
|
5610 |
+
}
|
5611 |
+
$this->namespaces[$key_localpart] = $value;
|
5612 |
+
// set method namespace
|
5613 |
+
if($name == $this->root_struct_name){
|
5614 |
+
$this->methodNamespace = $value;
|
5615 |
+
}
|
5616 |
+
// if it's a type declaration, set type
|
5617 |
+
} elseif($key_localpart == 'type'){
|
5618 |
+
if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') {
|
5619 |
+
// do nothing: already processed arrayType
|
5620 |
+
} else {
|
5621 |
+
$value_prefix = $this->getPrefix($value);
|
5622 |
+
$value_localpart = $this->getLocalPart($value);
|
5623 |
+
$this->message[$pos]['type'] = $value_localpart;
|
5624 |
+
$this->message[$pos]['typePrefix'] = $value_prefix;
|
5625 |
+
if(isset($this->namespaces[$value_prefix])){
|
5626 |
+
$this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix];
|
5627 |
+
} else if(isset($attrs['xmlns:'.$value_prefix])) {
|
5628 |
+
$this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix];
|
5629 |
+
}
|
5630 |
+
// should do something here with the namespace of specified type?
|
5631 |
+
}
|
5632 |
+
} elseif($key_localpart == 'arrayType'){
|
5633 |
+
$this->message[$pos]['type'] = 'array';
|
5634 |
+
/* do arrayType ereg here
|
5635 |
+
[1] arrayTypeValue ::= atype asize
|
5636 |
+
[2] atype ::= QName rank*
|
5637 |
+
[3] rank ::= '[' (',')* ']'
|
5638 |
+
[4] asize ::= '[' length~ ']'
|
5639 |
+
[5] length ::= nextDimension* Digit+
|
5640 |
+
[6] nextDimension ::= Digit+ ','
|
5641 |
+
*/
|
5642 |
+
$expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/';
|
5643 |
+
if(preg_match($expr,$value,$regs)){
|
5644 |
+
$this->message[$pos]['typePrefix'] = $regs[1];
|
5645 |
+
$this->message[$pos]['arrayTypePrefix'] = $regs[1];
|
5646 |
+
if (isset($this->namespaces[$regs[1]])) {
|
5647 |
+
$this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]];
|
5648 |
+
} else if (isset($attrs['xmlns:'.$regs[1]])) {
|
5649 |
+
$this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]];
|
5650 |
+
}
|
5651 |
+
$this->message[$pos]['arrayType'] = $regs[2];
|
5652 |
+
$this->message[$pos]['arraySize'] = $regs[3];
|
5653 |
+
$this->message[$pos]['arrayCols'] = $regs[4];
|
5654 |
+
}
|
5655 |
+
// specifies nil value (or not)
|
5656 |
+
} elseif ($key_localpart == 'nil'){
|
5657 |
+
$this->message[$pos]['nil'] = ($value == 'true' || $value == '1');
|
5658 |
+
// some other attribute
|
5659 |
+
} elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') {
|
5660 |
+
$this->message[$pos]['xattrs']['!' . $key] = $value;
|
5661 |
+
}
|
5662 |
+
|
5663 |
+
if ($key == 'xmlns') {
|
5664 |
+
$this->default_namespace = $value;
|
5665 |
+
}
|
5666 |
+
// log id
|
5667 |
+
if($key == 'id'){
|
5668 |
+
$this->ids[$value] = $pos;
|
5669 |
+
}
|
5670 |
+
// root
|
5671 |
+
if($key_localpart == 'root' && $value == 1){
|
5672 |
+
$this->status = 'method';
|
5673 |
+
$this->root_struct_name = $name;
|
5674 |
+
$this->root_struct = $pos;
|
5675 |
+
}
|
5676 |
+
// for doclit
|
5677 |
+
$attstr .= " $key=\"$value\"";
|
5678 |
+
}
|
5679 |
+
// get namespace - must be done after namespace atts are processed
|
5680 |
+
if(isset($prefix)){
|
5681 |
+
$this->message[$pos]['namespace'] = $this->namespaces[$prefix];
|
5682 |
+
$this->default_namespace = $this->namespaces[$prefix];
|
5683 |
+
} else {
|
5684 |
+
$this->message[$pos]['namespace'] = $this->default_namespace;
|
5685 |
+
}
|
5686 |
+
if($this->status == 'header'){
|
5687 |
+
if ($this->root_header != $pos) {
|
5688 |
+
$this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>";
|
5689 |
+
}
|
5690 |
+
} elseif($this->root_struct_name != ''){
|
5691 |
+
$this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>";
|
5692 |
+
}
|
5693 |
+
}
|
5694 |
+
|
5695 |
+
/**
|
5696 |
+
* end-element handler
|
5697 |
+
*
|
5698 |
+
* @param resource $parser XML parser object
|
5699 |
+
* @param string $name element name
|
5700 |
+
* @access private
|
5701 |
+
*/
|
5702 |
+
function end_element($parser, $name) {
|
5703 |
+
// position of current element is equal to the last value left in depth_array for my depth
|
5704 |
+
$pos = $this->depth_array[$this->depth--];
|
5705 |
+
|
5706 |
+
// get element prefix
|
5707 |
+
if(strpos($name,':')){
|
5708 |
+
// get ns prefix
|
5709 |
+
$prefix = substr($name,0,strpos($name,':'));
|
5710 |
+
// get unqualified name
|
5711 |
+
$name = substr(strstr($name,':'),1);
|
5712 |
+
}
|
5713 |
+
|
5714 |
+
// build to native type
|
5715 |
+
if(isset($this->body_position) && $pos > $this->body_position){
|
5716 |
+
// deal w/ multirefs
|
5717 |
+
if(isset($this->message[$pos]['attrs']['href'])){
|
5718 |
+
// get id
|
5719 |
+
$id = substr($this->message[$pos]['attrs']['href'],1);
|
5720 |
+
// add placeholder to href array
|
5721 |
+
$this->multirefs[$id][$pos] = 'placeholder';
|
5722 |
+
// add set a reference to it as the result value
|
5723 |
+
$this->message[$pos]['result'] =& $this->multirefs[$id][$pos];
|
5724 |
+
// build complexType values
|
5725 |
+
} elseif($this->message[$pos]['children'] != ''){
|
5726 |
+
// if result has already been generated (struct/array)
|
5727 |
+
if(!isset($this->message[$pos]['result'])){
|
5728 |
+
$this->message[$pos]['result'] = $this->buildVal($pos);
|
5729 |
+
}
|
5730 |
+
// build complexType values of attributes and possibly simpleContent
|
5731 |
+
} elseif (isset($this->message[$pos]['xattrs'])) {
|
5732 |
+
if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
|
5733 |
+
$this->message[$pos]['xattrs']['!'] = null;
|
5734 |
+
} elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
|
5735 |
+
if (isset($this->message[$pos]['type'])) {
|
5736 |
+
$this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
|
5737 |
+
} else {
|
5738 |
+
$parent = $this->message[$pos]['parent'];
|
5739 |
+
if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
|
5740 |
+
$this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
|
5741 |
+
} else {
|
5742 |
+
$this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata'];
|
5743 |
+
}
|
5744 |
+
}
|
5745 |
+
}
|
5746 |
+
$this->message[$pos]['result'] = $this->message[$pos]['xattrs'];
|
5747 |
+
// set value of simpleType (or nil complexType)
|
5748 |
+
} else {
|
5749 |
+
if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
|
5750 |
+
$this->message[$pos]['xattrs']['!'] = null;
|
5751 |
+
} elseif (isset($this->message[$pos]['type'])) {
|
5752 |
+
$this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
|
5753 |
+
} else {
|
5754 |
+
$parent = $this->message[$pos]['parent'];
|
5755 |
+
if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
|
5756 |
+
$this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
|
5757 |
+
} else {
|
5758 |
+
$this->message[$pos]['result'] = $this->message[$pos]['cdata'];
|
5759 |
+
}
|
5760 |
+
}
|
5761 |
+
|
5762 |
+
/* add value to parent's result, if parent is struct/array
|
5763 |
+
$parent = $this->message[$pos]['parent'];
|
5764 |
+
if($this->message[$parent]['type'] != 'map'){
|
5765 |
+
if(strtolower($this->message[$parent]['type']) == 'array'){
|
5766 |
+
$this->message[$parent]['result'][] = $this->message[$pos]['result'];
|
5767 |
+
} else {
|
5768 |
+
$this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result'];
|
5769 |
+
}
|
5770 |
+
}
|
5771 |
+
*/
|
5772 |
+
}
|
5773 |
+
}
|
5774 |
+
|
5775 |
+
// for doclit
|
5776 |
+
if($this->status == 'header'){
|
5777 |
+
if ($this->root_header != $pos) {
|
5778 |
+
$this->responseHeaders .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>";
|
5779 |
+
}
|
5780 |
+
} elseif($pos >= $this->root_struct){
|
5781 |
+
$this->document .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>";
|
5782 |
+
}
|
5783 |
+
// switch status
|
5784 |
+
if($pos == $this->root_struct){
|
5785 |
+
$this->status = 'body';
|
5786 |
+
$this->root_struct_namespace = $this->message[$pos]['namespace'];
|
5787 |
+
} elseif($name == 'Body'){
|
5788 |
+
$this->status = 'envelope';
|
5789 |
+
} elseif($name == 'Header'){
|
5790 |
+
$this->status = 'envelope';
|
5791 |
+
} elseif($name == 'Envelope'){
|
5792 |
+
//
|
5793 |
+
}
|
5794 |
+
// set parent back to my parent
|
5795 |
+
$this->parent = $this->message[$pos]['parent'];
|
5796 |
+
}
|
5797 |
+
|
5798 |
+
/**
|
5799 |
+
* element content handler
|
5800 |
+
*
|
5801 |
+
* @param resource $parser XML parser object
|
5802 |
+
* @param string $data element content
|
5803 |
+
* @access private
|
5804 |
+
*/
|
5805 |
+
function character_data($parser, $data){
|
5806 |
+
$pos = $this->depth_array[$this->depth];
|
5807 |
+
if ($this->xml_encoding=='UTF-8'){
|
5808 |
+
// TODO: add an option to disable this for folks who want
|
5809 |
+
// raw UTF-8 that, e.g., might not map to iso-8859-1
|
5810 |
+
// TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1");
|
5811 |
+
if($this->decode_utf8){
|
5812 |
+
$data = utf8_decode($data);
|
5813 |
+
}
|
5814 |
+
}
|
5815 |
+
$this->message[$pos]['cdata'] .= $data;
|
5816 |
+
// for doclit
|
5817 |
+
if($this->status == 'header'){
|
5818 |
+
$this->responseHeaders .= $data;
|
5819 |
+
} else {
|
5820 |
+
$this->document .= $data;
|
5821 |
+
}
|
5822 |
+
}
|
5823 |
+
|
5824 |
+
/**
|
5825 |
+
* get the parsed message
|
5826 |
+
*
|
5827 |
+
* @return mixed
|
5828 |
+
* @access public
|
5829 |
+
*/
|
5830 |
+
function get_response(){
|
5831 |
+
return $this->soapresponse;
|
5832 |
+
}
|
5833 |
+
|
5834 |
+
/**
|
5835 |
+
* get the parsed headers
|
5836 |
+
*
|
5837 |
+
* @return string XML or empty if no headers
|
5838 |
+
* @access public
|
5839 |
+
*/
|
5840 |
+
function getHeaders(){
|
5841 |
+
return $this->responseHeaders;
|
5842 |
+
}
|
5843 |
+
|
5844 |
+
/**
|
5845 |
+
* decodes simple types into PHP variables
|
5846 |
+
*
|
5847 |
+
* @param string $value value to decode
|
5848 |
+
* @param string $type XML type to decode
|
5849 |
+
* @param string $typens XML type namespace to decode
|
5850 |
+
* @return mixed PHP value
|
5851 |
+
* @access private
|
5852 |
+
*/
|
5853 |
+
function decodeSimple($value, $type, $typens) {
|
5854 |
+
// TODO: use the namespace!
|
5855 |
+
if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') {
|
5856 |
+
return (string) $value;
|
5857 |
+
}
|
5858 |
+
if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') {
|
5859 |
+
return (int) $value;
|
5860 |
+
}
|
5861 |
+
if ($type == 'float' || $type == 'double' || $type == 'decimal') {
|
5862 |
+
return (double) $value;
|
5863 |
+
}
|
5864 |
+
if ($type == 'boolean') {
|
5865 |
+
if (strtolower($value) == 'false' || strtolower($value) == 'f') {
|
5866 |
+
return false;
|
5867 |
+
}
|
5868 |
+
return (boolean) $value;
|
5869 |
+
}
|
5870 |
+
if ($type == 'base64' || $type == 'base64Binary') {
|
5871 |
+
return base64_decode($value);
|
5872 |
+
}
|
5873 |
+
// obscure numeric types
|
5874 |
+
if ($type == 'nonPositiveInteger' || $type == 'negativeInteger'
|
5875 |
+
|| $type == 'nonNegativeInteger' || $type == 'positiveInteger'
|
5876 |
+
|| $type == 'unsignedInt'
|
5877 |
+
|| $type == 'unsignedShort' || $type == 'unsignedByte') {
|
5878 |
+
return (int) $value;
|
5879 |
+
}
|
5880 |
+
// bogus: parser treats array with no elements as a simple type
|
5881 |
+
if ($type == 'array') {
|
5882 |
+
return array();
|
5883 |
+
}
|
5884 |
+
// everything else
|
5885 |
+
return (string) $value;
|
5886 |
+
}
|
5887 |
+
|
5888 |
+
/**
|
5889 |
+
* builds response structures for compound values (arrays/structs)
|
5890 |
+
* and scalars
|
5891 |
+
*
|
5892 |
+
* @param integer $pos position in node tree
|
5893 |
+
* @return mixed PHP value
|
5894 |
+
* @access private
|
5895 |
+
*/
|
5896 |
+
function buildVal($pos){
|
5897 |
+
if(!isset($this->message[$pos]['type'])){
|
5898 |
+
$this->message[$pos]['type'] = '';
|
5899 |
+
}
|
5900 |
+
// if there are children...
|
5901 |
+
if($this->message[$pos]['children'] != ''){
|
5902 |
+
$children = explode('|',$this->message[$pos]['children']);
|
5903 |
+
array_shift($children); // knock off empty
|
5904 |
+
// md array
|
5905 |
+
if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){
|
5906 |
+
$r=0; // rowcount
|
5907 |
+
$c=0; // colcount
|
5908 |
+
foreach($children as $child_pos){
|
5909 |
+
$params[$r][] = $this->message[$child_pos]['result'];
|
5910 |
+
$c++;
|
5911 |
+
if($c == $this->message[$pos]['arrayCols']){
|
5912 |
+
$c = 0;
|
5913 |
+
$r++;
|
5914 |
+
}
|
5915 |
+
}
|
5916 |
+
// array
|
5917 |
+
} elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){
|
5918 |
+
foreach($children as $child_pos){
|
5919 |
+
$params[] = &$this->message[$child_pos]['result'];
|
5920 |
+
}
|
5921 |
+
// apache Map type: java hashtable
|
5922 |
+
} elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){
|
5923 |
+
foreach($children as $child_pos){
|
5924 |
+
$kv = explode("|",$this->message[$child_pos]['children']);
|
5925 |
+
$params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result'];
|
5926 |
+
}
|
5927 |
+
// generic compound type
|
5928 |
+
//} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') {
|
5929 |
+
} else {
|
5930 |
+
// Apache Vector type: treat as an array
|
5931 |
+
if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') {
|
5932 |
+
$notstruct = 1;
|
5933 |
+
} else {
|
5934 |
+
$notstruct = 0;
|
5935 |
+
}
|
5936 |
+
//
|
5937 |
+
foreach($children as $child_pos){
|
5938 |
+
if($notstruct){
|
5939 |
+
$params[] = &$this->message[$child_pos]['result'];
|
5940 |
+
} else {
|
5941 |
+
if (isset($params[$this->message[$child_pos]['name']])) {
|
5942 |
+
// de-serialize repeated element name into an array
|
5943 |
+
if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) {
|
5944 |
+
$params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]);
|
5945 |
+
}
|
5946 |
+
$params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result'];
|
5947 |
+
} else {
|
5948 |
+
$params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result'];
|
5949 |
+
}
|
5950 |
+
}
|
5951 |
+
}
|
5952 |
+
}
|
5953 |
+
if (isset($this->message[$pos]['xattrs'])) {
|
5954 |
+
foreach ($this->message[$pos]['xattrs'] as $n => $v) {
|
5955 |
+
$params[$n] = $v;
|
5956 |
+
}
|
5957 |
+
}
|
5958 |
+
// handle simpleContent
|
5959 |
+
if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
|
5960 |
+
if (isset($this->message[$pos]['type'])) {
|
5961 |
+
$params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
|
5962 |
+
} else {
|
5963 |
+
$parent = $this->message[$pos]['parent'];
|
5964 |
+
if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
|
5965 |
+
$params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
|
5966 |
+
} else {
|
5967 |
+
$params['!'] = $this->message[$pos]['cdata'];
|
5968 |
+
}
|
5969 |
+
}
|
5970 |
+
}
|
5971 |
+
$ret = is_array($params) ? $params : array();
|
5972 |
+
return $ret;
|
5973 |
+
} else {
|
5974 |
+
$cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : '';
|
5975 |
+
if (isset($this->message[$pos]['type'])) {
|
5976 |
+
$ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
|
5977 |
+
return $ret;
|
5978 |
+
}
|
5979 |
+
$parent = $this->message[$pos]['parent'];
|
5980 |
+
if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
|
5981 |
+
$ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
|
5982 |
+
return $ret;
|
5983 |
+
}
|
5984 |
+
$ret = $this->message[$pos]['cdata'];
|
5985 |
+
return $ret;
|
5986 |
+
}
|
5987 |
+
}
|
5988 |
+
}
|
5989 |
+
|
5990 |
+
|
5991 |
+
|
5992 |
+
?><?php
|
5993 |
+
|
5994 |
+
|
5995 |
+
|
5996 |
+
/**
|
5997 |
+
*
|
5998 |
+
* soap_client higher level class for easy usage.
|
5999 |
+
*
|
6000 |
+
* usage:
|
6001 |
+
*
|
6002 |
+
* // instantiate client with server info
|
6003 |
+
* $soap_client = new soap_client( string path [ ,boolean wsdl] );
|
6004 |
+
*
|
6005 |
+
* // call method, get results
|
6006 |
+
* echo $soap_client->call( string methodname [ ,array parameters] );
|
6007 |
+
*
|
6008 |
+
* // bye bye client
|
6009 |
+
* unset($soap_client);
|
6010 |
+
*
|
6011 |
+
* @author Dietrich Ayala <dietrich@ganx4.com>
|
6012 |
+
* @version $Id: nusoap.php,v 1.2 2007/01/03 14:44:42 moodler Exp $
|
6013 |
+
* @access public
|
6014 |
+
*/
|
6015 |
+
class soap_client extends nusoap_base {
|
6016 |
+
|
6017 |
+
var $username = '';
|
6018 |
+
var $password = '';
|
6019 |
+
var $authtype = '';
|
6020 |
+
var $certRequest = array();
|
6021 |
+
var $requestHeaders = false; // SOAP headers in request (text)
|
6022 |
+
var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text)
|
6023 |
+
var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text)
|
6024 |
+
var $endpoint;
|
6025 |
+
var $forceEndpoint = ''; // overrides WSDL endpoint
|
6026 |
+
var $proxyhost = '';
|
6027 |
+
var $proxyport = '';
|
6028 |
+
var $proxyusername = '';
|
6029 |
+
var $proxypassword = '';
|
6030 |
+
var $xml_encoding = ''; // character set encoding of incoming (response) messages
|
6031 |
+
var $http_encoding = false;
|
6032 |
+
var $timeout = 0; // HTTP connection timeout
|
6033 |
+
var $response_timeout = 30; // HTTP response timeout
|
6034 |
+
var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error
|
6035 |
+
var $persistentConnection = false;
|
6036 |
+
var $defaultRpcParams = false; // This is no longer used
|
6037 |
+
var $request = ''; // HTTP request
|
6038 |
+
var $response = ''; // HTTP response
|
6039 |
+
var $responseData = ''; // SOAP payload of response
|
6040 |
+
var $cookies = array(); // Cookies from response or for request
|
6041 |
+
var $decode_utf8 = false; // toggles whether the parser decodes element content w/ utf8_decode()
|
6042 |
+
var $operations = array(); // WSDL operations, empty for WSDL initialization error
|
6043 |
+
|
6044 |
+
/*
|
6045 |
+
* fault related variables
|
6046 |
+
*/
|
6047 |
+
/**
|
6048 |
+
* @var fault
|
6049 |
+
* @access public
|
6050 |
+
*/
|
6051 |
+
var $fault;
|
6052 |
+
/**
|
6053 |
+
* @var faultcode
|
6054 |
+
* @access public
|
6055 |
+
*/
|
6056 |
+
var $faultcode;
|
6057 |
+
/**
|
6058 |
+
* @var faultstring
|
6059 |
+
* @access public
|
6060 |
+
*/
|
6061 |
+
var $faultstring;
|
6062 |
+
/**
|
6063 |
+
* @var faultdetail
|
6064 |
+
* @access public
|
6065 |
+
*/
|
6066 |
+
var $faultdetail;
|
6067 |
+
|
6068 |
+
/**
|
6069 |
+
* constructor
|
6070 |
+
*
|
6071 |
+
* @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object)
|
6072 |
+
* @param bool $wsdl optional, set to true if using WSDL
|
6073 |
+
* @param int $portName optional portName in WSDL document
|
6074 |
+
* @param string $proxyhost
|
6075 |
+
* @param string $proxyport
|
6076 |
+
* @param string $proxyusername
|
6077 |
+
* @param string $proxypassword
|
6078 |
+
* @param integer $timeout set the connection timeout
|
6079 |
+
* @param integer $response_timeout set the response timeout
|
6080 |
+
* @access public
|
6081 |
+
*/
|
6082 |
+
function soap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){
|
6083 |
+
parent::nusoap_base();
|
6084 |
+
$this->endpoint = $endpoint;
|
6085 |
+
$this->proxyhost = $proxyhost;
|
6086 |
+
$this->proxyport = $proxyport;
|
6087 |
+
$this->proxyusername = $proxyusername;
|
6088 |
+
$this->proxypassword = $proxypassword;
|
6089 |
+
$this->timeout = $timeout;
|
6090 |
+
$this->response_timeout = $response_timeout;
|
6091 |
+
|
6092 |
+
// make values
|
6093 |
+
if($wsdl){
|
6094 |
+
if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) {
|
6095 |
+
$this->wsdl = $endpoint;
|
6096 |
+
$this->endpoint = $this->wsdl->wsdl;
|
6097 |
+
$this->wsdlFile = $this->endpoint;
|
6098 |
+
} else {
|
6099 |
+
$this->wsdlFile = $this->endpoint;
|
6100 |
+
|
6101 |
+
// instantiate wsdl object and parse wsdl file
|
6102 |
+
$this->wsdl = new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout);
|
6103 |
+
}
|
6104 |
+
$this->wsdl->clearDebug();
|
6105 |
+
// catch errors
|
6106 |
+
if($errstr = $this->wsdl->getError()){
|
6107 |
+
$this->setError('wsdl error: '.$errstr);
|
6108 |
+
} elseif($this->operations = $this->wsdl->getOperations()){
|
6109 |
+
$this->endpointType = 'wsdl';
|
6110 |
+
} else {
|
6111 |
+
$this->setError('no operations defined in the WSDL document!');
|
6112 |
+
}
|
6113 |
+
} else {
|
6114 |
+
$this->endpointType = 'soap';
|
6115 |
+
}
|
6116 |
+
}
|
6117 |
+
|
6118 |
+
/**
|
6119 |
+
* calls method, returns PHP native type
|
6120 |
+
*
|
6121 |
+
* @param string $method SOAP server URL or path
|
6122 |
+
* @param mixed $params An array, associative or simple, of the parameters
|
6123 |
+
* for the method call, or a string that is the XML
|
6124 |
+
* for the call. For rpc style, this call will
|
6125 |
+
* wrap the XML in a tag named after the method, as
|
6126 |
+
* well as the SOAP Envelope and Body. For document
|
6127 |
+
* style, this will only wrap with the Envelope and Body.
|
6128 |
+
* IMPORTANT: when using an array with document style,
|
6129 |
+
* in which case there
|
6130 |
+
* is really one parameter, the root of the fragment
|
6131 |
+
* used in the call, which encloses what programmers
|
6132 |
+
* normally think of parameters. A parameter array
|
6133 |
+
* *must* include the wrapper.
|
6134 |
+
* @param string $namespace optional method namespace (WSDL can override)
|
6135 |
+
* @param string $soapAction optional SOAPAction value (WSDL can override)
|
6136 |
+
* @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers
|
6137 |
+
* @param boolean $rpcParams optional (no longer used)
|
6138 |
+
* @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override)
|
6139 |
+
* @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override)
|
6140 |
+
* @return mixed response from SOAP call
|
6141 |
+
* @access public
|
6142 |
+
*/
|
6143 |
+
function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){
|
6144 |
+
$this->operation = $operation;
|
6145 |
+
$this->fault = false;
|
6146 |
+
$this->setError('');
|
6147 |
+
$this->request = '';
|
6148 |
+
$this->response = '';
|
6149 |
+
$this->responseData = '';
|
6150 |
+
$this->faultstring = '';
|
6151 |
+
$this->faultcode = '';
|
6152 |
+
$this->opData = array();
|
6153 |
+
|
6154 |
+
if ($headers) {
|
6155 |
+
$this->requestHeaders = $headers;
|
6156 |
+
}
|
6157 |
+
// serialize parameters
|
6158 |
+
if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){
|
6159 |
+
// use WSDL for operation
|
6160 |
+
$this->opData = $opData;
|
6161 |
+
if (isset($opData['soapAction'])) {
|
6162 |
+
$soapAction = $opData['soapAction'];
|
6163 |
+
}
|
6164 |
+
if (! $this->forceEndpoint) {
|
6165 |
+
$this->endpoint = $opData['endpoint'];
|
6166 |
+
} else {
|
6167 |
+
$this->endpoint = $this->forceEndpoint;
|
6168 |
+
}
|
6169 |
+
$namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace;
|
6170 |
+
$style = $opData['style'];
|
6171 |
+
$use = $opData['input']['use'];
|
6172 |
+
// add ns to ns array
|
6173 |
+
if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){
|
6174 |
+
$nsPrefix = 'ns' . rand(1000, 9999);
|
6175 |
+
$this->wsdl->namespaces[$nsPrefix] = $namespace;
|
6176 |
+
}
|
6177 |
+
$nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace);
|
6178 |
+
// serialize payload
|
6179 |
+
if (is_string($params)) {
|
6180 |
+
$payload = $params;
|
6181 |
+
} elseif (is_array($params)) {
|
6182 |
+
$payload = $this->wsdl->serializeRPCParameters($operation,'input',$params);
|
6183 |
+
} else {
|
6184 |
+
$this->setError('params must be array or string');
|
6185 |
+
return false;
|
6186 |
+
}
|
6187 |
+
$usedNamespaces = $this->wsdl->usedNamespaces;
|
6188 |
+
if (isset($opData['input']['encodingStyle'])) {
|
6189 |
+
$encodingStyle = $opData['input']['encodingStyle'];
|
6190 |
+
} else {
|
6191 |
+
$encodingStyle = '';
|
6192 |
+
}
|
6193 |
+
$this->wsdl->clearDebug();
|
6194 |
+
if ($errstr = $this->wsdl->getError()) {
|
6195 |
+
$this->setError('wsdl error: '.$errstr);
|
6196 |
+
return false;
|
6197 |
+
}
|
6198 |
+
} elseif($this->endpointType == 'wsdl') {
|
6199 |
+
// operation not in WSDL
|
6200 |
+
$this->wsdl->clearDebug();
|
6201 |
+
$this->setError( 'operation '.$operation.' not present.');
|
6202 |
+
return false;
|
6203 |
+
} else {
|
6204 |
+
// no WSDL
|
6205 |
+
//$this->namespaces['ns1'] = $namespace;
|
6206 |
+
$nsPrefix = 'ns' . rand(1000, 9999);
|
6207 |
+
// serialize
|
6208 |
+
$payload = '';
|
6209 |
+
if (is_string($params)) {
|
6210 |
+
$payload = $params;
|
6211 |
+
} elseif (is_array($params)) {
|
6212 |
+
foreach($params as $k => $v){
|
6213 |
+
$payload .= $this->serialize_val($v,$k,false,false,false,false,$use);
|
6214 |
+
}
|
6215 |
+
} else {
|
6216 |
+
$this->setError('params must be array or string');
|
6217 |
+
return false;
|
6218 |
+
}
|
6219 |
+
$usedNamespaces = array();
|
6220 |
+
if ($use == 'encoded') {
|
6221 |
+
$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
|
6222 |
+
} else {
|
6223 |
+
$encodingStyle = '';
|
6224 |
+
}
|
6225 |
+
}
|
6226 |
+
// wrap RPC calls with method element
|
6227 |
+
if ($style == 'rpc') {
|
6228 |
+
if ($use == 'literal') {
|
6229 |
+
if ($namespace) {
|
6230 |
+
$payload = "<$operation xmlns=\"$namespace\">" . $payload . "</$operation>";
|
6231 |
+
} else {
|
6232 |
+
$payload = "<$operation>" . $payload . "</$operation>";
|
6233 |
+
}
|
6234 |
+
} else {
|
6235 |
+
if ($namespace) {
|
6236 |
+
$payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" .
|
6237 |
+
$payload .
|
6238 |
+
"</$nsPrefix:$operation>";
|
6239 |
+
} else {
|
6240 |
+
$payload = "<$operation>" .
|
6241 |
+
$payload .
|
6242 |
+
"</$operation>";
|
6243 |
+
}
|
6244 |
+
}
|
6245 |
+
}
|
6246 |
+
// serialize envelope
|
6247 |
+
$soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle);
|
6248 |
+
// send
|
6249 |
+
$return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout);
|
6250 |
+
if($errstr = $this->getError()){
|
6251 |
+
return false;
|
6252 |
+
} else {
|
6253 |
+
$this->return = $return;
|
6254 |
+
|
6255 |
+
// fault?
|
6256 |
+
if(is_array($return) && isset($return['faultcode'])){
|
6257 |
+
$this->setError($return['faultcode'].': '.$return['faultstring']);
|
6258 |
+
$this->fault = true;
|
6259 |
+
foreach($return as $k => $v){
|
6260 |
+
$this->$k = $v;
|
6261 |
+
}
|
6262 |
+
return $return;
|
6263 |
+
} elseif ($style == 'document') {
|
6264 |
+
// NOTE: if the response is defined to have multiple parts (i.e. unwrapped),
|
6265 |
+
// we are only going to return the first part here...sorry about that
|
6266 |
+
return $return;
|
6267 |
+
} else {
|
6268 |
+
// array of return values
|
6269 |
+
if(is_array($return)){
|
6270 |
+
// multiple 'out' parameters, which we return wrapped up
|
6271 |
+
// in the array
|
6272 |
+
if(sizeof($return) > 1){
|
6273 |
+
return $return;
|
6274 |
+
}
|
6275 |
+
// single 'out' parameter (normally the return value)
|
6276 |
+
$return = array_shift($return);
|
6277 |
+
return $return;
|
6278 |
+
// nothing returned (ie, echoVoid)
|
6279 |
+
} else {
|
6280 |
+
return "";
|
6281 |
+
}
|
6282 |
+
}
|
6283 |
+
}
|
6284 |
+
}
|
6285 |
+
|
6286 |
+
/**
|
6287 |
+
* get available data pertaining to an operation
|
6288 |
+
*
|
6289 |
+
* @param string $operation operation name
|
6290 |
+
* @return array array of data pertaining to the operation
|
6291 |
+
* @access public
|
6292 |
+
*/
|
6293 |
+
function getOperationData($operation){
|
6294 |
+
if(isset($this->operations[$operation])){
|
6295 |
+
return $this->operations[$operation];
|
6296 |
+
}
|
6297 |
+
}
|
6298 |
+
|
6299 |
+
/**
|
6300 |
+
* send the SOAP message
|
6301 |
+
*
|
6302 |
+
* Note: if the operation has multiple return values
|
6303 |
+
* the return value of this method will be an array
|
6304 |
+
* of those values.
|
6305 |
+
*
|
6306 |
+
* @param string $msg a SOAPx4 soapmsg object
|
6307 |
+
* @param string $soapaction SOAPAction value
|
6308 |
+
* @param integer $timeout set connection timeout in seconds
|
6309 |
+
* @param integer $response_timeout set response timeout in seconds
|
6310 |
+
* @return mixed native PHP types.
|
6311 |
+
* @access private
|
6312 |
+
*/
|
6313 |
+
function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) {
|
6314 |
+
$this->checkCookies();
|
6315 |
+
// detect transport
|
6316 |
+
switch(true){
|
6317 |
+
// http(s)
|
6318 |
+
case ereg('/^http/',$this->endpoint):
|
6319 |
+
if($this->persistentConnection == true && is_object($this->persistentConnection)){
|
6320 |
+
$http =& $this->persistentConnection;
|
6321 |
+
} else {
|
6322 |
+
$http = new soap_transport_http($this->endpoint);
|
6323 |
+
if ($this->persistentConnection) {
|
6324 |
+
$http->usePersistentConnection();
|
6325 |
+
}
|
6326 |
+
}
|
6327 |
+
$http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset());
|
6328 |
+
$http->setSOAPAction($soapaction);
|
6329 |
+
if($this->proxyhost && $this->proxyport){
|
6330 |
+
$http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
|
6331 |
+
}
|
6332 |
+
if($this->authtype != '') {
|
6333 |
+
$http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest);
|
6334 |
+
}
|
6335 |
+
if($this->http_encoding != ''){
|
6336 |
+
$http->setEncoding($this->http_encoding);
|
6337 |
+
}
|
6338 |
+
if(preg_match('/^http:/',$this->endpoint)){
|
6339 |
+
//if(strpos($this->endpoint,'http:')){
|
6340 |
+
$this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies);
|
6341 |
+
} elseif(preg_match('/^https/',$this->endpoint)){
|
6342 |
+
//} elseif(strpos($this->endpoint,'https:')){
|
6343 |
+
//if(phpversion() == '4.3.0-dev'){
|
6344 |
+
//$response = $http->send($msg,$timeout,$response_timeout);
|
6345 |
+
//$this->request = $http->outgoing_payload;
|
6346 |
+
//$this->response = $http->incoming_payload;
|
6347 |
+
//} else
|
6348 |
+
$this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies);
|
6349 |
+
} else {
|
6350 |
+
$this->setError('no http/s in endpoint url');
|
6351 |
+
}
|
6352 |
+
$this->request = $http->outgoing_payload;
|
6353 |
+
$this->response = $http->incoming_payload;
|
6354 |
+
$this->UpdateCookies($http->incoming_cookies);
|
6355 |
+
|
6356 |
+
// save transport object if using persistent connections
|
6357 |
+
if ($this->persistentConnection) {
|
6358 |
+
$http->clearDebug();
|
6359 |
+
if (!is_object($this->persistentConnection)) {
|
6360 |
+
$this->persistentConnection = $http;
|
6361 |
+
}
|
6362 |
+
}
|
6363 |
+
|
6364 |
+
if($err = $http->getError()){
|
6365 |
+
$this->setError('HTTP Error: '.$err);
|
6366 |
+
return false;
|
6367 |
+
} elseif($this->getError()){
|
6368 |
+
return false;
|
6369 |
+
} else {
|
6370 |
+
return $this->parseResponse($http->incoming_headers, $this->responseData);
|
6371 |
+
}
|
6372 |
+
break;
|
6373 |
+
default:
|
6374 |
+
$this->setError('no transport found, or selected transport is not yet supported!');
|
6375 |
+
return false;
|
6376 |
+
break;
|
6377 |
+
}
|
6378 |
+
}
|
6379 |
+
|
6380 |
+
/**
|
6381 |
+
* processes SOAP message returned from server
|
6382 |
+
*
|
6383 |
+
* @param array $headers The HTTP headers
|
6384 |
+
* @param string $data unprocessed response data from server
|
6385 |
+
* @return mixed value of the message, decoded into a PHP type
|
6386 |
+
* @access private
|
6387 |
+
*/
|
6388 |
+
function parseResponse($headers, $data) {
|
6389 |
+
if (!strstr($headers['content-type'], 'text/xml')) {
|
6390 |
+
$this->setError('Response not of type text/xml');
|
6391 |
+
return false;
|
6392 |
+
}
|
6393 |
+
if (strpos($headers['content-type'], '=')) {
|
6394 |
+
$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
|
6395 |
+
if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){
|
6396 |
+
$this->xml_encoding = strtoupper($enc);
|
6397 |
+
} else {
|
6398 |
+
$this->xml_encoding = 'US-ASCII';
|
6399 |
+
}
|
6400 |
+
} else {
|
6401 |
+
// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
|
6402 |
+
$this->xml_encoding = 'ISO-8859-1';
|
6403 |
+
}
|
6404 |
+
$parser = new soap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8);
|
6405 |
+
// add parser debug data to our debug
|
6406 |
+
// if parse errors
|
6407 |
+
if($errstr = $parser->getError()){
|
6408 |
+
$this->setError( $errstr);
|
6409 |
+
// destroy the parser object
|
6410 |
+
unset($parser);
|
6411 |
+
return false;
|
6412 |
+
} else {
|
6413 |
+
// get SOAP headers
|
6414 |
+
$this->responseHeaders = $parser->getHeaders();
|
6415 |
+
// get decoded message
|
6416 |
+
$return = $parser->get_response();
|
6417 |
+
// add document for doclit support
|
6418 |
+
$this->document = $parser->document;
|
6419 |
+
// destroy the parser object
|
6420 |
+
unset($parser);
|
6421 |
+
// return decode message
|
6422 |
+
return $return;
|
6423 |
+
}
|
6424 |
+
}
|
6425 |
+
|
6426 |
+
/**
|
6427 |
+
* sets the SOAP endpoint, which can override WSDL
|
6428 |
+
*
|
6429 |
+
* @param $endpoint string The endpoint URL to use, or empty string or false to prevent override
|
6430 |
+
* @access public
|
6431 |
+
*/
|
6432 |
+
function setEndpoint($endpoint) {
|
6433 |
+
$this->forceEndpoint = $endpoint;
|
6434 |
+
}
|
6435 |
+
|
6436 |
+
/**
|
6437 |
+
* set the SOAP headers
|
6438 |
+
*
|
6439 |
+
* @param $headers mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers
|
6440 |
+
* @access public
|
6441 |
+
*/
|
6442 |
+
function setHeaders($headers){
|
6443 |
+
$this->requestHeaders = $headers;
|
6444 |
+
}
|
6445 |
+
|
6446 |
+
/**
|
6447 |
+
* get the SOAP response headers (namespace resolution incomplete)
|
6448 |
+
*
|
6449 |
+
* @return string
|
6450 |
+
* @access public
|
6451 |
+
*/
|
6452 |
+
function getHeaders(){
|
6453 |
+
return $this->responseHeaders;
|
6454 |
+
}
|
6455 |
+
|
6456 |
+
/**
|
6457 |
+
* set proxy info here
|
6458 |
+
*
|
6459 |
+
* @param string $proxyhost
|
6460 |
+
* @param string $proxyport
|
6461 |
+
* @param string $proxyusername
|
6462 |
+
* @param string $proxypassword
|
6463 |
+
* @access public
|
6464 |
+
*/
|
6465 |
+
function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') {
|
6466 |
+
$this->proxyhost = $proxyhost;
|
6467 |
+
$this->proxyport = $proxyport;
|
6468 |
+
$this->proxyusername = $proxyusername;
|
6469 |
+
$this->proxypassword = $proxypassword;
|
6470 |
+
}
|
6471 |
+
|
6472 |
+
/**
|
6473 |
+
* if authenticating, set user credentials here
|
6474 |
+
*
|
6475 |
+
* @param string $username
|
6476 |
+
* @param string $password
|
6477 |
+
* @param string $authtype (basic|digest|certificate)
|
6478 |
+
* @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
|
6479 |
+
* @access public
|
6480 |
+
*/
|
6481 |
+
function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) {
|
6482 |
+
$this->username = $username;
|
6483 |
+
$this->password = $password;
|
6484 |
+
$this->authtype = $authtype;
|
6485 |
+
$this->certRequest = $certRequest;
|
6486 |
+
}
|
6487 |
+
|
6488 |
+
/**
|
6489 |
+
* use HTTP encoding
|
6490 |
+
*
|
6491 |
+
* @param string $enc
|
6492 |
+
* @access public
|
6493 |
+
*/
|
6494 |
+
function setHTTPEncoding($enc='gzip, deflate'){
|
6495 |
+
$this->http_encoding = $enc;
|
6496 |
+
}
|
6497 |
+
|
6498 |
+
/**
|
6499 |
+
* use HTTP persistent connections if possible
|
6500 |
+
*
|
6501 |
+
* @access public
|
6502 |
+
*/
|
6503 |
+
function useHTTPPersistentConnection(){
|
6504 |
+
$this->persistentConnection = true;
|
6505 |
+
}
|
6506 |
+
|
6507 |
+
/**
|
6508 |
+
* gets the default RPC parameter setting.
|
6509 |
+
* If true, default is that call params are like RPC even for document style.
|
6510 |
+
* Each call() can override this value.
|
6511 |
+
*
|
6512 |
+
* This is no longer used.
|
6513 |
+
*
|
6514 |
+
* @return boolean
|
6515 |
+
* @access public
|
6516 |
+
* @deprecated
|
6517 |
+
*/
|
6518 |
+
function getDefaultRpcParams() {
|
6519 |
+
return $this->defaultRpcParams;
|
6520 |
+
}
|
6521 |
+
|
6522 |
+
/**
|
6523 |
+
* sets the default RPC parameter setting.
|
6524 |
+
* If true, default is that call params are like RPC even for document style
|
6525 |
+
* Each call() can override this value.
|
6526 |
+
*
|
6527 |
+
* This is no longer used.
|
6528 |
+
*
|
6529 |
+
* @param boolean $rpcParams
|
6530 |
+
* @access public
|
6531 |
+
* @deprecated
|
6532 |
+
*/
|
6533 |
+
function setDefaultRpcParams($rpcParams) {
|
6534 |
+
$this->defaultRpcParams = $rpcParams;
|
6535 |
+
}
|
6536 |
+
|
6537 |
+
/**
|
6538 |
+
* dynamically creates an instance of a proxy class,
|
6539 |
+
* allowing user to directly call methods from wsdl
|
6540 |
+
*
|
6541 |
+
* @return object soap_proxy object
|
6542 |
+
* @access public
|
6543 |
+
*/
|
6544 |
+
function getProxy(){
|
6545 |
+
$r = rand();
|
6546 |
+
$evalStr = $this->_getProxyClassCode($r);
|
6547 |
+
// eval the class
|
6548 |
+
eval($evalStr);
|
6549 |
+
// instantiate proxy object
|
6550 |
+
eval("\$proxy = new soap_proxy_$r('');");
|
6551 |
+
// transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice
|
6552 |
+
$proxy->endpointType = 'wsdl';
|
6553 |
+
$proxy->wsdlFile = $this->wsdlFile;
|
6554 |
+
$proxy->wsdl = $this->wsdl;
|
6555 |
+
$proxy->operations = $this->operations;
|
6556 |
+
$proxy->defaultRpcParams = $this->defaultRpcParams;
|
6557 |
+
// transfer other state
|
6558 |
+
$proxy->username = $this->username;
|
6559 |
+
$proxy->password = $this->password;
|
6560 |
+
$proxy->authtype = $this->authtype;
|
6561 |
+
$proxy->proxyhost = $this->proxyhost;
|
6562 |
+
$proxy->proxyport = $this->proxyport;
|
6563 |
+
$proxy->proxyusername = $this->proxyusername;
|
6564 |
+
$proxy->proxypassword = $this->proxypassword;
|
6565 |
+
$proxy->timeout = $this->timeout;
|
6566 |
+
$proxy->response_timeout = $this->response_timeout;
|
6567 |
+
$proxy->http_encoding = $this->http_encoding;
|
6568 |
+
$proxy->persistentConnection = $this->persistentConnection;
|
6569 |
+
$proxy->requestHeaders = $this->requestHeaders;
|
6570 |
+
$proxy->soap_defencoding = $this->soap_defencoding;
|
6571 |
+
$proxy->endpoint = $this->endpoint;
|
6572 |
+
$proxy->forceEndpoint = $this->forceEndpoint;
|
6573 |
+
return $proxy;
|
6574 |
+
}
|
6575 |
+
|
6576 |
+
/**
|
6577 |
+
* dynamically creates proxy class code
|
6578 |
+
*
|
6579 |
+
* @return string PHP/NuSOAP code for the proxy class
|
6580 |
+
* @access private
|
6581 |
+
*/
|
6582 |
+
function _getProxyClassCode($r) {
|
6583 |
+
if ($this->endpointType != 'wsdl') {
|
6584 |
+
$evalStr = 'A proxy can only be created for a WSDL client';
|
6585 |
+
$this->setError($evalStr);
|
6586 |
+
return $evalStr;
|
6587 |
+
}
|
6588 |
+
$evalStr = '';
|
6589 |
+
foreach ($this->operations as $operation => $opData) {
|
6590 |
+
if ($operation != '') {
|
6591 |
+
// create param string and param comment string
|
6592 |
+
if (sizeof($opData['input']['parts']) > 0) {
|
6593 |
+
$paramStr = '';
|
6594 |
+
$paramArrayStr = '';
|
6595 |
+
$paramCommentStr = '';
|
6596 |
+
foreach ($opData['input']['parts'] as $name => $type) {
|
6597 |
+
$paramStr .= "\$$name, ";
|
6598 |
+
$paramArrayStr .= "'$name' => \$$name, ";
|
6599 |
+
$paramCommentStr .= "$type \$$name, ";
|
6600 |
+
}
|
6601 |
+
$paramStr = substr($paramStr, 0, strlen($paramStr)-2);
|
6602 |
+
$paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2);
|
6603 |
+
$paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2);
|
6604 |
+
} else {
|
6605 |
+
$paramStr = '';
|
6606 |
+
$paramArrayStr = '';
|
6607 |
+
$paramCommentStr = 'void';
|
6608 |
+
}
|
6609 |
+
$opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace'];
|
6610 |
+
$evalStr .= "// $paramCommentStr
|
6611 |
+
function " . str_replace('.', '__', $operation) . "($paramStr) {
|
6612 |
+
\$params = array($paramArrayStr);
|
6613 |
+
return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."');
|
6614 |
+
}
|
6615 |
+
";
|
6616 |
+
unset($paramStr);
|
6617 |
+
unset($paramCommentStr);
|
6618 |
+
}
|
6619 |
+
}
|
6620 |
+
$evalStr = 'class soap_proxy_'.$r.' extends soap_client {
|
6621 |
+
'.$evalStr.'
|
6622 |
+
}';
|
6623 |
+
return $evalStr;
|
6624 |
+
}
|
6625 |
+
|
6626 |
+
/**
|
6627 |
+
* dynamically creates proxy class code
|
6628 |
+
*
|
6629 |
+
* @return string PHP/NuSOAP code for the proxy class
|
6630 |
+
* @access public
|
6631 |
+
*/
|
6632 |
+
function getProxyClassCode() {
|
6633 |
+
$r = rand();
|
6634 |
+
return $this->_getProxyClassCode($r);
|
6635 |
+
}
|
6636 |
+
|
6637 |
+
/**
|
6638 |
+
* gets the HTTP body for the current request.
|
6639 |
+
*
|
6640 |
+
* @param string $soapmsg The SOAP payload
|
6641 |
+
* @return string The HTTP body, which includes the SOAP payload
|
6642 |
+
* @access private
|
6643 |
+
*/
|
6644 |
+
function getHTTPBody($soapmsg) {
|
6645 |
+
return $soapmsg;
|
6646 |
+
}
|
6647 |
+
|
6648 |
+
/**
|
6649 |
+
* gets the HTTP content type for the current request.
|
6650 |
+
*
|
6651 |
+
* Note: getHTTPBody must be called before this.
|
6652 |
+
*
|
6653 |
+
* @return string the HTTP content type for the current request.
|
6654 |
+
* @access private
|
6655 |
+
*/
|
6656 |
+
function getHTTPContentType() {
|
6657 |
+
return 'text/xml';
|
6658 |
+
}
|
6659 |
+
|
6660 |
+
/**
|
6661 |
+
* gets the HTTP content type charset for the current request.
|
6662 |
+
* returns false for non-text content types.
|
6663 |
+
*
|
6664 |
+
* Note: getHTTPBody must be called before this.
|
6665 |
+
*
|
6666 |
+
* @return string the HTTP content type charset for the current request.
|
6667 |
+
* @access private
|
6668 |
+
*/
|
6669 |
+
function getHTTPContentTypeCharset() {
|
6670 |
+
return $this->soap_defencoding;
|
6671 |
+
}
|
6672 |
+
|
6673 |
+
/*
|
6674 |
+
* whether or not parser should decode utf8 element content
|
6675 |
+
*
|
6676 |
+
* @return always returns true
|
6677 |
+
* @access public
|
6678 |
+
*/
|
6679 |
+
function decodeUTF8($bool){
|
6680 |
+
$this->decode_utf8 = $bool;
|
6681 |
+
return true;
|
6682 |
+
}
|
6683 |
+
|
6684 |
+
/**
|
6685 |
+
* adds a new Cookie into $this->cookies array
|
6686 |
+
*
|
6687 |
+
* @param string $name Cookie Name
|
6688 |
+
* @param string $value Cookie Value
|
6689 |
+
* @return if cookie-set was successful returns true, else false
|
6690 |
+
* @access public
|
6691 |
+
*/
|
6692 |
+
function setCookie($name, $value) {
|
6693 |
+
if (strlen($name) == 0) {
|
6694 |
+
return false;
|
6695 |
+
}
|
6696 |
+
$this->cookies[] = array('name' => $name, 'value' => $value);
|
6697 |
+
return true;
|
6698 |
+
}
|
6699 |
+
|
6700 |
+
/**
|
6701 |
+
* gets all Cookies
|
6702 |
+
*
|
6703 |
+
* @return array with all internal cookies
|
6704 |
+
* @access public
|
6705 |
+
*/
|
6706 |
+
function getCookies() {
|
6707 |
+
return $this->cookies;
|
6708 |
+
}
|
6709 |
+
|
6710 |
+
/**
|
6711 |
+
* checks all Cookies and delete those which are expired
|
6712 |
+
*
|
6713 |
+
* @return always return true
|
6714 |
+
* @access private
|
6715 |
+
*/
|
6716 |
+
function checkCookies() {
|
6717 |
+
if (sizeof($this->cookies) == 0) {
|
6718 |
+
return true;
|
6719 |
+
}
|
6720 |
+
$curr_cookies = $this->cookies;
|
6721 |
+
$this->cookies = array();
|
6722 |
+
foreach ($curr_cookies as $cookie) {
|
6723 |
+
if (! is_array($cookie)) {
|
6724 |
+
continue;
|
6725 |
+
}
|
6726 |
+
if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
|
6727 |
+
if (strtotime($cookie['expires']) > time()) {
|
6728 |
+
$this->cookies[] = $cookie;
|
6729 |
+
} else {
|
6730 |
+
}
|
6731 |
+
} else {
|
6732 |
+
$this->cookies[] = $cookie;
|
6733 |
+
}
|
6734 |
+
}
|
6735 |
+
return true;
|
6736 |
+
}
|
6737 |
+
|
6738 |
+
/**
|
6739 |
+
* updates the current cookies with a new set
|
6740 |
+
*
|
6741 |
+
* @param array $cookies new cookies with which to update current ones
|
6742 |
+
* @return always return true
|
6743 |
+
* @access private
|
6744 |
+
*/
|
6745 |
+
function UpdateCookies($cookies) {
|
6746 |
+
if (sizeof($this->cookies) == 0) {
|
6747 |
+
// no existing cookies: take whatever is new
|
6748 |
+
if (sizeof($cookies) > 0) {
|
6749 |
+
$this->cookies = $cookies;
|
6750 |
+
}
|
6751 |
+
return true;
|
6752 |
+
}
|
6753 |
+
if (sizeof($cookies) == 0) {
|
6754 |
+
// no new cookies: keep what we've got
|
6755 |
+
return true;
|
6756 |
+
}
|
6757 |
+
// merge
|
6758 |
+
foreach ($cookies as $newCookie) {
|
6759 |
+
if (!is_array($newCookie)) {
|
6760 |
+
continue;
|
6761 |
+
}
|
6762 |
+
if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) {
|
6763 |
+
continue;
|
6764 |
+
}
|
6765 |
+
$newName = $newCookie['name'];
|
6766 |
+
|
6767 |
+
$found = false;
|
6768 |
+
for ($i = 0; $i < count($this->cookies); $i++) {
|
6769 |
+
$cookie = $this->cookies[$i];
|
6770 |
+
if (!is_array($cookie)) {
|
6771 |
+
continue;
|
6772 |
+
}
|
6773 |
+
if (!isset($cookie['name'])) {
|
6774 |
+
continue;
|
6775 |
+
}
|
6776 |
+
if ($newName != $cookie['name']) {
|
6777 |
+
continue;
|
6778 |
+
}
|
6779 |
+
$newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN';
|
6780 |
+
$domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN';
|
6781 |
+
if ($newDomain != $domain) {
|
6782 |
+
continue;
|
6783 |
+
}
|
6784 |
+
$newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH';
|
6785 |
+
$path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH';
|
6786 |
+
if ($newPath != $path) {
|
6787 |
+
continue;
|
6788 |
+
}
|
6789 |
+
$this->cookies[$i] = $newCookie;
|
6790 |
+
$found = true;
|
6791 |
+
break;
|
6792 |
+
}
|
6793 |
+
if (! $found) {
|
6794 |
+
$this->cookies[] = $newCookie;
|
6795 |
+
}
|
6796 |
+
}
|
6797 |
+
return true;
|
6798 |
+
}
|
6799 |
+
}
|
6800 |
+
?>
|
package.xml
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>Esellers_Ipay</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license>free</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Korea Ipay Extension</summary>
|
10 |
+
<description>Korea Ipay Extension</description>
|
11 |
+
<notes>free</notes>
|
12 |
+
<authors><author><name>YoungJun</name><user>djsmqhaskf</user><email>gwgw123@esellers.co.kr</email></author></authors>
|
13 |
+
<date>2014-03-31</date>
|
14 |
+
<time>05:30:42</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Esellers"><dir name="Aboutep"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><file name="Fieldep.php" hash="dc899e430a9947525cae4887bd9962f5"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="329f662857915c58185fae50c8470ba8"/></dir><dir name="Model"><file name="Createep.php" hash="29220813414cd7ef08d8a318a22c253e"/></dir><dir name="controllers"><file name="EpController.php" hash="a8e6a365629cca1ce841f6036ef70565"/></dir><dir name="etc"><file name="adminhtml.xml" hash="52945238ca397da4a882949e5c32345d"/><file name="config.xml" hash="11dfd3de4dd7541918f8a846493c2684"/><file name="system.xml" hash="9c806e40fb2fd24e5eed4a9f3a80e3cf"/></dir></dir><dir name="Ipay"><dir name="Block"><dir name="Cart"><file name="Onepage.php" hash="75feb0b93fc47b548f2b02c628b6a5e8"/></dir><file name="Logo.php" hash="9b5db42fce62779b0a247d7cd6744b3b"/><dir name="Onepage"><dir name="Review"><file name="Info.php" hash="b2e1ea800a76d97c4e9a4a16fa03afc0"/></dir></dir><dir name="Sales"><dir name="Order"><file name="View.php" hash="425e1b18a8e56993624b056ee061d196"/></dir></dir></dir><dir name="Helper"><file name="Active.php" hash="7408945524deb3ad8c86ef9fc699b9d9"/><file name="Data.php" hash="70658a702bc0819983caf57fbca27f07"/></dir><dir name="Model"><dir name="Carrier"><file name="ShippingMethod.php" hash="46fa125dcbcb9687fd703a18c38021ae"/></dir><file name="Ipay.php" hash="0518adddf60dcf34d8a3b3381b0ad61c"/><dir name="Mysql4"><file name="Setup.php" hash="53f40275bb93ac22b87782a340416d21"/><file name="ipay.php" hash="4b9487ba9f98db81bc67419d2929f262"/></dir><file name="Observer.php" hash="f49f13f5106a7e0d69c8d9dcceca6734"/><file name="PaymentMethod.php" hash="82b92bfd72c33f68cd562a8d5db6e5fb"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="36ec6dc7646091070ffaab0d5e5733c0"/><file name="Company.php" hash="defee1c6dcb61d6b5bb8092f816d8a4b"/><file name="Escrow.php" hash="a8a0752c02c78f90c3d3bca7db0c89ef"/><file name="Font.php" hash="fa38b9e1cdd682f6ee4995d9cdfdfb4f"/><file name="Layout.php" hash="300ada2497ce69446e02fbd95d721182"/><file name="Paymethod.php" hash="39a18bc37871d35ebe03f2c13e053b46"/><file name="Roundoff.php" hash="6a4e2735aa4ea3e24f1a5b193e35419c"/><file name="Shiptype.php" hash="36a1664abbd89270acd7574b5a69a31d"/></dir></dir></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="52241ba1fcef1675d5f4eb6669a7d839"/><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="f28f46febe2bb7bee1746fc16613ff04"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="78d1c3e1d2b6196532d6b668a084e743"/><file name="config.xml" hash="d0f968d6a092ada66df0aa99345605b0"/><file name="system.xml" hash="8381aa83ec1bc2ed3b817d7583dccc26"/></dir><dir name="sql"><dir name="ipay_setup"><file name="mysql4-upgrade-1.0.0-1.1.0.php" hash="2b463831d3f18ffff86e51de814ca236"/></dir></dir></dir><dir name="Naverep"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Form"><file name="Fieldep.php" hash="5a60c5b48cab0271daf90aa539ff6355"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="daa5ceebfe626f670cccb1145bcf6012"/></dir><dir name="Model"><file name="Createep.php" hash="f9177f0f991192fb849e926994220552"/><file name="Createep_.php" hash="64202da46481d2d773388b3479834ee4"/><file name="Createep__.php" hash="f9177f0f991192fb849e926994220552"/><dir name="System"><dir name="Config"><dir name="Source"><file name="EPUrl.php" hash="2f75faa18870129105849f6338986671"/></dir></dir></dir></dir><dir name="controllers"><file name="EpController.php" hash="9fd0f233f295fb8c5decf4fb386baf44"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1cd2af9f259f073338708c3bdb2951de"/><file name="config.xml" hash="a2fb0980cd160cc19e68a15682653723"/><file name="system.xml" hash="ac7a1b95f86e52a5fce021c6994c612e"/></dir></dir><dir name="Salesgrid"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="3270a0d799ff11e4d945902e1cd27438"/></dir><file name="Order.php" hash="350b8089237ec31e52f21515b3443ec0"/></dir></dir><dir name="controllers"><dir name="Sales"><file name="OrderController.php" hash="c1724502bf916c851db3024275c3fb88"/></dir></dir><dir name="etc"><file name="config.xml" hash="79d514e12c6f4f9c681de6ca502c3660"/></dir></dir></dir><dir name="Mage"><dir name="Adminhtml"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="Shipment"><dir name="Create"><file name="Tracking.php" hash="3f49892bfdc7deb366438ee39d52cacc"/></dir><dir name="View"><file name="Tracking.php" hash="7e8268953f78c298840c964164e88eb1"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Action.php" hash="3a9f7511ab3293d150446abb784293c0"/><dir name="Report"><file name="Abstract.php" hash="1487bd48071aa04462cef8eb3846ec92"/></dir><dir name="Sales"><file name="Creditmemo.php" hash="29af0fa650ce1d5f0b67b0b135f166c4"/><file name="Invoice.php" hash="11e0efb6b9b68e425dbaac298cdd7fc0"/><file name="Shipment.php" hash="828706cbba092a90a960034882acfcdd"/></dir></dir><dir name="controllers"><file name="Action.php" hash="3a9f7511ab3293d150446abb784293c0"/><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="Shipment"><dir name="Create"><file name="Tracking.php" hash="6464e01af2fbef56e03a0fdf4c713efc"/></dir></dir></dir></dir></dir><dir name="Controller"><file name="Action.php" hash="3a9f7511ab3293d150446abb784293c0"/><dir name="Report"><file name="Abstract.php" hash="1487bd48071aa04462cef8eb3846ec92"/></dir><dir name="Sales"><file name="Creditmemo.php" hash="29af0fa650ce1d5f0b67b0b135f166c4"/><file name="Invoice.php" hash="11e0efb6b9b68e425dbaac298cdd7fc0"/><file name="Shipment.php" hash="828706cbba092a90a960034882acfcdd"/></dir></dir><dir name="Report"><file name="Abstract.php" hash="1487bd48071aa04462cef8eb3846ec92"/></dir><dir name="Sales"><file name="Creditmemo.php" hash="29af0fa650ce1d5f0b67b0b135f166c4"/><file name="Invoice.php" hash="11e0efb6b9b68e425dbaac298cdd7fc0"/><dir name="Order"><file name="ShipmentController.php" hash="2f10e988915b23d9013a63a89b3a52c0"/></dir><file name="Shipment.php" hash="828706cbba092a90a960034882acfcdd"/></dir></dir></dir><dir name="Directory"><dir name="Model"><file name="Currency.php" hash="730260cb7e27203c3fd4acb3b6e21bdc"/><file name="Currency.php.bak" hash="9dbd4340253bba57b43a0c3e351c45ea"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ipay.xml" hash="925bf8e3d1c2f980aca10cba3744c4cf"/></dir><dir name="template"><dir name="ipay"><file name="billing.phtml" hash="689c8fe61ebe7b678b418b2b3417bc64"/><file name="logo.phtml" hash="c65810cec9ef03ca55d15e3f58ba28e1"/><file name="top.links.phtml" hash="73b47a0161b7ba80dbbbab3565e17934"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="ipay"><file name="available.phtml" hash="b9fb29c12304fa47138c4149f6c9dcd3"/><file name="billing.phtml" hash="a9d46f884d0c5632c315649d7f91d659"/><file name="button.phtml" hash="1e9372f61f972e14dae6cb560020ae8c"/><file name="cart.phtml" hash="82fcb1988bd52569c75ce3455b3c8baf"/><file name="cart.phtml_" hash="15206ebc30dadf0ed4ed77cdbd96be3e"/><file name="cart.phtml_today" hash="28a06e86069b189af782c2fccfb7d675"/><file name="footer.phtml" hash="fc98b6ed1ede4a8a9455f8f326b74f07"/><file name="info.phtml" hash="504dba14d9aab615a9d06e11f3af4ea6"/><file name="ipay.phtml" hash="cb071483fa977e88b25bcc63981d09b4"/><file name="ipayInfo.phtml" hash="9a5cda99ea3c3140d33c820d2ba992b2"/><file name="ipayInfo_.phtml" hash="186d5de128b75248f32800757ab43902"/><file name="ipayservice.phtml" hash="54a4575eb3021440c709162277afc54b"/><file name="item.phtml" hash="95ea301337fa0803c9ecd1c824d6aa95"/><file name="links.phtml" hash="d037c28d668a5ef922f742c031733d4a"/><file name="methods.phtml" hash="212f8cd3531e0033045eb59335e6c8b0"/><file name="overview.phtml" hash="849f3d5cda576ef5e91a9d13e89770bf"/><file name="progress.phtml" hash="5e6b60d971cb98bd2695906dc6744ddb"/><file name="success.phtml" hash="1240d117b8e35e19ea14bf2ee7e771b5"/><file name="totals.phtml" hash="55898789cca42936b764ffed6befdcb1"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="ipay"><file name="form.phtml" hash="0f07faa1db31c364219bd291c73a628a"/><file name="info.phtml" hash="eb88cc4791e80946d558104c52df2f8a"/><file name="items.phtml" hash="951b39d61782185c36f1324bc61f8903"/></dir></dir><dir name="layout"><file name="ipay.xml" hash="1e76d74fc3bd0dfd06ef82833876e28a"/></dir></dir></dir></dir></target><target name="magelib"><dir name="."><file name="class.ipay.php" hash="e66adfe6a431eb46dbde772956785bc5"/><file name="ipaySession.php" hash="67b9a599e1b08dae44a169d12c28556c"/><file name="func.xml.php" hash="5e98214b51cc726d2fd02c07b3c46a41"/><file name="nusoap.php" hash="1e221272df95ee844d734f4bf16f2b61"/></dir><dir name="Zend"><dir name="Locale"><dir name="Data"><file name="ko_KR.xml" hash="f5da1450c42c5176178d572cd652beb4"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="ipay"><file name="logo_ipay01.gif" hash="4f337860e439935409220dce962520c7"/><file name="logo_ipay02.gif" hash="ce81aa12bd35a6b85ef19b53652b0b4a"/><file name="sbtn_ipay.gif" hash="b897e2be2fcc53a4496eb21768560f0e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Esellers_Ipay.xml" hash="a660002a41e1052bb03d54e4cc862bfc"/></dir></target><target name="mage"><dir name="app"><dir name="design"><dir name="frontend"><dir name="default"><dir name="default"><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="793e1ff86039f24caff6fad87a094fa1"/></dir><dir name="ko_KR"><file name="translate.csv" hash="f98214814e44def012a9991167fd29e7"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="locale"><dir name="en_US"><file name="translate.csv" hash="735c9ec66d1309f1206294f075fdcdd1"/></dir><dir name="ko_KR"><file name="translate.csv" hash="36e4010bfc2271d4898580cfa0840a83"/></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="esellers"><file name="ipay.js" hash="360c3ef0e7f4dcd8ec798909f0a570f7"/></dir></dir></target></contents>
|
16 |
+
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.2.17</min><max>5.6.0</max></php></required></dependencies>
|
18 |
+
</package>
|
skin/frontend/default/default/images/ipay/logo_ipay01.gif
ADDED
Binary file
|
skin/frontend/default/default/images/ipay/logo_ipay02.gif
ADDED
Binary file
|
skin/frontend/default/default/images/ipay/sbtn_ipay.gif
ADDED
Binary file
|