test_22 - Version 1.0.5

Version Notes

Stable

Download this release

Release Info

Developer Sasha
Extension test_22
Version 1.0.5
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.5

app/code/community/Phoenix/BankPayment/Block/Adminhtml/BankAccount.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Phoenix
16
+ * @package Phoenix_BankPayment
17
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
+ */
19
+
20
+ class Phoenix_BankPayment_Block_Adminhtml_BankAccount extends Mage_Adminhtml_Block_System_Config_Form_Field
21
+ {
22
+ protected $_addRowButtonHtml = array();
23
+ protected $_removeRowButtonHtml = array();
24
+
25
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
26
+ {
27
+ $this->setElement($element);
28
+
29
+ $html = '<div id="bank_account_template" style="display:none">';
30
+ $html .= $this->_getRowTemplateHtml();
31
+ $html .= '</div>';
32
+
33
+ $html .= '<ul id="bank_account_container">';
34
+ if ($this->_getValue('account_holder')) {
35
+ foreach ($this->_getValue('account_holder') as $i=>$f) {
36
+ if ($i) {
37
+ $html .= $this->_getRowTemplateHtml($i);
38
+ }
39
+ }
40
+ }
41
+ $html .= '</ul>';
42
+ $html .= $this->_getAddRowButtonHtml('bank_account_container',
43
+ 'bank_account_template', $this->__('Add Bank Account'));
44
+
45
+ return $html;
46
+ }
47
+
48
+ protected function _getRowTemplateHtml($i=0)
49
+ {
50
+ $html = '<li><fieldset>';
51
+ $html .= '<label>'.$this->__('Account holder').'</label>';
52
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[account_holder][]" value="' . $this->_getValue('account_holder/'.$i) . '" '.$this->_getDisabled().' />';
53
+ $html .= '<label>'.$this->__('Account number').'</label>';
54
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[account_number][]" value="' . $this->_getValue('account_number/'.$i) . '" '.$this->_getDisabled().' />';
55
+ $html .= '<label>'.$this->__('Sort code').'</label>';
56
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[sort_code][]" value="' . $this->_getValue('sort_code/'.$i) . '" '.$this->_getDisabled().' />';
57
+ $html .= '<label>'.$this->__('Bank name').'</label>';
58
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[bank_name][]" value="' . $this->_getValue('bank_name/'.$i) . '" '.$this->_getDisabled().' />';
59
+ $html .= '<label>'.$this->__('IBAN').'</label>';
60
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[iban][]" value="' . $this->_getValue('iban/'.$i) . '" '.$this->_getDisabled().' />';
61
+ $html .= '<label>'.$this->__('BIC').'</label>';
62
+ $html .= '<input class="input-text" type="text" name="'.$this->getElement()->getName().'[bic][]" value="' . $this->_getValue('bic/'.$i) . '" '.$this->_getDisabled().' />';
63
+ $html .= '<br />&nbsp;<br />';
64
+ $html .= $this->_getRemoveRowButtonHtml();
65
+ $html .= '</fieldset></li>';
66
+
67
+ return $html;
68
+ }
69
+
70
+ protected function _getDisabled()
71
+ {
72
+ return $this->getElement()->getDisabled() ? ' disabled' : '';
73
+ }
74
+
75
+ protected function _getValue($key)
76
+ {
77
+ return $this->getElement()->getData('value/'.$key);
78
+ }
79
+
80
+ protected function _getSelected($key, $value)
81
+ {
82
+ return $this->getElement()->getData('value/'.$key)==$value ? 'selected="selected"' : '';
83
+ }
84
+
85
+ protected function _getAddRowButtonHtml($container, $template, $title='Add')
86
+ {
87
+ if (!isset($this->_addRowButtonHtml[$container])) {
88
+ $this->_addRowButtonHtml[$container] = $this->getLayout()->createBlock('adminhtml/widget_button')
89
+ ->setType('button')
90
+ ->setClass('add '.$this->_getDisabled())
91
+ ->setLabel($this->__($title))
92
+ ->setOnClick("Element.insert($('".$container."'), {bottom: $('".$template."').innerHTML})")
93
+ ->setDisabled($this->_getDisabled())
94
+ ->toHtml();
95
+ }
96
+ return $this->_addRowButtonHtml[$container];
97
+ }
98
+
99
+ protected function _getRemoveRowButtonHtml($selector='li', $title='Delete Account')
100
+ {
101
+ if (!$this->_removeRowButtonHtml) {
102
+ $this->_removeRowButtonHtml = $this->getLayout()->createBlock('adminhtml/widget_button')
103
+ ->setType('button')
104
+ ->setClass('delete v-middle '.$this->_getDisabled())
105
+ ->setLabel($this->__($title))
106
+ ->setOnClick("Element.remove($(this).up('".$selector."'))")
107
+ ->setDisabled($this->_getDisabled())
108
+ ->toHtml();
109
+ }
110
+ return $this->_removeRowButtonHtml;
111
+ }
112
+ }
app/code/community/Phoenix/BankPayment/Block/Form.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Phoenix_BankPayment
14
+ * @copyright Copyright (c) 2008 Andrej Sinicyn
15
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ class Phoenix_BankPayment_Block_Form extends Mage_Payment_Block_Form
20
+ {
21
+ protected function _construct()
22
+ {
23
+ parent::_construct();
24
+ $this->setTemplate('bankpayment/form.phtml');
25
+ }
26
+
27
+ public function getCustomFormBlockType()
28
+ {
29
+ return $this->getMethod()->getConfigData('form_block_type');
30
+ }
31
+
32
+ public function getFormCmsUrl()
33
+ {
34
+ $pageUrl = null;
35
+ $pageCode = $this->getMethod()->getConfigData('form_cms_page');
36
+ if (!empty($pageCode)) {
37
+ if ($pageId = Mage::getModel('cms/page')->checkIdentifier($pageCode, Mage::app()->getStore()->getId())) {
38
+ $pageUrl = Mage::helper('cms/page')->getPageUrl($pageId);
39
+ }
40
+ }
41
+ return $pageUrl;
42
+ }
43
+
44
+ public function getAccounts()
45
+ {
46
+ return $this->getMethod()->getAccounts();
47
+ }
48
+
49
+ public function getCustomText($addNl2Br = true)
50
+ {
51
+ return $this->getMethod()->getCustomText($addNl2Br);
52
+ }
53
+ }
app/code/community/Phoenix/BankPayment/Block/Info.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Phoenix_BankPayment
14
+ * @copyright Copyright (c)0 2008 Andrej Sinicyn
15
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+
20
+ class Phoenix_BankPayment_Block_Info extends Mage_Payment_Block_Info
21
+ {
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('bankpayment/info.phtml');
26
+ }
27
+
28
+ public function toPdf()
29
+ {
30
+ $this->setTemplate('bankpayment/pdf/info.phtml');
31
+ return $this->toHtml();
32
+ }
33
+
34
+ public function getAccounts() {
35
+ return $this->getMethod()->getAccounts();
36
+ }
37
+
38
+ public function getShowBankAccountsInPdf() {
39
+ return $this->getMethod()->getConfigData('show_bank_accounts_in_pdf');
40
+ }
41
+
42
+ public function getShowCustomTextInPdf() {
43
+ return $this->getMethod()->getConfigData('show_customtext_in_pdf');
44
+ }
45
+ }
app/code/community/Phoenix/BankPayment/Helper/Data.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Phoenix
16
+ * @package Phoenix_BankPayment
17
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
+ */
19
+
20
+ class Phoenix_BankPayment_Helper_Data extends Mage_Core_Helper_Abstract {
21
+
22
+ }
app/code/community/Phoenix/BankPayment/Model/BankPayment.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Phoenix_BankPayment
14
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
15
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
+ */
17
+
18
+ class Phoenix_BankPayment_Model_BankPayment extends Mage_Payment_Model_Method_Abstract
19
+ {
20
+ /**
21
+ * unique internal payment method identifier
22
+ *
23
+ * @var string [a-z0-9_]
24
+ */
25
+ protected $_code = 'bankpayment';
26
+
27
+ protected $_formBlockType = 'bankpayment/form';
28
+ protected $_infoBlockType = 'bankpayment/info';
29
+ protected $_accounts;
30
+
31
+ /**
32
+ * @deprecated since 0.3.0
33
+ * support BC for old templates
34
+ */
35
+ public function getAccountHolder()
36
+ {
37
+ if ($accounts = $this->getAccounts()) {
38
+ return $accounts[0]->getAccountHolder();
39
+ }
40
+ return null;
41
+ }
42
+
43
+ /**
44
+ * @deprecated since 0.3.0
45
+ * support BC for old templates
46
+ */
47
+ public function getAccountNumber()
48
+ {
49
+ if ($accounts = $this->getAccounts()) {
50
+ return $accounts[0]->getAccountNumber();
51
+ }
52
+ return null;
53
+ }
54
+
55
+ /**
56
+ * @deprecated since 0.3.0
57
+ * support BC for old templates
58
+ */
59
+ public function getSortCode()
60
+ {
61
+ if ($accounts = $this->getAccounts()) {
62
+ return $accounts[0]->getSortCode();
63
+ }
64
+ return null;
65
+ }
66
+
67
+ /**
68
+ * @deprecated since 0.3.0
69
+ * support BC for old templates
70
+ */
71
+ public function getBankName()
72
+ {
73
+ if ($accounts = $this->getAccounts()) {
74
+ return $accounts[0]->getBankName();
75
+ }
76
+ return null;
77
+ }
78
+
79
+ /**
80
+ * @deprecated since 0.3.0
81
+ * support BC for old templates
82
+ */
83
+ public function getIBAN()
84
+ {
85
+ if ($accounts = $this->getAccounts()) {
86
+ return $accounts[0]->getIBAN();
87
+ }
88
+ return null;
89
+ }
90
+
91
+ /**
92
+ * @deprecated since 0.3.0
93
+ * support BC for old templates
94
+ */
95
+ public function getBIC()
96
+ {
97
+ if ($accounts = $this->getAccounts()) {
98
+ return $accounts[0]->getBIC();
99
+ }
100
+ return null;
101
+ }
102
+
103
+ public function getPayWithinXDays()
104
+ {
105
+ return $this->getConfigData('paywithinxdays');
106
+ }
107
+
108
+ public function getCustomText($addNl2Br = true)
109
+ {
110
+ $customText = $this->getConfigData('customtext');
111
+ if ($addNl2Br) {
112
+ $customText = nl2br($customText);
113
+ }
114
+ return $customText;
115
+ }
116
+
117
+ public function getAccounts()
118
+ {
119
+ if (!$this->_accounts) {
120
+ $paymentInfo = $this->getInfoInstance();
121
+ if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
122
+ $storeId = $paymentInfo->getOrder()->getStoreId();
123
+ } else {
124
+ $storeId = $paymentInfo->getQuote()->getStoreId();
125
+ }
126
+
127
+ $currentOrder = Mage::registry('current_order');
128
+ $storeId = $currentOrder ? $currentOrder->getStoreId() : null;
129
+ $accounts = unserialize(Mage::getStoreConfig('payment/bankpayment/bank_accounts',$storeId));
130
+
131
+ $this->_accounts = array();
132
+ $fields = is_array($accounts) ? array_keys($accounts) : null;
133
+ if (!empty($fields)) {
134
+ foreach ($accounts[$fields[0]] as $i => $k) {
135
+ if ($k) {
136
+ $account = new Varien_Object();
137
+ foreach ($fields as $field) {
138
+ $account->setData($field,$accounts[$field][$i]);
139
+ }
140
+ $this->_accounts[] = $account;
141
+ }
142
+ }
143
+ }
144
+ }
145
+ return $this->_accounts;
146
+ }
147
+ }
app/code/community/Phoenix/BankPayment/Model/Source/CmsPage.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Mage
12
+ * @package Phoenix_BankPayment
13
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+ class Phoenix_BankPayment_Model_Source_CmsPage extends Mage_Adminhtml_Model_System_Config_Source_Cms_Page
17
+ {
18
+ public function toOptionArray()
19
+ {
20
+ if (!$this->_options) {
21
+ parent::toOptionArray();
22
+ array_unshift($this->_options, array(
23
+ 'value' => '',
24
+ 'label' => Mage::helper('core')->__('-- Please Select --'))
25
+ );
26
+ }
27
+ return $this->_options;
28
+ }
29
+ }
app/code/community/Phoenix/BankPayment/Model/Source/Order/Status.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Mage
12
+ * @package Phoenix_BankPayment
13
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+
17
+ class Phoenix_BankPayment_Model_Source_Order_Status extends Mage_Adminhtml_Model_System_Config_Source_Order_Status
18
+ {
19
+ public function __construct()
20
+ {
21
+ if (version_compare(Mage::getVersion(), '1.4.0', '>=')) {
22
+ $this->_stateStatuses[] = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
23
+ }
24
+ return $this;
25
+ }
26
+
27
+ }
app/code/community/Phoenix/BankPayment/Model/Source/PaymentFormBlockType.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
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
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Phoenix
16
+ * @package Phoenix_BankPayment
17
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
+ */
19
+
20
+ class Phoenix_BankPayment_Model_Source_PaymentFormBlockType
21
+ {
22
+
23
+ protected $_options;
24
+
25
+ public function toOptionArray()
26
+ {
27
+ if (!$this->_options) {
28
+ $this->_options = array(
29
+ array(
30
+ 'value' => Phoenix_BankPayment_Model_BankPayment::FORM_BLOCK_TYPE_DEFAULT,
31
+ 'label' => Mage::helper('bankpayment')->__('Show account information in form'),
32
+ ),
33
+ array(
34
+ 'value' => Phoenix_BankPayment_Model_BankPayment::FORM_BLOCK_TYPE_CMS,
35
+ 'label' => Mage::helper('bankpayment')->__('Link to CMS page'),
36
+ )
37
+ );
38
+ }
39
+ return $this->_options;
40
+ }
41
+ }
app/code/community/Phoenix/BankPayment/etc/config.xml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Phoenix_BankPayment>
5
+ <version>1.0.0</version>
6
+ </Phoenix_BankPayment>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <bankpayment>
11
+ <class>Phoenix_BankPayment_Model</class>
12
+ </bankpayment>
13
+ </models>
14
+ <resources>
15
+ <bankpayment_setup>
16
+ <setup>
17
+ <module>Phoenix_BankPayment</module>
18
+ <class>Mage_Eav_Model_Entity_Setup</class>
19
+ </setup>
20
+ <connection>
21
+ <use>core_setup</use>
22
+ </connection>
23
+ </bankpayment_setup>
24
+ <bankpayment_write>
25
+ <use>core_write</use>
26
+ </bankpayment_write>
27
+ <bankpayment_read>
28
+ <use>core_read</use>
29
+ </bankpayment_read>
30
+ </resources>
31
+ <blocks>
32
+ <bankpayment>
33
+ <class>Phoenix_BankPayment_Block</class>
34
+ </bankpayment>
35
+ </blocks>
36
+ <helpers>
37
+ <bankpayment>
38
+ <class>Phoenix_BankPayment_Helper</class>
39
+ </bankpayment>
40
+ </helpers>
41
+ </global>
42
+ <default>
43
+ <payment>
44
+ <bankpayment>
45
+ <active>0</active>
46
+ <model>bankpayment/bankPayment</model>
47
+ <order_status>1</order_status>
48
+ <title>Bank Prepayment</title>
49
+ <allowspecific>0</allowspecific>
50
+ <form_block_type>0</form_block_type>
51
+ </bankpayment>
52
+ </payment>
53
+ </default>
54
+ <adminhtml>
55
+ <translate>
56
+ <modules>
57
+ <Phoenix_BankPayment>
58
+ <files>
59
+ <default>Phoenix_BankPayment.csv</default>
60
+ </files>
61
+ </Phoenix_BankPayment>
62
+ </modules>
63
+ </translate>
64
+ </adminhtml>
65
+ <frontend>
66
+ <translate>
67
+ <modules>
68
+ <Phoenix_BankPayment>
69
+ <files>
70
+ <default>Phoenix_BankPayment.csv</default>
71
+ </files>
72
+ </Phoenix_BankPayment>
73
+ </modules>
74
+ </translate>
75
+ </frontend>
76
+ <default>
77
+ <payment>
78
+ <bankpayment>
79
+ <title>Vorkasse</title>
80
+ <active>1</active>
81
+ <show_bank_accounts_in_pdf>1</show_bank_accounts_in_pdf>
82
+ <show_customtext_in_pdf>1</show_customtext_in_pdf>
83
+ </bankpayment>
84
+ </payment>
85
+ </default>
86
+ </config>
app/code/community/Phoenix/BankPayment/etc/system.xml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <bankpayment translate="label" module="payment">
7
+ <label>Bank Prepayment</label>
8
+ <frontend_type>text</frontend_type>
9
+ <sort_order>1</sort_order>
10
+ <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
+ <fields>
14
+ <active translate="label">
15
+ <label>Enabled</label>
16
+ <frontend_type>select</frontend_type>
17
+ <source_model>adminhtml/system_config_source_yesno</source_model>
18
+ <sort_order>10</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>1</show_in_store>
22
+ </active>
23
+ <title translate="label">
24
+ <label>Title</label>
25
+ <frontend_type>text</frontend_type>
26
+ <sort_order>20</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ </title>
31
+ <order_status translate="label">
32
+ <label>New order status</label>
33
+ <frontend_type>select</frontend_type>
34
+ <source_model>bankpayment/source_order_status</source_model>
35
+ <sort_order>40</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ </order_status>
40
+ <sort_order translate="label">
41
+ <label>Sort order</label>
42
+ <frontend_type>text</frontend_type>
43
+ <sort_order>50</sort_order>
44
+ <show_in_default>1</show_in_default>
45
+ <show_in_website>1</show_in_website>
46
+ <show_in_store>1</show_in_store>
47
+ </sort_order>
48
+ <allowspecific translate="label">
49
+ <label>Payment from applicable countries</label>
50
+ <frontend_type>allowspecific</frontend_type>
51
+ <sort_order>60</sort_order>
52
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>1</show_in_store>
56
+ </allowspecific>
57
+ <specificcountry translate="label">
58
+ <label>Payment from Specific countries</label>
59
+ <frontend_type>multiselect</frontend_type>
60
+ <sort_order>70</sort_order>
61
+ <source_model>adminhtml/system_config_source_country</source_model>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>1</show_in_store>
65
+ </specificcountry>
66
+ <min_order_total>
67
+ <label>Minimum Order Total</label>
68
+ <frontend_type>text</frontend_type>
69
+ <sort_order>71</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>1</show_in_store>
73
+ </min_order_total>
74
+ <max_order_total>
75
+ <label>Maximum Order Total</label>
76
+ <frontend_type>text</frontend_type>
77
+ <sort_order>72</sort_order>
78
+ <show_in_default>1</show_in_default>
79
+ <show_in_website>1</show_in_website>
80
+ <show_in_store>1</show_in_store>
81
+ </max_order_total>
82
+ <bank_accounts translate="label,comment">
83
+ <label>Bank Accounts</label>
84
+ <frontend_model>bankpayment/adminhtml_bankAccount</frontend_model>
85
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
86
+ <sort_order>80</sort_order>
87
+ <show_in_default>1</show_in_default>
88
+ <show_in_website>1</show_in_website>
89
+ <show_in_store>1</show_in_store>
90
+ <comment>Add your bank accounts data</comment>
91
+ </bank_accounts>
92
+ <show_bank_accounts_in_pdf translate="label">
93
+ <label>Show bank accounts in PDF</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>81</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ </show_bank_accounts_in_pdf>
101
+ <paywithinxdays translate="label">
102
+ <label>Pay within X days</label>
103
+ <frontend_type>text</frontend_type>
104
+ <sort_order>140</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>1</show_in_store>
108
+ </paywithinxdays>
109
+ <customtext translate="label">
110
+ <label>Custom text</label>
111
+ <frontend_type>textarea</frontend_type>
112
+ <sort_order>150</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ </customtext>
117
+ <show_customtext_in_pdf translate="label">
118
+ <label>Show custom text in PDF</label>
119
+ <frontend_type>select</frontend_type>
120
+ <source_model>adminhtml/system_config_source_yesno</source_model>
121
+ <sort_order>151</sort_order>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>1</show_in_website>
124
+ <show_in_store>1</show_in_store>
125
+ </show_customtext_in_pdf>
126
+ <form_cms_page translate="label,comment" module="bankpayment">
127
+ <label>Form CMS Page</label>
128
+ <frontend_type>select</frontend_type>
129
+ <source_model>bankpayment/source_cmsPage</source_model>
130
+ <sort_order>170</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>1</show_in_store>
134
+ <can_be_empty>1</can_be_empty>
135
+ <comment>Choose CMS page to display a link instead of the bank accounts in the payment form</comment>
136
+ </form_cms_page>
137
+ </fields>
138
+ </bankpayment>
139
+ </groups>
140
+ </payment>
141
+ </sections>
142
+ </config>
app/code/community/Phoenix/BankPayment/sql/bankpayment_setup/mysql4-upgrade-0.2.5-0.3.0.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ *
11
+ * @category Mage
12
+ * @package Phoenix_BankPayment
13
+ * @copyright Copyright (c) 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
14
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
15
+ */
16
+ $installer = $this;
17
+
18
+ $installer->startSetup();
19
+
20
+ /**
21
+ * Convert existing bank account data of default configuration scope to config array
22
+ */
23
+ $accountData = array(
24
+ 'account_holder' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/bankaccountholder'")),
25
+ 'account_number' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/bankaccountnumber'")),
26
+ 'sort_code' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/sortcode'")),
27
+ 'iban' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/bankiban'")),
28
+ 'bank_name' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/bankname'")),
29
+ 'bic' => array('', $installer->getConnection()->fetchOne("select value from ".$installer->getTable('core/config_data')." where scope='default' and path='payment/bankpayment/bankbic'"))
30
+ );
31
+ $installer->setConfigData('payment/bankpayment/bank_accounts', serialize($accountData));
32
+
33
+ // remove old account settings
34
+ $installer->deleteConfigData('payment/bankpayment/bankaccountholder');
35
+ $installer->deleteConfigData('payment/bankpayment/bankaccountnumber');
36
+ $installer->deleteConfigData('payment/bankpayment/sortcode');
37
+ $installer->deleteConfigData('payment/bankpayment/bankname');
38
+ $installer->deleteConfigData('payment/bankpayment/bankiban');
39
+ $installer->deleteConfigData('payment/bankpayment/bankbic');
40
+
41
+ $installer->endSetup();
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>test_22</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>gsdrfe</license>
7
  <channel>community</channel>
