DebitPayment - Version 1.0.0

Version Notes

-

Download this release

Release Info

Developer Rouven Alexander Rieker
Extension DebitPayment
Version 1.0.0
Comparing to
See all releases


Code changes from version 0.5.4 to 1.0.0

Files changed (64) hide show
  1. app/code/community/{Mage → Itabs}/Debit/Block/Account/Data.php +55 -14
  2. app/code/community/{Mage → Itabs}/Debit/Block/Adminhtml/Order.php +20 -15
  3. app/code/community/{Mage → Itabs}/Debit/Block/Adminhtml/Order/Grid.php +60 -15
  4. app/code/community/{Mage → Itabs}/Debit/Block/Form.php +41 -14
  5. app/code/community/{Mage → Itabs}/Debit/Block/Info.php +51 -19
  6. app/code/community/{Mage → Itabs}/Debit/Helper/Adminhtml.php +15 -13
  7. app/code/community/{Mage → Itabs}/Debit/Helper/Data.php +51 -14
  8. app/code/community/{Mage → Itabs}/Debit/Model/Debit.php +60 -14
  9. app/code/community/{Mage → Itabs}/Debit/Model/Entity/Customer/Attribute/Backend/Encrypted.php +14 -14
  10. app/code/community/Itabs/Debit/Model/Export/Abstract.php +93 -0
  11. app/code/community/Itabs/Debit/Model/Export/Csv.php +114 -0
  12. app/code/community/Itabs/Debit/Model/Export/Dtaus.php +94 -0
  13. app/code/community/Itabs/Debit/Model/Export/Interface.php +46 -0
  14. app/code/community/{Mage → Itabs}/Debit/Model/Mysql4/Orders.php +12 -10
  15. app/code/community/{Mage → Itabs}/Debit/Model/Mysql4/Orders/Collection.php +13 -10
  16. app/code/community/{Mage → Itabs}/Debit/Model/Observer.php +22 -56
  17. app/code/community/{Mage → Itabs}/Debit/Model/Orders.php +12 -10
  18. app/code/community/{Mage → Itabs}/Debit/Model/System/Config/Source/Customer/Group.php +12 -11
  19. app/code/community/Itabs/Debit/Model/System/Config/Source/Debit/Status.php +82 -0
  20. app/code/community/Itabs/Debit/Model/System/Config/Source/Debit/Type.php +82 -0
  21. app/code/community/Itabs/Debit/Model/Validation.php +222 -0
  22. app/code/community/Itabs/Debit/Test/Helper/Data.php +82 -0
  23. app/code/community/Itabs/Debit/Test/Helper/Data/expectations/testGetBankByBlz.yaml +7 -0
  24. app/code/community/Itabs/Debit/Test/Helper/Data/expectations/testSanitizeData.yaml +8 -0
  25. app/code/community/Itabs/Debit/Test/Helper/Data/providers/testGetBankByBlz.yaml +8 -0
  26. app/code/community/Itabs/Debit/Test/Helper/Data/providers/testSanitizeData.yaml +9 -0
  27. app/code/community/Itabs/Debit/Test/Model/Debit.php +59 -0
  28. app/code/community/Itabs/Debit/Test/Model/Debit/expectations/testMaskString.yaml +4 -0
  29. app/code/community/Itabs/Debit/Test/Model/Debit/providers/testMaskString.yaml +5 -0
  30. app/code/community/{Mage → Itabs}/Debit/controllers/AccountController.php +24 -14
  31. app/code/community/Itabs/Debit/controllers/Adminhtml/OrderController.php +218 -0
  32. app/code/community/{Mage → Itabs}/Debit/controllers/AjaxController.php +12 -12
  33. app/code/community/{Mage → Itabs}/Debit/etc/adminhtml.xml +6 -5
  34. app/code/community/{Mage → Itabs}/Debit/etc/bankleitzahlen.csv +0 -0
  35. app/code/community/{Mage → Itabs}/Debit/etc/config.xml +61 -28
  36. app/code/community/{Mage → Itabs}/Debit/etc/system.xml +75 -37
  37. app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-install-0.4.0.php +11 -11
  38. app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.3.0-0.4.0.php +11 -11
  39. app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.4.9-0.5.0.php +16 -10
  40. app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.5.0-0.5.1.php +11 -9
  41. app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.5.1-0.5.2.php +20 -12
  42. app/code/community/Itabs/Debit/sql/debit_setup/mysql4-upgrade-0.5.2-1.0.0.php +161 -0
  43. app/code/community/Mage/Debit/controllers/Adminhtml/OrderController.php +0 -240
  44. app/design/adminhtml/default/default/layout/debit.xml +23 -0
  45. app/design/adminhtml/default/default/template/debit/debit.phtml +9 -9
  46. app/design/adminhtml/default/default/template/debit/form.phtml +8 -8
  47. app/design/adminhtml/default/default/template/debit/info.phtml +16 -18
  48. app/design/adminhtml/default/default/template/debit/sepa/debit.phtml +39 -0
  49. app/design/adminhtml/default/default/template/debit/sepa/form.phtml +56 -0
  50. app/design/adminhtml/default/default/template/debit/sepa/info.phtml +71 -0
  51. app/design/frontend/base/default/layout/debit.xml +16 -16
  52. app/design/frontend/base/default/template/debit/account/data.phtml +9 -9
  53. app/design/frontend/base/default/template/debit/form.phtml +15 -15
  54. app/design/frontend/base/default/template/debit/info.phtml +11 -11
  55. app/design/frontend/base/default/template/debit/sepa/account/data.phtml +71 -0
  56. app/design/frontend/base/default/template/debit/sepa/form.phtml +58 -0
  57. app/design/frontend/base/default/template/debit/sepa/info.phtml +68 -0
  58. app/etc/modules/Itabs_Debit.xml +35 -0
  59. app/etc/modules/Mage_Debit.xml +8 -7
  60. app/locale/de_DE/{Mage_Debit.csv → Itabs_Debit.csv} +10 -2
  61. app/locale/en_US/{Mage_Debit.csv → Itabs_Debit.csv} +7 -3
  62. js/{mage → itabs}/debit/blzcheck.js +10 -10
  63. lib/DTA/DTABase.php +1 -6
  64. package.xml +5 -5
app/code/community/{Mage → Itabs}/Debit/Block/Account/Data.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,28 +14,45 @@
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 2012 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 2012 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
  * Returns the bank name
41
  *
@@ -85,6 +102,26 @@ class Mage_Debit_Block_Account_Data
85
  return $this->_getAccountData('debit_payment_acount_number');
86
  }
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  /**
89
  * Returns the specific value of the requested field from the
90
  * customer model.
@@ -101,10 +138,14 @@ class Mage_Debit_Block_Account_Data
101
  if (strlen($data) == 0) {
102
  return '';
103
  }
104
- if ($field != 'debit_payment_acount_name' && !is_numeric($data)) {
 
 
 
 
105
  return '';
106
  }
107
 
108
- return $this->htmlEscape($data);
109
  }
110
  }
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Debit Form Block for customer account page
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Block_Account_Data
37
  extends Mage_Customer_Block_Account_Dashboard
38
  {
39
+ /**
40
+ * Set the right template dependend on the debit type
41
+ *
42
+ * @return void
43
+ */
44
+ protected function _construct()
45
+ {
46
+ parent::_construct();
47
+
48
+ /* @var $helper Itabs_Debit_Helper_Data */
49
+ $helper = Mage::helper('debit');
50
+ if ($helper->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_SEPA) {
51
+ $this->setTemplate('debit/sepa/account/data.phtml');
52
+ } else {
53
+ $this->setTemplate('debit/account/data.phtml');
54
+ }
55
+ }
56
  /**
57
  * Returns the bank name
58
  *
102
  return $this->_getAccountData('debit_payment_acount_number');
103
  }
104
 
105
+ /**
106
+ * Returns the swift code of the specific account
107
+ *
108
+ * @return string
109
+ */
110
+ public function getAccountSwift()
111
+ {
112
+ return $this->_getAccountData('debit_payment_account_swift');
113
+ }
114
+
115
+ /**
116
+ * Returns the iban of the specific account
117
+ *
118
+ * @return string
119
+ */
120
+ public function getAccountIban()
121
+ {
122
+ return $this->_getAccountData('debit_payment_account_iban');
123
+ }
124
+
125
  /**
126
  * Returns the specific value of the requested field from the
127
  * customer model.
138
  if (strlen($data) == 0) {
139
  return '';
140
  }
141
+ if ($field != 'debit_payment_acount_name'
142
+ && $field != 'debit_payment_account_swift'
143
+ && $field != 'debit_payment_account_iban'
144
+ && !is_numeric($data)
145
+ ) {
146
  return '';
147
  }
148
 
149
+ return $this->escapeHtml($data);
150
  }
151
  }
app/code/community/{Mage → Itabs}/Debit/Block/Adminhtml/Order.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,26 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Backend View for Order Export list
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Block_Adminhtml_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
35
  {
36
  /**
37
  * Class constructor
@@ -40,31 +42,34 @@ class Mage_Debit_Block_Adminhtml_Order extends Mage_Adminhtml_Block_Widget_Grid_
40
  */
41
  public function __construct()
