Version Notes
Fixed an error when tax is applied.
Download this release
Release Info
Developer | iPay International S.A. |
Extension | myPOS_Virtual |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/community/Mypos/Virtual/Helper/Data.php +32 -12
- app/code/community/Mypos/Virtual/Model/Standard.php +0 -0
- app/code/community/Mypos/Virtual/controllers/PaymentController.php +0 -0
- app/code/community/Mypos/Virtual/etc/config.xml +0 -0
- app/code/community/Mypos/Virtual/etc/system.xml +15 -15
- app/design/frontend/base/default/template/mypos_virtual/redirect.phtml +0 -0
- app/etc/modules/Mypos_Virtual.xml +0 -0
- package.xml +6 -6
app/code/community/Mypos/Virtual/Helper/Data.php
CHANGED
@@ -67,13 +67,13 @@ class Mypos_Virtual_Helper_Data extends Mage_Core_Helper_Abstract
|
|
67 |
$post = array();
|
68 |
$post['IPCmethod'] = 'IPCPurchase';
|
69 |
$post['IPCVersion'] = $this->ipcVersion;
|
70 |
-
$post['IPCLanguage'] =
|
71 |
$post['WalletNumber'] = $this->walletNumber;
|
72 |
$post['SID'] = $this->sid;
|
73 |
$post['keyindex'] = $this->keyindex;
|
74 |
$post['Source'] = 'sc_magento';
|
75 |
|
76 |
-
$post['Amount'] = number_format($_order->getBaseGrandTotal(), 2);
|
77 |
$post['Currency'] = $_order->getBaseCurrency()->getCode();
|
78 |
$post['OrderID'] = $_order->getRealOrderId();
|
79 |
$post['URL_OK'] = $this->getOrderOKUrl();
|
@@ -89,7 +89,7 @@ class Mypos_Virtual_Helper_Data extends Mage_Core_Helper_Abstract
|
|
89 |
$post['CustomerAddress'] = $billing_address->getStreetFull();
|
90 |
$post['CustomerPhone'] = $billing_address->getTelephone();
|
91 |
$post['Note'] = 'Mypos Virtual Checkout Magento Extension';
|
92 |
-
$post['CartItems'] = $_order->getTotalItemCount()
|
93 |
|
94 |
$index = 1;
|
95 |
/**
|
@@ -98,19 +98,39 @@ class Mypos_Virtual_Helper_Data extends Mage_Core_Helper_Abstract
|
|
98 |
foreach($items as $item)
|
99 |
{
|
100 |
$post['Article_' . $index] = html_entity_decode(strip_tags($item->getName()));
|
101 |
-
$post['Quantity_' . $index] = number_format($item->getQtyOrdered());
|
102 |
-
$post['Price_' . $index] = number_format($item->getBaseOriginalPrice(), 2);
|
103 |
-
$post['Amount_' . $index] = number_format($item->getBaseOriginalPrice() * $item->getQtyOrdered(), 2);
|
104 |
$post['Currency_' . $index] = $_order->getBaseCurrency()->getCode();
|
105 |
|
106 |
$index++;
|
107 |
}
|
108 |
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
$post['Signature'] = $this->createSignature($post);
|
116 |
|
@@ -168,7 +188,7 @@ class Mypos_Virtual_Helper_Data extends Mage_Core_Helper_Abstract
|
|
168 |
|
169 |
$post['IPC_Trnref'] = $transactionId;
|
170 |
$post['OrderID'] = $order->getRealOrderId();
|
171 |
-
$post['Amount'] = number_format($amount, 2);
|
172 |
$post['Currency'] = $order->getBaseCurrency()->getCode();
|
173 |
$post['OutputFormat'] = 'xml';
|
174 |
|
67 |
$post = array();
|
68 |
$post['IPCmethod'] = 'IPCPurchase';
|
69 |
$post['IPCVersion'] = $this->ipcVersion;
|
70 |
+
$post['IPCLanguage'] = substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);
|
71 |
$post['WalletNumber'] = $this->walletNumber;
|
72 |
$post['SID'] = $this->sid;
|
73 |
$post['keyindex'] = $this->keyindex;
|
74 |
$post['Source'] = 'sc_magento';
|
75 |
|
76 |
+
$post['Amount'] = number_format($_order->getBaseGrandTotal(), 2, '.', '');
|
77 |
$post['Currency'] = $_order->getBaseCurrency()->getCode();
|
78 |
$post['OrderID'] = $_order->getRealOrderId();
|
79 |
$post['URL_OK'] = $this->getOrderOKUrl();
|
89 |
$post['CustomerAddress'] = $billing_address->getStreetFull();
|
90 |
$post['CustomerPhone'] = $billing_address->getTelephone();
|
91 |
$post['Note'] = 'Mypos Virtual Checkout Magento Extension';
|
92 |
+
$post['CartItems'] = $_order->getTotalItemCount();
|
93 |
|
94 |
$index = 1;
|
95 |
/**
|
98 |
foreach($items as $item)
|
99 |
{
|
100 |
$post['Article_' . $index] = html_entity_decode(strip_tags($item->getName()));
|
101 |
+
$post['Quantity_' . $index] = number_format($item->getQtyOrdered(), 2, '.', '');
|
102 |
+
$post['Price_' . $index] = number_format($item->getBaseOriginalPrice(), 2, '.', '');
|
103 |
+
$post['Amount_' . $index] = number_format($item->getBaseOriginalPrice() * $item->getQtyOrdered(), 2, '.', '');
|
104 |
$post['Currency_' . $index] = $_order->getBaseCurrency()->getCode();
|
105 |
|
106 |
$index++;
|
107 |
}
|
108 |
|
109 |
+
if ($_order->getShippingDescription() !== '') {
|
110 |
+
$post['Article_' . $index] = $_order->getShippingDescription();
|
111 |
+
$post['Quantity_' . $index] = 1;
|
112 |
+
$post['Price_' . $index] = number_format($_order->getBaseShippingAmount(), 2, '.', '');
|
113 |
+
$post['Amount_' . $index] = number_format($_order->getBaseShippingAmount() * 1, 2, '.', '');
|
114 |
+
$post['Currency_' . $index] = $_order->getBaseCurrency()->getCode();
|
115 |
+
|
116 |
+
$index++;
|
117 |
+
$post['CartItems']++;
|
118 |
+
}
|
119 |
+
|
120 |
+
$taxes = $_order->getFullTaxInfo();
|
121 |
+
|
122 |
+
if (count($taxes) !== 0) {
|
123 |
+
foreach ($taxes as $tax) {
|
124 |
+
$post['Article_' . $index] = "Tax" . ' (' . number_format($tax['percent'], 2, '.', '') . '%)';
|
125 |
+
$post['Quantity_' . $index] = 1;
|
126 |
+
$post['Price_' . $index] = number_format($tax['amount'], 2, '.', '');
|
127 |
+
$post['Amount_' . $index] = number_format($tax['amount'], 2, '.', '');
|
128 |
+
$post['Currency_' . $index] = $_order->getBaseCurrency()->getCode();
|
129 |
+
|
130 |
+
$index++;
|
131 |
+
$post['CartItems']++;
|
132 |
+
}
|
133 |
+
}
|
134 |
|
135 |
$post['Signature'] = $this->createSignature($post);
|
136 |
|
188 |
|
189 |
$post['IPC_Trnref'] = $transactionId;
|
190 |
$post['OrderID'] = $order->getRealOrderId();
|
191 |
+
$post['Amount'] = number_format($amount, 2, '.', '');
|
192 |
$post['Currency'] = $order->getBaseCurrency()->getCode();
|
193 |
$post['OutputFormat'] = 'xml';
|
194 |
|
app/code/community/Mypos/Virtual/Model/Standard.php
CHANGED
File without changes
|
app/code/community/Mypos/Virtual/controllers/PaymentController.php
CHANGED
File without changes
|
app/code/community/Mypos/Virtual/etc/config.xml
CHANGED
File without changes
|
app/code/community/Mypos/Virtual/etc/system.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<sort_order>10</sort_order>
|
21 |
<show_in_default>1</show_in_default>
|
22 |
<show_in_website>1</show_in_website>
|
23 |
-
<show_in_store>
|
24 |
</active>
|
25 |
<title translate="label">
|
26 |
<label>Title</label>
|
@@ -39,7 +39,7 @@
|
|
39 |
<sort_order>18</sort_order>
|
40 |
<show_in_default>1</show_in_default>
|
41 |
<show_in_website>1</show_in_website>
|
42 |
-
<show_in_store>
|
43 |
<comment>
|
44 |
<![CDATA[Determines whether the myPOS Virtual test environment is used.]]>
|
45 |
</comment>
|
@@ -51,7 +51,7 @@
|
|
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>
|
55 |
</sort_order>
|
56 |
<developer_settings type="group" translate="label">
|
57 |
<label>Developer Settings</label>
|
@@ -69,7 +69,7 @@
|
|
69 |
<sort_order>30</sort_order>
|
70 |
<show_in_default>1</show_in_default>
|
71 |
<show_in_website>1</show_in_website>
|
72 |
-
<show_in_store>
|
73 |
<comment>
|
74 |
<![CDATA[Store ID is given when you add a new online store. It could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores.]]>
|
75 |
</comment>
|
@@ -82,7 +82,7 @@
|
|
82 |
<sort_order>40</sort_order>
|
83 |
<show_in_default>1</show_in_default>
|
84 |
<show_in_website>1</show_in_website>
|
85 |
-
<show_in_store>
|
86 |
<comment>
|
87 |
<![CDATA[You can view your myPOS Client number in your online banking at mypos.eu]]>
|
88 |
</comment>
|
@@ -95,7 +95,7 @@
|
|
95 |
<sort_order>50</sort_order>
|
96 |
<show_in_default>1</show_in_default>
|
97 |
<show_in_website>1</show_in_website>
|
98 |
-
<show_in_store>
|
99 |
<comment>
|
100 |
<![CDATA[The Private Key for your store is generated in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
101 |
</comment>
|
@@ -109,7 +109,7 @@
|
|
109 |
<sort_order>60</sort_order>
|
110 |
<show_in_default>1</show_in_default>
|
111 |
<show_in_website>1</show_in_website>
|
112 |
-
<show_in_store>
|
113 |
<comment>
|
114 |
<![CDATA[The myPOS Public Certificate is available for download in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
115 |
</comment>
|
@@ -122,7 +122,7 @@
|
|
122 |
<sort_order>110</sort_order>
|
123 |
<show_in_default>1</show_in_default>
|
124 |
<show_in_website>1</show_in_website>
|
125 |
-
<show_in_store>
|
126 |
</developer_url>
|
127 |
|
128 |
<developer_keyindex translate="label">
|
@@ -132,7 +132,7 @@
|
|
132 |
<sort_order>120</sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
-
<show_in_store>
|
136 |
<comment>
|
137 |
<![CDATA[The Key Index assigned to the certificate could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
138 |
</comment>
|
@@ -155,7 +155,7 @@
|
|
155 |
<sort_order>30</sort_order>
|
156 |
<show_in_default>1</show_in_default>
|
157 |
<show_in_website>1</show_in_website>
|
158 |
-
<show_in_store>
|
159 |
<comment>
|
160 |
<![CDATA[Store ID is given when you add a new online store. It could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores.]]>
|
161 |
</comment>
|
@@ -167,7 +167,7 @@
|
|
167 |
<sort_order>40</sort_order>
|
168 |
<show_in_default>1</show_in_default>
|
169 |
<show_in_website>1</show_in_website>
|
170 |
-
<show_in_store>
|
171 |
<comment>
|
172 |
<![CDATA[You can view your myPOS Client number in your online banking at mypos.eu]]>
|
173 |
</comment>
|
@@ -180,7 +180,7 @@
|
|
180 |
<sort_order>50</sort_order>
|
181 |
<show_in_default>1</show_in_default>
|
182 |
<show_in_website>1</show_in_website>
|
183 |
-
<show_in_store>
|
184 |
<comment>
|
185 |
<![CDATA[The Private Key for your store is generated in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
186 |
</comment>
|
@@ -193,7 +193,7 @@
|
|
193 |
<sort_order>60</sort_order>
|
194 |
<show_in_default>1</show_in_default>
|
195 |
<show_in_website>1</show_in_website>
|
196 |
-
<show_in_store>
|
197 |
<comment>
|
198 |
<![CDATA[The myPOS Public Certificate is available for download in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
199 |
</comment>
|
@@ -206,7 +206,7 @@
|
|
206 |
<sort_order>120</sort_order>
|
207 |
<show_in_default>1</show_in_default>
|
208 |
<show_in_website>1</show_in_website>
|
209 |
-
<show_in_store>
|
210 |
</production_url>
|
211 |
|
212 |
<production_keyindex translate="label">
|
@@ -216,7 +216,7 @@
|
|
216 |
<sort_order>130</sort_order>
|
217 |
<show_in_default>1</show_in_default>
|
218 |
<show_in_website>1</show_in_website>
|
219 |
-
<show_in_store>
|
220 |
<comment>
|
221 |
<![CDATA[The Key Index assigned to the certificate could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
222 |
</comment>
|
20 |
<sort_order>10</sort_order>
|
21 |
<show_in_default>1</show_in_default>
|
22 |
<show_in_website>1</show_in_website>
|
23 |
+
<show_in_store>1</show_in_store>
|
24 |
</active>
|
25 |
<title translate="label">
|
26 |
<label>Title</label>
|
39 |
<sort_order>18</sort_order>
|
40 |
<show_in_default>1</show_in_default>
|
41 |
<show_in_website>1</show_in_website>
|
42 |
+
<show_in_store>1</show_in_store>
|
43 |
<comment>
|
44 |
<![CDATA[Determines whether the myPOS Virtual test environment is used.]]>
|
45 |
</comment>
|
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 |
<developer_settings type="group" translate="label">
|
57 |
<label>Developer Settings</label>
|
69 |
<sort_order>30</sort_order>
|
70 |
<show_in_default>1</show_in_default>
|
71 |
<show_in_website>1</show_in_website>
|
72 |
+
<show_in_store>1</show_in_store>
|
73 |
<comment>
|
74 |
<![CDATA[Store ID is given when you add a new online store. It could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores.]]>
|
75 |
</comment>
|
82 |
<sort_order>40</sort_order>
|
83 |
<show_in_default>1</show_in_default>
|
84 |
<show_in_website>1</show_in_website>
|
85 |
+
<show_in_store>1</show_in_store>
|
86 |
<comment>
|
87 |
<![CDATA[You can view your myPOS Client number in your online banking at mypos.eu]]>
|
88 |
</comment>
|
95 |
<sort_order>50</sort_order>
|
96 |
<show_in_default>1</show_in_default>
|
97 |
<show_in_website>1</show_in_website>
|
98 |
+
<show_in_store>1</show_in_store>
|
99 |
<comment>
|
100 |
<![CDATA[The Private Key for your store is generated in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
101 |
</comment>
|
109 |
<sort_order>60</sort_order>
|
110 |
<show_in_default>1</show_in_default>
|
111 |
<show_in_website>1</show_in_website>
|
112 |
+
<show_in_store>1</show_in_store>
|
113 |
<comment>
|
114 |
<![CDATA[The myPOS Public Certificate is available for download in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
115 |
</comment>
|
122 |
<sort_order>110</sort_order>
|
123 |
<show_in_default>1</show_in_default>
|
124 |
<show_in_website>1</show_in_website>
|
125 |
+
<show_in_store>1</show_in_store>
|
126 |
</developer_url>
|
127 |
|
128 |
<developer_keyindex translate="label">
|
132 |
<sort_order>120</sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
+
<show_in_store>1</show_in_store>
|
136 |
<comment>
|
137 |
<![CDATA[The Key Index assigned to the certificate could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
138 |
</comment>
|
155 |
<sort_order>30</sort_order>
|
156 |
<show_in_default>1</show_in_default>
|
157 |
<show_in_website>1</show_in_website>
|
158 |
+
<show_in_store>1</show_in_store>
|
159 |
<comment>
|
160 |
<![CDATA[Store ID is given when you add a new online store. It could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores.]]>
|
161 |
</comment>
|
167 |
<sort_order>40</sort_order>
|
168 |
<show_in_default>1</show_in_default>
|
169 |
<show_in_website>1</show_in_website>
|
170 |
+
<show_in_store>1</show_in_store>
|
171 |
<comment>
|
172 |
<![CDATA[You can view your myPOS Client number in your online banking at mypos.eu]]>
|
173 |
</comment>
|
180 |
<sort_order>50</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>
|
185 |
<![CDATA[The Private Key for your store is generated in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
186 |
</comment>
|
193 |
<sort_order>60</sort_order>
|
194 |
<show_in_default>1</show_in_default>
|
195 |
<show_in_website>1</show_in_website>
|
196 |
+
<show_in_store>1</show_in_store>
|
197 |
<comment>
|
198 |
<![CDATA[The myPOS Public Certificate is available for download in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
199 |
</comment>
|
206 |
<sort_order>120</sort_order>
|
207 |
<show_in_default>1</show_in_default>
|
208 |
<show_in_website>1</show_in_website>
|
209 |
+
<show_in_store>1</show_in_store>
|
210 |
</production_url>
|
211 |
|
212 |
<production_keyindex translate="label">
|
216 |
<sort_order>130</sort_order>
|
217 |
<show_in_default>1</show_in_default>
|
218 |
<show_in_website>1</show_in_website>
|
219 |
+
<show_in_store>1</show_in_store>
|
220 |
<comment>
|
221 |
<![CDATA[The Key Index assigned to the certificate could be reviewed in your online banking at mypos.eu - Menu Merchant services > myPOS Virtual > Online stores > Keys menu.]]>
|
222 |
</comment>
|
app/design/frontend/base/default/template/mypos_virtual/redirect.phtml
CHANGED
File without changes
|
app/etc/modules/Mypos_Virtual.xml
CHANGED
File without changes
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>myPOS_Virtual</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -10,11 +10,11 @@
|
|
10 |
<description>myPOS Virtual is an extension especially designed for European-based merchants who need a simple and secure complete checkout solution. Start accepting credit and debit card payments at your online store in few easy steps.
|
11 |
By using myPOS Virtual you enjoy a checkout extension backed-up by a comprehensive free merchant account with multiple currencies and an IBAN in Luxembourg.
|
12 |
</description>
|
13 |
-
<notes>
|
14 |
<authors><author><name>iPay International S.A.</name><user>ipay_developer</user><email>mvp@ipay.eu</email></author></authors>
|
15 |
-
<date>2016-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magecommunity"><dir name="Mypos"><dir name="Virtual"><dir name="Helper"><file name="Data.php" hash="
|
18 |
<compatible/>
|
19 |
-
<dependencies><required><php><min>5.
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>myPOS_Virtual</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
10 |
<description>myPOS Virtual is an extension especially designed for European-based merchants who need a simple and secure complete checkout solution. Start accepting credit and debit card payments at your online store in few easy steps.
|
11 |
By using myPOS Virtual you enjoy a checkout extension backed-up by a comprehensive free merchant account with multiple currencies and an IBAN in Luxembourg.
|
12 |
</description>
|
13 |
+
<notes>Fixed an error when tax is applied.</notes>
|
14 |
<authors><author><name>iPay International S.A.</name><user>ipay_developer</user><email>mvp@ipay.eu</email></author></authors>
|
15 |
+
<date>2016-06-14</date>
|
16 |
+
<time>06:44:53</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Mypos"><dir name="Virtual"><dir name="Helper"><file name="Data.php" hash="03c1b002b18ac56f37fa7965298ba19d"/></dir><dir name="Model"><file name="Standard.php" hash="9c304393adbff742cbfec7af6a37bea7"/></dir><dir name="controllers"><file name="PaymentController.php" hash="725bd38de841efc89f205af4615d3349"/></dir><dir name="etc"><file name="config.xml" hash="51643300f013179eac57d538544420c1"/><file name="system.xml" hash="094a97cc1847aac6b90f2cc90ddd5183"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="mypos_virtual"><file name="redirect.phtml" hash="32904da0aa80adf0e0bc8b9c03c4f89e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mypos_Virtual.xml" hash="d38d8e8a3a6631179dfc3498736c75c9"/></dir></target></contents>
|
18 |
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.0</min><max>7.9.9</max></php></required></dependencies>
|
20 |
</package>
|