Novalnet - Version 1.1.9

Version Notes

1. Neues:

Nun ist das Anlegen einer Teilgutschrift möglich.

2. Bugfixing:

Wenn im Adminbereich für einen Kunden eine Bestellung angelegt werden sollte, kam es wegen einer fehlenden Template-Datei zur Fehlermeldung.

Download this release

Release Info

Developer Magento Core Team
Extension Novalnet
Version 1.1.9
Comparing to
See all releases


Version 1.1.9

Files changed (80) hide show
  1. app/code/community/Mage/Novalnet/Block/Cc/Form.php +157 -0
  2. app/code/community/Mage/Novalnet/Block/Cc/Info.php +86 -0
  3. app/code/community/Mage/Novalnet/Block/Elvaustria/Form.php +91 -0
  4. app/code/community/Mage/Novalnet/Block/Elvaustria/Info.php +60 -0
  5. app/code/community/Mage/Novalnet/Block/Elvgerman/Form.php +92 -0
  6. app/code/community/Mage/Novalnet/Block/Elvgerman/Info.php +60 -0
  7. app/code/community/Mage/Novalnet/Block/Invoice/Form.php +80 -0
  8. app/code/community/Mage/Novalnet/Block/Invoice/Info.php +91 -0
  9. app/code/community/Mage/Novalnet/Block/Phonepayment/Form.php +71 -0
  10. app/code/community/Mage/Novalnet/Block/Phonepayment/Info.php +64 -0
  11. app/code/community/Mage/Novalnet/Block/Prepayment/Form.php +80 -0
  12. app/code/community/Mage/Novalnet/Block/Prepayment/Info.php +64 -0
  13. app/code/community/Mage/Novalnet/Block/Secure/Failure.php +48 -0
  14. app/code/community/Mage/Novalnet/Block/Secure/Redirect.php +51 -0
  15. app/code/community/Mage/Novalnet/Helper/Data.php +32 -0
  16. app/code/community/Mage/Novalnet/Model/Mysql4/Setup.php +30 -0
  17. app/code/community/Mage/Novalnet/Model/Novalnet/Request.php +38 -0
  18. app/code/community/Mage/Novalnet/Model/Novalnet/Result.php +38 -0
  19. app/code/community/Mage/Novalnet/Model/Novalnet/Source/Cctype.php +36 -0
  20. app/code/community/Mage/Novalnet/Model/NovalnetCc.php +305 -0
  21. app/code/community/Mage/Novalnet/Model/NovalnetElvaustria.php +369 -0
  22. app/code/community/Mage/Novalnet/Model/NovalnetElvgerman.php +379 -0
  23. app/code/community/Mage/Novalnet/Model/NovalnetInvoice.php +450 -0
  24. app/code/community/Mage/Novalnet/Model/NovalnetPhonepayment.php +764 -0
  25. app/code/community/Mage/Novalnet/Model/NovalnetPrepayment.php +421 -0
  26. app/code/community/Mage/Novalnet/Model/NovalnetSecure.php +244 -0
  27. app/code/community/Mage/Novalnet/controllers/SecureController.php +147 -0
  28. app/code/community/Mage/Novalnet/etc/config.xml +214 -0
  29. app/code/community/Mage/Novalnet/etc/system.xml +665 -0
  30. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-install-1.0.0.php +25 -0
  31. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.0-1.0.1.php +25 -0
  32. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.1-1.0.2.php +25 -0
  33. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.2-1.0.3.php +25 -0
  34. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.3-1.1.0.php +25 -0
  35. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.0-1.1.1.php +25 -0
  36. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.1-1.1.2.php +25 -0
  37. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.2-1.1.3.php +25 -0
  38. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.3-1.1.4.php +25 -0
  39. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.4-1.1.5.php +25 -0
  40. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.5-1.1.6.php +25 -0
  41. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.6-1.1.7.php +25 -0
  42. app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.7-1.1.8.php +25 -0
  43. app/design/adminhtml/default/default/template/novalnet/cc/form.phtml +134 -0
  44. app/design/adminhtml/default/default/template/novalnet/cc/info.phtml +36 -0
  45. app/design/adminhtml/default/default/template/novalnet/elvaustria/form.phtml +117 -0
  46. app/design/adminhtml/default/default/template/novalnet/elvaustria/info.phtml +37 -0
  47. app/design/adminhtml/default/default/template/novalnet/elvgerman/form.phtml +117 -0
  48. app/design/adminhtml/default/default/template/novalnet/elvgerman/info.phtml +37 -0
  49. app/design/adminhtml/default/default/template/novalnet/invoice/form.phtml +67 -0
  50. app/design/adminhtml/default/default/template/novalnet/invoice/info.phtml +35 -0
  51. app/design/adminhtml/default/default/template/novalnet/phonepayment/form.phtml +68 -0
  52. app/design/adminhtml/default/default/template/novalnet/phonepayment/info.phtml +34 -0
  53. app/design/adminhtml/default/default/template/novalnet/prepayment/form.phtml +70 -0
  54. app/design/adminhtml/default/default/template/novalnet/prepayment/info.phtml +34 -0
  55. app/design/frontend/default/default/template/novalnet/cc/form.phtml +125 -0
  56. app/design/frontend/default/default/template/novalnet/cc/info.phtml +36 -0
  57. app/design/frontend/default/default/template/novalnet/elvaustria/form.phtml +110 -0
  58. app/design/frontend/default/default/template/novalnet/elvaustria/info.phtml +37 -0
  59. app/design/frontend/default/default/template/novalnet/elvgerman/form.phtml +110 -0
  60. app/design/frontend/default/default/template/novalnet/elvgerman/info.phtml +37 -0
  61. app/design/frontend/default/default/template/novalnet/invoice/form.phtml +63 -0
  62. app/design/frontend/default/default/template/novalnet/invoice/info.phtml +35 -0
  63. app/design/frontend/default/default/template/novalnet/phonepayment/form.phtml +64 -0
  64. app/design/frontend/default/default/template/novalnet/phonepayment/info.phtml +34 -0
  65. app/design/frontend/default/default/template/novalnet/prepayment/form.phtml +66 -0
  66. app/design/frontend/default/default/template/novalnet/prepayment/info.phtml +34 -0
  67. app/design/frontend/default/default/template/novalnet/secure/failure.phtml +32 -0
  68. app/etc/modules/Mage_Novalnet.xml +32 -0
  69. app/locale/de_AT/Mage_Novalnet.csv +101 -0
  70. app/locale/de_CH/Mage_Novalnet.csv +101 -0
  71. app/locale/de_DE/Mage_Novalnet.csv +101 -0
  72. app/locale/en_US/Mage_Novalnet.csv +98 -0
  73. package.xml +24 -0
  74. skin/frontend/default/default/images/novalnet/AE_Logo.png +0 -0
  75. skin/frontend/default/default/images/novalnet/ELV_Logo.png +0 -0
  76. skin/frontend/default/default/images/novalnet/MC_Logo.png +0 -0
  77. skin/frontend/default/default/images/novalnet/NN_Logo.png +0 -0
  78. skin/frontend/default/default/images/novalnet/NN_Logo_T.png +0 -0
  79. skin/frontend/default/default/images/novalnet/VI_Logo.png +0 -0
  80. skin/frontend/default/default/images/novalnet/acdc_info.png +0 -0