42
  {
 
 
 
43
  $this->_controller = 'adminhtml_order';
44
  $this->_blockGroup = 'debit';
45
- $this->_headerText = Mage::helper('debit')->__('Debit Payment Orders');
46
  parent::__construct();
47
  $this->_removeButton('add');
48
 
49
  if (Mage::helper('debit/adminhtml')->hasExportRequirements()) {
50
  $this->_addButton('sync', array(
51
- 'label' => Mage::helper('debit')->__('Sync Orders'),
52
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/sync') .'\')',
53
  'class' => 'add',
54
  ));
55
  $this->_addButton('export_dtaus', array(
56
- 'label' => Mage::helper('debit')->__('Export as DTAUS'),
57
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/exportdtaus') .'\')',
58
  'class' => '',
59
  ));
60
  $this->_addButton('export_csv', array(
61
- 'label' => Mage::helper('debit')->__('Export as CSV'),
62
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/exportcsv') .'\')',
63
  'class' => '',
64
  ));
65
  } else {
66
  Mage::getSingleton('adminhtml/session')->addError(
67
- Mage::helper('debit')->__('Please enter bankaccount credentials of the store owner in the system configuration. Otherwise you will not be able to generate a valid export file.')
68
  );
69
  }
70
  }
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Backend View for Order Export list
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Block_Adminhtml_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
37
  {
38
  /**
39
  * Class constructor
42
  */
43
  public function __construct()
44
  {
45
+ /* @var $helper Itabs_Debit_Helper_Data */
46
+ $helper = Mage::helper('debit');
47
+
48
  $this->_controller = 'adminhtml_order';
49
  $this->_blockGroup = 'debit';
50
+ $this->_headerText = $helper->__('Debit Payment Orders');
51
  parent::__construct();
52
  $this->_removeButton('add');
53
 
54
  if (Mage::helper('debit/adminhtml')->hasExportRequirements()) {
55
  $this->_addButton('sync', array(
56
+ 'label' => $helper->__('Sync Orders'),
57
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/sync') .'\')',
58
  'class' => 'add',
59
  ));
60
  $this->_addButton('export_dtaus', array(
61
+ 'label' => $helper->__('Export as DTAUS'),
62
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/exportdtaus') .'\')',
63
  'class' => '',
64
  ));
65
  $this->_addButton('export_csv', array(
66
+ 'label' => $helper->__('Export as CSV'),
67
  'onclick' => 'setLocation(\'' . $this->getUrl('*/*/exportcsv') .'\')',
68
  'class' => '',
69
  ));
70
  } else {
71
  Mage::getSingleton('adminhtml/session')->addError(
72
+ $helper->__('Please enter bankaccount credentials of the store owner in the system configuration.')
73
  );
74
  }
75
  }
app/code/community/{Mage → Itabs}/Debit/Block/Adminhtml/Order/Grid.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,26 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Order Export Grid
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
  {
36
  /**
37
  * Class Constructor
@@ -98,6 +100,24 @@ class Mage_Debit_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_
98
  'currency' => 'order_currency_code',
99
  )
100
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  $this->addColumn(
102
  'status',
103
  array(
@@ -105,16 +125,41 @@ class Mage_Debit_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_
105
  'index' => 'status',
106
  'type' => 'options',
107
  'width' => '150px',
108
- 'options' => array(
109
- 0 => $this->_getHelper()->__('Not exported'),
110
- 1 => $this->_getHelper()->__('Exported')
111
- ),
112
  )
113
  );
114
 
115
  return parent::_prepareColumns();
116
  }
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  /**
119
  * (non-PHPdoc)
120
  * @see Mage_Adminhtml_Block_Widget_Grid::getRowUrl()
@@ -127,7 +172,7 @@ class Mage_Debit_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_
127
  /**
128
  * Retrieve the helper class
129
  *
130
- * @return Mage_Debit_Helper_Adminhtml Helper
131
  */
132
  protected function _getHelper()
133
  {
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Order Export Grid
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
37
  {
38
  /**
39
  * Class Constructor
100
  'currency' => 'order_currency_code',
101
  )
102
  );
103
+
104
+ $types = Mage::getModel('debit/system_config_source_debit_type')
105
+ ->toOptionHash();
106
+
107
+ $this->addColumn(
108
+ 'debit_type',
109
+ array(
110
+ 'header' => $this->_getHelper()->__('Debit Type'),
111
+ 'index' => 'debit_type',
112
+ 'type' => 'options',
113
+ 'options' => $types,
114
+ 'width' => '100px',
115
+ )
116
+ );
117
+
118
+ $statuses = Mage::getSingleton('debit/system_config_source_debit_status')
119
+ ->toOptionHash();
120
+
121
  $this->addColumn(
122
  'status',
123
  array(
125
  'index' => 'status',
126
  'type' => 'options',
127
  'width' => '150px',
128
+ 'options' => $statuses
 
 
 
129
  )
130
  );
131
 
132
  return parent::_prepareColumns();
133
  }
134
 
135
+ protected function _prepareMassaction()
136
+ {
137
+ $this->setMassactionIdField('id');
138
+ $this->getMassactionBlock()->setFormFieldName('orders');
139
+
140
+ $values = Mage::getSingleton('debit/system_config_source_debit_status')
141
+ ->toOptionArray();
142
+
143
+ $this->getMassactionBlock()->addItem(
144
+ 'status',
145
+ array(
146
+ 'label' => Mage::helper('catalog')->__('Change status'),
147
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
148
+ 'additional' => array(
149
+ 'visibility' => array(
150
+ 'name' => 'status',
151
+ 'type' => 'select',
152
+ 'class' => 'required-entry',
153
+ 'label' => $this->_getHelper()->__('Status'),
154
+ 'values' => $values
155
+ )
156
+ )
157
+ )
158
+ );
159
+
160
+ return $this;
161
+ }
162
+
163
  /**
164
  * (non-PHPdoc)
165
  * @see Mage_Adminhtml_Block_Widget_Grid::getRowUrl()
172
  /**
173
  * Retrieve the helper class
174
  *
175
+ * @return Itabs_Debit_Helper_Adminhtml Helper
176
  */
177
  protected function _getHelper()
178
  {
app/code/community/{Mage → Itabs}/Debit/Block/Form.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
  {
38
  /**
39
  * Construct payment form block and set template
@@ -43,7 +43,14 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
43
  protected function _construct()
44
  {
45
  parent::_construct();
46
- $this->setTemplate('debit/form.phtml');
 
 
 
 
 
 
 
47
  }
48
 
49
  /**
@@ -99,6 +106,26 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
99
  return $this->_getAccountData('debit_payment_acount_name');
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  /**
103
  * Returns the account number from the payment info instance
104
  *
@@ -133,7 +160,7 @@ class Mage_Debit_Block_Form extends Mage_Payment_Block_Form
133
  return '';
134
  }
135
 
136
- return $this->htmlEscape($data);
137
  }
138
 
139
  /**
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Debit Form Block
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Block_Form extends Mage_Payment_Block_Form
37
  {
38
  /**
39
  * Construct payment form block and set template
43
  protected function _construct()
44
  {
45
  parent::_construct();
46
+
47
+ /* @var $helper Itabs_Debit_Helper_Data */
48
+ $helper = Mage::helper('debit');
49
+ if ($helper->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_SEPA) {
50
+ $this->setTemplate('debit/sepa/form.phtml');
51
+ } else {
52
+ $this->setTemplate('debit/form.phtml');
53
+ }
54
  }
55
 
56
  /**
106
  return $this->_getAccountData('debit_payment_acount_name');
107
  }
108
 
109
+ /**
110
+ * Returns the swift code of the specific account
111
+ *
112
+ * @return string
113
+ */
114
+ public function getAccountSwift()
115
+ {
116
+ return $this->_getAccountData('debit_payment_account_swift');
117
+ }
118
+
119
+ /**
120
+ * Returns the iban of the specific account
121
+ *
122
+ * @return string
123
+ */
124
+ public function getAccountIban()
125
+ {
126
+ return $this->_getAccountData('debit_payment_account_iban');
127
+ }
128
+
129
  /**
130
  * Returns the account number from the payment info instance
131
  *
160
  return '';
161
  }
162
 
163
+ return $this->escapeHtml($data);
164
  }
165
 
166
  /**
app/code/community/{Mage → Itabs}/Debit/Block/Info.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
  {
38
  /**
39
  * Construct payment info block and set template
@@ -43,7 +43,14 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
43
  protected function _construct()
44
  {
45
  parent::_construct();
46
- $this->setTemplate('debit/info.phtml');
 
 
 
 
 
 
 
47
  }
48
 
49
  /**
@@ -53,7 +60,13 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
53
  */
54
  public function toPdf()
55
  {
56
- $this->setTemplate('debit/debit.phtml');
 
 
 
 
 
 
57
 
58
  return $this->toHtml();
59
  }
@@ -94,6 +107,16 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
94
  return Mage::getStoreConfigFlag('payment/'.$method.'/sendmail');
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
97
  /**
98
  * Returns email data and mask the data if necessary
99
  *
@@ -101,16 +124,25 @@ class Mage_Debit_Block_Info extends Mage_Payment_Block_Info
101
  */
102
  public function getEmailData()
103
  {
 
 
 
104
  $payment = $this->getMethod();
105
  $method = $this->getMethod()->getCode();
106
  $data = array(
107
- 'account_name' => $payment->getAccountName(),
108
- 'account_number' => $payment->getAccountNumber(),
109
- 'account_blz' => $payment->getAccountBLZ(),
110
- 'bank_name' => $payment->getAccountBankname()
 
 
 
111
  );
 
112
  // mask bank data
113
- if (Mage::getStoreConfigFlag('payment/'.$method.'/sendmail_crypt')) {
 
 
114
  $number = $payment->maskString($payment->getAccountNumber());
115
  $routing = $payment->maskString($payment->getAccountBLZ());
116
  $data['account_number'] = $number;
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Debit Info Block
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Block_Info extends Mage_Payment_Block_Info
37
  {
38
  /**
39
  * Construct payment info block and set template
43
  protected function _construct()
44
  {
45
  parent::_construct();
46
+
47
+ /* @var $helper Itabs_Debit_Helper_Data */
48
+ $helper = Mage::helper('debit');
49
+ if ($helper->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_SEPA) {
50
+ $this->setTemplate('debit/sepa/info.phtml');
51
+ } else {
52
+ $this->setTemplate('debit/info.phtml');
53
+ }
54
  }
55
 
56
  /**
60
  */
61
  public function toPdf()
62
  {
63
+ /* @var $helper Itabs_Debit_Helper_Data */
64
+ $helper = Mage::helper('debit');
65
+ if ($helper->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_SEPA) {
66
+ $this->setTemplate('debit/sepa/debit.phtml');
67
+ } else {
68
+ $this->setTemplate('debit/debit.phtml');
69
+ }
70
 
71
  return $this->toHtml();
72
  }
107
  return Mage::getStoreConfigFlag('payment/'.$method.'/sendmail');
108
  }
109
 
110
+ /**
111
+ * Retrieve the debit type
112
+ *
113
+ * @return string
114
+ */
115
+ public function getDebitType()
116
+ {
117
+ return Mage::helper('debit')->getDebitType();
118
+ }
119
+
120
  /**
121
  * Returns email data and mask the data if necessary
122
  *
124
  */
125
  public function getEmailData()
126
  {
127
+ $debitType = $this->getDebitType();
128
+
129
+ /* @var $payment Itabs_Debit_Model_Debit */
130
  $payment = $this->getMethod();
131
  $method = $this->getMethod()->getCode();
132
  $data = array(
133
+ 'account_name' => $payment->getAccountName(),
134
+ 'account_number' => $payment->getAccountNumber(),
135
+ 'account_blz' => $payment->getAccountBLZ(),
136
+ 'bank_name' => $payment->getAccountBankname(),
137
+ 'account_swift' => $payment->getAccountSwift(),
138
+ 'account_iban' => $payment->getAccountIban(),
139
+ 'debit_type' => $debitType
140
  );
141
+
142
  // mask bank data
143
+ if (Mage::getStoreConfigFlag('payment/'.$method.'/sendmail_crypt')
144
+ && $debitType == 'bank'
145
+ ) {
146
  $number = $payment->maskString($payment->getAccountNumber());
147
  $routing = $payment->maskString($payment->getAccountBLZ());
148
  $data['account_number'] = $number;
app/code/community/{Mage → Itabs}/Debit/Helper/Adminhtml.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,26 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Helper class for helper functionalities especially in the adminhtml area..
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Helper_Adminhtml extends Mage_Debit_Helper_Data
35
  {
36
  const XML_PATH_BANKACCOUNT_ACCOUNTOWNER = 'debitpayment/bankaccount/account_owner';
37
  const XML_PATH_BANKACCOUNT_ROUTINGNUMBER = 'debitpayment/bankaccount/routing_number';
@@ -91,12 +93,12 @@ class Mage_Debit_Helper_Adminhtml extends Mage_Debit_Helper_Data
91
  /**
92
  * Updates the status of an export order item to "exported"..
93
  *
94
- * @param int $id Export Order ID
95
  * @return bool
96
  */
97
- public function setStatusAsExported($id)
98
  {
99
- $model = Mage::getModel('debit/orders')->load($id);
100
  $model->setData('status', 1);
101
  $model->save();
102
 
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Helper class for helper functionalities especially in the adminhtml area..
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Helper_Adminhtml extends Itabs_Debit_Helper_Data
37
  {
38
  const XML_PATH_BANKACCOUNT_ACCOUNTOWNER = 'debitpayment/bankaccount/account_owner';
39
  const XML_PATH_BANKACCOUNT_ROUTINGNUMBER = 'debitpayment/bankaccount/routing_number';
93
  /**
94
  * Updates the status of an export order item to "exported"..
95
  *
96
+ * @param int $orderId Export Order ID
97
  * @return bool
98
  */
99
+ public function setStatusAsExported($orderId)
100
  {
101
+ $model = Mage::getModel('debit/orders')->load($orderId);
102
  $model->setData('status', 1);
103
  $model->save();
104
 
app/code/community/{Mage → Itabs}/Debit/Helper/Data.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,27 +14,64 @@
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 2012 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 2012 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
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * Returns the bankname by given blz
40
  *
@@ -49,7 +86,7 @@ class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
49
  $file = new Varien_Io_File();
50
  $file->open(
51
  array(
52
- 'path' => Mage::getModuleDir('etc', 'Mage_Debit')
53
  )
54
  );
55
  $file->streamOpen('bankleitzahlen.csv', 'r');
@@ -83,7 +120,7 @@ class Mage_Debit_Helper_Data extends Mage_Payment_Helper_Data
83
  * Saves the blz data in the cache
84
  *
85
  * @param array $data Blz data
86
- * @return Mage_Debit_Helper_Data Self.
87
  */
88
  protected function _saveBlzCache($data)
89
  {
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Helper class for different helper functionalities..
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Helper_Data extends Mage_Payment_Helper_Data
37
  {
38
+ const DEBIT_TYPE_BANK = 'bank';
39
+ const DEBIT_TYPE_SEPA = 'sepa';
40
+
41
+ /**
42
+ * Retrieve the cucrent debit type
43
+ * @return string
44
+ */
45
+ public function getDebitType()
46
+ {
47
+ $type = Mage::getStoreConfig('payment/debit/debit_type');
48
+
49
+ /*
50
+ * Check if we are on a specific page in the backend view,
51
+ * then overwrite $type with the value of the order/..
52
+ */
53
+
54
+ if ($order = Mage::registry('current_order')) {
55
+ /* @var $order Mage_Sales_Model_Order */
56
+ $method = $order->getPayment()->getMethodInstance()->getInfoInstance();
57
+ $type = $method->getData('debit_type');
58
+ } elseif ($invoice = Mage::registry('current_invoice')) {
59
+ /* @var $invoice Mage_Sales_Model_Order_Invoice */
60
+ $method = $invoice->getOrder()->getPayment()->getMethodInstance()->getInfoInstance();
61
+ $type = $method->getData('debit_type');
62
+ } elseif ($shipment = Mage::registry('current_shipment')) {
63
+ /* @var $shipment Mage_Sales_Model_Order_Shipment */
64
+ $method = $shipment->getOrder()->getPayment()->getMethodInstance()->getInfoInstance();
65
+ $type = $method->getData('debit_type');
66
+ } elseif ($creditmemo = Mage::registry('current_creditmemo')) {
67
+ /* @var $creditmemo Mage_Sales_Model_Order_Creditmemo */
68
+ $method = $creditmemo->getOrder()->getPayment()->getMethodInstance()->getInfoInstance();
69
+ $type = $method->getData('debit_type');
70
+ }
71
+
72
+ return $type;
73
+ }
74
+
75
  /**
76
  * Returns the bankname by given blz
77
  *
86
  $file = new Varien_Io_File();
87
  $file->open(
88
  array(
89
+ 'path' => Mage::getModuleDir('etc', 'Itabs_Debit')
90
  )
91
  );
92
  $file->streamOpen('bankleitzahlen.csv', 'r');
120
  * Saves the blz data in the cache
121
  *
122
  * @param array $data Blz data
123
+ * @return Itabs_Debit_Helper_Data Self.
124
  */
125
  protected function _saveBlzCache($data)
126
  {
app/code/community/{Mage → Itabs}/Debit/Model/Debit.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
  {
38
  /**
39
  * unique internal payment method identifier
@@ -56,11 +56,16 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
56
  */
57
  protected $_infoBlockType = 'debit/info';
58
 
 
 
 
 
 
59
  /**
60
  * Assigns data to the payment info instance
61
  *
62
  * @param Varien_Object|array $data Payment Data from checkout
63
- * @return Mage_Debit_Model_Debit Self.
64
  */
65
  public function assignData($data)
66
  {
@@ -92,10 +97,25 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
92
  $ccNumber = Mage::helper('debit')->sanitizeData($ccNumber);
93
  $ccNumber = $info->encrypt($ccNumber);
94
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  // Set account data in payment info model
96
  $info->setCcType($ccType) // BLZ
97
  ->setCcOwner($ccOwner) // Kontoinhaber
98
- ->setCcNumberEnc($ccNumber); // Kontonummer
 
 
 
99
 
100
  return $this;
101
  }
@@ -172,6 +192,32 @@ class Mage_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
172
  return $bankName;
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  /**
176
  * Returns the encrypted data for mail
177
  *
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Debit Model
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Debit extends Mage_Payment_Model_Method_Abstract
37
  {
38
  /**
39
  * unique internal payment method identifier
56
  */
57
  protected $_infoBlockType = 'debit/info';
58
 
59
+ /**
60
+ * @var bool Allow capturing for this payment method
61
+ */
62
+ protected $_canCapture = true;
63
+
64
  /**
65
  * Assigns data to the payment info instance
66
  *
67
  * @param Varien_Object|array $data Payment Data from checkout
68
+ * @return Itabs_Debit_Model_Debit Self.
69
  */
70
  public function assignData($data)
71
  {
97
  $ccNumber = Mage::helper('debit')->sanitizeData($ccNumber);
98
  $ccNumber = $info->encrypt($ccNumber);
99
 
100
+ // Fetch the account swift
101
+ $swift = $data->getDebitSwift();
102
+ if ($swift) {
103
+ $swift = $info->encrypt($swift);
104
+ }
105
+
106
+ // Fetch the account iban
107
+ $iban = $data->getDebitIban();
108
+ if ($iban) {
109
+ $iban = $info->encrypt($iban);
110
+ }
111
+
112
  // Set account data in payment info model
113
  $info->setCcType($ccType) // BLZ
114
  ->setCcOwner($ccOwner) // Kontoinhaber
115
+ ->setCcNumberEnc($ccNumber) // Kontonummer
116
+ ->setDebitSwift($swift) // SWIFT Code
117
+ ->setDebitIban($iban) // IBAN
118
+ ->setDebitType(Mage::helper('debit')->getDebitType());
119
 
120
  return $this;
121
  }
192
  return $bankName;
193
  }
194
 
195
+ /**
196
+ * Returns the account swift code from the payment info instance
197
+ *
198
+ * @return string SWIFT
199
+ */
200
+ public function getAccountSwift()
201
+ {
202
+ $info = $this->getInfoInstance();
203
+ $data = $info->decrypt($info->getDebitSwift());
204
+
205
+ return $data;
206
+ }
207
+
208
+ /**
209
+ * Returns the account iban from the payment info instance
210
+ *
211
+ * @return string IBAN
212
+ */
213
+ public function getAccountIban()
214
+ {
215
+ $info = $this->getInfoInstance();
216
+ $data = $info->decrypt($info->getDebitIban());
217
+
218
+ return $data;
219
+ }
220
+
221
  /**
222
  * Returns the encrypted data for mail
223
  *
app/code/community/{Mage → Itabs}/Debit/Model/Entity/Customer/Attribute/Backend/Encrypted.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,32 +14,32 @@
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 2012 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 2012 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
38
  {
39
  /**
40
  * Encrypts the value before saving
41
  *
42
- * @param <type> $object Object
43
  * @return void
44
  */
45
  public function beforeSave($object)
@@ -53,7 +53,7 @@ class Mage_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
53
  /**
54
  * Decrypts the value after load
55
  *
56
- * @param <type> $object Object
57
  * @return void
58
  */
59
  public function afterLoad($object)
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Customer Attribute Backend Encrypted
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
37
  extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
38
  {
39
  /**
40
  * Encrypts the value before saving
41
  *
42
+ * @param Mage_Core_Model_Abstract $object
43
  * @return void
44
  */
45
  public function beforeSave($object)
53
  /**
54
  * Decrypts the value after load
55
  *
56
+ * @param Mage_Core_Model_Abstract $object
57
  * @return void
58
  */
59
  public function afterLoad($object)
app/code/community/Itabs/Debit/Model/Export/Abstract.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Abstract Export Model
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Model_Export_Abstract extends Varien_Object
37
+ {
38
+ /**
39
+ * @var string File Extension
40
+ */
41
+ protected $_fileExt = '';
42
+
43
+ /**
44
+ * @var array
45
+ */
46
+ protected $_orderFilter = false;
47
+
48
+ /**
49
+ * Retrieve the helper class
50
+ *
51
+ * @return Itabs_Debit_Helper_Adminhtml
52
+ */
53
+ protected function _getDebitHelper()
54
+ {
55
+ return Mage::helper('debit/adminhtml');
56
+ }
57
+
58
+ /**
59
+ * Retrieve the filename for the export file
60
+ *
61
+ * @return string
62
+ */
63
+ public function getFileName()
64
+ {
65
+ return 'EXPORT'.date('YmdHis') . $this->_fileExt;
66
+ }
67
+
68
+ /**
69
+ * Check if there are orders available for export..
70
+ *
71
+ * @return void
72
+ */
73
+ protected function _hasOrdersToExport()
74
+ {
75
+ /* @var $collection Itabs_Debit_Model_Mysql4_Orders_Collection */
76
+ $collection = Mage::getModel('debit/orders')->getCollection()
77
+ ->addFieldToFilter('status', 0);
78
+
79
+ // Apply custom filters if applicable
80
+ if ($this->_orderFilter) {
81
+ foreach ($this->_orderFilter as $field => $condition) {
82
+ $collection->addFieldToFilter($field, $condition);
83
+ }
84
+ }
85
+
86
+ // Check if collection coontains orders
87
+ if ($collection->count() == 0) {
88
+ $this->_getSession()->addError($this->_getDebitHelper()->__('No orders to export.'));
89
+ return false;
90
+ }
91
+ return $collection;
92
+ }
93
+ }
app/code/community/Itabs/Debit/Model/Export/Csv.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * CSV Export Model
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Model_Export_Csv
37
+ extends Itabs_Debit_Model_Export_Abstract
38
+ implements Itabs_Debit_Model_Export_Interface
39
+ {
40
+ /**
41
+ * @var string File Extension
42
+ */
43
+ protected $_fileExt = '.csv';
44
+
45
+ /**
46
+ * Export function:
47
+ * - Returns false, if an error occured or if there are no orders to export
48
+ * - Returns array, containing the filename and the file contents
49
+ *
50
+ * @return bool|array
51
+ */
52
+ public function export()
53
+ {
54
+ $collection = $this->_hasOrdersToExport();
55
+ if (!$collection) {
56
+ return false;
57
+ }
58
+
59
+ $fileName = $this->getFileName();
60
+
61
+ // Open file
62
+ $file = new Varien_Io_File();
63
+ $file->open(array('path' => Mage::getBaseDir('var')));
64
+ $file->streamOpen($fileName);
65
+
66
+ // Add headline
67
+ $row = array(
68
+ 'Kundenname',
69
+ 'BLZ',
70
+ 'Kontonummer',
71
+ 'BIC/Swift-Code',
72
+ 'IBAN',
73
+ 'Betrag',
74
+ 'Verwendungszweck'
75
+ );
76
+ $file->streamWriteCsv($row);
77
+
78
+ // Add rows
79
+ foreach ($collection as $order) {
80
+ /* @var $orderModel Mage_Sales_Model_Order */
81
+ $orderModel = Mage::getModel('sales/order')->load($order->getData('entity_id'));
82
+ /* @var $paymentMethod Itabs_Debit_Model_Debit */
83
+ $paymentMethod = $orderModel->getPayment()->getMethodInstance();
84
+
85
+ // Format order amount
86
+ $amount = number_format($order->getData('grand_total'), 2, ',', '.');
87
+
88
+ $row = array(
89
+ 'name' => $paymentMethod->getAccountName(),
90
+ 'bank_code' => $paymentMethod->getAccountBLZ(),
91
+ 'account_number' => $paymentMethod->getAccountNumber(),
92
+ 'account_swift' => $paymentMethod->getAccountSwift(),
93
+ 'account_iban' => $paymentMethod->getAccountIban(),
94
+ 'amount' => $amount.' '.$order->getData('order_currency_code'),
95
+ 'purpose' => 'Bestellung Nr. '.$order->getData('increment_id')
96
+ );
97
+ $file->streamWriteCsv($row);
98
+
99
+ $this->_getDebitHelper()->setStatusAsExported($order->getId());
100
+ }
101
+
102
+ // Close file, get file contents and delete temporary file
103
+ $file->close();
104
+ $filePath = Mage::getBaseDir('var') . DS . $fileName;
105
+ $fileContents = file_get_contents($filePath);
106
+ $file->rm($fileName);
107
+
108
+ $response = array(
109
+ 'file_name' => $fileName,
110
+ 'file_content' => $fileContents
111
+ );
112
+ return $response;
113
+ }
114
+ }
app/code/community/Itabs/Debit/Model/Export/Dtaus.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ require_once (Mage::getBaseDir().'/lib/DTA/DTA.php');
26
+ /**
27
+ * DTAUS Export Model
28
+ *
29
+ * @category Itabs
30
+ * @package Itabs_Debit
31
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
32
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
33
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
34
+ * @version 1.0.0
35
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
36
+ */
37
+ class Itabs_Debit_Model_Export_Dtaus
38
+ extends Itabs_Debit_Model_Export_Abstract
39
+ implements Itabs_Debit_Model_Export_Interface
40
+ {
41
+ /**
42
+ * @var array
43
+ */
44
+ protected $_orderFilter = array(
45
+ 'debit_type' => 'bank'
46
+ );
47
+
48
+ /**
49
+ * Export function:
50
+ * - Returns false, if an error occured or if there are no orders to export
51
+ * - Returns array, containing the filename and the file contents
52
+ *
53
+ * @return bool|array
54
+ */
55
+ public function export()
56
+ {
57
+ $collection = $this->_hasOrdersToExport();
58
+ if (!$collection) {
59
+ return false;
60
+ }
61
+
62
+ // Create new object and set store owner bank account data
63
+ $file = new DTA(DTA_DEBIT);
64
+ $file->setAccountFileSender($this->_getDebitHelper()->getBankAccount());
65
+
66
+ // Add orders
67
+ foreach ($collection as $order) {
68
+ /* @var $orderModel Mage_Sales_Model_Order */
69
+ $orderModel = Mage::getModel('sales/order')->load($order->getData('entity_id'));
70
+ /* @var $payment Itabs_Debit_Model_Debit */
71
+ $paymentMethod = $orderModel->getPayment()->getMethodInstance();
72
+
73
+ $file->addExchange(
74
+ array(
75
+ 'name' => $paymentMethod->getAccountName(),
76
+ 'bank_code' => $paymentMethod->getAccountBLZ(),
77
+ 'account_number' => $paymentMethod->getAccountNumber(),
78
+ ),
79
+ round($order->getData('grand_total'), 2),
80
+ array(
81
+ 'Bestellung Nr. '.$order->getData('increment_id')
82
+ )
83
+ );
84
+
85
+ $this->_getDebitHelper()->setStatusAsExported($order->getId());
86
+ }
87
+
88
+ $response = array(
89
+ 'file_name' => $this->getFileName(),
90
+ 'file_content' => $file->getFileContent()
91
+ );
92
+ return $response;
93
+ }
94
+ }
app/code/community/Itabs/Debit/Model/Export/Interface.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Export Model Interface
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ interface Itabs_Debit_Model_Export_Interface
37
+ {
38
+ /**
39
+ * Export function:
40
+ * - Returns false, if an error occured or if there are no orders to export
41
+ * - Returns array, containing the filename and the file contents
42
+ *
43
+ * @return bool|array
44
+ */
45
+ public function export();
46
+ }
app/code/community/{Mage → Itabs}/Debit/Model/Mysql4/Orders.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,26 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Resource Model for Export Orders
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Model_Mysql4_Orders extends Mage_Core_Model_Mysql4_Abstract
35
  {
36
  /**
37
  * (non-PHPdoc)
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Resource Model for Export Orders
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Mysql4_Orders extends Mage_Core_Model_Mysql4_Abstract
37
  {
38
  /**
39
  * (non-PHPdoc)
app/code/community/{Mage → Itabs}/Debit/Model/Mysql4/Orders/Collection.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,27 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Resource Model Collection for Export Orders
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Model_Mysql4_Orders_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
 
35
  {
36
  /**
37
  * (non-PHPdoc)
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Resource Model Collection for Export Orders
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Mysql4_Orders_Collection
37
+ extends Mage_Core_Model_Mysql4_Collection_Abstract
38
  {
39
  /**
40
  * (non-PHPdoc)
app/code/community/{Mage → Itabs}/Debit/Model/Observer.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
@@ -49,58 +49,20 @@ class Mage_Debit_Model_Observer
49
  public function paymentMethodIsActive($observer)
50
  {
51
  $methodInstance = $observer->getEvent()->getMethodInstance();
52
- $session = Mage::getSingleton('customer/session');
53
 
54
  // Check if method is DebitPayment
55
  if ($methodInstance->getCode() != 'debit') {
56
  return;
57
  }
 
58
  // Check if payment method is active
59
  if (!Mage::getStoreConfigFlag('payment/debit/active')) {
60
  return;
61
  }
62
 
63
- // Check if payment is allowed only for specific customer groups
64
- if (!Mage::getStoreConfigFlag('payment/debit/specificgroup_all')) {
65
- $customerGroupId = Mage_Customer_Model_Group::NOT_LOGGED_IN_ID;
66
- if ($session->isLoggedIn()) {
67
- $customerGroupId = $session->getCustomerGroupId();
68
- }
69
- $allowedGroupIds = explode(',', Mage::getStoreConfig('payment/debit/specificgroup'));
70
- if (!in_array($customerGroupId, $allowedGroupIds)) {
71
- $observer->getEvent()->getResult()->isAvailable = false;
72
-
73
- return;
74
- }
75
- }
76
-
77
- // Check minimum orders count
78
- $minOrderCount = Mage::getStoreConfig('payment/debit/orderscount');
79
- if ($minOrderCount > 0) {
80
- $customerId = $session->getCustomerId();
81
- if (is_null($customerId)) { // not logged in
82
- $observer->getEvent()->getResult()->isAvailable = false;
83
-
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
-
101
- return;
102
- }
103
- }
104
  }
105
 
106
  /**
@@ -126,6 +88,8 @@ class Mage_Debit_Model_Observer
126
  ->setData('debit_payment_acount_name', $methodInstance->getAccountName())
127
  ->setData('debit_payment_acount_number', $methodInstance->getAccountNumber())
128
  ->setData('debit_payment_acount_blz', $methodInstance->getAccountBLZ())
 
 
129
  ->save();
130
  }
131
  }
@@ -136,11 +100,13 @@ class Mage_Debit_Model_Observer
136
  * @param Mage_Sales_Model_Order $order Current order
137
  * @return Mage_Customer_Model_Customer|null Customer model or null
138
  */
139
- public function _getOrderCustomer($order)
140
  {
141
  if (Mage::app()->getStore()->isAdmin()) {
142
  if ($customer = $order->getCustomer()) {
143
- return $customer;
 
 
144
  }
145
  } else {
146
  $customer = Mage::getSingleton('customer/session')->getCustomer();
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Observer
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Observer
37
  {
38
  /**
39
  * paymentMethodIsActive
49
  public function paymentMethodIsActive($observer)
50
  {
51
  $methodInstance = $observer->getEvent()->getMethodInstance();
 
52
 
53
  // Check if method is DebitPayment
54
  if ($methodInstance->getCode() != 'debit') {
55
  return;
56
  }
57
+
58
  // Check if payment method is active
59
  if (!Mage::getStoreConfigFlag('payment/debit/active')) {
60
  return;
61
  }
62
 
63
+ /* @var $validationModel Itabs_Debit_Model_Validation */
64
+ $validationModel = Mage::getModel('debit/validation');
65
+ $observer->getEvent()->getResult()->isAvailable = $validationModel->isValid();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  }
67
 
68
  /**
88
  ->setData('debit_payment_acount_name', $methodInstance->getAccountName())
89
  ->setData('debit_payment_acount_number', $methodInstance->getAccountNumber())
90
  ->setData('debit_payment_acount_blz', $methodInstance->getAccountBLZ())
91
+ ->setData('debit_payment_account_swift', $methodInstance->getAccountSwift())
92
+ ->setData('debit_payment_account_iban', $methodInstance->getAccountIban())
93
  ->save();
94
  }
95
  }
100
  * @param Mage_Sales_Model_Order $order Current order
101
  * @return Mage_Customer_Model_Customer|null Customer model or null
102
  */
103
+ protected function _getOrderCustomer($order)
104
  {
105
  if (Mage::app()->getStore()->isAdmin()) {
106
  if ($customer = $order->getCustomer()) {
107
+ if ($customer->getId()) {
108
+ return $customer;
109
+ }
110
  }
111
  } else {
112
  $customer = Mage::getSingleton('customer/session')->getCustomer();
app/code/community/{Mage → Itabs}/Debit/Model/Orders.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,26 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Model for Export Orders
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
- class Mage_Debit_Model_Orders extends Mage_Core_Model_Abstract
35
  {
36
  /**
37
  * (non-PHPdoc)
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Model for Export Orders
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_Orders extends Mage_Core_Model_Abstract
37
  {
38
  /**
39
  * (non-PHPdoc)
app/code/community/{Mage → Itabs}/Debit/Model/System/Config/Source/Customer/Group.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,25 +14,26 @@
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 2012 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 2012 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
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * System Config Customer Groups
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_Model_System_Config_Source_Customer_Group
37
  {
38
  /**
39
  * @var array Customer Groups
app/code/community/Itabs/Debit/Model/System/Config/Source/Debit/Status.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Export Order Statuses
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Model_System_Config_Source_Debit_Status
37
+ {
38
+ /**
39
+ * @var array Statuses
40
+ */
41
+ protected $_options;
42
+
43
+ /**
44
+ * Returns the statuses as option array
45
+ *
46
+ * @return array Statuses
47
+ */
48
+ public function toOptionArray()
49
+ {
50
+ if (!$this->_options) {
51
+ $this->_options = array(
52
+ array(
53
+ 'value' => 0,
54
+ 'label' => Mage::helper('debit/adminhtml')->__('Not exported')
55
+ ),
56
+ array(
57
+ 'value' => 1,
58
+ 'label' => Mage::helper('debit/adminhtml')->__('Exported')
59
+ )
60
+ );
61
+ }
62
+
63
+ return $this->_options;
64
+ }
65
+
66
+ /**
67
+ * Returns the statuses as option hash
68
+ *
69
+ * @return array
70
+ */
71
+ public function toOptionHash()
72
+ {
73
+ $options = $this->toOptionArray();
74
+
75
+ $hash = array();
76
+ foreach ($options as $option) {
77
+ $hash[$option['value']] = $option['label'];
78
+ }
79
+
80
+ return $hash;
81
+ }
82
+ }
app/code/community/Itabs/Debit/Model/System/Config/Source/Debit/Type.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Debit Types
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Model_System_Config_Source_Debit_Type
37
+ {
38
+ /**
39
+ * @var array Debit Types
40
+ */
41
+ protected $_options;
42
+
43
+ /**
44
+ * Returns the debit types as an array for system configuration
45
+ *
46
+ * @return array Debit Types
47
+ */
48
+ public function toOptionArray()
49
+ {
50
+ if (!$this->_options) {
51
+ $this->_options = array(
52
+ array(
53
+ 'value' => 'bank',
54
+ 'label' => Mage::helper('debit')->__('Bank Account & Routing Number')
55
+ ),
56
+ array(
57
+ 'value' => 'sepa',
58
+ 'label' => Mage::helper('debit')->__('SEPA')
59
+ )
60
+ );
61
+ }
62
+
63
+ return $this->_options;
64
+ }
65
+
66
+ /**
67
+ * Returns the debit types as option hash for grid view
68
+ *
69
+ * @return array
70
+ */
71
+ public function toOptionHash()
72
+ {
73
+ $options = $this->toOptionArray();
74
+
75
+ $hash = array();
76
+ foreach ($options as $option) {
77
+ $hash[$option['value']] = $option['label'];
78
+ }
79
+
80
+ return $hash;
81
+ }
82
+ }
app/code/community/Itabs/Debit/Model/Validation.php ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Validation model
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Model_Validation
37
+ {
38
+ /**
39
+ * @var null|Mage_Sales_Model_Resource_Order_Collection
40
+ */
41
+ protected $_customerOrders = null;
42
+
43
+ /**
44
+ * @var null|Mage_Sales_Model_Resource_Order_Collection
45
+ */
46
+ protected $_customerOrdersEmail = null;
47
+
48
+ /**
49
+ * @return bool
50
+ */
51
+ public function isValid()
52
+ {
53
+ return $this->hasSpecificCustomerGroup()
54
+ && $this->hasMinimumOrderCount()
55
+ && $this->hasMinimumOrderAmount()
56
+ ;
57
+ }
58
+
59
+ /**
60
+ * Check if the customer is in a specific customer group
61
+ *
62
+ * @return bool
63
+ */
64
+ public function hasSpecificCustomerGroup()
65
+ {
66
+ if (!Mage::getStoreConfigFlag('payment/debit/specificgroup_all')) {
67
+ $allowedGroupIds = explode(',', Mage::getStoreConfig('payment/debit/specificgroup'));
68
+ if (!in_array($this->_getCustomerGroupId(), $allowedGroupIds)) {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ return true;
74
+ }
75
+
76
+ /**
77
+ * Check if the customer has placed less complete orders than required..
78
+ *
79
+ * @return bool
80
+ */
81
+ public function hasMinimumOrderCount()
82
+ {
83
+ $minOrderCount = Mage::getStoreConfig('payment/debit/orderscount');
84
+ if ($minOrderCount > 0) {
85
+ $customerId = $this->_getCustomer()->getId();
86
+ if (is_null($customerId)) {
87
+ return false;
88
+ }
89
+
90
+ $orders = $this->_getCustomerOrders($customerId);
91
+ if (count($orders) < $minOrderCount) {
92
+ return false;
93
+ }
94
+ }
95
+
96
+ return true;
97
+ }
98
+
99
+ /**
100
+ * Check if the order amount of all customer order are below the
101
+ * required order amount
102
+ *
103
+ * @return bool
104
+ */
105
+ public function hasMinimumOrderAmount()
106
+ {
107
+ $minOrderSum = Mage::getStoreConfig('payment/debit/customer_order_amount');
108
+ if ($minOrderSum > 0) {
109
+ $customerId = $this->_getCustomer()->getId();
110
+ if (is_null($customerId)) {
111
+ return false;
112
+ }
113
+
114
+ $orders = $this->_getCustomerOrders($customerId);
115
+ $orderTotal = 0;
116
+ foreach ($orders as $order) {
117
+ $orderTotal += $order->getData('grand_total');
118
+ }
119
+
120
+ if ($orderTotal < $minOrderSum) {
121
+ return false;
122
+ }
123
+ }
124
+
125
+ return true;
126
+ }
127
+
128
+ /**
129
+ * Retrieve the current session
130
+ *
131
+ * @return Mage_Adminhtml_Model_Session_Quote|Mage_Customer_Model_Session
132
+ */
133
+ protected function _getSession()
134
+ {
135
+ if (Mage::app()->getStore()->isAdmin()) {
136
+ /* @var $session Mage_Adminhtml_Model_Session_Quote */
137
+ $session = Mage::getSingleton('adminhtml/session_quote');
138
+ } else {
139
+ /* @var $session Mage_Customer_Model_Session */
140
+ $session = Mage::getSingleton('customer/session');
141
+ }
142
+
143
+ return $session;
144
+ }
145
+
146
+ /**
147
+ * Retrieve the current customer
148
+ *
149
+ * @return Mage_Customer_Model_Customer
150
+ */
151
+ protected function _getCustomer()
152
+ {
153
+ return $this->_getSession()->getCustomer();
154
+ }
155
+
156
+ /**
157
+ * Retrieve the customer group id of the current customer
158
+ *
159
+ * @return int
160
+ */
161
+ protected function _getCustomerGroupId()
162
+ {
163
+ $customerGroupId = Mage_Customer_Model_Group::NOT_LOGGED_IN_ID;
164
+ if (Mage::app()->getStore()->isAdmin()) {
165
+ $customerGroupId = $this->_getSession()->getQuote()->getCustomerGroupId();
166
+ } else {
167
+ if ($this->_getSession()->isLoggedIn()) {
168
+ $customerGroupId = $this->_getSession()->getCustomerGroupId();
169
+ }
170
+ }
171
+
172
+ return $customerGroupId;
173
+ }
174
+
175
+ /**
176
+ * Retrieve the email address of the current customer
177
+ *
178
+ * @return string
179
+ */
180
+ protected function _getCustomerEmail()
181
+ {
182
+ if (Mage::app()->getStore()->isAdmin()) {
183
+ $email = $this->_getCustomer()->getEmail();
184
+ } else {
185
+ if ($this->_getSession()->isLoggedIn()) {
186
+ $email = $this->_getCustomer()->getEmail();
187
+ } else {
188
+ /* @var $quote Mage_Sales_Model_Quote */
189
+ $quote = Mage::getSingleton('checkout/session')->getQuote();
190
+ $email = $quote->getBillingAddress()->getEmail();
191
+ }
192
+ }
193
+
194
+ return $email;
195
+ }
196
+
197
+ /**
198
+ * Retrieve the order collection of a specific customer
199
+ *
200
+ * @param int $customerId
201
+ * @return Mage_Sales_Model_Resource_Order_Collection
202
+ */
203
+ protected function _getCustomerOrders($customerId)
204
+ {
205
+ if (null === $this->_customerOrders) {
206
+ $orders = Mage::getResourceModel('sales/order_collection')
207
+ ->addAttributeToSelect('*')
208
+ ->addAttributeToFilter('customer_id', $customerId)
209
+ ->addAttributeToFilter('status', Mage_Sales_Model_Order::STATE_COMPLETE)
210
+ ->addAttributeToFilter(
211
+ 'state',
212
+ array(
213
+ 'in' => Mage::getSingleton('sales/order_config')->getVisibleOnFrontStates()
214
+ )
215
+ )
216
+ ->load();
217
+ $this->_customerOrders = $orders;
218
+ }
219
+
220
+ return $this->_customerOrders;
221
+ }
222
+ }
app/code/community/Itabs/Debit/Test/Helper/Data.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Helper/Data.php Test Class
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Test_Helper_Data extends EcomDev_PHPUnit_Test_Case
37
+ {
38
+ /**
39
+ * Test if the getBankByBlz method returns a bank name
40
+ *
41
+ * @param array $data
42
+ * @dataProvider dataProvider
43
+ */
44
+ public function testGetBankByBlz($data)
45
+ {
46
+ /* @var $helper Itabs_Debit_Helper_Data */
47
+ $helper = Mage::helper('debit');
48
+
49
+ // Load all expectations
50
+ $dataSet = $this->readAttribute($this, 'dataName');
51
+
52
+ for ($i = 0; $i < count($data); $i++) {
53
+ $this->assertEquals(
54
+ $this->expected($dataSet)->getData('name_'.$i),
55
+ $helper->getBankByBlz($data[$i])
56
+ );
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Test if the customer enters a faulty string that it
62
+ * gets sanitized correctly
63
+ *
64
+ * @param array $data
65
+ * @dataProvider dataProvider
66
+ */
67
+ public function testSanitizeData($data)
68
+ {
69
+ /* @var $helper Itabs_Debit_Helper_Data */
70
+ $helper = Mage::helper('debit');
71
+
72
+ // Load all expectations
73
+ $dataSet = $this->readAttribute($this, 'dataName');
74
+
75
+ foreach ($data as $key => $value) {
76
+ $this->assertEquals(
77
+ $this->expected($dataSet)->getData($key),
78
+ $helper->sanitizeData($value)
79
+ );
80
+ }
81
+ }
82
+ }
app/code/community/Itabs/Debit/Test/Helper/Data/expectations/testGetBankByBlz.yaml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ routingnumbers:
2
+ name_0: "Kr Spk Esslingen-Nürtingen"
3
+ name_1: "Deutsche Bank PGK Esslingen"
4
+ name_2: "Haspa Hamburg"
5
+ name_3: "Bankhaus Fortmann Oldenburg"
6
+ name_4: "Sparkasse Essen"
7
+ name_5: null
app/code/community/Itabs/Debit/Test/Helper/Data/expectations/testSanitizeData.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ sanitize_strings:
2
+ space: "TestSpace"
3
+ dash: "TestDash"
4
+ underscore: "TestUnderscore"
5
+ dot: "TestDot"
6
+ semicolon: "TestSemicolon"
7
+ slash: "TestSlash"
8
+ pipe: "TestPipe"
app/code/community/Itabs/Debit/Test/Helper/Data/providers/testGetBankByBlz.yaml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ routingnumbers:
2
+ -
3
+ - "61150020"
4
+ - "61170024"
5
+ - "20050550"
6
+ - "28030300"
7
+ - "36050105"
8
+ - "99999999"
app/code/community/Itabs/Debit/Test/Helper/Data/providers/testSanitizeData.yaml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ sanitize_strings:
2
+ -
3
+ space: "Test Space"
4
+ dash: "Test-Dash"
5
+ underscore: "Test_Underscore"
6
+ dot: "Test.Dot"
7
+ semicolon: "Test;Semicolon"
8
+ slash: "Test/Slash"
9
+ pipe: "Test|Pipe"
app/code/community/Itabs/Debit/Test/Model/Debit.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Model/Debit.php Test Class
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Test_Model_Debit extends EcomDev_PHPUnit_Test_Case
37
+ {
38
+ /**
39
+ * Test if you mask a string that you get the correct result
40
+ *
41
+ * @param array $data
42
+ * @dataProvider dataProvider
43
+ */
44
+ public function testMaskString($data)
45
+ {
46
+ /* @var $model Itabs_Debit_Model_Debit */
47
+ $model = Mage::getModel('debit/debit');
48
+
49
+ // Load all expectations
50
+ $dataSet = $this->readAttribute($this, 'dataName');
51
+
52
+ for ($i = 0; $i < count($data); $i++) {
53
+ $this->assertEquals(
54
+ $this->expected($dataSet)->getData('string_'.$i),
55
+ $model->maskString($data[$i])
56
+ );
57
+ }
58
+ }
59
+ }
app/code/community/Itabs/Debit/Test/Model/Debit/expectations/testMaskString.yaml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ mask_strings:
2
+ string_0: "******101"
3
+ string_1: "****123"
4
+ string_2: "*****020"
app/code/community/Itabs/Debit/Test/Model/Debit/providers/testMaskString.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ mask_strings:
2
+ -
3
+ - "101101101"
4
+ - "0724123"
5
+ - "61150020"
app/code/community/{Mage → Itabs}/Debit/controllers/AccountController.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
  {
38
  /**
39
  * Retrieve customer session object
@@ -88,8 +88,18 @@ class Mage_Debit_AccountController extends Mage_Core_Controller_Front_Action
88
  $now = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
89
  $customer->setData('debit_payment_acount_update', $now);
90
  $customer->setData('debit_payment_acount_name', $this->getRequest()->getPost('account_name'));
91
- $customer->setData('debit_payment_acount_number', $this->getRequest()->getPost('account_number'));
92
- $customer->setData('debit_payment_acount_blz', $this->getRequest()->getPost('account_blz'));
 
 
 
 
 
 
 
 
 
 
93
 
94
  try {
95
  $customer->save();
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * AccountController
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_AccountController extends Mage_Core_Controller_Front_Action
37
  {
38
  /**
39
  * Retrieve customer session object
88
  $now = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
89
  $customer->setData('debit_payment_acount_update', $now);
90
  $customer->setData('debit_payment_acount_name', $this->getRequest()->getPost('account_name'));
91
+ if ($accountNumber = $this->getRequest()->getPost('account_number')) {
92
+ $customer->setData('debit_payment_acount_number', $accountNumber);
93
+ }
94
+ if ($accountBlz = $this->getRequest()->getPost('account_blz')) {
95
+ $customer->setData('debit_payment_acount_blz', $accountBlz);
96
+ }
97
+ if ($accountSwift = $this->getRequest()->getPost('account_swift')) {
98
+ $customer->setData('debit_payment_account_swift', $accountSwift);
99
+ }
100
+ if ($accountIban = $this->getRequest()->getPost('account_iban')) {
101
+ $customer->setData('debit_payment_account_iban', $accountIban);
102
+ }
103
 
104
  try {
105
  $customer->save();
app/code/community/Itabs/Debit/controllers/Adminhtml/OrderController.php ADDED
@@ -0,0 +1,218 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Export Order Controller
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
+ */
36
+ class Itabs_Debit_Adminhtml_OrderController extends Mage_Adminhtml_Controller_Action
37
+ {
38
+ /**
39
+ * Loads the grid layout with the debit payment orders..
40
+ *
41
+ * @return void
42
+ */
43
+ public function indexAction()
44
+ {
45
+ $this->_getSession()->addNotice(
46
+ $this->_getDebitHelper()->__('Please note: SEPA Debit Payment orders can only be exported as CSV for now.')
47
+ );
48
+
49
+ $this->loadLayout();
50
+ $this->_setActiveMenu('sales/debitpayment')
51
+ ->_addBreadcrumb(
52
+ $this->_getHelper()->__('Sales'),
53
+ $this->_getHelper()->__('Sales')
54
+ )
55
+ ->_addBreadcrumb(
56
+ $this->_getDebitHelper()->__('Debit Payment Orders'),
57
+ $this->_getDebitHelper()->__('Debit Payment Orders')
58
+ )
59
+ ->_title($this->_getHelper()->__('Sales'))
60
+ ->_title($this->_getDebitHelper()->__('Debit Payment Orders'));
61
+
62
+ $this->renderLayout();
63
+ }
64
+
65
+ /**
66
+ * Fetch all orders with the payment method "Debit Payment" and import them
67
+ * into the export list (table: debit_order_grid)
68
+ *
69
+ * @return void
70
+ */
71
+ public function syncAction()
72
+ {
73
+ $syncedOrders = $this->_getDebitHelper()->getSyncedOrders();
74
+ $syncedOrdersCount = 0;
75
+
76
+ // Sync orders
77
+ $collection = Mage::getResourceModel('sales/order_grid_collection');
78
+ if (count($syncedOrders) > 0) {
79
+ $collection->addFieldToFilter('entity_id', array('nin' => $syncedOrders));
80
+ }
81
+
82
+ /* @var $resource Mage_Core_Model_Resource */
83
+ $resource = Mage::getSingleton('core/resource');
84
+ $orderTable = $resource->getTableName('sales_flat_order');
85
+ $orderPaymentTable = $resource->getTableName('sales_flat_order_payment');
86
+
87
+ $collection->getSelect()->joinLeft(
88
+ $orderTable,
89
+ $orderTable.'.entity_id = main_table.entity_id',
90
+ array('customer_id')
91
+ );
92
+ $collection->getSelect()->joinLeft(
93
+ $orderPaymentTable,
94
+ $orderPaymentTable.'.parent_id = main_table.entity_id',
95
+ array('method', 'debit_type')
96
+ );
97
+ $collection->getSelect()->where('method = ?', 'debit');
98
+
99
+ foreach ($collection as $order) {
100
+ /* @var $order Mage_Sales_Model_Order */
101
+
102
+ // Remove some values from the data array
103
+ $unsetData = array(
104
+ 'status', 'base_grand_total', 'base_total_paid', 'total_paid',
105
+ 'updated_at', 'method', 'shipping_name', 'base_currency_code',
106
+ 'store_name'
107
+ );
108
+ foreach ($unsetData as $key) {
109
+ $order->unsetData($key);
110
+ }
111
+
112
+ /* @var $model Itabs_Debit_Model_Orders */
113
+ $model = Mage::getModel('debit/orders');
114
+ $model->addData($order->getData());
115
+ $model->save();
116
+
117
+ $syncedOrdersCount++;
118
+ }
119
+
120
+ if ($syncedOrdersCount > 0) {
121
+ $this->_getSession()->addSuccess(
122
+ $this->_getDebitHelper()->__('Orders successfully synced for export.')
123
+ );
124
+ } else {
125
+ $this->_getSession()->addError(
126
+ $this->_getDebitHelper()->__('No orders available for sync.')
127
+ );
128
+ }
129
+ $this->_redirect('*/*');
130
+ }
131
+
132
+ /**
133
+ * Update order status action
134
+ *
135
+ * @return void
136
+ */
137
+ public function massStatusAction()
138
+ {
139
+ $orderIds = (array) $this->getRequest()->getParam('orders');
140
+ $status = (int) $this->getRequest()->getParam('status');
141
+
142
+ try {
143
+ foreach ($orderIds as $orderId) {
144
+ $order = Mage::getModel('debit/orders')->load($orderId);
145
+ $order->setData('status', $status);
146
+ $order->save();
147
+ }
148
+
149
+ $this->_getSession()->addSuccess(
150
+ $this->_getDebitHelper()->__(
151
+ 'Total of %d record(s) have been updated.',
152
+ count($orderIds)
153
+ )
154
+ );
155
+ }
156
+ catch (Mage_Core_Model_Exception $e) {
157
+ $this->_getSession()->addError($e->getMessage());
158
+ } catch (Mage_Core_Exception $e) {
159
+ $this->_getSession()->addError($e->getMessage());
160
+ } catch (Exception $e) {
161
+ $this->_getSession()
162
+ ->addException(
163
+ $e,
164
+ $this->__('An error occurred while updating the status.')
165
+ );
166
+ }
167
+
168
+ $this->_redirect('*/*/');
169
+ }
170
+
171
+ /**
172
+ * Export the order list as DTA file
173
+ *
174
+ * @return void|Mage_Core_Controller_Varien_Action
175
+ */
176
+ public function exportdtausAction()
177
+ {
178
+ return $this->_export('dtaus');
179
+ }
180
+
181
+ /**
182
+ * Export the order list as CSV
183
+ *
184
+ * @return void|Mage_Core_Controller_Varien_Action
185
+ */
186
+ public function exportcsvAction()
187
+ {
188
+ return $this->_export('csv');
189
+ }
190
+
191
+ /**
192
+ * @param string $type
193
+ * @return Mage_Core_Controller_Varien_Action
194
+ */
195
+ protected function _export($type)
196
+ {
197
+ $response = Mage::getModel('debit/export_'.$type)->export();
198
+ if (!$response) {
199
+ $this->_redirect('*/*');
200
+ return;
201
+ }
202
+
203
+ return $this->_prepareDownloadResponse(
204
+ $response['file_name'],
205
+ $response['file_content']
206
+ );
207
+ }
208
+
209
+ /**
210
+ * Retrieve the helper class
211
+ *
212
+ * @return Itabs_Debit_Helper_Adminhtml Helper
213
+ */
214
+ protected function _getDebitHelper()
215
+ {
216
+ return Mage::helper('debit/adminhtml');
217
+ }
218
+ }
app/code/community/{Mage → Itabs}/Debit/controllers/AjaxController.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,26 +14,26 @@
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 2012 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 2012 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
  {
38
  /**
39
  * Checks the BLZ if it exists and returns the bankname or an error message
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * AjaxController
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
+ class Itabs_Debit_AjaxController extends Mage_Core_Controller_Front_Action
37
  {
38
  /**
39
  * Checks the BLZ if it exists and returns the bankname or an error message
app/code/community/{Mage → Itabs}/Debit/etc/adminhtml.xml RENAMED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
  /**
4
- * This file is part of the Mage_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -13,12 +13,13 @@
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 2012 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>
1
  <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
  /**
4
+ * This file is part of the Itabs_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
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 Itabs
17
+ * @package Itabs_Debit
18
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
  */
24
  -->
25
  <config>
app/code/community/{Mage → Itabs}/Debit/etc/bankleitzahlen.csv RENAMED
File without changes
app/code/community/{Mage → Itabs}/Debit/etc/config.xml RENAMED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * This file is part of the Mage_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -13,49 +13,50 @@
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 2012 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.5.4</version>
28
- </Mage_Debit>
29
  </modules>
30
  <global>
31
  <blocks>
32
  <debit>
33
- <class>Mage_Debit_Block</class>
34
  </debit>
35
  </blocks>
36
  <helpers>
37
  <debit>
38
- <class>Mage_Debit_Helper</class>
39
  </debit>
40
  </helpers>
41
  <models>
42
  <debit>
43
- <class>Mage_Debit_Model</class>
44
  <resourceModel>debit_mysql4</resourceModel>
45
  </debit>
46
- <debit_mysql4>
47
- <class>Mage_Debit_Model_Mysql4</class>
48
- <entities>
49
- <order_grid>
50
- <table>debit_order_grid</table>
51
- </order_grid>
52
- </entities>
53
- </debit_mysql4>
54
  </models>
55
  <resources>
56
  <debit_setup>
57
  <setup>
58
- <module>Mage_Debit</module>
59
  </setup>
60
  <connection>
61
  <use>core_setup</use>
@@ -86,6 +87,30 @@
86
  </observers>
87
  </sales_order_save_after>
88
  </events>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  </global>
90
  <default>
91
  <payment>
@@ -103,6 +128,7 @@
103
  <specificgroup_all>1</specificgroup_all>
104
  <specificgroup>0</specificgroup>
105
  <orderscount>0</orderscount>
 
106
  </debit>
107
  </payment>
108
  </default>
@@ -111,7 +137,7 @@
111
  <debit>
112
  <use>admin</use>
113
  <args>
114
- <module>Mage_Debit</module>
115
  <frontName>debit</frontName>
116
  </args>
117
  </debit>
@@ -127,11 +153,11 @@
127
  </layout>
128
  <translate>
129
  <modules>
130
- <Mage_Debit>
131
  <files>
132
- <default>Mage_Debit.csv</default>
133
  </files>
134
- </Mage_Debit>
135
  </modules>
136
  </translate>
137
  </adminhtml>
@@ -142,11 +168,11 @@
142
  </secure_url>
143
  <translate>
144
  <modules>
145
- <Mage_Debit>
146
  <files>
147
- <default>Mage_Debit.csv</default>
148
  </files>
149
- </Mage_Debit>
150
  </modules>
151
  </translate>
152
  <layout>
@@ -160,10 +186,17 @@
160
  <debit>
161
  <use>standard</use>
162
  <args>
163
- <module>Mage_Debit</module>
164
  <frontName>debit</frontName>
165
  </args>
166
  </debit>
167
  </routers>
168
  </frontend>
 
 
 
 
 
 
 
169
  </config>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Itabs_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
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 Itabs
17
+ * @package Itabs_Debit
18
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
  */
24
  -->
25
  <config>
26
  <modules>
27
+ <Itabs_Debit>
28
+ <version>1.0.0</version>
29
+ </Itabs_Debit>
30
  </modules>
31
  <global>
32
  <blocks>
33
  <debit>
34
+ <class>Itabs_Debit_Block</class>
35
  </debit>
36
  </blocks>
37
  <helpers>
38
  <debit>
39
+ <class>Itabs_Debit_Helper</class>
40
  </debit>
41
  </helpers>
42
  <models>
43
  <debit>
44
+ <class>Itabs_Debit_Model</class>
45
  <resourceModel>debit_mysql4</resourceModel>
46
  </debit>
47
+ <debit_mysql4>
48
+ <class>Itabs_Debit_Model_Mysql4</class>
49
+ <entities>
50
+ <order_grid>
51
+ <table>debit_order_grid</table>
52
+ </order_grid>
53
+ </entities>
54
+ </debit_mysql4>
55
  </models>
56
  <resources>
57
  <debit_setup>
58
  <setup>
59
+ <module>Itabs_Debit</module>
60
  </setup>
61
  <connection>
62
  <use>core_setup</use>
87
  </observers>
88
  </sales_order_save_after>
89
  </events>
90
+ <fieldsets>
91
+ <sales_convert_quote_payment>
92
+ <debit_swift>
93
+ <to_order_payment>*</to_order_payment>
94
+ </debit_swift>
95
+ <debit_iban>
96
+ <to_order_payment>*</to_order_payment>
97
+ </debit_iban>
98
+ <debit_type>
99
+ <to_order_payment>*</to_order_payment>
100
+ </debit_type>
101
+ </sales_convert_quote_payment>
102
+ <sales_convert_order_payment>
103
+ <debit_swift>
104
+ <to_quote_payment>*</to_quote_payment>
105
+ </debit_swift>
106
+ <debit_iban>
107
+ <to_quote_payment>*</to_quote_payment>
108
+ </debit_iban>
109
+ <debit_type>
110
+ <to_quote_payment>*</to_quote_payment>
111
+ </debit_type>
112
+ </sales_convert_order_payment>
113
+ </fieldsets>
114
  </global>
115
  <default>
116
  <payment>
128
  <specificgroup_all>1</specificgroup_all>
129
  <specificgroup>0</specificgroup>
130
  <orderscount>0</orderscount>
131
+ <customer_order_amount>0</customer_order_amount>
132
  </debit>
133
  </payment>
134
  </default>
137
  <debit>
138
  <use>admin</use>
139
  <args>
140
+ <module>Itabs_Debit</module>
141
  <frontName>debit</frontName>
142
  </args>
143
  </debit>
153
  </layout>
154
  <translate>
155
  <modules>
156
+ <Itabs_Debit>
157
  <files>
158
+ <default>Itabs_Debit.csv</default>
159
  </files>
160
+ </Itabs_Debit>
161
  </modules>
162
  </translate>
163
  </adminhtml>
168
  </secure_url>
169
  <translate>
170
  <modules>
171
+ <Itabs_Debit>
172
  <files>
173
+ <default>Itabs_Debit.csv</default>
174
  </files>
175
+ </Itabs_Debit>
176
  </modules>
177
  </translate>
178
  <layout>
186
  <debit>
187
  <use>standard</use>
188
  <args>
189
+ <module>Itabs_Debit</module>
190
  <frontName>debit</frontName>
191
  </args>
192
  </debit>
193
  </routers>
194
  </frontend>
195
+ <phpunit>
196
+ <suite>
197
+ <modules>
198
+ <Itabs_Debit />
199
+ </modules>
200
+ </suite>
201
+ </phpunit>
202
  </config>
app/code/community/{Mage → Itabs}/Debit/etc/system.xml RENAMED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * This file is part of the Mage_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -13,19 +13,20 @@
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 2012 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
  <sections>
26
  <payment>
27
  <groups>
28
- <debit translate="label" module="payment">
29
  <label>Debit Payment</label>
30
  <frontend_type>text</frontend_type>
31
  <sort_order>1</sort_order>
@@ -33,7 +34,7 @@
33
  <show_in_website>1</show_in_website>
34
  <show_in_store>1</show_in_store>
35
  <fields>
36
- <active translate="label">
37
  <label>Enabled</label>
38
  <frontend_type>select</frontend_type>
39
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -42,7 +43,7 @@
42
  <show_in_website>1</show_in_website>
43
  <show_in_store>1</show_in_store>
44
  </active>
45
- <title translate="label">
46
  <label>Title</label>
47
  <frontend_type>text</frontend_type>
48
  <sort_order>2</sort_order>
@@ -50,16 +51,16 @@
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>
@@ -85,8 +86,8 @@
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>
91
  <sort_order>7</sort_order>
92
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
@@ -94,8 +95,8 @@
94
  <show_in_website>1</show_in_website>
95
  <show_in_store>1</show_in_store>
96
  </allowspecific>
97
- <specificcountry translate="label">
98
- <label>Payment from Specific countries</label>
99
  <frontend_type>multiselect</frontend_type>
100
  <sort_order>8</sort_order>
101
  <source_model>adminhtml/system_config_source_country</source_model>
@@ -120,7 +121,7 @@
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>
@@ -128,7 +129,7 @@
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>
@@ -136,20 +137,11 @@
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>
142
- <source_model>adminhtml/system_config_source_yesno</source_model>
143
- <sort_order>13</sort_order>
144
- <show_in_default>1</show_in_default>
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>
@@ -158,7 +150,7 @@
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>
@@ -168,19 +160,49 @@
168
  </depends>
169
  </specificgroup>
170
  <orderscount translate="label comment">
171
- <label>Minimum Orders Count</label>
172
  <frontend_type>text</frontend_type>
173
- <sort_order>16</sort_order>
174
  <comment>Default: "0" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.</comment>
175
  <show_in_default>1</show_in_default>
176
  <show_in_website>1</show_in_website>
177
  <show_in_store>0</show_in_store>
178
  </orderscount>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  </fields>
180
  </debit>
181
  </groups>
182
  </payment>
183
- <debitpayment translate="label" module="moneybookers">
184
  <label>Debit Payment</label>
185
  <tab>sales</tab>
186
  <frontend_type>text</frontend_type>
@@ -205,22 +227,38 @@
205
  <show_in_website>1</show_in_website>
206
  <show_in_store>1</show_in_store>
207
  </account_owner>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  <routing_number translate="label">
209
  <label>Routing Number</label>
210
  <frontend_type>text</frontend_type>
211
- <sort_order>2</sort_order>
212
  <show_in_default>1</show_in_default>
213
  <show_in_website>1</show_in_website>
214
  <show_in_store>1</show_in_store>
215
  </routing_number>
216
- <account_number translate="label">
217
- <label>Accountnumber</label>
218
  <frontend_type>text</frontend_type>
219
- <sort_order>3</sort_order>
220
  <show_in_default>1</show_in_default>
221
  <show_in_website>1</show_in_website>
222
  <show_in_store>1</show_in_store>
223
- </account_number>
224
  </fields>
225
  </bankaccount>
226
  </groups>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Itabs_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
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 Itabs
17
+ * @package Itabs_Debit
18
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
  */
24
  -->
25
  <config>
26
  <sections>
27
  <payment>
28
  <groups>
29
+ <debit translate="label" module="debit">
30
  <label>Debit Payment</label>
31
  <frontend_type>text</frontend_type>
32
  <sort_order>1</sort_order>
34
  <show_in_website>1</show_in_website>
35
  <show_in_store>1</show_in_store>
36
  <fields>
37
+ <active translate="label" module="payment">
38
  <label>Enabled</label>
39
  <frontend_type>select</frontend_type>
40
  <source_model>adminhtml/system_config_source_yesno</source_model>
43
  <show_in_website>1</show_in_website>
44
  <show_in_store>1</show_in_store>
45
  </active>
46
+ <title translate="label" module="payment">
47
  <label>Title</label>
48
  <frontend_type>text</frontend_type>
49
  <sort_order>2</sort_order>
51
  <show_in_website>1</show_in_website>
52
  <show_in_store>1</show_in_store>
53
  </title>
54
+ <sort_order translate="label" module="payment">
55
+ <label>Sort Order</label>
56
  <frontend_type>text</frontend_type>
57
  <sort_order>3</sort_order>
58
  <show_in_default>1</show_in_default>
59
  <show_in_website>1</show_in_website>
60
  <show_in_store>1</show_in_store>
61
  </sort_order>
62
+ <order_status translate="label" module="payment">
63
+ <label>New Order Status</label>
64
  <frontend_type>select</frontend_type>
65
  <source_model>adminhtml/system_config_source_order_status</source_model>
66
  <sort_order>4</sort_order>
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
  </sendmail_crypt>
89
+ <allowspecific translate="label" module="payment">
90
+ <label>Payment from Applicable Countries</label>
91
  <frontend_type>allowspecific</frontend_type>
92
  <sort_order>7</sort_order>
93
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
95
  <show_in_website>1</show_in_website>
96
  <show_in_store>1</show_in_store>
97
  </allowspecific>
98
+ <specificcountry translate="label" module="payment">
99
+ <label>Payment from Specific Countries</label>
100
  <frontend_type>multiselect</frontend_type>
101
  <sort_order>8</sort_order>
102
  <source_model>adminhtml/system_config_source_country</source_model>
121
  <show_in_website>1</show_in_website>
122
  <show_in_store>1</show_in_store>
123
  </save_account_data>
124
+ <min_order_total translate="label" module="payment">
125
  <label>Minimum Order Total</label>
126
  <frontend_type>text</frontend_type>
127
  <sort_order>11</sort_order>
129
  <show_in_website>1</show_in_website>
130
  <show_in_store>1</show_in_store>
131
  </min_order_total>
132
+ <max_order_total translate="label" module="payment">
133
  <label>Maximum Order Total</label>
134
  <frontend_type>text</frontend_type>
135
  <sort_order>12</sort_order>
137
  <show_in_website>1</show_in_website>
138
  <show_in_store>1</show_in_store>
139
  </max_order_total>
 
 
 
 
 
 
 
 
 
140
  <specificgroup_all translate="label comment">
141
  <label>Enabled for all customer groups</label>
142
  <comment>Set to "no" if you want to enable DebitPayment only for specific customer groups defined below.</comment>
143
  <frontend_type>select</frontend_type>
144
+ <sort_order>13</sort_order>
145
  <source_model>adminhtml/system_config_source_yesno</source_model>
146
  <show_in_default>1</show_in_default>
147
  <show_in_website>1</show_in_website>
150
  <specificgroup translate="label">
151
  <label>Enabled only for specific customer groups</label>
152
  <frontend_type>multiselect</frontend_type>
153
+ <sort_order>14</sort_order>
154
  <source_model>debit/system_config_source_customer_group</source_model>
155
  <show_in_default>1</show_in_default>
156
  <show_in_website>1</show_in_website>
160
  </depends>
161
  </specificgroup>
162
  <orderscount translate="label comment">
163
+ <label>Minimum Order Count</label>
164
  <frontend_type>text</frontend_type>
165
+ <sort_order>15</sort_order>
166
  <comment>Default: "0" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.</comment>
167
  <show_in_default>1</show_in_default>
168
  <show_in_website>1</show_in_website>
169
  <show_in_store>0</show_in_store>
170
  </orderscount>
171
+ <customer_order_amount translate="label comment">
172
+ <label>Minimum Order Amount</label>
173
+ <frontend_type>text</frontend_type>
174
+ <sort_order>16</sort_order>
175
+ <comment>Default: "0" for disabled check | Minimum order amount (in the past) needed for the customer to use this payment method.</comment>
176
+ <show_in_default>1</show_in_default>
177
+ <show_in_website>1</show_in_website>
178
+ <show_in_store>1</show_in_store>
179
+ </customer_order_amount>
180
+ <debit_type translate="label">
181
+ <label>Debit Type</label>
182
+ <frontend_type>select</frontend_type>
183
+ <source_model>debit/system_config_source_debit_type</source_model>
184
+ <sort_order>17</sort_order>
185
+ <show_in_default>1</show_in_default>
186
+ <show_in_website>1</show_in_website>
187
+ <show_in_store>1</show_in_store>
188
+ </debit_type>
189
+ <checkout_valid_blz translate="label">
190
+ <label>Checkout only with valid BLZ</label>
191
+ <frontend_type>select</frontend_type>
192
+ <source_model>adminhtml/system_config_source_yesno</source_model>
193
+ <sort_order>18</sort_order>
194
+ <show_in_default>1</show_in_default>
195
+ <show_in_website>1</show_in_website>
196
+ <show_in_store>1</show_in_store>
197
+ <depends>
198
+ <debit_type>bank</debit_type>
199
+ </depends>
200
+ </checkout_valid_blz>
201
  </fields>
202
  </debit>
203
  </groups>
204
  </payment>
205
+ <debitpayment translate="label" module="debit">
206
  <label>Debit Payment</label>
207
  <tab>sales</tab>
208
  <frontend_type>text</frontend_type>
227
  <show_in_website>1</show_in_website>
228
  <show_in_store>1</show_in_store>
229
  </account_owner>
230
+ <account_number translate="label">
231
+ <label>Accountnumber</label>
232
+ <frontend_type>text</frontend_type>
233
+ <sort_order>2</sort_order>
234
+ <show_in_default>1</show_in_default>
235
+ <show_in_website>1</show_in_website>
236
+ <show_in_store>1</show_in_store>
237
+ </account_number>
238
+ <account_iban translate="label">
239
+ <label>IBAN</label>
240
+ <frontend_type>text</frontend_type>
241
+ <sort_order>3</sort_order>
242
+ <show_in_default>1</show_in_default>
243
+ <show_in_website>1</show_in_website>
244
+ <show_in_store>1</show_in_store>
245
+ </account_iban>
246
  <routing_number translate="label">
247
  <label>Routing Number</label>
248
  <frontend_type>text</frontend_type>
249
+ <sort_order>4</sort_order>
250
  <show_in_default>1</show_in_default>
251
  <show_in_website>1</show_in_website>
252
  <show_in_store>1</show_in_store>
253
  </routing_number>
254
+ <swift_bic translate="label">
255
+ <label>BIC/Swift-Code</label>
256
  <frontend_type>text</frontend_type>
257
+ <sort_order>5</sort_order>
258
  <show_in_default>1</show_in_default>
259
  <show_in_website>1</show_in_website>
260
  <show_in_store>1</show_in_store>
261
+ </swift_bic>
262
  </fields>
263
  </bankaccount>
264
  </groups>
app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-install-0.4.0.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,24 @@
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 2012 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 2012 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');
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Setup script
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
  // load id for customer entity
37
  $read = Mage::getSingleton('core/resource')->getConnection('core_read');
app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.3.0-0.4.0.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,24 +14,24 @@
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 2012 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 2012 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');
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Setup script
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
  // load id for customer entity
37
  $read = Mage::getSingleton('core/resource')->getConnection('core_read');
app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.4.9-0.5.0.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,29 +14,35 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Setup script
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
  $installer = $this;
35
  $installer->startSetup();
36
 
37
  $write = Mage::getSingleton('core/resource')->getConnection('core_write');
38
  $write->query('SET FOREIGN_KEY_CHECKS=0;');
39
- $write->query("UPDATE {$this->getTable('eav_attribute')} SET attribute_code = 'debit_payment_acount_update' WHERE attribute_code = 'debit_payment_acount_data_update';");
 
 
 
 
40
  $write->query('SET FOREIGN_KEY_CHECKS=1;');
41
 
42
  $installer->endSetup();
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Setup script
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
  $installer = $this;
37
  $installer->startSetup();
38
 
39
  $write = Mage::getSingleton('core/resource')->getConnection('core_write');
40
  $write->query('SET FOREIGN_KEY_CHECKS=0;');
41
+ $write->query("
42
+ UPDATE {$this->getTable('eav_attribute')}
43
+ SET attribute_code = 'debit_payment_acount_update'
44
+ WHERE attribute_code = 'debit_payment_acount_data_update';
45
+ ");
46
  $write->query('SET FOREIGN_KEY_CHECKS=1;');
47
 
48
  $installer->endSetup();
app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.5.0-0.5.1.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,22 +14,24 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Setup script
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
 
35
  $installer = $this;
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Setup script
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
 
37
  $installer = $this;
app/code/community/{Mage → Itabs}/Debit/sql/debit_setup/mysql4-upgrade-0.5.1-0.5.2.php RENAMED
@@ -1,6 +1,6 @@
1
  <?php
2
  /**
3
- * This file is part of the Mage_Debit module.
4
  *
5
  * PHP version 5
6
  *
@@ -14,22 +14,24 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
  * Setup script
26
  *
27
- * @category Mage
28
- * @package Mage_Debit
29
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
30
- * @copyright 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
31
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
32
- * @link http://www.magentocommerce.com/extension/676/
 
33
  */
34
 
35
  /* @var $installer Mage_Sales_Model_Entity_Setup */
@@ -50,9 +52,15 @@ $sql = "DROP TABLE IF EXISTS `{$installer->getTable('debit/order_grid')}`;
50
  `status` int(1) unsigned DEFAULT '0' COMMENT 'Status',
51
  PRIMARY KEY (`id`),
52
  UNIQUE KEY `UNQ_DEBITPAYMENT_ORDER_GRID_INCREMENT_ID` (`increment_id`),
53
- CONSTRAINT `FK_DEBITPAYMENT_ORDER_GRID_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `{$installer->getTable('customer/entity')}` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
54
- CONSTRAINT `FK_DEBITPAYMENT_GRID_ENTITY_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales/order')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
55
- CONSTRAINT `FK_DEBITPAYMENT_ORDER_GRID_STORE_ID_CORE_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `{$installer->getTable('core/store')}` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
 
 
 
 
 
 
56
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Debit Payment Order Grid';";
57
 
58
  $installer->run($sql);
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_Debit module.
4
  *
5
  * PHP version 5
6
  *
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 Itabs
18
+ * @package Itabs_Debit
19
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
  */
25
  /**
26
  * Setup script
27
  *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
35
  */
36
 
37
  /* @var $installer Mage_Sales_Model_Entity_Setup */
52
  `status` int(1) unsigned DEFAULT '0' COMMENT 'Status',
53
  PRIMARY KEY (`id`),
54
  UNIQUE KEY `UNQ_DEBITPAYMENT_ORDER_GRID_INCREMENT_ID` (`increment_id`),
55
+ CONSTRAINT `FK_DEBITPAYMENT_ORDER_GRID_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID`
56
+ FOREIGN KEY (`customer_id`)
57
+ REFERENCES `{$installer->getTable('customer/entity')}` (`entity_id`) ON DELETE SET NULL ON UPDATE CASCADE,
58
+ CONSTRAINT `FK_DEBITPAYMENT_GRID_ENTITY_ID_SALES_FLAT_ORDER_ENTITY_ID`
59
+ FOREIGN KEY (`entity_id`)
60
+ REFERENCES `{$installer->getTable('sales/order')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
61
+ CONSTRAINT `FK_DEBITPAYMENT_ORDER_GRID_STORE_ID_CORE_STORE_STORE_ID`
62
+ FOREIGN KEY (`store_id`)
63
+ REFERENCES `{$installer->getTable('core/store')}` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE
64
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Debit Payment Order Grid';";
65
 
66
  $installer->run($sql);
app/code/community/Itabs/Debit/sql/debit_setup/mysql4-upgrade-0.5.2-1.0.0.php ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
18
+ * @package Itabs_Debit
19
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
20
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
21
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
22
+ * @version 1.0.0
23
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
24
+ */
25
+ /**
26
+ * Setup script
27
+ *
28
+ * @category Itabs
29
+ * @package Itabs_Debit
30
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
+ * @copyright 2008-2013 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
+ * @version 1.0.0
34
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
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
+ $customerTypeId = $eid['entity_type_id'];
42
+
43
+ $attrSwift = array(
44
+ 'type' => 'varchar',
45
+ 'input' => 'text',
46
+ 'label' => 'Account Swift Code',
47
+ 'backend' => 'debit/entity_customer_attribute_backend_encrypted',
48
+ 'global' => 1,
49
+ 'required' => 0,
50
+ 'default' => '',
51
+ 'position' => '100'
52
+ );
53
+
54
+ $attrIban = array(
55
+ 'type' => 'varchar',
56
+ 'input' => 'text',
57
+ 'label' => 'Account IBAN',
58
+ 'backend' => 'debit/entity_customer_attribute_backend_encrypted',
59
+ 'global' => 1,
60
+ 'required' => 0,
61
+ 'default' => '',
62
+ 'position' => '100'
63
+ );
64
+
65
+ /* @var $installer Mage_Core_Model_Resource_Setup */
66
+ $installer = $this;
67
+ $installer->startSetup();
68
+
69
+ $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
70
+ $setup->addAttribute($customerTypeId, 'debit_payment_account_swift', $attrSwift);
71
+ $setup->addAttribute($customerTypeId, 'debit_payment_account_iban', $attrIban);
72
+
73
+ // Since 1.4.2.0 this is necessary!
74
+ $eavConfig = Mage::getSingleton('eav/config');
75
+
76
+ $attribute = $eavConfig->getAttribute($customerTypeId, 'debit_payment_account_swift');
77
+ $attribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer'));
78
+ $attribute->save();
79
+
80
+ $attribute = $eavConfig->getAttribute($customerTypeId, 'debit_payment_account_iban');
81
+ $attribute->setData('used_in_forms', array('customer_account_edit', 'customer_account_create', 'adminhtml_customer'));
82
+ $attribute->save();
83
+
84
+ // Add new fields to quote_payment and order_payment table
85
+
86
+ $installer->getConnection()->addColumn(
87
+ $installer->getTable('sales/quote_payment'),
88
+ 'debit_swift',
89
+ array(
90
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
91
+ 'lenght' => 255,
92
+ 'comment' => 'Debit Swift Code'
93
+ )
94
+ );
95
+
96
+ $installer->getConnection()->addColumn(
97
+ $installer->getTable('sales/quote_payment'),
98
+ 'debit_iban',
99
+ array(
100
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
101
+ 'lenght' => 255,
102
+ 'comment' => 'Debit IBAN'
103
+ )
104
+ );
105
+
106
+ $installer->getConnection()->addColumn(
107
+ $installer->getTable('sales/quote_payment'),
108
+ 'debit_type',
109
+ array(
110
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
111
+ 'lenght' => 4,
112
+ 'comment' => 'Debit Type'
113
+ )
114
+ );
115
+
116
+ $installer->getConnection()->addColumn(
117
+ $installer->getTable('sales/order_payment'),
118
+ 'debit_swift',
119
+ array(
120
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
121
+ 'lenght' => 255,
122
+ 'comment' => 'Debit Swift Code'
123
+ )
124
+ );
125
+
126
+ $installer->getConnection()->addColumn(
127
+ $installer->getTable('sales/order_payment'),
128
+ 'debit_iban',
129
+ array(
130
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
131
+ 'lenght' => 255,
132
+ 'comment' => 'Debit IBAN'
133
+ )
134
+ );
135
+
136
+ $installer->getConnection()->addColumn(
137
+ $installer->getTable('sales/order_payment'),
138
+ 'debit_type',
139
+ array(
140
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
141
+ 'lenght' => 4,
142
+ 'comment' => 'Debit Type'
143
+ )
144
+ );
145
+
146
+ // Add new field to the debit order grid
147
+ $installer->getConnection()->addColumn(
148
+ $installer->getTable('debit/order_grid'),
149
+ 'debit_type',
150
+ array(
151
+ 'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
152
+ 'lenght' => 4,
153
+ 'comment' => 'Debit Type'
154
+ )
155
+ );
156
+
157
+
158
+ // End setup
159
+ $installer->endSetup();
160
+
161
+ // EOF
app/code/community/Mage/Debit/controllers/Adminhtml/OrderController.php DELETED
@@ -1,240 +0,0 @@
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 2012 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.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
- require_once (Mage::getBaseDir().'/lib/DTA/DTA.php');
25
- /**
26
- * Export Order Controller
27
- *
28
- * @category Mage
29
- * @package Mage_Debit
30
- * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
31
- * @copyright 2012 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_Adminhtml_OrderController extends Mage_Adminhtml_Controller_Action
36
- {
37
- /**
38
- * Loads the grid layout with the debit payment orders..
39
- *
40
- * @return void
41
- */
42
- public function indexAction()
43
- {
44
- $this->loadLayout();
45
- $this->_setActiveMenu('sales/debitpayment');
46
- $this->renderLayout();
47
- }
48
-
49
- /**
50
- * Fetch all orders with the payment method "Debit Payment" and import them
51
- * into the export list (table: debit_order_grid)
52
- *
53
- * @return void
54
- */
55
- public function syncAction()
56
- {
57
- $syncedOrders = $this->_getDebitHelper()->getSyncedOrders();
58
- $syncedOrdersCount = 0;
59
-
60
- // Sync orders
61
- $collection = Mage::getResourceModel('sales/order_grid_collection');
62
- if (count($syncedOrders) > 0) {
63
- $collection->addFieldToFilter('entity_id', array('nin' => $syncedOrders));
64
- }
65
-
66
- /* @var $resource Mage_Core_Model_Resource */
67
- $resource = Mage::getSingleton('core/resource');
68
- $salesFlatOrderTable = $resource->getTableName('sales_flat_order');
69
- $salesFlatOrderPaymentTable = $resource->getTableName('sales_flat_order_payment');
70
-
71
- $collection->getSelect()->joinLeft(
72
- $salesFlatOrderTable,
73
- $salesFlatOrderTable.'.entity_id = main_table.entity_id',
74
- array('customer_id')
75
- );
76
- $collection->getSelect()->joinLeft(
77
- $salesFlatOrderPaymentTable,
78
- $salesFlatOrderPaymentTable.'.parent_id = main_table.entity_id',
79
- array('method')
80
- );
81
- $collection->getSelect()->where('method = ?', 'debit');
82
-
83
- foreach ($collection as $order) {
84
- /* @var $order Mage_Sales_Model_Order */
85
-
86
- // Remove some values from the data array
87
- $unsetData = array('status', 'base_grand_total', 'base_total_paid', 'total_paid', 'updated_at', 'method', 'shipping_name', 'base_currency_code', 'store_name');
88
- foreach ($unsetData as $key) {
89
- $order->unsetData($key);
90
- }
91
-
92
- /* @var $model Mage_Debit_Model_Orders */
93
- $model = Mage::getModel('debit/orders');
94
- $model->addData($order->getData());
95
- $model->save();
96
-
97
- $syncedOrdersCount++;
98
- }
99
-
100
- if ($syncedOrdersCount > 0) {
101
- $this->_getSession()->addSuccess(
102
- $this->_getDebitHelper()->__('Orders successfully synced for export.')
103
- );
104
- } else {
105
- $this->_getSession()->addError(
106
- $this->_getDebitHelper()->__('No orders available for sync.')
107
- );
108
- }
109
- $this->_redirect('*/*');
110
- }
111
-
112
- /**
113
- * Export the order list as DTA file
114
- *
115
- * @return void|Mage_Core_Controller_Varien_Action
116
- */
117
- public function exportdtausAction()
118
- {
119
- $collection = $this->_hasOrdersToExport();
120
- if (!$collection) {
121
- $this->_redirect('*/*');
122
-
123
- return;
124
- }
125
-
126
- // Create new object and set store owner bank account data
127
- $file = new DTA(DTA_DEBIT);
128
- $file->setAccountFileSender($this->_getDebitHelper()->getBankAccount());
129
-
130
- // Add orders
131
- foreach ($collection as $order) {
132
- /* @var $orderModel Mage_Sales_Model_Order */
133
- $orderModel = Mage::getModel('sales/order')->load($order->getData('entity_id'));
134
- /* @var $payment Mage_Debit_Model_Debit */
135
- $paymentMethod = $orderModel->getPayment()->getMethodInstance();
136
-
137
- $file->addExchange(
138
- array(
139
- 'name' => $paymentMethod->getAccountName(),
140
- 'bank_code' => $paymentMethod->getAccountBLZ(),
141
- 'account_number' => $paymentMethod->getAccountNumber(),
142
- ),
143
- round($order->getData('grand_total'), 2),
144
- array(
145
- 'Bestellung Nr. '.$order->getData('increment_id')
146
- )
147
- );
148
-
149
- $this->_getDebitHelper()->setStatusAsExported($order->getId());
150
- }
151
-
152
- return $this->_prepareDownloadResponse('EXPORT'.date('YmdHis'), $file->getFileContent());
153
- }
154
-
155
- /**
156
- * Export the order list as CSV
157
- *
158
- * @return void|Mage_Core_Controller_Varien_Action
159
- */
160
- public function exportcsvAction()
161
- {
162
- $collection = $this->_hasOrdersToExport();
163
- if (!$collection) {
164
- $this->_redirect('*/*');
165
-
166
- return;
167
- }
168
-
169
- $fileName = 'EXPORT'.date('YmdHis').'.csv';
170
-
171
- // Open file
172
- $io = new Varien_Io_File();
173
- $io->open(array('path' => Mage::getBaseDir('var')));
174
- $io->streamOpen($fileName);
175
-
176
- // Add headline
177
- $row = array(
178
- 'Kundenname',
179
- 'BLZ',
180
- 'Kontonummer',
181
- 'Betrag',
182
- 'Verwendungszweck'
183
- );
184
- $io->streamWriteCsv($row);
185
-
186
- // Add rows
187
- foreach ($collection as $order) {
188
- /* @var $orderModel Mage_Sales_Model_Order */
189
- $orderModel = Mage::getModel('sales/order')->load($order->getData('entity_id'));
190
- /* @var $payment Mage_Debit_Model_Debit */
191
- $paymentMethod = $orderModel->getPayment()->getMethodInstance();
192
-
193
- $row = array(
194
- 'name' => $paymentMethod->getAccountName(),
195
- 'bank_code' => $paymentMethod->getAccountBLZ(),
196
- 'account_number' => $paymentMethod->getAccountNumber(),
197
- 'amount' => number_format($order->getData('grand_total'), 2, ',', '.').' '.$order->getData('order_currency_code'),
198
- 'purpose' => 'Bestellung Nr. '.$order->getData('increment_id')
199
- );
200
- $io->streamWriteCsv($row);
201
-
202
- $this->_getDebitHelper()->setStatusAsExported($order->getId());
203
- }
204
-
205
- // Close file, get file contents and delete temporary file
206
- $io->close();
207
- $filePath = Mage::getBaseDir('var') . DS . $fileName;
208
- $fileContents = file_get_contents($filePath);
209
- $io->rm($fileName);
210
-
211
- return $this->_prepareDownloadResponse($fileName, $fileContents);
212
- }
213
-
214
- /**
215
- * Check if there are orders available for export..
216
- *
217
- * @return void
218
- */
219
- protected function _hasOrdersToExport()
220
- {
221
- $collection = Mage::getModel('debit/orders')->getCollection()->addFieldToFilter('status', 0);
222
- if ($collection->count() == 0) {
223
- $this->_getSession()->addError($this->_getDebitHelper()->__('No orders to export.'));
224
-
225
- return false;
226
- }
227
-
228
- return $collection;
229
- }
230
-
231
- /**
232
- * Retrieve the helper class
233
- *
234
- * @return Mage_Debit_Helper_Adminhtml Helper
235
- */
236
- protected function _getDebitHelper()
237
- {
238
- return Mage::helper('debit/adminhtml');
239
- }
240
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/adminhtml/default/default/layout/debit.xml CHANGED
@@ -1,4 +1,27 @@
1
  <?xml version="1.0" encoding="UTF-8"?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <layout version="0.1.0">
3
  <debit_adminhtml_order_index>
4
  <reference name="content">
1
  <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * This file is part of the Itabs_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 Itabs
17
+ * @package Itabs_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
+ */
24
+ -->
25
  <layout version="0.1.0">
26
  <debit_adminhtml_order_index>
27
  <reference name="content">
app/design/adminhtml/default/default/template/debit/debit.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,13 +12,13 @@
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 2012 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()): ?>
@@ -30,4 +30,4 @@
30
  {{pdf_row_separator}}
31
  <?php echo $this->__('Bank code: %s', $_info->getAccountBLZ()) ?>
32
  {{pdf_row_separator}}
33
- <?php endif; ?>
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <?php if($_info = $this->getMethod()): ?>
30
  {{pdf_row_separator}}
31
  <?php echo $this->__('Bank code: %s', $_info->getAccountBLZ()) ?>
32
  {{pdf_row_separator}}
33
+ <?php endif; ?>
app/design/adminhtml/default/default/template/debit/form.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,13 +12,13 @@
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 2012 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">
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
app/design/adminhtml/default/default/template/debit/info.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,46 +12,44 @@
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 2012 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()): ?>
25
  <?php echo $this->htmlEscape($_info->getTitle()) ?><br /><br />
26
 
27
  <?php if ($this->isEmailContext()): ?>
28
-
29
- <?php // TO DO !!! ?>
30
-
31
  <?php if ($this->sendDataInEmail()): ?>
32
  <?php $_data = $this->getEmailData() ?>
33
  <?php if (!empty($_data['bank_name'])): ?>
34
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_data['bank_name'])) ?><br />
35
  <?php endif; ?>
36
-
37
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_data['account_blz'])) ?><br />
38
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_data['account_name'])) ?><br />
39
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_data['account_number'])) ?><br />
40
  <?php endif; ?>
41
-
42
  <?php else: ?>
43
-
44
  <?php if ($_info->getAccountBankname() == Mage::helper('debit')->__('not available')): ?>
45
  <span style="color: #cc0000;font-weight:bold;"><?php echo $this->__('Fehler! Die eingegebenen Bankdaten können fehlerhaft sein!<br />Bitte setzen Sie sich mit dem Kunden in Verbindung!') ?></span><br /><br />
46
  <?php else: ?>
47
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getAccountBankname())) ?><br />
48
  <?php endif; ?>
49
-
50
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_info->getAccountBLZ())) ?><br />
51
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_info->getAccountName())) ?><br />
52
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_info->getAccountNumber())) ?><br />
53
-
54
  <?php endif; ?>
55
-
56
  <br />
57
- <?php endif; ?>
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <?php if ($_info = $this->getMethod()): ?>
25
  <?php echo $this->htmlEscape($_info->getTitle()) ?><br /><br />
26
 
27
  <?php if ($this->isEmailContext()): ?>
28
+
 
 
29
  <?php if ($this->sendDataInEmail()): ?>
30
  <?php $_data = $this->getEmailData() ?>
31
  <?php if (!empty($_data['bank_name'])): ?>
32
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_data['bank_name'])) ?><br />
33
  <?php endif; ?>
34
+
35
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_data['account_blz'])) ?><br />
36
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_data['account_name'])) ?><br />
37
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_data['account_number'])) ?><br />
38
  <?php endif; ?>
39
+
40
  <?php else: ?>
41
+
42
  <?php if ($_info->getAccountBankname() == Mage::helper('debit')->__('not available')): ?>
43
  <span style="color: #cc0000;font-weight:bold;"><?php echo $this->__('Fehler! Die eingegebenen Bankdaten können fehlerhaft sein!<br />Bitte setzen Sie sich mit dem Kunden in Verbindung!') ?></span><br /><br />
44
  <?php else: ?>
45
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getAccountBankname())) ?><br />
46
  <?php endif; ?>
47
+
48
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_info->getAccountBLZ())) ?><br />
49
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_info->getAccountName())) ?><br />
50
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_info->getAccountNumber())) ?><br />
51
+
52
  <?php endif; ?>
