Version Notes
Stable release for Magento 1.4
Download this release
Release Info
Developer | Magento Core Team |
Extension | F500_Xibpayments |
Version | 1.0.8 |
Comparing to | |
See all releases |
Code changes from version 1.0.7 to 1.0.8
app/code/local/F500/Xibpayments/Block/Form.php
CHANGED
@@ -20,7 +20,6 @@ class F500_Xibpayments_Block_Form extends Mage_Payment_Block_Form
|
|
20 |
{
|
21 |
protected $_banks = array(
|
22 |
'0031' => 'ABN Amro',
|
23 |
-
'0081' => 'Fortis',
|
24 |
'0091' => 'Friesland Bank',
|
25 |
'0721' => 'ING',
|
26 |
'0021' => 'Rabobank',
|
20 |
{
|
21 |
protected $_banks = array(
|
22 |
'0031' => 'ABN Amro',
|
|
|
23 |
'0091' => 'Friesland Bank',
|
24 |
'0721' => 'ING',
|
25 |
'0021' => 'Rabobank',
|
app/code/local/F500/Xibpayments/controllers/SecureController.php
CHANGED
@@ -31,7 +31,32 @@ class F500_Xibpayments_SecureController extends Mage_Core_Controller_Front_Actio
|
|
31 |
'127.0.0.1'
|
32 |
);
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Get singleton with Xibpayments standard order transaction information
|
37 |
*
|
@@ -59,13 +84,13 @@ class F500_Xibpayments_SecureController extends Mage_Core_Controller_Front_Actio
|
|
59 |
*/
|
60 |
public function cancelAction()
|
61 |
{
|
62 |
-
$session = Mage::getSingleton('
|
63 |
-
$session->setQuoteId(
|
64 |
|
65 |
// cancel order
|
66 |
-
if (
|
67 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId(
|
68 |
-
if (
|
69 |
$order->cancel()->save();
|
70 |
}
|
71 |
}
|
@@ -96,17 +121,39 @@ class F500_Xibpayments_SecureController extends Mage_Core_Controller_Front_Actio
|
|
96 |
*/
|
97 |
public function controlAction()
|
98 |
{
|
|
|
|
|
99 |
/**
|
100 |
-
* Defend agains callbacks
|
101 |
*/
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
throw new Zend_Exception('Improper use of xibpayments control url');
|
106 |
exit(0);
|
107 |
}
|
108 |
|
109 |
-
$this->getStandard()->setCallbackData($
|
110 |
$this->getStandard()->processCallback();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
|
|
112 |
}
|
31 |
'127.0.0.1'
|
32 |
);
|
33 |
|
34 |
+
/**
|
35 |
+
* Order instance
|
36 |
+
*/
|
37 |
+
protected $_order;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get order
|
41 |
+
*
|
42 |
+
* @param none
|
43 |
+
* @return Mage_Sales_Model_Order
|
44 |
+
*/
|
45 |
+
public function getOrder()
|
46 |
+
{
|
47 |
+
if ($this->_order == null) {
|
48 |
+
}
|
49 |
+
return $this->_order;
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _expireAjax()
|
53 |
+
{
|
54 |
+
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
55 |
+
$this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
|
56 |
+
exit;
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
/**
|
61 |
* Get singleton with Xibpayments standard order transaction information
|
62 |
*
|
84 |
*/
|
85 |
public function cancelAction()
|
86 |
{
|
87 |
+
$session = Mage::getSingleton('xibpayments/session');
|
88 |
+
$session->setQuoteId($session->getXibpaymentsStandardQuoteId(true));
|
89 |
|
90 |
// cancel order
|
91 |
+
if ($session->getLastRealOrderId()) {
|
92 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
|
93 |
+
if ($order->getId()) {
|
94 |
$order->cancel()->save();
|
95 |
}
|
96 |
}
|
121 |
*/
|
122 |
public function controlAction()
|
123 |
{
|
124 |
+
$postData = $this->getRequest()->getPost();
|
125 |
+
|
126 |
/**
|
127 |
+
* Defend agains illegal callbacks by hash calculation
|
128 |
*/
|
129 |
+
if ( !$this->_request->isPost() || !$this->_validate($postData) ) {
|
130 |
+
|
131 |
+
throw new Zend_Exception('Improper use of cardgate control url');
|
|
|
132 |
exit(0);
|
133 |
}
|
134 |
|
135 |
+
$this->getStandard()->setCallbackData($postData);
|
136 |
$this->getStandard()->processCallback();
|
137 |
+
|
138 |
+
echo $postData['transaction_id'] . '.' . $postData['status'];
|
139 |
+
}
|
140 |
+
|
141 |
+
private function _validate( $postData )
|
142 |
+
{
|
143 |
+
|
144 |
+
$hashString = ( $this->getStandard()->isTest() ? 'TEST' : '')
|
145 |
+
. $postData['transaction_id']
|
146 |
+
. $postData['currency']
|
147 |
+
. $postData['amount']
|
148 |
+
. $postData['ref']
|
149 |
+
. $postData['status']
|
150 |
+
. $this->getStandard()->getConfigData('password_key');
|
151 |
+
|
152 |
+
if ( md5($hashString) == $postData['hash'] ) {
|
153 |
+
return true;
|
154 |
+
}
|
155 |
+
|
156 |
+
return false;
|
157 |
}
|
158 |
+
|
159 |
}
|
app/code/local/F500/Xibpayments/etc/config.xml
CHANGED
@@ -20,7 +20,7 @@
|
|
20 |
<config>
|
21 |
<modules>
|
22 |
<F500_Xibpayments>
|
23 |
-
<version>1.0.
|
24 |
</F500_Xibpayments>
|
25 |
</modules>
|
26 |
<global>
|
20 |
<config>
|
21 |
<modules>
|
22 |
<F500_Xibpayments>
|
23 |
+
<version>1.0.8</version>
|
24 |
</F500_Xibpayments>
|
25 |
</modules>
|
26 |
<global>
|
app/etc/modules/F500_Xibpayments.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<Mage_Payment />
|
13 |
</depends>
|
14 |
<!-- declare module's version information for database updates -->
|
15 |
-
<version>1.0.
|
16 |
</F500_Xibpayments>
|
17 |
</modules>
|
18 |
</config>
|
12 |
<Mage_Payment />
|
13 |
</depends>
|
14 |
<!-- declare module's version information for database updates -->
|
15 |
+
<version>1.0.8</version>
|
16 |
</F500_Xibpayments>
|
17 |
</modules>
|
18 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>F500_Xibpayments</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -12,9 +12,9 @@
|
|
12 |
Apply for an account at info@xibpayments.com</description>
|
13 |
<notes>Stable release for Magento 1.4</notes>
|
14 |
<authors><author><name>Ramon de la Fuente</name><user>auto-converted</user><email>ramon@future500.nl</email></author></authors>
|
15 |
-
<date>2010-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magelocale"><dir name="en_US"><file name="F500_Xibpayments.csv" hash="a64707577f9f55c4a9bd549f5ffdfb13"/></dir><dir name="nl_NL"><file name="F500_Xibpayments.csv" hash="f8d75d43ee93564505c63d5646bc6a25"/></dir></target><target name="magelocal"><dir name="F500"><dir name="Xibpayments"><dir name="Block"><file name="Form.php" hash="
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>F500_Xibpayments</name>
|
4 |
+
<version>1.0.8</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
12 |
Apply for an account at info@xibpayments.com</description>
|
13 |
<notes>Stable release for Magento 1.4</notes>
|
14 |
<authors><author><name>Ramon de la Fuente</name><user>auto-converted</user><email>ramon@future500.nl</email></author></authors>
|
15 |
+
<date>2010-12-15</date>
|
16 |
+
<time>09:17:46</time>
|
17 |
+
<contents><target name="magelocale"><dir name="en_US"><file name="F500_Xibpayments.csv" hash="a64707577f9f55c4a9bd549f5ffdfb13"/></dir><dir name="nl_NL"><file name="F500_Xibpayments.csv" hash="f8d75d43ee93564505c63d5646bc6a25"/></dir></target><target name="magelocal"><dir name="F500"><dir name="Xibpayments"><dir name="Block"><file name="Form.php" hash="5719ebeb49ead9c4b3cb1eb2d57c11ce"/><file name="Redirect.php" hash="f2b358883720fc6a3aad4f8619e23da9"/></dir><dir name="controllers"><file name="SecureController.php" hash="f85102f655c49adc071245fd2fe094c5"/></dir><dir name="etc"><file name="config.xml" hash="800731f841307a91748a3aace166fad9"/><file name="system.xml" hash="1593f01231ad8e55be3be450c3f19e17"/></dir><dir name="Helper"><file name="Data.php" hash="17114cbeb608042a19d66d5e86f8e93b"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="2dee2d37bd72702b1bd4722a826738c2"/></dir><dir name="System"><file name="Paymentoptions.php" hash="3b923e2a1c7789a4a66493bf451a7757"/><file name="Transactiontype.php" hash="e27e2f39de0640d890d4131bbe3134bc"/></dir><file name="Session.php" hash="ef398da9380a46759c5c846f64a69608"/><file name="Standard.php" hash="95dc88ec5003296817ea90c6441a0443"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="xibpayments"><file name="form.phtml" hash="de55b5c36eeab7eab26f6a99a3f348c3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="F500_Xibpayments.xml" hash="9b1f03cd1dad67cdd48acc178e7f3936"/></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|