Version Notes
no comments
Download this release
Release Info
Developer | Udi |
Extension | Netpay_HostedPage_Check_Out |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.5
app/code/community/Netpay/HostedPage/etc/system.xml
CHANGED
@@ -72,6 +72,14 @@
|
|
72 |
<show_in_website>0</show_in_website>
|
73 |
<show_in_store>0</show_in_store>
|
74 |
</HashKey>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
</fields>
|
76 |
</HostedPage>
|
77 |
</groups>
|
72 |
<show_in_website>0</show_in_website>
|
73 |
<show_in_store>0</show_in_store>
|
74 |
</HashKey>
|
75 |
+
<UILanguage translate="label">
|
76 |
+
<label>UI Language</label>
|
77 |
+
<frontend_type>text</frontend_type>
|
78 |
+
<sort_order>2</sort_order>
|
79 |
+
<show_in_default>1</show_in_default>
|
80 |
+
<show_in_website>0</show_in_website>
|
81 |
+
<show_in_store>0</show_in_store>
|
82 |
+
</UILanguage>
|
83 |
</fields>
|
84 |
</HostedPage>
|
85 |
</groups>
|
app/code/community/Netpay/HostedPage/model/PaymentMethod.php
CHANGED
@@ -35,6 +35,7 @@ class Netpay_HostedPage_Model_PaymentMethod extends Mage_Payment_Model_Method_Ab
|
|
35 |
$order_id = $this->getCheckout()->getLastRealOrderId();
|
36 |
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
37 |
$signature = base64_encode(md5($this->getConfigData('CompanyNum') . trim(round($order->getGrandTotal(), 2)) . $order->getBaseCurrencyCode() . $this->getConfigData('HashKey'), true));
|
|
|
38 |
$params = array(
|
39 |
'trans_refNum' => $order_id,
|
40 |
'merchantID' => $this->getConfigData('CompanyNum'),
|
@@ -43,8 +44,23 @@ class Netpay_HostedPage_Model_PaymentMethod extends Mage_Payment_Model_Method_Ab
|
|
43 |
'trans_currency' => $order->getBaseCurrencyCode(),
|
44 |
'trans_type' => $nTransType,
|
45 |
'signature' => $signature,
|
|
|
46 |
'url_redirect' => Mage::getUrl('HostedPage/Redirect/success')
|
47 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
return $params;
|
49 |
}
|
50 |
}
|
35 |
$order_id = $this->getCheckout()->getLastRealOrderId();
|
36 |
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
37 |
$signature = base64_encode(md5($this->getConfigData('CompanyNum') . trim(round($order->getGrandTotal(), 2)) . $order->getBaseCurrencyCode() . $this->getConfigData('HashKey'), true));
|
38 |
+
if ($this->getConfigData('payment_action') == 'authorize') $nTransType = 1;
|
39 |
$params = array(
|
40 |
'trans_refNum' => $order_id,
|
41 |
'merchantID' => $this->getConfigData('CompanyNum'),
|
44 |
'trans_currency' => $order->getBaseCurrencyCode(),
|
45 |
'trans_type' => $nTransType,
|
46 |
'signature' => $signature,
|
47 |
+
'disp_lng' => $this->getConfigData('UILanguage'),
|
48 |
'url_redirect' => Mage::getUrl('HostedPage/Redirect/success')
|
49 |
);
|
50 |
+
if (!empty($order)) {
|
51 |
+
$billing = $order->getBillingAddress();
|
52 |
+
if (!empty($billing)) {
|
53 |
+
$params['client_fullName'] = $billing->getFirstname() . ' ' . $billing->getLastname();
|
54 |
+
$params['client_billAddress1'] = $billing->getStreet(1);
|
55 |
+
$params['client_billAddress2'] = $billing->getRegion();
|
56 |
+
$params['client_billCity'] = $billing->getCity();
|
57 |
+
$params['client_billZipcode'] = $billing->getPostcode();
|
58 |
+
$params['client_billState'] = $billing->getState();
|
59 |
+
$params['client_billCountry'] = $billing->getCountry();
|
60 |
+
$params['client_phoneNum'] = $billing->getTelephone();
|
61 |
+
if ($billing->getCustomerEmail()) $params['client_email'] = $billing->getCustomerEmail();
|
62 |
+
}
|
63 |
+
}
|
64 |
return $params;
|
65 |
}
|
66 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netpay_HostedPage_Check_Out</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.netpay-intl.com">Freeware</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>This module is use to process from you magento online store</description>
|
11 |
<notes>no comments</notes>
|
12 |
<authors><author><name>Udi</name><user>Udi</user><email>udi@ctrlz.co.il</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>15:
|
15 |
-
<contents><target name="magecommunity"><dir name="Netpay"><dir name="HostedPage"><dir name="Block"><file name="Redirect.php" hash="1b126ed3e8700a8b2c5b9d42bc51fa51"/></dir><dir name="controllers"><file name="RedirectController.php" hash="9757e985282dcea062328fb961eb84d9"/></dir><dir name="etc"><file name="config.xml" hash="cbfe2af0be683d14ceb39460b9a915a4"/><file name="system.xml" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Netpay_HostedPage_Check_Out</name>
|
4 |
+
<version>1.0.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.netpay-intl.com">Freeware</license>
|
7 |
<channel>community</channel>
|
10 |
<description>This module is use to process from you magento online store</description>
|
11 |
<notes>no comments</notes>
|
12 |
<authors><author><name>Udi</name><user>Udi</user><email>udi@ctrlz.co.il</email></author></authors>
|
13 |
+
<date>2012-01-02</date>
|
14 |
+
<time>15:02:13</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Netpay"><dir name="HostedPage"><dir name="Block"><file name="Redirect.php" hash="1b126ed3e8700a8b2c5b9d42bc51fa51"/></dir><dir name="controllers"><file name="RedirectController.php" hash="9757e985282dcea062328fb961eb84d9"/></dir><dir name="etc"><file name="config.xml" hash="cbfe2af0be683d14ceb39460b9a915a4"/><file name="system.xml" hash="d827edfbae7a9605c5ec2ae3418cfaef"/></dir><dir name="model"><file name="PaymentMethod.php" hash="ab841ebd9efbd16b42bd8510f924e778"/></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="etc"><dir name="modules"><file name="Netpay_HostedPage.xml" hash="946d3d21576ddac0a349b3ea1b07b13a"/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.6.0</max></php></required></dependencies>
|
18 |
</package>
|