53
+
54
  <br />
55
+ <?php endif; ?>
app/design/adminhtml/default/default/template/debit/sepa/debit.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Info
27
+ * @var $this Itabs_Debit_Block_Info
28
+ */
29
+ ?>
30
+ <?php if($_info = $this->getMethod()): ?>
31
+ <?php echo $this->escapeHtml($_info->getTitle()) ?>
32
+ {{pdf_row_separator}}
33
+ <?php echo $this->__('Account holder: %s', $_info->getAccountName()) ?>
34
+ {{pdf_row_separator}}
35
+ <?php echo $this->__('SWIFT Code: %s', $_info->getAccountSwift()) ?>
36
+ {{pdf_row_separator}}
37
+ <?php echo $this->__('IBAN: %s', $_info->getAccountIban()) ?>
38
+ {{pdf_row_separator}}
39
+ <?php endif; ?>
app/design/adminhtml/default/default/template/debit/sepa/form.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Form
27
+ * @var $this Itabs_Debit_Block_Form
28
+ */
29
+ ?>
30
+ <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
31
+ <li>
32
+ <div class="input-box">
33
+ <?php if ($this->getMethod()->getCustomText()): ?>
34
+ <?php echo $this->getMethod()->getCustomText() ?><br />
35
+ <?php endif; ?>
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="swiftcode"><?php echo $this->__('SWIFT Code') ?> <span class="required">*</span></label><br />
47
+ <input type="text" id="swiftcode" name="payment[debit_swift]" title="<?php echo $this->__('SWIFT Code') ?>" class="input-text required-entry" value="<?php echo $this->getAccountSwift() ?>" />
48
+ </div>
49
+ </li>
50
+ <li>
51
+ <div class="input-box">
52
+ <label for="iban"><?php echo $this->__('IBAN') ?> <span class="required">*</span></label><br />
53
+ <input type="text" id="iban" name="payment[debit_iban]" title="<?php echo $this->__('IBAN') ?>" class="input-text required-entry" value="<?php echo $this->getAccountIban() ?>" />
54
+ </div>
55
+ </li>
56
+ </ul>
app/design/adminhtml/default/default/template/debit/sepa/info.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Info
27
+ * @var $this Itabs_Debit_Block_Info
28
+ */
29
+ ?>
30
+ <?php if ($_info = $this->getMethod()): ?>
31
+ <?php echo $this->escapeHtml($_info->getTitle()) ?><br /><br />
32
+
33
+ <?php if ($this->isEmailContext()): ?>
34
+
35
+ <?php if ($this->sendDataInEmail()): ?>
36
+ <?php $_data = $this->getEmailData() ?>
37
+ <?php if ($_data['debit_type'] == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
38
+ <?php if (!empty($_data['bank_name'])): ?>
39
+ <?php echo $this->__('Bank name: %s', $this->escapeHtml($_data['bank_name'])) ?><br />
40
+ <?php endif; ?>
41
+
42
+ <?php echo $this->__('Bank code: %s', $this->escapeHtml($_data['account_blz'])) ?><br />
43
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
44
+ <?php echo $this->__('Account number: %s', $this->escapeHtml($_data['account_number'])) ?><br />
45
+ <?php else: ?>
46
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
47
+ <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_data['account_swift'])) ?><br />
48
+ <?php echo $this->__('IBAN: %s', $this->escapeHtml($_data['account_iban'])) ?><br />
49
+ <?php endif; ?>
50
+ <?php endif; ?>
51
+
52
+ <?php else: ?>
53
+ <?php if ($this->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
54
+ <?php if ($_info->getAccountBankname() == Mage::helper('debit')->__('not available')): ?>
55
+ <span style="color: #cc0000;font-weight:bold;"><?php echo $this->__('Fehler! Die eingegebenen Bankdaten können fehlerhaft sein!<br />Bitte setzen Sie sich mit dem Kunden in Verbindung!') ?></span><br /><br />
56
+ <?php else: ?>
57
+ <?php echo $this->__('Bank name: %s', $this->escapeHtml($_info->getAccountBankname())) ?><br />
58
+ <?php endif; ?>
59
+
60
+ <?php echo $this->__('Bank code: %s', $this->escapeHtml($_info->getAccountBLZ())) ?><br />
61
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
62
+ <?php echo $this->__('Account number: %s', $this->escapeHtml($_info->getAccountNumber())) ?><br />
63
+ <?php else: ?>
64
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
65
+ <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_info->getAccountSwift())) ?><br />
66
+ <?php echo $this->__('IBAN: %s', $this->escapeHtml($_info->getAccountIban())) ?><br />
67
+ <?php endif; ?>
68
+ <?php endif; ?>
69
+
70
+ <br />
71
+ <?php endif; ?>
app/design/frontend/base/default/layout/debit.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * This file is part of the Mage_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -13,13 +13,13 @@
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 2012 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">
@@ -30,25 +30,25 @@
30
  </customer_account>
