Version Notes
- support for new signature hash
- save fraud information in database
- hide language switch option
- debug option
Download this release
Release Info
Developer | Magento Core Team |
Extension | Phoenix_Worldpay |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.4 to 1.3.0
- app/code/community/Phoenix/Worldpay/controllers/ProcessingController.php +16 -11
- app/code/community/Phoenix/Worldpay/etc/config.xml +1 -1
- app/code/community/Phoenix/Worldpay/etc/system.xml +11 -11
- app/design/adminhtml/default/default/template/worldpay/info.phtml +1 -0
- app/design/frontend/default/default/template/worldpay/info.phtml +1 -0
- app/locale/de_DE/Phoenix_Worldpay.csv +2 -1
- app/locale/en_US/Phoenix_Worldpay.csv +2 -1
- package.xml +8 -5
app/code/community/Phoenix/Worldpay/controllers/ProcessingController.php
CHANGED
@@ -191,7 +191,7 @@ class Phoenix_Worldpay_ProcessingController extends Mage_Core_Controller_Front_A
|
|
191 |
*/
|
192 |
protected function _processSale($request)
|
193 |
{
|
194 |
-
|
195 |
if ($this->_paymentInst->getConfigData('use_store_currency')) {
|
196 |
$price = number_format($this->_order->getGrandTotal(),2,'.','');
|
197 |
$currency = $this->_order->getOrderCurrencyCode();
|
@@ -200,18 +200,20 @@ class Phoenix_Worldpay_ProcessingController extends Mage_Core_Controller_Front_A
|
|
200 |
$currency = $this->_order->getBaseCurrencyCode();
|
201 |
}
|
202 |
|
203 |
-
|
204 |
if ($price != $request['authAmount'])
|
205 |
Mage::throwException('Transaction currency doesn\'t match.');
|
206 |
|
207 |
-
|
208 |
if ($currency != $request['authCurrency'])
|
209 |
Mage::throwException('Transaction currency doesn\'t match.');
|
210 |
|
211 |
-
|
212 |
-
$this->_order->getPayment()
|
213 |
-
|
214 |
-
|
|
|
|
|
215 |
|
216 |
switch($request['authMode']) {
|
217 |
case 'A':
|
@@ -248,9 +250,12 @@ class Phoenix_Worldpay_ProcessingController extends Mage_Core_Controller_Front_A
|
|
248 |
*/
|
249 |
protected function _processCancel($request)
|
250 |
{
|
251 |
-
|
252 |
-
$this->_order->
|
253 |
-
|
|
|
|
|
|
|
254 |
|
255 |
$this->getResponse()->setBody(
|
256 |
$this->getLayout()
|
@@ -262,6 +267,6 @@ class Phoenix_Worldpay_ProcessingController extends Mage_Core_Controller_Front_A
|
|
262 |
|
263 |
protected function _getPendingPaymentStatus()
|
264 |
{
|
265 |
-
return Mage::helper('
|
266 |
}
|
267 |
}
|
191 |
*/
|
192 |
protected function _processSale($request)
|
193 |
{
|
194 |
+
// check transaction amount and currency
|
195 |
if ($this->_paymentInst->getConfigData('use_store_currency')) {
|
196 |
$price = number_format($this->_order->getGrandTotal(),2,'.','');
|
197 |
$currency = $this->_order->getOrderCurrencyCode();
|
200 |
$currency = $this->_order->getBaseCurrencyCode();
|
201 |
}
|
202 |
|
203 |
+
// check transaction amount
|
204 |
if ($price != $request['authAmount'])
|
205 |
Mage::throwException('Transaction currency doesn\'t match.');
|
206 |
|
207 |
+
// check transaction currency
|
208 |
if ($currency != $request['authCurrency'])
|
209 |
Mage::throwException('Transaction currency doesn\'t match.');
|
210 |
|
211 |
+
// save transaction information
|
212 |
+
$this->_order->getPayment()
|
213 |
+
->setTransactionId($request['transId'])
|
214 |
+
->setLastTransId($request['transId'])
|
215 |
+
->setCcAvsStatus($request['AVS'])
|
216 |
+
->setCcType($request['cardType']);
|
217 |
|
218 |
switch($request['authMode']) {
|
219 |
case 'A':
|
250 |
*/
|
251 |
protected function _processCancel($request)
|
252 |
{
|
253 |
+
// cancel order
|
254 |
+
if ($this->_order->canCancel()) {
|
255 |
+
$this->_order->cancel();
|
256 |
+
$this->_order->addStatusToHistory(Mage_Sales_Model_Order::STATE_CANCELED, Mage::helper('worldpay')->__('Payment was canceled'));
|
257 |
+
$this->_order->save();
|
258 |
+
}
|
259 |
|
260 |
$this->getResponse()->setBody(
|
261 |
$this->getLayout()
|
267 |
|
268 |
protected function _getPendingPaymentStatus()
|
269 |
{
|
270 |
+
return Mage::helper('worldpay')->getPendingPaymentStatus();
|
271 |
}
|
272 |
}
|
app/code/community/Phoenix/Worldpay/etc/config.xml
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<config>
|
22 |
<modules>
|
23 |
<Phoenix_Worldpay>
|
24 |
-
<version>1.2.
|
25 |
</Phoenix_Worldpay>
|
26 |
</modules>
|
27 |
<global>
|
21 |
<config>
|
22 |
<modules>
|
23 |
<Phoenix_Worldpay>
|
24 |
+
<version>1.2.6</version>
|
25 |
</Phoenix_Worldpay>
|
26 |
</modules>
|
27 |
<global>
|
app/code/community/Phoenix/Worldpay/etc/system.xml
CHANGED
@@ -82,7 +82,7 @@
|
|
82 |
<show_in_website>1</show_in_website>
|
83 |
<show_in_store>1</show_in_store>
|
84 |
</specificcountry>
|
85 |
-
<use_store_currency translate="label">
|
86 |
<label>Pay in store currency</label>
|
87 |
<comment>Choose "Yes" to use store view currency instead of base currency.</comment>
|
88 |
<frontend_type>select</frontend_type>
|
@@ -92,7 +92,7 @@
|
|
92 |
<show_in_website>1</show_in_website>
|
93 |
<show_in_store>1</show_in_store>
|
94 |
</use_store_currency>
|
95 |
-
<inst_id>
|
96 |
<label>Installation ID</label>
|
97 |
<frontend_type>text</frontend_type>
|
98 |
<backend_model>worldpay/config_backend_instid</backend_model>
|
@@ -101,7 +101,7 @@
|
|
101 |
<show_in_website>1</show_in_website>
|
102 |
<show_in_store>0</show_in_store>
|
103 |
</inst_id>
|
104 |
-
<transaction_password>
|
105 |
<label>Payment Response password</label>
|
106 |
<frontend_type>text</frontend_type>
|
107 |
<sort_order>8</sort_order>
|
@@ -109,7 +109,7 @@
|
|
109 |
<show_in_website>1</show_in_website>
|
110 |
<show_in_store>0</show_in_store>
|
111 |
</transaction_password>
|
112 |
-
<security_key>
|
113 |
<label>MD5 secret</label>
|
114 |
<comment>Should be between 8-16 characters.</comment>
|
115 |
<frontend_type>text</frontend_type>
|
@@ -118,7 +118,7 @@
|
|
118 |
<show_in_website>1</show_in_website>
|
119 |
<show_in_store>0</show_in_store>
|
120 |
</security_key>
|
121 |
-
<request_type>
|
122 |
<label>Request Type</label>
|
123 |
<frontend_type>select</frontend_type>
|
124 |
<source_model>worldpay/source_requestType</source_model>
|
@@ -127,7 +127,7 @@
|
|
127 |
<show_in_website>1</show_in_website>
|
128 |
<show_in_store>0</show_in_store>
|
129 |
</request_type>
|
130 |
-
<transaction_mode>
|
131 |
<label>Transaction Mode</label>
|
132 |
<frontend_type>select</frontend_type>
|
133 |
<source_model>worldpay/source_transactionMode</source_model>
|
@@ -136,7 +136,7 @@
|
|
136 |
<show_in_website>1</show_in_website>
|
137 |
<show_in_store>0</show_in_store>
|
138 |
</transaction_mode>
|
139 |
-
<fix_contact>
|
140 |
<label>Fix contact</label>
|
141 |
<frontend_type>select</frontend_type>
|
142 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -145,7 +145,7 @@
|
|
145 |
<show_in_website>1</show_in_website>
|
146 |
<show_in_store>0</show_in_store>
|
147 |
</fix_contact>
|
148 |
-
<hide_contact>
|
149 |
<label>Hide contact</label>
|
150 |
<frontend_type>select</frontend_type>
|
151 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
@@ -154,7 +154,7 @@
|
|
154 |
<show_in_website>1</show_in_website>
|
155 |
<show_in_store>0</show_in_store>
|
156 |
</hide_contact>
|
157 |
-
<enable_online_operations>
|
158 |
<label>Enable online operations</label>
|
159 |
<comment>Remote admin installation is needed to perform online refund</comment>
|
160 |
<frontend_type>select</frontend_type>
|
@@ -164,7 +164,7 @@
|
|
164 |
<show_in_website>1</show_in_website>
|
165 |
<show_in_store>0</show_in_store>
|
166 |
</enable_online_operations>
|
167 |
-
<admin_inst_id>
|
168 |
<label>Remote Admin Installation ID</label>
|
169 |
<frontend_type>text</frontend_type>
|
170 |
<comment>Required for Remote Admin</comment>
|
@@ -174,7 +174,7 @@
|
|
174 |
<show_in_website>1</show_in_website>
|
175 |
<show_in_store>0</show_in_store>
|
176 |
</admin_inst_id>
|
177 |
-
<auth_password>
|
178 |
<label>Authorisation password</label>
|
179 |
<comment>Required for Remote Admin</comment>
|
180 |
<frontend_type>text</frontend_type>
|
82 |
<show_in_website>1</show_in_website>
|
83 |
<show_in_store>1</show_in_store>
|
84 |
</specificcountry>
|
85 |
+
<use_store_currency translate="label,comment">
|
86 |
<label>Pay in store currency</label>
|
87 |
<comment>Choose "Yes" to use store view currency instead of base currency.</comment>
|
88 |
<frontend_type>select</frontend_type>
|
92 |
<show_in_website>1</show_in_website>
|
93 |
<show_in_store>1</show_in_store>
|
94 |
</use_store_currency>
|
95 |
+
<inst_id translate="label">
|
96 |
<label>Installation ID</label>
|
97 |
<frontend_type>text</frontend_type>
|
98 |
<backend_model>worldpay/config_backend_instid</backend_model>
|
101 |
<show_in_website>1</show_in_website>
|
102 |
<show_in_store>0</show_in_store>
|
103 |
</inst_id>
|
104 |
+
<transaction_password translate="label">
|
105 |
<label>Payment Response password</label>
|
106 |
<frontend_type>text</frontend_type>
|
107 |
<sort_order>8</sort_order>
|
109 |
<show_in_website>1</show_in_website>
|
110 |
<show_in_store>0</show_in_store>
|
111 |
</transaction_password>
|
112 |
+
<security_key translate="label,comment">
|
113 |
<label>MD5 secret</label>
|
114 |
<comment>Should be between 8-16 characters.</comment>
|
115 |
<frontend_type>text</frontend_type>
|
118 |
<show_in_website>1</show_in_website>
|
119 |
<show_in_store>0</show_in_store>
|
120 |
</security_key>
|
121 |
+
<request_type translate="label">
|
122 |
<label>Request Type</label>
|
123 |
<frontend_type>select</frontend_type>
|
124 |
<source_model>worldpay/source_requestType</source_model>
|
127 |
<show_in_website>1</show_in_website>
|
128 |
<show_in_store>0</show_in_store>
|
129 |
</request_type>
|
130 |
+
<transaction_mode translate="label">
|
131 |
<label>Transaction Mode</label>
|
132 |
<frontend_type>select</frontend_type>
|
133 |
<source_model>worldpay/source_transactionMode</source_model>
|
136 |
<show_in_website>1</show_in_website>
|
137 |
<show_in_store>0</show_in_store>
|
138 |
</transaction_mode>
|
139 |
+
<fix_contact translate="label">
|
140 |
<label>Fix contact</label>
|
141 |
<frontend_type>select</frontend_type>
|
142 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
145 |
<show_in_website>1</show_in_website>
|
146 |
<show_in_store>0</show_in_store>
|
147 |
</fix_contact>
|
148 |
+
<hide_contact translate="label">
|
149 |
<label>Hide contact</label>
|
150 |
<frontend_type>select</frontend_type>
|
151 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
154 |
<show_in_website>1</show_in_website>
|
155 |
<show_in_store>0</show_in_store>
|
156 |
</hide_contact>
|
157 |
+
<enable_online_operations translate="label,comment">
|
158 |
<label>Enable online operations</label>
|
159 |
<comment>Remote admin installation is needed to perform online refund</comment>
|
160 |
<frontend_type>select</frontend_type>
|
164 |
<show_in_website>1</show_in_website>
|
165 |
<show_in_store>0</show_in_store>
|
166 |
</enable_online_operations>
|
167 |
+
<admin_inst_id translate="label,comment">
|
168 |
<label>Remote Admin Installation ID</label>
|
169 |
<frontend_type>text</frontend_type>
|
170 |
<comment>Required for Remote Admin</comment>
|
174 |
<show_in_website>1</show_in_website>
|
175 |
<show_in_store>0</show_in_store>
|
176 |
</admin_inst_id>
|
177 |
+
<auth_password translate="label,comment">
|
178 |
<label>Authorisation password</label>
|
179 |
<comment>Required for Remote Admin</comment>
|
180 |
<frontend_type>text</frontend_type>
|
app/design/adminhtml/default/default/template/worldpay/info.phtml
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
if ($this->getInfo()->getLastTransId() == '') {
|
23 |
echo Mage::helper('worldpay')->__('Payment has not been processed yet.') . '<br/>';
|
24 |
} else {
|
|
|
25 |
echo Mage::helper('worldpay')->__('Worldpay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
|
26 |
echo Mage::helper('worldpay')->__('AVS status: %s', $this->htmlEscape($this->getInfo()->getCcAvsStatus())) . '<br/>';
|
27 |
}
|
22 |
if ($this->getInfo()->getLastTransId() == '') {
|
23 |
echo Mage::helper('worldpay')->__('Payment has not been processed yet.') . '<br/>';
|
24 |
} else {
|
25 |
+
echo Mage::helper('worldpay')->__('Credit Card Type: %s', $this->htmlEscape($this->getInfo()->getCcType())) . '<br/>';
|
26 |
echo Mage::helper('worldpay')->__('Worldpay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
|
27 |
echo Mage::helper('worldpay')->__('AVS status: %s', $this->htmlEscape($this->getInfo()->getCcAvsStatus())) . '<br/>';
|
28 |
}
|
app/design/frontend/default/default/template/worldpay/info.phtml
CHANGED
@@ -22,6 +22,7 @@
|
|
22 |
if ($this->getInfo()->getLastTransId() == '') {
|
23 |
echo '<em>' . Mage::helper('worldpay')->__($this->getMethodCode().':You will be redirected to Worldpay website when you place an order.') . '</em>';
|
24 |
} else {
|
|
|
25 |
echo Mage::helper('worldpay')->__('Worldpay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
|
26 |
}
|
27 |
?>
|
22 |
if ($this->getInfo()->getLastTransId() == '') {
|
23 |
echo '<em>' . Mage::helper('worldpay')->__($this->getMethodCode().':You will be redirected to Worldpay website when you place an order.') . '</em>';
|
24 |
} else {
|
25 |
+
echo Mage::helper('worldpay')->__('Credit Card Type: %s', $this->htmlEscape($this->getInfo()->getCcType())) . '<br/>';
|
26 |
echo Mage::helper('worldpay')->__('Worldpay Transaction ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) . '<br/>';
|
27 |
}
|
28 |
?>
|
app/locale/de_DE/Phoenix_Worldpay.csv
CHANGED
@@ -17,4 +17,5 @@
|
|
17 |
"Your purchase at","Ihr Einkauf bei"
|
18 |
"Error during refunding online. Server response: %s","Fehler während der Gutschrift-Erteilung. Server-Antwort: %s"
|
19 |
"Worldpay transaction has been captured.","Worldpay Transaktion wurde abgebucht."
|
20 |
-
"The order has been canceled.,"Der Bestellvorgang wurde abgebrochen."
|
|
17 |
"Your purchase at","Ihr Einkauf bei"
|
18 |
"Error during refunding online. Server response: %s","Fehler während der Gutschrift-Erteilung. Server-Antwort: %s"
|
19 |
"Worldpay transaction has been captured.","Worldpay Transaktion wurde abgebucht."
|
20 |
+
"The order has been canceled.,"Der Bestellvorgang wurde abgebrochen."
|
21 |
+
"Credit Card Type: %s","Kreditkarte: %s"
|
app/locale/en_US/Phoenix_Worldpay.csv
CHANGED
@@ -17,4 +17,5 @@
|
|
17 |
"Your purchase at","Your purchase at"
|
18 |
"Error during refunding online. Server response: %s","Error during refunding online. Server response: %s"
|
19 |
"Worldpay transaction has been captured.","Worldpay transaction has been captured."
|
20 |
-
"The order has been canceled.","The order has been canceled."
|
|
17 |
"Your purchase at","Your purchase at"
|
18 |
"Error during refunding online. Server response: %s","Error during refunding online. Server response: %s"
|
19 |
"Worldpay transaction has been captured.","Worldpay transaction has been captured."
|
20 |
+
"The order has been canceled.","The order has been canceled."
|
21 |
+
"Credit Card Type: %s","Credit Card Type: %s"
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Phoenix_Worldpay</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -19,11 +19,14 @@ Notice: This extension is still beta. We recommend to test all transactions in y
|
|
19 |
The extension is developed and maintained by the German Magento Silver Partner Phoenix Medien (http://www.phoenix-medien.de).
|
20 |
|
21 |
The development was sponsored by liaison dangereuse (http://www.liaison-dangereuse.de).</description>
|
22 |
-
<notes>-
|
|
|
|
|
|
|
23 |
<authors><author><name>Phoenix Medien</name><user>auto-converted</user><email>info@phoenix-medien.de</email></author></authors>
|
24 |
-
<date>
|
25 |
-
<time>
|
26 |
-
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="worldpay"><dir name="pdf"><file name="info.phtml" hash="3a92c60f5c05a3e51df366cee651edd6"/></dir><file name="info.phtml" hash="
|
27 |
<compatible/>
|
28 |
<dependencies/>
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Phoenix_Worldpay</name>
|
4 |
+
<version>1.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
19 |
The extension is developed and maintained by the German Magento Silver Partner Phoenix Medien (http://www.phoenix-medien.de).
|
20 |
|
21 |
The development was sponsored by liaison dangereuse (http://www.liaison-dangereuse.de).</description>
|
22 |
+
<notes>- support for new signature hash
|
23 |
+
- save fraud information in database
|
24 |
+
- hide language switch option
|
25 |
+
- debug option</notes>
|
26 |
<authors><author><name>Phoenix Medien</name><user>auto-converted</user><email>info@phoenix-medien.de</email></author></authors>
|
27 |
+
<date>2011-04-01</date>
|
28 |
+
<time>14:40:37</time>
|
29 |
+
<contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="worldpay"><dir name="pdf"><file name="info.phtml" hash="3a92c60f5c05a3e51df366cee651edd6"/></dir><file name="info.phtml" hash="1790560a09702bdbe3f6a2074e03144b"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="worldpay.xml" hash="ac4191773623ae2ad6170f363866ed43"/></dir><dir name="template"><dir name="worldpay"><file name="blank.phtml" hash="8b7d8aa0521878b2dd796acfd4d655b6"/><file name="cancel.phtml" hash="350348b8fecb9b7c2b1045d1a8edd9c7"/><file name="failure.phtml" hash="77b202de38902c9e6458218bdce07de8"/><file name="form.phtml" hash="8c7184cbaffc115349de415d12273528"/><file name="info.phtml" hash="9c17afe371e23674979aad7e6ce82fe3"/><file name="redirect.phtml" hash="84d38770a43262c890094c132dc2bd5c"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Phoenix_Worldpay.csv" hash="f1120c2e8a91f142440b200863e691e9"/></dir><dir name="en_US"><file name="Phoenix_Worldpay.csv" hash="fed1c35eeb4d0bbc7edc275b63b2f0e0"/></dir></target><target name="mageetc"><dir name="modules"><file name="Phoenix_Worldpay.xml" hash="52b9dc5cd0d94ab43d8691438f090617"/></dir></target><target name="magecommunity"><dir name="Phoenix"><dir name="Worldpay"><dir name="Block"><file name="Cancel.php" hash="b0f213ee8e45d0b8b48a6fad48f05017"/><file name="Failure.php" hash="5add6ed9890109ba624b7a16bc0504f5"/><file name="Form.php" hash="d279b2d502e875e155101007eef7ebc5"/><file name="Info.php" hash="845d37c36ea2973599324f9e294969a4"/><file name="Redirect.php" hash="ee8eb2b8cdabaf9ae0dea66fd7362777"/><file name="Success.php" hash="0c072e272d53a0b24e5157201cd65877"/></dir><dir name="controllers"><file name="ProcessingController.php" hash="2735aded2e552488c8d4e4e7361a28ba"/></dir><dir name="etc"><file name="config.xml" hash="787177b04b26dd6317f901ae3459bcf7"/><file name="system.xml" hash="ceb5a05ac462091280d3dda7649d3376"/></dir><dir name="Helper"><file name="Data.php" hash="954555e22d7867b2eb2b698b86405d63"/></dir><dir name="Model"><dir name="Config"><dir name="Backend"><file name="Instid.php" hash="07147ceac69c3c19593b4a24873f15cc"/></dir></dir><dir name="Source"><file name="RequestType.php" hash="795d51b4c3f04bb00cf6cca5a3180cd7"/><file name="TransactionMode.php" hash="da4cadb5df1213edc34f22b67235d374"/></dir><file name="Cc.php" hash="cf6b3bff52b5aedd85ff94cc59a0fc8e"/><file name="Config.php" hash="9098369b245a824396354e1b64cd47ab"/></dir></dir></dir></target></contents>
|
30 |
<compatible/>
|
31 |
<dependencies/>
|
32 |
</package>
|