@@ -11,8 +11,8 @@
11
  <notes>Stable</notes>
12
  <authors><author><name>Sasha</name><user>usatyi</user><email>ousatyi@ebay.com</email></author></authors>
13
  <date>2012-05-07</date>
14
- <time>16:09:15</time>
15
- <contents><target name="magecommunity"><dir><dir name="Social"><dir name="Facebook"><dir name="Block"><file name="Action.php" hash="2a195319b750004552da18e082cb8184"/><dir name="Adminhtml"><file name="Facebuttons.php" hash="d73d32ba2b900e00e9705608b203b502"/><file name="Select.php" hash="036c43ac96033cf26c32e14884b83a6b"/></dir><file name="Box.php" hash="516adc472c9bf244cc4e1bfaa9c72969"/><file name="Head.php" hash="dbb35ead2ed9b6444e552335efd678e4"/><file name="Like.php" hash="3d1eb6c1c4f0e1dafdd1f90bdf54183e"/><file name="Start.php" hash="2e61c7814dc9c7c23d34c1e8ed74c518"/></dir><dir name="Helper"><file name="Data.php" hash="4997be7dfb07b5967ddc3d783c7c3ade"/></dir><dir name="Model"><file name="Api.php" hash="52c453a2fe92e84efbbe63a3eea63d6a"/><file name="Facebook.php" hash="8b6e4f4cecabe9bb247cf28b6bf5b111"/><file name="Facebuttons.php" hash="f15aa66ba13f5977adf09b067f0fa3d9"/><file name="Observer.php" hash="168c3c3a9ae234f7f491bbf654e83d91"/><dir name="Resource"><dir name="Facebook"><file name="Collection.php" hash="7e472319938814bf68d221bb1c40f294"/></dir><file name="Facebook.php" hash="ee24ca1592576f75404e6e99f9f91dd6"/><file name="Setup.php" hash="53e978ad7976c17ea9dab84b65217d79"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="da8bfd193c2cc8087bf2db946504d2b6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a32cfb60ca4d8a576ae086635318c704"/><file name="config.xml" hash="b29ba65fd8f8db796d1d67b4a8d68d01"/><file name="system.xml" hash="5e210bbfaa8e0dab376cc7a9ee52eedb"/></dir><dir name="sql"><dir name="social_facebook_setup"><file name="install-1.6.0.0.php" hash="e9b71dc811c2c510fc25a72beb928dea"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="222c31c400b9632c561f6b147e28f6de"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>test_22</name>
4
+ <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license>gsdrfe</license>
7
  <channel>community</channel>