31
 
32
  <debit_account_edit translate="label">
33
- <reference name="head">
34
- <action method="addJs"><script>mage/debit/blzcheck.js</script></action>
35
- </reference>
36
  <label>Debit Account Data</label>
37
  <update handle="customer_account"/>
38
  <reference name="content">
39
- <block type="debit/account_data" name="debit.account.data" template="debit/account/data.phtml"/>
40
  </reference>
41
  </debit_account_edit>
42
 
43
  <checkout_onepage_index>
44
- <reference name="head">
45
- <action method="addJs"><script>mage/debit/blzcheck.js</script></action>
46
- </reference>
47
  </checkout_onepage_index>
48
 
49
  <checkout_multishipping_billing>
50
- <reference name="head">
51
- <action method="addJs"><script>mage/debit/blzcheck.js</script></action>
52
- </reference>
53
  </checkout_multishipping_billing>
54
  </layout>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Itabs_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
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 Itabs
17
+ * @package Itabs_Debit
18
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
  */
24
  -->
25
  <layout version="0.1.0">
30
  </customer_account>
31
 
32
  <debit_account_edit translate="label">
33
+ <reference name="head">
34
+ <action method="addJs"><script>itabs/debit/blzcheck.js</script></action>
35
+ </reference>
36
  <label>Debit Account Data</label>
