DebitPayment - Version 0.4.9

Version Notes

Changelog:
0.4.5
- Bestimmte Zeichen werden rausgefiltert um kryptische Zeichen zu vermeiden.
- Copyright aktualisiert
- Bugfixes

0.4.2
- Theme-Support für Magento 1.4
- Neue Bankleitzahlen-Datei der Bundesbank
- Bugfixes

0.4.1
- Fehlende "debit.xml" zum Paket hinzugefügt
- Bestellung auch ohne gültige BLZ möglich gemacht / Im Benutzerkonto kann man jedoch nur eine gültige BLZ angeben!
- Neue Bankleitzahlen-Datei
- Bugfixes

0.4
- Vollständiges Refactoring des Moduls
- AJAX-Abfrage des Kreditinstituts
- Caching der Bankinformationen zur Verbesserung der Performance
- Möglichkeit hinzugefügt, Kontodaten zu speichern und im Frontend und Backend zu bearbeiten
- Formularfelder im Checkout vorausgefüllt mit gespeicherten Bankdaten
- Encryption Bug behoben
- Erweiterung vollständig übersetzbar gemacht
- Erweiterung auch für StoreView konfigurierbar gemacht

0.3
- Anzeige der Bankdaten in der Rechnung
- Anlegen von Bestellungen im Backend nun mit dieser Zahlungsart möglich
- Bearbeiten von Bestellungen mit dieser Zahlungsart möglich
- Bugfixes

0.2.5.
- Der Shopbesitzer kann nun einstellen, ob die Bankdaten verschlüsselt oder unverschlüsselt zum Lastschriftverfahren per E-Mail mitgesendet werden sollen

0.2.1.
- Bugfix

0.2.0
- Verschlüsselung der Einträge in der Datenbank
- Überprüfung der BLZ im Backend und Anzeige, ob ein Fehler vorliegt oder nicht

0.1.0
- erste Veröffentlichung mit einer Grundfunktionalität

Download this release

Release Info

Developer Magento Core Team
Extension DebitPayment
Version 0.4.9
Comparing to
See all releases


Code changes from version 0.4.7 to 0.4.9

Files changed (27) hide show
  1. app/code/community/Mage/Debit/Block/Account/Data.php +34 -8
  2. app/code/community/Mage/Debit/Block/Form.php +52 -23
  3. app/code/community/Mage/Debit/Block/Info.php +43 -17
  4. app/code/community/Mage/Debit/Helper/Data.php +39 -21
  5. app/code/community/Mage/Debit/Model/Debit.php +55 -22
  6. app/code/community/Mage/Debit/Model/Entity/Customer/Attribute/Backend/Encrypted.php +32 -10
  7. app/code/community/Mage/Debit/Model/Observer.php +107 -16
  8. app/code/community/Mage/Debit/Model/System/Config/Source/Customer/Group.php +65 -0
  9. app/code/community/Mage/Debit/controllers/AccountController.php +28 -6
  10. app/code/community/Mage/Debit/controllers/AjaxController.php +22 -8
  11. app/code/community/Mage/Debit/etc/bankleitzahlen.csv +25 -21
  12. app/code/community/Mage/Debit/etc/config.xml +29 -17
  13. app/code/community/Mage/Debit/etc/system.xml +75 -40
  14. app/code/community/Mage/Debit/sql/debit_setup/mysql4-install-0.4.0.php +61 -27
  15. app/code/local/Mage/Customer/Model/Attribute/Data/Label.php +30 -19
  16. app/design/adminhtml/default/default/template/debit/debit.phtml +15 -8
  17. app/design/adminhtml/default/default/template/debit/form.phtml +18 -10
  18. app/design/adminhtml/default/default/template/debit/info.phtml +15 -8
  19. app/design/frontend/base/default/layout/debit.xml +23 -0
  20. app/design/frontend/base/default/template/debit/account/data.phtml +15 -8
  21. app/design/frontend/base/default/template/debit/form.phtml +18 -11
  22. app/design/frontend/base/default/template/debit/info.phtml +15 -8
  23. app/etc/modules/Mage_Debit.xml +15 -7
  24. app/locale/de_DE/Mage_Debit.csv +7 -1
  25. app/locale/en_US/Mage_Debit.csv +7 -1
  26. js/mage/debit/blzcheck.js +18 -11
  27. package.xml +4 -4
app/code/community/Mage/Debit/Block/Account/Data.php CHANGED
@@ -1,19 +1,40 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Block_Account_Data extends Mage_Customer_Block_Account_Dashboard
 
