Version Notes
Stable release for Magento 1.4
Download this release
Release Info
Developer | Magento Core Team |
Extension | F500_Xibpayments |
Version | 1.0.7 |
Comparing to | |
See all releases |
Code changes from version 1.0.6 to 1.0.7
- app/code/local/F500/Xibpayments/Block/Form.php +76 -59
- app/code/local/F500/Xibpayments/Block/Redirect.php +41 -41
- app/code/local/F500/Xibpayments/Helper/Data.php +22 -22
- app/code/local/F500/Xibpayments/Model/Session.php +24 -24
- app/code/local/F500/Xibpayments/Model/Standard.php +386 -347
- app/code/local/F500/Xibpayments/Model/System/Paymentoptions.php +34 -34
- app/code/local/F500/Xibpayments/Model/System/Transactiontype.php +29 -29
- app/code/local/F500/Xibpayments/controllers/SecureController.php +112 -137
- app/code/local/F500/Xibpayments/etc/config.xml +134 -134
- app/code/local/F500/Xibpayments/etc/system.xml +231 -231
- app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-install-0.1.0.php +0 -22
- app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-uninstall-0.1.0.php +0 -22
- app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-upgrade-1.0.3-1.0.3.php +0 -24
- app/design/frontend/{default → base}/default/template/xibpayments/form.phtml +74 -70
- app/etc/modules/F500_Xibpayments.xml +1 -1
- package.xml +5 -5
app/code/local/F500/Xibpayments/Block/Form.php
CHANGED
@@ -1,60 +1,77 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
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',
|
27 |
-
'0751' => 'SNS Bank',
|
28 |
-
'0511' => 'Triodos Bank',
|
29 |
-
'-' => '',
|
30 |
-
'0761' => 'ASN Bank',
|
31 |
-
'0771' => 'SNS Regio Bank',
|
32 |
-
);
|
33 |
-
|
34 |
-
protected function _construct()
|
35 |
-
{
|
36 |
-
$this->setTemplate('xibpayments/form.phtml');
|
37 |
-
parent::_construct();
|
38 |
-
}
|
39 |
-
|
40 |
-
public function
|
41 |
-
{
|
42 |
-
return $this->
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
$
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
$
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
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',
|
27 |
+
'0751' => 'SNS Bank',
|
28 |
+
'0511' => 'Triodos Bank',
|
29 |
+
'-' => '',
|
30 |
+
'0761' => 'ASN Bank',
|
31 |
+
'0771' => 'SNS Regio Bank',
|
32 |
+
);
|
33 |
+
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->setTemplate('xibpayments/form.phtml');
|
37 |
+
parent::_construct();
|
38 |
+
}
|
39 |
+
|
40 |
+
public function getInfoInstance()
|
41 |
+
{
|
42 |
+
return $this->getMethod()->getInfoInstance();
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
public function getBanks()
|
47 |
+
{
|
48 |
+
return $this->_banks;
|
49 |
+
}
|
50 |
+
|
51 |
+
public function getEnabledOptions()
|
52 |
+
{
|
53 |
+
$method = $this->getMethod();
|
54 |
+
$options = explode(',',$method->getConfigdata('options'));
|
55 |
+
return $options;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function getOptionTitle( $option )
|
59 |
+
{
|
60 |
+
$method = $this->getMethod();
|
61 |
+
if ( $result = $method->getConfigData('title_' . $option) ) {
|
62 |
+
return $result;
|
63 |
+
}
|
64 |
+
return '';
|
65 |
+
}
|
66 |
+
|
67 |
+
public function getSelectedOption()
|
68 |
+
{
|
69 |
+
return $this->getInfoInstance()->getAdditionalInformation('cardgate_option');
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
public function getSelectedBank()
|
74 |
+
{
|
75 |
+
return $this->getInfoInstance()->getAdditionalInformation('cardgate_bank');
|
76 |
+
}
|
77 |
}
|
app/code/local/F500/Xibpayments/Block/Redirect.php
CHANGED
@@ -1,42 +1,42 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Block_Redirect extends Mage_Core_Block_Abstract
|
20 |
-
{
|
21 |
-
protected function _toHtml()
|
22 |
-
{
|
23 |
-
$standard = Mage::getModel('xibpayments/standard');
|
24 |
-
|
25 |
-
$form = new Varien_Data_Form();
|
26 |
-
$form->setAction($standard->getXibpaymentsUrl())
|
27 |
-
->setId('xibpayments_checkout')
|
28 |
-
->setName('xibpayments_checkout')
|
29 |
-
->setMethod('POST')
|
30 |
-
->setUseContainer(true);
|
31 |
-
foreach ($standard->getCheckoutFormFields() as $field=>$value) {
|
32 |
-
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
33 |
-
}
|
34 |
-
$html = '<html><body>';
|
35 |
-
$html.= $this->__('You will be redirected to Xib|payments, our payment processor.');
|
36 |
-
$html.= $form->toHtml();
|
37 |
-
$html.= '<script type="text/javascript">document.getElementById("xibpayments_checkout").submit();</script>';
|
38 |
-
$html.= '</body></html>';
|
39 |
-
|
40 |
-
return $html;
|
41 |
-
}
|
42 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Block_Redirect extends Mage_Core_Block_Abstract
|
20 |
+
{
|
21 |
+
protected function _toHtml()
|
22 |
+
{
|
23 |
+
$standard = Mage::getModel('xibpayments/standard');
|
24 |
+
|
25 |
+
$form = new Varien_Data_Form();
|
26 |
+
$form->setAction($standard->getXibpaymentsUrl())
|
27 |
+
->setId('xibpayments_checkout')
|
28 |
+
->setName('xibpayments_checkout')
|
29 |
+
->setMethod('POST')
|
30 |
+
->setUseContainer(true);
|
31 |
+
foreach ($standard->getCheckoutFormFields() as $field=>$value) {
|
32 |
+
$form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
|
33 |
+
}
|
34 |
+
$html = '<html><body>';
|
35 |
+
$html.= $this->__('You will be redirected to Xib|payments, our payment processor.');
|
36 |
+
$html.= $form->toHtml();
|
37 |
+
$html.= '<script type="text/javascript">document.getElementById("xibpayments_checkout").submit();</script>';
|
38 |
+
$html.= '</body></html>';
|
39 |
+
|
40 |
+
return $html;
|
41 |
+
}
|
42 |
}
|
app/code/local/F500/Xibpayments/Helper/Data.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Helper_Data extends Mage_Core_Helper_Abstract
|
20 |
-
{
|
21 |
-
|
22 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Helper_Data extends Mage_Core_Helper_Abstract
|
20 |
+
{
|
21 |
+
|
22 |
+
}
|
app/code/local/F500/Xibpayments/Model/Session.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Model_Session extends Mage_Core_Model_Session_Abstract
|
20 |
-
{
|
21 |
-
public function __construct()
|
22 |
-
{
|
23 |
-
$this->init('xibpayments');
|
24 |
-
}
|
25 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Model_Session extends Mage_Core_Model_Session_Abstract
|
20 |
+
{
|
21 |
+
public function __construct()
|
22 |
+
{
|
23 |
+
$this->init('xibpayments');
|
24 |
+
}
|
25 |
}
|
app/code/local/F500/Xibpayments/Model/Standard.php
CHANGED
@@ -1,347 +1,386 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
20 |
-
{
|
21 |
-
protected $_code = 'xibpayments';
|
22 |
-
protected $_formBlockType = 'xibpayments/form';
|
23 |
-
protected $_allowCurrencyCode = array('EUR','USD');
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Local testing or Live URL
|
27 |
-
*/
|
28 |
-
// protected $_url='http://cardgateplus.loc/secure/';
|
29 |
-
protected $_url='https://gateway.cardgateplus.com/';
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Availability options
|
33 |
-
*/
|
34 |
-
protected $_isGateway = true;
|
35 |
-
protected $_canAuthorize = true;
|
36 |
-
protected $_canCapture = true;
|
37 |
-
protected $_canCapturePartial = false;
|
38 |
-
protected $_canRefund = false;
|
39 |
-
protected $_canVoid = false;
|
40 |
-
protected $_canUseInternal = false;
|
41 |
-
protected $_canUseCheckout = true;
|
42 |
-
protected $_canUseForMultishipping = false;
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
* Get
|
47 |
-
*
|
48 |
-
* @return
|
49 |
-
*/
|
50 |
-
public function
|
51 |
-
{
|
52 |
-
return Mage::getSingleton('
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Get
|
57 |
-
*
|
58 |
-
* @return
|
59 |
-
*/
|
60 |
-
public function
|
61 |
-
{
|
62 |
-
return
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Get current
|
67 |
-
*
|
68 |
-
* @return
|
69 |
-
*/
|
70 |
-
public function
|
71 |
-
{
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
public function
|
101 |
-
{
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
}
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
'
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
$
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
}
|
190 |
-
|
191 |
-
$
|
192 |
-
$
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
$
|
209 |
-
|
210 |
-
$this->debugLog($
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
$
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
$this->
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
$
|
325 |
-
$
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
20 |
+
{
|
21 |
+
protected $_code = 'xibpayments';
|
22 |
+
protected $_formBlockType = 'xibpayments/form';
|
23 |
+
protected $_allowCurrencyCode = array('EUR','USD');
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Local testing or Live URL
|
27 |
+
*/
|
28 |
+
// protected $_url='http://cardgateplus.loc/secure/';
|
29 |
+
protected $_url='https://gateway.cardgateplus.com/';
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Availability options
|
33 |
+
*/
|
34 |
+
protected $_isGateway = true;
|
35 |
+
protected $_canAuthorize = true;
|
36 |
+
protected $_canCapture = true;
|
37 |
+
protected $_canCapturePartial = false;
|
38 |
+
protected $_canRefund = false;
|
39 |
+
protected $_canVoid = false;
|
40 |
+
protected $_canUseInternal = false;
|
41 |
+
protected $_canUseCheckout = true;
|
42 |
+
protected $_canUseForMultishipping = false;
|
43 |
+
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get checkout session namespace
|
47 |
+
*
|
48 |
+
* @return Mage_Checkout_Model_Session
|
49 |
+
*/
|
50 |
+
public function getCheckout()
|
51 |
+
{
|
52 |
+
return Mage::getSingleton('checkout/session');
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get current quote
|
57 |
+
*
|
58 |
+
* @return Mage_Sales_Model_Quote
|
59 |
+
*/
|
60 |
+
public function getQuote()
|
61 |
+
{
|
62 |
+
return $this->getCheckout()->getQuote();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Get current order
|
67 |
+
*
|
68 |
+
* @return Mage_Sales_Model_Order
|
69 |
+
*/
|
70 |
+
public function getOrder()
|
71 |
+
{
|
72 |
+
$order = Mage::getModel('sales/order');
|
73 |
+
$order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
|
74 |
+
return $order;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Retrieve payment method title
|
79 |
+
*
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
public function getTitle()
|
83 |
+
{
|
84 |
+
// we should try to extend this to dynamically add the selected payment option;
|
85 |
+
// for Checkout review AND for invoice purposes;
|
86 |
+
if ( $option = $this->getInfoInstance()->getAdditionalInformation('xibpayments_option') ) {
|
87 |
+
if ( $this->getConfigData('title_' . $option) ) {
|
88 |
+
$option = $this->getConfigData('title_' . $option);
|
89 |
+
} else {
|
90 |
+
$translate = Mage::getSingleton('core/translate');
|
91 |
+
$option = $translate->translate(array($option));
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
return $this->getConfigData('title') . ( $option ? ' [' . $option . ']': '' );
|
96 |
+
}
|
97 |
+
|
98 |
+
|
99 |
+
/* validate the currency code is avaialable to use for xibpayments or not */
|
100 |
+
public function validate()
|
101 |
+
{
|
102 |
+
parent::validate();
|
103 |
+
$currency_code = $this->getQuote()->getBaseCurrencyCode();
|
104 |
+
if (!in_array($currency_code,$this->_allowCurrencyCode)) {
|
105 |
+
$this->debugLog('Unacceptable currency code ('.$currency_code.').');
|
106 |
+
Mage::throwException(Mage::helper('xibpayments')->__('Selected currency code ') . $currency_code . Mage::helper('xibpayments')->__(' is not compatible with Xib|payments'));
|
107 |
+
}
|
108 |
+
return $this;
|
109 |
+
}
|
110 |
+
|
111 |
+
public function getOrderPlaceRedirectUrl()
|
112 |
+
{
|
113 |
+
return Mage::getUrl('xibpayments/secure/redirect', array('_secure' => true));
|
114 |
+
}
|
115 |
+
|
116 |
+
public function isTest()
|
117 |
+
{
|
118 |
+
if ( $this->getConfigData('transaction_type') == 'T' ) {
|
119 |
+
return true;
|
120 |
+
}
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
|
124 |
+
public function isDebug()
|
125 |
+
{
|
126 |
+
if ( $this->getConfigData('transaction_type') == 'D' ) {
|
127 |
+
return true;
|
128 |
+
}
|
129 |
+
return false;
|
130 |
+
}
|
131 |
+
|
132 |
+
public function debugLog($msg) {
|
133 |
+
if ( $this->getConfigData('debug_log') != '' ) {
|
134 |
+
Mage::log($msg,null,$this->getConfigData('debug_log'));
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
public function getCheckoutFormFields()
|
139 |
+
{
|
140 |
+
$order = $this->getOrder();
|
141 |
+
$a = $order->getBillingAddress();
|
142 |
+
|
143 |
+
$info = $order->getPayment();
|
144 |
+
$option = $info->getAdditionalInformation('xibpayments_option');
|
145 |
+
switch ( $option ) {
|
146 |
+
case 'ideal':
|
147 |
+
$suboption = $info->getAdditionalInformation('xibpayments_bank');
|
148 |
+
break;
|
149 |
+
default:
|
150 |
+
$suboption = '';
|
151 |
+
break;
|
152 |
+
}
|
153 |
+
|
154 |
+
//check if site_id and control_url are not empty
|
155 |
+
//getQuoteCurrencyCode
|
156 |
+
$currency_code = $order->getBaseCurrencyCode();
|
157 |
+
$sArr = array(
|
158 |
+
'siteid' => $this->getConfigData('site_id'),
|
159 |
+
'ref' => $order->getIncrementId(),
|
160 |
+
'first_name' => $a->getFirstname(),
|
161 |
+
'last_name' => $a->getLastname(),
|
162 |
+
'email' => $order->getCustomerEmail(),
|
163 |
+
'address' => $a->getStreet(1).( $a->getStreet(2) ? ', '.$a->getStreet(2) : ''),
|
164 |
+
'city' => $a->getCity(),
|
165 |
+
'country_code' => $a->getCountry(),
|
166 |
+
'postal_code' => $a->getPostcode(),
|
167 |
+
'phone_number' => $a->getTelephone(),
|
168 |
+
'currency' => $currency_code
|
169 |
+
);
|
170 |
+
|
171 |
+
if ( $this->isTest() || $this->isDebug() ) {
|
172 |
+
$hash_prefix = 'TEST';
|
173 |
+
|
174 |
+
$sArr = array_merge($sArr, array(
|
175 |
+
'test' => '1'
|
176 |
+
));
|
177 |
+
|
178 |
+
if ( $this->isDebug() ) {
|
179 |
+
$sArr = array_merge($sArr, array(
|
180 |
+
'debug' => '1'
|
181 |
+
));
|
182 |
+
}
|
183 |
+
} else {
|
184 |
+
$hash_prefix = '';
|
185 |
+
$sArr = array_merge($sArr, array(
|
186 |
+
'option' => $option,
|
187 |
+
'suboption' => $suboption,
|
188 |
+
));
|
189 |
+
}
|
190 |
+
|
191 |
+
$grandTotalCents = sprintf('%.0f', $order->getGrandTotal()*100);
|
192 |
+
$sArr = array_merge($sArr, array(
|
193 |
+
'description' => str_replace('%id%',$order->getIncrementId(),$this->getConfigData('order_description')),
|
194 |
+
'amount' => $grandTotalCents,
|
195 |
+
'hash' => md5( $hash_prefix . $this->getConfigData('site_id') . $grandTotalCents . $sArr['ref'] . $this->getConfigData('password_key'))
|
196 |
+
));
|
197 |
+
|
198 |
+
|
199 |
+
$rArr = array();
|
200 |
+
foreach ($sArr as $k=>$v) {
|
201 |
+
/*
|
202 |
+
replacing & char with and. otherwise it will break the post
|
203 |
+
*/
|
204 |
+
$value = str_replace("&","and",$v);
|
205 |
+
$rArr[$k] = $value;
|
206 |
+
}
|
207 |
+
|
208 |
+
$this->debugLog('Sending customer to Xib|payments with values:');
|
209 |
+
$this->debugLog('URL = ' . $this->getXibpaymentsUrl() );
|
210 |
+
$this->debugLog($rArr);
|
211 |
+
|
212 |
+
return $rArr;
|
213 |
+
}
|
214 |
+
|
215 |
+
public function getXibpaymentsUrl()
|
216 |
+
{
|
217 |
+
return $this->_url;
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
public function processCallback()
|
222 |
+
{
|
223 |
+
$id = $this->getCallbackData('ref');
|
224 |
+
$order = Mage::getModel('sales/order');
|
225 |
+
$order->loadByIncrementId($id);
|
226 |
+
|
227 |
+
$this->debugLog($this->getCallbackData());
|
228 |
+
|
229 |
+
/**
|
230 |
+
* 200 Transaction successful
|
231 |
+
* 300 Transaction failed
|
232 |
+
* 301 Transaction failed by fraud check
|
233 |
+
*/
|
234 |
+
|
235 |
+
if (!$order->getId()) {
|
236 |
+
/**
|
237 |
+
* need to have logic when there is no order with the order id from xibpayments?
|
238 |
+
* probably a Mage::Exception?
|
239 |
+
*/
|
240 |
+
$this->debugLog('No OrderID found with ID: ' . $id);
|
241 |
+
|
242 |
+
} else {
|
243 |
+
|
244 |
+
$amountInCents = (string) ($order->getBaseGrandTotal() * 100);
|
245 |
+
$callbackAmount = (string) ($this->getCallbackData('amount'));
|
246 |
+
|
247 |
+
if ( $amountInCents != $callbackAmount ) {
|
248 |
+
|
249 |
+
$this->debugLog('Order amounts do not match. Sent ' . $amountInCents . ', Received: ' . $callbackAmount);
|
250 |
+
|
251 |
+
$order->addStatusToHistory(
|
252 |
+
$order->getStatus(),
|
253 |
+
Mage::helper('xibpayments')->__('Order total amount does not match Xib|payments gross total amount')
|
254 |
+
);
|
255 |
+
$order->save();
|
256 |
+
|
257 |
+
} else {
|
258 |
+
if ($this->getCallbackData('status') == '200') { //success
|
259 |
+
|
260 |
+
if (!$order->canInvoice()) {
|
261 |
+
$this->debugLog('Unable to create invoice');
|
262 |
+
|
263 |
+
//when order cannot create invoice, need to have some logic to take care
|
264 |
+
$order->addStatusToHistory(
|
265 |
+
$order->getStatus(), // keep order status/state
|
266 |
+
Mage::helper('xibpayments')->__('Error in creating an invoice', true),
|
267 |
+
false
|
268 |
+
);
|
269 |
+
} else {
|
270 |
+
if ( Mage::getStoreConfig('payment/xibpayments/order_status_paid_createinvoice') == 1 ) {
|
271 |
+
$this->debugLog('Creating invoice');
|
272 |
+
|
273 |
+
//need to convert from order into invoice
|
274 |
+
$invoice = $order->prepareInvoice();
|
275 |
+
$invoice->register()->capture();
|
276 |
+
|
277 |
+
Mage::getModel('core/resource_transaction')
|
278 |
+
->addObject($invoice)
|
279 |
+
->addObject($invoice->getOrder())
|
280 |
+
->save();
|
281 |
+
|
282 |
+
$invoice->sendEmail();
|
283 |
+
|
284 |
+
$invoice_message = Mage::helper('xibpayments')->__('Invoice #%s created', $invoice->getIncrementId());
|
285 |
+
} else {
|
286 |
+
$this->debugLog('Skip Creating invoice (setting in backend)');
|
287 |
+
|
288 |
+
$invoice_message = Mage::helper('xibpayments')->__('Invoice not created');
|
289 |
+
}
|
290 |
+
}
|
291 |
+
|
292 |
+
$this->debugLog('Status 200 received, saving order');
|
293 |
+
|
294 |
+
$comment = Mage::helper('xibpayments')->__('Xibpayments Customer Information:')
|
295 |
+
. "\n<br>Order Id: " . $this->getCallbackData('ref')
|
296 |
+
. "\n<br>isTest: " . $this->getCallbackData('is_test')
|
297 |
+
. "\n<br>Transaction Id: " . $this->getCallbackData('transactionid')
|
298 |
+
. "\n<br>Status: " . $this->getCallbackData('status')
|
299 |
+
. "\n<br>Payment method: " . $this->getCallbackData('billing_option')
|
300 |
+
. "\n<br>Transaction Cost: " . $this->getCallbackData('transaction_cost') . $this->getCallbackData('transaction_fee')
|
301 |
+
. "\n<br>";
|
302 |
+
|
303 |
+
if ( $this->getCallbackData('customer_firstname') ) {
|
304 |
+
$comment .= "\n<br>Customer Firstname: " .$this->getCallbackData('customer_firstname');
|
305 |
+
}
|
306 |
+
if ( $this->getCallbackData('customer_lastname') ) {
|
307 |
+
$comment .= "\n<br>Customer Lastname: " . $this->getCallbackData('customer_lastname');
|
308 |
+
}
|
309 |
+
if ( $this->getCallbackData('customer_address') ) {
|
310 |
+
$comment .= "\n<br>Customer Address: " . $this->getCallbackData('customer_address');
|
311 |
+
}
|
312 |
+
if ( $this->getCallbackData('customer_city') ) {
|
313 |
+
$comment .= "\n<br>Customer City: " . $this->getCallbackData('customer_city');
|
314 |
+
}
|
315 |
+
if ( $this->getCallbackData('customer_zipcode') ) {
|
316 |
+
$comment .= "\n<br>Customer Zipcode: " . $this->getCallbackData('customer_zipcode');
|
317 |
+
}
|
318 |
+
if ( $this->getCallbackData('customer_countrycode') ) {
|
319 |
+
$comment .= "\n<br>Customer Country: " . $this->getCallbackData('customer_countrycode');
|
320 |
+
}
|
321 |
+
if ( $this->getCallbackData('customer_phonenumber') ) {
|
322 |
+
$comment .= "\n<br>Customer Phone: " . $this->getCallbackData('customer_phonenumber');
|
323 |
+
}
|
324 |
+
if ( $this->getCallbackData('customer_email') ) {
|
325 |
+
$comment .= "\n<br>Customer Email: " . $this->getCallbackData('customer_email');
|
326 |
+
}
|
327 |
+
if ( $this->getCallbackData('customer_ip_address') ) {
|
328 |
+
$comment .= "\n<br>Customer Ip: " . $this->getCallbackData('customer_ip_address');
|
329 |
+
}
|
330 |
+
|
331 |
+
$order->addStatusToHistory(
|
332 |
+
$order->getStatus(),
|
333 |
+
$comment,
|
334 |
+
false
|
335 |
+
)->save();
|
336 |
+
|
337 |
+
|
338 |
+
$order->setState(
|
339 |
+
Mage::getStoreConfig('payment/xibpayments/order_status_paid'),
|
340 |
+
true,
|
341 |
+
$invoice_message,
|
342 |
+
true
|
343 |
+
);
|
344 |
+
|
345 |
+
$order->save();
|
346 |
+
$order->sendNewOrderEmail();
|
347 |
+
$this->debugLog('Finished saving order.');
|
348 |
+
|
349 |
+
} else {
|
350 |
+
|
351 |
+
// Status other than 200 received; this can happen multiple times.
|
352 |
+
// Do not set the order to cancelled here, but wait for the customer
|
353 |
+
// to return to the 'cancel' URL
|
354 |
+
|
355 |
+
$this->debugLog('Status 300 callback received');
|
356 |
+
|
357 |
+
$comment = Mage::helper('xibpayments')->__('Xib|payments Error Received:')
|
358 |
+
. "\n<br>isTest: " . $this->getCallbackData('is_test')
|
359 |
+
. "\n<br>Status: " . $this->getCallbackData('status')
|
360 |
+
. "\n<br>Payment method: " . $this->getCallbackData('billing_option')
|
361 |
+
. "\n<br>Error: " . $this->getCallbackData('errordescription') . '('.$this->getCallbackData('errorcode').')';
|
362 |
+
|
363 |
+
$order->addStatusToHistory(
|
364 |
+
$order->getStatus(),
|
365 |
+
$comment,
|
366 |
+
false
|
367 |
+
)->save();
|
368 |
+
|
369 |
+
}
|
370 |
+
}
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
public function isInitializeNeeded()
|
375 |
+
{
|
376 |
+
return true;
|
377 |
+
}
|
378 |
+
|
379 |
+
public function initialize($paymentAction, $stateObject)
|
380 |
+
{
|
381 |
+
$state = Mage_Sales_Model_Order::STATE_NEW;
|
382 |
+
$stateObject->setState($state);
|
383 |
+
$stateObject->setStatus(Mage::getSingleton('sales/order_config')->getStateDefaultStatus($state));
|
384 |
+
$stateObject->setIsNotified(false);
|
385 |
+
}
|
386 |
+
}
|
app/code/local/F500/Xibpayments/Model/System/Paymentoptions.php
CHANGED
@@ -1,34 +1,34 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Model_System_Paymentoptions
|
20 |
-
{
|
21 |
-
public function toOptionArray()
|
22 |
-
{
|
23 |
-
return array(
|
24 |
-
array('value'=>'', 'label'=>Mage::helper('xibpayments')->__('All')),
|
25 |
-
array('value'=>'creditcard', 'label'=>Mage::helper('xibpayments')->__('creditcard')),
|
26 |
-
array('value'=>'ideal', 'label'=>Mage::helper('xibpayments')->__('ideal')),
|
27 |
-
array('value'=>'paypal', 'label'=>Mage::helper('xibpayments')->__('paypal')),
|
28 |
-
array('value'=>'mistercash', 'label'=>Mage::helper('xibpayments')->__('mistercash')),
|
29 |
-
array('value'=>'giropay', 'label'=>Mage::helper('xibpayments')->__('giropay')),
|
30 |
-
array('value'=>'directebanking', 'label'=>Mage::helper('xibpayments')->__('directebanking')),
|
31 |
-
array('value'=>'webmoney', 'label'=>Mage::helper('xibpayments')->__('webmoney')),
|
32 |
-
);
|
33 |
-
}
|
34 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Model_System_Paymentoptions
|
20 |
+
{
|
21 |
+
public function toOptionArray()
|
22 |
+
{
|
23 |
+
return array(
|
24 |
+
array('value'=>'', 'label'=>Mage::helper('xibpayments')->__('All')),
|
25 |
+
array('value'=>'creditcard', 'label'=>Mage::helper('xibpayments')->__('creditcard')),
|
26 |
+
array('value'=>'ideal', 'label'=>Mage::helper('xibpayments')->__('ideal')),
|
27 |
+
array('value'=>'paypal', 'label'=>Mage::helper('xibpayments')->__('paypal')),
|
28 |
+
array('value'=>'mistercash', 'label'=>Mage::helper('xibpayments')->__('mistercash')),
|
29 |
+
array('value'=>'giropay', 'label'=>Mage::helper('xibpayments')->__('giropay')),
|
30 |
+
array('value'=>'directebanking', 'label'=>Mage::helper('xibpayments')->__('directebanking')),
|
31 |
+
array('value'=>'webmoney', 'label'=>Mage::helper('xibpayments')->__('webmoney')),
|
32 |
+
);
|
33 |
+
}
|
34 |
+
}
|
app/code/local/F500/Xibpayments/Model/System/Transactiontype.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_Model_System_Transactiontype
|
20 |
-
{
|
21 |
-
public function toOptionArray()
|
22 |
-
{
|
23 |
-
return array(
|
24 |
-
array('value'=>'L', 'label'=>Mage::helper('xibpayments')->__('Live')),
|
25 |
-
array('value'=>'T', 'label'=>Mage::helper('xibpayments')->__('Test')),
|
26 |
-
array('value'=>'D', 'label'=>Mage::helper('xibpayments')->__('Debug'))
|
27 |
-
);
|
28 |
-
}
|
29 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_Model_System_Transactiontype
|
20 |
+
{
|
21 |
+
public function toOptionArray()
|
22 |
+
{
|
23 |
+
return array(
|
24 |
+
array('value'=>'L', 'label'=>Mage::helper('xibpayments')->__('Live')),
|
25 |
+
array('value'=>'T', 'label'=>Mage::helper('xibpayments')->__('Test')),
|
26 |
+
array('value'=>'D', 'label'=>Mage::helper('xibpayments')->__('Debug'))
|
27 |
+
);
|
28 |
+
}
|
29 |
+
}
|
app/code/local/F500/Xibpayments/controllers/SecureController.php
CHANGED
@@ -1,137 +1,112 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
class F500_Xibpayments_SecureController extends Mage_Core_Controller_Front_Action
|
20 |
-
{
|
21 |
-
/**
|
22 |
-
* Valid callback IP's
|
23 |
-
*/
|
24 |
-
protected $valid_ips = array(
|
25 |
-
'213.207.89.161',
|
26 |
-
'213.207.89.162',
|
27 |
-
'213.207.89.163',
|
28 |
-
'213.207.89.164',
|
29 |
-
'213.207.89.165',
|
30 |
-
'213.207.89.166',
|
31 |
-
'127.0.0.1'
|
32 |
-
);
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
$
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
|
114 |
-
|
115 |
-
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
116 |
-
}
|
117 |
-
|
118 |
-
/**
|
119 |
-
* Xibpayments Callback: control_url
|
120 |
-
* cannot have any output here
|
121 |
-
*/
|
122 |
-
public function controlAction()
|
123 |
-
{
|
124 |
-
/**
|
125 |
-
* Defend agains callbacks from illegal IP's?
|
126 |
-
*/
|
127 |
-
|
128 |
-
if ( !$this->_request->isPost() || !in_array($this->_request->getServer('REMOTE_ADDR'),$this->valid_ips) ) {
|
129 |
-
|
130 |
-
throw new Zend_Exception('Improper use of xibpayments control url');
|
131 |
-
exit(0);
|
132 |
-
}
|
133 |
-
|
134 |
-
$this->getStandard()->setCallbackData($this->getRequest()->getPost());
|
135 |
-
$this->getStandard()->processCallback();
|
136 |
-
}
|
137 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
class F500_Xibpayments_SecureController extends Mage_Core_Controller_Front_Action
|
20 |
+
{
|
21 |
+
/**
|
22 |
+
* Valid callback IP's
|
23 |
+
*/
|
24 |
+
protected $valid_ips = array(
|
25 |
+
'213.207.89.161',
|
26 |
+
'213.207.89.162',
|
27 |
+
'213.207.89.163',
|
28 |
+
'213.207.89.164',
|
29 |
+
'213.207.89.165',
|
30 |
+
'213.207.89.166',
|
31 |
+
'127.0.0.1'
|
32 |
+
);
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get singleton with Xibpayments standard order transaction information
|
37 |
+
*
|
38 |
+
* @return Mage_Xibpayments_Model_Standard
|
39 |
+
*/
|
40 |
+
public function getStandard()
|
41 |
+
{
|
42 |
+
return Mage::getSingleton('xibpayments/standard');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* When a customer chooses Xibpayments on Checkout/Payment page
|
47 |
+
*
|
48 |
+
*/
|
49 |
+
public function redirectAction()
|
50 |
+
{
|
51 |
+
$session = Mage::getSingleton('checkout/session');
|
52 |
+
$session->setXibpaymentsStandardQuoteId($session->getQuoteId());
|
53 |
+
$this->getResponse()->setBody($this->getLayout()->createBlock('xibpayments/redirect')->toHtml());
|
54 |
+
$session->unsQuoteId();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* When a customer cancel payment from Xibpayments.
|
59 |
+
*/
|
60 |
+
public function cancelAction()
|
61 |
+
{
|
62 |
+
$session = Mage::getSingleton('checkout/session');
|
63 |
+
$session->setQuoteId( $session->getXibpaymentsStandardQuoteId(true) );
|
64 |
+
|
65 |
+
// cancel order
|
66 |
+
if ( $session->getLastRealOrderId() ) {
|
67 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId( $session->getLastRealOrderId() );
|
68 |
+
if ( $order->getId() ) {
|
69 |
+
$order->cancel()->save();
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
//redirect to checkout one page
|
74 |
+
$this->_redirect('checkout/cart');
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Customer returns from Xibpayments
|
79 |
+
* The order information at this point is in POST variables.
|
80 |
+
*/
|
81 |
+
public function successAction()
|
82 |
+
{
|
83 |
+
$session = Mage::getSingleton('checkout/session');
|
84 |
+
$session->setQuoteId($session->getXibpaymentsStandardQuoteId(true));
|
85 |
+
/**
|
86 |
+
* set the quote as inactive after back from Xibpayments
|
87 |
+
*/
|
88 |
+
Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();
|
89 |
+
|
90 |
+
$this->_redirect('checkout/onepage/success', array('_secure'=>true));
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Xibpayments Callback: control_url
|
95 |
+
* cannot have any output here
|
96 |
+
*/
|
97 |
+
public function controlAction()
|
98 |
+
{
|
99 |
+
/**
|
100 |
+
* Defend agains callbacks from illegal IP's?
|
101 |
+
*/
|
102 |
+
|
103 |
+
if ( !$this->_request->isPost() || !in_array($this->_request->getServer('REMOTE_ADDR'),$this->valid_ips) ) {
|
104 |
+
|
105 |
+
throw new Zend_Exception('Improper use of xibpayments control url');
|
106 |
+
exit(0);
|
107 |
+
}
|
108 |
+
|
109 |
+
$this->getStandard()->setCallbackData($this->getRequest()->getPost());
|
110 |
+
$this->getStandard()->processCallback();
|
111 |
+
}
|
112 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/F500/Xibpayments/etc/config.xml
CHANGED
@@ -1,134 +1,134 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* Magento Xib|payments Payment extension
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @category F500
|
14 |
-
* @package F500_Xibpayments
|
15 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
16 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
17 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
-
*/
|
19 |
-
-->
|
20 |
-
<config>
|
21 |
-
<modules>
|
22 |
-
<F500_Xibpayments>
|
23 |
-
<version>1.0.
|
24 |
-
</F500_Xibpayments>
|
25 |
-
</modules>
|
26 |
-
<global>
|
27 |
-
<models>
|
28 |
-
<xibpayments>
|
29 |
-
<class>F500_Xibpayments_Model</class>
|
30 |
-
</xibpayments>
|
31 |
-
</models>
|
32 |
-
<helpers>
|
33 |
-
<xibpayments>
|
34 |
-
<class>F500_Xibpayments_Helper</class>
|
35 |
-
</xibpayments>
|
36 |
-
</helpers>
|
37 |
-
<resources>
|
38 |
-
<xibpayments_setup>
|
39 |
-
<setup>
|
40 |
-
<module>F500_Xibpayments</module>
|
41 |
-
<class>F500_Xibpayments_Model_Mysql4_Setup</class>
|
42 |
-
</setup>
|
43 |
-
<connection>
|
44 |
-
<use>core_setup</use>
|
45 |
-
</connection>
|
46 |
-
</xibpayments_setup>
|
47 |
-
<xibpayments_write>
|
48 |
-
<connection>
|
49 |
-
<use>core_write</use>
|
50 |
-
</connection>
|
51 |
-
</xibpayments_write>
|
52 |
-
<xibpayments_read>
|
53 |
-
<connection>
|
54 |
-
<use>core_read</use>
|
55 |
-
</connection>
|
56 |
-
</xibpayments_read>
|
57 |
-
</resources>
|
58 |
-
<blocks>
|
59 |
-
<xibpayments><class>F500_Xibpayments_Block</class></xibpayments>
|
60 |
-
</blocks>
|
61 |
-
</global>
|
62 |
-
|
63 |
-
<frontend>
|
64 |
-
<secure_url>
|
65 |
-
<xibpayments>/xibpayments</xibpayments>
|
66 |
-
</secure_url>
|
67 |
-
<routers>
|
68 |
-
<xibpayments>
|
69 |
-
<use>standard</use>
|
70 |
-
<args>
|
71 |
-
<module>F500_Xibpayments</module>
|
72 |
-
<frontName>xibpayments</frontName>
|
73 |
-
</args>
|
74 |
-
</xibpayments>
|
75 |
-
</routers>
|
76 |
-
<translate>
|
77 |
-
<modules>
|
78 |
-
<F500_Xibpayments>
|
79 |
-
<files>
|
80 |
-
<default>F500_Xibpayments.csv</default>
|
81 |
-
</files>
|
82 |
-
</F500_Xibpayments>
|
83 |
-
</modules>
|
84 |
-
</translate>
|
85 |
-
</frontend>
|
86 |
-
|
87 |
-
<adminhtml>
|
88 |
-
<translate>
|
89 |
-
<modules>
|
90 |
-
<F500_Xibpayments>
|
91 |
-
<files>
|
92 |
-
<default>F500_Xibpayments.csv</default>
|
93 |
-
</files>
|
94 |
-
</F500_Xibpayments>
|
95 |
-
</modules>
|
96 |
-
</translate>
|
97 |
-
<acl>
|
98 |
-
<resources>
|
99 |
-
<admin>
|
100 |
-
<children>
|
101 |
-
<system>
|
102 |
-
<children>
|
103 |
-
<config>
|
104 |
-
<children>
|
105 |
-
<xibpayments>
|
106 |
-
<title>Xib|payments Section</title>
|
107 |
-
</xibpayments>
|
108 |
-
</children>
|
109 |
-
</config>
|
110 |
-
</children>
|
111 |
-
</system>
|
112 |
-
</children>
|
113 |
-
</admin>
|
114 |
-
</resources>
|
115 |
-
</acl>
|
116 |
-
</adminhtml>
|
117 |
-
|
118 |
-
<default>
|
119 |
-
<payment>
|
120 |
-
<xibpayments>
|
121 |
-
<model>xibpayments/standard</model>
|
122 |
-
<title>Xib|payments System</title>
|
123 |
-
<transaction_type>T</transaction_type>
|
124 |
-
<options></options>
|
125 |
-
<order_status>Pending</order_status>
|
126 |
-
<order_status_paid>Processing</order_status_paid>
|
127 |
-
<order_status_paid_createinvoice>1</order_status_paid_createinvoice>
|
128 |
-
<order_status_failed>Cancelled</order_status_failed>
|
129 |
-
<order_description>order %id%</order_description>
|
130 |
-
<debug_log>xibpayments.log</debug_log>
|
131 |
-
</xibpayments>
|
132 |
-
</payment>
|
133 |
-
</default>
|
134 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento Xib|payments Payment extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @category F500
|
14 |
+
* @package F500_Xibpayments
|
15 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
16 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
+
*/
|
19 |
+
-->
|
20 |
+
<config>
|
21 |
+
<modules>
|
22 |
+
<F500_Xibpayments>
|
23 |
+
<version>1.0.7</version>
|
24 |
+
</F500_Xibpayments>
|
25 |
+
</modules>
|
26 |
+
<global>
|
27 |
+
<models>
|
28 |
+
<xibpayments>
|
29 |
+
<class>F500_Xibpayments_Model</class>
|
30 |
+
</xibpayments>
|
31 |
+
</models>
|
32 |
+
<helpers>
|
33 |
+
<xibpayments>
|
34 |
+
<class>F500_Xibpayments_Helper</class>
|
35 |
+
</xibpayments>
|
36 |
+
</helpers>
|
37 |
+
<resources>
|
38 |
+
<xibpayments_setup>
|
39 |
+
<setup>
|
40 |
+
<module>F500_Xibpayments</module>
|
41 |
+
<class>F500_Xibpayments_Model_Mysql4_Setup</class>
|
42 |
+
</setup>
|
43 |
+
<connection>
|
44 |
+
<use>core_setup</use>
|
45 |
+
</connection>
|
46 |
+
</xibpayments_setup>
|
47 |
+
<xibpayments_write>
|
48 |
+
<connection>
|
49 |
+
<use>core_write</use>
|
50 |
+
</connection>
|
51 |
+
</xibpayments_write>
|
52 |
+
<xibpayments_read>
|
53 |
+
<connection>
|
54 |
+
<use>core_read</use>
|
55 |
+
</connection>
|
56 |
+
</xibpayments_read>
|
57 |
+
</resources>
|
58 |
+
<blocks>
|
59 |
+
<xibpayments><class>F500_Xibpayments_Block</class></xibpayments>
|
60 |
+
</blocks>
|
61 |
+
</global>
|
62 |
+
|
63 |
+
<frontend>
|
64 |
+
<secure_url>
|
65 |
+
<xibpayments>/xibpayments</xibpayments>
|
66 |
+
</secure_url>
|
67 |
+
<routers>
|
68 |
+
<xibpayments>
|
69 |
+
<use>standard</use>
|
70 |
+
<args>
|
71 |
+
<module>F500_Xibpayments</module>
|
72 |
+
<frontName>xibpayments</frontName>
|
73 |
+
</args>
|
74 |
+
</xibpayments>
|
75 |
+
</routers>
|
76 |
+
<translate>
|
77 |
+
<modules>
|
78 |
+
<F500_Xibpayments>
|
79 |
+
<files>
|
80 |
+
<default>F500_Xibpayments.csv</default>
|
81 |
+
</files>
|
82 |
+
</F500_Xibpayments>
|
83 |
+
</modules>
|
84 |
+
</translate>
|
85 |
+
</frontend>
|
86 |
+
|
87 |
+
<adminhtml>
|
88 |
+
<translate>
|
89 |
+
<modules>
|
90 |
+
<F500_Xibpayments>
|
91 |
+
<files>
|
92 |
+
<default>F500_Xibpayments.csv</default>
|
93 |
+
</files>
|
94 |
+
</F500_Xibpayments>
|
95 |
+
</modules>
|
96 |
+
</translate>
|
97 |
+
<acl>
|
98 |
+
<resources>
|
99 |
+
<admin>
|
100 |
+
<children>
|
101 |
+
<system>
|
102 |
+
<children>
|
103 |
+
<config>
|
104 |
+
<children>
|
105 |
+
<xibpayments>
|
106 |
+
<title>Xib|payments Section</title>
|
107 |
+
</xibpayments>
|
108 |
+
</children>
|
109 |
+
</config>
|
110 |
+
</children>
|
111 |
+
</system>
|
112 |
+
</children>
|
113 |
+
</admin>
|
114 |
+
</resources>
|
115 |
+
</acl>
|
116 |
+
</adminhtml>
|
117 |
+
|
118 |
+
<default>
|
119 |
+
<payment>
|
120 |
+
<xibpayments>
|
121 |
+
<model>xibpayments/standard</model>
|
122 |
+
<title>Xib|payments System</title>
|
123 |
+
<transaction_type>T</transaction_type>
|
124 |
+
<options></options>
|
125 |
+
<order_status>Pending</order_status>
|
126 |
+
<order_status_paid>Processing</order_status_paid>
|
127 |
+
<order_status_paid_createinvoice>1</order_status_paid_createinvoice>
|
128 |
+
<order_status_failed>Cancelled</order_status_failed>
|
129 |
+
<order_description>order %id%</order_description>
|
130 |
+
<debug_log>xibpayments.log</debug_log>
|
131 |
+
</xibpayments>
|
132 |
+
</payment>
|
133 |
+
</default>
|
134 |
+
</config>
|
app/code/local/F500/Xibpayments/etc/system.xml
CHANGED
@@ -1,232 +1,232 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!--
|
3 |
-
/**
|
4 |
-
* Magento Xib|payments Payment extension
|
5 |
-
*
|
6 |
-
* NOTICE OF LICENSE
|
7 |
-
*
|
8 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
-
* that is bundled with this package in the file LICENSE.txt.
|
10 |
-
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://opensource.org/licenses/osl-3.0.php
|
12 |
-
*
|
13 |
-
* @category F500
|
14 |
-
* @package F500_Xibpayments
|
15 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
16 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
17 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
-
*/
|
19 |
-
-->
|
20 |
-
<config>
|
21 |
-
<sections>
|
22 |
-
<payment>
|
23 |
-
<groups>
|
24 |
-
<xibpayments translate="label" module="xibpayments">
|
25 |
-
<label>Xib|payments</label>
|
26 |
-
<frontend_type>text</frontend_type>
|
27 |
-
<sort_order>0</sort_order>
|
28 |
-
<show_in_default>1</show_in_default>
|
29 |
-
<show_in_website>1</show_in_website>
|
30 |
-
<show_in_store>1</show_in_store>
|
31 |
-
<fields>
|
32 |
-
<active translate="label">
|
33 |
-
<label>Enabled</label>
|
34 |
-
<frontend_type>select</frontend_type>
|
35 |
-
<comment><![CDATA[<a href="https://www.xibpayments.com/" target="_blank">Apply for an account</a>]]></comment>
|
36 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
37 |
-
<sort_order>1</sort_order>
|
38 |
-
<show_in_default>1</show_in_default>
|
39 |
-
<show_in_website>1</show_in_website>
|
40 |
-
<show_in_store>1</show_in_store>
|
41 |
-
</active>
|
42 |
-
<title translate="label">
|
43 |
-
<label>Title</label>
|
44 |
-
<frontend_type>text</frontend_type>
|
45 |
-
<comment>Text shown in the checkout screen</comment>
|
46 |
-
<sort_order>2</sort_order>
|
47 |
-
<show_in_default>1</show_in_default>
|
48 |
-
<show_in_website>1</show_in_website>
|
49 |
-
<show_in_store>1</show_in_store>
|
50 |
-
</title>
|
51 |
-
<transaction_type translate="label">
|
52 |
-
<label>Modus</label>
|
53 |
-
<frontend_type>select</frontend_type>
|
54 |
-
<comment>Live, Test or Debug mode (debug writes a log, see 'Debug Log' setting below)</comment>
|
55 |
-
<source_model>xibpayments/system_transactiontype</source_model>
|
56 |
-
<sort_order>10</sort_order>
|
57 |
-
<show_in_default>1</show_in_default>
|
58 |
-
<show_in_website>0</show_in_website>
|
59 |
-
<show_in_store>0</show_in_store>
|
60 |
-
</transaction_type>
|
61 |
-
<site_id translate="label">
|
62 |
-
<label>Site Id</label>
|
63 |
-
<frontend_type>text</frontend_type>
|
64 |
-
<comment><![CDATA[Site ID from your account at <a href="https://merchants.xibpayments.com/" target="_blank">Xib|payments</a>]]></comment>
|
65 |
-
<sort_order>11</sort_order>
|
66 |
-
<show_in_default>1</show_in_default>
|
67 |
-
<show_in_website>1</show_in_website>
|
68 |
-
<show_in_store>1</show_in_store>
|
69 |
-
</site_id>
|
70 |
-
<password_key translate="label">
|
71 |
-
<label>Password Key</label>
|
72 |
-
<frontend_type>text</frontend_type>
|
73 |
-
<comment><![CDATA[Password entered in the backend at <a href="https://merchants.xibpayments.com/" target="_blank">Xib|payments</a>]]></comment>
|
74 |
-
<sort_order>12</sort_order>
|
75 |
-
<show_in_default>1</show_in_default>
|
76 |
-
<show_in_website>1</show_in_website>
|
77 |
-
<show_in_store>1</show_in_store>
|
78 |
-
</password_key>
|
79 |
-
<options translate="label">
|
80 |
-
<label>Payment Option</label>
|
81 |
-
<frontend_type>multiselect</frontend_type>
|
82 |
-
<comment>Link directly to a payment option</comment>
|
83 |
-
<source_model>xibpayments/system_paymentoptions</source_model>
|
84 |
-
<sort_order>13</sort_order>
|
85 |
-
<show_in_default>1</show_in_default>
|
86 |
-
<show_in_website>1</show_in_website>
|
87 |
-
<show_in_store>1</show_in_store>
|
88 |
-
</options>
|
89 |
-
<title_creditcard translate="label">
|
90 |
-
<label>Translation creditcard</label>
|
91 |
-
<frontend_type>text</frontend_type>
|
92 |
-
<sort_order>15</sort_order>
|
93 |
-
<show_in_default>1</show_in_default>
|
94 |
-
<show_in_website>1</show_in_website>
|
95 |
-
<show_in_store>1</show_in_store>
|
96 |
-
</title_creditcard>
|
97 |
-
<title_ideal translate="label">
|
98 |
-
<label>Translation ideal</label>
|
99 |
-
<frontend_type>text</frontend_type>
|
100 |
-
<sort_order>16</sort_order>
|
101 |
-
<show_in_default>1</show_in_default>
|
102 |
-
<show_in_website>1</show_in_website>
|
103 |
-
<show_in_store>1</show_in_store>
|
104 |
-
</title_ideal>
|
105 |
-
<title_paypal translate="label">
|
106 |
-
<label>Translation paypal</label>
|
107 |
-
<frontend_type>text</frontend_type>
|
108 |
-
<sort_order>17</sort_order>
|
109 |
-
<show_in_default>1</show_in_default>
|
110 |
-
<show_in_website>1</show_in_website>
|
111 |
-
<show_in_store>1</show_in_store>
|
112 |
-
</title_paypal>
|
113 |
-
<title_mistercash translate="label">
|
114 |
-
<label>Translation mistercash</label>
|
115 |
-
<frontend_type>text</frontend_type>
|
116 |
-
<sort_order>18</sort_order>
|
117 |
-
<show_in_default>1</show_in_default>
|
118 |
-
<show_in_website>1</show_in_website>
|
119 |
-
<show_in_store>1</show_in_store>
|
120 |
-
</title_mistercash>
|
121 |
-
<title_giropay translate="label">
|
122 |
-
<label>Translation giropay</label>
|
123 |
-
<frontend_type>text</frontend_type>
|
124 |
-
<sort_order>19</sort_order>
|
125 |
-
<show_in_default>1</show_in_default>
|
126 |
-
<show_in_website>1</show_in_website>
|
127 |
-
<show_in_store>1</show_in_store>
|
128 |
-
</title_giropay>
|
129 |
-
<title_directebanking translate="label">
|
130 |
-
<label>Translation directebanking</label>
|
131 |
-
<frontend_type>text</frontend_type>
|
132 |
-
<sort_order>20</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 |
-
</title_directebanking>
|
137 |
-
<title_webmoney translate="label">
|
138 |
-
<label>Translation webmoney</label>
|
139 |
-
<frontend_type>text</frontend_type>
|
140 |
-
<comment><![CDATA[Descriptions to show the customer in the checkout screen. Leave empty for default names.]]></comment>
|
141 |
-
<sort_order>21</sort_order>
|
142 |
-
<show_in_default>1</show_in_default>
|
143 |
-
<show_in_website>1</show_in_website>
|
144 |
-
<show_in_store>1</show_in_store>
|
145 |
-
</title_webmoney>
|
146 |
-
<order_description translate="label">
|
147 |
-
<label>Order description</label>
|
148 |
-
<frontend_type>text</frontend_type>
|
149 |
-
<comment><![CDATA[Description to show the customer in the Xibpayments screen. Variables:<br /><b>%id%</b> = Order ID]]></comment>
|
150 |
-
<sort_order>30</sort_order>
|
151 |
-
<show_in_default>1</show_in_default>
|
152 |
-
<show_in_website>1</show_in_website>
|
153 |
-
<show_in_store>1</show_in_store>
|
154 |
-
</order_description>
|
155 |
-
<order_status translate="label">
|
156 |
-
<label>New order status</label>
|
157 |
-
<frontend_type>select</frontend_type>
|
158 |
-
<source_model>adminhtml/system_config_source_order_status</source_model>
|
159 |
-
<sort_order>31</sort_order>
|
160 |
-
<show_in_default>1</show_in_default>
|
161 |
-
<show_in_website>0</show_in_website>
|
162 |
-
<show_in_store>0</show_in_store>
|
163 |
-
</order_status>
|
164 |
-
<order_status_paid translate="label">
|
165 |
-
<label>Paid order status</label>
|
166 |
-
<frontend_type>select</frontend_type>
|
167 |
-
<source_model>adminhtml/system_config_source_order_status</source_model>
|
168 |
-
<sort_order>32</sort_order>
|
169 |
-
<show_in_default>1</show_in_default>
|
170 |
-
<show_in_website>0</show_in_website>
|
171 |
-
<show_in_store>0</show_in_store>
|
172 |
-
</order_status_paid>
|
173 |
-
<order_status_paid_createinvoice translate="label">
|
174 |
-
<label>Automatically create invoice</label>
|
175 |
-
<frontend_type>select</frontend_type>
|
176 |
-
<comment>If set to no, the module does NOT create an invoice automatically when payment is received.</comment>
|
177 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
178 |
-
<sort_order>33</sort_order>
|
179 |
-
<show_in_default>1</show_in_default>
|
180 |
-
<show_in_website>0</show_in_website>
|
181 |
-
<show_in_store>0</show_in_store>
|
182 |
-
</order_status_paid_createinvoice>
|
183 |
-
<order_status_failed translate="label">
|
184 |
-
<label>Failed order status</label>
|
185 |
-
<frontend_type>select</frontend_type>
|
186 |
-
<source_model>adminhtml/system_config_source_order_status</source_model>
|
187 |
-
<sort_order>34</sort_order>
|
188 |
-
<show_in_default>1</show_in_default>
|
189 |
-
<show_in_website>0</show_in_website>
|
190 |
-
<show_in_store>0</show_in_store>
|
191 |
-
</order_status_failed>
|
192 |
-
<allowspecific translate="label">
|
193 |
-
<label>Payment from applicable countries</label>
|
194 |
-
<frontend_type>allowspecific</frontend_type>
|
195 |
-
<sort_order>50</sort_order>
|
196 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
197 |
-
<show_in_default>1</show_in_default>
|
198 |
-
<show_in_website>1</show_in_website>
|
199 |
-
<show_in_store>1</show_in_store>
|
200 |
-
</allowspecific>
|
201 |
-
<specificcountry translate="label">
|
202 |
-
<label>Payment from Specific countries</label>
|
203 |
-
<frontend_type>multiselect</frontend_type>
|
204 |
-
<sort_order>51</sort_order>
|
205 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
206 |
-
<show_in_default>1</show_in_default>
|
207 |
-
<show_in_website>1</show_in_website>
|
208 |
-
<show_in_store>1</show_in_store>
|
209 |
-
</specificcountry>
|
210 |
-
<sort_order translate="label">
|
211 |
-
<label>Sort order</label>
|
212 |
-
<frontend_type>text</frontend_type>
|
213 |
-
<sort_order>100</sort_order>
|
214 |
-
<show_in_default>1</show_in_default>
|
215 |
-
<show_in_website>1</show_in_website>
|
216 |
-
<show_in_store>1</show_in_store>
|
217 |
-
</sort_order>
|
218 |
-
<debug_log translate="label">
|
219 |
-
<label>Debug Log</label>
|
220 |
-
<comment>Log name for debug logging (written in /var/log). Enable System/Developer/Log for this to work.</comment>
|
221 |
-
<frontend_type>text</frontend_type>
|
222 |
-
<sort_order>101</sort_order>
|
223 |
-
<show_in_default>1</show_in_default>
|
224 |
-
<show_in_website>0</show_in_website>
|
225 |
-
<show_in_store>0</show_in_store>
|
226 |
-
</debug_log>
|
227 |
-
</fields>
|
228 |
-
</xibpayments>
|
229 |
-
</groups>
|
230 |
-
</payment>
|
231 |
-
</sections>
|
232 |
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Magento Xib|payments Payment extension
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* @category F500
|
14 |
+
* @package F500_Xibpayments
|
15 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
16 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
17 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
18 |
+
*/
|
19 |
+
-->
|
20 |
+
<config>
|
21 |
+
<sections>
|
22 |
+
<payment>
|
23 |
+
<groups>
|
24 |
+
<xibpayments translate="label" module="xibpayments">
|
25 |
+
<label>Xib|payments</label>
|
26 |
+
<frontend_type>text</frontend_type>
|
27 |
+
<sort_order>0</sort_order>
|
28 |
+
<show_in_default>1</show_in_default>
|
29 |
+
<show_in_website>1</show_in_website>
|
30 |
+
<show_in_store>1</show_in_store>
|
31 |
+
<fields>
|
32 |
+
<active translate="label">
|
33 |
+
<label>Enabled</label>
|
34 |
+
<frontend_type>select</frontend_type>
|
35 |
+
<comment><![CDATA[<a href="https://www.xibpayments.com/" target="_blank">Apply for an account</a>]]></comment>
|
36 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
37 |
+
<sort_order>1</sort_order>
|
38 |
+
<show_in_default>1</show_in_default>
|
39 |
+
<show_in_website>1</show_in_website>
|
40 |
+
<show_in_store>1</show_in_store>
|
41 |
+
</active>
|
42 |
+
<title translate="label">
|
43 |
+
<label>Title</label>
|
44 |
+
<frontend_type>text</frontend_type>
|
45 |
+
<comment>Text shown in the checkout screen</comment>
|
46 |
+
<sort_order>2</sort_order>
|
47 |
+
<show_in_default>1</show_in_default>
|
48 |
+
<show_in_website>1</show_in_website>
|
49 |
+
<show_in_store>1</show_in_store>
|
50 |
+
</title>
|
51 |
+
<transaction_type translate="label">
|
52 |
+
<label>Modus</label>
|
53 |
+
<frontend_type>select</frontend_type>
|
54 |
+
<comment>Live, Test or Debug mode (debug writes a log, see 'Debug Log' setting below)</comment>
|
55 |
+
<source_model>xibpayments/system_transactiontype</source_model>
|
56 |
+
<sort_order>10</sort_order>
|
57 |
+
<show_in_default>1</show_in_default>
|
58 |
+
<show_in_website>0</show_in_website>
|
59 |
+
<show_in_store>0</show_in_store>
|
60 |
+
</transaction_type>
|
61 |
+
<site_id translate="label">
|
62 |
+
<label>Site Id</label>
|
63 |
+
<frontend_type>text</frontend_type>
|
64 |
+
<comment><![CDATA[Site ID from your account at <a href="https://merchants.xibpayments.com/" target="_blank">Xib|payments</a>]]></comment>
|
65 |
+
<sort_order>11</sort_order>
|
66 |
+
<show_in_default>1</show_in_default>
|
67 |
+
<show_in_website>1</show_in_website>
|
68 |
+
<show_in_store>1</show_in_store>
|
69 |
+
</site_id>
|
70 |
+
<password_key translate="label">
|
71 |
+
<label>Password Key</label>
|
72 |
+
<frontend_type>text</frontend_type>
|
73 |
+
<comment><![CDATA[Password entered in the backend at <a href="https://merchants.xibpayments.com/" target="_blank">Xib|payments</a>]]></comment>
|
74 |
+
<sort_order>12</sort_order>
|
75 |
+
<show_in_default>1</show_in_default>
|
76 |
+
<show_in_website>1</show_in_website>
|
77 |
+
<show_in_store>1</show_in_store>
|
78 |
+
</password_key>
|
79 |
+
<options translate="label">
|
80 |
+
<label>Payment Option</label>
|
81 |
+
<frontend_type>multiselect</frontend_type>
|
82 |
+
<comment>Link directly to a payment option</comment>
|
83 |
+
<source_model>xibpayments/system_paymentoptions</source_model>
|
84 |
+
<sort_order>13</sort_order>
|
85 |
+
<show_in_default>1</show_in_default>
|
86 |
+
<show_in_website>1</show_in_website>
|
87 |
+
<show_in_store>1</show_in_store>
|
88 |
+
</options>
|
89 |
+
<title_creditcard translate="label">
|
90 |
+
<label>Translation creditcard</label>
|
91 |
+
<frontend_type>text</frontend_type>
|
92 |
+
<sort_order>15</sort_order>
|
93 |
+
<show_in_default>1</show_in_default>
|
94 |
+
<show_in_website>1</show_in_website>
|
95 |
+
<show_in_store>1</show_in_store>
|
96 |
+
</title_creditcard>
|
97 |
+
<title_ideal translate="label">
|
98 |
+
<label>Translation ideal</label>
|
99 |
+
<frontend_type>text</frontend_type>
|
100 |
+
<sort_order>16</sort_order>
|
101 |
+
<show_in_default>1</show_in_default>
|
102 |
+
<show_in_website>1</show_in_website>
|
103 |
+
<show_in_store>1</show_in_store>
|
104 |
+
</title_ideal>
|
105 |
+
<title_paypal translate="label">
|
106 |
+
<label>Translation paypal</label>
|
107 |
+
<frontend_type>text</frontend_type>
|
108 |
+
<sort_order>17</sort_order>
|
109 |
+
<show_in_default>1</show_in_default>
|
110 |
+
<show_in_website>1</show_in_website>
|
111 |
+
<show_in_store>1</show_in_store>
|
112 |
+
</title_paypal>
|
113 |
+
<title_mistercash translate="label">
|
114 |
+
<label>Translation mistercash</label>
|
115 |
+
<frontend_type>text</frontend_type>
|
116 |
+
<sort_order>18</sort_order>
|
117 |
+
<show_in_default>1</show_in_default>
|
118 |
+
<show_in_website>1</show_in_website>
|
119 |
+
<show_in_store>1</show_in_store>
|
120 |
+
</title_mistercash>
|
121 |
+
<title_giropay translate="label">
|
122 |
+
<label>Translation giropay</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>19</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
</title_giropay>
|
129 |
+
<title_directebanking translate="label">
|
130 |
+
<label>Translation directebanking</label>
|
131 |
+
<frontend_type>text</frontend_type>
|
132 |
+
<sort_order>20</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 |
+
</title_directebanking>
|
137 |
+
<title_webmoney translate="label">
|
138 |
+
<label>Translation webmoney</label>
|
139 |
+
<frontend_type>text</frontend_type>
|
140 |
+
<comment><![CDATA[Descriptions to show the customer in the checkout screen. Leave empty for default names.]]></comment>
|
141 |
+
<sort_order>21</sort_order>
|
142 |
+
<show_in_default>1</show_in_default>
|
143 |
+
<show_in_website>1</show_in_website>
|
144 |
+
<show_in_store>1</show_in_store>
|
145 |
+
</title_webmoney>
|
146 |
+
<order_description translate="label">
|
147 |
+
<label>Order description</label>
|
148 |
+
<frontend_type>text</frontend_type>
|
149 |
+
<comment><![CDATA[Description to show the customer in the Xibpayments screen. Variables:<br /><b>%id%</b> = Order ID]]></comment>
|
150 |
+
<sort_order>30</sort_order>
|
151 |
+
<show_in_default>1</show_in_default>
|
152 |
+
<show_in_website>1</show_in_website>
|
153 |
+
<show_in_store>1</show_in_store>
|
154 |
+
</order_description>
|
155 |
+
<order_status translate="label">
|
156 |
+
<label>New order status</label>
|
157 |
+
<frontend_type>select</frontend_type>
|
158 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
159 |
+
<sort_order>31</sort_order>
|
160 |
+
<show_in_default>1</show_in_default>
|
161 |
+
<show_in_website>0</show_in_website>
|
162 |
+
<show_in_store>0</show_in_store>
|
163 |
+
</order_status>
|
164 |
+
<order_status_paid translate="label">
|
165 |
+
<label>Paid order status</label>
|
166 |
+
<frontend_type>select</frontend_type>
|
167 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
168 |
+
<sort_order>32</sort_order>
|
169 |
+
<show_in_default>1</show_in_default>
|
170 |
+
<show_in_website>0</show_in_website>
|
171 |
+
<show_in_store>0</show_in_store>
|
172 |
+
</order_status_paid>
|
173 |
+
<order_status_paid_createinvoice translate="label">
|
174 |
+
<label>Automatically create invoice</label>
|
175 |
+
<frontend_type>select</frontend_type>
|
176 |
+
<comment>If set to no, the module does NOT create an invoice automatically when payment is received.</comment>
|
177 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
178 |
+
<sort_order>33</sort_order>
|
179 |
+
<show_in_default>1</show_in_default>
|
180 |
+
<show_in_website>0</show_in_website>
|
181 |
+
<show_in_store>0</show_in_store>
|
182 |
+
</order_status_paid_createinvoice>
|
183 |
+
<order_status_failed translate="label">
|
184 |
+
<label>Failed order status</label>
|
185 |
+
<frontend_type>select</frontend_type>
|
186 |
+
<source_model>adminhtml/system_config_source_order_status</source_model>
|
187 |
+
<sort_order>34</sort_order>
|
188 |
+
<show_in_default>1</show_in_default>
|
189 |
+
<show_in_website>0</show_in_website>
|
190 |
+
<show_in_store>0</show_in_store>
|
191 |
+
</order_status_failed>
|
192 |
+
<allowspecific translate="label">
|
193 |
+
<label>Payment from applicable countries</label>
|
194 |
+
<frontend_type>allowspecific</frontend_type>
|
195 |
+
<sort_order>50</sort_order>
|
196 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
197 |
+
<show_in_default>1</show_in_default>
|
198 |
+
<show_in_website>1</show_in_website>
|
199 |
+
<show_in_store>1</show_in_store>
|
200 |
+
</allowspecific>
|
201 |
+
<specificcountry translate="label">
|
202 |
+
<label>Payment from Specific countries</label>
|
203 |
+
<frontend_type>multiselect</frontend_type>
|
204 |
+
<sort_order>51</sort_order>
|
205 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
206 |
+
<show_in_default>1</show_in_default>
|
207 |
+
<show_in_website>1</show_in_website>
|
208 |
+
<show_in_store>1</show_in_store>
|
209 |
+
</specificcountry>
|
210 |
+
<sort_order translate="label">
|
211 |
+
<label>Sort order</label>
|
212 |
+
<frontend_type>text</frontend_type>
|
213 |
+
<sort_order>100</sort_order>
|
214 |
+
<show_in_default>1</show_in_default>
|
215 |
+
<show_in_website>1</show_in_website>
|
216 |
+
<show_in_store>1</show_in_store>
|
217 |
+
</sort_order>
|
218 |
+
<debug_log translate="label">
|
219 |
+
<label>Debug Log</label>
|
220 |
+
<comment>Log name for debug logging (written in /var/log). Enable System/Developer/Log for this to work.</comment>
|
221 |
+
<frontend_type>text</frontend_type>
|
222 |
+
<sort_order>101</sort_order>
|
223 |
+
<show_in_default>1</show_in_default>
|
224 |
+
<show_in_website>0</show_in_website>
|
225 |
+
<show_in_store>0</show_in_store>
|
226 |
+
</debug_log>
|
227 |
+
</fields>
|
228 |
+
</xibpayments>
|
229 |
+
</groups>
|
230 |
+
</payment>
|
231 |
+
</sections>
|
232 |
</config>
|
app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-install-0.1.0.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
$installer = $this;
|
20 |
-
|
21 |
-
$installer->startSetup();
|
22 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-uninstall-0.1.0.php
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
$installer = $this;
|
20 |
-
|
21 |
-
$installer->startSetup();
|
22 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/F500/Xibpayments/sql/xibpayments_setup/mysql4-upgrade-1.0.3-1.0.3.php
DELETED
@@ -1,24 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Cardgate Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Cardgate
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
$installer = $this;
|
20 |
-
|
21 |
-
$installer->startSetup();
|
22 |
-
$installer->addAttribute('quote_payment', 'xibpayments_option', array());
|
23 |
-
$installer->addAttribute('quote_payment', 'xibpayments_bank', array());
|
24 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/{default → base}/default/template/xibpayments/form.phtml
RENAMED
@@ -1,70 +1,74 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento Xib|payments Payment extension
|
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 |
-
*
|
12 |
-
* @category F500
|
13 |
-
* @package F500_Xibpayments
|
14 |
-
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
-
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
-
*/
|
18 |
-
|
19 |
-
$banks = $this->getBanks();
|
20 |
-
$_code = $this->getMethodCode();
|
21 |
-
|
22 |
-
|
23 |
-
$options = $this->getEnabledOptions();
|
24 |
-
|
25 |
-
$selected_option = $this->
|
26 |
-
$selected_bank = $this->
|
27 |
-
|
28 |
-
if ( in_array('', $options) ) {
|
29 |
-
?>
|
30 |
-
<fieldset class="form-list">
|
31 |
-
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
32 |
-
<li>
|
33 |
-
<?php echo $this->__('You will be redirected to Xib|payments, our payment processor, after you place the order.') ?>
|
34 |
-
</li>
|
35 |
-
</ul>
|
36 |
-
</fieldset>
|
37 |
-
<?
|
38 |
-
} else {
|
39 |
-
?>
|
40 |
-
<fieldset class="form-list">
|
41 |
-
<ul id="payment_form_<?php echo $_code ?>">
|
42 |
-
<?php
|
43 |
-
foreach ( $options as $option ) {
|
44 |
-
?>
|
45 |
-
<li>
|
46 |
-
<?php
|
47 |
-
echo '<label onclick="document.getElementById(\'p_method_xibpayments\').checked = true;payment.switchMethod(\'xibpayments\');"><input type="radio" id="p_method_xibpayments_option_'
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento Xib|payments Payment extension
|
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 |
+
*
|
12 |
+
* @category F500
|
13 |
+
* @package F500_Xibpayments
|
14 |
+
* @author Ramon de la Fuente, <ramon@future500.nl>
|
15 |
+
* @copyright Copyright (c) 2009 Future500 BV, the Netherlands
|
16 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
17 |
+
*/
|
18 |
+
|
19 |
+
$banks = $this->getBanks();
|
20 |
+
$_code = $this->getMethodCode();
|
21 |
+
|
22 |
+
|
23 |
+
$options = $this->getEnabledOptions();
|
24 |
+
|
25 |
+
$selected_option = $this->getSelectedOption();
|
26 |
+
$selected_bank = $this->getSelectedBank();
|
27 |
+
|
28 |
+
if ( in_array('', $options) ) {
|
29 |
+
?>
|
30 |
+
<fieldset class="form-list">
|
31 |
+
<ul id="payment_form_<?php echo $_code ?>" style="display:none">
|
32 |
+
<li>
|
33 |
+
<?php echo $this->__('You will be redirected to Xib|payments, our payment processor, after you place the order.') ?>
|
34 |
+
</li>
|
35 |
+
</ul>
|
36 |
+
</fieldset>
|
37 |
+
<?php
|
38 |
+
} else {
|
39 |
+
?>
|
40 |
+
<fieldset class="form-list">
|
41 |
+
<ul id="payment_form_<?php echo $_code ?>">
|
42 |
+
<?php
|
43 |
+
foreach ( $options as $option ) {
|
44 |
+
?>
|
45 |
+
<li>
|
46 |
+
<?php
|
47 |
+
echo '<label onclick="document.getElementById(\'p_method_xibpayments\').checked = true;payment.switchMethod(\'xibpayments\');"><input type="radio" id="p_method_xibpayments_option_'
|
48 |
+
. $option . '" name="payment[additional_information][xibpayments_option]" value="' . $option . '" '
|
49 |
+
. ( ($selected_option == $option)||(count($options)==1) ? 'checked="checked"' : '') . '> '
|
50 |
+
. ( '' !== ($optiontitle = $this->getOptionTitle($option)) ? $optiontitle : $this->__($option)) . '</label>';
|
51 |
+
|
52 |
+
if ( $option == 'ideal' ) {
|
53 |
+
$result = '<select style="margin-left: 10px;" name="payment[additional_information][xibpayments_bank]" onchange="document.getElementById(\'p_method_xibpayments\').checked = true;document.getElementById(\'p_method_xibpayments_option_' . $option . '\').checked = true; payment.switchMethod(\'xibpayments\');">';
|
54 |
+
$result .= '<option value="">' . $this->__('Select your bank') . '</option>';
|
55 |
+
foreach ( $banks as $bankcode => $bankname ) {
|
56 |
+
if ( $bankcode === '-' ) {
|
57 |
+
$result .= '<option value="">------' . $this->__('Additional banks') . '------</option>';
|
58 |
+
} else {
|
59 |
+
$result .= '<option value="' . $bankcode . '" ' . ( $selected_bank == $bankcode ? 'selected="selected"' : '' ) . '>' . $this->__($bankname) . '</option>';
|
60 |
+
}
|
61 |
+
}
|
62 |
+
$result .= '</select>';
|
63 |
+
echo $result;
|
64 |
+
}
|
65 |
+
?>
|
66 |
+
</li>
|
67 |
+
<?php
|
68 |
+
}
|
69 |
+
?>
|
70 |
+
</ul>
|
71 |
+
</fieldset>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
?>
|
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.7</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>
|
@@ -10,11 +10,11 @@
|
|
10 |
<description>Module for connecting to the Xib|payment System.
|
11 |
|
12 |
Apply for an account at info@xibpayments.com</description>
|
13 |
-
<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.7</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>
|
10 |
<description>Module for connecting to the Xib|payment System.
|
11 |
|
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-07-30</date>
|
16 |
+
<time>10:21:58</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="3ecbd61151eb1ec285c4c0b10d6eb698"/><file name="Redirect.php" hash="f2b358883720fc6a3aad4f8619e23da9"/></dir><dir name="controllers"><file name="SecureController.php" hash="84fd69d93d5f0f0c0bb68cbeff4837b7"/></dir><dir name="etc"><file name="config.xml" hash="b96c00263a19f3dbfc79c9dfba77d31b"/><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="abd34938bccac9f5265b7436ddb7ff3e"/></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies/>
|
20 |
</package>
|