37
  <update handle="customer_account"/>
38
  <reference name="content">
39
+ <block type="debit/account_data" name="debit.account.data" />
40
  </reference>
41
  </debit_account_edit>
42
 
43
  <checkout_onepage_index>
44
+ <reference name="head">
45
+ <action method="addJs"><script>itabs/debit/blzcheck.js</script></action>
46
+ </reference>
47
  </checkout_onepage_index>
48
 
49
  <checkout_multishipping_billing>
50
+ <reference name="head">
51
+ <action method="addJs"><script>itabs/debit/blzcheck.js</script></action>
52
+ </reference>
53
  </checkout_multishipping_billing>
54
  </layout>
app/design/frontend/base/default/template/debit/account/data.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,13 +12,13 @@
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 2012 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">
@@ -33,7 +33,7 @@
33
  <li>
34
  <div class="input-box">
35
  <label for="kreditinstitut"><?php echo $this->__('Kreditinstitut') ?></label><br />
36
- <span id="blz_bank_name" style="display: block; padding : 0 0 0 10px; float:left;"><?php echo $this->getBankName(); ?></span>
37
  </div>
38
  </li>
39
  <li>
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <div class="page-title">
33
  <li>
34
  <div class="input-box">
35
  <label for="kreditinstitut"><?php echo $this->__('Kreditinstitut') ?></label><br />