11
  <notes>Stable</notes>
12
  <authors><author><name>Sasha</name><user>usatyi</user><email>ousatyi@ebay.com</email></author></authors>
13
  <date>2012-05-07</date>
14
+ <time>16:37:42</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Social"><dir name="Facebook"><dir name="Block"><file name="Action.php" hash="2a195319b750004552da18e082cb8184"/><dir name="Adminhtml"><file name="Facebuttons.php" hash="d73d32ba2b900e00e9705608b203b502"/><file name="Select.php" hash="036c43ac96033cf26c32e14884b83a6b"/></dir><file name="Box.php" hash="516adc472c9bf244cc4e1bfaa9c72969"/><file name="Head.php" hash="dbb35ead2ed9b6444e552335efd678e4"/><file name="Like.php" hash="3d1eb6c1c4f0e1dafdd1f90bdf54183e"/><file name="Start.php" hash="2e61c7814dc9c7c23d34c1e8ed74c518"/></dir><dir name="Helper"><file name="Data.php" hash="4997be7dfb07b5967ddc3d783c7c3ade"/></dir><dir name="Model"><file name="Api.php" hash="52c453a2fe92e84efbbe63a3eea63d6a"/><file name="Facebook.php" hash="8b6e4f4cecabe9bb247cf28b6bf5b111"/><file name="Facebuttons.php" hash="f15aa66ba13f5977adf09b067f0fa3d9"/><file name="Observer.php" hash="168c3c3a9ae234f7f491bbf654e83d91"/><dir name="Resource"><dir name="Facebook"><file name="Collection.php" hash="7e472319938814bf68d221bb1c40f294"/></dir><file name="Facebook.php" hash="ee24ca1592576f75404e6e99f9f91dd6"/><file name="Setup.php" hash="53e978ad7976c17ea9dab84b65217d79"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="da8bfd193c2cc8087bf2db946504d2b6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a32cfb60ca4d8a576ae086635318c704"/><file name="config.xml" hash="b29ba65fd8f8db796d1d67b4a8d68d01"/><file name="system.xml" hash="5e210bbfaa8e0dab376cc7a9ee52eedb"/></dir><dir name="sql"><dir name="social_facebook_setup"><file name="install-1.6.0.0.php" hash="e9b71dc811c2c510fc25a72beb928dea"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="222c31c400b9632c561f6b147e28f6de"/></dir></dir></dir></dir><dir name="Phoenix"><dir name="BankPayment"><dir name="Block"><dir name="Adminhtml"><file name="BankAccount.php" hash="1efad32fd1a2015b359c06ed76ab9a8d"/></dir><file name="Form.php" hash="b5279b08c04902a46ab723c49b530f9c"/><file name="Info.php" hash="61b3aae2b2817f60e0c7dba2d34d789c"/></dir><dir name="Helper"><file name="Data.php" hash="f6b06bd3a19f1ba2d323f7e6547e9b77"/></dir><dir name="Model"><file name="BankPayment.php" hash="7cf834c3d9efd74955560c8414e0a8ab"/><dir name="Source"><file name="CmsPage.php" hash="f685066651992f25ed3f8fd2c842959c"/><dir name="Order"><file name="Status.php" hash="244cf40b204a0dbc9d296fe90f0001da"/></dir><file name="PaymentFormBlockType.php" hash="c6b18a547cfd028d4e652f9537ecf935"/></dir></dir><dir name="etc"><file name="config.xml" hash="2137a203bb8d60dfa524d956ebb6b5ee"/><file name="system.xml" hash="2c814b1ae88da52c6d4e31eb7fa69ab7"/></dir><dir name="sql"><dir name="bankpayment_setup"><file name="mysql4-upgrade-0.2.5-0.3.0.php" hash="6606b754bfbc1fd68c3a3fa25a0799a5"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>