17
  {
18
  /**
19
  * getBankName
@@ -78,6 +99,8 @@ class Mage_Debit_Block_Account_Data extends Mage_Customer_Block_Account_Dashboar
78
  * customer model.
79
  *
80
  * @param string $field Attribute to get
 
 
81
  */
82
  protected function _getAccountData($field)
83
  {
@@ -88,6 +111,9 @@ class Mage_Debit_Block_Account_Data extends Mage_Customer_Block_Account_Dashboar
88
  if (strlen($data) == 0) {
89
  return '';
90
  }
 
 
 
91
  return $this->htmlEscape($data);
92
  }
93
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Debit Form Block for customer account page
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
+ class Mage_Debit_Block_Account_Data
37
+ extends Mage_Customer_Block_Account_Dashboard
38
  {
39
  /**
40
  * getBankName
99
  * customer model.
100
  *
101
  * @param string $field Attribute to get
102
+ *
103
+ * @return string Data
104
  */
105
  protected function _getAccountData($field)
106
  {
111
  if (strlen($data) == 0) {
112
  return '';
113
  }
114
+ if ($field != 'debit_payment_acount_name' && !is_numeric($data)) {
115
+ return '';
116
+ }
117
  return $this->htmlEscape($data);
118
  }
119
  }
app/code/community/Mage/Debit/Block/Form.php CHANGED
@@ -1,17 +1,37 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Block_Form extends Mage_Payment_Block_Form
17
  {
@@ -19,6 +39,8 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
19
  * _construct
20
  *
21
  * Construct payment form block and set template
 
 
22
  */
23
  protected function _construct()
24
  {
@@ -55,13 +77,16 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
55
  */
56
  public function getAccountBLZ()
57
  {
58
- if ($data = $this->getInfoData('cc_type')) {
59
- return $data;
60
- } elseif ($data = $this->_getAccountData('debit_payment_acount_blz')) {
61
- return $data;
62
- } else {
63
- return '';
64
- }
 
 
 
65
  }
66
 
67
  /**
@@ -88,13 +113,14 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
88
  */
89
  public function getAccountNumber()
90
  {
91
- if ($data = $this->getInfoData('cc_number')) {
92
- return $data;
93
- } elseif ($data = $this->_getAccountData('debit_payment_acount_number')) {
94
- return $data;
95
- } else {
96
- return '';
97
- }
 
98
  }
99
 
100
  /**
@@ -104,6 +130,8 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
104
  * customer model.
105
  *
106
  * @param string $field Attribute to get
 
 
107
  */
108
  protected function _getAccountData($field)
109
  {
@@ -139,7 +167,8 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
139
  *
140
  * @return boolean true/false
141
  */
142
- public function getCheckoutValidBlz() {
143
- return Mage::getStoreConfigFlag('payment/debit/checkout_valid_blz');
 
144
  }
145
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Debit Form Block
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
37
  {
39
  * _construct
40
  *
41
  * Construct payment form block and set template
42
+ *
43
+ * @return void
44
  */
45
  protected function _construct()
46
  {
77
  */
78
  public function getAccountBLZ()
79
  {
80
+ if ($data = $this->getInfoData('cc_type')) {
81
+ if (!is_numeric($data)) {
82
+ $data = Mage::helper('core')->decrypt($data);
83
+ }
84
+ return $data;
85
+ } elseif ($data = $this->_getAccountData('debit_payment_acount_blz')) {
86
+ return $data;
87
+ } else {
88
+ return '';
89
+ }
90
  }
91
 
92
  /**
113
  */
114
  public function getAccountNumber()
115
  {
116
+ $attribute = 'debit_payment_acount_number';
117
+ if ($data = $this->getInfoData('cc_number')) {
118
+ return $data;
119
+ } elseif ($data = $this->_getAccountData($attribute)) {
120
+ return $data;
121
+ } else {
122
+ return '';
123
+ }
124
  }
125
 
126
  /**
130
  * customer model.
131
  *
132
  * @param string $field Attribute to get
133
+ *
134
+ * @return string Data
135
  */
136
  protected function _getAccountData($field)
137
  {
167
  *
168
  * @return boolean true/false
169
  */
170
+ public function getCheckoutValidBlz()
171
+ {
172
+ return Mage::getStoreConfigFlag('payment/debit/checkout_valid_blz');
173
  }
174
  }
app/code/community/Mage/Debit/Block/Info.php CHANGED
@@ -1,18 +1,37 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
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
  class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
18
  {
@@ -20,6 +39,8 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
20
  * _construct
21
  *
22
  * Construct payment info block and set template
 
 
23
  */
24
  protected function _construct()
25
  {
@@ -33,6 +54,8 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
33
  * Sets the template for PDF print-outs
34
  *
35
  * @returns string Text for PDF
 
 
36
  */
37
  public function toPdf()
38
  {
@@ -56,12 +79,12 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
56
  if (Mage::app()->getStore()->isAdmin()) {
57
  $action = Mage::app()->getRequest()->getActionName();
58
  if ($action == 'email' || $action == 'save') {
59
- return true; // Admin
60
  } else {
61
- return false; // Admin View
62
  }
63
  } else {
64
- return true; // Frontend
65
  }
66
  }
67
  }
@@ -75,7 +98,8 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
75
  */
76
  public function sendDataInEmail()
77
  {
78
- return Mage::getStoreConfigFlag('payment/'.$this->getMethod()->getCode().'/sendmail');
 
79
  }
80
 
81
  /**
@@ -88,6 +112,7 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
88
  public function getEmailData()
89
  {
90
  $payment = $this->getMethod();
 
91
  $data = array(
92
  'account_name' => $payment->getAccountName(),
93
  'account_number' => $payment->getAccountNumber(),
@@ -95,11 +120,12 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
95
  'bank_name' => $payment->getAccountBankname()
96
  );
97
  // mask bank data
98
- if (Mage::getStoreConfigFlag('payment/'.$this->getMethod()->getCode().'/sendmail_crypt'))
99
- {
100
- $data['account_number'] = $payment->maskString($payment->getAccountNumber());
101
- $data['account_blz'] = $payment->maskString($payment->getAccountBLZ());
102
- $data['bank_name'] = '';
 
103
  }
104
  return $data;
105
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Debit Info Block
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
37
  {
39
  * _construct
40
  *
41
  * Construct payment info block and set template
42
+ *
43
+ * @return void
44
  */
45
  protected function _construct()
46
  {
54
  * Sets the template for PDF print-outs
55
  *
56
  * @returns string Text for PDF
57
+ *
58
+ * @return string Text for PDF print-out
59
  */
60
  public function toPdf()
61
  {
79
  if (Mage::app()->getStore()->isAdmin()) {
80
  $action = Mage::app()->getRequest()->getActionName();
81
  if ($action == 'email' || $action == 'save') {
82
+ return true; // Admin
83
  } else {
84
+ return false; // Admin View
85
  }
86
  } else {
87
+ return true; // Frontend
88
  }
89
  }
90
  }
98
  */
99
  public function sendDataInEmail()
100
  {
101
+ $method = $this->getMethod()->getCode();
102
+ return Mage::getStoreConfigFlag('payment/'.$method.'/sendmail');
103
  }
104
 
105
  /**
112
  public function getEmailData()
113
  {
114
  $payment = $this->getMethod();
115
+ $method = $this->getMethod()->getCode();
116
  $data = array(
117
  'account_name' => $payment->getAccountName(),
118
  'account_number' => $payment->getAccountNumber(),
120
  'bank_name' => $payment->getAccountBankname()
121
  );
122
  // mask bank data
123
+ if (Mage::getStoreConfigFlag('payment/'.$method.'/sendmail_crypt')) {
124
+ $number = $payment->maskString($payment->getAccountNumber());
125
+ $routing = $payment->maskString($payment->getAccountBLZ());
126
+ $data['account_number'] = $number;
127
+ $data['account_blz'] = $routing;
128
+ $data['bank_name'] = '';
129
  }
130
  return $data;
131
  }
app/code/community/Mage/Debit/Helper/Data.php CHANGED
@@ -1,17 +1,37 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
17
  {
@@ -21,26 +41,29 @@ class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
21
  * Returns the bankname by given blz
22
  *
23
  * @param string $blz BLZ
 
 
24
  */
25
  public function getBankByBlz($blz)
26
  {
27
  $data = $this->_loadBlzCache();
28
-
29
  if (!$data) {
30
  // open blz file handle
31
- $io = new Varien_Io_File();
32
- $io->open(array('path'=>Mage::getModuleDir('etc', 'Mage_Debit')));
33
- $io->streamOpen('bankleitzahlen.csv', 'r');
34
-
 
 
 
35
  // read csv stream
36
- while (($line = $io->streamReadCsv(';')) !== false) {
37
  $data[$line[0]] = $line[1];
38
  }
39
  $this->_saveBlzCache(serialize($data));
40
  } else {
41
  $data = unserialize($data);
42
  }
43
-
44
  return empty($data[$blz]) ? null : $data[$blz];
45
  }
46
 
@@ -122,13 +145,8 @@ class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
122
  */
123
  public function sanitizeData($data)
124
  {
125
- $sanitized = str_replace(' ', '' , $data);
126
- $sanitized = str_replace('-', '', $sanitized);
127
- $sanitized = str_replace('_', '', $sanitized);
128
- $sanitized = str_replace('.', '', $sanitized);
129
- $sanitized = str_replace(':', '', $sanitized);
130
- $sanitized = str_replace('/', '', $sanitized);
131
- $sanitized = str_replace('|', '', $sanitized);
132
  return $sanitized;
133
  }
134
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Helper class for different helper functionalities..
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
37
  {
41
  * Returns the bankname by given blz
42
  *
43
  * @param string $blz BLZ
44
+ *
45
+ * @return null|string Bank Name
46
  */
47
  public function getBankByBlz($blz)
48
  {
49
  $data = $this->_loadBlzCache();
 
50
  if (!$data) {
51
  // open blz file handle
52
+ $file = new Varien_Io_File();
53
+ $file->open(
54
+ array(
55
+ 'path' => Mage::getModuleDir('etc', 'Mage_Debit')
56
+ )
57
+ );
58
+ $file->streamOpen('bankleitzahlen.csv', 'r');
59
  // read csv stream
60
+ while (($line = $file->streamReadCsv(';')) !== false) {
61
  $data[$line[0]] = $line[1];
62
  }
63
  $this->_saveBlzCache(serialize($data));
64
  } else {
65
  $data = unserialize($data);
66
  }
 
67
  return empty($data[$blz]) ? null : $data[$blz];
68
  }
69
 
145
  */
146
  public function sanitizeData($data)
147
  {
148
+ $bad = array(' ', '-', '_', '.', ';', '/', '|');
149
+ $sanitized = str_replace($bad, '', $data);
 
 
 
 
 
150
  return $sanitized;
151
  }
152
  }
app/code/community/Mage/Debit/Model/Debit.php CHANGED
@@ -1,17 +1,37 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
17
  {
@@ -41,7 +61,9 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
41
  *
42
  * Assigns data to the payment info instance
43
  *
44
- * @param Varien_Object|array $data
 
 
45
  */
46
  public function assignData($data)
47
  {
@@ -51,17 +73,32 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
51
 
52
  $info = $this->getInfoInstance();
53
 
54
- $ccType = Mage::helper('debit')->sanitizeData($data->getCcType());
 
 
 
 
 
55
  $ccType = $info->encrypt($ccType);
56
 
57
- $ccOwner = $data->getCcOwner();
 
 
 
 
58
 
59
- $ccNumber = Mage::helper('debit')->sanitizeData($data->getCcNumber());
 
 
 
 
 
60
  $ccNumber = $info->encrypt($ccNumber);
61
 
62
- $info->setCcType($ccType) // BLZ
63
- ->setCcOwner($ccOwner) // Kontoinhaber
64
- ->setCcNumberEnc($ccNumber); // Kontonummer
 
65
 
66
  return $this;
67
  }
@@ -102,14 +139,12 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
102
  {
103
  $info = $this->getInfoInstance();
104
  $data = $info->getCcNumberEnc();
105
-
106
- if(!is_numeric($data)) {
107
  $data = $info->decrypt($data);
108
  }
109
- if(!is_numeric($data)) {
110
  $data = $info->decrypt($data);
111
  }
112
-
113
  return $data;
114
  }
115
 
@@ -124,11 +159,9 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
124
  {
125
  $info = $this->getInfoInstance();
126
  $data = $info->getCcType();
127
-
128
- if(!is_numeric($data)) {
129
  $data = $info->decrypt($data);
130
  }
131
-
132
  return $data;
133
  }
134
 
@@ -159,7 +192,7 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
159
  */
160
  public function maskString($data)
161
  {
162
- $crypt = str_repeat('*', strlen($data)-3) . substr($data,-3);
163
  return $crypt;
164
  }
165
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Debit Model
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
37
  {
61
  *
62
  * Assigns data to the payment info instance
63
  *
64
+ * @param Varien_Object|array $data Payment Data from checkout
65
+ *
66
+ * @return Mage_Debit_Model_Debit Self.
67
  */
68
  public function assignData($data)
69
  {
73
 
74
  $info = $this->getInfoInstance();
75
 
76
+ // Fetch routing number
77
+ $ccType = $data->getDebitCcType();
78
+ if (!$ccType) {
79
+ $ccType = $data->getCcType();
80
+ }
81
+ $ccType = Mage::helper('debit')->sanitizeData($ccType);
82
  $ccType = $info->encrypt($ccType);
83
 
84
+ // Fetch account holder
85
+ $ccOwner = $data->getDebitCcOwner();
86
+ if (!$ccOwner) {
87
+ $ccOwner = $data->getCcOwner();
88
+ }
89
 
90
+ // Fetch account number
91
+ $ccNumber = $data->getDebitCcNumber();
92
+ if (!$ccNumber) {
93
+ $ccNumber = $data->getCcNumber();
94
+ }
95
+ $ccNumber = Mage::helper('debit')->sanitizeData($ccNumber);
96
  $ccNumber = $info->encrypt($ccNumber);
97
 
98
+ // Set account data in payment info model
99
+ $info->setCcType($ccType) // BLZ
100
+ ->setCcOwner($ccOwner) // Kontoinhaber
101
+ ->setCcNumberEnc($ccNumber); // Kontonummer
102
 
103
  return $this;
104
  }
139
  {
140
  $info = $this->getInfoInstance();
141
  $data = $info->getCcNumberEnc();
142
+ if (!is_numeric($data)) {
 
143
  $data = $info->decrypt($data);
144
  }
145
+ if (!is_numeric($data)) {
146
  $data = $info->decrypt($data);
147
  }
 
148
  return $data;
149
  }
150
 
159
  {
160
  $info = $this->getInfoInstance();
161
  $data = $info->getCcType();
162
+ if (!is_numeric($data)) {
 
163
  $data = $info->decrypt($data);
164
  }
 
165
  return $data;
166
  }
167
 
192
  */
193
  public function maskString($data)
194
  {
195
+ $crypt = str_repeat('*', strlen($data)-3) . substr($data, -3);
196
  return $crypt;
197
  }
198
  }
app/code/community/Mage/Debit/Model/Entity/Customer/Attribute/Backend/Encrypted.php CHANGED
@@ -1,17 +1,37 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
17
  extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
@@ -27,8 +47,9 @@ class Mage_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
27
  */
28
  public function beforeSave($object)
29
  {
 
30
  $attributeName = $this->getAttribute()->getName();
31
- $value = Mage::helper('core')->encrypt($object->getData($attributeName));
32
  $object->setData($attributeName, $value);
33
  }
34
 
@@ -37,14 +58,15 @@ class Mage_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
37
  *
38
  * Decrypts the value after load
39
  *
40
- * @param <type> $object
41
  *
42
  * @return void
43
  */
44
  public function afterLoad($object)
45
  {
 
46
  $attributeName = $this->getAttribute()->getName();
47
- $value = Mage::helper('core')->decrypt($object->getData($attributeName));
48
  $object->setData($attributeName, $value);
49
  }
50
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Customer Attribute Backend Encrypted
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
37
  extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
47
  */
48
  public function beforeSave($object)
49
  {
50
+ $helper = Mage::helper('core');
51
  $attributeName = $this->getAttribute()->getName();
52
+ $value = $helper->encrypt($object->getData($attributeName));
53
  $object->setData($attributeName, $value);
54
  }
55
 
58
  *
59
  * Decrypts the value after load
60
  *
61
+ * @param <type> $object Object
62
  *
63
  * @return void
64
  */
65
  public function afterLoad($object)
66
  {
67
+ $helper = Mage::helper('core');
68
  $attributeName = $this->getAttribute()->getName();
69
+ $value = $helper->decrypt($object->getData($attributeName));
70
  $object->setData($attributeName, $value);
71
  }
72
  }
app/code/community/Mage/Debit/Model/Observer.php CHANGED
@@ -1,43 +1,134 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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 Mage_Debit_Model_Observer
17
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  /**
19
  * saveAccountInfo
20
  *
21
- * Saves the account data after a successful order in the specific customer model.
22
- * Observer: sales_order_save_after
 
 
23
  *
24
  * @param Varien_Event_Observer $observer Observer
 
 
25
  */
26
  public function saveAccountInfo($observer)
27
  {
28
  $order = $observer->getEvent()->getOrder();
29
- $paymentMethodInstance = $order->getPayment()->getMethodInstance();
30
- if ($paymentMethodInstance->getCode() != 'debit') {
31
  return;
32
  }
33
- if (!$paymentMethodInstance->getConfigData('save_account_data')) {
34
  return;
35
  }
36
  if ($customer = $this->_getOrderCustomer($order)) {
37
  $customer->setData('debit_payment_acount_data_update', now())
38
- ->setData('debit_payment_acount_name', $paymentMethodInstance->getAccountName())
39
- ->setData('debit_payment_acount_number', $paymentMethodInstance->getAccountNumber())
40
- ->setData('debit_payment_acount_blz', $paymentMethodInstance->getAccountBLZ())
41
  ->save();
42
  }
43
  }
@@ -58,7 +149,7 @@ class Mage_Debit_Model_Observer
58
  return $customer;
59
  }
60
  } else {
61
- $customer = Mage::getSingleton('customer/session')->getCustomer();
62
  if ($customer->getId()) {
63
  return $customer;
64
  }
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
  * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Observer
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_Model_Observer
37
  {
38
+ /**
39
+ * paymentMethodIsActive
40
+ *
41
+ * Checks if DebitPayment is allowed for specific customer groups and if a
42
+ * registered customer has the required minimum amount of orders to be
43
+ * allowed to order via DebitPayment.
44
+ *
45
+ * Magento Event: payment_method_is_active
46
+ *
47
+ * @param Varien_Event_Observer $observer Observer
48
+ *
49
+ * @return void
50
+ */
51
+ public function paymentMethodIsActive($observer)
52
+ {
53
+ $methodInstance = $observer->getEvent()->getMethodInstance();
54
+ $session = Mage::getSingleton('customer/session');
55
+
56
+ // Check if method is DebitPayment
57
+ if ($methodInstance->getCode() != 'debit') {
58
+ return;
59
+ }
60
+ // Check if payment method is active
61
+ if (!Mage::getStoreConfigFlag('payment/debit/active')) {
62
+ return;
63
+ }
64
+
65
+ // Check if payment is allowed only for specific customer groups
66
+ if (!Mage::getStoreConfigFlag('payment/debit/specificgroup_all')) {
67
+ $customerGroupId = Mage_Customer_Model_Group::NOT_LOGGED_IN_ID;
68
+ if ($session->isLoggedIn()) {
69
+ $customerGroupId = $session->getCustomerGroupId();
70
+ }
71
+ $allowedGroupIds = explode(',', Mage::getStoreConfig('payment/debit/specificgroup'));
72
+ if (!in_array($customerGroupId, $allowedGroupIds)) {
73
+ $observer->getEvent()->getResult()->isAvailable = false;
74
+ return;
75
+ }
76
+ }
77
+
78
+ // Check minimum orders count
79
+ $minOrderCount = Mage::getStoreConfig('payment/debit/orderscount');
80
+ if ($minOrderCount > 0) {
81
+ $customerId = $session->getCustomerId();
82
+ if (is_null($customerId)) { // not logged in
83
+ $observer->getEvent()->getResult()->isAvailable = false;
84
+ return;
85
+ }
86
+ // Load orders and check
87
+ $orders = Mage::getResourceModel('sales/order_collection')
88
+ ->addAttributeToSelect('*')
89
+ ->addAttributeToFilter('customer_id', $customerId)
90
+ ->addAttributeToFilter('status', Mage_Sales_Model_Order::STATE_COMPLETE)
91
+ ->addAttributeToFilter(
92
+ 'state',
93
+ array(
94
+ 'in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()
95
+ )
96
+ )
97
+ ->load();
98
+ if (count($orders) < $minOrderCount) {
99
+ $observer->getEvent()->getResult()->isAvailable = false;
100
+ return;
101
+ }
102
+ }
103
+ }
104
+
105
  /**
106
  * saveAccountInfo
107
  *
108
+ * Saves the account data after a successful order in the specific
109
+ * customer model.
110
+ *
111
+ * Magento Event: sales_order_save_after
112
  *
113
  * @param Varien_Event_Observer $observer Observer
114
+ *
115
+ * @return void
116
  */
117
  public function saveAccountInfo($observer)
118
  {
119
  $order = $observer->getEvent()->getOrder();
120
+ $methodInstance = $order->getPayment()->getMethodInstance();
121
+ if ($methodInstance->getCode() != 'debit') {
122
  return;
123
  }
124
+ if (!$methodInstance->getConfigData('save_account_data')) {
125
  return;
126
  }
127
  if ($customer = $this->_getOrderCustomer($order)) {
128
  $customer->setData('debit_payment_acount_data_update', now())
129
+ ->setData('debit_payment_acount_name', $methodInstance->getAccountName())
130
+ ->setData('debit_payment_acount_number', $methodInstance->getAccountNumber())
131
+ ->setData('debit_payment_acount_blz', $methodInstance->getAccountBLZ())
132
  ->save();
133
  }
134
  }
149
  return $customer;
150
  }
151
  } else {
152
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
153
  if ($customer->getId()) {
154
  return $customer;
155
  }
app/code/community/Mage/Debit/Model/System/Config/Source/Customer/Group.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Mage_Debit module.
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
+ *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * System Config Customer Groups
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
33
+ * @link http://www.magentocommerce.com/extension/676/
34
+ */
35
+ class Mage_Debit_Model_System_Config_Source_Customer_Group
36
+ {
37
+ /**
38
+ * @var array Customer Groups
39
+ */
40
+ protected $_options;
41
+
42
+ /**
43
+ * Returns the customer groups as an array for system configuration
44
+ *
45
+ * @return array Customer Groups
46
+ */
47
+ public function toOptionArray()
48
+ {
49
+ if (!$this->_options) {
50
+ $collection = Mage::getResourceModel('customer/group_collection')
51
+ ->loadData()
52
+ ->toOptionArray();
53
+ $this->_options = $collection;
54
+
55
+ array_unshift(
56
+ $this->_options,
57
+ array(
58
+ 'value' => '',
59
+ 'label' => Mage::helper('debit')->__('-- Please Select --')
60
+ )
61
+ );
62
+ }
63
+ return $this->_options;
64
+ }
65
+ }
app/code/community/Mage/Debit/controllers/AccountController.php CHANGED
@@ -1,9 +1,11 @@
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:
@@ -12,10 +14,24 @@
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
- * @package Mage_Debit
16
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
17
- * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  */
20
  class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
21
  {
@@ -33,6 +49,8 @@ class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
33
 
34
  /**
35
  * preDispatch
 
 
36
  */
37
  public function preDispatch()
38
  {
@@ -45,6 +63,8 @@ class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
45
 
46
  /**
47
  * editAction
 
 
48
  */
49
  public function editAction()
50
  {
@@ -58,6 +78,8 @@ class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
58
  *
59
  * @throws Mage_Core_Exception
60
  * @throws Exception
 
 
61
  */
62
  public function saveAction()
63
  {
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
  * that is bundled with this package in the file LICENSE.txt.
11
  * It is also available through the world-wide-web at this URL:
14
  * obtain it through the world-wide-web, please send an email
15
  * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * AccountController
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
37
  {
49
 
50
  /**
51
  * preDispatch
52
+ *
53
+ * @return void
54
  */
55
  public function preDispatch()
56
  {
63
 
64
  /**
65
  * editAction
66
+ *
67
+ * @return void
68
  */
69
  public function editAction()
70
  {
78
  *
79
  * @throws Mage_Core_Exception
80
  * @throws Exception
81
+ *
82
+ * @return void
83
  */
84
  public function saveAction()
85
  {
app/code/community/Mage/Debit/controllers/AjaxController.php CHANGED
@@ -1,9 +1,11 @@
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:
@@ -12,10 +14,24 @@
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
- * @package Mage_Debit
16
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
17
- * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  */
20
  class Mage_Debit_AjaxController extends Mage_Core_Controller_Front_Action
21
  {
@@ -29,10 +45,8 @@ class Mage_Debit_AjaxController extends Mage_Core_Controller_Front_Action
29
  public function checkblzAction()
30
  {
31
  $result = array();
32
-
33
  $blz = $this->getRequest()->getPost('blz');
34
  $blz = Mage::helper('debit')->sanitizeData($blz);
35
-
36
  if ($bank = Mage::helper('debit')->getBankByBlz($blz)) {
37
  $result['found'] = 1;
38
  $result['blz'] = $blz;
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
4
  *
5
+ * PHP version 5
6
+ *
7
  * NOTICE OF LICENSE
8
+ *
9
  * This source file is subject to the Open Software License (OSL 3.0)
10
  * that is bundled with this package in the file LICENSE.txt.
11
  * It is also available through the world-wide-web at this URL:
14
  * obtain it through the world-wide-web, please send an email
15
  * to license@magentocommerce.com so we can send you a copy immediately.
16
  *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * AjaxController
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
  */
36
  class Mage_Debit_AjaxController extends Mage_Core_Controller_Front_Action
37
  {
45
  public function checkblzAction()
46
  {
47
  $result = array();
 
48
  $blz = $this->getRequest()->getPost('blz');
49
  $blz = Mage::helper('debit')->sanitizeData($blz);
 
50
  if ($bank = Mage::helper('debit')->getBankByBlz($blz)) {
51
  $result['found'] = 1;
52
  $result['blz'] = $blz;
app/code/community/Mage/Debit/etc/bankleitzahlen.csv CHANGED
@@ -14,6 +14,7 @@
14
  10030500;Bankhaus Löbbecke Berlin
15
  10030600;North Channel Bank Mainz
16
  10030700;Gries & Heissel Wiesbaden
 
17
  10040000;Commerzbank -West- Berlin
18
  10040048;Commerzbank BER GF-B48
19
  10040060;Commerzbank Gf 160 Berlin
@@ -22,11 +23,12 @@
22
  10040063;Commerzbank CC Berlin
23
  10045050;Commerzbank Service-BZ
24
  10050000;Landesbank - Berliner Spk
25
- 10050001;Landesbank Berlin
26
  10050005;Landesbank Berlin - E 1 -
27
  10050006;Landesbank Berlin - E 2 -
28
  10050007;Landesbank Berlin - E 3 -
29
  10050008;Landesbank Berlin - E 4 -
 
 
30
  10050500;LBS Ost Berlin
31
  10050600;WestLB Berlin
32
  10050999;DekaBank Berlin
@@ -60,7 +62,6 @@
60
  10110400;Investitionsbank Berlin
61
  10110600;quirin bank
62
  10120100;Weberbank
63
- 10120199;Weberbank Gf n.B. Berlin
64
  10120600;Santander Consumer Bank
65
  10120760;UniCredit exHypo Ndl260 Bln
66
  10120800;VON ESSEN Bank
@@ -248,6 +249,7 @@
248
  20130400;GRENKE BANK
249
  20130412;GRENKE BANK Hamburg
250
  20130600;Barclaycard
 
251
  20190003;Hamburger Volksbank
252
  20190109;VB Stormarn
253
  20190206;VB Hamburg Ost-West -alt-
@@ -263,6 +265,7 @@
263
  20310300;Europ-Iran Handelsbk Hambg
264
  20310600;RBS NDL Deutschland
265
  20320500;Danske Bank Hamburg
 
266
  20350000;WestLB Hamburg
267
  20690500;Sparda-Bank Hamburg
268
  20730000;UniCredit Bk ex VereinWest
@@ -801,7 +804,6 @@
801
  28069994;Volksbank Süd-Emsland
802
  28070024;Deutsche Bank PGK Oldenburg
803
  28070057;Deutsche Bank Oldenburg
804
- 28090045;Volksbank Oldenburg -alt-
805
  28090633;apoBank Oldenburg
806
  28200000;BBk Oldenburg eh Wilhelmshv
807
  28220026;Oldb Ldbank Wilhelmshaven
@@ -908,6 +910,7 @@
908
  30030100;S Broker Wiesbaden
909
  30030400;FXdirekt Bank Oberhausen
910
  30030500;C&A Bank Düsseldorf
 
911
  30030880;HSBC Trinkaus Düsseldorf
912
  30030900;Merck Finck & Co Düsseldorf
913
  30040000;Commerzbank Düsseldorf
@@ -1061,7 +1064,6 @@
1061
  35251000;Spk Dinslaken-Voerde-Hünxe
1062
  35261248;Volksbank Dinslaken
1063
  35450000;Sparkasse am Niederrhein
1064
- 35451250;St Spk Kamp-Lintfort -alt-
1065
  35451460;Spk Neukirchen-Vluyn
1066
  35451775;Spk Rheinberg
1067
  35461106;Volksbank Niederrhein
@@ -1082,6 +1084,7 @@
1082
  36020030;National-Bank Essen
1083
  36020186;UniCredit Bank-HypoVereinbk
1084
  36020700;Hanseatic Bank Essen
 
1085
  36036000;VALBA
1086
  36040039;Commerzbank Essen
1087
  36040060;Commerzbank CC Essen
@@ -1129,10 +1132,10 @@
1129
  37020900;Ford Bank Köln
1130
  37021100;Mazda Bank Köln
1131
  37021200;Volvo Auto Bank Köln
 
1132
  37021300;Jaguar Fin Serv Köln
1133
  37021400;Land Rover Fin Serv Köln
1134
  37030200;Oppenheim, Sal - jr & Cie
1135
- 37030300;Santander Consumer Bank
1136
  37030700;abcbank Köln
1137
  37030800;Isbank Köln
1138
  37040044;Commerzbank Köln
@@ -1456,7 +1459,7 @@
1456
  44080085;Commerzbank ITGK2 Dortmnd
1457
  44089320;Commerzbank ITGK Dortmund
1458
  44090920;PSD Bank Dortmund -alt-
1459
- 44130000;HKB Dortmund
1460
  44152370;Sparkasse Lünen
1461
  44152490;Sparkasse Schwerte
1462
  44160014;Dortmunder Volksbank
@@ -1479,7 +1482,7 @@
1479
  44761312;Mendener Bank
1480
  44761534;VB im Märkischen Kreis
1481
  45000000;BBk Hagen
1482
- 45030000;HKB Altena
1483
  45040042;Commerzbank Hagen Westf
1484
  45050001;Sparkasse Hagen
1485
  45051485;St Spk Herdecke
@@ -1648,7 +1651,6 @@
1648
  50010424;Aareal Bank
1649
  50010517;ING-DiBa Frankfurt am Main
1650
  50010700;Degussa Bank Frankfurt Main
1651
- 50010800;Deutsche Pfandbriefbank
1652
  50010900;Bankamerica
1653
  50012800;ALTE LEIPZIGER Bauspar
1654
  50020160;UniCredit exHypo Ndl427 Ffm
@@ -1663,7 +1665,7 @@
1663
  50021100;Frankfurter Fondsbank
1664
  50023400;Bank of Beirut Frankfurt
1665
  50030000;Banque PSA Finance
1666
- 50030100;HKB Frankfurt
1667
  50030500;BNP PARIBAS Sec Serv
1668
  50030600;dwpbank
1669
  50030700;DenizBank Frankfurt
@@ -1671,6 +1673,7 @@
1671
  50030900;Lehman Brothers Frankfurt
1672
  50031000;Triodos Bank Deutschland
1673
  50031100;Bankhaus Main Frankfurt/M
 
1674
  50040000;Commerzbank Frankfurt Main
1675
  50040033;Commerzbank Gf BRS Ffm
1676
  50040040;Commerzbank ZRK Frankfurt
@@ -1682,6 +1685,7 @@
1682
  50040062;Commerzbank CC Ffm
1683
  50040063;Commerzbank CC Ffm
1684
  50040075;Commerzbank Gf ZCM Ffm
 
1685
  50042500;Commerzbank Frankfurt
1686
  50044444;Commerzbank Vermverw Ffm
1687
  50047010;Commerzbank Service - BZ
@@ -1859,6 +1863,7 @@
1859
  50320600;Attijariwafa bank Frankfurt
1860
  50320900;Pictet & Cie Europe Ffm
1861
  50324000;ABN AMRO Bank
 
1862
  50330000;State Bk of India Frankfurt
1863
  50330200;MHB-Bank Frankfurt
1864
  50330300;The Bank of New York Mellon
@@ -2184,7 +2189,7 @@
2184
  53070024;Deutsche Bank PGK Fulda
2185
  53080030;Commerzbank Fulda
2186
  53093200;VR Bank HessenLand
2187
- 53093255;AgrarB@nk Alsfeld
2188
  53200000;BBk Kassel eh Bad Hersfeld
2189
  53240048;Commerzbank Bad Hersfeld
2190
  53250000;Spk Bad Hersfeld-Rotenburg
@@ -2244,7 +2249,7 @@
2244
  54540033;Commerzbank Ludwigshafen Rh
2245
  54550010;Sparkasse Vorderpfalz
2246
  54550120;Kreissparkasse Rhein-Pfalz
2247
- 54560320;VR Bank Ludwigshafen
2248
  54561310;RV Bank Rhein-Haardt
2249
  54570024;Deutsche Bank PGK Ludwigsha
2250
  54570094;Deutsche Bank Ludwigshafen
@@ -2286,6 +2291,7 @@
2286
  55020700;SWK-Bank Bingen
2287
  55030500;GE Capital Bank Mainz
2288
  55030533;GE Capital Direkt
 
2289
  55040022;Commerzbank Mainz
2290
  55040060;Commerzbank CC Mainz
2291
  55040061;Commerzbank CC Mainz
@@ -2406,7 +2412,6 @@
2406
  58560103;Volksbank Trier
2407
  58560294;Pax-Bank Trier
2408
  58561250;Volksbank Hermeskeil -alt-
2409
- 58561594;Raiffbk Schweich -alt-
2410
  58561626;Volksbank Saarburg -alt-
2411
  58561771;Raiffbk Mehring-Leiwen
2412
  58564788;VB Hochwald-Saarburg
@@ -2656,6 +2661,7 @@
2656
  60120200;BHF-BANK Stuttgart
2657
  60120500;Bank für Sozialwirtschaft
2658
  60130100;FFS Bank Stuttgart
 
2659
  60200000;BBk Stuttgart eh Waiblingen
2660
  60220030;BW Bank Waiblingen
2661
  60241074;Commerzbank Backnang
@@ -2971,7 +2977,6 @@
2971
  66350036;Spk Kraichgau
2972
  66361178;Raiffeisenbank Forst -alt-
2973
  66361335;Volksbank Kirrlach -alt-
2974
- 66361588;Raiffbk Sulzfeld -alt-
2975
  66362345;Raiffeisenbank Kronau -alt-
2976
  66363487;Raiffbk -alt-
2977
  66390000;VB Bruchsal-Bretten -alt-
@@ -3150,7 +3155,6 @@
3150
  69240075;Commerzbank Singen Hohentw
3151
  69250035;Spk Singen-Radolfzell
3152
  69251445;Spk Engen-Gottmadingen
3153
- 69251550;Spk Gottmadingen -alt-
3154
  69251755;Sparkasse Stockach
3155
  69270024;Deutsche Bank PGK Singen
3156
  69270038;Deutsche Bank Singen Hohent
@@ -3218,7 +3222,7 @@
3218
  70050000;BayernLB München
3219
  70051003;Sparkasse Freising
3220
  70051540;Sparkasse Dachau
3221
- 70051805;Kr Spk Ebersberg
3222
  70051995;Spk Erding-Dorfen
3223
  70052060;Spk Landsberg-Dießen
3224
  70053070;Spk Fürstenfeldbruck
@@ -3256,16 +3260,15 @@
3256
  70120900;UniCredit exHypo Ndl BACA
3257
  70130700;Lenz Bank München
3258
  70130800;Merkur Bank München
 
3259
  70150000;St Spk München
3260
  70160000;DZ BANK München
3261
  70160300;Raiffbk München -alt-
3262
  70163370;VR-Bank Fürstenfeldbruck
3263
  70166486;VR Bank München Land
3264
  70169132;Raiffbk Griesstätt-Halfing
3265
- 70169162;Raiffeisenbank Petting
3266
  70169165;Raiffbk Chiemgau-Nord-Obing
3267
  70169168;VR-Bank Chiemgau-Süd -alt-
3268
- 70169174;Raiffbk Rupertiwinkel-Nord
3269
  70169179;VB Siegsdorf-Bergen -alt-
3270
  70169186;Raiffbk Pfaffenhofen Glonn
3271
  70169190;Raiffbk Tattenh Großkarol
@@ -3331,7 +3334,7 @@
3331
  70220800;VVB München
3332
  70220900;Wüstenrot Bausparkasse
3333
  70230600;Isbank München
3334
- 70250150;Kr Spk München Starnberg
3335
  70300000;BBk München eh Garmisch-Par
3336
  70320090;UniCredit Bank-HypoVereinbk
3337
  70320305;UniCredit exHypo Ndl635 Gar
@@ -3431,7 +3434,7 @@
3431
  72070001;Deutsche Bank Augsburg
3432
  72070024;Deutsche Bank PGK Augsburg
3433
  72080001;Commerzbank Augsburg
3434
- 72090000;Augusta-Bank RV Augsburg
3435
  72090500;Sparda-Bank Augsburg
3436
  72090900;PSD Bank München Augsburg
3437
  72091800;Volksbank Günzburg
@@ -4013,7 +4016,7 @@
4013
  83053030;Spk Jena-Saale-Holzland
4014
  83064488;Raiffbk-VB Hermsdorf
4015
  83064568;Geraer Bank
4016
- 83065408;VR-Bank Altenburger Land
4017
  83065410;Dt Skatbank Zndl VR Bank
4018
  83080000;Commerzbank Gera
4019
  83094444;Raiff-VB Saale-Orla
@@ -4076,6 +4079,7 @@
4076
  86020500;Bank für Sozialwirtschaft
4077
  86020600;Hanseatic Bank Leipzig
4078
  86020880;UniCredit exHypo Ndl508 Lei
 
4079
  86040000;Commerzbank Leipzig
4080
  86040060;Commerzbank CC Leipzig
4081
  86040061;Commerzbank CC Leipzig
@@ -4128,4 +4132,4 @@
4128
  87096034;VB Erzgebirge
4129
  87096074;Freiberger Bank -alt-
4130
  87096124;Volksbank Mittweida
4131
- 87096214;Volksbank Chemnitz
14
  10030500;Bankhaus Löbbecke Berlin
15
  10030600;North Channel Bank Mainz
16
  10030700;Gries & Heissel Wiesbaden
17
+ 10033300;Santander Consumer B Berlin
18
  10040000;Commerzbank -West- Berlin
19
  10040048;Commerzbank BER GF-B48
20
  10040060;Commerzbank Gf 160 Berlin
23
  10040063;Commerzbank CC Berlin
24
  10045050;Commerzbank Service-BZ
25
  10050000;Landesbank - Berliner Spk
 
26
  10050005;Landesbank Berlin - E 1 -
27
  10050006;Landesbank Berlin - E 2 -
28
  10050007;Landesbank Berlin - E 3 -
29
  10050008;Landesbank Berlin - E 4 -
30
+ 10050020;LBB S-Kreditpartner, Berlin
31
+ 10050021;LBB S-Kreditpartner HG
32
  10050500;LBS Ost Berlin
33
  10050600;WestLB Berlin
34
  10050999;DekaBank Berlin
62
  10110400;Investitionsbank Berlin
63
  10110600;quirin bank
64
  10120100;Weberbank
 
65
  10120600;Santander Consumer Bank
66
  10120760;UniCredit exHypo Ndl260 Bln
67
  10120800;VON ESSEN Bank
249
  20130400;GRENKE BANK
250
  20130412;GRENKE BANK Hamburg
251
  20130600;Barclaycard
252
+ 20133300;Santander Consumer Bank HH
253
  20190003;Hamburger Volksbank
254
  20190109;VB Stormarn
255
  20190206;VB Hamburg Ost-West -alt-
265
  20310300;Europ-Iran Handelsbk Hambg
266
  20310600;RBS NDL Deutschland
267
  20320500;Danske Bank Hamburg
268
+ 20320585;Danske Bank Hamburg
269
  20350000;WestLB Hamburg
270
  20690500;Sparda-Bank Hamburg
271
  20730000;UniCredit Bk ex VereinWest
804
  28069994;Volksbank Süd-Emsland
805
  28070024;Deutsche Bank PGK Oldenburg
806
  28070057;Deutsche Bank Oldenburg
 
807
  28090633;apoBank Oldenburg
808
  28200000;BBk Oldenburg eh Wilhelmshv
809
  28220026;Oldb Ldbank Wilhelmshaven
910
  30030100;S Broker Wiesbaden
911
  30030400;FXdirekt Bank Oberhausen
912
  30030500;C&A Bank Düsseldorf
913
+ 30030600;ETRIS Bank Wuppertal
914
  30030880;HSBC Trinkaus Düsseldorf
915
  30030900;Merck Finck & Co Düsseldorf
916
  30040000;Commerzbank Düsseldorf
1064
  35251000;Spk Dinslaken-Voerde-Hünxe
1065
  35261248;Volksbank Dinslaken
1066
  35450000;Sparkasse am Niederrhein
 
1067
  35451460;Spk Neukirchen-Vluyn
1068
  35451775;Spk Rheinberg
1069
  35461106;Volksbank Niederrhein
1084
  36020030;National-Bank Essen
1085
  36020186;UniCredit Bank-HypoVereinbk
1086
  36020700;Hanseatic Bank Essen
1087
+ 36033300;Santander Consumer Bk Essen
1088
  36036000;VALBA
1089
  36040039;Commerzbank Essen
1090
  36040060;Commerzbank CC Essen
1132
  37020900;Ford Bank Köln
1133
  37021100;Mazda Bank Köln
1134
  37021200;Volvo Auto Bank Köln
1135
+ 37021201;Volvo Auto Bk Köln Direkt
1136
  37021300;Jaguar Fin Serv Köln
1137
  37021400;Land Rover Fin Serv Köln
1138
  37030200;Oppenheim, Sal - jr & Cie
 
1139
  37030700;abcbank Köln
1140
  37030800;Isbank Köln
1141
  37040044;Commerzbank Köln
1459
  44080085;Commerzbank ITGK2 Dortmnd
1460
  44089320;Commerzbank ITGK Dortmund
1461
  44090920;PSD Bank Dortmund -alt-
1462
+ 44130000;HKB Bank Frankfurt
1463
  44152370;Sparkasse Lünen
1464
  44152490;Sparkasse Schwerte
1465
  44160014;Dortmunder Volksbank
1482
  44761312;Mendener Bank
1483
  44761534;VB im Märkischen Kreis
1484
  45000000;BBk Hagen
1485
+ 45030000;HKB Bank Frankfurt
1486
  45040042;Commerzbank Hagen Westf
1487
  45050001;Sparkasse Hagen
1488
  45051485;St Spk Herdecke
1651
  50010424;Aareal Bank
1652
  50010517;ING-DiBa Frankfurt am Main
1653
  50010700;Degussa Bank Frankfurt Main
 
1654
  50010900;Bankamerica
1655
  50012800;ALTE LEIPZIGER Bauspar
1656
  50020160;UniCredit exHypo Ndl427 Ffm
1665
  50021100;Frankfurter Fondsbank
1666
  50023400;Bank of Beirut Frankfurt
1667
  50030000;Banque PSA Finance
1668
+ 50030100;HKB Bank Frankfurt am Main
1669
  50030500;BNP PARIBAS Sec Serv
1670
  50030600;dwpbank
1671
  50030700;DenizBank Frankfurt
1673
  50030900;Lehman Brothers Frankfurt
1674
  50031000;Triodos Bank Deutschland
1675
  50031100;Bankhaus Main Frankfurt/M
1676
+ 50033300;Santander Consumer Bk Ffm
1677
  50040000;Commerzbank Frankfurt Main
1678
  50040033;Commerzbank Gf BRS Ffm
1679
  50040040;Commerzbank ZRK Frankfurt
1685
  50040062;Commerzbank CC Ffm
1686
  50040063;Commerzbank CC Ffm
1687
  50040075;Commerzbank Gf ZCM Ffm
1688
+ 50040099;Commerzbank INT Ffm
1689
  50042500;Commerzbank Frankfurt
1690
  50044444;Commerzbank Vermverw Ffm
1691
  50047010;Commerzbank Service - BZ
1863
  50320600;Attijariwafa bank Frankfurt
1864
  50320900;Pictet & Cie Europe Ffm
1865
  50324000;ABN AMRO Bank
1866
+ 50324040;ABN AMRO Bank MoneYou, Ffm
1867
  50330000;State Bk of India Frankfurt
1868
  50330200;MHB-Bank Frankfurt
1869
  50330300;The Bank of New York Mellon
2189
  53070024;Deutsche Bank PGK Fulda
2190
  53080030;Commerzbank Fulda
2191
  53093200;VR Bank HessenLand
2192
+ 53093255;AgrarBank Alsfeld
2193
  53200000;BBk Kassel eh Bad Hersfeld
2194
  53240048;Commerzbank Bad Hersfeld
2195
  53250000;Spk Bad Hersfeld-Rotenburg
2249
  54540033;Commerzbank Ludwigshafen Rh
2250
  54550010;Sparkasse Vorderpfalz
2251
  54550120;Kreissparkasse Rhein-Pfalz
2252
+ 54560320;VR Bank Ludwigshafen -alt-
2253
  54561310;RV Bank Rhein-Haardt
2254
  54570024;Deutsche Bank PGK Ludwigsha
2255
  54570094;Deutsche Bank Ludwigshafen
2291
  55020700;SWK-Bank Bingen
2292
  55030500;GE Capital Bank Mainz
2293
  55030533;GE Capital Direkt
2294
+ 55033300;Santander Consumer Bk Mainz
2295
  55040022;Commerzbank Mainz
2296
  55040060;Commerzbank CC Mainz
2297
  55040061;Commerzbank CC Mainz
2412
  58560103;Volksbank Trier
2413
  58560294;Pax-Bank Trier
2414
  58561250;Volksbank Hermeskeil -alt-
 
2415
  58561626;Volksbank Saarburg -alt-
2416
  58561771;Raiffbk Mehring-Leiwen
2417
  58564788;VB Hochwald-Saarburg
2661
  60120200;BHF-BANK Stuttgart
2662
  60120500;Bank für Sozialwirtschaft
2663
  60130100;FFS Bank Stuttgart
2664
+ 60133300;Santander Consumer Bk Stutt
2665
  60200000;BBk Stuttgart eh Waiblingen
2666
  60220030;BW Bank Waiblingen
2667
  60241074;Commerzbank Backnang
2977
  66350036;Spk Kraichgau
2978
  66361178;Raiffeisenbank Forst -alt-
2979
  66361335;Volksbank Kirrlach -alt-
 
2980
  66362345;Raiffeisenbank Kronau -alt-
2981
  66363487;Raiffbk -alt-
2982
  66390000;VB Bruchsal-Bretten -alt-
3155
  69240075;Commerzbank Singen Hohentw
3156
  69250035;Spk Singen-Radolfzell
3157
  69251445;Spk Engen-Gottmadingen
 
3158
  69251755;Sparkasse Stockach
3159
  69270024;Deutsche Bank PGK Singen
3160
  69270038;Deutsche Bank Singen Hohent
3222
  70050000;BayernLB München
3223
  70051003;Sparkasse Freising
3224
  70051540;Sparkasse Dachau
3225
+ 70051805;Kreissparkasse
3226
  70051995;Spk Erding-Dorfen
3227
  70052060;Spk Landsberg-Dießen
3228
  70053070;Spk Fürstenfeldbruck
3260
  70120900;UniCredit exHypo Ndl BACA
3261
  70130700;Lenz Bank München
3262
  70130800;Merkur Bank München
3263
+ 70133300;Santander Consumer Bk Münch
3264
  70150000;St Spk München
3265
  70160000;DZ BANK München
3266
  70160300;Raiffbk München -alt-
3267
  70163370;VR-Bank Fürstenfeldbruck
3268
  70166486;VR Bank München Land
3269
  70169132;Raiffbk Griesstätt-Halfing
 
3270
  70169165;Raiffbk Chiemgau-Nord-Obing
3271
  70169168;VR-Bank Chiemgau-Süd -alt-
 
3272
  70169179;VB Siegsdorf-Bergen -alt-
3273
  70169186;Raiffbk Pfaffenhofen Glonn
3274
  70169190;Raiffbk Tattenh Großkarol
3334
  70220800;VVB München
3335
  70220900;Wüstenrot Bausparkasse
3336
  70230600;Isbank München
3337
+ 70250150;Kreissparkasse
3338
  70300000;BBk München eh Garmisch-Par
3339
  70320090;UniCredit Bank-HypoVereinbk
3340
  70320305;UniCredit exHypo Ndl635 Gar
3434
  72070001;Deutsche Bank Augsburg
3435
  72070024;Deutsche Bank PGK Augsburg
3436
  72080001;Commerzbank Augsburg
3437
+ 72090000;Augusta-Bank RVB Augsburg
3438
  72090500;Sparda-Bank Augsburg
3439
  72090900;PSD Bank München Augsburg
3440
  72091800;Volksbank Günzburg
4016
  83053030;Spk Jena-Saale-Holzland
4017
  83064488;Raiffbk-VB Hermsdorf
4018
  83064568;Geraer Bank
4019
+ 83065408;VR-Bank ABG-Land / Skatbank
4020
  83065410;Dt Skatbank Zndl VR Bank
4021
  83080000;Commerzbank Gera
4022
  83094444;Raiff-VB Saale-Orla
4079
  86020500;Bank für Sozialwirtschaft
4080
  86020600;Hanseatic Bank Leipzig
4081
  86020880;UniCredit exHypo Ndl508 Lei
4082
+ 86033300;Santander Consumer Bk Leipz
4083
  86040000;Commerzbank Leipzig
4084
  86040060;Commerzbank CC Leipzig
4085
  86040061;Commerzbank CC Leipzig
4132
  87096034;VB Erzgebirge
4133
  87096074;Freiberger Bank -alt-
4134
  87096124;Volksbank Mittweida
4135
+ 87096214;Volksbank Chemnitz
app/code/community/Mage/Debit/etc/config.xml CHANGED
@@ -1,45 +1,49 @@
1
  <?xml version="1.0"?>
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
- * @package Mage_Debit
13
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
14
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
15
  */
16
  -->
17
  <config>
18
  <modules>
19
  <Mage_Debit>
20
- <version>0.4.7</version>
21
  </Mage_Debit>
22
  </modules>
23
-
24
  <global>
25
  <blocks>
26
  <debit>
27
  <class>Mage_Debit_Block</class>
28
  </debit>
29
  </blocks>
30
-
31
  <helpers>
32
  <debit>
33
  <class>Mage_Debit_Helper</class>
34
  </debit>
35
  </helpers>
36
-
37
  <models>
38
  <debit>
39
  <class>Mage_Debit_Model</class>
40
  </debit>
41
  </models>
42
-
43
  <resources>
44
  <debit_setup>
45
  <setup>
@@ -56,8 +60,15 @@
56
  <use>core_read</use>
57
  </debit_read>
58
  </resources>
59
-
60
  <events>
 
 
 
 
 
 
 
 
61
  <sales_order_save_after>
62
  <observers>
63
  <debit_observer>
@@ -74,13 +85,17 @@
74
  <debit>
75
  <active>0</active>
76
  <model>debit/debit</model>
 
 
77
  <sendmail>0</sendmail>
78
  <sendmail_crypt>1</sendmail_crypt>
79
  <order_status>1</order_status>
80
- <title>Debit Payment</title>
81
  <allowspecific>0</allowspecific>
82
  <save_account_data>0</save_account_data>
83
  <checkout_valid_blz>0</checkout_valid_blz>
 
 
 
84
  </debit>
85
  </payment>
86
  </default>
@@ -102,7 +117,6 @@
102
  <debit_account>/debit/account</debit_account>
103
  <debit_ajax>/debit/ajax</debit_ajax>
104
  </secure_url>
105
-
106
  <translate>
107
  <modules>
108
  <Mage_Debit>
@@ -112,7 +126,6 @@
112
  </Mage_Debit>
113
  </modules>
114
  </translate>
115
-
116
  <layout>
117
  <updates>
118
  <debit>
@@ -120,7 +133,6 @@
120
  </debit>
121
  </updates>
122
  </layout>
123
-
124
  <routers>
125
  <debit>
126
  <use>standard</use>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Mage_Debit module.
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * @category Mage
17
+ * @package Mage_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  -->
24
  <config>
25
  <modules>
26
  <Mage_Debit>
27
+ <version>0.4.9</version>
28
  </Mage_Debit>
29
  </modules>
30
+
31
  <global>
32
  <blocks>
33
  <debit>
34
  <class>Mage_Debit_Block</class>
35
  </debit>
36
  </blocks>
 
37
  <helpers>
38
  <debit>
39
  <class>Mage_Debit_Helper</class>
40
  </debit>
41
  </helpers>
 
42
  <models>
43
  <debit>
44
  <class>Mage_Debit_Model</class>
45
  </debit>
46
  </models>
 
47
  <resources>
48
  <debit_setup>
49
  <setup>
60
  <use>core_read</use>
61
  </debit_read>
62
  </resources>
 
63
  <events>
64
+ <payment_method_is_active>
65
+ <observers>
66
+ <debit_observer>
67
+ <class>debit/observer</class>
68
+ <method>paymentMethodIsActive</method>
69
+ </debit_observer>
70
+ </observers>
71
+ </payment_method_is_active>
72
  <sales_order_save_after>
73
  <observers>
74
  <debit_observer>
85
  <debit>
86
  <active>0</active>
87
  <model>debit/debit</model>
88
+ <title>Debit Payment</title>
89
+ <sort_order>10</sort_order>
90
  <sendmail>0</sendmail>
91
  <sendmail_crypt>1</sendmail_crypt>
92
  <order_status>1</order_status>
 
93
  <allowspecific>0</allowspecific>
94
  <save_account_data>0</save_account_data>
95
  <checkout_valid_blz>0</checkout_valid_blz>
96
+ <specificgroup_all>1</specificgroup_all>
97
+ <specificgroup>0</specificgroup>
98
+ <orderscount>0</orderscount>
99
  </debit>
100
  </payment>
101
  </default>
117
  <debit_account>/debit/account</debit_account>
118
  <debit_ajax>/debit/ajax</debit_ajax>
119
  </secure_url>
 
120
  <translate>
121
  <modules>
122
  <Mage_Debit>
126
  </Mage_Debit>
127
  </modules>
128
  </translate>
 
129
  <layout>
130
  <updates>
131
  <debit>
133
  </debit>
134
  </updates>
135
  </layout>
 
136
  <routers>
137
  <debit>
138
  <use>standard</use>
app/code/community/Mage/Debit/etc/system.xml CHANGED
@@ -1,17 +1,24 @@
1
  <?xml version="1.0"?>
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
- * @package Mage_Debit
13
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
14
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
15
  */
16
  -->
17
  <config>
@@ -43,41 +50,41 @@
43
  <show_in_website>1</show_in_website>
44
  <show_in_store>1</show_in_store>
45
  </title>
46
- <sendmail translate="label">
47
- <label>Send bank data via mail</label>
48
- <frontend_type>select</frontend_type>
49
- <source_model>adminhtml/system_config_source_yesno</source_model>
50
  <sort_order>3</sort_order>
51
  <show_in_default>1</show_in_default>
52
  <show_in_website>1</show_in_website>
53
  <show_in_store>1</show_in_store>
54
- </sendmail>
55
- <sendmail_crypt translate="label">
56
- <label>Encrypt bank data in mail</label>
57
  <frontend_type>select</frontend_type>
58
- <source_model>adminhtml/system_config_source_yesno</source_model>
59
  <sort_order>4</sort_order>
60
  <show_in_default>1</show_in_default>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>1</show_in_store>
63
- </sendmail_crypt>
64
- <order_status translate="label">
65
- <label>New order status</label>
66
  <frontend_type>select</frontend_type>
67
- <source_model>adminhtml/system_config_source_order_status</source_model>
68
  <sort_order>5</sort_order>
69
  <show_in_default>1</show_in_default>
70
  <show_in_website>1</show_in_website>
71
  <show_in_store>1</show_in_store>
72
- </order_status>
73
- <sort_order translate="label">
74
- <label>Sort order</label>
75
- <frontend_type>text</frontend_type>
 
76
  <sort_order>6</sort_order>
77
  <show_in_default>1</show_in_default>
78
  <show_in_website>1</show_in_website>
79
  <show_in_store>1</show_in_store>
80
- </sort_order>
81
  <allowspecific translate="label">
82
  <label>Payment from applicable countries</label>
83
  <frontend_type>allowspecific</frontend_type>
@@ -113,22 +120,22 @@
113
  <show_in_website>1</show_in_website>
114
  <show_in_store>1</show_in_store>
115
  </save_account_data>
116
- <min_order_total translate="label">
117
- <label>Minimum Order Total</label>
118
- <frontend_type>text</frontend_type>
119
- <sort_order>11</sort_order>
120
- <show_in_default>1</show_in_default>
121
- <show_in_website>1</show_in_website>
122
- <show_in_store>1</show_in_store>
123
- </min_order_total>
124
- <max_order_total translate="label">
125
- <label>Maximum Order Total</label>
126
- <frontend_type>text</frontend_type>
127
- <sort_order>12</sort_order>
128
- <show_in_default>1</show_in_default>
129
- <show_in_website>1</show_in_website>
130
- <show_in_store>1</show_in_store>
131
- </max_order_total>
132
  <checkout_valid_blz translate="label">
133
  <label>Checkout only with valid BLZ</label>
134
  <frontend_type>select</frontend_type>
@@ -138,6 +145,34 @@
138
  <show_in_website>1</show_in_website>
139
  <show_in_store>1</show_in_store>
140
  </checkout_valid_blz>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  </fields>
142
  </debit>
143
  </groups>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Mage_Debit module.
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * @category Mage
17
+ * @package Mage_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  -->
24
  <config>
50
  <show_in_website>1</show_in_website>
51
  <show_in_store>1</show_in_store>
52
  </title>
53
+ <sort_order translate="label">
54
+ <label>Sort order</label>
55
+ <frontend_type>text</frontend_type>
 
56
  <sort_order>3</sort_order>
57
  <show_in_default>1</show_in_default>
58
  <show_in_website>1</show_in_website>
59
  <show_in_store>1</show_in_store>
60
+ </sort_order>
61
+ <order_status translate="label">
62
+ <label>New order status</label>
63
  <frontend_type>select</frontend_type>
64
+ <source_model>adminhtml/system_config_source_order_status</source_model>
65
  <sort_order>4</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
+ </order_status>
70
+ <sendmail translate="label">
71
+ <label>Send bank data via mail</label>
72
  <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
  <sort_order>5</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
+ </sendmail>
79
+ <sendmail_crypt translate="label">
80
+ <label>Encrypt bank data in mail</label>
81
+ <frontend_type>select</frontend_type>
82
+ <source_model>adminhtml/system_config_source_yesno</source_model>
83
  <sort_order>6</sort_order>
84
  <show_in_default>1</show_in_default>
85
  <show_in_website>1</show_in_website>
86
  <show_in_store>1</show_in_store>
87
+ </sendmail_crypt>
88
  <allowspecific translate="label">
89
  <label>Payment from applicable countries</label>
90
  <frontend_type>allowspecific</frontend_type>
120
  <show_in_website>1</show_in_website>
121
  <show_in_store>1</show_in_store>
122
  </save_account_data>
123
+ <min_order_total translate="label">
124
+ <label>Minimum Order Total</label>
125
+ <frontend_type>text</frontend_type>
126
+ <sort_order>11</sort_order>
127
+ <show_in_default>1</show_in_default>
128
+ <show_in_website>1</show_in_website>
129
+ <show_in_store>1</show_in_store>
130
+ </min_order_total>
131
+ <max_order_total translate="label">
132
+ <label>Maximum Order Total</label>
133
+ <frontend_type>text</frontend_type>
134
+ <sort_order>12</sort_order>
135
+ <show_in_default>1</show_in_default>
136
+ <show_in_website>1</show_in_website>
137
+ <show_in_store>1</show_in_store>
138
+ </max_order_total>
139
  <checkout_valid_blz translate="label">
140
  <label>Checkout only with valid BLZ</label>
141
  <frontend_type>select</frontend_type>
145
  <show_in_website>1</show_in_website>
146
  <show_in_store>1</show_in_store>
147
  </checkout_valid_blz>
148
+ <specificgroup_all translate="label comment">
149
+ <label>Enabled for all customer groups</label>
150
+ <comment>Set to "no" if you want to enable DebitPayment only for specific customer groups defined below.</comment>
151
+ <frontend_type>select</frontend_type>
152
+ <sort_order>14</sort_order>
153
+ <source_model>adminhtml/system_config_source_yesno</source_model>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>1</show_in_website>
156
+ <show_in_store>0</show_in_store>
157
+ </specificgroup_all>
158
+ <specificgroup translate="label">
159
+ <label>Enabled only for specific customer groups</label>
160
+ <frontend_type>multiselect</frontend_type>
161
+ <sort_order>15</sort_order>
162
+ <source_model>debit/system_config_source_customer_group</source_model>
163
+ <show_in_default>1</show_in_default>
164
+ <show_in_website>1</show_in_website>
165
+ <show_in_store>0</show_in_store>
166
+ </specificgroup>
167
+ <orderscount translate="label comment">
168
+ <label>Minimum Orders Count</label>
169
+ <frontend_type>text</frontend_type>
170
+ <sort_order>16</sort_order>
171
+ <comment>Default: "0" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.</comment>
172
+ <show_in_default>1</show_in_default>
173
+ <show_in_website>1</show_in_website>
174
+ <show_in_store>0</show_in_store>
175
+ </orderscount>
176
  </fields>
177
  </debit>
178
  </groups>
app/code/community/Mage/Debit/sql/debit_setup/mysql4-install-0.4.0.php CHANGED
@@ -1,53 +1,87 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  // load id for customer entity
3
  $read = Mage::getSingleton('core/resource')->getConnection('core_read');
4
- $eid = $read->fetchRow("select entity_type_id from {$this->getTable('eav_entity_type')} where entity_type_code = 'customer'");
 
 
5
  $customer_type_id = $eid['entity_type_id'];
6
 
7
  $attr_date = array(
8
- 'type' => 'datetime',
9
- 'input' => 'label',
10
- 'label' => 'Account update date',
11
- 'global' => 1,
12
- 'required' => 0,
13
- 'default' => '',
14
  'position' => '100'
15
  );
16
 
17
  $attr_name = array(
18
- 'type' => 'varchar',
19
- 'input' => 'text',
20
- 'label' => 'Account Name',
21
- 'global' => 1,
22
- 'required' => 0,
23
- 'default' => '',
24
  'position' => '100'
25
  );
26
 
27
-
28
  $attr_number = array(
29
- 'type' => 'varchar',
30
- 'input' => 'text',
31
- 'label' => 'Account number',
32
  'backend' => 'debit/entity_customer_attribute_backend_encrypted',
33
- 'global' => 1,
34
- 'required' => 0,
35
- 'default' => '',
36
  'position' => '100'
37
  );
38
 
39
  $attr_blz = array(
40
- 'type' => 'varchar',
41
- 'input' => 'text',
42
- 'label' => 'Bank code',
43
  'backend' => 'debit/entity_customer_attribute_backend_encrypted',
44
- 'global' => 1,
45
- 'required' => 0,
46
- 'default' => '',
47
  'position' => '100'
48
  );
49
 
50
-
51
  $installer = $this;
52
  $installer->startSetup();
53
 
1
  <?php
2
+ /**
3
+ * This file is part of the Mage_Debit module.
4
+ *
5
+ * PHP version 5
6
+ *
7
+ * NOTICE OF LICENSE
8
+ *
9
+ * This source file is subject to the Open Software License (OSL 3.0)
10
+ * that is bundled with this package in the file LICENSE.txt.
11
+ * It is also available through the world-wide-web at this URL:
12
+ * http://opensource.org/licenses/osl-3.0.php
13
+ * If you did not receive a copy of the license and are unable to
14
+ * obtain it through the world-wide-web, please send an email
15
+ * to license@magentocommerce.com so we can send you a copy immediately.
16
+ *
17
+ * @category Mage
18
+ * @package Mage_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
22
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23
+ * @link http://www.magentocommerce.com/extension/676/
24
+ */
25
+ /**
26
+ * Setup script
27
+ *
28
+ * @category Mage
29
+ * @package Mage_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
32
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @link http://www.magentocommerce.com/extension/676/
35
+ */
36
  // load id for customer entity
37
  $read = Mage::getSingleton('core/resource')->getConnection('core_read');
38
+ $eid = $read->fetchRow(
39
+ "select entity_type_id from {$this->getTable('eav_entity_type')} where entity_type_code = 'customer'"
40
+ );
41
  $customer_type_id = $eid['entity_type_id'];
42
 
43
  $attr_date = array(
44
+ 'type' => 'datetime',
45
+ 'input' => 'label',
46
+ 'label' => 'Account update date',
47
+ 'global' => 1,
48
+ 'required' => 0,
49
+ 'default' => '',
50
  'position' => '100'
51
  );
52
 
53
  $attr_name = array(
54
+ 'type' => 'varchar',
55
+ 'input' => 'text',
56
+ 'label' => 'Account Name',
57
+ 'global' => 1,
58
+ 'required' => 0,
59
+ 'default' => '',
60
  'position' => '100'
61
  );
62
 
 
63
  $attr_number = array(
64
+ 'type' => 'varchar',
65
+ 'input' => 'text',
66
+ 'label' => 'Account number',
67
  'backend' => 'debit/entity_customer_attribute_backend_encrypted',
68
+ 'global' => 1,
69
+ 'required' => 0,
70
+ 'default' => '',
71
  'position' => '100'
72
  );
73
 
74
  $attr_blz = array(
75
+ 'type' => 'varchar',
76
+ 'input' => 'text',
77
+ 'label' => 'Bank code',
78
  'backend' => 'debit/entity_customer_attribute_backend_encrypted',
79
+ 'global' => 1,
80
+ 'required' => 0,
81
+ 'default' => '',
82
  'position' => '100'
83
  );
84
 
 
85
  $installer = $this;
86
  $installer->startSetup();
87
 
app/code/local/Mage/Customer/Model/Attribute/Data/Label.php CHANGED
@@ -12,6 +12,7 @@
12
  *
13
  * ============================================================================
14
  *
 
15
  *
16
  * Magento
17
  *
@@ -31,25 +32,30 @@
31
  * versions in the future. If you wish to customize Magento for your
32
  * needs please refer to http://www.magentocommerce.com for more information.
33
  *
34
- * @category Mage
35
- * @package Mage_Customer
36
- * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
37
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
38
  */
39
  /**
40
  * Customer Attribute Select Data Model
41
  *
42
- * @category Mage
43
- * @package Mage_Customer
44
- * @author Magento Core Team <core@magentocommerce.com>
 
 
45
  */
46
  class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attribute_Data_Abstract
47
  {
48
  /**
49
  * Extract data from request and return value
50
  *
51
- * @param Zend_Controller_Request_Http $request
52
- * @return array|string
 
53
  */
54
  public function extractValue(Zend_Controller_Request_Http $request)
55
  {
@@ -60,8 +66,9 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
60
  * Validate data
61
  * Return true or array of errors
62
  *
63
- * @param array|string $value
64
- * @return boolean|array
 
65
  */
66
  public function validateValue($value)
67
  {
@@ -71,8 +78,9 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
71
  /**
72
  * Export attribute value to entity model
73
  *
74
- * @param array|string $value
75
- * @return Mage_Customer_Model_Attribute_Data_Text
 
76
  */
77
  public function compactValue($value)
78
  {
@@ -85,8 +93,9 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
85
  /**
86
  * Restore attribute value from SESSION to entity model
87
  *
88
- * @param array|string $value
89
- * @return Mage_Customer_Model_Attribute_Data_Abstract
 
90
  */
91
  public function restoreValue($value)
92
  {
@@ -96,8 +105,9 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
96
  /**
97
  * Return a text for option value
98
  *
99
- * @param int $value
100
- * @return string
 
101
  */
102
  protected function _getOptionText($value)
103
  {
@@ -107,7 +117,9 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
107
  /**
108
  * Return formated attribute value from entity model
109
  *
110
- * @return string|array
 
 
111
  */
112
  public function outputValue($format = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_TEXT)
113
  {
@@ -123,7 +135,6 @@ class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attri
123
  }
124
  break;
125
  }
126
-
127
  return $output;
128
  }
129
  }
12
  *
13
  * ============================================================================
14
  *
15
+ * PHP version 5
16
  *
17
  * Magento
18
  *
32
  * versions in the future. If you wish to customize Magento for your
33
  * needs please refer to http://www.magentocommerce.com for more information.
34
  *
35
+ * @category Mage
36
+ * @package Mage_Customer
37
+ * @author Magento Core Team <core@magentocommerce.com>
38
+ * @copyright 2010 Magento Inc. (http://www.magentocommerce.com)
39
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
40
+ * @link http://www.magentocommerce.com
41
  */
42
  /**
43
  * Customer Attribute Select Data Model
44
  *
45
+ * @category Mage
46
+ * @package Mage_Customer
47
+ * @author Magento Core Team <core@magentocommerce.com>
48
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
49
+ * @link http://www.magentocommerce.com
50
  */
51
  class Mage_Customer_Model_Attribute_Data_Label extends Mage_Customer_Model_Attribute_Data_Abstract
52
  {
53
  /**
54
  * Extract data from request and return value
55
  *
56
+ * @param Zend_Controller_Request_Http $request HTTP-Request
57
+ *
58
+ * @return array|string Requested Value
59
  */
60
  public function extractValue(Zend_Controller_Request_Http $request)
61
  {
66
  * Validate data
67
  * Return true or array of errors
68
  *
69
+ * @param array|string $value Value
70
+ *
71
+ * @return boolean|array Return true or array of errors
72
  */
73
  public function validateValue($value)
74
  {
78
  /**
79
  * Export attribute value to entity model
80
  *
81
+ * @param array|string $value Value
82
+ *
83
+ * @return Mage_Customer_Model_Attribute_Data_Text Object
84
  */
85
  public function compactValue($value)
86
  {
93
  /**
94
  * Restore attribute value from SESSION to entity model
95
  *
96
+ * @param array|string $value Value
97
+ *
98
+ * @return Mage_Customer_Model_Attribute_Data_Abstract Object
99
  */
100
  public function restoreValue($value)
101
  {
105
  /**
106
  * Return a text for option value
107
  *
108
+ * @param int $value Option Value
109
+ *
110
+ * @return string Text
111
  */
112
  protected function _getOptionText($value)
113
  {
117
  /**
118
  * Return formated attribute value from entity model
119
  *
120
+ * @param string $format Output format
121
+ *
122
+ * @return string|array Output
123
  */
124
  public function outputValue($format = Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_TEXT)
125
  {
135
  }
136
  break;
137
  }
 
138
  return $output;
139
  }
140
  }
app/design/adminhtml/default/default/template/debit/debit.phtml CHANGED
@@ -1,17 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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
  <?php if($_info = $this->getMethod()): ?>
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <?php if($_info = $this->getMethod()): ?>
app/design/adminhtml/default/default/template/debit/form.phtml CHANGED
@@ -1,16 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
14
  */
15
  ?>
16
  <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
@@ -24,19 +32,19 @@
24
  <li>
25
  <div class="input-box">
26
  <label for="bankleitzahl"><?php echo $this->__('Bankleitzahl') ?> <span class="required">*</span></label><br />
27
- <input type="text" id="bankleitzahl" name="payment[cc_type]" title="<?php echo $this->__('Bankleitzahl') ?>" class="input-text required-entry validate-number validate-debit-blz" value="<?php echo $this->getAccountBLZ() ?>" />
28
  </div>
29
  </li>
30
  <li>
31
  <div class="input-box">
32
  <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?> <span class="required">*</span></label><br />
33
- <input type="text" id="kontoinhaber" name="payment[cc_owner]" title="<?php echo $this->__('Kontoinhaber') ?>" class="input-text required-entry" value="<?php echo $this->getAccountName() ?>" />
34
  </div>
35
  </li>
36
  <li>
37
  <div class="input-box">
38
  <label for="kontonummer"><?php echo $this->__('Konto-Nummer') ?> <span class="required">*</span></label><br />
39
- <input type="text" id="kontonummer" name="payment[cc_number]" title="<?php echo $this->__('Konto-Nummer') ?>" class="input-text required-entry validate-number" value="<?php echo $this->getAccountNumber() ?>" />
40
  </div>
41
  </li>
42
  </ul>
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
32
  <li>
33
  <div class="input-box">
34
  <label for="bankleitzahl"><?php echo $this->__('Bankleitzahl') ?> <span class="required">*</span></label><br />
35
+ <input type="text" id="bankleitzahl" name="payment[debit_cc_type]" title="<?php echo $this->__('Bankleitzahl') ?>" class="input-text required-entry validate-number validate-debit-blz" value="<?php echo $this->getAccountBLZ() ?>" />
36
  </div>
37
  </li>
38
  <li>
39
  <div class="input-box">
40
  <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?> <span class="required">*</span></label><br />
41
+ <input type="text" id="kontoinhaber" name="payment[debit_cc_owner]" title="<?php echo $this->__('Kontoinhaber') ?>" class="input-text required-entry" value="<?php echo $this->getAccountName() ?>" />
42
  </div>
43
  </li>
44
  <li>
45
  <div class="input-box">
46
  <label for="kontonummer"><?php echo $this->__('Konto-Nummer') ?> <span class="required">*</span></label><br />
47
+ <input type="text" id="kontonummer" name="payment[debit_cc_number]" title="<?php echo $this->__('Konto-Nummer') ?>" class="input-text required-entry validate-number" value="<?php echo $this->getAccountNumber() ?>" />
48
  </div>
49
  </li>
50
  </ul>
app/design/adminhtml/default/default/template/debit/info.phtml CHANGED
@@ -1,17 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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
  <?php if ($_info = $this->getMethod()): ?>
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <?php if ($_info = $this->getMethod()): ?>
app/design/frontend/base/default/layout/debit.xml CHANGED
@@ -1,4 +1,27 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <layout version="0.1.0">
3
  <customer_account translate="label">
4
  <reference name="customer_account_navigation">
1
  <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * This file is part of the Mage_Debit module.
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * @category Mage
17
+ * @package Mage_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
20
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @link http://www.magentocommerce.com/extension/676/
23
+ */
24
+ -->
25
  <layout version="0.1.0">
26
  <customer_account translate="label">
27
  <reference name="customer_account_navigation">
app/design/frontend/base/default/template/debit/account/data.phtml CHANGED
@@ -1,17 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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
  <div class="page-title">
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <div class="page-title">
app/design/frontend/base/default/template/debit/form.phtml CHANGED
@@ -1,17 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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
  <script type="text/javascript">
@@ -38,19 +45,19 @@ blzCheck = new blzAjaxCheck('<?php echo $this->getUrl('debit/ajax/checkblz');?>'
38
  <li>
39
  <div class="input-box" style="width:500px;width:500px;position:relative;">
40
  <label for="bankleitzahl"><?php echo $this->__('Bankleitzahl') ?> <span class="required">*</span></label><br />
41
- <input type="text" id="bankleitzahl" name="payment[cc_type]" title="<?php echo $this->__('Bankleitzahl') ?>" class="input-text required-entry validate-number validate-debit-blz" style="display: block; float: left;" value="<?php echo $this->getAccountBLZ() ?>" onchange="blzCheck.checkBlz(this); return false;"/>
42
  </div>
43
  </li>
44
  <li>
45
  <div class="input-box">
46
  <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?> <span class="required">*</span></label><br />
47
- <input type="text" id="kontoinhaber" name="payment[cc_owner]" title="<?php echo $this->__('Kontoinhaber') ?>" class="input-text required-entry" value="<?php echo $this->getAccountName() ?>" />
48
  </div>
49
  </li>
50
  <li>
51
  <div class="input-box">
52
  <label for="kontonummer"><?php echo $this->__('Konto-Nummer') ?> <span class="required">*</span></label><br />
53
- <input type="text" id="kontonummer" name="payment[cc_number]" title="<?php echo $this->__('Konto-Nummer') ?>" maxlenth="10" class="input-text required-entry validate-number validate-debit-number" value="<?php echo $this->getAccountNumber() ?>" />
54
  </div>
55
  </li>
56
  </ul>
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <script type="text/javascript">
45
  <li>
46
  <div class="input-box" style="width:500px;width:500px;position:relative;">
47
  <label for="bankleitzahl"><?php echo $this->__('Bankleitzahl') ?> <span class="required">*</span></label><br />
48
+ <input type="text" id="bankleitzahl" name="payment[debit_cc_type]" title="<?php echo $this->__('Bankleitzahl') ?>" class="input-text required-entry validate-number validate-debit-blz" style="display: block; float: left;" value="<?php echo $this->getAccountBLZ() ?>" onchange="blzCheck.checkBlz(this); return false;"/>
49
  </div>
50
  </li>
51
  <li>
52
  <div class="input-box">
53
  <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?> <span class="required">*</span></label><br />
54
+ <input type="text" id="kontoinhaber" name="payment[debit_cc_owner]" title="<?php echo $this->__('Kontoinhaber') ?>" class="input-text required-entry" value="<?php echo $this->getAccountName() ?>" />
55
  </div>
56
  </li>
57
  <li>
58
  <div class="input-box">
59
  <label for="kontonummer"><?php echo $this->__('Konto-Nummer') ?> <span class="required">*</span></label><br />
60
+ <input type="text" id="kontonummer" name="payment[debit_cc_number]" title="<?php echo $this->__('Konto-Nummer') ?>" maxlength="11" class="input-text required-entry validate-number validate-debit-number" value="<?php echo $this->getAccountNumber() ?>" />
61
  </div>
62
  </li>
63
  </ul>
app/design/frontend/base/default/template/debit/info.phtml CHANGED
@@ -1,17 +1,24 @@
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
- * @package Mage_Debit
12
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
13
- * @copyright 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
  <?php if ($_info = $this->getMethod()): ?>
1
  <?php
2
  /**
3
+ * This file is part of the Mage_Debit module.
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 Mage
16
+ * @package Mage_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
20
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
21
+ * @link http://www.magentocommerce.com/extension/676/
22
  */
23
  ?>
24
  <?php if ($_info = $this->getMethod()): ?>
app/etc/modules/Mage_Debit.xml CHANGED
@@ -1,17 +1,25 @@
1
  <?xml version="1.0"?>
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
- * @package Mage_Debit
13
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
14
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
15
  */
16
  -->
17
  <config>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Mage_Debit module.
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
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * @category Mage
17
+ * @package Mage_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
20
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @link http://www.magentocommerce.com/extension/676/
23
  */
24
  -->
25
  <config>
app/locale/de_DE/Mage_Debit.csv CHANGED
@@ -23,4 +23,10 @@
23
  "Please enter a valid bank code.","Bitte geben Sie eine gültige Bankleitzahl ein."
24
  "Please enter a valid bank acount number.","Bitte geben Sie eine gültige Konto-Nummer ein."
25
  "Save account data","Bankdaten speichern"
26
- "Checkout only with valid BLZ","Bestellung nur mit gültiger BLZ möglich"
 
 
 
 
 
 
23
  "Please enter a valid bank code.","Bitte geben Sie eine gültige Bankleitzahl ein."
24
  "Please enter a valid bank acount number.","Bitte geben Sie eine gültige Konto-Nummer ein."
25
  "Save account data","Bankdaten speichern"
26
+ "Checkout only with valid BLZ","Bestellung nur mit gültiger BLZ möglich"
27
+ "Enabled for all customer groups","Für alle Kundengruppen aktiviert"
28
+ "Enabled only for specific customer groups","Nur für bestimmte Kunden- gruppen aktivieren"
29
+ "Set to ""no"" if you want to enable DebitPayment only for specific customer groups defined below.","Auf ""Nein"" umstellen, wenn Sie DebitPayment nur für untenstehende Kundengruppen aktivieren möchten"
30
+ "Minimum Orders Count","Mindestanzahl an Bestellungen"
31
+ "-- Please Select --","-- Bitte wählen --"
32
+ "Default: ""0"" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.","Standard: ""0"" zum Deaktivieren des Checks | Mindestanzahl an Bestellungen (in der Vergangenheit) eines Kunden um Zahlungsart nutzen zu dürfen."
app/locale/en_US/Mage_Debit.csv CHANGED
@@ -23,4 +23,10 @@
23
  "Please enter a valid bank code.","Please enter a valid bank code."
24
  "Please enter a valid bank acount number.","Please enter a valid bank account number."
25
  "Save account data","Save account data"
26
- "Checkout only with valid BLZ","Checkout only with valid BLZ"
 
 
 
 
 
 
23
  "Please enter a valid bank code.","Please enter a valid bank code."
24
  "Please enter a valid bank acount number.","Please enter a valid bank account number."
25
  "Save account data","Save account data"
26
+ "Checkout only with valid BLZ","Checkout only with valid BLZ"
27
+ "Enabled for all customer groups","Enabled for all customer groups"
28
+ "Enabled only for specific customer groups","Enabled only for specific customer groups"
29
+ "Set to ""no"" if you want to enable DebitPayment only for specific customer groups defined below.","Set to ""no"" if you want to enable DebitPayment only for specific customer groups defined below."
30
+ "Minimum Orders Count","Minimum Orders Count"
31
+ "-- Please Select --","-- Please Select --"
32
+ "Default: ""0"" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.","Default: ""0"" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method."
js/mage/debit/blzcheck.js CHANGED
@@ -1,16 +1,23 @@
1
  /**
2
- * Magento
3
- *
4
  * NOTICE OF LICENSE
5
- *
6
  * This source file is subject to the Open Software License (OSL 3.0)
7
- * that is available through the world-wide-web at this URL:
 
8
  * http://opensource.org/licenses/osl-3.0.php
 
 
 
9
  *
10
- * @package Mage_Debit
11
- * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
12
- * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
13
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
14
  */
15
 
16
  var blzAjaxCheck = Class.create();
@@ -56,9 +63,9 @@ Event.observe(window, 'load', function() {
56
 
57
  blzCheck.checkBlz();
58
  if(blzCheck.checkoutValidBlz == 1) {
59
- if (!blzCheck.isBlzValid) {
60
- return false;
61
- }
62
  }
63
 
64
  if (v.length == 8 || v.length == 5) {
1
  /**
2
+ * This file is part of the Mage_Debit module.
3
+ *
4
  * NOTICE OF LICENSE
5
+ *
6
  * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
  * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to license@magentocommerce.com so we can send you a copy immediately.
13
  *
14
+ * @category Mage
15
+ * @package Mage_Debit
16
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
17
+ * @copyright 2011 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
18
+ * @copyright 2010 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @link http://www.magentocommerce.com/extension/676/
21
  */
22
 
23
  var blzAjaxCheck = Class.create();
63
 
64
  blzCheck.checkBlz();
65
  if(blzCheck.checkoutValidBlz == 1) {
66
+ if (!blzCheck.isBlzValid) {
67
+ return false;
68
+ }
69
  }
70
 
71
  if (v.length == 8 || v.length == 5) {
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DebitPayment</name>
4
- <version>0.4.7</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
@@ -54,9 +54,9 @@
54
  0.1.0
55
  - erste Ver&#xF6;ffentlichung mit einer Grundfunktionalit&#xE4;t</notes>
56
  <authors><author><name>ITABS GmbH - Rouven Alexander Rieker</name><user>auto-converted</user><email>rouven.rieker@itabs.de</email></author></authors>
57
- <date>2011-04-13</date>
58
- <time>19:39:56</time>
59
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="debit"><file name="debit.phtml" hash="4d7c2f546bf6a5b4909e101f3c916096"/><file name="form.phtml" hash="9a293de3e517070264f3fdcfb2f62322"/><file name="info.phtml" hash="ebd81977a97c2e0bf56256ac24cb132e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="debit.xml" hash="1aed830fbbafda282aa0b04272ac2b92"/></dir><dir name="template"><dir name="debit"><dir name="account"><file name="data.phtml" hash="e056a93c23c46acc1f45f9f3dbff1635"/></dir><file name="form.phtml" hash="687978602194b112844ba4a7c38d97b1"/><file name="info.phtml" hash="dd5e3219e407936409983d28729448a6"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Mage"><dir name="Customer"><dir name="Model"><dir name="Attribute"><dir name="Data"><file name="Label.php" hash="f871b2cb0665e4e4c381c4551780ea34"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="mage"><dir name="debit"><file name="blzcheck.js" hash="ce9cd6b2fa2ceffbcab0c73723a57d24"/></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Mage_Debit.csv" hash="575c4ace344a03252220321a2b0c549d"/></dir><dir name="en_US"><file name="Mage_Debit.csv" hash="63ad3ad4df88dae34016a5f0596ec51c"/></dir></target><target name="magecommunity"><dir name="Mage"><dir name="Debit"><dir name="Block"><dir name="Account"><file name="Data.php" hash="0011a76a6fd0e9d1a7f8440af8b7d82c"/></dir><file name="Form.php" hash="324edcddd520ddb2ef9eb5312a2739b4"/><file name="Info.php" hash="06e70880fd74de55918365fb2532a43a"/></dir><dir name="controllers"><file name="AccountController.php" hash="2e6f5ef578ec717f90e8553945dd814a"/><file name="AjaxController.php" hash="cb1db1bbc9f918e5827fdfe96429da95"/></dir><dir name="etc"><file name="bankleitzahlen.csv" hash="f8bffe3ed2bb92f2400498687769365c"/><file name="config.xml" hash="63a9a323d141a5466ff8c3a96bd5aad0"/><file name="system.xml" hash="708c7eed1f1b66d562c8e7bba634e882"/></dir><dir name="Helper"><file name="Data.php" hash="7f4d25a3966f4cbbb29c3ad07fc9d773"/></dir><dir name="Model"><dir name="Entity"><dir name="Customer"><dir name="Attribute"><dir name="Backend"><file name="Encrypted.php" hash="69aa838f95e434953ba57296a8df1c23"/></dir></dir></dir></dir><file name="Debit.php" hash="87431e897e841913614c46455f9f0384"/><file name="Observer.php" hash="6cfe64694015011249b1f697c78d295e"/></dir><dir name="sql"><dir name="debit_setup"><file name="mysql4-install-0.4.0.php" hash="0abb361b4225522a814c8443892489f8"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Debit.xml" hash="2adc6590065ac120c858912536d0ec2a"/></dir></target></contents>
60
  <compatible/>
61
  <dependencies/>
62
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DebitPayment</name>
4
+ <version>0.4.9</version>
5
  <stability>stable</stability>
6
  <license>OSL v3.0</license>
7
  <channel>community</channel>
54
  0.1.0
55
  - erste Ver&#xF6;ffentlichung mit einer Grundfunktionalit&#xE4;t</notes>
56
  <authors><author><name>ITABS GmbH - Rouven Alexander Rieker</name><user>auto-converted</user><email>rouven.rieker@itabs.de</email></author></authors>
57
+ <date>2011-07-19</date>
58
+ <time>09:28:47</time>
59
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="debit"><file name="debit.phtml" hash="668381d2a305c522b46470c6b56ba836"/><file name="form.phtml" hash="c309248ba984f388593fdedf05bb844d"/><file name="info.phtml" hash="df0d0b2353b4b18f6489e6d822acdcb3"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="debit.xml" hash="7073be54bb35f85fe37d6bb3cf0c51c7"/></dir><dir name="template"><dir name="debit"><dir name="account"><file name="data.phtml" hash="39bd5d531b9e20124d1ac4874a9ca8c1"/></dir><file name="form.phtml" hash="b18f8d37dc7f3189f823592e44fe3df5"/><file name="info.phtml" hash="659a419f57de40e9d2cedbd819002813"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="app"><dir name="code"><dir name="local"><dir name="Mage"><dir name="Customer"><dir name="Model"><dir name="Attribute"><dir name="Data"><file name="Label.php" hash="89b809662cd9dc3c7a26f99c494597f4"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="js"><dir name="mage"><dir name="debit"><file name="blzcheck.js" hash="99c6d2638404860043105207f616d7db"/></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Mage_Debit.csv" hash="953e30bcb8c07623773fb0be42120335"/></dir><dir name="en_US"><file name="Mage_Debit.csv" hash="1e7a6bf76f185a89dca643e63d95dbff"/></dir></target><target name="magecommunity"><dir name="Mage"><dir name="Debit"><dir name="Block"><dir name="Account"><file name="Data.php" hash="00caa8c5b2900eaf8601672fc9a989c0"/></dir><file name="Form.php" hash="5c8a3ad068cf18788ec0a70339edbf50"/><file name="Info.php" hash="0bc4694dce19f8f859126e01acc643af"/></dir><dir name="controllers"><file name="AccountController.php" hash="aaeefa718ddd5681a22a494535ad89b8"/><file name="AjaxController.php" hash="65bfdaf619caa811707140691b110424"/></dir><dir name="etc"><file name="bankleitzahlen.csv" hash="2efa8e81a1a8abe640045982fff78b70"/><file name="config.xml" hash="450adc7120463853edac670a52c3e85d"/><file name="system.xml" hash="4b84c5ddae5b672f229f8ab346095b76"/></dir><dir name="Helper"><file name="Data.php" hash="5339ea3c22eed7385baf7de661647b33"/></dir><dir name="Model"><dir name="Entity"><dir name="Customer"><dir name="Attribute"><dir name="Backend"><file name="Encrypted.php" hash="73407cb3592b42b9813b8b8a85a32b1b"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Customer"><file name="Group.php" hash="c46060c44860e7021aac664af577a8cf"/></dir></dir></dir></dir><file name="Debit.php" hash="9db05346ed8270d24d5b9001f17caaa9"/><file name="Observer.php" hash="1f53f2328777ed233819eeaa77834f5f"/></dir><dir name="sql"><dir name="debit_setup"><file name="mysql4-install-0.4.0.php" hash="7ca6cbfb5a5f9dc4c76e2247fb7dc7a0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Debit.xml" hash="3a07e78ad3de76f12d3db7b88cefda1a"/></dir></target></contents>
60
  <compatible/>
61
  <dependencies/>
62
  </package>