36
+ <span id="kreditinstitut" style="display: block; padding : 0 0 0 10px; float:left;"><?php echo $this->getBankName(); ?></span>
37
  </div>
38
  </li>
39
  <li>
app/design/frontend/base/default/template/debit/form.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,13 +12,13 @@
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 2012 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">
@@ -38,27 +38,27 @@ blzCheck = new blzAjaxCheck('<?php echo $this->getUrl('debit/ajax/checkblz');?>'
38
  </li>
39
  <li>
40
  <div class="input-box">
41
- <label for="kreditinstitut"><?php echo $this->__('Kreditinstitut') ?></label><br />
42
- <span id="blz_bank_name" style="display:block;padding:0 0 0 10px;float:left;"><?php echo $this->getBankName(); ?></span>
43
  </div>
44
  </li>
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>
64
  </fieldset>
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <script type="text/javascript">
38
  </li>
39
  <li>
40
  <div class="input-box">
41
+ <label for="blz_bank_name"><?php echo $this->__('Kreditinstitut') ?></label><br />
42
+ <span id="blz_bank_name"><?php echo $this->getBankName(); ?></span>
43
  </div>
44
  </li>
45
  <li>
46
+ <div class="input-box">
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>
64
  </fieldset>
app/design/frontend/base/default/template/debit/info.phtml CHANGED
@@ -1,9 +1,9 @@
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:
@@ -12,13 +12,13 @@
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 2012 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()): ?>
@@ -30,12 +30,12 @@
30
  <?php if (!empty($_data['bank_name'])): ?>