app/code/community/Mage/Novalnet/Block/Cc/Form.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Cc_Form extends Mage_Payment_Block_Form
30
+ {
31
+ protected function _construct()
32
+ {
33
+ parent::_construct();
34
+ $this->setTemplate('novalnet/cc/form.phtml');
35
+ }
36
+
37
+ /**
38
+ * Retrieve payment configuration object
39
+ *
40
+ * @return Mage_Payment_Model_Config
41
+ */
42
+ protected function _getConfig()
43
+ {
44
+ return Mage::getSingleton('payment/config');
45
+ }
46
+
47
+ /**
48
+ * Retrieve availables credit card types
49
+ *
50
+ * @return array
51
+ */
52
+ public function getCcAvailableTypes()
53
+ {
54
+ $types = $this->_getConfig()->getCcTypes();
55
+ if ($method = $this->getMethod()) {
56
+ $availableTypes = $method->getConfigData('cctypes');
57
+ if ($availableTypes) {
58
+ $availableTypes = explode(',', $availableTypes);
59
+ foreach ($types as $code=>$name) {
60
+ if (!in_array($code, $availableTypes)) {
61
+ unset($types[$code]);
62
+ }
63
+ }
64
+ }
65
+ }
66
+ return $types;
67
+ }
68
+
69
+ /**
70
+ * Retrieve credit card expire months
71
+ *
72
+ * @return array
73
+ */
74
+ public function getCcMonths()
75
+ {
76
+ $months = $this->getData('cc_months');
77
+ if (is_null($months)) {
78
+ $months[0] = $this->__('Month');
79
+ $months = array_merge($months, $this->_getConfig()->getMonths());
80
+ $this->setData('cc_months', $months);
81
+ }
82
+ return $months;
83
+ }
84
+
85
+ /**
86
+ * Retrieve credit card expire years
87
+ *
88
+ * @return array
89
+ */
90
+ public function getCcYears()
91
+ {
92
+ $years = $this->getData('cc_years');
93
+ if (is_null($years)) {
94
+ $years = $this->_getConfig()->getYears();
95
+ $years = array(0=>$this->__('Year'))+$years;
96
+ $this->setData('cc_years', $years);
97
+ }
98
+ return $years;
99
+ }
100
+
101
+ /**
102
+ * Retrive has verification configuration
103
+ *
104
+ * @return boolean
105
+ */
106
+ public function hasVerification()
107
+ {
108
+ if ($this->getMethod()) {
109
+ $configData = $this->getMethod()->getConfigData('useccv');
110
+ if(is_null($configData)){
111
+ return true;
112
+ }
113
+ return (bool) $configData;
114
+ }
115
+ return true;
116
+ }
117
+ public function getCcData($customer_id){
118
+ if (!$customer_id){
119
+ return'';
120
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
121
+ }
122
+ #cc_type, cc_last4, cc_owner, cc_exp_month, cc_exp_year, nn_account_holder #nn_account_number, nn_bank_sorting_code, nn_elv_country
123
+ $sql = "select a.cc_type, a.cc_last4, a.cc_owner, a.cc_exp_month, a.cc_exp_year from sales_flat_quote_payment a, sales_flat_quote b where b.customer_id = '$customer_id' and b.entity_id = a.quote_id and a.method = 'novalnetCc' order by a.created_at desc limit 1";
124
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
125
+ if ($data and count($data)>0)return $data[0];
126
+ return'';
127
+ }
128
+ public function getUserGroupExcluded()
129
+ {
130
+ $method = $this->getMethod();
131
+ return$method->getConfigData('user_group_excluded');
132
+ }
133
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
134
+ {
135
+ if (!$user_group_id or !$user_group_name){
136
+ return'';
137
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
138
+ }
139
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
140
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
141
+ if ($data and count($data) >= 1){
142
+ return false;
143
+ }else {
144
+ return true;
145
+ }
146
+ }
147
+ public function getUserGroupId($id)
148
+ {
149
+ if (!$id){
150
+ return'';
151
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
152
+ }
153
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
154
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
155
+ return$data[0]['customer_group_id'];
156
+ }
157
+ }
app/code/community/Mage/Novalnet/Block/Cc/Info.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Cc_Info extends Mage_Payment_Block_Info
30
+ {
31
+ /**
32
+ * Init default template for block
33
+ */
34
+ protected function _construct()
35
+ {
36
+ parent::_construct();
37
+ $this->setTemplate('novalnet/cc/info.phtml');
38
+ }
39
+
40
+ /**
41
+ * Retrieve credit card type name
42
+ *
43
+ * @return string
44
+ */
45
+ public function getCcTypeName()
46
+ {
47
+ $types = Mage::getSingleton('payment/config')->getCcTypes();
48
+ if (isset($types[$this->getInfo()->getCcType()])) {
49
+ return $types[$this->getInfo()->getCcType()];
50
+ }
51
+ return $this->getInfo()->getCcType();
52
+ }
53
+
54
+ /**
55
+ * Retrieve CC expiration month
56
+ *
57
+ * @return string
58
+ */
59
+ public function getCcExpMonth()
60
+ {
61
+ $month = $this->getInfo()->getCcExpMonth();
62
+ if ($month<10) {
63
+ $month = '0'.$month;
64
+ }
65
+ return $month;
66
+ }
67
+
68
+ /**
69
+ * Retrieve CC expiration date
70
+ *
71
+ * @return Zend_Date
72
+ */
73
+ public function getCcExpDate()
74
+ {
75
+ $date = Mage::app()->getLocale()->date(0);
76
+ $date->setYear($this->getInfo()->getCcExpYear());
77
+ $date->setMonth($this->getInfo()->getCcExpMonth());
78
+ return $date;
79
+ }
80
+
81
+ public function toPdf()
82
+ {
83
+ $this->setTemplate('payment/info/pdf/cc.phtml');
84
+ return $this->toHtml();
85
+ }
86
+ }
app/code/community/Mage/Novalnet/Block/Elvaustria/Form.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Elvaustria_Form extends Mage_Payment_Block_Form
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/elvaustria/form.phtml');
36
+ }
37
+ protected function _getConfig()
38
+ {
39
+ return Mage::getSingleton('payment/config');
40
+ }
41
+ public function acdc_check()
42
+ {
43
+ $method = $this->getMethod();
44
+ return$method->getConfigData('acdc_check');
45
+ }
46
+ public function show_comment()
47
+ {
48
+ $method = $this->getMethod();
49
+ return$method->getConfigData('comment');
50
+ }
51
+ public function getUserGroupExcluded()
52
+ {
53
+ $method = $this->getMethod();
54
+ return$method->getConfigData('user_group_excluded');
55
+ }
56
+ public function getUserGroupId($id)
57
+ {
58
+ if (!$id){
59
+ return'';
60
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
61
+ }
62
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
63
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
64
+ return$data[0]['customer_group_id'];
65
+ }
66
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
67
+ {
68
+ if (!$user_group_id or !$user_group_name){
69
+ return'';
70
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
71
+ }
72
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
73
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
74
+ if ($data and count($data) >= 1){
75
+ return false;
76
+ }else {
77
+ return true;
78
+ }
79
+ }
80
+ public function getAccountData($customer_id){
81
+ if (!$customer_id){
82
+ return'';
83
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
84
+ }
85
+ #cc_type, cc_last4, cc_owner, cc_exp_month, cc_exp_year, nn_account_holder #nn_account_number, nn_bank_sorting_code, nn_elv_country
86
+ $sql = "select a.nn_account_holder, a.nn_account_number, a.nn_bank_sorting_code, a.nn_elv_country from sales_flat_quote_payment a, sales_flat_quote b where b.customer_id = '$customer_id' and b.entity_id = a.quote_id and a.nn_account_number != '' and a.method = 'novalnetElvaustria' order by a.created_at desc limit 1";
87
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
88
+ if ($data and count($data)>0)return $data[0];
89
+ return'';
90
+ }
91
+ }
app/code/community/Mage/Novalnet/Block/Elvaustria/Info.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Block_Elvaustria_Info extends Mage_Payment_Block_Info
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/elvaustria/info.phtml');
36
+ }
37
+
38
+ public function getInfo()
39
+ {
40
+ $info = $this->getData('info');
41
+ if (!($info instanceof Mage_Payment_Model_Info)) {
42
+ Mage::throwException($this->__('Can not retrieve payment info model object.'));
43
+ }
44
+ return $info;
45
+ }
46
+
47
+ /**
48
+ * Retrieve payment method model
49
+ *
50
+ * @return Mage_Payment_Model_Method_Abstract
51
+ */
52
+ public function getMethod()
53
+ {
54
+ return $this->getInfo()->getMethodInstance();
55
+ }
56
+ public function getInfoData($field)
57
+ {
58
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
59
+ }
60
+ }
app/code/community/Mage/Novalnet/Block/Elvgerman/Form.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Elvgerman_Form extends Mage_Payment_Block_Form
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/elvgerman/form.phtml');
36
+ }
37
+ protected function _getConfig()
38
+ {
39
+ return Mage::getSingleton('payment/config');
40
+ }
41
+ public function acdc_check()
42
+ {
43
+ $method = $this->getMethod();
44
+ return$method->getConfigData('acdc_check');
45
+ }
46
+ public function show_comment()
47
+ {
48
+ $method = $this->getMethod();
49
+ return$method->getConfigData('comment');
50
+ }
51
+ public function getUserGroupExcluded()
52
+ {
53
+ $method = $this->getMethod();
54
+ return$method->getConfigData('user_group_excluded');
55
+ }
56
+ public function getUserGroupId($id)
57
+ {
58
+ if (!$id){
59
+ return'';
60
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
61
+ }
62
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
63
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
64
+ return$data[0]['customer_group_id'];
65
+ }
66
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
67
+ {
68
+ if (!$user_group_id or !$user_group_name){
69
+ return'';
70
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
71
+ }
72
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
73
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
74
+ if ($data and count($data) >= 1){
75
+ return false;
76
+ }else {
77
+ return true;
78
+ }
79
+ }
80
+ public function getAccountData($customer_id){
81
+ if (!$customer_id){
82
+ return'';
83
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
84
+ }
85
+ #cc_type, cc_last4, cc_owner, cc_exp_month, cc_exp_year, nn_account_holder #nn_account_number, nn_bank_sorting_code, nn_elv_country
86
+ $sql = "select a.nn_account_holder, a.nn_account_number, a.nn_bank_sorting_code, a.nn_elv_country from sales_flat_quote_payment a, sales_flat_quote b where b.customer_id = '$customer_id' and b.entity_id = a.quote_id and a.nn_account_number != '' and a.method = 'novalnetElvgerman' order by a.created_at desc limit 1";
87
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
88
+ if ($data and count($data)>0)return $data[0];
89
+ return'';
90
+ }
91
+
92
+ }
app/code/community/Mage/Novalnet/Block/Elvgerman/Info.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Block_Elvgerman_Info extends Mage_Payment_Block_Info
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/elvgerman/info.phtml');
36
+ }
37
+
38
+ public function getInfo()
39
+ {
40
+ $info = $this->getData('info');
41
+ if (!($info instanceof Mage_Payment_Model_Info)) {
42
+ Mage::throwException($this->__('Can not retrieve payment info model object.'));
43
+ }
44
+ return $info;
45
+ }
46
+
47
+ /**
48
+ * Retrieve payment method model
49
+ *
50
+ * @return Mage_Payment_Model_Method_Abstract
51
+ */
52
+ public function getMethod()
53
+ {
54
+ return $this->getInfo()->getMethodInstance();
55
+ }
56
+ public function getInfoData($field)
57
+ {
58
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
59
+ }
60
+ }
app/code/community/Mage/Novalnet/Block/Invoice/Form.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Invoice_Form extends Mage_Payment_Block_Form
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/invoice/form.phtml');
36
+ }
37
+ protected function _getConfig()
38
+ {
39
+ return Mage::getSingleton('payment/config');
40
+ }
41
+ /* public function getInvoiceAvailableCountries()
42
+ {
43
+ if ($method = $this->getMethod()) {
44
+ $availableCountries = $method->getConfigData('invoicecountries');
45
+ if ($availableCountries) {
46
+ $availableCountries = explode(',', $availableCountries);
47
+ }
48
+ }
49
+ return $availableCountries;
50
+ }*/
51
+ public function getUserGroupExcluded()
52
+ {
53
+ $method = $this->getMethod();
54
+ return$method->getConfigData('user_group_excluded');
55
+ }
56
+ public function getUserGroupId($id)
57
+ {
58
+ if (!$id){
59
+ return'';
60
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
61
+ }
62
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
63
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
64
+ return$data[0]['customer_group_id'];
65
+ }
66
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
67
+ {
68
+ if (!$user_group_id or !$user_group_name){
69
+ return'';
70
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
71
+ }
72
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
73
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
74
+ if ($data and count($data) >= 1){
75
+ return false;
76
+ }else {
77
+ return true;
78
+ }
79
+ }
80
+ }
app/code/community/Mage/Novalnet/Block/Invoice/Info.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Block_Invoice_Info extends Mage_Payment_Block_Info
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/invoice/info.phtml');
36
+ }
37
+
38
+ public function getInfo()
39
+ {
40
+ $info = $this->getData('info');
41
+ if (!($info instanceof Mage_Payment_Model_Info)) {
42
+ Mage::throwException($this->__('Can not retrieve payment info model object.'));
43
+ }
44
+ return $info;
45
+ }
46
+
47
+ /**
48
+ * Retrieve payment method model
49
+ *
50
+ * @return Mage_Payment_Model_Method_Abstract
51
+ */
52
+ public function getMethod()
53
+ {
54
+ return $this->getInfo()->getMethodInstance();
55
+ }
56
+ public function getInfoData($field)
57
+ {
58
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
59
+ }
60
+ public function getPaymentMethod()
61
+ {
62
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
63
+ }
64
+ public function getDuedate()
65
+ {
66
+ $payment_duration = $this->getMethod()->getConfigData('payment_duration');
67
+ $due_date = '';
68
+ $due_date_string = '';
69
+ if($payment_duration)
70
+ {
71
+ $due_date = date("d.m.Y",mktime(0,0,0,date("m"),date("d")+$payment_duration,date("Y")));
72
+ $due_date_string = '&due_date='.date("Y-m-d",mktime(0,0,0,date("m"),date("d")+$payment_duration,date("Y")));
73
+
74
+ /*if ($payment->getNnElvCountry()=="DE") or $payment->getNnElvCountry()=="AT"))
75
+ {
76
+ $due_date = explode('-', $due_date);
77
+ $due_date = $due_date[];
78
+ }*/
79
+ }
80
+
81
+ /*if($due_date)
82
+ {
83
+ $order->info['comments'] .= '<BR><B>'.MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_DURATION_LIMIT_INFO." $due_date ".MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_DURATION_LIMIT_END_INFO.".</B><BR><BR>";
84
+ }
85
+ else
86
+ {
87
+ $order->info['comments'] = '<BR><B>'.MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_TRANSFER_INFO.'</B><BR><BR>';
88
+ }*/
89
+ return$due_date;
90
+ }
91
+ }
app/code/community/Mage/Novalnet/Block/Phonepayment/Form.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Phonepayment_Form extends Mage_Payment_Block_Form
30
+ {
31
+
32
+ protected function _construct()
33
+ {$payment = Mage::getModel('sales/quote_payment');
34
+ #Mage::throwException($payment);
35
+ parent::_construct();
36
+ $this->setTemplate('novalnet/phonepayment/form.phtml');
37
+ }
38
+ protected function _getConfig()
39
+ {
40
+ return Mage::getSingleton('payment/config');
41
+ }
42
+ public function getUserGroupExcluded()
43
+ {
44
+ $method = $this->getMethod();
45
+ return$method->getConfigData('user_group_excluded');
46
+ }
47
+ public function getUserGroupId($id)
48
+ {
49
+ if (!$id){
50
+ return'';
51
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
52
+ }
53
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
54
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
55
+ return$data[0]['customer_group_id'];
56
+ }
57
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
58
+ {
59
+ if (!$user_group_id or !$user_group_name){
60
+ return'';
61
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
62
+ }
63
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
64
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
65
+ if ($data and count($data) >= 1){
66
+ return false;
67
+ }else {
68
+ return true;
69
+ }
70
+ }
71
+ }
app/code/community/Mage/Novalnet/Block/Phonepayment/Info.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Block_Phonepayment_Info extends Mage_Payment_Block_Info
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/phonepayment/info.phtml');
36
+ }
37
+
38
+ public function getInfo()
39
+ {
40
+ $info = $this->getData('info');
41
+ if (!($info instanceof Mage_Payment_Model_Info)) {
42
+ Mage::throwException($this->__('Can not retrieve payment info model object.'));
43
+ }
44
+ return $info;
45
+ }
46
+
47
+ /**
48
+ * Retrieve payment method model
49
+ *
50
+ * @return Mage_Payment_Model_Method_Abstract
51
+ */
52
+ public function getMethod()
53
+ {
54
+ return $this->getInfo()->getMethodInstance();
55
+ }
56
+ public function getInfoData($field)
57
+ {
58
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
59
+ }
60
+ public function getPaymentMethod()
61
+ {
62
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
63
+ }
64
+ }
app/code/community/Mage/Novalnet/Block/Prepayment/Form.php ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Prepayment_Form extends Mage_Payment_Block_Form
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/prepayment/form.phtml');
36
+ }
37
+ protected function _getConfig()
38
+ {
39
+ return Mage::getSingleton('payment/config');
40
+ }
41
+ /*public function getPrepaymentAvailableCountries()
42
+ {
43
+ if ($method = $this->getMethod()) {
44
+ $availableCountries = $method->getConfigData('prepaymentcountries');
45
+ if ($availableCountries) {
46
+ $availableCountries = explode(',', $availableCountries);
47
+ }
48
+ }
49
+ return $availableCountries;
50
+ }*/
51
+ public function getUserGroupExcluded()
52
+ {
53
+ $method = $this->getMethod();
54
+ return$method->getConfigData('user_group_excluded');
55
+ }
56
+ public function getUserGroupId($id)
57
+ {
58
+ if (!$id){
59
+ return'';
60
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
61
+ }
62
+ $sql = "select customer_group_id from sales_flat_quote where customer_id = '$id'";
63
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
64
+ return$data[0]['customer_group_id'];
65
+ }
66
+ public function checkUserGroupAccess($user_group_id, $user_group_name)
67
+ {
68
+ if (!$user_group_id or !$user_group_name){
69
+ return'';
70
+ #Mage::throwException(__FUNCTION__.': '.Mage::helper('novalnet')->__('Parameter missing').'!');
71
+ }
72
+ $sql = "select customer_group_id from customer_group where customer_group_id = '$user_group_id' and customer_group_code = '$user_group_name'";
73
+ $data = Mage::getSingleton('core/resource')->getConnection('core_read')->fetchAll($sql);
74
+ if ($data and count($data) >= 1){
75
+ return false;
76
+ }else {
77
+ return true;
78
+ }
79
+ }
80
+ }
app/code/community/Mage/Novalnet/Block/Prepayment/Info.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Block_Prepayment_Info extends Mage_Payment_Block_Info
30
+ {
31
+
32
+ protected function _construct()
33
+ {
34
+ parent::_construct();
35
+ $this->setTemplate('novalnet/prepayment/info.phtml');
36
+ }
37
+
38
+ public function getInfo()
39
+ {
40
+ $info = $this->getData('info');
41
+ if (!($info instanceof Mage_Payment_Model_Info)) {
42
+ Mage::throwException($this->__('Can not retrieve payment info model object.'));
43
+ }
44
+ return $info;
45
+ }
46
+
47
+ /**
48
+ * Retrieve payment method model
49
+ *
50
+ * @return Mage_Payment_Model_Method_Abstract
51
+ */
52
+ public function getMethod()
53
+ {
54
+ return $this->getInfo()->getMethodInstance();
55
+ }
56
+ public function getInfoData($field)
57
+ {
58
+ return $this->htmlEscape($this->getMethod()->getInfoInstance()->getData($field));
59
+ }
60
+ public function getPaymentMethod()
61
+ {
62
+ return $this->htmlEscape($this->getMethod()->getConfigData('title'));
63
+ }
64
+ }
app/code/community/Mage/Novalnet/Block/Secure/Failure.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Secure_Failure extends Mage_Core_Block_Template
30
+ {
31
+ /**
32
+ * Return Error message
33
+ *
34
+ * @return string
35
+ */
36
+ public function getErrorMessage ()
37
+ {
38
+ return Mage::getSingleton('checkout/session')->getNovalnetErrorMessage();
39
+ }
40
+
41
+ /**
42
+ * Get continue shopping url
43
+ */
44
+ public function getContinueShoppingUrl()
45
+ {
46
+ return Mage::getUrl('checkout/cart');
47
+ }
48
+ }
app/code/community/Mage/Novalnet/Block/Secure/Redirect.php ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Block_Secure_Redirect extends Mage_Core_Block_Abstract
30
+ {
31
+ protected function _toHtml()
32
+ {
33
+ $secure = $this->getOrder()->getPayment()->getMethodInstance();
34
+
35
+ $form = new Varien_Data_Form();
36
+ $form->setAction($secure->getNovalnetSecureUrl())
37
+ ->setId('novalnet_secure_checkout')
38
+ ->setName('novalnet_secure_checkout')
39
+ ->setMethod('POST')
40
+ ->setUseContainer(true);
41
+ foreach ($secure->getFormFields() as $field=>$value) {
42
+ $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value));
43
+ }
44
+ $html = '<html><body>';
45
+ $html.= $this->__('You will be redirected to Novalnet AG 3D-Secure in a few seconds.');
46
+ $html.= $form->toHtml();
47
+ $html.= '<script type="text/javascript">document.getElementById("novalnet_secure_checkout").submit();</script>';
48
+ $html.= '</body></html>';
49
+ return $html;
50
+ }
51
+ }
app/code/community/Mage/Novalnet/Helper/Data.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Helper_Data extends Mage_Core_Helper_Abstract
30
+ {
31
+
32
+ }
app/code/community/Mage/Novalnet/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ class Mage_Novalnet_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
28
+ {
29
+
30
+ }
app/code/community/Mage/Novalnet/Model/Novalnet/Request.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Model_Novalnet_Request extends Varien_Object
30
+ {
31
+ public function toLatin1(){
32
+ $data = $this->toArray();
33
+ foreach ($data as $key => $val){
34
+ $setKey = "set".ucfirst($key);
35
+ $this->$setKey(utf8_decode($val));
36
+ }
37
+ }
38
+ }
app/code/community/Mage/Novalnet/Model/Novalnet/Result.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+ class Mage_Novalnet_Model_Novalnet_Result extends Varien_Object
29
+ {
30
+ public function toUtf8(){
31
+ $data = $this->toArray();
32
+ foreach ($data as $key => $val){
33
+ $setKey = "set".ucfirst($key);
34
+ $this->$setKey(utf8_encode($val));
35
+ }
36
+ }
37
+ }
38
+ ?>
app/code/community/Mage/Novalnet/Model/Novalnet/Source/Cctype.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+
28
+
29
+ class Mage_Novalnet_Model_Novalnet_Source_Cctype extends Mage_Payment_Model_Source_Cctype
30
+ {
31
+ public function getAllowedTypes()
32
+ {
33
+ //return array('VI', 'MC', 'AE');
34
+ return array('VI', 'MC');
35
+ }
36
+ }
app/code/community/Mage/Novalnet/Model/NovalnetCc.php ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+
30
+ class Mage_Novalnet_Model_NovalnetCc extends Mage_Payment_Model_Method_Cc
31
+ {
32
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
33
+ const RESPONSE_DELIM_CHAR = '&';
34
+ const RESPONSE_CODE_APPROVED = 100;
35
+ /**
36
+ * unique internal payment method identifier
37
+ *
38
+ * @var string [a-z0-9_]
39
+ */
40
+ protected $_code = 'novalnetCc';
41
+ protected $_formBlockType = 'novalnet/cc_form';
42
+ protected $_infoBlockType = 'novalnet/cc_info';
43
+
44
+
45
+ /**
46
+ * Is this payment method a gateway (online auth/charge) ?
47
+ */
48
+ protected $_isGateway = true;
49
+
50
+ /**
51
+ * Can authorize online?
52
+ */
53
+ protected $_canAuthorize = true;
54
+
55
+ /**
56
+ * Can capture funds online?
57
+ */
58
+ protected $_canCapture = true;
59
+
60
+ /**
61
+ * Can capture partial amounts online?
62
+ */
63
+ protected $_canCapturePartial = false;
64
+
65
+ /**
66
+ * Can refund online?
67
+ */
68
+ protected $_canRefund = false;
69
+
70
+ /**
71
+ * Can void transactions online?
72
+ */
73
+ protected $_canVoid = true;
74
+
75
+ /**
76
+ * Can use this payment method in administration panel?
77
+ */
78
+ protected $_canUseInternal = true;
79
+
80
+ /**
81
+ * Can show this payment method as an option on checkout payment page?
82
+ */
83
+ protected $_canUseCheckout = true;
84
+
85
+ /**
86
+ * Is this payment method suitable for multi-shipping checkout?
87
+ */
88
+ protected $_canUseForMultishipping = true;
89
+
90
+ /**
91
+ * Can save credit card information for future processing?
92
+ */
93
+ protected $_canSaveCc = false;
94
+
95
+ /**
96
+ * Here you will need to implement authorize, capture and void public methods
97
+ *
98
+ * @see examples of transaction specific public methods such as
99
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
100
+ */
101
+ public function authorize(Varien_Object $payment, $amount)
102
+ {
103
+ return $this;
104
+ }
105
+ public function capture(Varien_Object $payment, $amount)
106
+ {
107
+ $error = false;
108
+ $payment->setAmount($amount);
109
+ $request = $this->_buildRequest($payment);
110
+ $result = $this->_postRequest($request);
111
+
112
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
113
+ $payment->setStatus(self::STATUS_APPROVED);
114
+ $payment->setCcTransId($result->getTid());
115
+ $payment->setLastTransId($result->getTid());
116
+ }
117
+ else {
118
+ if ($result->getStatusDesc()) {
119
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
120
+ }else {
121
+ $error = Mage::helper('paygate')->__('Error in capturing the payment');
122
+ }
123
+ }
124
+
125
+ if ($error !== false) {
126
+ Mage::throwException($error);
127
+ }
128
+ return $this;
129
+ }
130
+ public function refund(Varien_Object $payment, $amount)
131
+ {
132
+ return $this;
133
+ }
134
+
135
+ public function void(Varien_Object $payment)
136
+ {
137
+ return $this;
138
+ }
139
+ /**
140
+ * Prepare request to gateway
141
+ *
142
+ * @link http://www.authorize.net/support/AIM_guide.pdf
143
+ * @param Mage_Sales_Model_Document $order
144
+ * @return unknown
145
+ */
146
+
147
+ protected function _buildRequest(Varien_Object $payment)
148
+ {
149
+ $order = $payment->getOrder();
150
+
151
+ $request = Mage::getModel('novalnet/novalnet_request');
152
+
153
+
154
+ $request->setvendor($this->getConfigData('merchant_id'))
155
+ ->setauth_code($this->getConfigData('auth_code'))
156
+ ->setkey('6')
157
+ ->setproduct($this->getConfigData('product_id'))
158
+ ->settariff($this->getConfigData('tariff_id'));
159
+
160
+ if($payment->getAmount()){
161
+ $request->setamount($payment->getAmount()*100);
162
+ }
163
+
164
+ if (!empty($order)) {
165
+ $request->setinput1($order->getIncrementId());
166
+
167
+ $billing = $order->getBillingAddress();
168
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
169
+ if (!$street[1]){$street[1]='';}
170
+ if (!$street[2]){$street[2]='';}
171
+ if (!empty($billing)) {
172
+ $request->setfirst_name($billing->getFirstname())
173
+ ->setlast_name($billing->getLastname())
174
+ ->setstreet($street[0])
175
+ ->sethouse_no($street[1].$street[2])
176
+ ->setcity($billing->getCity())
177
+ ->setzip($billing->getPostcode())
178
+ ->setcountry($billing->getCountry())
179
+ ->settel($billing->getTelephone())
180
+ ->setfax($billing->getFax())
181
+ ->setremote_ip($this->getRealIpAddr())
182
+ ->setgender('u')
183
+ ->setemail($order->getCustomerEmail());
184
+ }#->setremote_ip($order->getRemoteIp())
185
+
186
+
187
+ }
188
+
189
+ if($payment->getCcNumber()){
190
+ $request->setcc_no($payment->getCcNumber())
191
+ ->setcc_exp_month($payment->getCcExpMonth())
192
+ ->setcc_exp_year($payment->getCcExpYear())
193
+ ->setcc_cvc2($payment->getCcCid());
194
+ if ($payment->getCcOwner()!=""){
195
+ $request->setcc_holder($payment->getCcOwner());
196
+ }
197
+ }
198
+
199
+
200
+ return $request;
201
+ }
202
+
203
+ public function getBookingReference()
204
+ {
205
+ return $this->getConfigData('booking_reference');
206
+ }
207
+
208
+ protected function _postRequest(Varien_Object $request)
209
+ {
210
+ $result = Mage::getModel('novalnet/novalnet_result');
211
+
212
+ $client = new Varien_Http_Client();
213
+
214
+ $uri = $this->getConfigData('cgi_url');
215
+ $client->setUri($uri ? $uri : self::CGI_URL);
216
+ $client->setConfig(array(
217
+ 'maxredirects'=>0,
218
+ 'timeout'=>30,
219
+ //'ssltransport' => 'tcp',
220
+ ));
221
+ $request->toLatin1();
222
+ $client->setParameterPost($request->getData());
223
+ $client->setMethod(Zend_Http_Client::POST);
224
+ try {
225
+ $response = $client->request();
226
+ } catch (Exception $e) {
227
+ $result->setResponseCode(-1)
228
+ ->setResponseReasonCode($e->getCode())
229
+ ->setResponseReasonText($e->getMessage());
230
+ Mage::throwException(
231
+ Mage::helper('paygate')->__('Gateway request error: %s', $e->getMessage())
232
+ );
233
+ }
234
+
235
+ $responseBody = $response->getBody();
236
+
237
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
238
+
239
+ $responseBody = $response->getBody();
240
+ if ($r) {
241
+ foreach($r as $key => $value)
242
+ {
243
+ if($value!="")
244
+ {
245
+ $aryKeyVal = explode("=",$value);
246
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
247
+ }
248
+ }
249
+
250
+ if (isset($aryResponse['status'])){
251
+ $result->setStatus($aryResponse['status']);
252
+ }
253
+ if (isset($aryResponse['tid'])){
254
+ $result->setTid($aryResponse['tid']);
255
+ }
256
+ if (isset($aryResponse['status_desc'])){
257
+ $result->setStatusDesc($aryResponse['status_desc']);
258
+ }
259
+
260
+ } else {
261
+ Mage::throwException(
262
+ Mage::helper('paygate')->__('Error in payment gateway')
263
+ );
264
+ }
265
+ $result->toUtf8();
266
+ return $result;
267
+ }
268
+ public function getTitle()
269
+ {
270
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
271
+ }
272
+
273
+ public function isPublicIP($value)
274
+ {
275
+ if(!$value || count(explode('.',$value))!=4)
276
+ {
277
+ return false;
278
+ }
279
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
280
+ }
281
+ public function getRealIpAddr()
282
+ {
283
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
284
+ {
285
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
286
+ }
287
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
288
+ {
289
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
290
+ }
291
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
292
+ {
293
+ return $_SERVER['HTTP_CLIENT_IP'];
294
+ }
295
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
296
+ {
297
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
298
+ }
299
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
300
+ {
301
+ return $_SERVER['HTTP_FORWARDED_FOR'];
302
+ }
303
+ return $_SERVER['REMOTE_ADDR'];
304
+ }
305
+ }
app/code/community/Mage/Novalnet/Model/NovalnetElvaustria.php ADDED
@@ -0,0 +1,369 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Model_NovalnetElvaustria extends Mage_Payment_Model_Method_Abstract
30
+ {
31
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
+ const RESPONSE_DELIM_CHAR = '&';
33
+ const RESPONSE_CODE_APPROVED = 100;
34
+ const KEY = "8";
35
+ /**
36
+ * unique internal payment method identifier
37
+ *
38
+ * @var string [a-z0-9_]
39
+ */
40
+ protected $_code = 'novalnetElvaustria';
41
+ protected $_formBlockType = 'novalnet/elvaustria_form';
42
+ protected $_infoBlockType = 'novalnet/elvaustria_info';
43
+
44
+
45
+ /**
46
+ * Is this payment method a gateway (online auth/charge) ?
47
+ */
48
+ protected $_isGateway = true;
49
+
50
+ /**
51
+ * Can authorize online?
52
+ */
53
+ protected $_canAuthorize = false;
54
+
55
+ /**
56
+ * Can capture funds online?
57
+ */
58
+ protected $_canCapture = true;
59
+
60
+ /**
61
+ * Can capture partial amounts online?
62
+ */
63
+ protected $_canCapturePartial = true;
64
+
65
+ /**
66
+ * Can refund online?
67
+ */
68
+ protected $_canRefund = false;
69
+
70
+ /**
71
+ * Can void transactions online?
72
+ */
73
+ protected $_canVoid = false;
74
+
75
+ /**
76
+ * Can use this payment method in administration panel?
77
+ */
78
+ protected $_canUseInternal = true;
79
+
80
+ /**
81
+ * Can show this payment method as an option on checkout payment page?
82
+ */
83
+ protected $_canUseCheckout = true;
84
+
85
+ /**
86
+ * Is this payment method suitable for multi-shipping checkout?
87
+ */
88
+ protected $_canUseForMultishipping = true;
89
+
90
+ /**
91
+ * Can save credit card information for future processing?
92
+ */
93
+ protected $_canSaveCc = false;
94
+
95
+ /**
96
+ * Here you will need to implement authorize, capture and void public methods
97
+ *
98
+ * @see examples of transaction specific public methods such as
99
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
100
+ */
101
+ public function authorize(Varien_Object $payment, $amount)
102
+ {
103
+
104
+ return $this;
105
+ }
106
+ public function capture(Varien_Object $payment, $amount)
107
+ {
108
+ $error = false;
109
+ $payment->setAmount($amount);
110
+ $request = $this->_buildRequest($payment);
111
+
112
+ $result = $this->_postRequest($request);
113
+
114
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
115
+ $payment->setStatus(self::STATUS_APPROVED);
116
+ $payment->setCcTransId($result->getTid());
117
+ $payment->setLastTransId($result->getTid());
118
+ $payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
119
+ $payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
120
+ $id = $payment->getNnId();
121
+ $quote_payment = $this->getQuote()->getPaymentById($id);
122
+ if ($quote_payment)#to avoid error msg. in admin interface
123
+ {
124
+ $quote_payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
125
+ $quote_payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
126
+ $quote_payment->save();
127
+ }
128
+ }
129
+ else {
130
+ if ($result->getStatusDesc()) {
131
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
132
+ }else {
133
+ $error = Mage::helper('novalnet')->__('Error in capturing the payment');
134
+ }
135
+ }
136
+
137
+ if ($error !== false) {
138
+ Mage::throwException($error);
139
+ }
140
+ return $this;
141
+ }
142
+ public function refund(Varien_Object $payment, $amount)
143
+ {
144
+ return $this;
145
+ }
146
+
147
+ public function void(Varien_Object $payment)
148
+ {
149
+ return $this;
150
+ }
151
+ /**
152
+ * Prepare request to gateway
153
+ *
154
+ * @link http://www.authorize.net/support/AIM_guide.pdf
155
+ * @param Mage_Sales_Model_Document $order
156
+ * @return unknown
157
+ */
158
+ protected function _saveObject (Varien_Object $payment)
159
+ {
160
+ $order = $payment->getOrder();
161
+ if (!empty($order)) {
162
+ $billing = $order->getBillingAddress();
163
+ }
164
+ }
165
+ protected function _buildRequest(Varien_Object $payment)
166
+ {
167
+ $order = $payment->getOrder();
168
+ $request = Mage::getModel('novalnet/novalnet_request');
169
+
170
+ $request->setvendor($this->getConfigData('merchant_id'))
171
+ ->setauth_code($this->getConfigData('auth_code'))
172
+ ->setproduct($this->getConfigData('product_id'))
173
+ ->settariff($this->getConfigData('tariff_id'));
174
+ if ($this->getConfigData('acdc_check')){
175
+ $request->setacdc($this->getConfigData('acdc_check'));
176
+ }
177
+
178
+ if($payment->getAmount()){
179
+ $request->setamount($payment->getAmount()*100);
180
+ }
181
+
182
+ if (!empty($order)) {
183
+ $request->setinput1($order->getIncrementId());
184
+
185
+ $billing = $order->getBillingAddress();
186
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
187
+ if (!isset($street[1]) or !$street[1]){$street[1]='';}
188
+ if (!isset($street[2]) or !$street[2]){$street[2]='';}
189
+ if (!empty($billing)) {
190
+ $request->setfirst_name($billing->getFirstname())
191
+ ->setlast_name($billing->getLastname())
192
+ ->setstreet($street[0])
193
+ ->sethouse_no($street[1].$street[2])
194
+ ->setcity($billing->getCity())
195
+ ->setzip($billing->getPostcode())
196
+ ->setcountry($billing->getCountry())
197
+ ->settel($billing->getTelephone())
198
+ ->setfax($billing->getFax())
199
+ ->setremote_ip($this->getRealIpAddr())
200
+ ->setgender('u')
201
+ ->setemail($order->getCustomerEmail());
202
+ }
203
+ }
204
+
205
+ $request->setbank_account_holder($payment->getNnAccountHolder())
206
+ ->setbank_account($payment->getNnAccountNumber())
207
+ ->setbank_code($payment->getNnBankSortingCode())
208
+ ->setkey(self::KEY);
209
+ return $request;
210
+ }
211
+
212
+ protected function _postRequest(Varien_Object $request)
213
+ {
214
+ $result = Mage::getModel('novalnet/novalnet_result');
215
+
216
+ $client = new Varien_Http_Client();
217
+
218
+ $uri = $this->getConfigData('cgi_url');
219
+ $client->setUri($uri ? $uri : self::CGI_URL);
220
+ $client->setConfig(array(
221
+ 'maxredirects'=>0,
222
+ 'timeout'=>30,
223
+ //'ssltransport' => 'tcp',
224
+ ));
225
+ $request->toLatin1();
226
+ $client->setParameterPost($request->getData());
227
+ $client->setMethod(Zend_Http_Client::POST);
228
+ try {
229
+ $response = $client->request();
230
+ } catch (Exception $e) {
231
+ $result->setResponseCode(-1)
232
+ ->setResponseReasonCode($e->getCode())
233
+ ->setResponseReasonText($e->getMessage());
234
+ Mage::throwException(
235
+ Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
236
+ );
237
+ }
238
+
239
+ $responseBody = $response->getBody();
240
+
241
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
242
+
243
+ if ($r) {
244
+ foreach($r as $key => $value)
245
+ {
246
+ if($value!="")
247
+ {
248
+ $aryKeyVal = explode("=",$value);
249
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
250
+ }
251
+ }
252
+
253
+ if (isset($aryResponse['status'])){
254
+ $result->setStatus($aryResponse['status']);
255
+ }
256
+ if (isset($aryResponse['tid'])){
257
+ $result->setTid($aryResponse['tid']);
258
+ }
259
+ if (isset($aryResponse['status_desc'])){
260
+ $result->setStatusDesc($aryResponse['status_desc']);
261
+ }
262
+
263
+ } else {
264
+ Mage::throwException(
265
+ Mage::helper('novalnet')->__('Error in payment gateway')
266
+ );
267
+ }
268
+ $result->toUtf8();
269
+ return $result;
270
+ }
271
+
272
+
273
+ public function assignData($data)
274
+ {
275
+ if (!($data instanceof Varien_Object)) {
276
+ $data = new Varien_Object($data);
277
+ }
278
+ $info=$this->getInfoInstance();
279
+ $info->setNnElvCountry($data->getElvCountry())
280
+ ->setNnAccountHolder($data->getAccountHolder())
281
+ ->setNnAccountNumber($data->getAccountNumber())
282
+ ->setNnBankSortingCode($data->getBankSortingCode());
283
+ return $this;
284
+ }
285
+ /**
286
+ * Get checkout
287
+ *
288
+ * @return Mage_Sales_Model_Quote
289
+ */
290
+ public function getQuote()
291
+ {
292
+ if (empty($this->_quote)) {
293
+ $this->_quote = $this->getCheckout()->getQuote();
294
+ }
295
+ return $this->_quote;
296
+ }
297
+ /**
298
+ * Get checkout
299
+ *
300
+ * @return Mage_Sales_Model_Order
301
+ */
302
+ public function getCheckout()
303
+ {
304
+ if (empty($this->_checkout)) {
305
+ //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
306
+ $this->_checkout = Mage::getSingleton('checkout/session');
307
+ }
308
+ return $this->_checkout;
309
+ }
310
+
311
+ public function getTitle()
312
+ {
313
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
314
+ }
315
+
316
+ public function validate()
317
+ {
318
+ parent::validate();
319
+ $info = $this->getInfoInstance();
320
+ $nnAccountNumber = $info->getNnAccountNumber();
321
+ $nnBankSortingCode = $info->getNnBankSortingCode();
322
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $nnAccountNumber);
323
+ $info->setNnAccountNumber($nnAccountNumber);
324
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $nnBankSortingCode);
325
+ $info->setNnBankSortingCode($nnBankSortingCode);
326
+ if (preg_match("/\D/",$nnAccountNumber)){
327
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.'));
328
+ }
329
+ if (preg_match("/\D/",$nnBankSortingCode)){
330
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.'));
331
+ }
332
+ if (strlen($nnBankSortingCode) < 5){
333
+ Mage::throwException(Mage::helper('novalnet')->__('The Bankcode must have a length of at least 5 digits').'!');
334
+ }
335
+ return $this;
336
+ }
337
+ public function isPublicIP($value)
338
+ {
339
+ if(!$value || count(explode('.',$value))!=4)
340
+ {
341
+ return false;
342
+ }
343
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
344
+ }
345
+ public function getRealIpAddr()
346
+ {
347
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
348
+ {
349
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
350
+ }
351
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
352
+ {
353
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
354
+ }
355
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
356
+ {
357
+ return $_SERVER['HTTP_CLIENT_IP'];
358
+ }
359
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
360
+ {
361
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
362
+ }
363
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
364
+ {
365
+ return $_SERVER['HTTP_FORWARDED_FOR'];
366
+ }
367
+ return $_SERVER['REMOTE_ADDR'];
368
+ }
369
+ }
app/code/community/Mage/Novalnet/Model/NovalnetElvgerman.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Model_NovalnetElvgerman extends Mage_Payment_Model_Method_Abstract
30
+ {
31
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
+ const RESPONSE_DELIM_CHAR = '&';
33
+ const RESPONSE_CODE_APPROVED = 100;
34
+ const KEY = "2";
35
+ /**
36
+ * unique internal payment method identifier
37
+ *
38
+ * @var string [a-z0-9_]
39
+ */
40
+ protected $_code = 'novalnetElvgerman';
41
+ protected $_formBlockType = 'novalnet/elvgerman_form';
42
+ protected $_infoBlockType = 'novalnet/elvgerman_info';
43
+
44
+
45
+ /**
46
+ * Is this payment method a gateway (online auth/charge) ?
47
+ */
48
+ protected $_isGateway = true;
49
+
50
+ /**
51
+ * Can authorize online?
52
+ */
53
+ protected $_canAuthorize = false;
54
+
55
+ /**
56
+ * Can capture funds online?
57
+ */
58
+ protected $_canCapture = true;
59
+
60
+ /**
61
+ * Can capture partial amounts online?
62
+ */
63
+ protected $_canCapturePartial = true;
64
+
65
+ /**
66
+ * Can refund online?
67
+ */
68
+ protected $_canRefund = false;
69
+
70
+ /**
71
+ * Can void transactions online?
72
+ */
73
+ protected $_canVoid = false;
74
+
75
+ /**
76
+ * Can use this payment method in administration panel?
77
+ */
78
+ protected $_canUseInternal = true;
79
+
80
+ /**
81
+ * Can show this payment method as an option on checkout payment page?
82
+ */
83
+ protected $_canUseCheckout = true;
84
+
85
+ /**
86
+ * Is this payment method suitable for multi-shipping checkout?
87
+ */
88
+ protected $_canUseForMultishipping = true;
89
+
90
+ /**
91
+ * Can save credit card information for future processing?
92
+ */
93
+ protected $_canSaveCc = false;
94
+
95
+ /**
96
+ * Here you will need to implement authorize, capture and void public methods
97
+ *
98
+ * @see examples of transaction specific public methods such as
99
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
100
+ */
101
+ public function authorize(Varien_Object $payment, $amount)
102
+ {
103
+
104
+ return $this;
105
+ }
106
+ public function capture(Varien_Object $payment, $amount)
107
+ {
108
+ $error = false;
109
+ $payment->setAmount($amount);
110
+ $request = $this->_buildRequest($payment);
111
+
112
+ $result = $this->_postRequest($request);
113
+
114
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
115
+ $payment->setStatus(self::STATUS_APPROVED);
116
+ $payment->setCcTransId($result->getTid());
117
+ $payment->setLastTransId($result->getTid());
118
+ $payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
119
+ $payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
120
+ $id = $payment->getNnId();
121
+ $quote_payment = $this->getQuote()->getPaymentById($id);
122
+ if ($quote_payment)#to avoid error msg. in admin interface
123
+ {
124
+ $quote_payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
125
+ $quote_payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
126
+ $quote_payment->save();
127
+ }
128
+ }
129
+ else {
130
+ if ($result->getStatusDesc()) {
131
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
132
+ }else {
133
+ $error = Mage::helper('novalnet')->__('Error in capturing the payment');
134
+ }
135
+ }
136
+
137
+ if ($error !== false) {
138
+ Mage::throwException('Magento error message: '.$error);
139
+ }
140
+ return $this;
141
+ }
142
+ public function refund(Varien_Object $payment, $amount)
143
+ {
144
+ return $this;
145
+ }
146
+
147
+ public function void(Varien_Object $payment)
148
+ {
149
+ return $this;
150
+ }
151
+ /**
152
+ * Prepare request to gateway
153
+ *
154
+ * @link http://www.authorize.net/support/AIM_guide.pdf
155
+ * @param Mage_Sales_Model_Document $order
156
+ * @return unknown
157
+ */
158
+ protected function _saveObject (Varien_Object $payment)
159
+ {
160
+ $order = $payment->getOrder();
161
+ if (!empty($order)) {
162
+ $billing = $order->getBillingAddress();
163
+ }
164
+ }
165
+ protected function _buildRequest(Varien_Object $payment)
166
+ {
167
+ $order = $payment->getOrder();
168
+
169
+ $request = Mage::getModel('novalnet/novalnet_request');
170
+
171
+
172
+ $request->setvendor($this->getConfigData('merchant_id'))
173
+ ->setauth_code($this->getConfigData('auth_code'))
174
+ ->setproduct($this->getConfigData('product_id'))
175
+ ->settariff($this->getConfigData('tariff_id'));
176
+ if ($this->getConfigData('acdc_check')){
177
+ $request->setacdc($this->getConfigData('acdc_check'));
178
+ }
179
+
180
+ if($payment->getAmount()){
181
+ $request->setamount($payment->getAmount()*100);
182
+ }
183
+
184
+ if (!empty($order)) {
185
+ $request->setinput1($order->getIncrementId());
186
+ $billing = $order->getBillingAddress();
187
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
188
+ if (!isset($street[1]) or !$street[1]){$street[1]='';}
189
+ if (!isset($street[2]) or !$street[2]){$street[2]='';}
190
+ if (!empty($billing)) {
191
+ $request->setfirst_name($billing->getFirstname())
192
+ ->setlast_name($billing->getLastname())
193
+ ->setstreet($street[0])
194
+ ->sethouse_no($street[1].$street[2])
195
+ ->setcity($billing->getCity())
196
+ ->setzip($billing->getPostcode())
197
+ ->setcountry($billing->getCountry())
198
+ ->settel($billing->getTelephone())
199
+ ->setfax($billing->getFax())
200
+ ->setremote_ip($this->getRealIpAddr())
201
+ ->setgender('u')
202
+ ->setemail($order->getCustomerEmail());
203
+ }#->setremote_ip($order->getRemoteIp())
204
+
205
+
206
+ }
207
+
208
+ $request->setbank_account_holder($payment->getNnAccountHolder())
209
+ ->setbank_account($payment->getNnAccountNumber())
210
+ ->setbank_code($payment->getNnBankSortingCode())
211
+ ->setkey(self::KEY);
212
+ return $request;
213
+ }
214
+
215
+ protected function _postRequest(Varien_Object $request)
216
+ {
217
+ $result = Mage::getModel('novalnet/novalnet_result');
218
+
219
+ $client = new Varien_Http_Client();
220
+
221
+ $uri = $this->getConfigData('cgi_url');
222
+ $client->setUri($uri ? $uri : self::CGI_URL);
223
+ $client->setConfig(array(
224
+ 'maxredirects'=>0,
225
+ 'timeout'=>30,
226
+ //'ssltransport' => 'tcp',
227
+ ));
228
+ $request->toLatin1();
229
+ $client->setParameterPost($request->getData());
230
+ $client->setMethod(Zend_Http_Client::POST);
231
+ try {
232
+ $response = $client->request();
233
+ } catch (Exception $e) {
234
+ $result->setResponseCode(-1)
235
+ ->setResponseReasonCode($e->getCode())
236
+ ->setResponseReasonText($e->getMessage());
237
+ Mage::throwException(
238
+ Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
239
+ );
240
+ }
241
+
242
+ $responseBody = $response->getBody();
243
+
244
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
245
+
246
+ if ($r) {
247
+ foreach($r as $key => $value)
248
+ {
249
+ if($value!="")
250
+ {
251
+ $aryKeyVal = explode("=",$value);
252
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
253
+ }
254
+ }
255
+
256
+ if (isset($aryResponse['status'])){
257
+ $result->setStatus($aryResponse['status']);
258
+ }
259
+ if (isset($aryResponse['tid'])){
260
+ $result->setTid($aryResponse['tid']);
261
+ }
262
+ if (isset($aryResponse['status_desc'])){
263
+ $result->setStatusDesc($aryResponse['status_desc']);
264
+ }
265
+
266
+ } else {
267
+ Mage::throwException(
268
+ Mage::helper('novalnet')->__('Error in payment gateway')
269
+ );
270
+ }
271
+ $result->toUtf8();
272
+ return $result;
273
+ }
274
+
275
+
276
+ public function assignData($data)
277
+ {
278
+ if (!($data instanceof Varien_Object)) {
279
+ $data = new Varien_Object($data);
280
+ }
281
+ $info=$this->getInfoInstance();
282
+ $info->setNnElvCountry($data->getElvCountry())
283
+ ->setNnAccountHolder($data->getAccountHolder())
284
+ ->setNnAccountNumber($data->getAccountNumber())
285
+ ->setNnBankSortingCode($data->getBankSortingCode());
286
+ if ($this->getConfigData('acdc_check')){
287
+ $info->acdc_check = true;
288
+ $info->acdc = ($data->acdc!= '')? true: false;
289
+ }
290
+ return $this;
291
+ }
292
+ /**
293
+ * Get checkout
294
+ *
295
+ * @return Mage_Sales_Model_Quote
296
+ */
297
+ public function getQuote()
298
+ {
299
+ if (empty($this->_quote)) {
300
+ $this->_quote = $this->getCheckout()->getQuote();
301
+ }
302
+ return $this->_quote;
303
+ }
304
+ /**
305
+ * Get checkout
306
+ *
307
+ * @return Mage_Sales_Model_Order
308
+ */
309
+ public function getCheckout()
310
+ {
311
+ if (empty($this->_checkout)) {
312
+ //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
313
+ $this->_checkout = Mage::getSingleton('checkout/session');
314
+ }
315
+ return $this->_checkout;
316
+ }
317
+
318
+ public function getTitle()
319
+ {
320
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
321
+ }
322
+
323
+ public function validate()
324
+ {
325
+ parent::validate();
326
+ $info = $this->getInfoInstance();
327
+ $nnAccountNumber = $info->getNnAccountNumber();
328
+ $nnBankSortingCode = $info->getNnBankSortingCode();
329
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $nnAccountNumber);
330
+ $info->setNnAccountNumber($nnAccountNumber);
331
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $nnBankSortingCode);
332
+ $info->setNnBankSortingCode($nnBankSortingCode);
333
+ if (preg_match("/\D/",$nnAccountNumber)){
334
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.'));
335
+ }
336
+ if (preg_match("/\D/",$nnBankSortingCode)){
337
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.'));
338
+ }
339
+ if (strlen($nnBankSortingCode) < 8){
340
+ Mage::throwException(Mage::helper('novalnet')->__('The Bankcode must have a length of at least 8 digits').'!');
341
+ }
342
+ if ($info->acdc_check and !$info->acdc){
343
+ Mage::throwException(Mage::helper('novalnet')->__('You must check ACDC'.'!'));
344
+ }
345
+ return $this;
346
+ }
347
+ public function isPublicIP($value)
348
+ {
349
+ if(!$value || count(explode('.',$value))!=4)
350
+ {
351
+ return false;
352
+ }
353
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
354
+ }
355
+ public function getRealIpAddr()
356
+ {
357
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
358
+ {
359
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
360
+ }
361
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
362
+ {
363
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
364
+ }
365
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
366
+ {
367
+ return $_SERVER['HTTP_CLIENT_IP'];
368
+ }
369
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
370
+ {
371
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
372
+ }
373
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
374
+ {
375
+ return $_SERVER['HTTP_FORWARDED_FOR'];
376
+ }
377
+ return $_SERVER['REMOTE_ADDR'];
378
+ }
379
+ }
app/code/community/Mage/Novalnet/Model/NovalnetInvoice.php ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Model_NovalnetInvoice extends Mage_Payment_Model_Method_Abstract
30
+ {
31
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
+ const RESPONSE_DELIM_CHAR = '&';
33
+ const RESPONSE_CODE_APPROVED = 100;
34
+ const PAYMENT_METHOD = 'Invoice';
35
+ const KEY = 27;
36
+ const STATUS_PENDING = 'PENDING';
37
+ /**
38
+ * unique internal payment method identifier
39
+ *
40
+ * @var string [a-z0-9_]
41
+ */
42
+ protected $_code = 'novalnetInvoice';
43
+ protected $_formBlockType = 'novalnet/invoice_form';
44
+ protected $_infoBlockType = 'novalnet/invoice_info';
45
+ protected $due_date = '';
46
+
47
+ /**
48
+ * Is this payment method a gateway (online auth/charge) ?
49
+ */
50
+ protected $_isGateway = true;
51
+
52
+ /**
53
+ * Can authorize online?
54
+ */
55
+ protected $_canAuthorize = false;
56
+
57
+ /**
58
+ * Can capture funds online?
59
+ */
60
+ protected $_canCapture = true;
61
+
62
+ /**
63
+ * Can capture partial amounts online?
64
+ */
65
+ protected $_canCapturePartial = true;
66
+
67
+ /**
68
+ * Can refund online?
69
+ */
70
+ protected $_canRefund = false;
71
+
72
+ /**
73
+ * Can void transactions online?
74
+ */
75
+ protected $_canVoid = false;
76
+
77
+ /**
78
+ * Can use this payment method in administration panel?
79
+ */
80
+ protected $_canUseInternal = true;
81
+
82
+ /**
83
+ * Can show this payment method as an option on checkout payment page?
84
+ */
85
+ protected $_canUseCheckout = true;
86
+
87
+ /**
88
+ * Is this payment method suitable for multi-shipping checkout?
89
+ */
90
+ protected $_canUseForMultishipping = true;
91
+
92
+ /**
93
+ * Can save credit card information for future processing?
94
+ */
95
+ protected $_canSaveCc = false;
96
+
97
+ /**
98
+ * Here you will need to implement authorize, capture and void public methods
99
+ *
100
+ * @see examples of transaction specific public methods such as
101
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
102
+ */
103
+ public function authorize(Varien_Object $payment, $amount)
104
+ {
105
+
106
+ return $this;
107
+ }
108
+ public function capture(Varien_Object $payment, $amount)
109
+ {
110
+ $error = false;
111
+ $payment->setAmount($amount);
112
+ $request = $this->_buildRequest($payment);
113
+ $result = $this->_postRequest($request,$payment);
114
+
115
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
116
+ #$payment->setStatus(self::STATUS_APPROVED);
117
+ $payment->setStatus(self::STATUS_PENDING);
118
+ $payment->setCcTransId($result->getTid());
119
+ $payment->setLastTransId($result->getTid());
120
+ $payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
121
+ $payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
122
+ $id = $payment->getNnId();
123
+ $quote_payment = $this->getQuote()->getPaymentById($id);
124
+ if ($quote_payment)#to avoid error msg. in admin interface
125
+ {
126
+ $quote_payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
127
+ $quote_payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
128
+ $quote_payment->save();
129
+ }
130
+ }
131
+ else {
132
+ if ($result->getStatusDesc()) {
133
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
134
+ }else {
135
+ $error = Mage::helper('novalnet')->__('Error in capturing the payment');
136
+ }
137
+ }
138
+
139
+ if ($error !== false) {
140
+ Mage::throwException($error);
141
+ }
142
+ return $this;
143
+ }
144
+ public function refund(Varien_Object $payment, $amount)
145
+ {
146
+ return $this;
147
+ }
148
+
149
+ public function void(Varien_Object $payment)
150
+ {
151
+ return $this;
152
+ }
153
+ /**
154
+ * Prepare request to gateway
155
+ *
156
+ * @link http://www.authorize.net/support/AIM_guide.pdf
157
+ * @param Mage_Sales_Model_Document $order
158
+ * @return unknown
159
+ */
160
+ protected function _saveObject (Varien_Object $payment)
161
+ {
162
+ $order = $payment->getOrder();
163
+ if (!empty($order)) {
164
+ $billing = $order->getBillingAddress();
165
+ }
166
+ }
167
+ protected function _buildRequest(Varien_Object $payment)
168
+ {
169
+ $order = $payment->getOrder();
170
+ $due_date_string = $this->getDuedateParam();
171
+ $request = Mage::getModel('novalnet/novalnet_request');
172
+
173
+
174
+ $request->setvendor($this->getConfigData('merchant_id'))
175
+ ->setauth_code($this->getConfigData('auth_code'))
176
+ ->setproduct($this->getConfigData('product_id'))
177
+ ->settariff($this->getConfigData('tariff_id'));
178
+
179
+ $request->setcurrency($order->getOrderCurrency());
180
+
181
+ if($payment->getAmount()){
182
+ #$request->setamount($payment->getAmount()*100);
183
+ $request->setamount($this->getAmount4Request($payment->getAmount()));
184
+ }
185
+
186
+ if (!empty($order)) {
187
+ $request->setinput1($order->getIncrementId());
188
+ $billing = $order->getBillingAddress();
189
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
190
+ if (!isset($street[1]) or !$street[1]){$street[1]='';}
191
+ if (!isset($street[2]) or !$street[2]){$street[2]='';}
192
+ if (!empty($billing)) {
193
+ $request->setfirst_name($billing->getFirstname())
194
+ ->setLast_name($billing->getlastname())
195
+ ->setstreet($street[0].$street[1].$street[2])
196
+ ->setcity($billing->getCity())
197
+ ->setzip($billing->getPostcode())
198
+ ->setcountry($billing->getCountry())
199
+ ->settel($billing->getTelephone())
200
+ ->setfax($billing->getFax())
201
+ ->setremote_ip($this->getRealIpAddr())
202
+ ->setgender('u')
203
+ ->setemail($order->getCustomerEmail())
204
+ ->setsearch_in_street(1);
205
+ #->setremote_ip($order->getRemoteIp())
206
+ #->sethouse_no($street[1].$street[2])
207
+ }
208
+ }
209
+ /*$request->setbank_account_holder($payment->getNnAccountHolder())
210
+ ->setbank_account($payment->getNnAccountNumber())
211
+ ->setbank_code($payment->getNnBankSortingCode())*/
212
+ $request->setkey(self::KEY);
213
+ $request->setinvoice_type(self::PAYMENT_METHOD.$due_date_string);
214
+ return $request;
215
+ }
216
+
217
+ protected function _postRequest(Varien_Object $request, Varien_Object $payment)
218
+ {
219
+ $result = Mage::getModel('novalnet/novalnet_result');
220
+
221
+ $client = new Varien_Http_Client();
222
+
223
+ $uri = $this->getConfigData('cgi_url');
224
+ $client->setUri($uri ? $uri : self::CGI_URL);
225
+ $client->setConfig(array(
226
+ 'maxredirects'=>0,
227
+ 'timeout'=>30,
228
+ //'ssltransport' => 'tcp',
229
+ ));
230
+ $request->toLatin1();
231
+ $client->setParameterPost($request->getData());
232
+ $client->setMethod(Zend_Http_Client::POST);
233
+ try {
234
+ $response = $client->request();
235
+ } catch (Exception $e) {
236
+ $result->setResponseCode(-1)
237
+ ->setResponseReasonCode($e->getCode())
238
+ ->setResponseReasonText($e->getMessage());
239
+ Mage::throwException(
240
+ Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
241
+ );
242
+ }
243
+
244
+ $responseBody = $response->getBody();
245
+
246
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
247
+
248
+ if ($r) {
249
+ foreach($r as $key => $value)
250
+ {
251
+ if($value!="")
252
+ {
253
+ $aryKeyVal = explode("=",$value);
254
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
255
+ }
256
+ }
257
+
258
+ if (isset($aryResponse['status'])){
259
+ $result->setStatus($aryResponse['status']);
260
+ }
261
+ if (isset($aryResponse['tid'])){
262
+ $result->setTid($aryResponse['tid']);
263
+ }
264
+ if (isset($aryResponse['status_desc'])){
265
+ $result->setStatusDesc($aryResponse['status_desc']);
266
+ }
267
+
268
+ } else {
269
+ Mage::throwException(
270
+ Mage::helper('novalnet')->__('Error in payment gateway')
271
+ );
272
+ }
273
+ $result->toUtf8();
274
+ $note = $this->getNote($aryResponse);
275
+ $order = $payment->getOrder();
276
+ $order->setCustomerNote($note);
277
+ $order->setCustomerNoteNotify(true);
278
+ #$fh = fopen('/temp/magento.txt', 'w');fwrite($fh, $note);
279
+ #Mage::throwException($order->getEmailCustomerNote());#todo:
280
+ return $result;
281
+ }
282
+
283
+
284
+ public function assignData($data)
285
+ {
286
+ if (!($data instanceof Varien_Object)) {
287
+ $data = new Varien_Object($data);
288
+ }
289
+ $info=$this->getInfoInstance();
290
+ $info->setNnElvCountry($data->getElvCountry())
291
+ ->setNnAccountHolder($data->getAccountHolder())
292
+ ->setNnAccountNumber($data->getAccountNumber())
293
+ ->setNnBankSortingCode($data->getBankSortingCode());
294
+ return $this;
295
+ }
296
+ /**
297
+ * Get checkout
298
+ *
299
+ * @return Mage_Sales_Model_Quote
300
+ */
301
+ public function getQuote()
302
+ {
303
+ if (empty($this->_quote)) {
304
+ $this->_quote = $this->getCheckout()->getQuote();
305
+ }
306
+ return $this->_quote;
307
+ }
308
+ /**
309
+ * Get checkout
310
+ *
311
+ * @return Mage_Sales_Model_Order
312
+ */
313
+ public function getCheckout()
314
+ {
315
+ if (empty($this->_checkout)) {
316
+ //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
317
+ $this->_checkout = Mage::getSingleton('checkout/session');
318
+ }
319
+ return $this->_checkout;
320
+ }
321
+
322
+ public function getTitle()
323
+ {
324
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
325
+ }
326
+
327
+ public function validate()
328
+ {
329
+ parent::validate();
330
+ $info = $this->getInfoInstance();
331
+ $nnAccountNumber = $info->getNnAccountNumber();
332
+ $nnBankSortingCode = $info->getNnBankSortingCode();
333
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $nnAccountNumber);
334
+ $info->setNnAccountNumber($nnAccountNumber);
335
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $nnBankSortingCode);
336
+ $info->setNnBankSortingCode($nnBankSortingCode);
337
+ if (preg_match("/\D/",$nnAccountNumber)){
338
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.'));
339
+ }
340
+ if (preg_match("/\D/",$nnBankSortingCode)){
341
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.'));
342
+ }
343
+ return $this;
344
+ }
345
+ public function isPublicIP($value)
346
+ {
347
+ if(!$value || count(explode('.',$value))!=4)
348
+ {
349
+ return false;
350
+ }
351
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
352
+ }
353
+ public function getRealIpAddr()
354
+ {
355
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
356
+ {
357
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
358
+ }
359
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
360
+ {
361
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
362
+ }
363
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
364
+ {
365
+ return $_SERVER['HTTP_CLIENT_IP'];
366
+ }
367
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
368
+ {
369
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
370
+ }
371
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
372
+ {
373
+ return $_SERVER['HTTP_FORWARDED_FOR'];
374
+ }
375
+ return $_SERVER['REMOTE_ADDR'];
376
+ }
377
+ public function getAmount4Request($amount)
378
+ {
379
+ if(preg_match('/[,.]$/', $amount))
380
+ {
381
+ $amount = $amount . '00';
382
+ }
383
+ else if(preg_match('/[,.][0-9]$/', $amount))
384
+ {
385
+ $amount = $amount . '0';
386
+ }
387
+ $orig_amount = $amount;
388
+
389
+ $amount = str_replace(array('.', ','), array('',''), $amount);
390
+ return$amount;
391
+ }
392
+ public function getDuedateParam()
393
+ {
394
+ $payment_duration = $this->getConfigData('payment_duration');
395
+ $due_date = '';
396
+ $due_date_string = '';
397
+ if($payment_duration)
398
+ {
399
+ $due_date = date("d.m.Y",mktime(0,0,0,date("m"),date("d")+$payment_duration,date("Y")));
400
+ $due_date_string = '&due_date='.date("Y-m-d",mktime(0,0,0,date("m"),date("d")+$payment_duration,date("Y")));
401
+ }
402
+
403
+ if($due_date)
404
+ {
405
+ #return Mage::app()->getTranslator()->translate(func_get_args());#todo:
406
+ $this->due_date = $due_date;
407
+ }
408
+ /*else
409
+ {
410
+ $order->info['comments'] = '<BR><B>'.MODULE_PAYMENT_NOVALNET_INVOICE_TEXT_TRANSFER_INFO.'</B><BR><BR>';
411
+ }*/
412
+ return$due_date_string;
413
+ }
414
+ public function getNote($aryResponse)
415
+ {
416
+ #todo: Kontoinhaber fehlt
417
+ $note = Mage::helper('novalnet')->__('Please transfer the amount at the latest, untill').' '.$this->due_date.' '.Mage::helper('novalnet')->__('to following account').":<br /><br />\n\n";
418
+
419
+ $note.= Mage::helper('novalnet')->__('Account Holder2').": NOVALNET AG<br />\n";
420
+ $note.= Mage::helper('novalnet')->__('Account Number').": ".$aryResponse['invoice_account']."<br />\n";
421
+ $note.= Mage::helper('novalnet')->__('Bank Sorting Code').": ".$aryResponse['invoice_bankcode']."<br />\n";
422
+ $note.= Mage::helper('novalnet')->__('Bank').": ".$aryResponse['invoice_bankname'].', Muenchen<br /><br />'."\n\n"; #.$aryResponse['invoice_bankplace']."\n\n";
423
+
424
+ $note.= "IBAN: ".$aryResponse['invoice_iban']."<br />\n";
425
+ $note.= "SWIFT / BIC: ".$aryResponse['invoice_bic']."<br /><br />\n\n";
426
+
427
+ $note.= Mage::helper('novalnet')->__('Amount').": ".str_replace('.', ',', $aryResponse['amount'])." EUR<br />\n";
428
+ $note.= Mage::helper('novalnet')->__('Reference').": TID ".$aryResponse['tid']."<br />\n";
429
+ $note.= Mage::helper('novalnet')->__('Please note that the Transfer can only be identified with the above mentioned Reference').'.';
430
+
431
+ /*
432
+ aryResponce:
433
+ status=>100
434
+ nc_no=>2200224420635320
435
+ tid=>11934900002719418
436
+ memburl=>http://magento.gsoftpro.de/
437
+ login=>
438
+ password=>
439
+ end_date=>
440
+ amount=>1204.97 => 1204,97
441
+ invoice_account=>660983147
442
+ invoice_bankcode=>70020270
443
+ invoice_iban=>DE55700202700660983147
444
+ invoice_bic=>HYVEDEMMXXX
445
+ invoice_bankname=>Hypovereinsbank
446
+ invoice_bankplace=>M��nchen
447
+ */
448
+ return$note;
449
+ }
450
+ }
app/code/community/Mage/Novalnet/Model/NovalnetPhonepayment.php ADDED
@@ -0,0 +1,764 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Model_NovalnetPhonepayment extends Mage_Payment_Model_Method_Abstract
30
+ {
31
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
+ const CGI_URL2= 'https://payport.novalnet.de/nn_infoport.xml';#'nn_infoport_test.xml';
33
+ const RESPONSE_DELIM_CHAR = '&';
34
+ const RESPONSE_CODE_APPROVED = 100;
35
+ const PAYMENT_METHOD = 'PHONEPAYMENT';
36
+ const KEY = 18;
37
+ const AMOUNT_MIN = 90;
38
+ const AMOUNT_MAX = 1000;#10;#todo:
39
+ const CURRENCY = 'EUR';
40
+ const CODE = 'novalnet_tel';
41
+ /**
42
+ * unique internal payment method identifier
43
+ *
44
+ * @var string [a-z0-9_]
45
+ */
46
+ protected $_code = 'novalnetPhonepayment';
47
+ protected $_formBlockType = 'novalnet/phonepayment_form';
48
+ protected $_infoBlockType = 'novalnet/phonepayment_info';
49
+ protected $code = 'novalnet_tel';
50
+ protected $public_title = 'Telefonpayment';
51
+ protected $amount = 0;
52
+ protected $aBillingAddress = array();
53
+ protected $aryResponse = array();
54
+ protected $urlparam = '';
55
+ protected $text = '';
56
+ protected $debug = false;
57
+
58
+
59
+ /**
60
+ * Is this payment method a gateway (online auth/charge) ?
61
+ */
62
+ protected $_isGateway = true;
63
+
64
+ /**
65
+ * Can authorize online?
66
+ */
67
+ protected $_canAuthorize = false;
68
+
69
+ /**
70
+ * Can capture funds online?
71
+ */
72
+ protected $_canCapture = true;
73
+
74
+ /**
75
+ * Can capture partial amounts online?
76
+ */
77
+ protected $_canCapturePartial = true;
78
+
79
+ /**
80
+ * Can refund online?
81
+ */
82
+ protected $_canRefund = false;
83
+
84
+ /**
85
+ * Can void transactions online?
86
+ */
87
+ protected $_canVoid = false;
88
+
89
+ /**
90
+ * Can use this payment method in administration panel?
91
+ */
92
+ protected $_canUseInternal = true;
93
+
94
+ /**
95
+ * Can show this payment method as an option on checkout payment page?
96
+ */
97
+ protected $_canUseCheckout = true;
98
+
99
+ /**
100
+ * Is this payment method suitable for multi-shipping checkout?
101
+ */
102
+ protected $_canUseForMultishipping = true;
103
+
104
+ /**
105
+ * Can save credit card information for future processing?
106
+ */
107
+ protected $_canSaveCc = false;
108
+
109
+ /**
110
+ * Here you will need to implement authorize, capture and void public methods
111
+ *
112
+ * @see examples of transaction specific public methods such as
113
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
114
+ */
115
+ public function authorize(Varien_Object $payment, $amount)
116
+ {
117
+ return $this;
118
+ }
119
+ public function capture(Varien_Object $payment, $amount)
120
+ {
121
+ $error = false;
122
+ $payment->setAmount($amount);
123
+ $this->debug2($amount, 'magento_capture_amount.txt');
124
+ $request = $this->_buildRequest($payment);
125
+ $this->debug2($request, 'magento_capture_request.txt');
126
+ $result = $this->_postRequest($request, $payment);
127
+ $this->debug2($result, 'magento_capture_result.txt');
128
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
129
+ $this->debug2($result, 'magento_capture_resultok.txt');
130
+ $payment->setStatus(self::STATUS_APPROVED);
131
+ $payment->setCcTransId($result->getTid());
132
+ $payment->setLastTransId($result->getTid());
133
+ $payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
134
+ $payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
135
+ $id = $payment->getNnId();
136
+ $quote_payment = $this->getQuote()->getPaymentById($id);
137
+ if ($quote_payment)#to avoid error msg. in admin interface
138
+ {
139
+ $quote_payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
140
+ $quote_payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
141
+ $quote_payment->save();
142
+ }
143
+ }
144
+ else {
145
+ $this->debug2($result, 'magento_capture_resultnotok.txt');
146
+ if ($result->getStatusDesc()) {
147
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
148
+ }else {
149
+ $error = Mage::helper('novalnet')->__('Error in capturing the payment');
150
+ }
151
+ }
152
+
153
+ if ($error !== false) {
154
+ $this->debug2($error, 'magento_error.txt');
155
+ Mage::throwException($error);
156
+ }
157
+ return $this;
158
+ }
159
+ public function refund(Varien_Object $payment, $amount)
160
+ {
161
+ return $this;
162
+ }
163
+
164
+ public function void(Varien_Object $payment)
165
+ {
166
+ return $this;
167
+ }
168
+ /**
169
+ * Prepare request to gateway
170
+ *
171
+ * @link http://www.authorize.net/support/AIM_guide.pdf
172
+ * @param Mage_Sales_Model_Document $order
173
+ * @return unknown
174
+ */
175
+ protected function _saveObject (Varien_Object $payment)
176
+ {
177
+ $order = $payment->getOrder();
178
+ if (!empty($order)) {
179
+ $billing = $order->getBillingAddress();
180
+ }
181
+ }
182
+ protected function _buildRequest(Varien_Object $payment)
183
+ {
184
+ $order = $payment->getOrder();
185
+ if (session_is_registered('tid')){
186
+ $this->debug2($order, 'magento_order2.txt');
187
+ }
188
+ $request = Mage::getModel('novalnet/novalnet_request');
189
+
190
+ $request->setvendor($this->getConfigData('merchant_id'))
191
+ ->setauth_code($this->getConfigData('auth_code'))
192
+ ->setproduct($this->getConfigData('product_id'))
193
+ ->settariff($this->getConfigData('tariff_id'));
194
+
195
+ $request->setcurrency($order->getOrderCurrency());
196
+
197
+ if($payment->getAmount()){
198
+ #$request->setamount($payment->getAmount()*100);
199
+ $request->setamount($this->getAmount4Request($payment->getAmount()));
200
+ }
201
+
202
+ if (!empty($order)) {
203
+ $request->setinput1($order->getIncrementId());
204
+
205
+ $billing = $order->getBillingAddress();
206
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
207
+ if (!isset($street[1]) or !$street[1]){$street[1]='';}
208
+ if (!isset($street[2]) or !$street[2]){$street[2]='';}
209
+ if (!empty($billing)) {
210
+ if (session_is_registered('tid')){
211
+ $this->debug2($billing, 'magento_billing2.txt');
212
+ }
213
+ $request->setfirst_name($billing->getFirstname())
214
+ ->setLast_name($billing->getlastname())
215
+ ->setstreet($street[0].$street[1].$street[2])
216
+ ->setcity($billing->getCity())
217
+ ->setzip($billing->getPostcode())
218
+ ->setcountry($billing->getCountry())
219
+ ->settel($billing->getTelephone())
220
+ ->setfax($billing->getFax())
221
+ ->setremote_ip($this->getRealIpAddr())
222
+ ->setgender('u')
223
+ ->setemail($order->getCustomerEmail())
224
+ ->setsearch_in_street(1);
225
+ #->setremote_ip($order->getRemoteIp())
226
+ #->sethouse_no($street[1].$street[2])
227
+ }
228
+ }
229
+ /*$request->setbank_account_holder($payment->getNnAccountHolder())
230
+ ->setbank_account($payment->getNnAccountNumber())
231
+ ->setbank_code($payment->getNnBankSortingCode())*/
232
+ $request->setkey(self::KEY);
233
+ #$request->setinvoice_type(self::PAYMENT_METHOD);
234
+
235
+ if (session_is_registered('tid')){
236
+ $this->urlparam = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
237
+ $this->urlparam .= '<nnxml><info_request><vendor_id>'.$this->getConfigData('merchant_id').'</vendor_id>';
238
+ $this->urlparam .= '<vendor_authcode>'.$this->getConfigData('auth_code').'</vendor_authcode>';
239
+ $this->urlparam .= '<request_type>NOVALTEL_STATUS</request_type><tid>'.$_SESSION['tid'].'</tid>';
240
+ $this->urlparam .= '<lang>DE</lang></info_request></nnxml>';
241
+ }
242
+
243
+ return $request;
244
+ }
245
+
246
+ protected function _postRequest(Varien_Object $request, Varien_Object $payment=null)
247
+ {
248
+ $result = Mage::getModel('novalnet/novalnet_result');
249
+
250
+ $client = new Varien_Http_Client();
251
+
252
+ if (!session_is_registered('tid')){#first call
253
+ $client->setUri(self::CGI_URL);
254
+ }else{#second call
255
+ $client->setUri(self::CGI_URL2);
256
+ }
257
+
258
+ $client->setConfig(array(
259
+ 'maxredirects'=>0,
260
+ 'timeout'=>30,
261
+ //'ssltransport' => 'tcp',
262
+ ));
263
+ #$request->toLatin1();
264
+
265
+ if (!session_is_registered('tid')){#first call
266
+ $request->toLatin1();
267
+ $client->setParameterPost($request->getData());
268
+ $this->debug2($request->getData(), 'magento_request1.txt');
269
+ }else{#secondcall
270
+ $client->setHeaders('Content-Type', 'application/atom+xml');
271
+ $client->setRawData($this->urlparam);
272
+ #$response = $client->request('POST');
273
+ #$client->setParameterPost(utf8_encode($this->urlparam));
274
+ $this->debug2($this->urlparam, 'magento_request2.txt');
275
+ }
276
+
277
+ $client->setMethod(Zend_Http_Client::POST);
278
+ try {
279
+ $method2 = '';
280
+ if (session_is_registered('tid')){
281
+ $method2 = 'POST';
282
+ }
283
+ $response = $client->request($method2);
284
+ } catch (Exception $e) {
285
+ $this->debug2($e->getMessage(), 'magento_exceptionMsg.txt');
286
+ $result->setResponseCode(-1)
287
+ ->setResponseReasonCode($e->getCode())
288
+ ->setResponseReasonText($e->getMessage());
289
+ Mage::throwException(
290
+ Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
291
+ );
292
+ }
293
+ $responseBody = $response->getBody();
294
+
295
+ if (session_is_registered('tid')){#second call
296
+ $this->debug2($response, 'magento_response2.txt');
297
+ $xml = serialize($response);
298
+ $this->debug2($xml, 'magento_xml.txt');
299
+ /*
300
+ <nnxml>
301
+ <novaltel_status>18</novaltel_status>
302
+ <novaltel_status_message>Zahlungsanruf noch nicht durchgef��hrt</novaltel_status_message>
303
+ <member_url>http://magento.gsoftpro.de/</member_url>
304
+ <login></login>
305
+ <password></password>
306
+ <paid_until></paid_until>
307
+ </nnxml>
308
+ */
309
+ if (!preg_match('|\<nnxml\>(.+)\</nnxml\>|is', $xml, $matches)){
310
+ Mage::throwException(Mage::helper('novalnet')->__('Error in payment gateway').': '.Mage::helper('novalnet')->__('Response contains no XML'));
311
+ }
312
+
313
+ $xml = $matches[1];
314
+ $this->debug2($xml, 'magento_xml_purged.txt');
315
+ #Mage::throwException($xml.'h');
316
+
317
+ $data = $xml; #$response;
318
+ if(strstr($data, '<novaltel_status>'))
319
+ {
320
+ preg_match('/novaltel_status>?([^<]+)/i', $data, $matches);
321
+ $aryResponse['status'] = $matches[1];
322
+ $result->setStatus($aryResponse['status']);
323
+ $this->debug2($aryResponse['status'], 'magento_novaltel_status.txt');
324
+
325
+ preg_match('/novaltel_status_message>?([^<]+)/i', $data, $matches);
326
+ $aryResponse['status_desc'] = $matches[1];
327
+ $result->setStatusDesc($aryResponse['status_desc']);
328
+ $result->setTid($_SESSION['tid']);
329
+ $this->debug2($aryResponse['status_desc'], 'magento_novaltel_status_desc.txt');
330
+
331
+ if ($aryResponse['status']!= 100){
332
+ if ($aryResponse['status'] == 18 and isset($_SESSION['novalnet_tel'])){
333
+ Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc'])."\n".Mage::helper('novalnet')->__('Did you called this number').': '.preg_replace('/(\d{4})(\d{4})(\d{4})(\d{4})/', "$1 $2 $3 $4", $_SESSION['novalnet_tel']));
334
+ }else{
335
+ Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc']));
336
+ }
337
+ }
338
+ }
339
+ $this->debug2($result, 'magento_result2.txt');
340
+ }else {#first call
341
+ $this->debug2($response, 'magento_response1.txt');
342
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
343
+
344
+ if ($r) {
345
+ foreach($r as $key => $value)
346
+ {
347
+ if($value!="")
348
+ {
349
+ $aryKeyVal = explode("=",$value);
350
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
351
+ }
352
+ }
353
+
354
+ if (isset($aryResponse['status'])){
355
+ $result->setStatus($aryResponse['status']);
356
+ }
357
+ if (isset($aryResponse['tid'])){
358
+ $result->setTid($aryResponse['tid']);
359
+ }
360
+ if (isset($aryResponse['status_desc'])){
361
+ $result->setStatusDesc($aryResponse['status_desc']);
362
+ }
363
+ $this->debug2($result, 'magento_result1.txt');
364
+ } else {
365
+ Mage::throwException(Mage::helper('novalnet')->__('Error in payment gateway'));
366
+ }
367
+ }
368
+ $result->toUtf8();
369
+ if (session_is_registered('tid')){
370
+ $this->debug2($response, 'magento_response2.txt');
371
+ $this->debug2($aryResponse, 'magento_aryResponse2.txt');
372
+ }
373
+ if ($payment){
374
+ $this->debug2($payment, 'magento_payment2.txt');
375
+ #$note = $this->getNote($aryResponse);
376
+ $order = $payment->getOrder();
377
+ #$order->setCustomerNote($note);
378
+ #$order->setCustomerNoteNotify(true);
379
+ }
380
+
381
+ if ($aryResponse['status'] == 100){
382
+ if (session_is_registered('tid')){
383
+ session_unregister('tid');
384
+ }
385
+ if (session_is_registered('novalnet_tel')){
386
+ session_unregister('novalnet_tel');
387
+ }
388
+ }
389
+ $this->aryResponse = $aryResponse;
390
+ return $result;
391
+ }
392
+
393
+
394
+ public function assignData($data)
395
+ {
396
+ if(!session_is_registered('tid')){
397
+ $this->debug2($data, 'magento_assignData1.txt');
398
+ $addresses = $this->getQuote()->getAllAddresses();
399
+ $this->checkAmountAllowed();
400
+ $this->aBillingAddress = $this->getBillingAddress($addresses);
401
+ $this->debug2($this, 'magento_assignData_this.txt');
402
+ $this->getFirstCall();
403
+ }else{
404
+ $this->debug2($data, 'magento_assignData2.txt');
405
+ #Mage::throwException($this->text.'hl');
406
+ }
407
+
408
+ if (!($data instanceof Varien_Object)) {
409
+ $data = new Varien_Object($data);
410
+ }
411
+ $info=$this->getInfoInstance();
412
+ /*$info->setNnElvCountry($data->getElvCountry())
413
+ ->setNnAccountHolder($data->getAccountHolder())
414
+ ->setNnAccountNumber($data->getAccountNumber())
415
+ ->setNnBankSortingCode($data->getBankSortingCode());*/
416
+
417
+ return $this;
418
+ }
419
+ /**
420
+ * Get checkout
421
+ *
422
+ * @return Mage_Sales_Model_Quote
423
+ */
424
+ public function getQuote()
425
+ {
426
+ if (empty($this->_quote)) {
427
+ $this->_quote = $this->getCheckout()->getQuote();
428
+ }
429
+ return $this->_quote;
430
+ }
431
+ /**
432
+ * Get checkout
433
+ *
434
+ * @return Mage_Sales_Model_Order
435
+ */
436
+ public function getCheckout()
437
+ {
438
+ if (empty($this->_checkout)) {
439
+ //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
440
+ $this->_checkout = Mage::getSingleton('checkout/session');
441
+ }
442
+ return $this->_checkout;
443
+ }
444
+
445
+ public function getTitle()
446
+ {
447
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
448
+ }
449
+
450
+ public function validate()
451
+ {
452
+ parent::validate();
453
+ $info = $this->getInfoInstance();
454
+ $nnAccountNumber = $info->getNnAccountNumber();
455
+ $nnBankSortingCode = $info->getNnBankSortingCode();
456
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $nnAccountNumber);
457
+ $info->setNnAccountNumber($nnAccountNumber);
458
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $nnBankSortingCode);
459
+ $info->setNnBankSortingCode($nnBankSortingCode);
460
+ if (preg_match("/\D/",$nnAccountNumber)){
461
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.'));
462
+ }
463
+ if (preg_match("/\D/",$nnBankSortingCode)){
464
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.'));
465
+ }
466
+ return $this;
467
+ }
468
+ public function isPublicIP($value)
469
+ {
470
+ if(!$value || count(explode('.',$value))!=4)
471
+ {
472
+ return false;
473
+ }
474
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
475
+ }
476
+ public function getRealIpAddr()
477
+ {
478
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
479
+ {
480
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
481
+ }
482
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
483
+ {
484
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
485
+ }
486
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
487
+ {
488
+ return $_SERVER['HTTP_CLIENT_IP'];
489
+ }
490
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
491
+ {
492
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
493
+ }
494
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
495
+ {
496
+ return $_SERVER['HTTP_FORWARDED_FOR'];
497
+ }
498
+ return $_SERVER['REMOTE_ADDR'];
499
+ }
500
+ public function getAmount4Request($amount)
501
+ {
502
+ if(preg_match('/[,.]$/', $amount))
503
+ {
504
+ $amount = $amount . '00';
505
+ }
506
+ else if(preg_match('/[,.][0-9]$/', $amount))
507
+ {
508
+ $amount = $amount . '0';
509
+ }
510
+ $orig_amount = $amount;
511
+
512
+ $amount = str_replace(array('.', ','), array('',''), $amount);
513
+ return$amount;
514
+ }
515
+ public function getNote($aryResponse)
516
+ {
517
+ #todo: Kontoinhaber fehlt
518
+ $note = Mage::helper('novalnet')->__('Please transfer the amount to following account').":<br /><br />\n\n";
519
+
520
+ $note.= Mage::helper('novalnet')->__('Account Holder2').": NOVALNET AG<br />\n";
521
+ $note.= Mage::helper('novalnet')->__('Account Number').": ".$aryResponse['invoice_account']."<br />\n";
522
+ $note.= Mage::helper('novalnet')->__('Bank Sorting Code').": ".$aryResponse['invoice_bankcode']."<br />\n";
523
+ $note.= Mage::helper('novalnet')->__('Bank').": ".$aryResponse['invoice_bankname'].', Muenchen<br /><br />'."\n\n"; #.$aryResponse['invoice_bankplace']."\n\n";
524
+
525
+ $note.= "IBAN: ".$aryResponse['invoice_iban']."<br />\n";
526
+ $note.= "SWIFT / BIC: ".$aryResponse['invoice_bic']."<br /><br />\n\n";
527
+
528
+ $note.= Mage::helper('novalnet')->__('Amount').": ".str_replace('.', ',', $aryResponse['amount'])." EUR<br />\n";
529
+ $note.= Mage::helper('novalnet')->__('Reference').": TID ".$aryResponse['tid']."<br />\n";
530
+ $note.= Mage::helper('novalnet')->__('Please note that the Transfer can only be identified with the above mentioned Reference').'.';
531
+ return$note;
532
+ }
533
+
534
+ public function checkAmountAllowed()
535
+ {
536
+ $info=$this->getInfoInstance();
537
+ $data = serialize($info->getData());
538
+
539
+ #example: "grand_total";s:8:"524.9600";
540
+ $t = preg_match('/origData.+\"grand_total\"\;s\:\d*\:\"(\d*\.\d*)\".+base_grand_total/', $data, $aMatch);
541
+ if (!$aMatch and !$aMatch[1]){
542
+ Mage::throwException(Mage::helper('novalnet')->__('Error').':'. Mage::helper('novalnet')->__('Order Price not found'));
543
+ }
544
+ $amount = $aMatch[1] * 100;
545
+ $amount = $this->getAmount4Request($amount); #10 euro => 1000 Cent
546
+ #$amount = 900;#todo: delete this line
547
+ if ($amount >= self::AMOUNT_MIN and $amount <= self::AMOUNT_MAX){
548
+ $this->amount = $amount;
549
+ return true;
550
+ }
551
+ Mage::throwException(Mage::helper('novalnet')->__('Amount below 0.90 Euro and above 10.00 Euro is not accepted'));
552
+ }
553
+ public function debug2($object, $filename)
554
+ {
555
+ if (!$this->debug){return;}
556
+ $fh = fopen("/tmp/$filename", 'a+');
557
+ if (gettype($object) == 'object' or gettype($object) == 'array'){
558
+ fwrite($fh, serialize($object));
559
+ }else{
560
+ fwrite($fh, $object);
561
+ }
562
+ fwrite($fh, "<hr />\n");
563
+ fclose($fh);
564
+ }
565
+ public function getFirstCall()
566
+ {
567
+ $url = 'https://payport.novalnet.de/paygate.jsp';
568
+ $request = Mage::getModel('novalnet/novalnet_request');
569
+ $request->setvendor($this->getConfigData('merchant_id'))
570
+ ->setauth_code($this->getConfigData('auth_code'))
571
+ ->setproduct($this->getConfigData('product_id'))
572
+ ->settariff($this->getConfigData('tariff_id'));
573
+
574
+ $request->setkey(self::KEY);
575
+ $request->setcurrency(self::CURRENCY);
576
+ $request->setamount($this->amount);
577
+
578
+ $request->setfirst_name(utf8_encode($this->aBillingAddress['firstname']))
579
+ ->setLast_name(utf8_encode($this->aBillingAddress['lastname']))
580
+ ->setstreet(utf8_encode($this->aBillingAddress['street']))
581
+ ->setcity(utf8_encode($this->aBillingAddress['city']))
582
+ ->setzip($this->aBillingAddress['postcode'])
583
+ ->setcountry($this->aBillingAddress['country'])
584
+ ->settel($this->aBillingAddress['telephone'])
585
+ ->setfax($this->aBillingAddress['fax'])
586
+ ->setremote_ip($this->getRealIpAddr())
587
+ ->setgender('u')
588
+ ->setemail($this->aBillingAddress['email'])
589
+ ->setsearch_in_street(1);
590
+ #$request->setinvoice_type(self::PAYMENT_METHOD);
591
+
592
+ $result = $this->_postRequest($request);
593
+
594
+ if(!$this->aryResponse){
595
+ Mage::throwException('Params (aryResponse) missing');
596
+ }
597
+ $data = '';
598
+ foreach ($this->aryResponse as $k=>$v){
599
+ $data.= "$k=$v&";
600
+ }
601
+ if (substr($data, -1) == '&'){
602
+ $data = substr($data, 0, -1);
603
+ }
604
+
605
+ if(strstr($data, '<novaltel_status>'))
606
+ {
607
+ preg_match('/novaltel_status>?([^<]+)/i', $data, $matches);
608
+ $aryResponse['status'] = $matches[1];
609
+
610
+ preg_match('/novaltel_status_message>?([^<]+)/i', $data, $matches);
611
+ $aryResponse['status_desc'] = $matches[1];
612
+ }
613
+ else
614
+ {
615
+ #capture the result and message and other parameters from response data '$data' in an array
616
+ $aryPaygateResponse = explode('&', $data);
617
+ foreach($aryPaygateResponse as $key => $value)
618
+ {
619
+ if($value!="")
620
+ {
621
+ $aryKeyVal = explode("=",$value);
622
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
623
+ }
624
+ }
625
+ }
626
+
627
+ if((session_is_registered('tid') and $_SESSION['tid'] != '') && $aryResponse['status']==100) #### SECOND CALL -> On successful payment ####
628
+ {
629
+ #### Redirecting the user to the checkout page ####
630
+ #$order->info['comments'] .= '. Novalnet Transaction ID : '.$_SESSION['tid'];
631
+ session_unregister('tid'); #$_SESSION['tid'] = '';
632
+ if (session_is_registered('novalnet_tel')){
633
+ session_unregister('novalnet_tel');#$_SESSION['novalnet_tel'] = '';
634
+ }
635
+ }
636
+ else #### On payment failure ####
637
+ {
638
+ $status = '';
639
+ $wrong_amount = '';#todo:
640
+ if($wrong_amount==1){
641
+ $status = '1';
642
+ $aryResponse['status_desc'] = 'novalnet_amount_error';}
643
+
644
+ ### Passing the Error Response from Novalnet's paygate to payment error ###
645
+ elseif($aryResponse['status']==100 && $aryResponse['tid'])
646
+ {
647
+ $aryResponse['status_desc']='';
648
+ if(!session_is_registered('tid')){
649
+ session_register('tid');
650
+ }
651
+ if(!session_is_registered('novalnet_tel')){
652
+ session_register('novalnet_tel');
653
+ }
654
+
655
+ $_SESSION['tid'] = $aryResponse['tid'];
656
+ $_SESSION['novalnet_tel'] = $aryResponse['novaltel_number'];
657
+ $text = Mage::helper('novalnet')->__('Following steps are required to complete the telephone payment process').':'."\n";
658
+ $text .= Mage::helper('novalnet')->__('Step').'1: ';
659
+ $text .= Mage::helper('novalnet')->__('Please dial this number').': '.preg_replace('/(\d{4})(\d{4})(\d{4})(\d{4})/', "$1 $2 $3 $4", $_SESSION['novalnet_tel']).".\n";
660
+ $text .= Mage::helper('novalnet')->__('Step').'2: ';
661
+ $text .= Mage::helper('novalnet')->__('Please wait for the Signal tone and hangup the reciever').'. ';
662
+ $text .= Mage::helper('novalnet')->__('Please click on continue after your successive call').'.'."\n";
663
+ $text .= '* '. Mage::helper('novalnet')->__('This call costs').' '.($this->amount/100).' Euro ('.Mage::helper('novalnet')->__('inclusive tax').') ';
664
+ $text .= Mage::helper('novalnet')->__('and is only possible from German Landline Telefon connection').'! *';
665
+
666
+ $this->text = $text;
667
+ Mage::throwException($text);#show note for client to call...
668
+ }
669
+ elseif($aryResponse['status']==18){$error = true;}
670
+ elseif($aryResponse['status']==19)
671
+ {
672
+ if(!session_is_registered('tid')){
673
+ $_SESSION['tid'] = '';
674
+ }
675
+ if(!session_is_registered('novalnet_tel')){
676
+ $_SESSION['novalnet_tel'] = '';
677
+ }
678
+ }
679
+ else $status = $aryResponse['status'];
680
+
681
+ ### Passing through the Error Response from Novalnet's paygate into order-info ###
682
+ #$order->info['comments'] .= '. Novalnet Error Code : '.$aryResponse['status'].', Novalnet Error Message : '.$aryResponse['status_desc'];
683
+
684
+ #$payment_error_return = 'payment_error=' . self::CODE. '&error=' . urlencode($aryResponse['status_desc']);
685
+ }
686
+ if ($aryResponse['status']!= 100){
687
+ Mage::throwException(Mage::helper('novalnet')->__('Gateway request error: %s', $aryResponse['status_desc']));
688
+ }
689
+ }
690
+ public function getBillingAddress($addresses)
691
+ {
692
+ $this->debug2($addresses, 'magento_addresses.txt');
693
+ $addresses = serialize($addresses);
694
+ /*"address_type";s:7:"billing";s:5:"email";s:14:"jz@novalnet.de";s:6:"prefix";N;s:9:"firstname";s:7:"Jianguo";s:10:"middlename";N;s:8:"lastname";s:5:"Zhang";s:6:"suffix";N;s:7:"company";s:11:"Novalnet AG";s:6:"street";s:14:"Stiftsbogen 70";s:4:"city";s:8:"M��nchen";s:6:"region";s:6:"Bayern";s:9:"region_id";s:2:"81";s:8:"postcode";s:5:"81375";s:10:"country_id";s:2:"DE";s:9:"telephone";s:12:"089 47027059";s:3:"fax";s:0:"";s:15:"same_as_billing"*/
695
+ $t = preg_match('/\"address\_type\"\;s\:7\:\"billing\"(.{100,1000})\"same\_as\_billing\"/is', $addresses, $aMatch);
696
+ if (!$aMatch or !$aMatch[1]){
697
+ Mage::throwException(Mage::helper('novalnet')->__('Billing Addr. not found'));
698
+ }
699
+ $foundString = $aMatch[1];
700
+ $t = preg_match('/\"firstname\"\;s\:\d*\:\"(.+)\"\;s\:10\:\"middlename\"\;/',$foundString, $aMatch);
701
+ if ($aMatch and $aMatch[1]){
702
+ $aBillingAddress['firstname'] = $aMatch[1];
703
+ }else{
704
+ $aBillingAddress['firstname'] = '';
705
+ }
706
+
707
+ $t = preg_match('/\"lastname\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"suffix\"\;/',$foundString, $aMatch);
708
+ if ($aMatch and $aMatch[1]){
709
+ $aBillingAddress['lastname'] = $aMatch[1];
710
+ }else{
711
+ $aBillingAddress['lastname'] = '';
712
+ }
713
+
714
+ $t = preg_match('/\"street\"\;s\:\d*\:\"(.+)\"\;s\:4\:\"city\"\;/',$foundString, $aMatch);
715
+ if ($aMatch and $aMatch[1]){
716
+ $aBillingAddress['street'] = $aMatch[1];
717
+ }else{
718
+ $aBillingAddress['street'] = '';
719
+ }
720
+
721
+ $t = preg_match('/\"city\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"region\"\;/',$foundString, $aMatch);
722
+ if ($aMatch and $aMatch[1]){
723
+ $aBillingAddress['city'] = $aMatch[1];
724
+ }else{
725
+ $aBillingAddress['city'] = '';
726
+ }
727
+
728
+ $t = preg_match('/\"postcode\"\;s\:\d*\:\"(.+)\"\;s\:10\:\"country_id\"\;/',$foundString, $aMatch);
729
+ if ($aMatch and $aMatch[1]){
730
+ $aBillingAddress['postcode'] = $aMatch[1];
731
+ }else{
732
+ $aBillingAddress['postcode'] = '';
733
+ }
734
+
735
+ $t = preg_match('/\"email\"\;s\:\d*\:\"(.+)\"\;s\:6\:\"prefix\"\;/',$foundString, $aMatch);
736
+ if ($aMatch and $aMatch[1]){
737
+ $aBillingAddress['email'] = $aMatch[1];
738
+ }else{
739
+ $aBillingAddress['email'] = '';
740
+ }
741
+
742
+ $t = preg_match('/\"telephone\"\;s\:\d*\:\"(.+)\"\;s\:3\:\"fax\"\;/',$foundString, $aMatch);
743
+ if ($aMatch and $aMatch[1]){
744
+ $aBillingAddress['telephone'] = $aMatch[1];
745
+ }else{
746
+ $aBillingAddress['telephone'] = '';
747
+ }
748
+
749
+ $t = preg_match('/\"country_id\"\;s\:\d*\:\"(.+)\"\;s\:9\:\"telephone\"\;/',$foundString, $aMatch);
750
+ if ($aMatch and $aMatch[1]){
751
+ $aBillingAddress['country'] = $aMatch[1];
752
+ }else{
753
+ $aBillingAddress['country'] = '';
754
+ }
755
+
756
+ $t = preg_match('/\"fax\"\;s\:\d*\:\"(.+)\"\;s\:15\:\"same_as_billing\"\;/',$foundString, $aMatch);
757
+ if ($aMatch and $aMatch[1]){
758
+ $aBillingAddress['fax'] = $aMatch[1];
759
+ }else{
760
+ $aBillingAddress['fax'] = '';
761
+ }
762
+ return$aBillingAddress;
763
+ }
764
+ }
app/code/community/Mage/Novalnet/Model/NovalnetPrepayment.php ADDED
@@ -0,0 +1,421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ class Mage_Novalnet_Model_NovalnetPrepayment extends Mage_Payment_Model_Method_Abstract
30
+ {
31
+ const CGI_URL = 'https://payport.novalnet.de/paygate.jsp';
32
+ const RESPONSE_DELIM_CHAR = '&';
33
+ const RESPONSE_CODE_APPROVED = 100;
34
+ const PAYMENT_METHOD = 'PREPAYMENT';
35
+ const KEY = 27;
36
+ const STATUS_PENDING = 'PENDING';
37
+ /**
38
+ * unique internal payment method identifier
39
+ *
40
+ * @var string [a-z0-9_]
41
+ */
42
+ protected $_code = 'novalnetPrepayment';
43
+ protected $_formBlockType = 'novalnet/prepayment_form';
44
+ protected $_infoBlockType = 'novalnet/prepayment_info';
45
+
46
+
47
+ /**
48
+ * Is this payment method a gateway (online auth/charge) ?
49
+ */
50
+ protected $_isGateway = true;
51
+
52
+ /**
53
+ * Can authorize online?
54
+ */
55
+ protected $_canAuthorize = false;
56
+
57
+ /**
58
+ * Can capture funds online?
59
+ */
60
+ protected $_canCapture = true;
61
+
62
+ /**
63
+ * Can capture partial amounts online?
64
+ */
65
+ protected $_canCapturePartial = true;
66
+
67
+ /**
68
+ * Can refund online?
69
+ */
70
+ protected $_canRefund = false;
71
+
72
+ /**
73
+ * Can void transactions online?
74
+ */
75
+ protected $_canVoid = false;
76
+
77
+ /**
78
+ * Can use this payment method in administration panel?
79
+ */
80
+ protected $_canUseInternal = true;
81
+
82
+ /**
83
+ * Can show this payment method as an option on checkout payment page?
84
+ */
85
+ protected $_canUseCheckout = true;
86
+
87
+ /**
88
+ * Is this payment method suitable for multi-shipping checkout?
89
+ */
90
+ protected $_canUseForMultishipping = true;
91
+
92
+ /**
93
+ * Can save credit card information for future processing?
94
+ */
95
+ protected $_canSaveCc = false;
96
+
97
+ /**
98
+ * Here you will need to implement authorize, capture and void public methods
99
+ *
100
+ * @see examples of transaction specific public methods such as
101
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
102
+ */
103
+ public function authorize(Varien_Object $payment, $amount)
104
+ {
105
+
106
+ return $this;
107
+ }
108
+ public function capture(Varien_Object $payment, $amount)
109
+ {
110
+ $error = false;
111
+ $payment->setAmount($amount);
112
+ $request = $this->_buildRequest($payment);
113
+ $result = $this->_postRequest($request, $payment);
114
+
115
+ if ($result->getStatus() == self::RESPONSE_CODE_APPROVED) {
116
+ #$payment->setStatus(self::STATUS_APPROVED);
117
+ $payment->setStatus(self::STATUS_PENDING);
118
+ $payment->setCcTransId($result->getTid());
119
+ $payment->setLastTransId($result->getTid());
120
+ $payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
121
+ $payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
122
+ $id = $payment->getNnId();
123
+ $quote_payment = $this->getQuote()->getPaymentById($id);
124
+ if ($quote_payment)#to avoid error msg. in admin interface
125
+ {
126
+ $quote_payment->setNnAccountNumber(substr($payment->getNnAccountNumber(),0,-4)."XXXX");
127
+ $quote_payment->setNnBankSortingCode(substr($payment->getNnBankSortingCode(),0,-3)."XXX");
128
+ $quote_payment->save();
129
+ }
130
+ }
131
+ else {
132
+ if ($result->getStatusDesc()) {
133
+ $error = Mage::helper('novalnet')->htmlEscape($result->getStatusDesc());
134
+ }else {
135
+ $error = Mage::helper('novalnet')->__('Error in capturing the payment');
136
+ }
137
+ }
138
+
139
+ if ($error !== false) {
140
+ Mage::throwException($error);
141
+ }
142
+ return $this;
143
+ }
144
+ public function refund(Varien_Object $payment, $amount)
145
+ {
146
+ return $this;
147
+ }
148
+
149
+ public function void(Varien_Object $payment)
150
+ {
151
+ return $this;
152
+ }
153
+ /**
154
+ * Prepare request to gateway
155
+ *
156
+ * @link http://www.authorize.net/support/AIM_guide.pdf
157
+ * @param Mage_Sales_Model_Document $order
158
+ * @return unknown
159
+ */
160
+ protected function _saveObject (Varien_Object $payment)
161
+ {
162
+ $order = $payment->getOrder();
163
+ if (!empty($order)) {
164
+ $billing = $order->getBillingAddress();
165
+ }
166
+ }
167
+ protected function _buildRequest(Varien_Object $payment)
168
+ {
169
+ $order = $payment->getOrder();
170
+ $request = Mage::getModel('novalnet/novalnet_request');
171
+
172
+
173
+ $request->setvendor($this->getConfigData('merchant_id'))
174
+ ->setauth_code($this->getConfigData('auth_code'))
175
+ ->setproduct($this->getConfigData('product_id'))
176
+ ->settariff($this->getConfigData('tariff_id'));
177
+
178
+ $request->setcurrency($order->getOrderCurrency());
179
+
180
+ if($payment->getAmount()){
181
+ #$request->setamount($payment->getAmount()*100);
182
+ $request->setamount($this->getAmount4Request($payment->getAmount()));
183
+ }
184
+
185
+ if (!empty($order)) {
186
+ $request->setinput1($order->getIncrementId());
187
+
188
+ $billing = $order->getBillingAddress();
189
+ $street = preg_split("/(\d)/",$billing->getStreet(1),2,PREG_SPLIT_DELIM_CAPTURE);
190
+ if (!isset($street[1]) or !$street[1]){$street[1]='';}
191
+ if (!isset($street[2]) or !$street[2]){$street[2]='';}
192
+ if (!empty($billing)) {
193
+ $request->setfirst_name($billing->getFirstname())
194
+ ->setLast_name($billing->getlastname())
195
+ ->setstreet($street[0].$street[1].$street[2])
196
+ ->setcity($billing->getCity())
197
+ ->setzip($billing->getPostcode())
198
+ ->setcountry($billing->getCountry())
199
+ ->settel($billing->getTelephone())
200
+ ->setfax($billing->getFax())
201
+ ->setremote_ip($this->getRealIpAddr())
202
+ ->setgender('u')
203
+ ->setemail($order->getCustomerEmail())
204
+ ->setsearch_in_street(1);
205
+ #->setremote_ip($order->getRemoteIp())
206
+ #->sethouse_no($street[1].$street[2])
207
+ #birth_date #todo:
208
+ #language#todo:
209
+ }
210
+ }
211
+ /*$request->setbank_account_holder($payment->getNnAccountHolder())
212
+ ->setbank_account($payment->getNnAccountNumber())
213
+ ->setbank_code($payment->getNnBankSortingCode())*/
214
+ $request->setkey(self::KEY);
215
+ $request->setinvoice_type(self::PAYMENT_METHOD);
216
+ return $request;
217
+ }
218
+
219
+ protected function _postRequest(Varien_Object $request, Varien_Object $payment)
220
+ {
221
+ $result = Mage::getModel('novalnet/novalnet_result');
222
+
223
+ $client = new Varien_Http_Client();
224
+
225
+ $uri = $this->getConfigData('cgi_url');
226
+ $client->setUri($uri ? $uri : self::CGI_URL);
227
+ $client->setConfig(array(
228
+ 'maxredirects'=>0,
229
+ 'timeout'=>30,
230
+ //'ssltransport' => 'tcp',
231
+ ));
232
+ $request->toLatin1();
233
+ $client->setParameterPost($request->getData());
234
+ $client->setMethod(Zend_Http_Client::POST);
235
+ try {
236
+ $response = $client->request();
237
+ } catch (Exception $e) {
238
+ $result->setResponseCode(-1)
239
+ ->setResponseReasonCode($e->getCode())
240
+ ->setResponseReasonText($e->getMessage());
241
+ Mage::throwException(
242
+ Mage::helper('novalnet')->__('Gateway request error: %s', $e->getMessage())
243
+ );
244
+ }
245
+
246
+ $responseBody = $response->getBody();
247
+
248
+ $r = explode(self::RESPONSE_DELIM_CHAR, $responseBody);
249
+
250
+ if ($r) {
251
+ foreach($r as $key => $value)
252
+ {
253
+ if($value!="")
254
+ {
255
+ $aryKeyVal = explode("=",$value);
256
+ $aryResponse[$aryKeyVal[0]] = $aryKeyVal[1];
257
+ }
258
+ }
259
+
260
+ if (isset($aryResponse['status'])){
261
+ $result->setStatus($aryResponse['status']);
262
+ }
263
+ if (isset($aryResponse['tid'])){
264
+ $result->setTid($aryResponse['tid']);
265
+ }
266
+ if (isset($aryResponse['status_desc'])){
267
+ $result->setStatusDesc($aryResponse['status_desc']);
268
+ }
269
+
270
+ } else {
271
+ Mage::throwException(
272
+ Mage::helper('novalnet')->__('Error in payment gateway')
273
+ );
274
+ }
275
+ $result->toUtf8();
276
+ #$this->debug2($result,$aryResponse);
277
+ $note = $this->getNote($aryResponse);
278
+ $order = $payment->getOrder();
279
+ $order->setCustomerNote($note);
280
+ $order->setCustomerNoteNotify(true);
281
+ #Mage::throwException($order->getEmailCustomerNote());#todo:
282
+ #$fh = fopen('/temp/magento2.txt', 'w');fwrite($fh, $note);
283
+ return $result;
284
+ }
285
+
286
+
287
+ public function assignData($data)
288
+ {
289
+ if (!($data instanceof Varien_Object)) {
290
+ $data = new Varien_Object($data);
291
+ }
292
+ $info=$this->getInfoInstance();
293
+ $info->setNnElvCountry($data->getElvCountry())
294
+ ->setNnAccountHolder($data->getAccountHolder())
295
+ ->setNnAccountNumber($data->getAccountNumber())
296
+ ->setNnBankSortingCode($data->getBankSortingCode());
297
+ return $this;
298
+ }
299
+ /**
300
+ * Get checkout
301
+ *
302
+ * @return Mage_Sales_Model_Quote
303
+ */
304
+ public function getQuote()
305
+ {
306
+ if (empty($this->_quote)) {
307
+ $this->_quote = $this->getCheckout()->getQuote();
308
+ }
309
+ return $this->_quote;
310
+ }
311
+ /**
312
+ * Get checkout
313
+ *
314
+ * @return Mage_Sales_Model_Order
315
+ */
316
+ public function getCheckout()
317
+ {
318
+ if (empty($this->_checkout)) {
319
+ //$this->_checkout = Mage::getSingleton('checkout/type_multishipping');
320
+ $this->_checkout = Mage::getSingleton('checkout/session');
321
+ }
322
+ return $this->_checkout;
323
+ }
324
+
325
+ public function getTitle()
326
+ {
327
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
328
+ }
329
+
330
+ public function validate()
331
+ {
332
+ parent::validate();
333
+ $info = $this->getInfoInstance();
334
+ $nnAccountNumber = $info->getNnAccountNumber();
335
+ $nnBankSortingCode = $info->getNnBankSortingCode();
336
+ $nnAccountNumber = preg_replace('/[\-\s]+/', '', $nnAccountNumber);
337
+ $info->setNnAccountNumber($nnAccountNumber);
338
+ $nnBankSortingCode = preg_replace('/[\-\s]+/', '', $nnBankSortingCode);
339
+ $info->setNnBankSortingCode($nnBankSortingCode);
340
+ if (preg_match("/\D/",$nnAccountNumber)){
341
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid account number.'));
342
+ }
343
+ if (preg_match("/\D/",$nnBankSortingCode)){
344
+ Mage::throwException(Mage::helper('novalnet')->__('This is not a valid bank sorting code.'));
345
+ }
346
+ return $this;
347
+ }
348
+ public function isPublicIP($value)
349
+ {
350
+ if(!$value || count(explode('.',$value))!=4)
351
+ {
352
+ return false;
353
+ }
354
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
355
+ }
356
+ public function getRealIpAddr()
357
+ {
358
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
359
+ {
360
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
361
+ }
362
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
363
+ {
364
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
365
+ }
366
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
367
+ {
368
+ return $_SERVER['HTTP_CLIENT_IP'];
369
+ }
370
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
371
+ {
372
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
373
+ }
374
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
375
+ {
376
+ return $_SERVER['HTTP_FORWARDED_FOR'];
377
+ }
378
+ return $_SERVER['REMOTE_ADDR'];
379
+ }
380
+ public function getAmount4Request($amount)
381
+ {
382
+ if(preg_match('/[,.]$/', $amount))
383
+ {
384
+ $amount = $amount . '00';
385
+ }
386
+ else if(preg_match('/[,.][0-9]$/', $amount))
387
+ {
388
+ $amount = $amount . '0';
389
+ }
390
+ $orig_amount = $amount;
391
+
392
+ $amount = str_replace(array('.', ','), array('',''), $amount);
393
+ return$amount;
394
+ }
395
+ public function getNote($aryResponse)
396
+ {
397
+ #todo: Kontoinhaber fehlt
398
+ $note = Mage::helper('novalnet')->__('Please transfer the amount to following account').":<br /><br />\n\n";
399
+
400
+ $note.= Mage::helper('novalnet')->__('Account Holder2').": NOVALNET AG<br />\n";
401
+ $note.= Mage::helper('novalnet')->__('Account Number').": ".$aryResponse['invoice_account']."<br />\n";
402
+ $note.= Mage::helper('novalnet')->__('Bank Sorting Code').": ".$aryResponse['invoice_bankcode']."<br />\n";
403
+ $note.= Mage::helper('novalnet')->__('Bank').": ".$aryResponse['invoice_bankname'].', Muenchen<br /><br />'."\n\n"; #.$aryResponse['invoice_bankplace']."\n\n";
404
+
405
+ $note.= "IBAN: ".$aryResponse['invoice_iban']."<br />\n";
406
+ $note.= "SWIFT / BIC: ".$aryResponse['invoice_bic']."<br /><br />\n\n";
407
+
408
+ $note.= Mage::helper('novalnet')->__('Amount').": ".str_replace('.', ',', $aryResponse['amount'])." EUR<br />\n";
409
+ $note.= Mage::helper('novalnet')->__('Reference').": TID ".$aryResponse['tid']."<br />\n";
410
+ $note.= Mage::helper('novalnet')->__('Please note that the Transfer can only be identified with the above mentioned Reference').'.';
411
+ return$note;
412
+ }
413
+
414
+ public function debug2($o, $aryResponse)
415
+ {
416
+ $t = '';
417
+ $fh = fopen('/temp/magento.txt', 'w');
418
+ fwrite($fh, serialize($o));
419
+ fclose($fh);
420
+ }
421
+ }
app/code/community/Mage/Novalnet/Model/NovalnetSecure.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+
30
+ class Mage_Novalnet_Model_NovalnetSecure extends Mage_Payment_Model_Method_Cc
31
+ {
32
+ const CGI_URL = 'https://payport.novalnet.de/global_pci_payport';
33
+ const RESPONSE_DELIM_CHAR = '&';
34
+ const RESPONSE_CODE_APPROVED = 100;
35
+ /**
36
+ * unique internal payment method identifier
37
+ *
38
+ * @var string [a-z0-9_]
39
+ */
40
+ protected $_code = 'novalnet_secure';
41
+ protected $_formBlockType = 'novalnet/cc_form';
42
+ protected $_infoBlockType = 'novalnet/cc_info';
43
+
44
+
45
+ /**
46
+ * Is this payment method a gateway (online auth/charge) ?
47
+ */
48
+ protected $_isGateway = true;
49
+
50
+ /**
51
+ * Can authorize online?
52
+ */
53
+ protected $_canAuthorize = true;
54
+
55
+ /**
56
+ * Can capture funds online?
57
+ */
58
+ protected $_canCapture = false;
59
+
60
+ /**
61
+ * Can capture partial amounts online?
62
+ */
63
+ protected $_canCapturePartial = true;
64
+
65
+ /**
66
+ * Can refund online?
67
+ */
68
+ protected $_canRefund = false;
69
+
70
+ /**
71
+ * Can void transactions online?
72
+ */
73
+ protected $_canVoid = false;
74
+
75
+ /**
76
+ * Can use this payment method in administration panel?
77
+ */
78
+ protected $_canUseInternal = true;
79
+
80
+ /**
81
+ * Can show this payment method as an option on checkout payment page?
82
+ */
83
+ protected $_canUseCheckout = true;
84
+
85
+ /**
86
+ * Is this payment method suitable for multi-shipping checkout?
87
+ */
88
+ protected $_canUseForMultishipping = false;
89
+
90
+ /**
91
+ * Can save credit card information for future processing?
92
+ */
93
+ protected $_canSaveCc = false;
94
+
95
+ /**
96
+ * Here you will need to implement authorize, capture and void public methods
97
+ *
98
+ * @see examples of transaction specific public methods such as
99
+ * authorize, capture and void in Mage_Paygate_Model_Authorizenet
100
+ */
101
+ public function authorize(Varien_Object $payment, $amount)
102
+ {
103
+ return $this;
104
+ }
105
+ public function capture(Varien_Object $payment, $amount)
106
+ {
107
+ $session = Mage::getSingleton('checkout/session');
108
+ $session->setCcNumber(Mage::helper('core')->encrypt($payment->getCcNumber()));
109
+ $session->setCcCid(Mage::helper('core')->encrypt($payment->getCcCid()));
110
+ return $this;
111
+ }
112
+ public function refund(Varien_Object $payment, $amount)
113
+ {
114
+ return $this;
115
+ }
116
+
117
+ public function void(Varien_Object $payment)
118
+ {
119
+ return $this;
120
+ }
121
+ /**
122
+ * Prepare request to gateway
123
+ *
124
+ * @link http://www.authorize.net/support/AIM_guide.pdf
125
+ * @param Mage_Sales_Model_Document $order
126
+ * @return unknown
127
+ */
128
+
129
+
130
+
131
+ public function getBookingReference()
132
+ {
133
+ return $this->getConfigData('booking_reference');
134
+ }
135
+
136
+
137
+ public function getTitle()
138
+ {
139
+ return Mage::helper('novalnet')->__($this->getConfigData('title'));
140
+ }
141
+
142
+ public function getOrder()
143
+ {
144
+ if (!$this->_order) {
145
+ $paymentInfo = $this->getInfoInstance();
146
+ $this->_order = Mage::getModel('sales/order')
147
+ ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
148
+ }
149
+ return $this->_order;
150
+ }
151
+
152
+ public function getFormFields()
153
+ {
154
+ $billing = $this->getOrder()->getBillingAddress();
155
+ $payment = $this->getOrder()->getPayment();
156
+ $fieldsArr = array();
157
+ $session = Mage::getSingleton('checkout/session');
158
+ $paymentInfo = $this->getInfoInstance();
159
+ $order = $this->getOrder();
160
+ $fieldsArr['vendor'] = $this->getConfigData('merchant_id');
161
+ $fieldsArr['auth_code'] = $this->getConfigData('auth_code');
162
+ $fieldsArr['key'] = 6;
163
+ $fieldsArr['product'] = $this->getConfigData('product_id');
164
+ $fieldsArr['tariff'] = $this->getConfigData('tariff_id');
165
+ $fieldsArr['amount'] = ($order->getBaseGrandTotal()*100);
166
+
167
+ $fieldsArr['currency'] = $order->getOrderCurrencyCode();
168
+ $fieldsArr['first_name'] = $billing->getFirstname();
169
+ $fieldsArr['last_name'] = $billing->getLastname();
170
+ $fieldsArr['email'] = $this->getOrder()->getCustomerEmail();
171
+ $fieldsArr['street'] = $billing->getStreet(1);
172
+ $fieldsArr['search_in_street'] = 1;
173
+ $fieldsArr['city'] = $billing->getCity();
174
+ $fieldsArr['zip'] = $billing->getPostcode();
175
+ $fieldsArr['country_code'] = $billing->getCountry();
176
+ $fieldsArr['lang'] = $billing->getLang();
177
+ #$fieldsArr['remote_ip'] = $order->getRemoteIp();
178
+ $fieldsArr['remote_ip'] = $this->getRealIpAddr();
179
+ $fieldsArr['tel'] = $billing->getTelephone();
180
+ $fieldsArr['fax'] = $billing->getFax();
181
+ $fieldsArr['birth_date'] = $order->getRemoteIp();
182
+ $fieldsArr['session'] = session_id();
183
+ $fieldsArr['cc_holder'] = $payment->getCcOwner();
184
+ $fieldsArr['cc_no'] = Mage::helper('core')->decrypt($session->getCcNumber()) ;
185
+ $fieldsArr['cc_exp_month'] = $payment->getCcExpMonth();
186
+ $fieldsArr['cc_exp_year'] = $payment->getCcExpYear();
187
+ $fieldsArr['cc_cvc2'] = Mage::helper('core')->decrypt($session->getCcCid());
188
+ $fieldsArr['return_url'] = Mage::getUrl('novalnet/secure/success', array('_secure' => true));
189
+ $fieldsArr['return_method'] = 'POST';
190
+ $fieldsArr['error_return_url'] = Mage::getUrl('novalnet/secure/success', array('_secure' => true));;
191
+ $fieldsArr['error_return_method'] = 'POST';
192
+ $fieldsArr['input1']= 'order_id';
193
+ $fieldsArr['inputval1'] = $paymentInfo->getOrder()->getRealOrderId();
194
+ $session->setCcNumber('');
195
+ $session->setCcCid();
196
+ $request = '';
197
+ foreach ($fieldsArr as $k=>$v) {
198
+ $request .= '<' . $k . '>' . $v . '</' . $k . '>';
199
+ }
200
+ return $fieldsArr;
201
+ }
202
+
203
+ public function getOrderPlaceRedirectUrl()
204
+ {
205
+ return Mage::getUrl('novalnet/secure/redirect');
206
+ }
207
+
208
+ public function getNovalnetSecureUrl()
209
+ {
210
+ return self::CGI_URL;
211
+ }
212
+ public function isPublicIP($value)
213
+ {
214
+ if(!$value || count(explode('.',$value))!=4)
215
+ {
216
+ return false;
217
+ }
218
+ return !preg_match('~^((0|10|172\.16|192\.168|169\.254|255|127\.0)\.)~', $value);
219
+ }
220
+ public function getRealIpAddr()
221
+ {
222
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_X_FORWARDED_FOR']))
223
+ {
224
+ return $_SERVER['HTTP_X_FORWARDED_FOR'];
225
+ }
226
+ if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) and $iplist=explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']))
227
+ {
228
+ if($this->isPublicIP($iplist[0])) return $iplist[0];
229
+ }
230
+ if (isset($_SERVER['HTTP_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_CLIENT_IP']))
231
+ {
232
+ return $_SERVER['HTTP_CLIENT_IP'];
233
+ }
234
+ if (isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) and $this->isPublicIP($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))
235
+ {
236
+ return $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];
237
+ }
238
+ if (isset($_SERVER['HTTP_FORWARDED_FOR']) and $this->isPublicIP($_SERVER['HTTP_FORWARDED_FOR']) )
239
+ {
240
+ return $_SERVER['HTTP_FORWARDED_FOR'];
241
+ }
242
+ return $_SERVER['REMOTE_ADDR'];
243
+ }
244
+ }
app/code/community/Mage/Novalnet/controllers/SecureController.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Mage_Novalnet_SecureController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ protected function _expireAjax()
5
+ {
6
+ if (!$this->getCheckout()->getQuote()->hasItems()) {
7
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
8
+ exit;
9
+ }
10
+ }
11
+
12
+ /**
13
+ * Redirect Block
14
+ * need to be redeclared
15
+ */
16
+ protected $_redirectBlockType = 'novalnet/secure_redirect';
17
+
18
+ /**
19
+ * Get singleton of Checkout Session Model
20
+ *
21
+ * @return Mage_Checkout_Model_Session
22
+ */
23
+ public function getCheckout()
24
+ {
25
+ return Mage::getSingleton('checkout/session');
26
+ }
27
+
28
+ /**
29
+ * when customer select novalnet payment method
30
+ */
31
+ public function redirectAction()
32
+ {
33
+ $session = $this->getCheckout();
34
+ $session->setNovalnetQuoteId($session->getQuoteId());
35
+ $session->setNovalnetRealOrderId($session->getLastRealOrderId());
36
+
37
+ $order = Mage::getModel('sales/order');
38
+ $order->loadByIncrementId($session->getLastRealOrderId());
39
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnet')->__('Customer was redirected to Novalnet.'));
40
+ $order->save();
41
+
42
+ $this->getResponse()->setBody(
43
+ $this->getLayout()
44
+ ->createBlock($this->_redirectBlockType)
45
+ ->setOrder($order)
46
+ ->toHtml()
47
+ );
48
+
49
+ $session->unsQuoteId();
50
+ }
51
+
52
+ /**
53
+ * novalnet returns POST variables to this action
54
+ */
55
+ public function successAction()
56
+ {
57
+ $status = $this->_checkReturnedPost();
58
+
59
+ $session = $this->getCheckout();
60
+
61
+ $session->unsNovalnetRealOrderId();
62
+ $session->setQuoteId($session->getNovalnetQuoteId(true));
63
+ $session->getQuote()->setIsActive(false)->save();
64
+
65
+ $order = Mage::getModel('sales/order');
66
+ $order->load($this->getCheckout()->getLastOrderId());
67
+ if($order->getId()) {
68
+ $order->sendNewOrderEmail();
69
+ }
70
+
71
+ if ($status) {
72
+ $this->_redirect('checkout/onepage/success');
73
+ } else {
74
+ $this->_redirect('*/*/failure');
75
+ }
76
+ }
77
+
78
+ /**
79
+ * Display failure page if error
80
+ *
81
+ */
82
+ public function failureAction()
83
+ {
84
+ if (!$this->getCheckout()->getNovalnetErrorMessage()) {
85
+ $this->norouteAction();
86
+ return;
87
+ }
88
+
89
+ $this->getCheckout()->clear();
90
+
91
+ $this->loadLayout();
92
+ $this->renderLayout();
93
+ }
94
+
95
+ /**
96
+ * Checking POST variables.
97
+ * Creating invoice if payment was successfull or cancel order if payment was declined
98
+ */
99
+ protected function _checkReturnedPost()
100
+ {
101
+ if (!$this->getRequest()->isPost()) {
102
+ $this->norouteAction();
103
+ return;
104
+ }
105
+ $status = true;
106
+ $response = $this->getRequest()->getPost();
107
+ //error_log(print_r($response,true),3,'/tmp/magento_response.log');
108
+
109
+ $order = Mage::getModel('sales/order');
110
+ $order->loadByIncrementId($response['inputval1']);
111
+ $payment = $order->getPayment();
112
+ $paymentInst = $payment->getMethodInstance();
113
+
114
+ $paymentInst->setResponse($response);
115
+
116
+ if ($response['status'] == 100 ) {
117
+
118
+ // if ($order->canInvoice()) {
119
+ $invoice = $order->prepareInvoice();
120
+ $invoice->register()->capture();
121
+ Mage::getModel('core/resource_transaction')
122
+ ->addObject($invoice)
123
+ ->addObject($invoice->getOrder())
124
+ ->save();
125
+
126
+ $paymentInst->setTransactionId($response['tid']);
127
+ $payment->setLastTransId($response['tid']);
128
+ $payment->setCcTransId($response['tid']);
129
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnet')->__('Customer successfully returned from Novalnet'));
130
+ //}
131
+ } else {
132
+ $paymentInst->setTransactionId($response['tid']);
133
+ $payment->setLastTransId($response['tid']);
134
+ $payment->setCcTransId($response['tid']);
135
+ $order->cancel();
136
+ $order->addStatusToHistory($order->getStatus(), Mage::helper('novalnet')->__('Customer was rejected by Novalnet'));
137
+ $status = false;
138
+ $this->getCheckout()->setNovalnetErrorMessage($response['status_text']);
139
+ }
140
+
141
+ $order->save();
142
+
143
+ return $status;
144
+ }
145
+
146
+ }
147
+ ?>
app/code/community/Mage/Novalnet/etc/config.xml ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <global>
4
+ <!-- declare model group for new module -->
5
+ <models>
6
+ <!-- model group alias to be used in Mage::getModel('newmodule/...') -->
7
+ <novalnet>
8
+ <!-- base class name for the model group -->
9
+ <class>Mage_Novalnet_Model</class>
10
+ </novalnet>
11
+ </models>
12
+ <fieldsets>
13
+ <sales_convert_quote_payment>
14
+ <nn_account_number>
15
+ <to_order_payment>*</to_order_payment>
16
+ </nn_account_number>
17
+ <nn_bank_sorting_code>
18
+ <to_order_payment>*</to_order_payment>
19
+ </nn_bank_sorting_code>
20
+ <nn_account_holder>
21
+ <to_order_payment>*</to_order_payment>
22
+ </nn_account_holder>
23
+ <nn_elv_country>
24
+ <to_order_payment>*</to_order_payment>
25
+ </nn_elv_country>
26
+ <id><to_order_payment>nn_id</to_order_payment></id>
27
+ </sales_convert_quote_payment>
28
+
29
+ <sales_convert_order_payment>
30
+ <nn_account_number>
31
+ <to_quote_payment>*</to_quote_payment>
32
+ </nn_account_number>
33
+ <nn_bank_sorting_code>
34
+ <to_quote_payment>*</to_quote_payment>
35
+ </nn_bank_sorting_code>
36
+ <nn_account_holder>
37
+ <to_quote_payment>*</to_quote_payment>
38
+ </nn_account_holder>
39
+ <nn_elv_country>
40
+ <to_quote_payment>*</to_quote_payment>
41
+ </nn_elv_country>
42
+ </sales_convert_order_payment>
43
+ </fieldsets>
44
+ <models>
45
+ <novalnet>
46
+ <class>Mage_Novalnet_Model</class>
47
+ </novalnet>
48
+ </models>
49
+ <!-- declare resource setup for new module -->
50
+ <resources>
51
+ <!-- resource identifier -->
52
+ <novalnet_setup>
53
+ <!-- specify that this resource is a setup resource and used for upgrades -->
54
+ <setup>
55
+ <!-- which module to look for install/upgrade files in -->
56
+ <module>Mage_Novalnet</module>
57
+ </setup>
58
+ <!-- specify database connection for this resource -->
59
+ <connection>
60
+ <!-- do not create new connection, use predefined core setup connection -->
61
+ <use>core_setup</use>
62
+ </connection>
63
+ </novalnet_setup>
64
+ <novalnet_write>
65
+ <use>core_write</use>
66
+ </novalnet_write>
67
+ <novalnet_read>
68
+ <use>core_read</use>
69
+ </novalnet_read>
70
+ </resources>
71
+ <helpers>
72
+ <novalnet>
73
+ <class>Mage_Novalnet_Helper</class>
74
+ </novalnet>
75
+ </helpers>
76
+ </global>
77
+
78
+ <adminhtml>
79
+ <translate>
80
+ <modules>
81
+ <Mage_Novalnet>
82
+ <files>
83
+ <default>Mage_Novalnet.csv</default>
84
+ </files>
85
+ </Mage_Novalnet>
86
+ </modules>
87
+ </translate>
88
+ </adminhtml>
89
+
90
+ <frontend>
91
+ <routers>
92
+ <novalnet_secure>
93
+ <use>standard</use>
94
+ <args>
95
+ <module>Mage_Novalnet</module>
96
+ <frontName>novalnet</frontName>
97
+ </args>
98
+ </novalnet_secure>
99
+ </routers>
100
+ <translate>
101
+ <modules>
102
+ <Mage_Novalnet>
103
+ <files>
104
+ <default>Mage_Novalnet.csv</default>
105
+ </files>
106
+ </Mage_Novalnet>
107
+ </modules>
108
+ </translate>
109
+ </frontend>
110
+
111
+ <!-- declare default configuration values for this module -->
112
+ <default>
113
+ <!-- 'payment' configuration section (tab) -->
114
+ <payment>
115
+ <!-- 'novalnet' configuration group (fieldset) -->
116
+ <novalnetCc>
117
+ <cctypes>VI,MC</cctypes>
118
+ <!-- by default this payment method is inactive -->
119
+ <active>1</active>
120
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
121
+ <!-- model to handle logic for this payment method -->
122
+ <model>novalnet/novalnetCc</model>
123
+ <!-- order status for new orders paid by this payment method -->
124
+ <order_status>1</order_status>
125
+ <payment_action>authorize_capture</payment_action>
126
+ <allowspecific>0</allowspecific>
127
+ <!-- default title for payment checkout page and order view page -->
128
+ <title>Credit Card</title>
129
+ </novalnetCc>
130
+ <novalnet_secure>
131
+ <cctypes>VI,MC</cctypes>
132
+ <!-- by default this payment method is inactive -->
133
+ <active>1</active>
134
+ <cgi_url>https://payport.novalnet.de/global_pci_payport</cgi_url>
135
+ <!-- model to handle logic for this payment method -->
136
+ <model>novalnet/novalnetSecure</model>
137
+ <!-- order status for new orders paid by this payment method -->
138
+ <order_status>1</order_status>
139
+ <payment_action>authorize_capture</payment_action>
140
+ <allowspecific>0</allowspecific>
141
+ <!-- default title for payment checkout page and order view page -->
142
+ <title>Credit Card</title>
143
+ </novalnet_secure>
144
+ <novalnetElvgerman>
145
+ <!-- by default this payment method is inactive -->
146
+ <active>1</active>
147
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
148
+ <!-- model to handle logic for this payment method -->
149
+ <model>novalnet/novalnetElvgerman</model>
150
+ <payment_action>authorize_capture</payment_action>
151
+ <!-- order status for new orders paid by this payment method -->
152
+ <order_status>1</order_status>
153
+ <allowspecific>0</allowspecific>
154
+ <!-- default title for payment checkout page and order view page -->
155
+ <title>Direct Debit German</title>
156
+ </novalnetElvgerman>
157
+ <novalnetElvaustria>
158
+ <!-- by default this payment method is inactive -->
159
+ <active>1</active>
160
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
161
+ <!-- model to handle logic for this payment method -->
162
+ <model>novalnet/novalnetElvaustria</model>
163
+ <payment_action>authorize_capture</payment_action>
164
+ <!-- order status for new orders paid by this payment method -->
165
+ <order_status>1</order_status>
166
+ <allowspecific>0</allowspecific>
167
+ <!-- default title for payment checkout page and order view page -->
168
+ <title>Direct Debit Austria</title>
169
+ </novalnetElvaustria>
170
+ <novalnetPrepayment>
171
+ <!-- by default this payment method is inactive -->
172
+ <active>1</active>
173
+ <prepaymentcountries>DE,AT</prepaymentcountries>
174
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
175
+ <!-- model to handle logic for this payment method -->
176
+ <model>novalnet/novalnetPrepayment</model>
177
+ <payment_action>authorize_capture</payment_action>
178
+ <!-- order status for new orders paid by this payment method -->
179
+ <order_status>pending</order_status>
180
+ <allowspecific>0</allowspecific>
181
+ <!-- default title for payment checkout page and order view page -->
182
+ <title>Prepayment</title>
183
+ </novalnetPrepayment>
184
+ <novalnetInvoice>
185
+ <!-- by default this payment method is inactive -->
186
+ <active>1</active>
187
+ <invoicecountries>DE,AT</invoicecountries>
188
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
189
+ <!-- model to handle logic for this payment method -->
190
+ <model>novalnet/novalnetInvoice</model>
191
+ <payment_action>authorize_capture</payment_action>
192
+ <!-- order status for new orders paid by this payment method -->
193
+ <order_status>pending</order_status>
194
+ <allowspecific>0</allowspecific>
195
+ <!-- default title for payment checkout page and order view page -->
196
+ <title>Invoice</title>
197
+ </novalnetInvoice>
198
+ <novalnetPhonepayment>
199
+ <!-- by default this payment method is inactive -->
200
+ <active>1</active>
201
+ <Phonepaymentcountries>DE,AT</Phonepaymentcountries>
202
+ <cgi_url>https://payport.novalnet.de/paygate.jsp</cgi_url>
203
+ <!-- model to handle logic for this payment method -->
204
+ <model>novalnet/novalnetPhonepayment</model>
205
+ <payment_action>authorize_capture</payment_action>
206
+ <!-- order status for new orders paid by this payment method -->
207
+ <order_status>1</order_status>
208
+ <allowspecific>0</allowspecific>
209
+ <!-- default title for payment checkout page and order view page -->
210
+ <title>Phonepayment</title>
211
+ </novalnetPhonepayment>
212
+ </payment>
213
+ </default>
214
+ </config>
app/code/community/Mage/Novalnet/etc/system.xml ADDED
@@ -0,0 +1,665 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <!-- payment tab -->
5
+ <payment>
6
+ <groups>
7
+ <novalnetElvgerman translate="label" module="novalnet">
8
+ <!-- will have title 'New Module' -->
9
+ <label>Direct Debit German</label>
10
+ <!-- position between other payment methods -->
11
+ <sort_order>680</sort_order>
12
+ <!-- do not show this configuration options in store scope -->
13
+ <show_in_default>1</show_in_default>
14
+ <show_in_website>1</show_in_website>
15
+ <show_in_store>0</show_in_store>
16
+ <fields>
17
+ <!-- is this payment method active for the website? -->
18
+ <active translate="label">
19
+ <!-- label for the field -->
20
+ <label>Enabled</label>
21
+ <!-- input type for configuration value -->
22
+ <frontend_type>select</frontend_type>
23
+ <!-- model to take the option values from -->
24
+ <source_model>adminhtml/system_config_source_yesno</source_model>
25
+ <!-- field position -->
26
+ <sort_order>1</sort_order>
27
+ <!-- do not show this field in store scope -->
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>0</show_in_store>
31
+ </active>
32
+ <order_status translate="label">
33
+ <label>New order status</label>
34
+ <frontend_type>select</frontend_type>
35
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
36
+ <sort_order>4</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>0</show_in_store>
40
+ </order_status>
41
+ <title translate="label">
42
+ <label>Title</label>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>2</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>0</show_in_store>
48
+ </title>
49
+ <merchant_id translate="label">
50
+ <label>Novalnet Merchant ID</label>
51
+ <frontend_type>text</frontend_type>
52
+ <sort_order>5</sort_order>
53
+ <show_in_default>1</show_in_default>
54
+ <show_in_website>1</show_in_website>
55
+ <show_in_store>0</show_in_store>
56
+ </merchant_id>
57
+ <auth_code translate="label">
58
+ <label>Novalnet Auth Code</label>
59
+ <frontend_type>text</frontend_type>
60
+ <sort_order>6</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>0</show_in_store>
64
+ </auth_code>
65
+ <product_id translate="label">
66
+ <label>Novalnet Product ID</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>7</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>0</show_in_store>
72
+ </product_id>
73
+ <tariff_id translate="label">
74
+ <label>Novalnet Tariff ID</label>
75
+ <frontend_type>text</frontend_type>
76
+ <sort_order>8</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>0</show_in_store>
80
+ </tariff_id>
81
+ <acdc_check translate="label">
82
+ <label>ACDC Check</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>adminhtml/system_config_source_yesno</source_model>
85
+ <sort_order>12</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>0</show_in_store>
89
+ </acdc_check>
90
+ <user_group_excluded translate="label">
91
+ <label>User Group Excluded</label>
92
+ <frontend_type>text</frontend_type>
93
+ <sort_order>13</sort_order>
94
+ <show_in_default>1</show_in_default>
95
+ <show_in_website>1</show_in_website>
96
+ <show_in_store>0</show_in_store>
97
+ </user_group_excluded>
98
+ <comment translate="label">
99
+ <label>Notice for Clients</label>
100
+ <frontend_type>textarea</frontend_type>
101
+ <sort_order>14</sort_order>
102
+ <show_in_default>1</show_in_default>
103
+ <show_in_website>1</show_in_website>
104
+ <show_in_store>0</show_in_store>
105
+ </comment>
106
+ </fields>
107
+ </novalnetElvgerman>
108
+ <novalnetElvaustria translate="label" module="novalnet">
109
+ <!-- will have title 'New Module' -->
110
+ <label>Direct Debit Austria</label>
111
+ <!-- position between other payment methods -->
112
+ <sort_order>681</sort_order>
113
+ <!-- do not show this configuration options in store scope -->
114
+ <show_in_default>1</show_in_default>
115
+ <show_in_website>1</show_in_website>
116
+ <show_in_store>0</show_in_store>
117
+ <fields>
118
+ <!-- is this payment method active for the website? -->
119
+ <active translate="label">
120
+ <!-- label for the field -->
121
+ <label>Enabled</label>
122
+ <!-- input type for configuration value -->
123
+ <frontend_type>select</frontend_type>
124
+ <!-- model to take the option values from -->
125
+ <source_model>adminhtml/system_config_source_yesno</source_model>
126
+ <!-- field position -->
127
+ <sort_order>1</sort_order>
128
+ <!-- do not show this field in store scope -->
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>1</show_in_website>
131
+ <show_in_store>0</show_in_store>
132
+ </active>
133
+ <order_status translate="label">
134
+ <label>New order status</label>
135
+ <frontend_type>select</frontend_type>
136
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
137
+ <sort_order>4</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>0</show_in_store>
141
+ </order_status>
142
+ <title translate="label">
143
+ <label>Title</label>
144
+ <frontend_type>text</frontend_type>
145
+ <sort_order>2</sort_order>
146
+ <show_in_default>1</show_in_default>
147
+ <show_in_website>1</show_in_website>
148
+ <show_in_store>0</show_in_store>
149
+ </title>
150
+ <merchant_id translate="label">
151
+ <label>Novalnet Merchant ID</label>
152
+ <frontend_type>text</frontend_type>
153
+ <sort_order>5</sort_order>
154
+ <show_in_default>1</show_in_default>
155
+ <show_in_website>1</show_in_website>
156
+ <show_in_store>0</show_in_store>
157
+ </merchant_id>
158
+ <auth_code translate="label">
159
+ <label>Novalnet Auth Code</label>
160
+ <frontend_type>text</frontend_type>
161
+ <sort_order>6</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>0</show_in_store>
165
+ </auth_code>
166
+ <product_id translate="label">
167
+ <label>Novalnet Product ID</label>
168
+ <frontend_type>text</frontend_type>
169
+ <sort_order>7</sort_order>
170
+ <show_in_default>1</show_in_default>
171
+ <show_in_website>1</show_in_website>
172
+ <show_in_store>0</show_in_store>
173
+ </product_id>
174
+ <tariff_id translate="label">
175
+ <label>Novalnet Tariff ID</label>
176
+ <frontend_type>text</frontend_type>
177
+ <sort_order>8</sort_order>
178
+ <show_in_default>1</show_in_default>
179
+ <show_in_website>1</show_in_website>
180
+ <show_in_store>0</show_in_store>
181
+ </tariff_id>
182
+ <user_group_excluded translate="label">
183
+ <label>User Group Excluded</label>
184
+ <frontend_type>text</frontend_type>
185
+ <sort_order>12</sort_order>
186
+ <show_in_default>1</show_in_default>
187
+ <show_in_website>1</show_in_website>
188
+ <show_in_store>0</show_in_store>
189
+ </user_group_excluded>
190
+ <comment translate="label">
191
+ <label>Notice for Clients</label>
192
+ <frontend_type>textarea</frontend_type>
193
+ <sort_order>13</sort_order>
194
+ <show_in_default>1</show_in_default>
195
+ <show_in_website>1</show_in_website>
196
+ <show_in_store>0</show_in_store>
197
+ </comment>
198
+ </fields>
199
+ </novalnetElvaustria>
200
+ <novalnetCc translate="label" module="novalnet">
201
+ <!-- will have title 'New Module' -->
202
+ <label>Credit Card</label>
203
+ <!-- position between other payment methods -->
204
+ <sort_order>682</sort_order>
205
+ <!-- do not show this configuration options in store scope -->
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>0</show_in_store>
209
+ <fields>
210
+ <!-- is this payment method active for the website? -->
211
+ <active translate="label">
212
+ <!-- label for the field -->
213
+ <label>Enabled</label>
214
+ <!-- input type for configuration value -->
215
+ <frontend_type>select</frontend_type>
216
+ <!-- model to take the option values from -->
217
+ <source_model>adminhtml/system_config_source_yesno</source_model>
218
+ <!-- field position -->
219
+ <sort_order>1</sort_order>
220
+ <!-- do not show this field in store scope -->
221
+ <show_in_default>1</show_in_default>
222
+ <show_in_website>1</show_in_website>
223
+ <show_in_store>0</show_in_store>
224
+ </active>
225
+ <order_status translate="label">
226
+ <label>New order status</label>
227
+ <frontend_type>select</frontend_type>
228
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
229
+ <sort_order>4</sort_order>
230
+ <show_in_default>1</show_in_default>
231
+ <show_in_website>1</show_in_website>
232
+ <show_in_store>0</show_in_store>
233
+ </order_status>
234
+ <title translate="label">
235
+ <label>Title</label>
236
+ <frontend_type>text</frontend_type>
237
+ <sort_order>2</sort_order>
238
+ <show_in_default>1</show_in_default>
239
+ <show_in_website>1</show_in_website>
240
+ <show_in_store>0</show_in_store>
241
+ </title>
242
+ <cctypes translate="label">
243
+ <label>Credit Card Types</label>
244
+ <frontend_type>multiselect</frontend_type>
245
+ <source_model>novalnet/novalnet_source_cctype</source_model>
246
+ <sort_order>5</sort_order>
247
+ <show_in_default>1</show_in_default>
248
+ <show_in_website>1</show_in_website>
249
+ <show_in_store>0</show_in_store>
250
+ </cctypes>
251
+ <merchant_id translate="label">
252
+ <label>Novalnet Merchant ID</label>
253
+ <frontend_type>text</frontend_type>
254
+ <sort_order>6</sort_order>
255
+ <show_in_default>1</show_in_default>
256
+ <show_in_website>1</show_in_website>
257
+ <show_in_store>0</show_in_store>
258
+ </merchant_id>
259
+ <auth_code translate="label">
260
+ <label>Novalnet Auth Code</label>
261
+ <frontend_type>text</frontend_type>
262
+ <sort_order>7</sort_order>
263
+ <show_in_default>1</show_in_default>
264
+ <show_in_website>1</show_in_website>
265
+ <show_in_store>0</show_in_store>
266
+ </auth_code>
267
+ <product_id translate="label">
268
+ <label>Novalnet Product ID</label>
269
+ <frontend_type>text</frontend_type>
270
+ <sort_order>8</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>0</show_in_store>
274
+ </product_id>
275
+ <tariff_id translate="label">
276
+ <label>Novalnet Tariff ID</label>
277
+ <frontend_type>text</frontend_type>
278
+ <sort_order>9</sort_order>
279
+ <show_in_default>1</show_in_default>
280
+ <show_in_website>1</show_in_website>
281
+ <show_in_store>0</show_in_store>
282
+ </tariff_id>
283
+ <booking_reference translate="label">
284
+ <label>Booking Reference</label>
285
+ <frontend_type>text</frontend_type>
286
+ <sort_order>10</sort_order>
287
+ <show_in_default>1</show_in_default>
288
+ <show_in_website>1</show_in_website>
289
+ <show_in_store>1</show_in_store>
290
+ </booking_reference>
291
+ <user_group_excluded translate="label">
292
+ <label>User Group Excluded</label>
293
+ <frontend_type>text</frontend_type>
294
+ <sort_order>13</sort_order>
295
+ <show_in_default>1</show_in_default>
296
+ <show_in_website>1</show_in_website>
297
+ <show_in_store>0</show_in_store>
298
+ </user_group_excluded>
299
+ </fields>
300
+ </novalnetCc>
301
+ <novalnet_secure translate="label" module="novalnet">
302
+ <!-- will have title 'New Module' -->
303
+ <label>Novalnet 3D-Secure Credit Card</label>
304
+ <!-- position between other payment methods -->
305
+ <sort_order>683</sort_order>
306
+ <!-- do not show this configuration options in store scope -->
307
+ <show_in_default>1</show_in_default>
308
+ <show_in_website>1</show_in_website>
309
+ <show_in_store>0</show_in_store>
310
+ <fields>
311
+ <!-- is this payment method active for the website? -->
312
+ <active translate="label">
313
+ <!-- label for the field -->
314
+ <label>Enabled</label>
315
+ <!-- input type for configuration value -->
316
+ <frontend_type>select</frontend_type>
317
+ <!-- model to take the option values from -->
318
+ <source_model>adminhtml/system_config_source_yesno</source_model>
319
+ <!-- field position -->
320
+ <sort_order>1</sort_order>
321
+ <!-- do not show this field in store scope -->
322
+ <show_in_default>1</show_in_default>
323
+ <show_in_website>1</show_in_website>
324
+ <show_in_store>0</show_in_store>
325
+ </active>
326
+ <order_status translate="label">
327
+ <label>New order status</label>
328
+ <frontend_type>select</frontend_type>
329
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
330
+ <sort_order>4</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>0</show_in_store>
334
+ </order_status>
335
+ <title translate="label">
336
+ <label>Title</label>
337
+ <frontend_type>text</frontend_type>
338
+ <sort_order>2</sort_order>
339
+ <show_in_default>1</show_in_default>
340
+ <show_in_website>1</show_in_website>
341
+ <show_in_store>0</show_in_store>
342
+ </title>
343
+ <cctypes translate="label">
344
+ <label>Credit Card Types</label>
345
+ <frontend_type>multiselect</frontend_type>
346
+ <source_model>novalnet/novalnet_source_cctype</source_model>
347
+ <sort_order>5</sort_order>
348
+ <show_in_default>1</show_in_default>
349
+ <show_in_website>1</show_in_website>
350
+ <show_in_store>0</show_in_store>
351
+ </cctypes>
352
+ <merchant_id translate="label">
353
+ <label>Novalnet Merchant ID</label>
354
+ <frontend_type>text</frontend_type>
355
+ <sort_order>6</sort_order>
356
+ <show_in_default>1</show_in_default>
357
+ <show_in_website>1</show_in_website>
358
+ <show_in_store>0</show_in_store>
359
+ </merchant_id>
360
+ <auth_code translate="label">
361
+ <label>Novalnet Auth Code</label>
362
+ <frontend_type>text</frontend_type>
363
+ <sort_order>7</sort_order>
364
+ <show_in_default>1</show_in_default>
365
+ <show_in_website>1</show_in_website>
366
+ <show_in_store>0</show_in_store>
367
+ </auth_code>
368
+ <product_id translate="label">
369
+ <label>Novalnet Product ID</label>
370
+ <frontend_type>text</frontend_type>
371
+ <sort_order>8</sort_order>
372
+ <show_in_default>1</show_in_default>
373
+ <show_in_website>1</show_in_website>
374
+ <show_in_store>0</show_in_store>
375
+ </product_id>
376
+ <tariff_id translate="label">
377
+ <label>Novalnet Tariff ID</label>
378
+ <frontend_type>text</frontend_type>
379
+ <sort_order>9</sort_order>
380
+ <show_in_default>1</show_in_default>
381
+ <show_in_website>1</show_in_website>
382
+ <show_in_store>0</show_in_store>
383
+ </tariff_id>
384
+ <booking_reference translate="label">
385
+ <label>Booking Reference</label>
386
+ <frontend_type>text</frontend_type>
387
+ <sort_order>10</sort_order>
388
+ <show_in_default>1</show_in_default>
389
+ <show_in_website>1</show_in_website>
390
+ <show_in_store>1</show_in_store>
391
+ </booking_reference>
392
+ <user_group_excluded translate="label">
393
+ <label>User Group Excluded</label>
394
+ <frontend_type>text</frontend_type>
395
+ <sort_order>13</sort_order>
396
+ <show_in_default>1</show_in_default>
397
+ <show_in_website>1</show_in_website>
398
+ <show_in_store>0</show_in_store>
399
+ </user_group_excluded>
400
+ </fields>
401
+ </novalnet_secure>
402
+ <novalnetPrepayment translate="label" module="novalnet">
403
+ <!-- will have title 'New Module' -->
404
+ <label>Prepayment</label>
405
+ <!-- position between other payment methods -->
406
+ <sort_order>690</sort_order>
407
+ <!-- do not show this configuration options in store scope -->
408
+ <show_in_default>1</show_in_default>
409
+ <show_in_website>1</show_in_website>
410
+ <show_in_store>0</show_in_store>
411
+ <fields>
412
+ <!-- is this payment method active for the website? -->
413
+ <active translate="label">
414
+ <!-- label for the field -->
415
+ <label>Enabled</label>
416
+ <!-- input type for configuration value -->
417
+ <frontend_type>select</frontend_type>
418
+ <!-- model to take the option values from -->
419
+ <source_model>adminhtml/system_config_source_yesno</source_model>
420
+ <!-- field position -->
421
+ <sort_order>1</sort_order>
422
+ <!-- do not show this field in store scope -->
423
+ <show_in_default>1</show_in_default>
424
+ <show_in_website>1</show_in_website>
425
+ <show_in_store>0</show_in_store>
426
+ </active>
427
+ <order_status translate="label">
428
+ <label>New order status</label>
429
+ <frontend_type>select</frontend_type>
430
+ <source_model>adminhtml/system_config_source_order_status_new</source_model>
431
+ <sort_order>4</sort_order>
432
+ <show_in_default>1</show_in_default>
433
+ <show_in_website>1</show_in_website>
434
+ <show_in_store>0</show_in_store>
435
+ </order_status>
436
+ <title translate="label">
437
+ <label>Title</label>
438
+ <frontend_type>text</frontend_type>
439
+ <sort_order>2</sort_order>
440
+ <show_in_default>1</show_in_default>
441
+ <show_in_website>1</show_in_website>
442
+ <show_in_store>0</show_in_store>
443
+ </title>
444
+ <merchant_id translate="label">
445
+ <label>Novalnet Merchant ID</label>
446
+ <frontend_type>text</frontend_type>
447
+ <sort_order>5</sort_order>
448
+ <show_in_default>1</show_in_default>
449
+ <show_in_website>1</show_in_website>
450
+ <show_in_store>0</show_in_store>
451
+ </merchant_id>
452
+ <auth_code translate="label">
453
+ <label>Novalnet Auth Code</label>
454
+ <frontend_type>text</frontend_type>
455
+ <sort_order>6</sort_order>
456
+ <show_in_default>1</show_in_default>
457
+ <show_in_website>1</show_in_website>
458
+ <show_in_store>0</show_in_store>
459
+ </auth_code>
460
+ <product_id translate="label">
461
+ <label>Novalnet Product ID</label>
462
+ <frontend_type>text</frontend_type>
463
+ <sort_order>7</sort_order>
464
+ <show_in_default>1</show_in_default>
465
+ <show_in_website>1</show_in_website>
466
+ <show_in_store>0</show_in_store>
467
+ </product_id>
468
+ <tariff_id translate="label">
469
+ <label>Novalnet Tariff ID</label>
470
+ <frontend_type>text</frontend_type>
471
+ <sort_order>8</sort_order>
472
+ <show_in_default>1</show_in_default>
473
+ <show_in_website>1</show_in_website>
474
+ <show_in_store>0</show_in_store>
475
+ </tariff_id>
476
+ <user_group_excluded translate="label">
477
+ <label>User Group Excluded</label>
478
+ <frontend_type>text</frontend_type>
479
+ <sort_order>13</sort_order>
480
+ <show_in_default>1</show_in_default>
481
+ <show_in_website>1</show_in_website>
482
+ <show_in_store>0</show_in_store>
483
+ </user_group_excluded>
484
+ </fields>
485
+ </novalnetPrepayment>
486
+ <novalnetInvoice translate="label" module="novalnet">
487
+ <!-- will have title 'New Module' -->
488
+ <label>Invoice</label>
489
+ <!-- position between other payment methods -->
490
+ <sort_order>689</sort_order>
491
+ <!-- do not show this configuration options in store scope -->
492
+ <show_in_default>1</show_in_default>
493
+ <show_in_website>1</show_in_website>
494
+ <show_in_store>0</show_in_store>
495
+ <fields>
496
+ <!-- is this payment method active for the website? -->
497
+ <active translate="label">
498
+ <!-- label for the field -->
499
+ <label>Enabled</label>
500
+ <!-- input type for configuration value -->
501
+ <frontend_type>select</frontend_type>
502
+ <!-- model to take the option values from -->
503
+ <source_model>adminhtml/system_config_source_yesno</source_model>
504
+ <!-- field position -->
505
+ <sort_order>1</sort_order>
506
+ <!-- do not show this field in store scope -->
507
+ <show_in_default>1</show_in_default>
508
+ <show_in_website>1</show_in_website>
509
+ <show_in_store>0</show_in_store>
510
+ </active>
511
+ <order_status translate="label">
512
+ <label>New order status</label>
513
+ <frontend_type>select</frontend_type>
514
+ <source_model>adminhtml/system_config_source_order_status_new</source_model>
515
+ <sort_order>4</sort_order>
516
+ <show_in_default>1</show_in_default>
517
+ <show_in_website>1</show_in_website>
518
+ <show_in_store>0</show_in_store>
519
+ </order_status>
520
+ <title translate="label">
521
+ <label>Title</label>
522
+ <frontend_type>text</frontend_type>
523
+ <sort_order>2</sort_order>
524
+ <show_in_default>1</show_in_default>
525
+ <show_in_website>1</show_in_website>
526
+ <show_in_store>0</show_in_store>
527
+ </title>
528
+ <merchant_id translate="label">
529
+ <label>Novalnet Merchant ID</label>
530
+ <frontend_type>text</frontend_type>
531
+ <sort_order>5</sort_order>
532
+ <show_in_default>1</show_in_default>
533
+ <show_in_website>1</show_in_website>
534
+ <show_in_store>0</show_in_store>
535
+ </merchant_id>
536
+ <auth_code translate="label">
537
+ <label>Novalnet Auth Code</label>
538
+ <frontend_type>text</frontend_type>
539
+ <sort_order>6</sort_order>
540
+ <show_in_default>1</show_in_default>
541
+ <show_in_website>1</show_in_website>
542
+ <show_in_store>0</show_in_store>
543
+ </auth_code>
544
+ <product_id translate="label">
545
+ <label>Novalnet Product ID</label>
546
+ <frontend_type>text</frontend_type>
547
+ <sort_order>7</sort_order>
548
+ <show_in_default>1</show_in_default>
549
+ <show_in_website>1</show_in_website>
550
+ <show_in_store>0</show_in_store>
551
+ </product_id>
552
+ <tariff_id translate="label">
553
+ <label>Novalnet Tariff ID</label>
554
+ <frontend_type>text</frontend_type>
555
+ <sort_order>8</sort_order>
556
+ <show_in_default>1</show_in_default>
557
+ <show_in_website>1</show_in_website>
558
+ <show_in_store>0</show_in_store>
559
+ </tariff_id>
560
+ <payment_duration translate="label">
561
+ <label>Payment Duration</label>
562
+ <frontend_type>text</frontend_type>
563
+ <sort_order>9</sort_order>
564
+ <show_in_default>1</show_in_default>
565
+ <show_in_website>1</show_in_website>
566
+ <show_in_store>0</show_in_store>
567
+ </payment_duration>
568
+ <user_group_excluded translate="label">
569
+ <label>User Group Excluded</label>
570
+ <frontend_type>text</frontend_type>
571
+ <sort_order>13</sort_order>
572
+ <show_in_default>1</show_in_default>
573
+ <show_in_website>1</show_in_website>
574
+ <show_in_store>0</show_in_store>
575
+ </user_group_excluded>
576
+ </fields>
577
+ </novalnetInvoice>
578
+ <novalnetPhonepayment translate="label" module="novalnet">
579
+ <!-- will have title 'New Module' -->
580
+ <label>Phonepayment</label>
581
+ <!-- position between other payment methods -->
582
+ <sort_order>691</sort_order>
583
+ <!-- do not show this configuration options in store scope -->
584
+ <show_in_default>1</show_in_default>
585
+ <show_in_website>1</show_in_website>
586
+ <show_in_store>0</show_in_store>
587
+ <fields>
588
+ <!-- is this payment method active for the website? -->
589
+ <active translate="label">
590
+ <!-- label for the field -->
591
+ <label>Enabled</label>
592
+ <!-- input type for configuration value -->
593
+ <frontend_type>select</frontend_type>
594
+ <!-- model to take the option values from -->
595
+ <source_model>adminhtml/system_config_source_yesno</source_model>
596
+ <!-- field position -->
597
+ <sort_order>1</sort_order>
598
+ <!-- do not show this field in store scope -->
599
+ <show_in_default>1</show_in_default>
600
+ <show_in_website>1</show_in_website>
601
+ <show_in_store>0</show_in_store>
602
+ </active>
603
+ <order_status translate="label">
604
+ <label>New order status</label>
605
+ <frontend_type>select</frontend_type>
606
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
607
+ <sort_order>4</sort_order>
608
+ <show_in_default>1</show_in_default>
609
+ <show_in_website>1</show_in_website>
610
+ <show_in_store>0</show_in_store>
611
+ </order_status>
612
+ <title translate="label">
613
+ <label>Title</label>
614
+ <frontend_type>text</frontend_type>
615
+ <sort_order>2</sort_order>
616
+ <show_in_default>1</show_in_default>
617
+ <show_in_website>1</show_in_website>
618
+ <show_in_store>0</show_in_store>
619
+ </title>
620
+ <merchant_id translate="label">
621
+ <label>Novalnet Merchant ID</label>
622
+ <frontend_type>text</frontend_type>
623
+ <sort_order>5</sort_order>
624
+ <show_in_default>1</show_in_default>
625
+ <show_in_website>1</show_in_website>
626
+ <show_in_store>0</show_in_store>
627
+ </merchant_id>
628
+ <auth_code translate="label">
629
+ <label>Novalnet Auth Code</label>
630
+ <frontend_type>text</frontend_type>
631
+ <sort_order>6</sort_order>
632
+ <show_in_default>1</show_in_default>
633
+ <show_in_website>1</show_in_website>
634
+ <show_in_store>0</show_in_store>
635
+ </auth_code>
636
+ <product_id translate="label">
637
+ <label>Novalnet Product ID</label>
638
+ <frontend_type>text</frontend_type>
639
+ <sort_order>7</sort_order>
640
+ <show_in_default>1</show_in_default>
641
+ <show_in_website>1</show_in_website>
642
+ <show_in_store>0</show_in_store>
643
+ </product_id>
644
+ <tariff_id translate="label">
645
+ <label>Novalnet Tariff ID</label>
646
+ <frontend_type>text</frontend_type>
647
+ <sort_order>8</sort_order>
648
+ <show_in_default>1</show_in_default>
649
+ <show_in_website>1</show_in_website>
650
+ <show_in_store>0</show_in_store>
651
+ </tariff_id>
652
+ <user_group_excluded translate="label">
653
+ <label>User Group Excluded</label>
654
+ <frontend_type>text</frontend_type>
655
+ <sort_order>13</sort_order>
656
+ <show_in_default>1</show_in_default>
657
+ <show_in_website>1</show_in_website>
658
+ <show_in_store>0</show_in_store>
659
+ </user_group_excluded>
660
+ </fields>
661
+ </novalnetPhonepayment>
662
+ </groups>
663
+ </payment>
664
+ </sections>
665
+ </config>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-install-1.0.0.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.0-1.0.1.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.1-1.0.2.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.2-1.0.3.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.0.3-1.1.0.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.0-1.1.1.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.1-1.1.2.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.2-1.1.3.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.3-1.1.4.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.4-1.1.5.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.5-1.1.6.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.6-1.1.7.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/code/community/Mage/Novalnet/sql/novalnet_setup/mysql4-upgrade-1.1.7-1.1.8.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $installer = $this;
3
+
4
+ $installer->startSetup();
5
+ $installer->addAttribute('order_payment', 'nn_account_holder', array('type'=>'varchar'));
6
+ $installer->addAttribute('order_payment', 'nn_account_number', array('type'=>'varchar'));
7
+ $installer->addAttribute('order_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
8
+ $installer->addAttribute('order_payment', 'nn_elv_country', array('type'=>'varchar'));
9
+
10
+ $installer->addAttribute('quote_payment', 'nn_account_holder', array('type'=>'varchar'));
11
+ $installer->addAttribute('quote_payment', 'nn_account_number', array('type'=>'varchar'));
12
+ $installer->addAttribute('quote_payment', 'nn_bank_sorting_code', array('type'=>'varchar'));
13
+ $installer->addAttribute('quote_payment', 'nn_elv_country', array('type'=>'varchar'));
14
+
15
+
16
+ if (Mage::getVersion() >= 1.1) {
17
+ $installer->startSetup();
18
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_holder', 'VARCHAR(255) NOT NULL');
19
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_account_number', 'VARCHAR(255) NOT NULL');
20
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_bank_sorting_code', 'VARCHAR(255) NOT NULL');
21
+ $installer->getConnection()->addColumn($installer->getTable('sales_flat_quote_payment'), 'nn_elv_country', 'VARCHAR(255) NOT NULL');
22
+ $installer->endSetup();
23
+ }
24
+
25
+ ?>
app/design/adminhtml/default/default/template/novalnet/cc/form.phtml ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php $_code=$this->getMethodCode();?>
29
+ <?php
30
+ $allowed = true;
31
+ $cc_type = '';
32
+ $cc_owner = '';
33
+ $cc_last4 = '';
34
+ $cc_exp_month = '';
35
+ $cc_exp_year = '';
36
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
37
+ {
38
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
39
+ $accountData = $this->getCcData($customer_id);
40
+ $cc_type = $cc_last4 = $cc_owner = $cc_exp_month = $cc_exp_year = '';
41
+ if ($accountData){
42
+ list($cc_type, $cc_last4, $cc_owner, $cc_exp_month, $cc_exp_year) = array_values($accountData);
43
+ }
44
+ $user_group_id = $this->getUserGroupId($customer_id);
45
+ $user_group_name = $this->getUserGroupExcluded();
46
+ if (!$user_group_name){$allowed = true;}
47
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
48
+ }
49
+ ?>
50
+ <?php /*if ($allowed)*/ {?>
51
+ <fieldset class="form-list">
52
+ <?php $_code=$this->getMethodCode() ?>
53
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
54
+ <div style="position: relative; left: 14em; top: -2.5em">
55
+ <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
56
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/<?php echo $_typeCode ?>_Logo.png' alt='$cctype Logo'/>
57
+ <?php endforeach ?>
58
+ </div>
59
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
60
+ <li>
61
+ <div class="input-box">
62
+ <label for="<?php echo $_code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
63
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
64
+ <option value=""><?php echo $this->__('--Please Select--')?></option>
65
+ <?php $_ccType = $cc_type; #$this->getInfoData('cc_type') ?>
66
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
67
+ <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
68
+ <?php endforeach ?>
69
+ </select>
70
+ </div>
71
+ </li>
72
+ <li>
73
+ <div class="input-box">
74
+ <label for="<?php echo $_code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
75
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $cc_owner; #$this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
76
+ </div>
77
+ </li>
78
+ <li>
79
+ <div class="input-box">
80
+ <label for="<?php echo $_code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
81
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo$cc_last4;# $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
82
+ </div>
83
+ </li>
84
+ <li>
85
+ <div class="input-box">
86
+ <label for="<?php echo $_code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
87
+ <div class="v-fix">
88
+ <select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
89
+ <?php $_ccExpMonth = $cc_exp_month; #$this->getInfoData('cc_exp_month') ?>
90
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
91
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
92
+ <?php endforeach ?>
93
+ </select>
94
+ </div>
95
+ <div class="v-fix" style="padding-left:5px;">
96
+ <?php $_ccExpYear = $cc_exp_year; #$this->getInfoData('cc_exp_year') ?>
97
+ <select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
98
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
99
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
100
+ <?php endforeach ?>
101
+ </select>
102
+ </div>
103
+ </div>
104
+ </li>
105
+ <?php if($this->hasVerification()): ?>
106
+ <li>
107
+ <div class="input-box">
108
+ <label for="<?php echo $_code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
109
+ <div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="" /></div>
110
+ &nbsp;
111
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
112
+ </div>
113
+ </li>
114
+ <?php endif; ?>
115
+ <li>
116
+ <?php echo $this->__('The amount will be booked from your credit card<BR>with <B>%s</B> note.',$this->getMethod()->getBookingReference());?>
117
+ </li>
118
+ </ul>
119
+ </fieldset>
120
+ <?php }?>
121
+ <script type="text/javascript">
122
+ function hideMe(payment_code){
123
+ t = 'p_method_' + payment_code.toString();
124
+ document.getElementById(t).style.visibility = 'hidden';
125
+ aTags = document.getElementsByTagName("label");
126
+ for (i=0; i<aTags.length; i++){
127
+ if (aTags[i].htmlFor == t){
128
+ aTags[i].style.visibility = 'hidden';
129
+ i = aTags.length;
130
+ }
131
+ }
132
+ }
133
+ <?php #if (!$allowed){echo"hideMe('$_code')"; }?>
134
+ </script>
app/design/adminhtml/default/default/template/novalnet/cc/info.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()): ?>
29
+ <?php echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br />
30
+ <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
31
+ <?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br />
32
+ <?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?><br />
33
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
34
+ <?php else: ?>
35
+
36
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/elvaustria/form.phtml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php
31
+ $allowed = true;
32
+ $nn_account_holder = '';
33
+ $nn_account_number = '';
34
+ $nn_bank_sorting_code = '';
35
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
36
+ {
37
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
38
+ $accountData = $this->getAccountData($customer_id);
39
+ $nn_account_holder = $nn_account_number = $nn_bank_sorting_code = $nn_elv_country = '';
40
+ if ($accountData){
41
+ list($nn_account_holder, $nn_account_number, $nn_bank_sorting_code, $nn_elv_country) = array_values($accountData);
42
+ $nn_account_number = substr($nn_account_number, 0, -4);
43
+ $nn_bank_sorting_code = substr($nn_bank_sorting_code, 0, -3);
44
+ }
45
+ $user_group_id = $this->getUserGroupId($customer_id);
46
+ $user_group_name = $this->getUserGroupExcluded();
47
+ if (!$user_group_name){$allowed = true;}
48
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
49
+ }
50
+ ?>
51
+ <?php $_code=$this->getMethodCode() ?>
52
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
53
+ <?php if ($allowed) {?>
54
+ <fieldset class="form-list">
55
+ <div style="position: relative; left: 14em; top: -2.5em">
56
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/ELV_Logo.png' alt='ELV Logo'/>
57
+ </div>
58
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
59
+ <li>
60
+ <div class="input-box">
61
+ <label for="<?php echo $_code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
62
+ <input type="text" id="<?php echo $_code ?>_account_holder" name="payment[account_holder]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" value="<?=$nn_account_holder?>" />
63
+ </div>
64
+ </li>
65
+ <li>
66
+ <div class="input-box">
67
+ <label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
68
+ <input type="text" id="<?php echo $_code ?>_account_number" name="payment[account_number]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" value="<?=$nn_account_number?>" />
69
+ </div>
70
+ </li>
71
+ <li>
72
+ <div class="input-box">
73
+ <label for="<?php echo $_code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
74
+ <input type="text" id="<?php echo $_code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="<?=$nn_bank_sorting_code?>" />
75
+ </div>
76
+ </li>
77
+ <?php if($this->acdc_check()): ?>
78
+ <li>
79
+ <div class="input-box">
80
+ <input type="checkbox" id="<?php echo $_code ?>_checkbox" name="payment[checkbox]" title="<?php echo $this->__('Checkbox') ?>" class="required-entry" />
81
+ <label for="<?php echo $_code ?>_checkbox"><?php echo $this->__('The') ?> <b><a href='javascript:show_acdc_info()' ONMOUSEOVER='show_acdc_info()'><?php echo $this->__('ACDC-Check') ?></a></b> <?php echo $this->__('accepted') ?> <span class="required">*</span></label><br/>
82
+ </div>
83
+ </li>
84
+ <?php endif ?>
85
+ <?php if($this->show_comment()): ?>
86
+ <li>
87
+ <div class="input-box">
88
+ <?php echo $this->show_comment()?>
89
+ </div>
90
+ </li>
91
+ <?php endif ?>
92
+ </ul>
93
+ <SCRIPT>
94
+ var showbaby;
95
+ function show_acdc_info(){
96
+ var url=parent.location.href;
97
+ url='<?php echo $baseUrl?>frontend/default/default/images/novalnet/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
98
+ showbaby=window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
99
+ showbaby.focus();
100
+ }
101
+ function hide_acdc_info(){showbaby.close();}
102
+ </SCRIPT>
103
+ </fieldset><?php }?>
104
+ <script type="text/javascript">
105
+ function hideMe(payment_code){
106
+ t = 'p_method_' + payment_code.toString();
107
+ document.getElementById(t).style.visibility = 'hidden';
108
+ aTags = document.getElementsByTagName("label");
109
+ for (i=0; i<aTags.length; i++){
110
+ if (aTags[i].htmlFor == t){
111
+ aTags[i].style.visibility = 'hidden';
112
+ i = aTags.length;
113
+ }
114
+ }
115
+ }
116
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
117
+ </script>
app/design/adminhtml/default/default/template/novalnet/elvaustria/info.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()): ?>
29
+
30
+ <?php #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getInfo()->getNnAccountHolder())) ?><br />
32
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getInfo()->getNnAccountNumber())) ?><br />
33
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getInfo()->getNnBankSortingCode())) ?><br />
34
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
35
+ <?php else: ?>
36
+
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/elvgerman/form.phtml ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+ ?>
29
+ <?php
30
+ $allowed = true;
31
+ $nn_account_holder = '';
32
+ $nn_account_number = '';
33
+ $nn_bank_sorting_code = '';
34
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
35
+ {
36
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
37
+ $accountData = $this->getAccountData($customer_id);
38
+ $nn_account_holder = $nn_account_number = $nn_bank_sorting_code = $nn_elv_country = '';
39
+ if ($accountData){
40
+ list($nn_account_holder, $nn_account_number, $nn_bank_sorting_code, $nn_elv_country) = array_values($accountData);
41
+ $nn_account_number = substr($nn_account_number, 0, -4);
42
+ $nn_bank_sorting_code = substr($nn_bank_sorting_code, 0, -3);
43
+ }
44
+ $user_group_id = $this->getUserGroupId($customer_id);
45
+ $user_group_name = $this->getUserGroupExcluded();
46
+ if (!$user_group_name){$allowed = true;}
47
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
48
+ }
49
+ ?>
50
+ <?php $_code=$this->getMethodCode();?>
51
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
52
+ <?php if ($allowed) {?>
53
+ <fieldset class="form-list">
54
+ <div style="position: relative; left: 14em; top: -2.5em">
55
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/ELV_Logo.png' alt='ELV Logo'/>
56
+ </div>
57
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
58
+ <li>
59
+ <div class="input-box">
60
+ <label for="<?php echo $_code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
61
+ <input type="text" id="<?php echo $_code ?>_account_holder" name="payment[account_holder]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" value="<?=$nn_account_holder?>" />
62
+ </div>
63
+ </li>
64
+ <li>
65
+ <div class="input-box">
66
+ <label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
67
+ <input type="text" id="<?php echo $_code ?>_account_number" name="payment[account_number]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" value="<?=$nn_account_number?>" />
68
+ </div>
69
+ </li>
70
+ <li>
71
+ <div class="input-box">
72
+ <label for="<?php echo $_code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
73
+ <input type="text" id="<?php echo $_code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="<?=$nn_bank_sorting_code?>" />
74
+ </div>
75
+ </li>
76
+ <?php if($this->acdc_check()): ?>
77
+ <li>
78
+ <div class="input-box">
79
+ <input type="checkbox" id="<?php echo $_code ?>_acdc" name="payment[acdc]" title="<?php echo $this->__('acdc') ?>" class="required-entry" />
80
+ <label for="<?php echo $_code ?>_acdc"><?php echo $this->__('The') ?> <b><a href='javascript:show_acdc_info()' ONMOUSEOVER='show_acdc_info()'><?php echo $this->__('ACDC-Check') ?></a></b> <?php echo $this->__('accepted') ?> <span class="required">*</span></label>
81
+ </div>
82
+ </li>
83
+ <?php endif ?>
84
+ <?php if($this->show_comment()): ?>
85
+ <li>
86
+ <div class="input-box">
87
+ <?php echo $this->show_comment()?>
88
+ </div>
89
+ </li>
90
+ <?php endif ?>
91
+ </ul>
92
+ <SCRIPT>
93
+ var showbaby;
94
+ function show_acdc_info(){
95
+ var url=parent.location.href;
96
+ url='<?php echo $baseUrl?>frontend/default/default/images/novalnet/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
97
+ showbaby=window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
98
+ showbaby.focus();
99
+ }
100
+ function hide_acdc_info(){showbaby.close();}
101
+ </SCRIPT>
102
+ </fieldset>
103
+ <?php }?>
104
+ <script type="text/javascript">
105
+ function hideMe(payment_code){
106
+ t = 'p_method_' + payment_code.toString();
107
+ document.getElementById(t).style.visibility = 'hidden';
108
+ aTags = document.getElementsByTagName("label");
109
+ for (i=0; i<aTags.length; i++){
110
+ if (aTags[i].htmlFor == t){
111
+ aTags[i].style.visibility = 'hidden';
112
+ i = aTags.length;
113
+ }
114
+ }
115
+ }
116
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
117
+ </script>
app/design/adminhtml/default/default/template/novalnet/elvgerman/info.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()): ?>
29
+
30
+ <?php #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getInfo()->getNnAccountHolder())) ?><br />
32
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getInfo()->getNnAccountNumber())) ?><br />
33
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getInfo()->getNnBankSortingCode())) ?><br />
34
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
35
+ <?php else: ?>
36
+
37
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/invoice/form.phtml ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php
31
+ $_code=$this->getMethodCode();
32
+ $allowed = true;
33
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
34
+ {
35
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
36
+ $user_group_id = $this->getUserGroupId($customer_id);
37
+ $user_group_name = $this->getUserGroupExcluded();
38
+ if (!$user_group_name){$allowed = true;}
39
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
40
+ }
41
+ ?>
42
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
43
+ <?php if ($allowed) {?>
44
+ <fieldset class="form-list">
45
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
46
+ <li>
47
+ <div class="input-box">
48
+ <?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process')?>.<br />
49
+ </div>
50
+ </li>
51
+ </ul>
52
+ </fieldset>
53
+ <?php }?>
54
+ <script type="text/javascript">
55
+ function hideMe(payment_code){
56
+ t = 'p_method_' + payment_code.toString();
57
+ document.getElementById(t).style.visibility = 'hidden';
58
+ aTags = document.getElementsByTagName("label");
59
+ for (i=0; i<aTags.length; i++){
60
+ if (aTags[i].htmlFor == t){
61
+ aTags[i].style.visibility = 'hidden';
62
+ i = aTags.length;
63
+ }
64
+ }
65
+ }
66
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
67
+ </script>
app/design/adminhtml/default/default/template/novalnet/invoice/info.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__('Method').': '.$this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php echo $this->__('Due at').': '.$this->__($this->htmlEscape($this->getDuedate())) ?><br />
31
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
32
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
33
+ <?php else: ?>
34
+
35
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/phonepayment/form.phtml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php $_code=$this->getMethodCode() ?>
31
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
32
+ <?php
33
+ $_code=$this->getMethodCode();
34
+ $allowed = true;
35
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
36
+ {
37
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
38
+ $user_group_id = $this->getUserGroupId($customer_id);
39
+ $user_group_name = $this->getUserGroupExcluded();
40
+ if (!$user_group_name){$allowed = true;}
41
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
42
+ }
43
+ ?>
44
+ <?php if ($allowed) {?>
45
+ <fieldset class="form-list">
46
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
47
+ <li>
48
+ <div class="input-box">
49
+ <?php echo $this->__('Amount below 0.90 Euro and above 10.00 Euro is not accepted')?><br />
50
+ </div>
51
+ </li>
52
+ </ul>
53
+ </fieldset>
54
+
55
+ <script type="text/javascript">
56
+ function hideMe(payment_code){
57
+ t = 'p_method_' + payment_code.toString();
58
+ document.getElementById(t).style.visibility = 'hidden';
59
+ aTags = document.getElementsByTagName("label");
60
+ for (i=0; i<aTags.length; i++){
61
+ if (aTags[i].htmlFor == t){
62
+ aTags[i].style.visibility = 'hidden';
63
+ i = aTags.length;
64
+ }
65
+ }
66
+ }
67
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
68
+ </script>
app/design/adminhtml/default/default/template/novalnet/phonepayment/info.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__('Method').': '.$this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
32
+ <?php else: ?>
33
+
34
+ <?php endif; ?>
app/design/adminhtml/default/default/template/novalnet/prepayment/form.phtml ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php $_code=$this->getMethodCode() ?>
31
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
32
+ <?php
33
+ $_code=$this->getMethodCode();
34
+ $allowed = true;
35
+ if (isset($_SESSION['adminhtml_quote']["customer_id"]))
36
+ {
37
+ $customer_id = $_SESSION['adminhtml_quote']['customer_id'];
38
+ $user_group_id = $this->getUserGroupId($customer_id);
39
+ $user_group_name = $this->getUserGroupExcluded();
40
+ if (!$user_group_name){$allowed = true;}
41
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
42
+ }
43
+ ?>
44
+
45
+ <?php if ($allowed) {?>
46
+ <fieldset class="form-list">
47
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
48
+ <li>
49
+ <div class="input-box">
50
+ <?php echo $this->__($this->htmlEscape('The Bank details will be emailed to you soon after the completion of checkout process'))?><br />
51
+ </div>
52
+ </li>
53
+ </ul>
54
+ </fieldset>
55
+
56
+ <?php }?>
57
+ <script type="text/javascript">
58
+ function hideMe(payment_code){
59
+ t = 'p_method_' + payment_code.toString();
60
+ document.getElementById(t).style.visibility = 'hidden';
61
+ aTags = document.getElementsByTagName("label");
62
+ for (i=0; i<aTags.length; i++){
63
+ if (aTags[i].htmlFor == t){
64
+ aTags[i].style.visibility = 'hidden';
65
+ i = aTags.length;
66
+ }
67
+ }
68
+ }
69
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
70
+ </script>
app/design/adminhtml/default/default/template/novalnet/prepayment/info.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__('Method').': '.$this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
32
+ <?php else: ?>
33
+
34
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/cc/form.phtml ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php $_code=$this->getMethodCode();?>
29
+ <?php
30
+ $customer_id = $_SESSION['customer_base']['id'];
31
+ $accountData = $this->getCcData($customer_id);
32
+ $cc_type = $cc_last4 = $cc_owner = $cc_exp_month = $cc_exp_year = '';
33
+ if ($accountData){
34
+ list($cc_type, $cc_last4, $cc_owner, $cc_exp_month, $cc_exp_year) = array_values($accountData);
35
+ }
36
+ $user_group_id = $this->getUserGroupId($customer_id);
37
+ $user_group_name = $this->getUserGroupExcluded();
38
+ if (!$user_group_name){$allowed = true;}
39
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
40
+ ?>
41
+ <?php if ($allowed) {?>
42
+ <fieldset class="form-list">
43
+ <?php $_code=$this->getMethodCode() ?>
44
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
45
+ <div style="position: relative; left: 14em; top: -2.5em">
46
+ <?php foreach($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
47
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/<?php echo $_typeCode ?>_Logo.png' alt='$cctype Logo'/>
48
+ <?php endforeach ?>
49
+ </div>
50
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
51
+ <li>
52
+ <div class="input-box">
53
+ <label for="<?php echo $_code ?>_cc_type"><?php echo $this->__('Credit Card Type') ?> <span class="required">*</span></label><br />
54
+ <select id="<?php echo $_code ?>_cc_type" name="payment[cc_type]" class="required-entry validate-cc-type-select">
55
+ <option value=""><?php echo $this->__('--Please Select--')?></option>
56
+ <?php $_ccType = $cc_type; #$this->getInfoData('cc_type') ?>
57
+ <?php foreach ($this->getCcAvailableTypes() as $_typeCode => $_typeName): ?>
58
+ <option value="<?php echo $_typeCode ?>"<?php if($_typeCode==$_ccType): ?> selected="selected"<?php endif ?>><?php echo $_typeName ?></option>
59
+ <?php endforeach ?>
60
+ </select>
61
+ </div>
62
+ </li>
63
+ <li>
64
+ <div class="input-box">
65
+ <label for="<?php echo $_code ?>_cc_owner"><?php echo $this->__('Name on Card') ?> <span class="required">*</span></label><br/>
66
+ <input type="text" title="<?php echo $this->__('Name on Card') ?>" class="required-entry input-text" id="<?php echo $_code ?>_cc_owner" name="payment[cc_owner]" value="<?php echo $cc_owner; #$this->htmlEscape($this->getInfoData('cc_owner')) ?>"/>
67
+ </div>
68
+ </li>
69
+ <li>
70
+ <div class="input-box">
71
+ <label for="<?php echo $_code ?>_cc_number"><?php echo $this->__('Credit Card Number') ?> <span class="required">*</span></label><br/>
72
+ <input type="text" id="<?php echo $_code ?>_cc_number" name="payment[cc_number]" title="<?php echo$cc_last4;# $this->__('Credit Card Number') ?>" class="input-text validate-cc-number validate-cc-type" value="" />
73
+ </div>
74
+ </li>
75
+ <li>
76
+ <div class="input-box">
77
+ <label for="<?php echo $_code ?>_expiration"><?php echo $this->__('Expiration Date') ?> <span class="required">*</span></label><br />
78
+ <div class="v-fix">
79
+ <select id="<?php echo $_code ?>_expiration" style="width:140px;" name="payment[cc_exp_month]" class="required-entry">
80
+ <?php $_ccExpMonth = $cc_exp_month; #$this->getInfoData('cc_exp_month') ?>
81
+ <?php foreach ($this->getCcMonths() as $k=>$v): ?>
82
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpMonth): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
83
+ <?php endforeach ?>
84
+ </select>
85
+ </div>
86
+ <div class="v-fix" style="padding-left:5px;">
87
+ <?php $_ccExpYear = $cc_exp_year; #$this->getInfoData('cc_exp_year') ?>
88
+ <select id="<?php echo $_code ?>_expiration_yr" style="width:103px;" name="payment[cc_exp_year]" class="required-entry">
89
+ <?php foreach ($this->getCcYears() as $k=>$v): ?>
90
+ <option value="<?php echo $k?$k:'' ?>"<?php if($k==$_ccExpYear): ?> selected="selected"<?php endif ?>><?php echo $v ?></option>
91
+ <?php endforeach ?>
92
+ </select>
93
+ </div>
94
+ </div>
95
+ </li>
96
+ <?php if($this->hasVerification()): ?>
97
+ <li>
98
+ <div class="input-box">
99
+ <label for="<?php echo $_code ?>_cc_cid"><?php echo $this->__('Card Verification Number') ?> <span class="required">*</span></label><br />
100
+ <div class="v-fix"><input type="text" title="<?php echo $this->__('Card Verification Number') ?>" class="required-entry input-text validate-cc-cvn" id="<?php echo $_code ?>_cc_cid" name="payment[cc_cid]" style="width:3em;" value="" /></div>
101
+ &nbsp;
102
+ <a href="#" class="cvv-what-is-this"><?php echo $this->__('What is this?') ?></a>
103
+ </div>
104
+ </li>
105
+ <?php endif; ?>
106
+ <li>
107
+ <?php echo $this->__('The amount will be booked from your credit card<BR>with <B>%s</B> note.',$this->getMethod()->getBookingReference());?>
108
+ </li>
109
+ </ul>
110
+ </fieldset>
111
+ <?php }?>
112
+ <script type="text/javascript">
113
+ function hideMe(payment_code){
114
+ t = 'p_method_' + payment_code.toString();
115
+ document.getElementById(t).style.visibility = 'hidden';
116
+ aTags = document.getElementsByTagName("label");
117
+ for (i=0; i<aTags.length; i++){
118
+ if (aTags[i].htmlFor == t){
119
+ aTags[i].style.visibility = 'hidden';
120
+ i = aTags.length;
121
+ }
122
+ }
123
+ }
124
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
125
+ </script>
app/design/frontend/default/default/template/novalnet/cc/info.phtml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()): ?>
29
+ <?php echo $this->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br />
30
+ <?php echo $this->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br />
31
+ <?php echo $this->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br />
32
+ <?php echo $this->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?><br />
33
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
34
+ <?php else: ?>
35
+
36
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/elvaustria/form.phtml ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php
31
+ $customer_id = $_SESSION['customer_base']['id'];
32
+ $accountData = $this->getAccountData($customer_id);
33
+ $nn_account_holder = $nn_account_number = $nn_bank_sorting_code = $nn_elv_country = '';
34
+ if ($accountData){
35
+ list($nn_account_holder, $nn_account_number, $nn_bank_sorting_code, $nn_elv_country) = array_values($accountData);
36
+ $nn_account_number = substr($nn_account_number, 0, -4);
37
+ $nn_bank_sorting_code = substr($nn_bank_sorting_code, 0, -3);
38
+ }
39
+ $user_group_id = $this->getUserGroupId($customer_id);
40
+ $user_group_name = $this->getUserGroupExcluded();
41
+ if (!$user_group_name){$allowed = true;}
42
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
43
+ ?>
44
+ <?php $_code=$this->getMethodCode() ?>
45
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
46
+ <?php if ($allowed) {?>
47
+ <fieldset class="form-list">
48
+ <div style="position: relative; left: 14em; top: -2.5em">
49
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/ELV_Logo.png' alt='ELV Logo'/>
50
+ </div>
51
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
52
+ <li>
53
+ <div class="input-box">
54
+ <label for="<?php echo $_code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
55
+ <input type="text" id="<?php echo $_code ?>_account_holder" name="payment[account_holder]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" value="<?=$nn_account_holder?>" />
56
+ </div>
57
+ </li>
58
+ <li>
59
+ <div class="input-box">
60
+ <label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
61
+ <input type="text" id="<?php echo $_code ?>_account_number" name="payment[account_number]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" value="<?=$nn_account_number?>" />
62
+ </div>
63
+ </li>
64
+ <li>
65
+ <div class="input-box">
66
+ <label for="<?php echo $_code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
67
+ <input type="text" id="<?php echo $_code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="<?=$nn_bank_sorting_code?>" />
68
+ </div>
69
+ </li>
70
+ <?php if($this->acdc_check()): ?>
71
+ <li>
72
+ <div class="input-box">
73
+ <input type="checkbox" id="<?php echo $_code ?>_checkbox" name="payment[checkbox]" title="<?php echo $this->__('Checkbox') ?>" class="required-entry" />
74
+ <label for="<?php echo $_code ?>_checkbox"><?php echo $this->__('The') ?> <b><a href='javascript:show_acdc_info()' ONMOUSEOVER='show_acdc_info()'><?php echo $this->__('ACDC-Check') ?></a></b> <?php echo $this->__('accepted') ?> <span class="required">*</span></label><br/>
75
+ </div>
76
+ </li>
77
+ <?php endif ?>
78
+ <?php if($this->show_comment()): ?>
79
+ <li>
80
+ <div class="input-box">
81
+ <?php echo $this->show_comment()?>
82
+ </div>
83
+ </li>
84
+ <?php endif ?>
85
+ </ul>
86
+ <SCRIPT>
87
+ var showbaby;
88
+ function show_acdc_info(){
89
+ var url=parent.location.href;
90
+ url='<?php echo $baseUrl?>frontend/default/default/images/novalnet/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
91
+ showbaby=window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
92
+ showbaby.focus();
93
+ }
94
+ function hide_acdc_info(){showbaby.close();}
95
+ </SCRIPT>
96
+ </fieldset><?php }?>
97
+ <script type="text/javascript">
98
+ function hideMe(payment_code){
99
+ t = 'p_method_' + payment_code.toString();
100
+ document.getElementById(t).style.visibility = 'hidden';
101
+ aTags = document.getElementsByTagName("label");
102
+ for (i=0; i<aTags.length; i++){
103
+ if (aTags[i].htmlFor == t){
104
+ aTags[i].style.visibility = 'hidden';
105
+ i = aTags.length;
106
+ }
107
+ }
108
+ }
109
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
110
+ </script>
app/design/frontend/default/default/template/novalnet/elvaustria/info.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+
30
+ <?php #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getInfo()->getNnAccountHolder())) ?><br />
32
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getInfo()->getNnAccountNumber())) ?><br />
33
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getInfo()->getNnBankSortingCode())) ?><br />
34
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
35
+ <?php else: ?>
36
+
37
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/elvgerman/form.phtml ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+ ?>
29
+ <?php
30
+ $customer_id = $_SESSION['customer_base']['id'];
31
+ $accountData = $this->getAccountData($customer_id);
32
+ $nn_account_holder = $nn_account_number = $nn_bank_sorting_code = $nn_elv_country = '';
33
+ if ($accountData){
34
+ list($nn_account_holder, $nn_account_number, $nn_bank_sorting_code, $nn_elv_country) = array_values($accountData);
35
+ $nn_account_number = substr($nn_account_number, 0, -4);
36
+ $nn_bank_sorting_code = substr($nn_bank_sorting_code, 0, -3);
37
+ }
38
+ $user_group_id = $this->getUserGroupId($customer_id);
39
+ $user_group_name = $this->getUserGroupExcluded();
40
+ if (!$user_group_name){$allowed = true;}
41
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
42
+ ?>
43
+ <?php $_code=$this->getMethodCode();?>
44
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
45
+ <?php if ($allowed) {?>
46
+ <fieldset class="form-list">
47
+ <div style="position: relative; left: 14em; top: -2.5em">
48
+ <img src='<?php echo $baseUrl?>frontend/default/default/images/novalnet/ELV_Logo.png' alt='ELV Logo'/>
49
+ </div>
50
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
51
+ <li>
52
+ <div class="input-box">
53
+ <label for="<?php echo $_code ?>_account_holder"><?php echo $this->__('Account Holder') ?> <span class="required">*</span></label><br/>
54
+ <input type="text" id="<?php echo $_code ?>_account_holder" name="payment[account_holder]" title="<?php echo $this->__('Account Holder') ?>" class="required-entry input-text" value="<?=$nn_account_holder?>" />
55
+ </div>
56
+ </li>
57
+ <li>
58
+ <div class="input-box">
59
+ <label for="<?php echo $_code ?>_account_number"><?php echo $this->__('Account Number') ?> <span class="required">*</span></label><br/>
60
+ <input type="text" id="<?php echo $_code ?>_account_number" name="payment[account_number]" title="<?php echo $this->__('Account Number') ?>" class="required-entry input-text" value="<?=$nn_account_number?>" />
61
+ </div>
62
+ </li>
63
+ <li>
64
+ <div class="input-box">
65
+ <label for="<?php echo $_code ?>_bank_sorting_code"><?php echo $this->__('Bank Sorting Code') ?> <span class="required">*</span></label><br/>
66
+ <input type="text" id="<?php echo $_code ?>_bank_sorting_code" name="payment[bank_sorting_code]" title="<?php echo $this->__('Bank Sorting Code') ?>" class="required-entry input-text" value="<?=$nn_bank_sorting_code?>" />
67
+ </div>
68
+ </li>
69
+ <?php if($this->acdc_check()): ?>
70
+ <li>
71
+ <div class="input-box">
72
+ <input type="checkbox" id="<?php echo $_code ?>_acdc" name="payment[acdc]" title="<?php echo $this->__('acdc') ?>" class="required-entry" />
73
+ <label for="<?php echo $_code ?>_acdc"><?php echo $this->__('The') ?> <b><a href='javascript:show_acdc_info()' ONMOUSEOVER='show_acdc_info()'><?php echo $this->__('ACDC-Check') ?></a></b> <?php echo $this->__('accepted') ?> <span class="required">*</span></label>
74
+ </div>
75
+ </li>
76
+ <?php endif ?>
77
+ <?php if($this->show_comment()): ?>
78
+ <li>
79
+ <div class="input-box">
80
+ <?php echo $this->show_comment()?>
81
+ </div>
82
+ </li>
83
+ <?php endif ?>
84
+ </ul>
85
+ <SCRIPT>
86
+ var showbaby;
87
+ function show_acdc_info(){
88
+ var url=parent.location.href;
89
+ url='<?php echo $baseUrl?>frontend/default/default/images/novalnet/acdc_info.png';w='550';h='300';x=screen.availWidth/2-w/2;y=screen.availHeight/2-h/2;
90
+ showbaby=window.open(url,'showbaby','toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=1,width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
91
+ showbaby.focus();
92
+ }
93
+ function hide_acdc_info(){showbaby.close();}
94
+ </SCRIPT>
95
+ </fieldset>
96
+ <?php }?>
97
+ <script type="text/javascript">
98
+ function hideMe(payment_code){
99
+ t = 'p_method_' + payment_code.toString();
100
+ document.getElementById(t).style.visibility = 'hidden';
101
+ aTags = document.getElementsByTagName("label");
102
+ for (i=0; i<aTags.length; i++){
103
+ if (aTags[i].htmlFor == t){
104
+ aTags[i].style.visibility = 'hidden';
105
+ i = aTags.length;
106
+ }
107
+ }
108
+ }
109
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
110
+ </script>
app/design/frontend/default/default/template/novalnet/elvgerman/info.phtml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+
30
+ <?php #echo $this->__('Country: ').$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php echo $this->__('Account Holder: %s', $this->htmlEscape($this->getInfo()->getNnAccountHolder())) ?><br />
32
+ <?php echo $this->__('Account Number: %s', $this->htmlEscape($this->getInfo()->getNnAccountNumber())) ?><br />
33
+ <?php echo $this->__('Bank Sorting Code: %s', $this->htmlEscape($this->getInfo()->getNnBankSortingCode())) ?><br />
34
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
35
+ <?php else: ?>
36
+
37
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/invoice/form.phtml ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php
31
+ $_code=$this->getMethodCode();
32
+ $customer_id = $_SESSION['customer_base']['id'];
33
+ $user_group_id = $this->getUserGroupId($customer_id);
34
+ $user_group_name = $this->getUserGroupExcluded();
35
+ if (!$user_group_name){$allowed = true;}
36
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
37
+ ?>
38
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
39
+ <?php if ($allowed) {?>
40
+ <fieldset class="form-list">
41
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
42
+ <li>
43
+ <div class="input-box">
44
+ <?php echo $this->__('The Bank details will be emailed to you soon after the completion of checkout process')?>.<br />
45
+ </div>
46
+ </li>
47
+ </ul>
48
+ </fieldset>
49
+ <?php }?>
50
+ <script type="text/javascript">
51
+ function hideMe(payment_code){
52
+ t = 'p_method_' + payment_code.toString();
53
+ document.getElementById(t).style.visibility = 'hidden';
54
+ aTags = document.getElementsByTagName("label");
55
+ for (i=0; i<aTags.length; i++){
56
+ if (aTags[i].htmlFor == t){
57
+ aTags[i].style.visibility = 'hidden';
58
+ i = aTags.length;
59
+ }
60
+ }
61
+ }
62
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
63
+ </script>
app/design/frontend/default/default/template/novalnet/invoice/info.phtml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php echo $this->__('Due at').': '.$this->__($this->htmlEscape($this->getDuedate())) ?><br />
31
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
32
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
33
+ <?php else: ?>
34
+
35
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/phonepayment/form.phtml ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php $_code=$this->getMethodCode() ?>
31
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
32
+ <?php
33
+ $_code=$this->getMethodCode();
34
+ $customer_id = $_SESSION['customer_base']['id'];
35
+ $user_group_id = $this->getUserGroupId($customer_id);
36
+ $user_group_name = $this->getUserGroupExcluded();
37
+ if (!$user_group_name){$allowed = true;}
38
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
39
+ ?>
40
+ <?php if ($allowed) {?>
41
+ <fieldset class="form-list">
42
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
43
+ <li>
44
+ <div class="input-box">
45
+ <?php echo $this->__('Amount below 0.90 Euro and above 10.00 Euro is not accepted')?><br />
46
+ </div>
47
+ </li>
48
+ </ul>
49
+ </fieldset>
50
+
51
+ <script type="text/javascript">
52
+ function hideMe(payment_code){
53
+ t = 'p_method_' + payment_code.toString();
54
+ document.getElementById(t).style.visibility = 'hidden';
55
+ aTags = document.getElementsByTagName("label");
56
+ for (i=0; i<aTags.length; i++){
57
+ if (aTags[i].htmlFor == t){
58
+ aTags[i].style.visibility = 'hidden';
59
+ i = aTags.length;
60
+ }
61
+ }
62
+ }
63
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
64
+ </script>
app/design/frontend/default/default/template/novalnet/phonepayment/info.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
32
+ <?php else: ?>
33
+
34
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/prepayment/form.phtml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is 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
+ * Part of the Paymentmodul of Novalnet AG
17
+ * http://www.novalnet.de
18
+ * If you have found this script usefull a small
19
+ * recommendation as well as a comment on merchant form
20
+ * would be greatly appreciated.
21
+ *
22
+ * @category design_default
23
+ * @package Mage
24
+ * @copyright Copyright (c) 2008 Novalnet AG
25
+ * @version 1.0.0
26
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
27
+ */
28
+
29
+ ?>
30
+ <?php $_code=$this->getMethodCode() ?>
31
+ <?php $baseUrl=Mage::getBaseUrl('skin') ?>
32
+ <?php
33
+ $_code=$this->getMethodCode();
34
+ $customer_id = $_SESSION['customer_base']['id'];
35
+ $user_group_id = $this->getUserGroupId($customer_id);
36
+ $user_group_name = $this->getUserGroupExcluded();
37
+ if (!$user_group_name){$allowed = true;}
38
+ else{$allowed = $this->checkUserGroupAccess($user_group_id, $user_group_name);}
39
+ ?>
40
+
41
+ <?php if ($allowed) {?>
42
+ <fieldset class="form-list">
43
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
44
+ <li>
45
+ <div class="input-box">
46
+ <?php echo $this->__($this->htmlEscape('The Bank details will be emailed to you soon after the completion of checkout process'))?><br />
47
+ </div>
48
+ </li>
49
+ </ul>
50
+ </fieldset>
51
+
52
+ <?php }?>
53
+ <script type="text/javascript">
54
+ function hideMe(payment_code){
55
+ t = 'p_method_' + payment_code.toString();
56
+ document.getElementById(t).style.visibility = 'hidden';
57
+ aTags = document.getElementsByTagName("label");
58
+ for (i=0; i<aTags.length; i++){
59
+ if (aTags[i].htmlFor == t){
60
+ aTags[i].style.visibility = 'hidden';
61
+ i = aTags.length;
62
+ }
63
+ }
64
+ }
65
+ <?php if (!$allowed){echo"hideMe('$_code')"; }?>
66
+ </script>
app/design/frontend/default/default/template/novalnet/prepayment/info.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <?php if($_info = $this->getInfo()):?>
29
+ <?php echo $this->__($this->htmlEscape($this->getPaymentMethod())) ?><br />
30
+ <?php #echo $this->__('Country').': '.$this->__($this->htmlEscape($this->getInfo()->getNnElvCountry())) ?><!--br /-->
31
+ <?php if ($_info->getLastTransId()!="") echo $this->__('TID: %s', $this->htmlEscape($_info->getLastTransId())) ?><br />
32
+ <?php else: ?>
33
+
34
+ <?php endif; ?>
app/design/frontend/default/default/template/novalnet/secure/failure.phtml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * Part of the Paymentmodul of Novalnet AG
16
+ * http://www.novalnet.de
17
+ * If you have found this script usefull a small
18
+ * recommendation as well as a comment on merchant form
19
+ * would be greatly appreciated.
20
+ *
21
+ * @category design_default
22
+ * @package Mage
23
+ * @copyright Copyright (c) 2008 Novalnet AG
24
+ * @version 1.0.0
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ ?>
28
+ <div class="page-head">
29
+ <h3><?php echo $this->__('Error occured') ?></h3>
30
+ </div>
31
+ <p><?php echo $this->getErrorMessage() ?>.</p>
32
+ <p><?php echo $this->__('Please <a href="%s">continue shopping</a>.', $this->getContinueShoppingUrl()) ?></p>
app/etc/modules/Mage_Novalnet.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <!-- declare Mage_NewModule module -->
5
+ <Mage_Novalnet>
6
+ <!-- this is an active module -->
7
+ <active>true</active>
8
+ <!-- this module will be located in app/code/local code pool -->
9
+ <codePool>community</codePool>
10
+ <!-- specify dependencies for correct module loading order -->
11
+ <depends>
12
+ <Mage_Payment />
13
+ </depends>
14
+ <!-- declare module's version information for database updates -->
15
+ <version>1.0.1</version>
16
+ </Mage_Novalnet>
17
+ </modules>
18
+ <global>
19
+ <resources>
20
+ <novalnet_setup>
21
+ <setup>
22
+ <module>Mage_Novalnet</module>
23
+ <class>Mage_Novalnet_Model_Mysql4_Setup</class>
24
+
25
+ </setup>
26
+ <connection>
27
+ <use>core_setup</use>
28
+ </connection>
29
+ </novalnet_setup>
30
+ </resources>
31
+ </global>
32
+ </config>
app/locale/de_AT/Mage_Novalnet.csv ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Aktiviert"
2
+ "New order status","Neuer Bestellstatus"
3
+ "Novalnet Merchant ID","Novalnet Händler ID"
4
+ "Title","Titel"
5
+ "Novalnet Auth Code","Novalnet Auth Code"
6
+ "Novalnet Product ID","Novalnet Produkt ID"
7
+ "Novalnet Tariff ID","Novalnet Tarif ID"
8
+ "Payment from applicable countries","Zahlungsmöglichkeit für"
9
+ "Payment from Specific countries","Länderauswahl für Zahlungsmöglichkeit"
10
+ "DE","Deutschland"
11
+ "AT","Österreich"
12
+ "Direct Debit","Lastschrift"
13
+ "Credit Card","Kreditkarte"
14
+ "Country","Buchungsland"
15
+ "Name on the Card","Kreditkarteninhaber"
16
+ "Name on Card","Kreditkarteninhaber"
17
+ "Credit Card Type","Kreditkarten Typ"
18
+ "Credit Card Number","Kreditkartennummer"
19
+ "Expiration Date","Ablaufdatum"
20
+ "Card Verification Number","CVC-Nummer"
21
+ "What is this?","Wo finde ich die CVC-Nummer?"
22
+ "Account Holder","Name des Kontoinhabers"
23
+ "Account Number","Kontonummer"
24
+ "Bank Sorting Code","Bankleitzahl"
25
+ "Country: ","Buchungsland: "
26
+ "Account Holder: %s","Kontoinhaber: %s"
27
+ "Account Number: %s","Kontonummer: %s"
28
+ "Bank Sorting Code: %s","Bankleitzahl: %s"
29
+ "TID: %s","TID: %s"
30
+ "Name on the Card: %s","Kreditkarteninhaber: %s"
31
+ "Credit Card Number: %s","Kreditkartennummer: %s"
32
+ "Credit Card Number: xxxx-%s","Kreditkartennummer: xxxx-%s"
33
+ "Credit Card Type: %s","Kreditkartentyp: %s"
34
+ "Expiration Date: %s/%s","Gültig bis: %s/%s"
35
+ "Credit Card Types","Mögliche Kreditkarten"
36
+ "The amount will be booked from your credit card<BR>with <B>%s</B> note.","Der Betrag wird von Ihrer Kreditkarte mit dem<BR>Verwendungszweck <B>%s</B> abgebucht."
37
+ "This is not a valid account number.","Die Kontonummer ist nicht gültig!"
38
+ "This is not a valid bank sorting code.","Die Bankleitzahl ist nicht gültig!"
39
+ "Direct Debit","Lastschrift"
40
+ "Credit Card","Kreditkarte"
41
+ "Creditcard","Kreditkarte"
42
+ "3D-Secure Credit Card","3D-Secure Kreditkarte"
43
+ "You will be redirected to Novalnet AG 3D-Secure in a few seconds.","Sie werden in ein paar Sekunden an das 3D-Secure Gateway der Firma Novalnet weitergeleitet"
44
+ "Customer was redirected to Novalnet.","Der Kunde wurde zum Novalnet Gateway weitergeleitet"
45
+ "Customer successfully returned from Novalnet","Der Kunde kehrte erfolgreich vom Novalnet Gateway zurück"
46
+ "Customer was rejected by Novalnet","Der Kunde wurde vom Novalnet Gateway zurückgewiesen"
47
+ "Prepayment","Vorkasse"
48
+ "Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.","Bemerkung: Nach dem Absenden Ihrer Bestellung wird Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet."
49
+ "Payment Duration", "Zahlbar in Tagen"
50
+ "--Please Select--","--Bitte wählen--"
51
+ "Invoice","Rechnung"
52
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
53
+ "to following account:","auf folgendes Konto:"
54
+ "I accept the ACDC check","'Der acdc-Check wird akzeptiert'"
55
+ "This is a required field","Das ist ein Pflichtfeld"
56
+ "CC","Kreditkarte"
57
+ "Cc","Kreditkarte"
58
+ "Method","Zahlart"
59
+ "Due at","Gültig bis"
60
+ "The Bank details will be emailed to you soon after the completion of checkout process","Die Bankverbindung wird Ihnen nach Abschluss Ihrer Bestellung per E-Mail zugeschickt"
61
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
62
+ "Please transfer the amount to following account","Bitte ueberweisen sie den Betrag auf folgendes Konto"
63
+ "Account Holder2","Kontoinhaber"
64
+ "Bank","Bank"
65
+ "Amount", "Betrag"
66
+ "Reference","Verwendungszweck"
67
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
68
+ "to following account","auf folgendes Konto"
69
+ "Please note that the Transfer can only be identified with the above mentioned Reference","Bitte beachten Sie, dass die Ueberweisung nur bearbeitet werden kann, wenn der oben angegebene Verwendungszweck verwendet wird"
70
+ "The ACDC-Check accepted","Der ACDC-Check wird akzeptiert"
71
+ "accepted","wird akzeptiert"
72
+ "ACDC-Check","ACDC-Check"
73
+ "The","Der"
74
+ "Month","Monat"
75
+ "Year","Jahr"
76
+ "Direct Debit German","Lastschrift Deutschland"
77
+ "Direct Debit Austria","Lastschrift Österreich"
78
+ "Booking Reference","Verwendungszweck"
79
+ "The Bankcode must have a length of at least 8 digits","Die BLZ muss mindestens 8-stellig sein"
80
+ "The Bankcode must have a length of at least 5 digits","Die BLZ muss mindestens 5-stellig sein"
81
+ "You must check ACDC","You must check ACDC"
82
+ "Notice for Clients","Hinweis für Kunden"
83
+ "Pay by Call","Per Telefon"
84
+ "Phonepayment","Per Telefon"
85
+ "Error","Fehler"
86
+ "Order Price not found","Bestellsumme nicht gefunden"
87
+ "Amount below 0.90 Euro and above 10.00 Euro is not accepted","Betraege unter 0.90 Euro und ueber 10.00 Euro koennen nicht verarbeitet werden bzw. werden nicht akzeptiert!"
88
+ "Params (aryResponse) missing","Params (aryResponse) fehlt"
89
+ "Following steps are required to complete the telephone payment process","Folgende Schritte sind noetig um Ihre Zahlung abzuschliessen"
90
+ "Step","Schritt"
91
+ "Please dial this number","Bitte rufen Sie diese Telefonnummer an"
92
+ "Please wait for the Signal tone and hangup the reciever","Bitte warten Sie auf den Signalton und legen Sie dann den Hoerer auf"
93
+ "Please click on continue after your successive call","Nach Ihrem erfolgreichen Anruf klicken Sie bitte unten auf Weiter"
94
+ "This call costs","Dieser Anruf kostet einmalig"
95
+ "inclusive tax","inkl. MwSt."
96
+ "and is only possible from German Landline Telefon connection","und ist nur vom Deutschen Festnetzanschluss moeglich"
97
+ "Response contains no XML data","Response enthält keine XML Daten"
98
+ "Did you called this number","Did you called this number"
99
+ "Billing Addr. not found","Rechnungsadresse nicht gefunden"
100
+ "User Group Excluded","Ausgeschlossene Benutzergruppe"
101
+ "Parameter missing","Parameter fehlt"
app/locale/de_CH/Mage_Novalnet.csv ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Aktiviert"
2
+ "New order status","Neuer Bestellstatus"
3
+ "Novalnet Merchant ID","Novalnet Händler ID"
4
+ "Title","Titel"
5
+ "Novalnet Auth Code","Novalnet Auth Code"
6
+ "Novalnet Product ID","Novalnet Produkt ID"
7
+ "Novalnet Tariff ID","Novalnet Tarif ID"
8
+ "Payment from applicable countries","Zahlungsmöglichkeit für"
9
+ "Payment from Specific countries","Länderauswahl für Zahlungsmöglichkeit"
10
+ "DE","Deutschland"
11
+ "AT","Österreich"
12
+ "Direct Debit","Lastschrift"
13
+ "Credit Card","Kreditkarte"
14
+ "Country","Buchungsland"
15
+ "Name on the Card","Kreditkarteninhaber"
16
+ "Name on Card","Kreditkarteninhaber"
17
+ "Credit Card Type","Kreditkarten Typ"
18
+ "Credit Card Number","Kreditkartennummer"
19
+ "Expiration Date","Ablaufdatum"
20
+ "Card Verification Number","CVC-Nummer"
21
+ "What is this?","Wo finde ich die CVC-Nummer?"
22
+ "Account Holder","Name des Kontoinhabers"
23
+ "Account Number","Kontonummer"
24
+ "Bank Sorting Code","Bankleitzahl"
25
+ "Country: ","Buchungsland: "
26
+ "Account Holder: %s","Kontoinhaber: %s"
27
+ "Account Number: %s","Kontonummer: %s"
28
+ "Bank Sorting Code: %s","Bankleitzahl: %s"
29
+ "TID: %s","TID: %s"
30
+ "Name on the Card: %s","Kreditkarteninhaber: %s"
31
+ "Credit Card Number: %s","Kreditkartennummer: %s"
32
+ "Credit Card Number: xxxx-%s","Kreditkartennummer: xxxx-%s"
33
+ "Credit Card Type: %s","Kreditkartentyp: %s"
34
+ "Expiration Date: %s/%s","Gültig bis: %s/%s"
35
+ "Credit Card Types","Mögliche Kreditkarten"
36
+ "The amount will be booked from your credit card<BR>with <B>%s</B> note.","Der Betrag wird von Ihrer Kreditkarte mit dem<BR>Verwendungszweck <B>%s</B> abgebucht."
37
+ "This is not a valid account number.","Die Kontonummer ist nicht gültig!"
38
+ "This is not a valid bank sorting code.","Die Bankleitzahl ist nicht gültig!"
39
+ "Direct Debit","Lastschrift"
40
+ "Credit Card","Kreditkarte"
41
+ "Creditcard","Kreditkarte"
42
+ "3D-Secure Credit Card","3D-Secure Kreditkarte"
43
+ "You will be redirected to Novalnet AG 3D-Secure in a few seconds.","Sie werden in ein paar Sekunden an das 3D-Secure Gateway der Firma Novalnet weitergeleitet"
44
+ "Customer was redirected to Novalnet.","Der Kunde wurde zum Novalnet Gateway weitergeleitet"
45
+ "Customer successfully returned from Novalnet","Der Kunde kehrte erfolgreich vom Novalnet Gateway zurück"
46
+ "Customer was rejected by Novalnet","Der Kunde wurde vom Novalnet Gateway zurückgewiesen"
47
+ "Prepayment","Vorkasse"
48
+ "Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.","Bemerkung: Nach dem Absenden Ihrer Bestellung wird Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet."
49
+ "Payment Duration", "Zahlbar in Tagen"
50
+ "--Please Select--","--Bitte wählen--"
51
+ "Invoice","Rechnung"
52
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
53
+ "to following account:","auf folgendes Konto:"
54
+ "I accept the ACDC check","'Der acdc-Check wird akzeptiert'"
55
+ "This is a required field","Das ist ein Pflichtfeld"
56
+ "CC","Kreditkarte"
57
+ "Cc","Kreditkarte"
58
+ "Method","Zahlart"
59
+ "Due at","Gültig bis"
60
+ "The Bank details will be emailed to you soon after the completion of checkout process","Die Bankverbindung wird Ihnen nach Abschluss Ihrer Bestellung per E-Mail zugeschickt"
61
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
62
+ "Please transfer the amount to following account","Bitte ueberweisen sie den Betrag auf folgendes Konto"
63
+ "Account Holder2","Kontoinhaber"
64
+ "Bank","Bank"
65
+ "Amount", "Betrag"
66
+ "Reference","Verwendungszweck"
67
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
68
+ "to following account","auf folgendes Konto"
69
+ "Please note that the Transfer can only be identified with the above mentioned Reference","Bitte beachten Sie, dass die Ueberweisung nur bearbeitet werden kann, wenn der oben angegebene Verwendungszweck verwendet wird"
70
+ "The ACDC-Check accepted","Der ACDC-Check wird akzeptiert"
71
+ "accepted","wird akzeptiert"
72
+ "ACDC-Check","ACDC-Check"
73
+ "The","Der"
74
+ "Month","Monat"
75
+ "Year","Jahr"
76
+ "Direct Debit German","Lastschrift Deutschland"
77
+ "Direct Debit Austria","Lastschrift Österreich"
78
+ "Booking Reference","Verwendungszweck"
79
+ "The Bankcode must have a length of at least 8 digits","Die BLZ muss mindestens 8-stellig sein"
80
+ "The Bankcode must have a length of at least 5 digits","Die BLZ muss mindestens 5-stellig sein"
81
+ "You must check ACDC","You must check ACDC"
82
+ "Notice for Clients","Hinweis für Kunden"
83
+ "Pay by Call","Per Telefon"
84
+ "Phonepayment","Per Telefon"
85
+ "Error","Fehler"
86
+ "Order Price not found","Bestellsumme nicht gefunden"
87
+ "Amount below 0.90 Euro and above 10.00 Euro is not accepted","Betraege unter 0.90 Euro und ueber 10.00 Euro koennen nicht verarbeitet werden bzw. werden nicht akzeptiert!"
88
+ "Params (aryResponse) missing","Params (aryResponse) fehlt"
89
+ "Following steps are required to complete the telephone payment process","Folgende Schritte sind noetig um Ihre Zahlung abzuschliessen"
90
+ "Step","Schritt"
91
+ "Please dial this number","Bitte rufen Sie diese Telefonnummer an"
92
+ "Please wait for the Signal tone and hangup the reciever","Bitte warten Sie auf den Signalton und legen Sie dann den Hoerer auf"
93
+ "Please click on continue after your successive call","Nach Ihrem erfolgreichen Anruf klicken Sie bitte unten auf Weiter"
94
+ "This call costs","Dieser Anruf kostet einmalig"
95
+ "inclusive tax","inkl. MwSt."
96
+ "and is only possible from German Landline Telefon connection","und ist nur vom Deutschen Festnetzanschluss moeglich"
97
+ "Response contains no XML data","Response enthält keine XML Daten"
98
+ "Did you called this number","Did you called this number"
99
+ "Billing Addr. not found","Rechnungsadresse nicht gefunden"
100
+ "User Group Excluded","Ausgeschlossene Benutzergruppe"
101
+ "Parameter missing","Parameter fehlt"
app/locale/de_DE/Mage_Novalnet.csv ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Aktiviert"
2
+ "New order status","Neuer Bestellstatus"
3
+ "Novalnet Merchant ID","Novalnet Händler ID"
4
+ "Title","Titel"
5
+ "Novalnet Auth Code","Novalnet Auth Code"
6
+ "Novalnet Product ID","Novalnet Produkt ID"
7
+ "Novalnet Tariff ID","Novalnet Tarif ID"
8
+ "Payment from applicable countries","Zahlungsmöglichkeit für"
9
+ "Payment from Specific countries","Länderauswahl für Zahlungsmöglichkeit"
10
+ "DE","Deutschland"
11
+ "AT","Österreich"
12
+ "Direct Debit","Lastschrift"
13
+ "Credit Card","Kreditkarte"
14
+ "Country","Buchungsland"
15
+ "Name on the Card","Kreditkarteninhaber"
16
+ "Name on Card","Kreditkarteninhaber"
17
+ "Credit Card Type","Kreditkarten Typ"
18
+ "Credit Card Number","Kreditkartennummer"
19
+ "Expiration Date","Ablaufdatum"
20
+ "Card Verification Number","CVC-Nummer"
21
+ "What is this?","Wo finde ich die CVC-Nummer?"
22
+ "Account Holder","Name des Kontoinhabers"
23
+ "Account Number","Kontonummer"
24
+ "Bank Sorting Code","Bankleitzahl"
25
+ "Country: ","Buchungsland: "
26
+ "Account Holder: %s","Kontoinhaber: %s"
27
+ "Account Number: %s","Kontonummer: %s"
28
+ "Bank Sorting Code: %s","Bankleitzahl: %s"
29
+ "TID: %s","TID: %s"
30
+ "Name on the Card: %s","Kreditkarteninhaber: %s"
31
+ "Credit Card Number: %s","Kreditkartennummer: %s"
32
+ "Credit Card Number: xxxx-%s","Kreditkartennummer: xxxx-%s"
33
+ "Credit Card Type: %s","Kreditkartentyp: %s"
34
+ "Expiration Date: %s/%s","Gültig bis: %s/%s"
35
+ "Credit Card Types","Mögliche Kreditkarten"
36
+ "The amount will be booked from your credit card<BR>with <B>%s</B> note.","Der Betrag wird von Ihrer Kreditkarte mit dem<BR>Verwendungszweck <B>%s</B> abgebucht."
37
+ "This is not a valid account number.","Die Kontonummer ist nicht gültig!"
38
+ "This is not a valid bank sorting code.","Die Bankleitzahl ist nicht gültig!"
39
+ "Direct Debit","Lastschrift"
40
+ "Credit Card","Kreditkarte"
41
+ "Creditcard","Kreditkarte"
42
+ "3D-Secure Credit Card","3D-Secure Kreditkarte"
43
+ "You will be redirected to Novalnet AG 3D-Secure in a few seconds.","Sie werden in ein paar Sekunden an das 3D-Secure Gateway der Firma Novalnet weitergeleitet"
44
+ "Customer was redirected to Novalnet.","Der Kunde wurde zum Novalnet Gateway weitergeleitet"
45
+ "Customer successfully returned from Novalnet","Der Kunde kehrte erfolgreich vom Novalnet Gateway zurück"
46
+ "Customer was rejected by Novalnet","Der Kunde wurde vom Novalnet Gateway zurückgewiesen"
47
+ "Prepayment","Vorkasse"
48
+ "Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.","Bemerkung: Nach dem Absenden Ihrer Bestellung wird Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet."
49
+ "Payment Duration", "Zahlbar in Tagen"
50
+ "--Please Select--","--Bitte wählen--"
51
+ "Invoice","Rechnung"
52
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
53
+ "to following account:","auf folgendes Konto:"
54
+ "I accept the ACDC check","'Der acdc-Check wird akzeptiert'"
55
+ "This is a required field","Das ist ein Pflichtfeld"
56
+ "CC","Kreditkarte"
57
+ "Cc","Kreditkarte"
58
+ "Method","Zahlart"
59
+ "Due at","Gültig bis"
60
+ "The Bank details will be emailed to you soon after the completion of checkout process","Die Bankverbindung wird Ihnen nach Abschluss Ihrer Bestellung per E-Mail zugeschickt"
61
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
62
+ "Please transfer the amount to following account","Bitte ueberweisen sie den Betrag auf folgendes Konto"
63
+ "Account Holder2","Kontoinhaber"
64
+ "Bank","Bank"
65
+ "Amount", "Betrag"
66
+ "Reference","Verwendungszweck"
67
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
68
+ "to following account","auf folgendes Konto"
69
+ "Please note that the Transfer can only be identified with the above mentioned Reference","Bitte beachten Sie, dass die Ueberweisung nur bearbeitet werden kann, wenn der oben angegebene Verwendungszweck verwendet wird"
70
+ "The ACDC-Check accepted","Der ACDC-Check wird akzeptiert"
71
+ "accepted","wird akzeptiert"
72
+ "ACDC-Check","ACDC-Check"
73
+ "The","Der"
74
+ "Month","Monat"
75
+ "Year","Jahr"
76
+ "Direct Debit German","Lastschrift Deutschland"
77
+ "Direct Debit Austria","Lastschrift Österreich"
78
+ "Booking Reference","Verwendungszweck"
79
+ "The Bankcode must have a length of at least 8 digits","Die BLZ muss mindestens 8-stellig sein"
80
+ "The Bankcode must have a length of at least 5 digits","Die BLZ muss mindestens 5-stellig sein"
81
+ "You must check ACDC","You must check ACDC"
82
+ "Notice for Clients","Hinweis für Kunden"
83
+ "Pay by Call","Per Telefon"
84
+ "Phonepayment","Per Telefon"
85
+ "Error","Fehler"
86
+ "Order Price not found","Bestellsumme nicht gefunden"
87
+ "Amount below 0.90 Euro and above 10.00 Euro is not accepted","Betraege unter 0.90 Euro und ueber 10.00 Euro koennen nicht verarbeitet werden bzw. werden nicht akzeptiert!"
88
+ "Params (aryResponse) missing","Params (aryResponse) fehlt"
89
+ "Following steps are required to complete the telephone payment process","Folgende Schritte sind noetig um Ihre Zahlung abzuschliessen"
90
+ "Step","Schritt"
91
+ "Please dial this number","Bitte rufen Sie diese Telefonnummer an"
92
+ "Please wait for the Signal tone and hangup the reciever","Bitte warten Sie auf den Signalton und legen Sie dann den Hoerer auf"
93
+ "Please click on continue after your successive call","Nach Ihrem erfolgreichen Anruf klicken Sie bitte unten auf Weiter"
94
+ "This call costs","Dieser Anruf kostet einmalig"
95
+ "inclusive tax","inkl. MwSt."
96
+ "and is only possible from German Landline Telefon connection","und ist nur vom Deutschen Festnetzanschluss moeglich"
97
+ "Response contains no XML data","Response enthält keine XML Daten"
98
+ "Did you called this number","Did you called this number"
99
+ "Billing Addr. not found","Rechnungsadresse nicht gefunden"
100
+ "User Group Excluded","Ausgeschlossene Benutzergruppe"
101
+ "Parameter missing","Parameter fehlt"
app/locale/en_US/Mage_Novalnet.csv ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Enabled"
2
+ "New order status","New order status"
3
+ "Novalnet Merchant ID","Novalnet Merchant ID"
4
+ "Title","Title"
5
+ "Novalnet Auth Code","Novalnet Auth Code"
6
+ "Novalnet Product ID","Novalnet Product ID"
7
+ "Novalnet Tariff ID","Novalnet Tariff IDD"
8
+ "Payment from applicable countries","Payment from applicable countries"
9
+ "Payment from Specific countries","Payment from Specific countries"
10
+ "DE","Germany"
11
+ "AT","Austria"
12
+ "Direct Debit","Direct Debit"
13
+ "Credit Card","Credit Card"
14
+ "Country","Country"
15
+ "Name on Card","Name on Card"
16
+ "Credit Card Type","Credit Card Type"
17
+ "Credit Card Number","Credit Card Number"
18
+ "Expiration Date","Expiration Date"
19
+ "Card Verification Number","Card Verification Number"
20
+ "What is this?","What is this?"
21
+ "Account Holder","Account Holder"
22
+ "Account Number","Account Number"
23
+ "Bank Sorting Code","Bank Sorting Code"
24
+ "Country: ","Country: "
25
+ "Account Holder: %s","Account Holder: %s"
26
+ "Account Number: %s","Account Number: %s"
27
+ "Bank Sorting Code: %s","Bank Sorting Code: %s"
28
+ "TID: %s","TID: %s"
29
+ "Name on Card: %s","Name on Card: %s"
30
+ "Credit Card Number: %s","Credit Card Number: %s"
31
+ "Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s"
32
+ "Credit Card Type: %s","Credit Card Type: %s"
33
+ "Expiration Date: %s/%s","Expiration Date: %s/%s"
34
+ "Credit Card Types","Credit Card Types"
35
+ "The amount will be booked from your credit card<BR>with <B>%s</B> note.","The amount will be booked from your credit card<BR>with <B>%s</B> note."
36
+ "This is not a valid account number.","This is not a valid account number!"
37
+ "This is not a valid bank sorting code.","This is not a valid bank sorting code!"
38
+ "Direct Debit","Direct Debit"
39
+ "Credit Card","Credit Card"
40
+ "Creditcard","Credit Card"
41
+ "3D-Secure Credit Card","3D-Secure Credit Card"
42
+ "You will be redirected to Novalnet AG 3D-Secure in a few seconds.","You will be redirected to Novalnet AG 3D-Secure in a few seconds."
43
+ "Prepayment","Prepayment"
44
+ "Note: after submitting your order an email with bank transfer data of the Novalnet AG will be sent to you.","Bemerkung: Nach dem Absenden Ihrer Bestellung wird Ihnen eine Email mit den Bankdaten der Novalnet AG an Sie versendet."
45
+ "Payment Duration", "Zahlbar in Tagen"
46
+ "--Please Select--","--Please Select--"
47
+ "Invoice","Invoice"
48
+ "Please transfer the amount at the latest, untill","Bitte ueberweisen Sie den Betrag spaetestens bis zum"
49
+ "to following account:","auf folgendes Konto:"
50
+ "I accept the ACDC check","'Der acdc-Check wird akzeptiert'"
51
+ "This is a required field","This is a required field"
52
+ "CC","Credit Card"
53
+ "Cc","Credit Card"
54
+ "Method","Method"
55
+ "Due at","Due at"
56
+ "The Bank details will be emailed to you soon after the completion of checkout process","The Bank details will be emailed to you soon after the completion of checkout process"
57
+ "Please transfer the amount at the latest, untill","Please transfer the amount at the latest, untill"
58
+ "Please transfer the amount to following account","Please transfer the amount to following account"
59
+ "Account Holder2","Account Holder"
60
+ "Bank","Bank"
61
+ "Amount","Amount"
62
+ "Reference","Reference"
63
+ "Please note that the Transfer can only be identified with the above mentioned Reference","Please note that the Transfer can only be identified with the above mentioned Reference"
64
+ "Please transfer the amount at the latest, untill","Please transfer the amount at the latest, untill"
65
+ "to following account","to following account"
66
+ "Please note that the Transfer can only be identified with the above mentioned Reference","Please note that the Transfer can only be identified with the above mentioned Reference"
67
+ "ACDC-Check accepted","ACDC-Check accepted"
68
+ "accepted","accepted"
69
+ "ACDC-Check","ACDC-Check"
70
+ "The","The"
71
+ "Month","Month"
72
+ "Year","Year"
73
+ "Direct Debit German","Direct Debit German"
74
+ "Direct Debit Austria","Direct Debit Austria"
75
+ "Booking Reference","Booking Reference"
76
+ "The Bankcode must have a length of at least 8 digits","The Bankcode must have a length of at least 8 digits"
77
+ "The Bankcode must have a length of at least 5 digits","The Bankcode must have a length of at least 5 digits"
78
+ "You must check ACDC","Sie m��ssen ACAC aktivieren"
79
+ "Notice for Clients","Notice for Clients"
80
+ "Pay by Call","Pay by Call"
81
+ "Phonepayment","Phonepayment"
82
+ "Error","Error"
83
+ "Order Price not found","Order Price not found"
84
+ "Amount below 0.90 Euro and above 10.00 Euro is not accepted","Amount below 0.90 Euro and above 10.00 Euro is not accepted"
85
+ "Params (aryResponse) missing","Params (aryResponse) missing"
86
+ "Following steps are required to complete the telephone payment process","Following steps are required to complete the telephone payment process"
87
+ "Step","Step"
88
+ "Please dial the following number","Please dial the following number"
89
+ "Please wait for the Signal tone and hangup the reciever","Please wait for the Signal tone and hangup the reciever"
90
+ "Please click on continue after your successive call","Please click on continue after your successive call"
91
+ "This call costs","This call costs"
92
+ "inclusive tax","inclusive tax"
93
+ "and is only possible from German Landline Telefon connection","and is only possible from German Landline Telefon connection"
94
+ "Response contains no XML data","Response contains no XML data"
95
+ "Did you called this number","Haben Sie diese Nummer angerufen"
96
+ "Billing Addr. not found","Billing Addr. not found"
97
+ "User Group Excluded","User Group Excluded"
98
+ "Parameter missing","Parameter missing"
package.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Novalnet</name>
4
+ <version>1.1.9</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Novalnet AG ist ein deutsches EPayment - Unternehmen, bietet alle relevanten Zahlungsarten weltweit. / Novalnet is a German based payment service provider, which offers all the available payments and solutions worldwide.</summary>
10
+ <description>The NOVALNET AG is an essential component of e-Payment platform that facilitates your company to process all type of payments. As one of the leading company in Online-Payment the NOVALNET AG provides its customers an individual, technically qualified secured Payment system and also the best possible support throughout. NOVALNET AG is not only an e-Payment provider but also we offer our Merchants an optimal strategic solution for easy payment processing which is pocket-friendly for our customer.</description>
11
+ <notes>1. Neues:
12
+
13
+ Nun ist das Anlegen einer Teilgutschrift m&#xF6;glich.
14
+
15
+ 2. Bugfixing:
16
+
17
+ Wenn im Adminbereich f&#xFC;r einen Kunden eine Bestellung angelegt werden sollte, kam es wegen einer fehlenden Template-Datei zur Fehlermeldung.</notes>
18
+ <authors><author><name>Dixon Rajdaniel</name><user>auto-converted</user><email>dr@novalnet.de</email></author></authors>
19
+ <date>2009-10-28</date>
20
+ <time>18:10:46</time>
21
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="novalnet"><dir name="cc"><file name="form.phtml" hash="f533486929ca1e56736e72356888f1d2"/><file name="info.phtml" hash="cec3097648d7f53a2ce898c3ef0fdfd4"/></dir><dir name="elvaustria"><file name="form.phtml" hash="91dad9be6ecd4a19ec3e016684b76d71"/><file name="info.phtml" hash="5f1138c9af0f954851f173830cbd6f05"/></dir><dir name="elvgerman"><file name="form.phtml" hash="b4af054ac7786a541f6784ca786f3d99"/><file name="info.phtml" hash="5f1138c9af0f954851f173830cbd6f05"/></dir><dir name="invoice"><file name="form.phtml" hash="2dcea7005b16c665e523ecd362c5dd03"/><file name="info.phtml" hash="995bdbdb29181b0e68ab72e97c54ed77"/></dir><dir name="phonepayment"><file name="form.phtml" hash="715e3cfbda4eb427ad53bc0eff82f271"/><file name="info.phtml" hash="f905f359e8bafa12d31b65ce6c710743"/></dir><dir name="prepayment"><file name="form.phtml" hash="63fa5a47af9d203d1b72502b3fd958fb"/><file name="info.phtml" hash="f905f359e8bafa12d31b65ce6c710743"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="novalnet"><dir name="cc"><file name="form.phtml" hash="bb7178071092a3e31e9af5828341f988"/><file name="info.phtml" hash="cec3097648d7f53a2ce898c3ef0fdfd4"/></dir><dir name="elvaustria"><file name="form.phtml" hash="212db4d562be84815b63318b277a3e9b"/><file name="info.phtml" hash="ec2d3d68519468e377ef7f45e15a6aee"/></dir><dir name="elvgerman"><file name="form.phtml" hash="4b5bcd1deabde3204472663f5cf9fbaa"/><file name="info.phtml" hash="ec2d3d68519468e377ef7f45e15a6aee"/></dir><dir name="invoice"><file name="form.phtml" hash="a6e256c6b9dc6a291579970eed9c995a"/><file name="info.phtml" hash="f8d4c1a6d3f9fb3d8278e7fa82d661b8"/></dir><dir name="phonepayment"><file name="form.phtml" hash="ae78058f685843c6332888b9cfdd3fbc"/><file name="info.phtml" hash="6a50f5400b1c9b38629ea9314a08d3b1"/></dir><dir name="prepayment"><file name="form.phtml" hash="252af05eb2c391f9fd74d5cbcb7212da"/><file name="info.phtml" hash="6a50f5400b1c9b38629ea9314a08d3b1"/></dir><dir name="secure"><file name="failure.phtml" hash="d33ccb69a08a2195df3586bf36dc9d85"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_AT"><file name="Mage_Novalnet.csv" hash="160d4266a7639bdb9cb82e8fc5321a64"/></dir><dir name="de_CH"><file name="Mage_Novalnet.csv" hash="160d4266a7639bdb9cb82e8fc5321a64"/></dir><dir name="de_DE"><file name="Mage_Novalnet.csv" hash="160d4266a7639bdb9cb82e8fc5321a64"/></dir><dir name="en_US"><file name="Mage_Novalnet.csv" hash="4b17cfc98711b4dc4731cf461b2c1a37"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="novalnet"><file name="acdc_info.png" hash="fa69e3f3098c4f85d9d3c796d82bdf0a"/><file name="AE_Logo.png" hash="ed3b558031a1f03e1bd536ecf1233e0e"/><file name="ELV_Logo.png" hash="b265493a083f03e4da7d24c23cc55b67"/><file name="MC_Logo.png" hash="cd17acdae3de28aeff7da7952d2ef802"/><file name="NN_Logo.png" hash="e17794ee0b984fd6e1ec2b884da1a29b"/><file name="NN_Logo_T.png" hash="4d442efcb94c9fee7749022478a9d1f3"/><file name="VI_Logo.png" hash="5e963373aa1db58369730238cf311548"/></dir></dir></dir></dir></dir></target><target name="magecommunity"><dir name="Mage"><dir name="Novalnet"><dir name="Block"><dir name="Cc"><file name="Form.php" hash="d85d4f5f3cfc19abee8a3b9388de7fe7"/><file name="Info.php" hash="d68d850a9177fb401bce08e1918544f7"/></dir><dir name="Elvaustria"><file name="Form.php" hash="deaa6cef24778a8267f269852d295ea8"/><file name="Info.php" hash="2b7f9eaec38a3ae50d35eaee92e5d55d"/></dir><dir name="Elvgerman"><file name="Form.php" hash="d50a54a153cb9f72f257ed217ea6f7ab"/><file name="Info.php" hash="262c280da44f40264b1541fecc388563"/></dir><dir name="Invoice"><file name="Form.php" hash="09416dc8b843b8edbec01a2a5ae3b96c"/><file name="Info.php" hash="5525c9ae3534663b5d5da0a326c9c2fa"/></dir><dir name="Phonepayment"><file name="Form.php" hash="f7cbfe3fe0cf97ae69108ad5d4e9cf82"/><file name="Info.php" hash="1d3542d6eba2396d2ac2908b3932a181"/></dir><dir name="Prepayment"><file name="Form.php" hash="2742a76acca7614d9dcfd0ec130c7334"/><file name="Info.php" hash="9cab5ed40e74dca7fdc76b819ee11de6"/></dir><dir name="Secure"><file name="Failure.php" hash="38cdb224914c9551cbdb0b884b808a33"/><file name="Redirect.php" hash="e94a51bd54e4aa17803ec240e8f1a25d"/></dir></dir><dir name="controllers"><file name="SecureController.php" hash="740aa237bf2578a1f07820c4f0eb56c5"/></dir><dir name="etc"><file name="config.xml" hash="e67970f092ec8925d1270e765843a1ba"/><file name="system.xml" hash="49dc37fb95f89f79c55cc28eba298e58"/></dir><dir name="Helper"><file name="Data.php" hash="5cd27f9fbb7e3b7083c3d80c8354a5d3"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="bda93bd1825c67b2eac9943ec42076f1"/></dir><dir name="Novalnet"><dir name="Source"><file name="Cctype.php" hash="e886ba7736877e589abfd6f7343f98d4"/></dir><file name="Request.php" hash="87fd92d8890377ab2e3fb1dc2c1790bf"/><file name="Result.php" hash="fa36462e819f3581e27d50b201d9fb99"/></dir><file name="NovalnetCc.php" hash="af1df7a49bcac7eab38255af5ae6ad42"/><file name="NovalnetElvaustria.php" hash="dccd263b5d8347bf9ebb59ebfef2363b"/><file name="NovalnetElvgerman.php" hash="ede8649856c3121dea8e3ff9eb003c8c"/><file name="NovalnetInvoice.php" hash="b13396d17486f31f16a3c4f988a1ca93"/><file name="NovalnetPhonepayment.php" hash="d03217f22b94c4947f805102cddcf99e"/><file name="NovalnetPrepayment.php" hash="6a4e16c15da717638566b15a8b4ae191"/><file name="NovalnetSecure.php" hash="fd0bd7c771fa9bf771ae1c595b14b706"/></dir><dir name="sql"><dir name="novalnet_setup"><file name="mysql4-install-1.0.0.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.0.3-1.1.0.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.1-1.1.2.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.2-1.1.3.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.4-1.1.5.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.5-1.1.6.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.6-1.1.7.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="d15297ab95ca0b76038e32a4ad9fff79"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Novalnet.xml" hash="752f2f1df5ae673d9deafdaa6f021b32"/></dir></target></contents>
22
+ <compatible/>
23
+ <dependencies/>
24
+ </package>
skin/frontend/default/default/images/novalnet/AE_Logo.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/ELV_Logo.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/MC_Logo.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/NN_Logo.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/NN_Logo_T.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/VI_Logo.png ADDED
Binary file
skin/frontend/default/default/images/novalnet/acdc_info.png ADDED
Binary file