31
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_data['bank_name'])) ?><br />
32
  <?php endif; ?>
33
-
34
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_data['account_blz'])) ?><br />
35
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_data['account_name'])) ?><br />
36
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_data['account_number'])) ?><br />
37
  <?php endif; ?>
38
-
39
  <?php else: ?>
40
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getAccountBankname())) ?><br />
41
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_info->getAccountBLZ())) ?><br />
@@ -47,4 +47,4 @@
47
  <br />
48
  <?php echo $this->htmlEscape($_customText) ?><br />
49
  <?php endif; ?>
50
- <?php endif; ?>
1
  <?php
2
  /**
3
+ * This file is part of the Itabs_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:
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 Itabs
16
+ * @package Itabs_Debit
17
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
  */
23
  ?>
24
  <?php if ($_info = $this->getMethod()): ?>
30
  <?php if (!empty($_data['bank_name'])): ?>
31
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_data['bank_name'])) ?><br />
32
  <?php endif; ?>
33
+
34
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_data['account_blz'])) ?><br />
35
  <?php echo $this->__('Account holder: %s', $this->htmlEscape($_data['account_name'])) ?><br />
36
  <?php echo $this->__('Account number: %s', $this->htmlEscape($_data['account_number'])) ?><br />
37
  <?php endif; ?>
38
+
39
  <?php else: ?>
40
  <?php echo $this->__('Bank name: %s', $this->htmlEscape($_info->getAccountBankname())) ?><br />
41
  <?php echo $this->__('Bank code: %s', $this->htmlEscape($_info->getAccountBLZ())) ?><br />
47
  <br />
48
  <?php echo $this->htmlEscape($_customText) ?><br />
49
  <?php endif; ?>
50
+ <?php endif; ?>
app/design/frontend/base/default/template/debit/sepa/account/data.phtml ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Account_Data
27
+ * @var $this Itabs_Debit_Block_Account_Data
28
+ */
29
+ ?>
30
+ <div class="page-title">
31
+ <h1><?php echo $this->__('Edit Debit Account Data') ?></h1>
32
+ </div>
33
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
34
+ <form action="<?php echo $this->getUrl('debit/account/save') ?>" method="post" id="form-validate">
35
+ <div class="fieldset">
36
+ <?php echo $this->getBlockHtml('formkey')?>
37
+ <h2 class="legend"><?php echo $this->__('Debit Account Data') ?></h2>
38
+ <ul class="form-list">
39
+ <li>
40
+ <div class="input-box">
41
+ <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?></label><br />
42
+ <input type="text" id="kontoinhaber" name="account_name" title="<?php echo $this->__('Kontoinhaber') ?>" class="input-text required-entry" value="<?php echo $this->getAccountName() ?>" />
43
+ </div>
44
+ </li>
45
+ <li>
46
+ <div class="input-box">
47
+ <label for="swiftcode"><?php echo $this->__('SWIFT Code') ?></label><br />
48
+ <input type="text" id="swiftcode" name="account_swift" title="<?php echo $this->__('SWIFT Code') ?>" class="input-text required-entry" value="<?php echo $this->getAccountSwift() ?>" />
49
+ </div>
50
+ </li>
51
+ <li>
52
+ <div class="input-box">
53
+ <label for="iban"><?php echo $this->__('IBAN') ?></label><br />
54
+ <input type="text" id="iban" name="account_iban" title="<?php echo $this->__('IBAN') ?>" class="input-text required-entry" value="<?php echo $this->getAccountIban() ?>" />
55
+ </div>
56
+ </li>
57
+ </ul>
58
+ </div>
59
+ <div class="buttons-set">
60
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
61
+ <p class="back-link"><a href="<?php echo $this->getBackUrl() ?>"><small>&laquo; </small><?php echo $this->__('Back') ?></a></p>
62
+ <button type="submit" title="<?php echo $this->__('Save') ?>" class="button"><span><span><?php echo $this->__('Save') ?></span></span></button>
63
+ </div>
64
+ </form>
65
+
66
+ <script type="text/javascript">
67
+ //<![CDATA[
68
+ var dataForm = new VarienForm('form-validate', true);
69
+ //]]>
70
+ </script>
71
+
app/design/frontend/base/default/template/debit/sepa/form.phtml ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Form
27
+ * @var $this Itabs_Debit_Block_Form
28
+ */
29
+ ?>
30
+ <fieldset class="form-list">
31
+ <ul id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
32
+ <li>
33
+ <div class="input-box">
34
+ <?php if ($this->getMethod()->getCustomText()): ?>
35
+ <?php echo $this->getMethod()->getCustomText() ?><br />
36
+ <?php endif; ?>
37
+ </div>
38
+ </li>
39
+ <li>
40
+ <div class="input-box">
41
+ <label for="kontoinhaber"><?php echo $this->__('Kontoinhaber') ?> <span class="required">*</span></label><br />
42
+ <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() ?>" />
43
+ </div>
44
+ </li>
45
+ <li>
46
+ <div class="input-box">
47
+ <label for="swiftcode"><?php echo $this->__('SWIFT Code') ?> <span class="required">*</span></label><br />
48
+ <input type="text" id="swiftcode" name="payment[debit_swift]" title="<?php echo $this->__('SWIFT Code') ?>" class="input-text required-entry" value="<?php echo $this->getAccountSwift() ?>" />
49
+ </div>
50
+ </li>
51
+ <li>
52
+ <div class="input-box">
53
+ <label for="iban"><?php echo $this->__('IBAN') ?> <span class="required">*</span></label><br />
54
+ <input type="text" id="iban" name="payment[debit_iban]" title="<?php echo $this->__('IBAN') ?>" class="input-text required-entry" value="<?php echo $this->getAccountIban() ?>" />
55
+ </div>
56
+ </li>
57
+ </ul>
58
+ </fieldset>
app/design/frontend/base/default/template/debit/sepa/info.phtml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * This file is part of the Itabs_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 Itabs
16
+ * @package Itabs_Debit
17
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
18
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
19
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version 1.0.0
21
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
22
+ */
23
+ ?>
24
+ <?php
25
+ /**
26
+ * @see Itabs_Debit_Block_Info
27
+ * @var $this Itabs_Debit_Block_Info
28
+ */
29
+ ?>
30
+ <?php if ($_info = $this->getMethod()): ?>
31
+ <?php echo $this->escapeHtml($_info->getTitle()) ?><br />
32
+
33
+ <?php if ($this->isEmailContext()): ?>
34
+ <?php if ($this->sendDataInEmail()): ?>
35
+ <?php $_data = $this->getEmailData() ?>
36
+ <?php if ($_data['debit_type'] == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
37
+ <?php if (!empty($_data['bank_name'])): ?>
38
+ <?php echo $this->__('Bank name: %s', $this->escapeHtml($_data['bank_name'])) ?><br />
39
+ <?php endif; ?>
40
+
41
+ <?php echo $this->__('Bank code: %s', $this->escapeHtml($_data['account_blz'])) ?><br />
42
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
43
+ <?php echo $this->__('Account number: %s', $this->escapeHtml($_data['account_number'])) ?><br />
44
+ <?php else: ?>
45
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_data['account_name'])) ?><br />
46
+ <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_data['account_swift'])) ?><br />
47
+ <?php echo $this->__('IBAN: %s', $this->escapeHtml($_data['account_iban'])) ?><br />
48
+ <?php endif; ?>
49
+ <?php endif; ?>
50
+
51
+ <?php else: ?>
52
+ <?php if ($this->getDebitType() == Itabs_Debit_Helper_Data::DEBIT_TYPE_BANK): ?>
53
+ <?php echo $this->__('Bank name: %s', $this->escapeHtml($_info->getAccountBankname())) ?><br />
54
+ <?php echo $this->__('Bank code: %s', $this->escapeHtml($_info->getAccountBLZ())) ?><br />
55
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
56
+ <?php echo $this->__('Account number: %s', $this->escapeHtml($_info->getAccountNumber())) ?><br />
57
+ <?php else: ?>
58
+ <?php echo $this->__('Account holder: %s', $this->escapeHtml($_info->getAccountName())) ?><br />
59
+ <?php echo $this->__('SWIFT Code: %s', $this->escapeHtml($_info->getAccountSwift())) ?><br />
60
+ <?php echo $this->__('IBAN: %s', $this->escapeHtml($_info->getAccountIban())) ?><br />
61
+ <?php endif; ?>
62
+ <?php endif; ?>
63
+
64
+ <?php if ($_customText = $_info->getCustomText()): ?>
65
+ <br />
66
+ <?php echo $this->escapeHtml($_customText) ?><br />
67
+ <?php endif; ?>
68
+ <?php endif; ?>
app/etc/modules/Itabs_Debit.xml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * This file is part of the Itabs_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 Itabs
17
+ * @package Itabs_Debit
18
+ * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
+ */
24
+ -->
25
+ <config>
26
+ <modules>
27
+ <Itabs_Debit>
28
+ <active>true</active>
29
+ <codePool>community</codePool>
30
+ <depends>
31
+ <Mage_Payment />
32
+ </depends>
33
+ </Itabs_Debit>
34
+ </modules>
35
+ </config>
app/etc/modules/Mage_Debit.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
- * This file is part of the Mage_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -13,23 +13,24 @@
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 2012 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>
26
  <modules>
27
  <Mage_Debit>
28
- <active>true</active>
29
  <codePool>community</codePool>
30
  <depends>
31
  <Mage_Payment />
32
  </depends>
 
33
  </Mage_Debit>
34
  </modules>
35
  </config>
1
  <?xml version="1.0"?>
2
  <!--
3
  /**
4
+ * This file is part of the Itabs_Debit module.
5
  *
6
  * NOTICE OF LICENSE
7
  *
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 Itabs
17
+ * @package Itabs_Debit
18
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
19
+ * @copyright 2008-2013 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
+ * @version 1.0.0
22
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
23
  */
24
  -->
25
  <config>
26
  <modules>
27
  <Mage_Debit>
28
+ <active>false</active>
29
  <codePool>community</codePool>
30
  <depends>
31
  <Mage_Payment />
32
  </depends>
33
+ <version>0.5.5</version>
34
  </Mage_Debit>
35
  </modules>
36
  </config>
app/locale/de_DE/{Mage_Debit.csv → Itabs_Debit.csv} RENAMED
@@ -28,7 +28,10 @@
28
  "Enabled for all customer groups","Für alle Kundengruppen aktiviert"
29
  "Enabled only for specific customer groups","Nur für bestimmte Kunden- gruppen aktivieren"
30
  "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"
31
- "Minimum Orders Count","Mindestanzahl an Bestellungen"
 
 
 
32
  "-- Please Select --","-- Bitte wählen --"
33
  "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."
34
  "Orders successfully synced for export.","Bestellungen wurden erfolgreich für den Export synchronisiert."
@@ -48,4 +51,9 @@
48
  "Store Owner Bank Account","Bankverbindung des Shop-Betreibers"
49
  "Account Owner","Kontoinhaber"
50
  "Routing Number","Bankleitzahl"
51
- "Please enter bankaccount credentials of the store owner in the system configuration. Otherwise you will not be able to generate a valid export file.","Bitte geben Sie in der System-Konfiguration die Bankverbindung des Shopbetreibers ein. Anderenfalls können Sie keine gültige Export-Datei erzeugen."
 
 
 
 
 
28
  "Enabled for all customer groups","Für alle Kundengruppen aktiviert"
29
  "Enabled only for specific customer groups","Nur für bestimmte Kunden- gruppen aktivieren"
30
  "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"
31
+ "Minimum Order Count","Mindestbestellanzahl"
32
+ "Default: ""0"" for disabled check | Minimum count of orders (in the past) needed for the customer to use this payment method.","Standard: ""0"" für deaktivierte Überprüfung | Mindestanzahl an Bestellugnen (in der Vergangenheit) um diese Zahlungsart benutzen zu dürfen."
33
+ "Minimum Order Amount","Mindestbestellsumme"
34
+ "Default: ""0"" for disabled check | Minimum order amount (in the past) needed for the customer to use this payment method.","Standard: ""0"" für deaktivierte Überprüfung | Mindestbestellsumme (in der Vergangenheit) um diese Zahlungsart benutzen zu dürfen."
35
  "-- Please Select --","-- Bitte wählen --"
36
  "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."
37
  "Orders successfully synced for export.","Bestellungen wurden erfolgreich für den Export synchronisiert."
51
  "Store Owner Bank Account","Bankverbindung des Shop-Betreibers"
52
  "Account Owner","Kontoinhaber"
53
  "Routing Number","Bankleitzahl"
54
+ "Please enter bankaccount credentials of the store owner in the system configuration.","Bitte geben Sie in der System-Konfiguration die Bankverbindung des Shopbetreibers ein. Anderenfalls können Sie keine gültige Export-Datei erzeugen."
55
+ "Please note: SEPA Debit Payment orders can only be exported as CSV for now.","Bitte beachten Sie: SEPA-Lastschrift Bestellungen können vorerst nur als CSV-Datei exportiert werden."
56
+ "Debit Type","Art der Lastschrift"
57
+ "SEPA","SEPA"
58
+ "Bank Account & Routing Number","Bankverbindung"
59
+ "Total of %d record(s) have been updated.","Insgesamt %d Einträge wurden erfolgreich aktualisiert."
app/locale/en_US/{Mage_Debit.csv → Itabs_Debit.csv} RENAMED
@@ -22,13 +22,16 @@
22
  "Debit account information was successfully saved","Debit account information was successfully saved"
23
  "Can't save customer","Can't save customer"
24
  "Please enter a valid bank code.","Please enter a valid bank code."
25
- "Please enter a valid bank acount number.","Please enter a valid bank account number."
26
  "Save account data","Save account data"
27
  "Checkout only with valid BLZ","Checkout only with valid BLZ"
28
  "Enabled for all customer groups","Enabled for all customer groups"
29
  "Enabled only for specific customer groups","Enabled only for specific customer groups"
30
  "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."
31
- "Minimum Orders Count","Minimum Orders Count"
 
 
 
32
  "-- Please Select --","-- Please Select --"
33
  "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."
34
  "Orders successfully synced for export.","Orders successfully synced for export."
@@ -48,4 +51,5 @@
48
  "Store Owner Bank Account","Store Owner Bank Account"
49
  "Account Owner","Account Owner"
50
  "Routing Number","Routing Number"
51
- "Please enter bankaccount credentials of the store owner in the system configuration. Otherwise you will not be able to generate a valid export file.","Please enter bankaccount credentials of the store owner in the system configuration. Otherwise you will not be able to generate a valid export file."
 
22
  "Debit account information was successfully saved","Debit account information was successfully saved"
23
  "Can't save customer","Can't save customer"
24
  "Please enter a valid bank code.","Please enter a valid bank code."
25
+ "Please enter a valid bank acount number.","Please enter a valid bank account number."
26
  "Save account data","Save account data"
27
  "Checkout only with valid BLZ","Checkout only with valid BLZ"
28
  "Enabled for all customer groups","Enabled for all customer groups"
29
  "Enabled only for specific customer groups","Enabled only for specific customer groups"
30
  "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."
31
+ "Minimum Order Count","Minimum Order Count"
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."
33
+ "Minimum Order Amount","Minimum Order Amount"
34
+ "Default: ""0"" for disabled check | Minimum order amount (in the past) needed for the customer to use this payment method.","Default: ""0"" for disabled check | Minimum order amount (in the past) needed for the customer to use this payment method."
35
  "-- Please Select --","-- Please Select --"
36
  "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."
37
  "Orders successfully synced for export.","Orders successfully synced for export."
51
  "Store Owner Bank Account","Store Owner Bank Account"
52
  "Account Owner","Account Owner"
53
  "Routing Number","Routing Number"
54
+ "Please enter bankaccount credentials of the store owner in the system configuration.","Please enter bankaccount credentials of the store owner in the system configuration. Otherwise you will not be able to generate a valid export file."
55
+ "Please note: SEPA Debit Payment orders can only be exported as CSV for now.","Please note: SEPA Debit Payment orders can only be exported as CSV for now."
js/{mage → itabs}/debit/blzcheck.js RENAMED
@@ -1,8 +1,8 @@
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:
@@ -11,13 +11,13 @@
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 2012 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();
@@ -62,7 +62,7 @@ Event.observe(window, 'load', function() {
62
  Validation.add('validate-debit-blz', Translator.translate('Please enter a valid bank code.'), function(v) {
63
 
64
  blzCheck.checkBlz();
65
- if(blzCheck.checkoutValidBlz == 1) {
66
  if (!blzCheck.isBlzValid) {
67
  return false;
68
  }
@@ -80,4 +80,4 @@ Event.observe(window, 'load', function() {
80
  }
81
  return false;
82
  });
83
- });
1
  /**
2
+ * This file is part of the Itabs_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:
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 Itabs
15
+ * @package Itabs_Debit
16
  * @author Rouven Alexander Rieker <rouven.rieker@itabs.de>
17
+ * @copyright 2008-2013 ITABS GmbH / Rouven Alexander Rieker (http://www.itabs.de)
 
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version 1.0.0
20
+ * @link http://www.magentocommerce.com/magento-connect/debitpayment.html
21
  */
22
 
23
  var blzAjaxCheck = Class.create();
62
  Validation.add('validate-debit-blz', Translator.translate('Please enter a valid bank code.'), function(v) {
63
 
64
  blzCheck.checkBlz();
65
+ if(blzCheck.checkoutValidBlz == 1) {
66
  if (!blzCheck.isBlzValid) {
67
  return false;
68
  }
80
  }
81
  return false;
82
  });
83
+ });
lib/DTA/DTABase.php CHANGED
@@ -54,11 +54,6 @@
54
  * @link http://pear.php.net/package/Payment_DTA
55
  */
56
 
57
- /**
58
- * include PEAR_Exception class
59
- */
60
- require_once 'PEAR/Exception.php';
61
-
62
  /**
63
  * Payment_DTA_Exception is this packages' basic exception class.
64
  *
@@ -69,7 +64,7 @@ require_once 'PEAR/Exception.php';
69
  * @version Release: 1.4.2
70
  * @link http://pear.php.net/package/Payment_DTA
71
  */
72
- class Payment_DTA_Exception extends PEAR_Exception
73
  {
74
  }
75
 
54
  * @link http://pear.php.net/package/Payment_DTA
55
  */
56
 
 
 
 
 
 
57
  /**
58
  * Payment_DTA_Exception is this packages' basic exception class.
59
  *
64
  * @version Release: 1.4.2
65
  * @link http://pear.php.net/package/Payment_DTA
66
  */
67
+ class Payment_DTA_Exception extends Exception
68
  {
69
  }
70
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DebitPayment</name>
4
- <version>0.5.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Gerade in Deutschland und &#xD6;sterreich geh&#xF6;rt die Lastschrift (Bankeinzug) zu den popul&#xE4;rsten Zahlungsm&#xF6;glichkeiten. Mit Hilfe dieser Erweiterung k&#xF6;nnen Sie Ihren Kunden die Zahlungsm&#xF6;glichkeit Lastschrift anbieten.</description>
11
  <notes>-</notes>
12
  <authors><author><name>Rouven Alexander Rieker</name><user>therouv</user><email>rouven.rieker@itabs.de</email></author></authors>
13
- <date>2012-11-10</date>
14
- <time>15:09:02</time>
15
- <contents><target name="magecommunity"><dir><dir name="Mage"><dir name="Debit"><dir name="Block"><dir name="Account"><file name="Data.php" hash="5ec87894004a522fd8d38b961f4822dc"/></dir><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="48f25e84eb680a78676b947f96dd6906"/></dir><file name="Order.php" hash="f01dc6ba410fc9948bab620715ccfd68"/></dir><file name="Form.php" hash="71ec19adbf20f06c8e0ccd3b5b3ecf91"/><file name="Info.php" hash="bfd6c54e68a62287a2136a72b2f1c162"/></dir><dir name="Helper"><file name="Adminhtml.php" hash="8bacc26f386ec126d813f9cea5519085"/><file name="Data.php" hash="25bd936b7fb2ca3a4fe6dc84a49eba34"/></dir><dir name="Model"><file name="Debit.php" hash="2f3636898922bb734a329bf3029e1cda"/><dir name="Entity"><dir name="Customer"><dir name="Attribute"><dir name="Backend"><file name="Encrypted.php" hash="94b4c27e902ba0625ac5a9f87fa96f54"/></dir></dir></dir></dir><dir name="Mysql4"><dir name="Orders"><file name="Collection.php" hash="9168652992a5a5a7363b692d63b2a779"/></dir><file name="Orders.php" hash="cf2ffc55752004a300abef1eff607188"/></dir><file name="Observer.php" hash="5bbd916c7c26299aadbd6a67cfcebffe"/><file name="Orders.php" hash="2e8db83c32da4d448c385dda85fe83be"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Customer"><file name="Group.php" hash="d4532ac24b67ae24f54860c6ccfb702d"/></dir></dir></dir></dir></dir><dir name="controllers"><file name="AccountController.php" hash="6a584c009a8562aac90d31d494e8b347"/><dir name="Adminhtml"><file name="OrderController.php" hash="27c9dbb28fc9e2106522870e53dc235d"/></dir><file name="AjaxController.php" hash="5beb576a11c36694549f3b06bcd216cb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="38dcc403c12a5c8bd568148946804a7c"/><file name="bankleitzahlen.csv" hash="47834eb8f31d37940cac46f288fdb6b5"/><file name="config.xml" hash="b1349c858a8dd185f99ae7be060fa62d"/><file name="system.xml" hash="e71ad7bfb5beb8cb87ba4d6349ac3ad4"/></dir><dir name="sql"><dir name="debit_setup"><file name="mysql4-install-0.4.0.php" hash="e737bff708ac736d9fa2dc617cbc2bb5"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="e737bff708ac736d9fa2dc617cbc2bb5"/><file name="mysql4-upgrade-0.4.9-0.5.0.php" hash="1312e739a3f3b3ec429599248baa0dbc"/><file name="mysql4-upgrade-0.5.0-0.5.1.php" hash="89c41e07eae8d13b99718ef2dca56241"/><file name="mysql4-upgrade-0.5.1-0.5.2.php" hash="d1db3adfc37489a3c90df875b76e1c6d"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Mage_Debit.xml" hash="4df52a50ed7f6a00007564224689413f"/></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Mage_Debit.csv" hash="d28e0eb0cb5c49439cd0e5170ecf40ab"/></dir><dir name="en_US"><file name="Mage_Debit.csv" hash="2768d31e1b5dd5ba7b4847d40587c33d"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="debit.xml" hash="f3ec75909b0a0b9891ac5955c13fcbef"/></dir><dir name="template"><dir name="debit"><file name="debit.phtml" hash="344aff2f527fb3e9f909410635da4a82"/><file name="form.phtml" hash="af659f3607a76ff8a38ca46fe993aa14"/><file name="info.phtml" hash="d26a60e5fe93bb1035fd054d9ee6a886"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="debit.xml" hash="44790c6738874678d83c2c392b630f05"/></dir><dir name="template"><dir name="debit"><dir><dir name="account"><file name="data.phtml" hash="dc04eafc5e2a9e12bf6af0453842e2ee"/></dir></dir><file name="form.phtml" hash="5a9f4e89edeb7f71193eee3115e18940"/><file name="info.phtml" hash="a389aedc4ab07a2d8671a7cd1cbf1ae4"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="mage"><dir name="debit"><file name="blzcheck.js" hash="4ab6fd01179d171c97bca611a2425617"/></dir></dir></dir></dir></target><target name="magelib"><dir><dir name="DTA"><file name="DTA.php" hash="e6fc2837be0ec433fa759485de446fe8"/><file name="DTABase.php" hash="824185c1a0d6d53a24787fb48268d694"/><file name="DTAZV.php" hash="851b8a15747129fa21945e2d28d435e2"/></dir></dir></target></contents>
16
  <compatible/>
17
- <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>DebitPayment</name>
4
+ <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
10
  <description>Gerade in Deutschland und &#xD6;sterreich geh&#xF6;rt die Lastschrift (Bankeinzug) zu den popul&#xE4;rsten Zahlungsm&#xF6;glichkeiten. Mit Hilfe dieser Erweiterung k&#xF6;nnen Sie Ihren Kunden die Zahlungsm&#xF6;glichkeit Lastschrift anbieten.</description>
11
  <notes>-</notes>
12
  <authors><author><name>Rouven Alexander Rieker</name><user>therouv</user><email>rouven.rieker@itabs.de</email></author></authors>
13
+ <date>2013-04-26</date>
14
+ <time>10:07:54</time>
15
+ <contents><target name="magecommunity"><dir><dir name="Itabs"><dir name="Debit"><dir name="Block"><dir name="Account"><file name="Data.php" hash="e89702d09b47e4d821e02eda7682de9e"/></dir><dir name="Adminhtml"><dir name="Order"><file name="Grid.php" hash="4dba9f7721b1000b9f041335dcc66781"/></dir><file name="Order.php" hash="76fb3aa91188eef4cca0d4f5d2d4590e"/></dir><file name="Form.php" hash="dd05490009a6c3ed1e3222918c9bb7e6"/><file name="Info.php" hash="cce9115a8d17d8bb735eead28654d581"/></dir><dir name="Helper"><file name="Adminhtml.php" hash="8724a9a7d14ac7af0374769da925ab54"/><file name="Data.php" hash="82de57a38f516893b00c677b72984b6d"/></dir><dir name="Model"><file name="Debit.php" hash="215bcfbbc198be53f47978fb7424aba8"/><dir name="Entity"><dir name="Customer"><dir name="Attribute"><dir name="Backend"><file name="Encrypted.php" hash="9682459c07091d78b91712ea6a979a53"/></dir></dir></dir></dir><dir name="Export"><file name="Abstract.php" hash="c633a303cbff4ecea77a433dabe70ac2"/><file name="Csv.php" hash="647a1d7caba04036ec8a72c5fed5d182"/><file name="Dtaus.php" hash="dd599a81375a62933bbe89dc23882de5"/><file name="Interface.php" hash="ee90119a5fc72d9126a1737288a90597"/></dir><dir name="Mysql4"><dir name="Orders"><file name="Collection.php" hash="aa8e45ed0b31a02a928c51cbe74535f3"/></dir><file name="Orders.php" hash="450e7300695f03eba0b48387e575a170"/></dir><file name="Observer.php" hash="f4567b2d852e798160f1dd8b31f31598"/><file name="Orders.php" hash="3e0c08600a5df60d26e7fe5cd24a1020"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Customer"><file name="Group.php" hash="ea9ae9dee90cf5da1b77d6a362fbf982"/></dir><dir name="Debit"><file name="Status.php" hash="ec683643294f88c74dd63fcbc48c84e4"/><file name="Type.php" hash="1bd2dc65a7420b60d52fc3e065409fa6"/></dir></dir></dir></dir><file name="Validation.php" hash="7a923f50bb8f007c1894e8d70d61062c"/></dir><dir name="Test"><dir name="Helper"><dir name="Data"><dir name="expectations"><file name="testGetBankByBlz.yaml" hash="6aff215f36a6e70a855ef647dde4f88e"/><file name="testSanitizeData.yaml" hash="944c1c065a14ccae06d977e8723a7184"/></dir><dir name="providers"><file name="testGetBankByBlz.yaml" hash="efff58781d1cfe74d61d7a222ed22e5e"/><file name="testSanitizeData.yaml" hash="8d2d56d46b3eb30eafde3bea4850f7af"/></dir></dir><file name="Data.php" hash="283c25af53d62487b278748ab16ceeda"/></dir><dir name="Model"><dir name="Debit"><dir name="expectations"><file name="testMaskString.yaml" hash="de3b2951d14cc38685736491c78fe518"/></dir><dir name="providers"><file name="testMaskString.yaml" hash="e5fab742bdade5f476d065d85547e1f8"/></dir></dir><file name="Debit.php" hash="9772dd7788934be4e76d5b3ee9c8ea2b"/></dir></dir><dir name="controllers"><file name="AccountController.php" hash="15594a4567c76d32f0eef243eaf357cc"/><dir name="Adminhtml"><file name="OrderController.php" hash="39dc02c9217760997ccd104136a40e66"/></dir><file name="AjaxController.php" hash="8df3a19c13379f523041c725d4b19244"/></dir><dir name="etc"><file name="adminhtml.xml" hash="088aba28171394001b4b76b14521e1d5"/><file name="bankleitzahlen.csv" hash="47834eb8f31d37940cac46f288fdb6b5"/><file name="config.xml" hash="9f6f15ef6e77a060e1588daffcb99fc0"/><file name="system.xml" hash="0295eda79df46807efbd65631cacb00b"/></dir><dir name="sql"><dir name="debit_setup"><file name="mysql4-install-0.4.0.php" hash="cdf6045ffd06a0735693f3f72666112b"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="cdf6045ffd06a0735693f3f72666112b"/><file name="mysql4-upgrade-0.4.9-0.5.0.php" hash="b30e6e9192ac3a5e487c43920a331b1f"/><file name="mysql4-upgrade-0.5.0-0.5.1.php" hash="a55894c29b1b08059cea04319570300c"/><file name="mysql4-upgrade-0.5.1-0.5.2.php" hash="dcf210f959e9cfa0234b72dcf59a1736"/><file name="mysql4-upgrade-0.5.2-1.0.0.php" hash="fdf8b7fa03cbb50536f4135704aa08ad"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Itabs_Debit.xml" hash="466483f8ad6d24de2a88b1eb29af7fe5"/><file name="Mage_Debit.xml" hash="4968ccd8c607db8cc45d3b28c66b044f"/></dir></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Itabs_Debit.csv" hash="f1c1ce3732857ff1d50430c6f9ef866c"/></dir><dir name="en_US"><file name="Itabs_Debit.csv" hash="4dd222c29fc93c872992a6073e4ecfbe"/></dir></dir></target><target name="magedesign"><dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="debit.xml" hash="9391f90a7f5848c46af0561c1a07c482"/></dir><dir name="template"><dir name="debit"><file name="debit.phtml" hash="d7edc1a618f1906a17f7d62e1d85d4b1"/><file name="form.phtml" hash="ee549d6d27906bec23c3451e7227b610"/><file name="info.phtml" hash="eb41923258affeba7a04e3fb31024b62"/><dir><dir name="sepa"><file name="debit.phtml" hash="36b2ac90ee450f19bfc71ff7a28915dd"/><file name="form.phtml" hash="55127d20a79c237b89941929be6ab1d7"/><file name="info.phtml" hash="8cc1f625bb25ce6319cec569984c421a"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="debit.xml" hash="db65baf4b03468724de8fdc5e3307ba1"/></dir><dir name="template"><dir name="debit"><dir><dir name="account"><file name="data.phtml" hash="fac4920fd9c58ba1cd049e08b9ffd138"/></dir><dir name="sepa"><dir name="account"><file name="data.phtml" hash="5ce2ea3a533cfe3a9f2c13e99ed0a736"/></dir><file name="form.phtml" hash="b7d23cbfff67544db610330bf784d866"/><file name="info.phtml" hash="c3e30cacce4bf212c8da43db7b35a421"/></dir></dir><file name="form.phtml" hash="f6eeb488035ec1c0d2b6e09493c22fc7"/><file name="info.phtml" hash="dda2543eee606a95e880d0f9755754e4"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="itabs"><dir name="debit"><file name="blzcheck.js" hash="b6fc833c655cc9871b6e7453e04b4d1b"/></dir></dir></dir></dir></target><target name="magelib"><dir><dir name="DTA"><file name="DTA.php" hash="e6fc2837be0ec433fa759485de446fe8"/><file name="DTABase.php" hash="f4249f16bf6c6551fd06e874573f3224"/><file name="DTAZV.php" hash="851b8a15747129fa21945e2d28d435e2"/></dir></dir></target></contents>
16
  <compatible/>
17
+ <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>