pn_sofortueberweisung - Version 1.1.9

Version Notes

- added translationstrings
- fixed issue with missing transaction-type "order" in magento 1.4.1.1 - 1.5

Download this release

Release Info

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


Code changes from version 1.1.8 to 1.1.9

Files changed (59) hide show
  1. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit.php +1 -1
  2. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Form.php +1 -1
  3. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Tab/Form.php +1 -1
  4. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Tabs.php +1 -1
  5. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Grid.php +1 -1
  6. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/System/Config/Fieldset/Global.php +194 -0
  7. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Paycode.php +1 -1
  8. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Pnsofortueberweisung.php +1 -1
  9. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Sofortlastschrift.php +53 -0
  10. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Sofortrechnung.php +55 -0
  11. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Info/Paycode.php +1 -1
  12. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Info/Pnsofortueberweisung.php +1 -1
  13. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Infobox.php +1 -1
  14. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Pnsofortueberweisung.php +1 -1
  15. app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Pnsofortueberweisungnotice.php +1 -1
  16. app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/Data.php +2 -2
  17. app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/Sofortlib.php +2002 -0
  18. app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/log.txt +974 -0
  19. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Abstract.php +158 -0
  20. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Convert/Order.php +1 -1
  21. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Convert/Quote.php +1 -1
  22. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Data/Form/Element/Link.php +2 -2
  23. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Mysql4/Setup.php +1 -1
  24. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Order/Invoice.php +876 -0
  25. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Order/Pdf/Invoice.php +137 -0
  26. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Params.php +1 -1
  27. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Paycode.php +1 -1
  28. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Pnsofort.php +92 -0
  29. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Pnsofortueberweisung.php +1 -1
  30. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Sofortlastschrift.php +93 -0
  31. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Sofortrechnung.php +114 -0
  32. app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/System/Config/Source/Logo.php +33 -0
  33. app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/Adminhtml/PnsofortueberweisungController.php +1 -1
  34. app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/PcsofortueberweisungController.php +1 -1
  35. app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/PnsofortueberweisungController.php +2 -2
  36. app/code/community/Paymentnetwork/Pnsofortueberweisung/etc/config.xml +2 -2
  37. app/code/community/Paymentnetwork/Pnsofortueberweisung/etc/system.xml +1 -1
  38. app/code/community/Paymentnetwork/Pnsofortueberweisung/sql/pnsofortueberweisung_setup/mysql4-install-1.1.1.php +1 -1
  39. app/design/adminhtml/default/default/template/pnsofortueberweisung/form/paycode.phtml +1 -1
  40. app/design/adminhtml/default/default/template/pnsofortueberweisung/form/sofortueberweisung.phtml +1 -1
  41. app/design/adminhtml/default/default/template/pnsofortueberweisung/info/paycode.phtml +1 -1
  42. app/design/adminhtml/default/default/template/pnsofortueberweisung/info/pdf/paycode.phtml +1 -1
  43. app/design/adminhtml/default/default/template/pnsofortueberweisung/info/pdf/sofortueberweisung.phtml +1 -1
  44. app/design/adminhtml/default/default/template/pnsofortueberweisung/info/sofortueberweisung.phtml +1 -1
  45. app/design/adminhtml/default/default/template/pnsofortueberweisung/system/config/fieldset/global.phtml +69 -0
  46. app/design/frontend/default/default/template/pnsofortueberweisung/form/paycode.phtml +1 -1
  47. app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortlastschrift.phtml +44 -0
  48. app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortrechnung.phtml +42 -0
  49. app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortueberweisung.phtml +1 -1
  50. app/design/frontend/default/default/template/pnsofortueberweisung/info/paycode.phtml +1 -1
  51. app/design/frontend/default/default/template/pnsofortueberweisung/info/sofortueberweisung.phtml +1 -1
  52. app/design/frontend/default/default/template/pnsofortueberweisung/infobox.phtml +1 -1
  53. app/locale/de_AT/Paymentnetwork_Sofortueberweisung.csv +7 -1
  54. app/locale/de_CH/Paymentnetwork_Sofortueberweisung.csv +7 -1
  55. app/locale/de_DE/Paymentnetwork_Sofortueberweisung.csv +7 -1
  56. lib/Varien/Data/Form/Element/Linkpnso.php +1 -1
  57. package.xml +8 -10
  58. skin/frontend/default/default/images/pnsofortueberweisung/sofortlastschrift.png +0 -0
  59. skin/frontend/default/default/images/pnsofortueberweisung/sofortrechnung.gif +0 -0
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Edit.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Edit.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Form.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Form.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Form.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Tab/Form.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Form.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Form.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Edit/Tabs.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Tabs.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Tabs.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/Pnsofortueberweisung/Grid.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Grid.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Grid extends Mage_Adminhtml_Block_Widget_Grid
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Grid.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_Pnsofortueberweisung_Grid extends Mage_Adminhtml_Block_Widget_Grid
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Adminhtml/System/Config/Fieldset/Global.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: PnsofortueberweisungController.php 277 2010-08-12 14:55:44Z poser $
20
+ */
21
+
22
+ class Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_System_Config_Fieldset_Global extends Mage_Adminhtml_Block_System_Config_Form_Fieldset implements Varien_Data_Form_Element_Renderer_Interface
23
+ {
24
+ /**
25
+ * Associative array of PayPal product selection elements
26
+ *
27
+ * @var array
28
+ */
29
+ protected $_elements = array();
30
+
31
+ /**
32
+ * Custom template
33
+ *
34
+ * @var string
35
+ */
36
+ protected $_template = 'pnsofortueberweisung/system/config/fieldset/global.phtml';
37
+
38
+ /**
39
+ * Render fieldset html
40
+ *
41
+ * @param Varien_Data_Form_Element_Abstract $fieldset
42
+ * @return string
43
+ */
44
+ public function render(Varien_Data_Form_Element_Abstract $fieldset)
45
+ {
46
+ foreach ($fieldset->getSortedElements() as $element) {
47
+ $htmlId = $element->getHtmlId();
48
+ $this->_elements[$htmlId] = $element;
49
+ }
50
+ $originalData = $fieldset->getOriginalData();
51
+ $this->addData(array(
52
+ 'fieldset_label' => $fieldset->getLegend(),
53
+ 'fieldset_help_url' => isset($originalData['help_url']) ? $originalData['help_url'] : '',
54
+ ));
55
+
56
+ return $this->_getHeaderHtml($fieldset).$this->toHtml().$this->_getFooterHtml($fieldset);
57
+ }
58
+
59
+ /**
60
+ * Get array of element objects
61
+ *
62
+ * @return array
63
+ */
64
+ public function getElements()
65
+ {
66
+ return $this->_elements;
67
+ }
68
+
69
+ /**
70
+ * Return checkbox html with hidden field for correct config values
71
+ *
72
+ * @param string $elementId
73
+ * @return string
74
+ */
75
+ public function getElementHtml(Varien_Data_Form_Element_Abstract $element)
76
+ {
77
+ if($element->getType() != 'checkbox')
78
+ return $element->getElementHtml();
79
+
80
+ $configValue = (string)$element->getValue();
81
+ if ($configValue) {
82
+ $element->setChecked(true);
83
+ } else {
84
+ $element->setValue('1');
85
+ }
86
+ if ($element->getCanUseDefaultValue() && $element->getInherit()) {
87
+ $element->setDisabled(true);
88
+ }
89
+
90
+ $hidden = new Varien_Data_Form_Element_Hidden(array(
91
+ 'html_id' => $element->getHtmlId() . '_value',
92
+ 'name' => $element->getName(),
93
+ 'value' => '0'
94
+ ));
95
+ $hidden->setForm($element->getForm());
96
+ return $hidden->getElementHtml() . $element->getElementHtml();
97
+ }
98
+
99
+ /**
100
+ * Whether element should be rendered in "simplified" mode
101
+ *
102
+ * @param Varien_Data_Form_Element_Abstract $element
103
+ * @return bool
104
+ */
105
+ public function getIsElementSimplified(Varien_Data_Form_Element_Abstract $element)
106
+ {
107
+ $originalData = $element->getOriginalData();
108
+ return isset($originalData['is_simplified']) && 1 == $originalData['is_simplified'];
109
+ }
110
+
111
+ /**
112
+ * Getter for element label
113
+ *
114
+ * @param Varien_Data_Form_Element_Abstract $element
115
+ * @return string
116
+ */
117
+ public function getElementLabel(Varien_Data_Form_Element_Abstract $element)
118
+ {
119
+ return $element->getLabel();
120
+ }
121
+
122
+ /**
123
+ * Getter for element comment
124
+ *
125
+ * @param Varien_Data_Form_Element_Abstract $element
126
+ * @return string
127
+ */
128
+ public function getElementComment(Varien_Data_Form_Element_Abstract $element)
129
+ {
130
+ return $element->getComment();
131
+ }
132
+
133
+ /**
134
+ * Getter for element comment
135
+ *
136
+ * @param Varien_Data_Form_Element_Abstract $element
137
+ * @return string
138
+ */
139
+ public function getElementOriginalData(Varien_Data_Form_Element_Abstract $element, $key)
140
+ {
141
+ $data = $element->getOriginalData();
142
+ return isset($data[$key]) ? $data[$key] : '';
143
+ }
144
+
145
+ /**
146
+ * Check whether checkbox has "Use default" option or not
147
+ *
148
+ * @param Varien_Data_Form_Element_Abstract $element
149
+ * @return bool
150
+ */
151
+ public function hasInheritElement(Varien_Data_Form_Element_Abstract $element)
152
+ {
153
+ return (bool)$element->getCanUseDefaultValue();
154
+ }
155
+
156
+ /**
157
+ * Return "Use default" checkbox html
158
+ *
159
+ * @param Varien_Data_Form_Element_Abstract $element
160
+ * @return string
161
+ */
162
+ public function getInheritElementHtml(Varien_Data_Form_Element_Abstract $element)
163
+ {
164
+ $elementId = $element->getHtmlId();
165
+ $inheritCheckbox = new Varien_Data_Form_Element_Checkbox(array(
166
+ 'html_id' => $elementId . '_inherit',
167
+ 'name' => preg_replace('/\[value\](\[\])?$/', '[inherit]', $element->getName()),
168
+ 'value' => '1',
169
+ 'class' => 'checkbox config-inherit',
170
+ 'onclick' => 'toggleValueElements(this, $(\'' . $elementId . '\').up())'
171
+ ));
172
+ if ($element->getInherit()) {
173
+ $inheritCheckbox->setChecked(true);
174
+ }
175
+
176
+ $inheritCheckbox->setForm($element->getForm());
177
+ return $inheritCheckbox->getElementHtml();
178
+ }
179
+
180
+ /**
181
+ * Return label for "Use default" checkbox
182
+ *
183
+ * @param Varien_Data_Form_Element_Abstract $element
184
+ * @return string
185
+ */
186
+ public function getInheritElementLabelHtml(Varien_Data_Form_Element_Abstract $element)
187
+ {
188
+ return sprintf('<label for="%s" class="inherit" title="%s">%s</label>',
189
+ $element->getHtmlId() . '_inherit',
190
+ $element->getDefaultValue(),
191
+ Mage::helper('adminhtml')->__('Use Default')
192
+ );
193
+ }
194
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Paycode.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Paycode.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Form_Paycode extends Mage_Payment_Block_Form
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Paycode.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Form_Paycode extends Mage_Payment_Block_Form
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Pnsofortueberweisung.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Pnsofortueberweisung.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Form_Pnsofortueberweisung extends Mage_Payment_Block_Form
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Form_Pnsofortueberweisung extends Mage_Payment_Block_Form
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Sofortlastschrift.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 190 2010-06-02 14:34:14Z thoma $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Block_Form_Sofortlastschrift extends Mage_Payment_Block_Form
22
+ {
23
+ /**
24
+ * Init default template for block
25
+ */
26
+ protected function _construct()
27
+ {
28
+ $this->setTemplate('pnsofortueberweisung/form/sofortlastschrift.phtml');
29
+ if($this->isDisplayText()) {
30
+ $this->setMethodTitle('');
31
+ $this->setMethodLabelAfterHtml('<img src="'.$this->getImageUrl().'">');
32
+ }
33
+ return parent::_construct();
34
+ }
35
+
36
+ /**
37
+ * Retrieve payment configuration object
38
+ *
39
+ * @return Mage_Payment_Model_Config
40
+ */
41
+ protected function _getConfig()
42
+ {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ public function getImageUrl() {
47
+ return Mage::getStoreConfig('payment/pnsofort/logourl').Mage::helper('pnsofortueberweisung')->__('de').'/sl/'.Mage::getStoreConfig('payment/sofort/logo').'.png';
48
+ }
49
+
50
+ public function isDisplayText() {
51
+ return substr(Mage::getStoreConfig('payment/sofort/logo'), 0, 4) == 'logo';
52
+ }
53
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Form/Sofortrechnung.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 190 2010-06-02 14:34:14Z thoma $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Block_Form_Sofortrechnung extends Mage_Payment_Block_Form
22
+ {
23
+ /**
24
+ * Init default template for block
25
+ */
26
+ protected function _construct()
27
+ {
28
+ $this->setTemplate('pnsofortueberweisung/form/sofortrechnung.phtml');
29
+ if($this->isDisplayText()) {
30
+ $this->setMethodTitle('');
31
+ $this->setMethodLabelAfterHtml('<img src="'.$this->getImageUrl().'">');
32
+ }
33
+ return parent::_construct();
34
+ }
35
+
36
+ /**
37
+ * Retrieve payment configuration object
38
+ *
39
+ * @return Mage_Payment_Model_Config
40
+ */
41
+ protected function _getConfig()
42
+ {
43
+ return Mage::getSingleton('payment/config');
44
+ }
45
+
46
+ public function getImageUrl()
47
+ {
48
+ return Mage::getStoreConfig('payment/pnsofort/logourl').'de/sr/'.Mage::getStoreConfig('payment/sofort/logo').'.png';
49
+ }
50
+
51
+ public function isDisplayText()
52
+ {
53
+ return substr(Mage::getStoreConfig('payment/sofort/logo'), 0, 4) == 'logo';
54
+ }
55
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Info/Paycode.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Paycode.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Info_Paycode extends Mage_Payment_Block_Info
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Paycode.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Info_Paycode extends Mage_Payment_Block_Info
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Info/Pnsofortueberweisung.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Pnsofortueberweisung.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Info_Pnsofortueberweisung extends Mage_Payment_Block_Info
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Info_Pnsofortueberweisung extends Mage_Payment_Block_Info
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Infobox.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Infobox.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Infobox extends Mage_Core_Block_Template
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Infobox.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Infobox extends Mage_Core_Block_Template
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Pnsofortueberweisung.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Pnsofortueberweisung.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Pnsofortueberweisung extends Mage_Core_Block_Abstract
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Pnsofortueberweisung extends Mage_Core_Block_Abstract
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Block/Pnsofortueberweisungnotice.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Pnsofortueberweisungnotice.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Pnsofortueberweisungnotice extends Mage_Core_Block_Template
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisungnotice.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Block_Pnsofortueberweisungnotice extends Mage_Core_Block_Template
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/Data.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Data.php 495 2011-05-25 13:06:11Z poser $
20
  */
21
 
22
  class Paymentnetwork_Pnsofortueberweisung_Helper_Data extends Mage_Core_Helper_Abstract
@@ -34,7 +34,7 @@ class Paymentnetwork_Pnsofortueberweisung_Helper_Data extends Mage_Core_Helper_A
34
  $this->password = $password;
35
  $this->password2 = '';
36
  $this->hashfunction = $hashfunction;
37
- $this->version = 'pn_mag_1.1.8';
38
  $this->formActionUrl = 'https://www.sofortueberweisung.de/payment/start?';
39
 
40
 
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Data.php 736 2011-06-06 13:50:46Z poser $
20
  */
21
 
22
  class Paymentnetwork_Pnsofortueberweisung_Helper_Data extends Mage_Core_Helper_Abstract
34
  $this->password = $password;
35
  $this->password2 = '';
36
  $this->hashfunction = $hashfunction;
37
+ $this->version = 'pn_mag_1.1.9';
38
  $this->formActionUrl = 'https://www.sofortueberweisung.de/payment/start?';
39
 
40
 
app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/Sofortlib.php ADDED
@@ -0,0 +1,2002 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @version SofortLib 1.1.0 - $Date: 2011-02-07 12:01:24 +0100 (Mo, 07 Feb 2011) $
4
+ * @author Payment Network AG (integration@payment-network.com)
5
+ * @link http://www.payment-network.com/
6
+ *
7
+ * Copyright (c) 2010 Payment Network AG
8
+ * $Id: sofortLib.php 433 2011-02-07 11:01:24Z poser $
9
+ *
10
+ */
11
+
12
+ //dummy for now, so we can easily include our standard library
13
+ class Paymentnetwork_Pnsofortueberweisung_Helper_Sofortlib
14
+ {
15
+ }
16
+
17
+ /**
18
+ * interface for Payment Network XML-Api
19
+ *
20
+ * this class implements basic http authentication and a xml-parser
21
+ * for parsing response messages
22
+ *
23
+ * requires libcurl and openssl
24
+ *
25
+ * Copyright (c) 2010 Payment Network AG
26
+ *
27
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
28
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
29
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
30
+ *
31
+ */
32
+ class SofortLib_Abstract extends SofortLib
33
+ {
34
+
35
+ /**
36
+ * generate XML message
37
+ * @return string
38
+ */
39
+ function toXml() {
40
+ trigger_error('Missing implementation of toXml()', E_USER_NOTICE);
41
+ }
42
+
43
+ /**
44
+ * Override this callback
45
+ * its being called everytime we find a closing xml-tag
46
+ *
47
+ * @protected
48
+ * @param string $data data of this tag
49
+ * @param string $tag name of this tag
50
+ */
51
+ function onParseTag($data, $tag) {
52
+ trigger_error('Missing implementation of onParseTag()', E_USER_NOTICE);
53
+ }
54
+ }
55
+
56
+ /**
57
+ * This class is for confirming and changing invoices
58
+ *
59
+ * eg: $confirmObj = new SofortLib_ConfirmSr('yourapikey');
60
+ *
61
+ * $confirmObj->confirmInvoice('1234-456-789654-31321')->sendRequest();
62
+ *
63
+ * Copyright (c) 2010 Payment Network AG
64
+ *
65
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
66
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
67
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
68
+ *
69
+ */
70
+ class SofortLib_ConfirmSr extends SofortLib_Abstract
71
+ {
72
+ var $parameters;
73
+ var $file;
74
+ var $error;
75
+
76
+
77
+ /**
78
+ * create new confirm object
79
+ *
80
+ * @param String $apikey your API-key
81
+ */
82
+ function SofortLib_ConfirmSr($apikey) {
83
+ $this->SofortLib($apikey, 'https://api.sofort.com/api/xml/');
84
+ }
85
+
86
+ /**
87
+ * generate XML message
88
+ * @return string
89
+ */
90
+ function toXml() {
91
+ $msg = '<?xml version="1.0" encoding="UTF-8"?>';
92
+ $msg .= $this->_arrayToXml($this->parameters, 'confirm_sr');
93
+
94
+ return $msg;
95
+ }
96
+
97
+ /**
98
+ * send this message and get response
99
+ *
100
+ * @return SofortLib_TransactionData $this
101
+ */
102
+ function sendRequest() {
103
+ $data = $this->_sendMessage($this->toXml());
104
+ $this->_initParser();
105
+ $this->_parse($data);
106
+
107
+ $this->log(__CLASS__ . ' -> '. $this->formatXmlString($this->toXml()));
108
+ $this->log(__CLASS__ . ' <- '. $this->formatXmlString($data));
109
+
110
+ return $this;
111
+ }
112
+
113
+ /**
114
+ * Parser for response from server
115
+ * this callback will be called for every closing xml-tag
116
+ * @private
117
+ */
118
+ function onParseTag($data, $tag){
119
+ switch($tag) {
120
+ case 'download_url':
121
+ $this->file = $data;
122
+ break;
123
+ default:
124
+ break;
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Set the transaction you want to confirm/change
130
+ * @param String $arg Transaction Id
131
+ * @return SofortLib_ConfirmSr
132
+ */
133
+ function setTransaction($arg) {
134
+ $this->parameters['transaction'] = $arg;
135
+ return $this;
136
+ }
137
+
138
+ /**
139
+ * add one item to the cart if you want to change the invoice
140
+ *
141
+ * @param string $productNumber product number, EAN code, ISBN number or similar
142
+ * @param string $title description of this title
143
+ * @param double $unit_price gross price of one item
144
+ * @param int $productType product type number see manual
145
+ * @param string $description additional description of this item
146
+ * @param int $quantity default 1
147
+ * @param int $tax tax in percent, default 19
148
+ */
149
+ function addItem($productNumber, $title, $unit_price, $productType = 0, $description = '', $quantity = 1, $tax = 19) {
150
+ $unit_price = number_format($unit_price, 2, '.','');
151
+ $tax = number_format($tax, 2, '.','');
152
+ $quantity = intval($quantity);
153
+ $this->parameters['items'][] = array('product_number' => $productNumber,
154
+ 'product_type' => $productType, 'title' => $title, 'description' => $description,
155
+ 'quantity' => $quantity, 'unit_price' => $unit_price, 'tax' => $tax);
156
+ }
157
+
158
+ /**
159
+ * cancel the invoice
160
+ * @param string $transaction the transaction id
161
+ * @return SofortLib_ConfirmSr
162
+ */
163
+ function cancelInvoice($transaction = '') {
164
+ if(empty($transaction) && array_key_exists('transaction', $this->parameters)) {
165
+ $transaction = $this->parameters['transaction'];
166
+ }
167
+
168
+ if(!empty($transaction)) {
169
+ $this->parameters = NULL;
170
+ $this->parameters['transaction'] = $transaction;
171
+ $this->parameters['items'] = array();
172
+ }
173
+
174
+ return $this;
175
+ }
176
+
177
+ /**
178
+ * confirm the invoice
179
+ * @param string $transaction the transaction id
180
+ * @return SofortLib_ConfirmSr
181
+ */
182
+ function confirmInvoice($transaction = '') {
183
+ if(empty($transaction) && array_key_exists('transaction', $this->parameters)) {
184
+ $transaction = $this->parameters['transaction'];
185
+ }
186
+
187
+ if(!empty($transaction)) {
188
+ $this->parameters = NULL;
189
+ $this->parameters['transaction'] = $transaction;
190
+ }
191
+
192
+ return $this;
193
+ }
194
+
195
+
196
+ /**
197
+ * after you you changed/confirmed an invoice you
198
+ * can download the new invoice-pdf with this function
199
+ * @return string url
200
+ */
201
+ function getInvoiceUrl() {
202
+ return $this->file;
203
+ }
204
+ }
205
+
206
+
207
+ /**
208
+ * This class is for retrieving information about transactions,
209
+ * you can search by transaction-id or by date
210
+ *
211
+ * eg: $transactionDataObj = new SofortLib_TransactionData('yourapikey');
212
+ *
213
+ * $transactionDataObj->setTransaction('1234-456-789654-31321')->sendRequest();
214
+ *
215
+ * echo $transactionDataObj->getStatus();
216
+ *
217
+ * Copyright (c) 2010 Payment Network AG
218
+ *
219
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
220
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
221
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
222
+ *
223
+ */
224
+ class SofortLib_TransactionData extends SofortLib_Abstract
225
+ {
226
+ var $transaction = array();
227
+ var $time=array();
228
+ var $response = array(array());
229
+ var $count = 0;
230
+
231
+ function SofortLib_TransactionData($apikey) {
232
+ $this->SofortLib($apikey, 'https://api.sofort.com/api/xml/');
233
+ }
234
+
235
+ /**
236
+ * use this function if you want to request
237
+ * detailed information about a single transaction
238
+ *
239
+ * @param String $arg
240
+ * @return SofortLib_TransactionData $this
241
+ */
242
+ function setTransaction($arg) {
243
+ $this->transaction = array($arg);
244
+ return $this;
245
+ }
246
+
247
+ /**
248
+ * use this function if you want to request
249
+ * detailed information about several transactions
250
+ * at once
251
+ *
252
+ * @param String $arg
253
+ * @return SofortLib_TransactionData $this
254
+ */
255
+ function addTransaction($arg) {
256
+ $this->transaction[] = $arg;
257
+ return $this;
258
+ }
259
+
260
+ /**
261
+ * you can request all transactions of a certain time
262
+ * period
263
+ *
264
+ * use setNumber() to limit the results
265
+ *
266
+ * @param string $from date possible formats: 2011-01-25 or 2011-01-25T19:01:02+02:00
267
+ * @param string $to date possible formats: 2011-01-25 or 2011-01-25T19:01:02+02:00
268
+ * @return SofortLib_TransactionData $this
269
+ * @see setNumber()
270
+ */
271
+ function setTime($from, $to) {
272
+ $this->time['from_time'] = $from;
273
+ $this->time['to_time'] = $to;
274
+ return $this;
275
+ }
276
+
277
+ /**
278
+ * you can limit the number of results
279
+ *
280
+ * @param int $number number of results [0-100]
281
+ * @param int $page result page
282
+ * @return SofortLib_TransactionData $this
283
+ * @see setTime()
284
+ */
285
+ function setNumber($number, $page='1') {
286
+ $this->time['number'] = $number;
287
+ $this->time['page'] = $page;
288
+ return $this;
289
+ }
290
+
291
+ /**
292
+ * send this message and get response
293
+ *
294
+ * @return SofortLib_TransactionData $this
295
+ */
296
+ function sendRequest() {
297
+ $data = $this->_sendMessage($this->toXml());
298
+ $this->_initParser();
299
+ $this->_parse($data);
300
+
301
+ $this->log(__CLASS__ . ' -> '. $this->formatXmlString($this->toXml()));
302
+ $this->log(__CLASS__ . ' <- '. $this->formatXmlString($data));
303
+
304
+ return $this;
305
+ }
306
+
307
+ /**
308
+ * Parser for response from server
309
+ * this callback will be called for every closing xml-tag
310
+ * @private
311
+ */
312
+ function onParseTag($data, $tag){
313
+ switch($tag) {
314
+ case 'transaction_details':
315
+ if($this->_getParentTag() == 'transactions') {
316
+ array_push($this->response, array());
317
+ $this->count += 1;
318
+ }
319
+ break;
320
+ case 'status':
321
+ case 'status_reason':
322
+ case 'payment_method':
323
+ case 'amount':
324
+ case 'currency_code':
325
+ case 'transaction':
326
+ case 'time':
327
+ if($this->_getParentTag() == 'transaction_details') {
328
+ $i = count($this->response)-1;
329
+ $this->response[$i][$tag] = $data;
330
+ }
331
+ break;
332
+ case 'reason':
333
+ case 'user_variable':
334
+ if($this->_getParentTag() == 'user_variables' || $this->_getParentTag() == 'reasons') {
335
+ $i = count($this->response)-1;
336
+ $this->response[$i][$tag][] = $data;
337
+ }
338
+ break;
339
+ case 'salutation':
340
+ case 'firstname':
341
+ case 'lastname':
342
+ case 'street':
343
+ case 'street_number':
344
+ case 'zipcode':
345
+ case 'city':
346
+ case 'country_code':
347
+ if($this->_getParentTag() == 'invoice_address' || $this->_getParentTag() == 'shipping_address') {
348
+ $i = count($this->response)-1;
349
+ $this->response[$i][$this->_getParentTag()][$tag] = $data;
350
+ }
351
+ break;
352
+ case 'transactions':
353
+ array_pop($this->response); //we added one level too many
354
+ $this->count -= 1;
355
+ break;
356
+ default:
357
+ break;
358
+ }
359
+ }
360
+
361
+ /**
362
+ * generate XML message
363
+ * @return string
364
+ */
365
+ function toXml() {
366
+ $msg = '<?xml version="1.0" encoding="UTF-8"?>';
367
+ if(count($this->transaction) > 0) {
368
+ $msg .= '<transaction_request>';
369
+ $msg .= $this->_indexedArrayToXmlList($this->transaction, 'transaction');
370
+ $msg .= '</transaction_request>';
371
+ }
372
+ else
373
+ $msg .= $this->_arrayToXml($this->time, 'transaction_request');
374
+
375
+ return $msg;
376
+ }
377
+
378
+ /**
379
+ * returns the InvoiceAddress
380
+ * @param int $i if you request multiple transactions at once you can set the number here
381
+ * @return array
382
+ */
383
+ function getInvoiceAddress($i = 0) {
384
+ if($i < 0 || $i > $this->count)
385
+ return false;
386
+
387
+ return $this->response[$i]['invoice_address'];
388
+ }
389
+
390
+ /**
391
+ * returns the ShippingAddress
392
+ * @param int $i if you request multiple transactions at once you can set the number here
393
+ * @return array
394
+ */
395
+ function getShippingAddress($i = 0) {
396
+ if($i < 0 || $i > $this->count)
397
+ return false;
398
+
399
+ return $this->response[$i]['shipping_address'];
400
+ }
401
+
402
+ /**
403
+ * returns the status of a transaction
404
+ * @param int $i if you request multiple transactions at once you can set the number here
405
+ * @return string pending|received|loss|refunded
406
+ */
407
+ function getStatus($i = 0) {
408
+ if($i < 0 || $i > $this->count)
409
+ return false;
410
+
411
+ return $this->response[$i]['status'];
412
+ }
413
+
414
+ /**
415
+ * returns the detailed status description of a transaction
416
+ * @param int $i if you request multiple transactions at once you can set the number here
417
+ * @return string message
418
+ */
419
+ function getStatusReason($i = 0) {
420
+ if($i < 0 || $i > $this->count)
421
+ return false;
422
+
423
+ return $this->response[$i]['status_reason'];
424
+ }
425
+
426
+ /**
427
+ * returns the total amount of a transaction
428
+ * @param int $i if you request multiple transactions at once you can set the number here
429
+ * @return double amount
430
+ */
431
+ function getAmount($i = 0) {
432
+ if($i < 0 || $i > $this->count)
433
+ return false;
434
+
435
+ return $this->response[$i]['amount'];
436
+ }
437
+
438
+ /**
439
+ * returns the currency of a transaction
440
+ * @param int $i if you request multiple transactions at once you can set the number here
441
+ * @return string EUR|USD|GBP....
442
+ */
443
+ function getCurrency($i = 0) {
444
+ if($i < 0 || $i > $this->count)
445
+ return false;
446
+
447
+ return $this->response[$i]['currency_code'];
448
+ }
449
+
450
+ /**
451
+ * returns the payment method of a transaction
452
+ * @param int $i if you request multiple transactions at once you can set the number here
453
+ * @return string su|sr|sl|sv|ls
454
+ */
455
+ function getPaymentMethod($i = 0) {
456
+ if($i < 0 || $i > $this->count)
457
+ return false;
458
+
459
+ return $this->response[$i]['payment_method'];
460
+ }
461
+
462
+ /**
463
+ * returns the transaction id of a transaction
464
+ * @param int $i if you request multiple transactions at once you can set the number here
465
+ * @return string transaction id
466
+ */
467
+ function getTransaction($i = 0) {
468
+ if($i < 0 || $i > $this->count)
469
+ return false;
470
+
471
+ return $this->response[$i]['transaction'];
472
+ }
473
+
474
+ /**
475
+ * returns the user variable of a transaction
476
+ * @param int $n number of the variable
477
+ * @param int $i if you request multiple transactions at once you can set the number here
478
+ * @return string the content of this variable
479
+ */
480
+ function getUserVariable($n, $i = 0) {
481
+ if($i < 0 || $i > $this->count)
482
+ return false;
483
+
484
+ return $this->response[$i]['user_variable'][$n];
485
+ }
486
+
487
+ /**
488
+ * returns the time of a transaction
489
+ * @param int $i if you request multiple transactions at once you can set the number here
490
+ * @return string time e.g. 2011-01-01T12:35:09+01:00 use strtotime() to convert it to unixtime
491
+ */
492
+ function getTime($i = 0) {
493
+ if($i < 0 || $i > $this->count)
494
+ return false;
495
+
496
+ return $this->response[$i]['time'];
497
+ }
498
+ }
499
+
500
+
501
+ /**
502
+ * This class should be called when you receive a notification about
503
+ * a status change.
504
+ *
505
+ * In rare cases notifications might be double or even wrong alltogether (if
506
+ * send by a malicious user). So don't use this to change your status but instead
507
+ * use the transaction id to query the webservice for detailed data (SofortLib_TransactionData)
508
+ *
509
+ * eg: $notificationObj = new SofortLib_Notification();
510
+ *
511
+ * $transactionId = $notificationObj->getNotification();
512
+ *
513
+ * Copyright (c) 2010 Payment Network AG
514
+ *
515
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
516
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
517
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
518
+ *
519
+ */
520
+ class SofortLib_Notification extends SofortLib_Abstract
521
+ {
522
+ var $transactionId = '';
523
+ var $time;
524
+ var $parameters = array();
525
+
526
+ /**
527
+ * creates a new notification object for receiving notifications
528
+ */
529
+ function SofortLib_Notification() {
530
+ $this->SofortLib('', '');
531
+ }
532
+
533
+ /**
534
+ * reads the input and tries to read the transaction id
535
+ *
536
+ * @return array transactionid=>status
537
+ */
538
+ function getNotification() {
539
+ $data = file_get_contents('php://input');
540
+
541
+
542
+ //we don't really need a huge parser, simply extract the transaction-id
543
+ if(!preg_match('#<transaction>([0-9a-z-]+)</transaction>#i', $data, $matches)) {
544
+ $this->log(__CLASS__ . ' <- '. $data);
545
+ $this->errors['error']['message'] = 'could not parse message';
546
+ return false;
547
+ }
548
+ $this->transactionId = $matches[1];
549
+
550
+ $this->log(__CLASS__ . ' <- '. $this->formatXmlString($data));
551
+
552
+
553
+ preg_match('#<time>(.+)</time>#i', $data, $matches);
554
+ $this->time = $matches[1];
555
+
556
+ // $this->_initParser();
557
+ // $this->_parse($data);
558
+
559
+ return $this->transactionId;
560
+ }
561
+
562
+
563
+ ////not in use!!////
564
+ /**
565
+ * Parser for response from server
566
+ * this callback will be called for every closing xml-tag
567
+ * @private
568
+ */
569
+ function onParseTag($data, $tag){
570
+ switch($tag) {
571
+ case 'transaction':
572
+ $this->transactionId = $data;
573
+ break;
574
+ case 'time':
575
+ $this->time = $data;
576
+ break;
577
+ break;
578
+ }
579
+ }
580
+
581
+ function getTime() {
582
+ return $this->time;
583
+ }
584
+
585
+
586
+ function getTransactionId() {
587
+ return $this->transactionId;
588
+ }
589
+ }
590
+
591
+ /**
592
+ * Setup a multipay payment session
593
+ * after the configuration of multiple payment methods you will receive
594
+ * an url and a transaction id, your customer should be redirected to this
595
+ * url you can use the transaction id for future reference of this payment
596
+ *
597
+ * eg: TODO
598
+ *
599
+ * Copyright (c) 2010 Payment Network AG
600
+ *
601
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
602
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
603
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
604
+ *
605
+ */
606
+ class SofortLib_Multipay extends SofortLib_Abstract
607
+ {
608
+ var $transactionId;
609
+ var $paymentUrl;
610
+ var $projectId;
611
+ var $parameters;
612
+ var $xml;
613
+
614
+ /**
615
+ * create a new payment object
616
+ * @param string $apikey your API key
617
+ * @param int $projectId your project id
618
+ */
619
+ function SofortLib_Multipay($apikey, $projectId) {
620
+ $this->SofortLib($apikey, 'https://api.sofort.com/api/xml/');
621
+ $this->parameters['project_id'] = $projectId;
622
+ }
623
+
624
+ /**
625
+ * the language code will help in determing what language to
626
+ * use when displaying the payment form, other data like
627
+ * browser settings and ip will be used as well
628
+ *
629
+ * @param string $arg de|en|nl|fr ...
630
+ * @return SofortLib_Multipay
631
+ */
632
+ function setLanguageCode($arg) {
633
+ $this->parameters['language_code'] = $arg;
634
+ return $this;
635
+ }
636
+
637
+ /**
638
+ * timeout how long this transaction configuration will be valid for
639
+ * this is the time between the generation of the payment url and
640
+ * the user completing the form, should be at least two to three minutes
641
+ * defaults to unlimited if not set
642
+ *
643
+ * @param int $arg timeout in seconds
644
+ * @return SofortLib_Multipay
645
+ */
646
+ function setTimeout($arg) {
647
+ $this->parameters['timeout'] = $arg;
648
+ return $this;
649
+ }
650
+
651
+ /**
652
+ * set the email address of the customer
653
+ * this will be used for sofortvorkasse and sofortrechnung
654
+ *
655
+ * @param string $arg email address
656
+ * @return SofortLib_Multipay
657
+ */
658
+ function setEmailCustomer($arg) {
659
+ $this->parameters['email_customer'] = $arg;
660
+ return $this;
661
+ }
662
+
663
+ /**
664
+ * set the phone number of the customer
665
+ *
666
+ * @param string $arg phone number
667
+ * @return SofortLib_Multipay
668
+ */
669
+ function setPhoneNumberCustomer($arg) {
670
+ $this->parameters['phone_customer'] = $arg;
671
+ return $this;
672
+ }
673
+
674
+ /**
675
+ * add another variable this can be your internal order id or similar
676
+ *
677
+ * @param string $arg the contents of the variable
678
+ * @return SofortLib_Multipay
679
+ */
680
+ function addUserVariable($arg) {
681
+ $this->parameters['user_variables'][] = $arg;
682
+ return $this;
683
+ }
684
+
685
+ /**
686
+ * set data of account
687
+ *
688
+ * @param string $bank_code bank code of bank
689
+ * @param string $account_number account number
690
+ * @param string $holder Name/Holder of this account
691
+ * @return SofortLib_Multipay $this
692
+ */
693
+ function setSenderAccount($bank_code, $account_number, $holder) {
694
+ $this->parameters['sender'] = array('holder' => $holder, 'account_number' => $account_number, 'bank_code' => $bank_code);
695
+ return $this;
696
+ }
697
+
698
+ /**
699
+ * amount of this payment
700
+ *
701
+ * @param double $arg
702
+ * @param string $currency currency of this transaction, default EUR
703
+ * @return SofortLib_Multipay $this
704
+ */
705
+ function setAmount($arg, $currency = 'EUR') {
706
+ $this->parameters['amount'] = $arg;
707
+ $this->parameters['currency_code'] = $currency;
708
+ return $this;
709
+ }
710
+
711
+ /**
712
+ * set the reason values of this transfer
713
+ *
714
+ * @param string $arg max 27 characters
715
+ * @param string $arg2 max 27 characters
716
+ * @return SofortLib_Multipay $this
717
+ */
718
+ function setReason($arg, $arg2='') {
719
+ $this->parameters['reasons'][0] = $arg;
720
+ $this->parameters['reasons'][1] = $arg2;
721
+ return $this;
722
+ }
723
+
724
+
725
+ /**
726
+ * the customer will be redirected to this url after a successful
727
+ * transaction, this should be a page where a short confirmation is
728
+ * displayed
729
+ *
730
+ * @param string $arg the url after a successful transaction
731
+ * @return SofortLib_Multipay
732
+ */
733
+ function setSuccessUrl($arg) {
734
+ $this->parameters['success_url'] = '<![CDATA['.$arg.']]>';
735
+ return $this;
736
+ }
737
+
738
+ /**
739
+ * the customer will be redirected to this url if he uses the
740
+ * abort link on the payment form, should redirect him back to
741
+ * his cart or to the payment selection page
742
+ *
743
+ * @param string $arg url for aborting the transaction
744
+ * @return SofortLib_Multipay
745
+ */
746
+ function setAbortUrl($arg) {
747
+ $this->parameters['abort_url'] = '<![CDATA['.$arg.']]>';
748
+ return $this;
749
+ }
750
+
751
+ /**
752
+ * if the customer takes too much time or if your timeout is set too short
753
+ * he will be redirected to this page
754
+ *
755
+ * @param string $arg url
756
+ * @return SofortLib_Multipay
757
+ */
758
+ function setTimeoutUrl($arg) {
759
+ $this->parameters['timeout_url'] = '<![CDATA['.$arg.']]>';
760
+ return $this;
761
+ }
762
+
763
+
764
+ /**
765
+ * set the url where you want notification about status changes
766
+ * being sent to. Use SofortLib_Notification and SofortLib_TransactionData
767
+ * to further process that notification
768
+ *
769
+ * @param string $arg url
770
+ * @return SofortLib_Multipay
771
+ */
772
+ function setNotificationUrl($arg) {
773
+ $this->parameters['notification_urls'] = array('<![CDATA['.$arg.']]>');
774
+ return $this;
775
+ }
776
+
777
+ /**
778
+ * you can set set multiple urls for receiving notifications
779
+ * this might be helpfull if you have several systems for processing
780
+ * an order (e.g. an ERP system)
781
+ *
782
+ * @param string $arg url
783
+ * @return SofortLib_Multipay
784
+ */
785
+ function addNotificationUrl($arg) {
786
+ $this->parameters['notification_urls'][] = '<![CDATA['.$arg.']]>';
787
+ return $this;
788
+ }
789
+
790
+ /**
791
+ * set the email address where you want notification about status changes
792
+ * being sent to.
793
+ *
794
+ * @param string $arg email address
795
+ * @return SofortLib_Multipay
796
+ */
797
+ function setNotificationEmail($arg) {
798
+ $this->parameters['notification_emails'] = array('<![CDATA['.$arg.']]>');
799
+ return $this;
800
+ }
801
+
802
+ /**
803
+ * you can set set multiple emails for receiving notifications
804
+ *
805
+ * @param string $arg email
806
+ * @return SofortLib_Multipay
807
+ */
808
+ function addNotificationEmail($arg) {
809
+ $this->parameters['notification_emails'][] = $arg;
810
+ return $this;
811
+ }
812
+
813
+ /**
814
+ * set the version of this payment module
815
+ * this is helpfull so the support staff can easily
816
+ * find out if someone uses an outdated module
817
+ *
818
+ * @param string $arg version string of your module
819
+ * @return SofortLib_Multipay
820
+ */
821
+ function setVersion($arg) {
822
+ $this->parameters['interface_version'] = $arg;
823
+ return $this;
824
+ }
825
+
826
+ /**
827
+ * add sofortueberweisung as payment method
828
+ * @param double $amount this amount only applies to this payment method
829
+ * @return SofortLib_Multipay $this
830
+ */
831
+ function setSofortueberweisung($amount='') {
832
+ $this->parameters['su'] = array();
833
+ if(!empty($amount)) {
834
+ $this->parameters['su']['amount'] = $amount;
835
+ }
836
+
837
+ return $this;
838
+ }
839
+
840
+ /**
841
+ * add sofortlastschrift as payment method
842
+ * @param double $amount this amount only applies to this payment method
843
+ * @return SofortLib_Multipay $this
844
+ */
845
+ function setSofortlastschrift($amount='') {
846
+ $this->parameters['sl'] = array();
847
+ if(!empty($amount)) {
848
+ $this->parameters['sl']['amount'] = $amount;
849
+ }
850
+
851
+ return $this;
852
+ }
853
+
854
+
855
+ /**
856
+ * add lastschrift as payment method
857
+ * @param double $amount this amount only applies to this payment method
858
+ * @return SofortLib_Multipay $this
859
+ */
860
+ function setLastschrift($amount='') {
861
+ $this->parameters['ls'] = array();
862
+ if(!empty($amount)) {
863
+ $this->parameters['ls']['amount'] = $amount;
864
+ }
865
+
866
+ return $this;
867
+ }
868
+
869
+ function setLastschriftBaseCheckDisabled() {
870
+ $this->parameters['ls']['base_check_disabled'] = 1;
871
+ return $this;
872
+ }
873
+
874
+ function setLastschriftExtendedCheckDisabled() {
875
+ $this->parameters['ls']['extended_check_disabled'] = 1;
876
+ return $this;
877
+ }
878
+
879
+ function setLastschriftMobileCheckDisabled() {
880
+ $this->parameters['ls']['mobile_check_disabled'] = 1;
881
+ return $this;
882
+ }
883
+
884
+ /**
885
+ * add sofortrechnung as payment method
886
+ * if you use this payment method you have to provide
887
+ * the customer address and cart as well
888
+ * the total amount of this payment method will
889
+ * be determined by the total of the cart
890
+ *
891
+ * @return SofortLib_Multipay $this
892
+ */
893
+ function setSofortrechnung() {
894
+ if(!array_key_exists('sr', $this->parameters)) {
895
+ $this->parameters['sr'] = array();
896
+ }
897
+ return $this;
898
+ }
899
+
900
+ /**
901
+ * add sofortvorkasse as payment method
902
+ * @param double $amount this amount only applies to this payment method
903
+ * @return SofortLib_Multipay $this
904
+ */
905
+ function setSofortvorkasse($amount='') {
906
+ $this->parameters['sv'] = array();
907
+ if(!empty($amount)) {
908
+ $this->parameters['sv']['amount'] = $amount;
909
+ }
910
+
911
+ return $this;
912
+ }
913
+
914
+ /**
915
+ * set the customer id which will appear on top of the invoice
916
+ * @param int $arg
917
+ * @return SofortLib_Multipay $this
918
+ */
919
+ function setSofortrechnungCustomerId($arg) {
920
+ $this->parameters['sr']['customer_id'] = $arg;
921
+ return $this;
922
+ }
923
+
924
+ /**
925
+ * set the order id which will appear on top of the invoice
926
+ * @param int $arg
927
+ * @return SofortLib_Multipay $this
928
+ */
929
+ function setSofortrechnungOrderId($arg) {
930
+ $this->parameters['sr']['order_id'] = $arg;
931
+ return $this;
932
+ }
933
+
934
+ /**
935
+ * set the invoice address of the customer
936
+ *
937
+ * @param string $firstname
938
+ * @param string $lastname
939
+ * @param string $street
940
+ * @param string $streetNumber
941
+ * @param string $zipcode
942
+ * @param string $city
943
+ * @param int $salutation [1|2] 1=Mr. 2=Mrs.
944
+ * @param string $country country code, only DE allowed at the moment
945
+ * @return SofortLib_Multipay $this
946
+ */
947
+ function setSofortrechnungInvoiceAddress($firstname, $lastname, $street, $streetNumber, $zipcode, $city, $salutation, $country = 'DE') {
948
+ $this->parameters['sr']['invoice_address']['salutation'] = $salutation;
949
+ $this->parameters['sr']['invoice_address']['firstname'] = $firstname;
950
+ $this->parameters['sr']['invoice_address']['lastname'] = $lastname;
951
+ $this->parameters['sr']['invoice_address']['street'] = $street;
952
+ $this->parameters['sr']['invoice_address']['street_number'] = $streetNumber;
953
+ $this->parameters['sr']['invoice_address']['zipcode'] = $zipcode;
954
+ $this->parameters['sr']['invoice_address']['city'] = $city;
955
+ $this->parameters['sr']['invoice_address']['country_code'] = $country;
956
+ return $this;
957
+ }
958
+
959
+ /**
960
+ * set the shipping address of the customer
961
+ *
962
+ * @param string $firstname
963
+ * @param string $lastname
964
+ * @param string $street
965
+ * @param string $streetNumber
966
+ * @param string $zipcode
967
+ * @param string $city
968
+ * @param int $salutation [1|2] 1=Mr. 2=Mrs.
969
+ * @param string $country country code, only DE allowed at the moment
970
+ * @return SofortLib_Multipay $this
971
+ */
972
+ function setSofortrechnungShippingAddress($firstname, $lastname, $street, $streetNumber, $zipcode, $city, $salutation, $country = 'DE') {
973
+ $this->parameters['sr']['shipping_address']['salutation'] = $salutation;
974
+ $this->parameters['sr']['shipping_address']['firstname'] = $firstname;
975
+ $this->parameters['sr']['shipping_address']['lastname'] = $lastname;
976
+ $this->parameters['sr']['shipping_address']['street'] = $street;
977
+ $this->parameters['sr']['shipping_address']['street_number'] = $streetNumber;
978
+ $this->parameters['sr']['shipping_address']['zipcode'] = $zipcode;
979
+ $this->parameters['sr']['shipping_address']['city'] = $city;
980
+ $this->parameters['sr']['shipping_address']['country_code'] = $country;
981
+
982
+ return $this;
983
+ }
984
+
985
+ /**
986
+ * add one item to the cart
987
+ *
988
+ * @param string $productNumber product number, EAN code, ISBN number or similar
989
+ * @param string $title description of this title
990
+ * @param double $unit_price gross price of one item
991
+ * @param int $productType product type number see manual (0=other, 1=shipping, ...)
992
+ * @param string $description additional description of this item
993
+ * @param int $quantity default 1
994
+ * @param int $tax tax in percent, default 19
995
+ */
996
+ function addSofortrechnungItem($productNumber, $title, $unit_price, $productType = 0, $description = '', $quantity = 1, $tax = 19) {
997
+ $unit_price = number_format($unit_price, 2, '.','');
998
+ $tax = number_format($tax, 2, '.','');
999
+ $quantity = intval($quantity);
1000
+ $this->parameters['sr']['items'][] = array('product_number' => $productNumber,
1001
+ 'product_type' => $productType, 'title' => $title, 'description' => $description,
1002
+ 'quantity' => $quantity, 'unit_price' => $unit_price, 'tax' => $tax);
1003
+ }
1004
+
1005
+ /**
1006
+ * Parser for response from server
1007
+ * this callback will be called for every closing xml-tag
1008
+ * @private
1009
+ */
1010
+ function onParseTag($data, $tag){
1011
+ switch($tag) {
1012
+ case 'transaction':
1013
+ $this->transactionId = $data;
1014
+ break;
1015
+ case 'payment_url':
1016
+ $this->paymentUrl = $data;
1017
+ break;
1018
+ case 'new_transaction':
1019
+ //finished parsing everything
1020
+ default:
1021
+ break;
1022
+ }
1023
+ }
1024
+
1025
+ /**
1026
+ * after configuration and sending this request
1027
+ * you can use this function to redirect the customer
1028
+ * to the payment form
1029
+ *
1030
+ * @return string url of payment form
1031
+ */
1032
+ function getPaymentUrl() {
1033
+ return $this->paymentUrl;
1034
+ }
1035
+
1036
+ /**
1037
+ * use this id to track the transaction
1038
+ *
1039
+ * @return string transaction id
1040
+ */
1041
+ function getTransactionId() {
1042
+ return $this->transactionId;
1043
+ }
1044
+
1045
+ /**
1046
+ * send this message and get the response
1047
+ *
1048
+ * @return array transactionid=>status
1049
+ */
1050
+ function sendRequest() {
1051
+ $data = $this->_sendMessage($this->toXml());
1052
+ $this->_initParser();
1053
+ $this->_parse($data);
1054
+ $this->xml = $data;
1055
+
1056
+ $this->log(__CLASS__ . ' -> '. $this->formatXmlString($this->toXml()));
1057
+ $this->log(__CLASS__ . ' <- '. $this->formatXmlString($data));
1058
+
1059
+ return $this;
1060
+ }
1061
+
1062
+ /**
1063
+ * generate XML message
1064
+ * @return string
1065
+ */
1066
+ function toXml() {
1067
+ $msg = '<?xml version="1.0" encoding="UTF-8"?>';
1068
+ $msg .= $this->_arrayToXml($this->parameters, 'multipay');
1069
+
1070
+ return $msg;
1071
+ }
1072
+ }
1073
+
1074
+
1075
+ /**
1076
+ * class for refund/rueckbuchung
1077
+ *
1078
+ * Copyright (c) 2010 Payment Network AG
1079
+ *
1080
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
1081
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
1082
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
1083
+ *
1084
+ */
1085
+ class SofortLib_Refund extends SofortLib_Abstract
1086
+ {
1087
+ var $response = array(array());
1088
+ var $api = NULL;
1089
+ var $data = array();
1090
+
1091
+ function SofortLib_Refund($apikey) {
1092
+ $this->SofortLib($apikey, 'https://www.sofortueberweisung.de/payment/refunds');
1093
+ }
1094
+
1095
+
1096
+ /**
1097
+ * send this message and get response
1098
+ *
1099
+ * @return array transactionid=>status
1100
+ */
1101
+ function sendRequest() {
1102
+ $data = $this->_sendMessage($this->toXml());
1103
+ $this->_initParser();
1104
+ $this->_parse($data);
1105
+
1106
+ return $this->getStatusArray();
1107
+ }
1108
+
1109
+
1110
+ /**
1111
+ * generate XML message
1112
+ * @return string
1113
+ */
1114
+ function toXml() {
1115
+ $msg = '<?xml version="1.0" encoding="UTF-8"?>';
1116
+ $msg .= '<refunds>';
1117
+
1118
+ if(is_array($this->data)) {
1119
+ foreach($this->data as $refund) {
1120
+ if(is_array($refund)) {
1121
+ $msg .= '<refund>';
1122
+ foreach ($refund as $var => $value) {
1123
+ $msg .= '<'.$var.'>'.$value.'</'.$var.">\n";
1124
+ }
1125
+ $msg .= '</refund>';
1126
+ }
1127
+ }
1128
+ }
1129
+
1130
+ $msg .= '</refunds>';
1131
+ return $msg;
1132
+ }
1133
+
1134
+ /**
1135
+ * add a new refund to this message
1136
+ *
1137
+ * @param string $transaction transaction id of transfer you want to refund
1138
+ * @param float $amount amount of money to refund, less or equal to amount of original transfer
1139
+ * @param string $comment comment that will be displayed in admin-menu later
1140
+ * @return SofortLib_Refund $this
1141
+ */
1142
+ function addRefund($transaction, $amount, $comment = '') {
1143
+ array_push($this->data, array('transaction' => $transaction, 'amount' => $amount, 'comment' => $comment));
1144
+ return $this;
1145
+ }
1146
+
1147
+
1148
+ /**
1149
+ * Parser for response from server
1150
+ * this callback will be called for every closing xml-tag
1151
+ * @private
1152
+ */
1153
+ function onParseTag($data, $tag){
1154
+ switch($tag) {
1155
+ case 'transaction':
1156
+ case 'amount':
1157
+ case 'comment':
1158
+ case 'status':
1159
+ if($this->_getParentTag() == 'refund') {
1160
+ $i = count($this->response)-1;
1161
+ $this->response[$i][$tag] = $data;
1162
+ }
1163
+ break;
1164
+ case 'code':
1165
+ case 'message':
1166
+ if($this->_getParentTag() == 'error') {
1167
+ $i = count($this->response)-1;
1168
+ $this->response[$i][$this->_getParentTag()][$tag] = $data;
1169
+ }
1170
+ break;
1171
+ case 'refund':
1172
+ if($this->_getParentTag() == 'refunds') {
1173
+ array_push($this->response, array());
1174
+ }
1175
+ break;
1176
+ case 'refunds':
1177
+ array_pop($this->response);
1178
+ break;
1179
+ default:
1180
+ break;
1181
+ }
1182
+ }
1183
+
1184
+
1185
+ function getTransactionId($i = 0) {
1186
+ return $this->response[$i]['transaction'];
1187
+ }
1188
+
1189
+ function getAmount($i = 0) {
1190
+ return $this->response[$i]['amount'];
1191
+ }
1192
+
1193
+ function getError($i = 0) {
1194
+ return parent::getError($this->response[$i]);
1195
+ }
1196
+
1197
+ function isError($i = 0) {
1198
+ return $this->response[$i]['status'] == 'error';
1199
+ }
1200
+
1201
+ function getErrorCode($i = 0) {
1202
+ return parent::getErrorCode($this->response[$i]);
1203
+ }
1204
+
1205
+ function getAsArray() {
1206
+ return $this->response;
1207
+ }
1208
+
1209
+ function getStatusArray() {
1210
+ $ret = array();
1211
+ foreach($this->response as $transaction) {
1212
+ if($transaction['status'] == 'ok') {
1213
+ $ret[$transaction['transaction']] = 'ok';
1214
+ } else {
1215
+ $ret[$transaction['transaction']] = parent::getError($transaction);
1216
+ }
1217
+ }
1218
+
1219
+ return $ret;
1220
+ }
1221
+ }
1222
+
1223
+ /**
1224
+ * class for debit/lastschrift
1225
+ *
1226
+ * Copyright (c) 2010 Payment Network AG
1227
+ *
1228
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
1229
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
1230
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
1231
+ *
1232
+ */
1233
+ class SofortLib_Debit extends SofortLib_Abstract
1234
+ {
1235
+ var $response = array();
1236
+
1237
+ var $project_id;
1238
+ var $date;
1239
+ var $amount;
1240
+ var $user_variable = array();
1241
+ var $reason = array();
1242
+ var $sender = array();
1243
+ var $parameters = array();
1244
+
1245
+ function SofortLib_Debit($apikey, $projectId=0) {
1246
+ $this->SofortLib($apikey, 'https://www.sofortlastschrift.de/payment/debitpay/xml');
1247
+ $this->setProjectId($projectId);
1248
+ $this->setDate(); //set date to today
1249
+ }
1250
+
1251
+ /**
1252
+ * send this debitpay and get response
1253
+ * @return boolean true if transaction was accepted, false otherwise
1254
+ */
1255
+ function sendRequest() {
1256
+ $data = $this->_sendMessage($this->toXml());
1257
+ $this->_initParser();
1258
+ $this->_parse($data);
1259
+
1260
+ $this->log(__CLASS__ . ' -> '. $this->formatXmlString($this->toXml()));
1261
+ $this->log(__CLASS__ . ' <- '. $this->formatXmlString($data));
1262
+
1263
+ return $this->isError() === false;
1264
+ }
1265
+
1266
+ /**
1267
+ * Project id
1268
+ * Id of your Sofortlastschrift project
1269
+ *
1270
+ * @param int $id project id
1271
+ * @return SofortLib_Debit $this
1272
+ */
1273
+ function setProjectId($id) {
1274
+ $this->parameters['project_id'] = $id;
1275
+
1276
+ return $this;
1277
+ }
1278
+
1279
+ /**
1280
+ * sets date of this debitpay
1281
+ * automatically called in constructor and set to today
1282
+ *
1283
+ * @param String $date date in Format Y-m-d (eg: 2010-01-20), default: today
1284
+ * @return SofortLib_Debit $this
1285
+ */
1286
+ function setDate($date = '') {
1287
+ if(empty($date)) {
1288
+ $date = date('Y-m-d');
1289
+ }
1290
+ $this->parameters['date'] = $date;
1291
+
1292
+ return $this;
1293
+ }
1294
+
1295
+ /**
1296
+ * set data of account
1297
+ *
1298
+ * @param String $bankCode bank code of bank
1299
+ * @param String $accountNumber account number
1300
+ * @param String $holder Name/Holder of this account
1301
+ * @return SofortLib_Debit $this
1302
+ */
1303
+ function setSenderAccount($bankCode, $accountNumber, $holder) {
1304
+ $this->parameters['sl']['sender'] = array('holder' => $holder, 'account_number' => $accountNumber, 'bank_code' => $bankCode);
1305
+ return $this;
1306
+ }
1307
+
1308
+ /**
1309
+ * set data of account
1310
+ *
1311
+ * @param String $accountNumber account number
1312
+ * @return SofortLib_Debit $this
1313
+ */
1314
+ function setSenderAccountNumber($accountNumber) {
1315
+ $this->parameters['sl']['sender']['account_number'] = $accountNumber;
1316
+ return $this;
1317
+ }
1318
+
1319
+ /**
1320
+ * set data of account
1321
+ *
1322
+ * @param String $bankCode bank code of bank
1323
+ * @return SofortLib_Debit $this
1324
+ */
1325
+ function setSenderBankCode($bankCode) {
1326
+ $this->parameters['sl']['sender']['bank_code'] = $bankCode;
1327
+ return $this;
1328
+ }
1329
+
1330
+ /**
1331
+ * set data of account
1332
+ *
1333
+ * @param String $name Name/Holder of this account
1334
+ * @return SofortLib_Debit $this
1335
+ */
1336
+ function setSenderHolder($name) {
1337
+ $this->parameters['sl']['sender']['holder'] = $name;
1338
+ return $this;
1339
+ }
1340
+
1341
+ /**
1342
+ * set amount of this transfer
1343
+ * needs to be a decimal e.g. 2.24
1344
+ *
1345
+ * @param float $amount amount of this transfer
1346
+ */
1347
+ function setAmount($amount) {
1348
+ $this->parameters['sl']['amount'] = $amount;
1349
+ return $this;
1350
+ }
1351
+
1352
+ /**
1353
+ * add another user-variable to this transfer
1354
+ * this variable could be a customer-number or similar and will
1355
+ * help you identify this transfer later
1356
+ *
1357
+ * @param String $userVariable max 255 characters
1358
+ * @return SofortLib_Debit $this
1359
+ */
1360
+ function addUserVariable($userVariable) {
1361
+ $this->parameters['sl']['user_variables'][] = $userVariable;
1362
+ return $this;
1363
+ }
1364
+
1365
+ /**
1366
+ * adds another reason (verwendungszweck)
1367
+ * only first two can be used, 27 characters each
1368
+ *
1369
+ * @param $reason string
1370
+ * @return SofortLib_Debit $this
1371
+ */
1372
+ function addReason($reason) {
1373
+ $this->parameters['sl']['reasons'][] = $reason;
1374
+ return $this;
1375
+ }
1376
+
1377
+ /**
1378
+ * set reason (verwendugszweck) of this transfer
1379
+ * two lines possible, 27 characters each
1380
+ *
1381
+ * @param $reason1
1382
+ * @param $reason2
1383
+ * @return SofortLib_Debit $this
1384
+ */
1385
+ function setReason($reason1, $reason2 = '') {
1386
+ $this->parameters['sl']['reasons'][0] = $reason1;
1387
+ $this->parameters['sl']['reasons'][1] = $reason2;
1388
+ return $this;
1389
+ }
1390
+
1391
+ /**
1392
+ * get Transaction-Id of this Transfer
1393
+ * @return String transaction-id
1394
+ */
1395
+ function getTransactionId() {
1396
+ return $this->response['transaction'];
1397
+ }
1398
+
1399
+
1400
+ function getReason($i = 0) {
1401
+ return $this->response['reasons'][$i];
1402
+ }
1403
+
1404
+ function getAmount() {
1405
+ return $this->response['amount'];
1406
+ }
1407
+
1408
+ function getUserVariable($i = 0) {
1409
+ return $this->response['user_variables'][$i];
1410
+ }
1411
+
1412
+ function getDate() {
1413
+ return $this->response['date'];
1414
+ }
1415
+
1416
+ function isError(){
1417
+ return parent::isError($this->response);
1418
+ }
1419
+
1420
+ function getError() {
1421
+ return parent::getError($this->response);
1422
+ }
1423
+
1424
+ /**
1425
+ * generate XML message
1426
+ * @return string
1427
+ */
1428
+ function toXml() {
1429
+ $msg = '<?xml version="1.0" encoding="UTF-8"?>';
1430
+ $msg .= $this->_arrayToXml($this->parameters, 'debitpay');
1431
+
1432
+ return $msg;
1433
+ }
1434
+
1435
+ /**
1436
+ * Parser for response from server
1437
+ * this callback will be called for every closing xml-tag
1438
+ * @private
1439
+ */
1440
+ function onParseTag($data, $tag){
1441
+ switch($tag) {
1442
+ case 'project_id':
1443
+ case 'date':
1444
+ case 'transaction':
1445
+ case 'amount':
1446
+ $this->response[$tag] = $data;
1447
+ break;
1448
+ case 'holder':
1449
+ case 'account_number':
1450
+ case 'bank_code':
1451
+ case 'bic':
1452
+ case 'iban':
1453
+ case 'country_code':
1454
+ case 'code':
1455
+ case 'message':
1456
+ if($this->_getParentTag() == 'sender' || $this->_getParentTag() == 'error') {
1457
+ $this->response[$this->_getParentTag()][$tag] = $data;
1458
+ }
1459
+ break;
1460
+ case 'user_variable':
1461
+ case 'reason':
1462
+ if($this->_getParentTag() == 'user_variables' || $this->_getParentTag() == 'reasons') {
1463
+ $this->response[$this->_getParentTag()][] = $data;
1464
+ }
1465
+ break;
1466
+ default:
1467
+ break;
1468
+ }
1469
+ }
1470
+
1471
+ function getResponse() {
1472
+ return $this->response;
1473
+ }
1474
+ }
1475
+
1476
+
1477
+ //hide it from doxygen
1478
+ /// @cond
1479
+
1480
+
1481
+ /**
1482
+ * base class for Payment Network XML-Api
1483
+ * this class implements basic http authentication and a xml-parser
1484
+ * for parsing response messages
1485
+ *
1486
+ * requires libcurl and openssl
1487
+ *
1488
+ * Copyright (c) 2010 Payment Network AG
1489
+ *
1490
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
1491
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
1492
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
1493
+ *
1494
+ */
1495
+ class SofortLib {
1496
+ var $apiKey;
1497
+ var $request;
1498
+ var $errors;
1499
+
1500
+
1501
+ function SofortLib($apiKey, $serverUrl) {
1502
+ $this->apiKey = $apiKey;
1503
+ $this->request = new SofortLib_Http($serverUrl, $this->_getHeaders());
1504
+ }
1505
+
1506
+
1507
+ /**
1508
+ * returns errormessage
1509
+ * @param array $message response array
1510
+ * @return string errormessage
1511
+ */
1512
+ function getError($message = '') {
1513
+ if($message == '') $message = $this->errors;
1514
+ if(is_array($message) && array_key_exists('error',$message)) {
1515
+ return 'error '.$message['error']['code'] .': '. $message['error']['message'];
1516
+ }
1517
+ return false;
1518
+ }
1519
+
1520
+ /**
1521
+ * checks (response)-array for error
1522
+ * @param array $message response array
1523
+ * @return boolean true if 'error' key exists, false otherwise
1524
+ */
1525
+ function isError($message = '') {
1526
+ if($message == '') $message = $this->errors;
1527
+ return is_array($message) && array_key_exists('error',$message);
1528
+ }
1529
+
1530
+ /**
1531
+ * returns error-code from response-array
1532
+ * @param array $message response array
1533
+ * @return int errorcode, see api-documentation for possible errors
1534
+ */
1535
+ function getErrorCode($message = '') {
1536
+ if($message == '') $message = $this->errors;
1537
+ if(is_array($message) && array_key_exists('error',$message)) {
1538
+ return $message['error']['code'];
1539
+ }
1540
+ return false;
1541
+ }
1542
+
1543
+ /**
1544
+ * internal send-method, will check http-errorcode and return body
1545
+ * @param String $message message to post
1546
+ * @return string error or body
1547
+ */
1548
+ function _sendMessage($message) {
1549
+ $response = $this->request->post($message);
1550
+
1551
+ //curl error?
1552
+ if($response === FALSE) {
1553
+ $response = $this->request->error;
1554
+ } else {
1555
+ //http-error?
1556
+ switch($this->request->getinfo('http_code')) {
1557
+ case '401':
1558
+ $response = 'Authentication-Error, please check your Api-Key';
1559
+ break;
1560
+ case '404':
1561
+ $response = 'Url not found '.$this->request->url;
1562
+ break;
1563
+ default:
1564
+ break;
1565
+ }
1566
+ }
1567
+
1568
+ return $response;
1569
+ }
1570
+
1571
+
1572
+ /**
1573
+ * @access private
1574
+ */
1575
+ function _getHeaders() {
1576
+ $header = array();
1577
+ $header[] = "Authorization: Basic ".base64_encode($this->apiKey.':'.$this->apiKey);
1578
+ $header[] = "Content-Type: application/xml; charset=UTF-8";
1579
+ $header[] = "Accept: application/xml; charset=UTF-8";
1580
+ $header[] = "User-Agent: SofortLib-php/1.0.0" ;
1581
+ return $header;
1582
+ }
1583
+
1584
+ // Valuable resource
1585
+ var $_p;
1586
+ //stack of tags
1587
+ var $stack = array();
1588
+ //data of tag we're currently working on when parsing cdata
1589
+ var $currentData = '';
1590
+
1591
+ // Constructor/destructor
1592
+ function _initParser($ns=false,$encoding='UTF-8',$separator=null) {
1593
+ $this->_p = $ns ? xml_parser_create_ns($encoding,$separator) : xml_parser_create($encoding);
1594
+ xml_set_object($this->_p, $this);
1595
+ xml_set_default_handler($this->_p,"_default");
1596
+ xml_set_element_handler($this->_p, "_tagOpen", "_tagClose");
1597
+ xml_set_character_data_handler($this->_p, "_cdata");
1598
+ xml_set_start_namespace_decl_handler($this->_p,"_nsStart");
1599
+ xml_set_end_namespace_decl_handler($this->_p,"_nsEnd");
1600
+ xml_set_external_entity_ref_handler($this->_p,"_entityRef");
1601
+ xml_set_processing_instruction_handler($this->_p,"_pi");
1602
+ xml_set_notation_decl_handler($this->_p,"_notation");
1603
+ xml_set_unparsed_entity_decl_handler($this->_p,"_unparsedEntity");
1604
+ $this->setOption(XML_OPTION_CASE_FOLDING, false);
1605
+ }
1606
+
1607
+ function _SofortXmlBase() {
1608
+ xml_parser_free($this->_p);
1609
+ $this->_p=null;
1610
+ }
1611
+
1612
+ // abstract methods - override these
1613
+ function _default($parser,$data){}
1614
+
1615
+ function _tagOpen($parser,$tag, $attribs) {
1616
+ $this->currentData = '';
1617
+ array_push($this->stack, $tag);
1618
+ $this->tagOpen($parser, $tag, $attribs);
1619
+ }
1620
+ function tagOpen($parser, $tag, $attribs) {}
1621
+
1622
+ function _tagClose($parser,$tag) {
1623
+ if($tag == 'message' && $this->_getParentTag() == 'error') {
1624
+ $this->errors['error']['message'] = $this->currentData;
1625
+ } elseif($tag == 'message' && $this->_getParentTag() == 'warning') {
1626
+ $this->errors['warning']['message'] = $this->currentData;
1627
+ } elseif($tag == 'code' && $this->_getParentTag() == 'error') {
1628
+ $this->errors['error']['code'] = $this->currentData;
1629
+ } elseif($tag == 'code' && $this->_getParentTag() == 'warning') {
1630
+ $this->errors['warning']['code'] = $this->currentData;
1631
+ }
1632
+
1633
+ $this->onParseTag($this->currentData, $tag);
1634
+ $this->currentData = '';
1635
+ array_pop($this->stack);
1636
+ }
1637
+
1638
+ /**
1639
+ * Override this callback
1640
+ * its being called everytime we find a closing xml-tag
1641
+ * @protected
1642
+ * @param string $data data of this tag
1643
+ * @param string $tag name of this tag
1644
+ */
1645
+ function onParseTag($data, $tag) {}
1646
+
1647
+ function _cdata($parser,$data) {
1648
+ $this->currentData .= $data;
1649
+ }
1650
+ function _nsStart($parser,$userData,$prefix,$uri) {}
1651
+ function _nsEnd($parser,$userData,$prefix) {}
1652
+ function _entityRef($parser,$openEntityNames,$base,$systemID,$publicID){}
1653
+ function _pi($parser,$target,$data){}
1654
+ function _notation($parser, $notationName,$base,$systemID,$publicID){}
1655
+ function _unparsedEntity($parser,$entityName,$base,$systemID,$publicID,$notationName){}
1656
+
1657
+ function _parse($data,$final=false) {
1658
+ if(!xml_parse($this->_p,$data,$final)) {
1659
+ //check if this looks like a XML-String and display detailed error
1660
+ if(!strpos($data, '<') === FALSE) {
1661
+ $this->fatalError($data."\n\n<br /><br />".sprintf('XML error %d:"%s" at line %d column %d byte %d',
1662
+ xml_get_error_code($this->_p),
1663
+ xml_error_string($this->_p),
1664
+ xml_get_current_line_number($this->_p),
1665
+ xml_get_current_column_number($this->_p),
1666
+ xml_get_current_byte_index($this->_p)));
1667
+ }
1668
+ else {
1669
+ $this->fatalError($data."\n\n<br /><br />");
1670
+ }
1671
+
1672
+ }
1673
+ }
1674
+
1675
+ function _backtrace($provideObject=false){
1676
+ $last = '';
1677
+ $file=__FILE__;
1678
+ $args='';
1679
+ $msg = '';
1680
+ foreach(debug_backtrace($provideObject) as $row){
1681
+ if($last!=$row['file'])
1682
+ $msg .= "File: $file<br>\n";
1683
+
1684
+ $last=$row['file'];
1685
+ $msg .= " Line: $row[line]: ";
1686
+
1687
+ if($row['class']!='')
1688
+ $msg .= "$row[class]$row[type]$row[function]";
1689
+ else
1690
+ $msg .= "$row[function]";
1691
+
1692
+ $msg .= "(";
1693
+ $msg .= join("', '",$args);
1694
+ $msg .= ")<br>\n";
1695
+ }
1696
+ return $msg;
1697
+ }
1698
+ function error($msg,$fatal=false){
1699
+ $this->errors['error']['message'] = "Error: $msg";
1700
+ $this->errors['error']['code'] = '1';
1701
+
1702
+ //echo "<div align=\"center\"><font color=\"red\"><b>Error: $msg</b></font></div>";
1703
+ $last='';
1704
+ }
1705
+ function fatalError($msg){
1706
+ return $this->error($msg,true);
1707
+ }
1708
+
1709
+ // All the public functions you're meant to not override
1710
+ function setOption($option,$value){
1711
+ return xml_parser_set_option($this->_p,$option,$value);
1712
+ }
1713
+
1714
+ function getOption($option) {
1715
+ return xml_parser_get_option($this->_p,$option);
1716
+ }
1717
+
1718
+ function parseFile($file){
1719
+ if(($f=fopen($file,'r'))!=null) {
1720
+ while(!feof($f))
1721
+ $this->_parse(fgets($f,1024));
1722
+
1723
+ $this->_parseEnd();
1724
+ }
1725
+ else
1726
+ $this->fatalError("Unable to open file $file");
1727
+ }
1728
+ function _parseEnd(){
1729
+ $this->_parse(null,true);
1730
+ }
1731
+
1732
+ function _getTag() {
1733
+ return end($this->stack);
1734
+ }
1735
+
1736
+ function _getParentTag() {
1737
+ end($this->stack);
1738
+ return prev($this->stack);
1739
+ }
1740
+
1741
+ /**
1742
+ * parse this object as xml-string
1743
+ * override this function
1744
+ *
1745
+ * @param Ambigous <array,string> $data
1746
+ * @return string
1747
+ */
1748
+ function _toXml($data) {
1749
+ $msg = '';
1750
+
1751
+ if(is_array($data)) {
1752
+ foreach($data as $var => $value) {
1753
+ if(is_array($value) && array_key_exists(0, $value)) {
1754
+ $msg .= $this->_indexedArrayToXml($value, $var);
1755
+ } else {
1756
+ $msg .= '<'.$var.'>'.$this->_toXml($value).'</'.$var.">\n";
1757
+ }
1758
+ }
1759
+ } else if(is_object($data)) {
1760
+ $msg = $data->toXml();
1761
+ } else {
1762
+ $msg = $data;
1763
+ }
1764
+
1765
+ return $msg;
1766
+ }
1767
+
1768
+ function _arrayToXml($data, $name) {
1769
+ $msg = '';
1770
+ if(is_array($data)) {
1771
+ $msg .= '<'.$name.">\n";
1772
+ foreach($data as $key => $var) {
1773
+ if(is_numeric($key)) {
1774
+ $msg .= $this->_arrayToXml($var, substr($name, 0, -1));
1775
+ } else if(is_array($var)) {
1776
+ $msg .= $this->_arrayToXml($var, $key);
1777
+ } else {
1778
+ $msg .= '<'.$key.'>'.$var.'</'.$key.">\n";
1779
+ }
1780
+ }
1781
+ $msg .= '</'.$name.">\n";
1782
+ } else {
1783
+ $msg .= '<'.$name.'>'.$data.'</'.$name.">\n";
1784
+ }
1785
+ return $msg;
1786
+ }
1787
+
1788
+ function _indexedArrayToXml($data, $name) {
1789
+ $msg = '';
1790
+ if(is_array($data) && count($data) > 0) {
1791
+ $msg .= '<'.$name."s>\n";
1792
+ foreach($data as $value) {
1793
+ $msg .= '<'.$name.'>'.$value.'</'.$name.">\n";
1794
+ }
1795
+ $msg .= '</'.$name."s>\n";
1796
+ }
1797
+ return $msg;
1798
+ }
1799
+
1800
+ function _indexedArrayToXmlList($data, $name) {
1801
+ $msg = '';
1802
+ if(is_array($data) && count($data) > 0) {
1803
+ foreach($data as $value) {
1804
+ $msg .= '<'.$name.'>'.$value.'</'.$name.">\n";
1805
+ }
1806
+ }
1807
+ return $msg;
1808
+ }
1809
+
1810
+ //for debugging only, we don't need pretty xml for real transactions
1811
+ function formatXmlString($xml) {
1812
+
1813
+ // add marker linefeeds to aid the pretty-tokeniser (adds a linefeed between all tag-end boundaries)
1814
+ $xml = preg_replace('/(>)(<)(\/*)/', "$1\n$2$3", $xml);
1815
+
1816
+ // now indent the tags
1817
+ $token = strtok($xml, "\n");
1818
+ $result = ''; // holds formatted version as it is built
1819
+ $pad = 0; // initial indent
1820
+ $matches = array(); // returns from preg_matches()
1821
+
1822
+ // scan each line and adjust indent based on opening/closing tags
1823
+ while ($token !== false) {
1824
+ // test for the various tag states
1825
+ // 1. open and closing tags on same line - no change
1826
+ if (preg_match('/.+<\/\w[^>]*>$/', $token, $matches)) {
1827
+ $indent=0;
1828
+ // 2. closing tag - outdent now
1829
+ } elseif (preg_match('/^<\/\w/', $token, $matches)) {
1830
+ $pad--;
1831
+ // 3. opening tag - don't pad this one, only subsequent tags
1832
+ } elseif (preg_match('/^<\w[^>]*[^\/]>.*$/', $token, $matches)) {
1833
+ $indent=1;
1834
+ // 4. no indentation needed
1835
+ } else {
1836
+ $indent = 0;
1837
+ }
1838
+
1839
+ // pad the line with the required number of leading spaces
1840
+ $line = str_pad($token, strlen($token)+$pad, ' ', STR_PAD_LEFT);
1841
+ $result .= $line . "\n"; // add to the cumulative result, with linefeed
1842
+ $token = strtok("\n"); // get the next token
1843
+ $pad += $indent; // update the pad size for subsequent lines
1844
+ }
1845
+
1846
+ return $result;
1847
+ }
1848
+
1849
+ /**
1850
+ * internal logging function
1851
+ * @param string $msg
1852
+ */
1853
+ function log($msg) {
1854
+ //return true;
1855
+ $fp = fopen(dirname(__FILE__).'/log.txt', 'a');
1856
+ fwrite($fp, '['.date('Y-m-d H:i:s').'] ' . $msg . "\n");
1857
+ fclose($fp);
1858
+ return true;
1859
+ }
1860
+
1861
+ }
1862
+
1863
+ /**
1864
+ * base class for https communication via POST
1865
+ *
1866
+ * requires libcurl and openssl
1867
+ *
1868
+ * Copyright (c) 2010 Payment Network AG
1869
+ *
1870
+ * $Date: 2011-03-10 14:48:12 +0100 (Do, 10 Mrz 2011) $
1871
+ * @version SofortLib 1.1.0 $Id: sofortLib.php 450 2011-03-10 13:48:12Z poser $
1872
+ * @author Payment Network AG http://www.payment-network.com (integration@payment-network.com)
1873
+ *
1874
+ */
1875
+ class SofortLib_Http {
1876
+ var $headers;
1877
+ var $compression;
1878
+ var $proxy;
1879
+ var $url;
1880
+ var $info;
1881
+ var $error;
1882
+
1883
+ function SofortLib_Http($url, $headers, $compression=FALSE, $proxy='') {
1884
+ $this->url = $url;
1885
+ $this->headers = $headers;
1886
+ $this->compression=$compression;
1887
+ $this->proxy=$proxy;
1888
+ }
1889
+
1890
+ function getinfo($opt = '') {
1891
+ if(!empty($opt)) {
1892
+ return $this->info[$opt];
1893
+ }
1894
+ else {
1895
+ return $this->info;
1896
+ }
1897
+ }
1898
+
1899
+ /**
1900
+ * send data to server with POST request
1901
+ * @param string $data
1902
+ * @param string $url
1903
+ * @param string $headers
1904
+ */
1905
+ function post($data, $url=FALSE, $headers=FALSE) {
1906
+ if(function_exists('curl_init')) {
1907
+ return $this->postCurl($data, $url, $headers);
1908
+ } else {
1909
+ return $this->postSocket($data, $url, $headers);
1910
+ }
1911
+ }
1912
+
1913
+ /**
1914
+ * post data using curl
1915
+ * @param string $data
1916
+ * @param string $url
1917
+ * @param string $headers
1918
+ */
1919
+ function postCurl($data, $url=FALSE, $headers=FALSE) {
1920
+ if($url === FALSE) $url = $this->url;
1921
+ if($headers === FALSE) $headers = $this->headers;
1922
+
1923
+ $process = curl_init($url);
1924
+ curl_setopt($process, CURLOPT_HTTPHEADER, $headers);
1925
+ curl_setopt($process, CURLOPT_HEADER, 0);
1926
+ if($this->compression !== FALSE) curl_setopt($process, CURLOPT_ENCODING , $this->compression);
1927
+ curl_setopt($process, CURLOPT_TIMEOUT, 15);
1928
+ if ($this->proxy) curl_setopt($process, CURLOPT_PROXY, $this->proxy);
1929
+ curl_setopt($process, CURLOPT_POSTFIELDS, $data);
1930
+ curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
1931
+ curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
1932
+ curl_setopt($process, CURLOPT_POST, 1);
1933
+
1934
+ curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 0);
1935
+ curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false);
1936
+ //curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 2);
1937
+ //curl_setopt($process, CURLOPT_SSL_VERIFYPEER, true);
1938
+ //curl_setopt($process, CURLOPT_CAINFO, 'payment-network.com.crt');
1939
+
1940
+ $return = curl_exec($process);
1941
+
1942
+ $this->info = curl_getinfo($process);
1943
+ $this->error = curl_error($process);
1944
+
1945
+ curl_close($process);
1946
+
1947
+ return $return;
1948
+ }
1949
+
1950
+ /**
1951
+ * this is a fallback with fsockopen if curl is not activated
1952
+ * we still need openssl and ssl wrapper support (PHP >= 4.3.0)
1953
+ * @param string $data
1954
+ * @param string $url
1955
+ * @param array $headers
1956
+ * @return string body
1957
+ */
1958
+ function postSocket($data, $url=FALSE, $headers=FALSE) {
1959
+ if($url === FALSE) $url = $this->url;
1960
+ if($headers === FALSE) $headers = $this->headers;
1961
+ $uri = parse_url($url);
1962
+
1963
+ $out = "POST ".$uri['path']." HTTP/1.1\r\n";
1964
+ $out .= "HOST: ".$uri['host']." \r\n";
1965
+ $out .= "Content-Length: ". strlen($data). "\r\n";
1966
+ foreach ($headers as $header) {
1967
+ $out .= $header . "\r\n";
1968
+ }
1969
+ $out .= "\r\n".$data;
1970
+
1971
+ //connect to webservice
1972
+ if (!$fp = fsockopen('ssl://'.$uri['host'], 443, $errno, $errstr, 15)) {
1973
+ $this->error = 'fsockopen() failed, enable ssl and curl: '. $errno . ' ' . $errstr;
1974
+ return false;
1975
+ }
1976
+
1977
+ //send data
1978
+ stream_set_timeout($fp, 15);
1979
+ fwrite($fp, $out);
1980
+
1981
+ //read response
1982
+ $return = '';
1983
+ while (!feof($fp)) {
1984
+ $return .= fgets($fp, 512);
1985
+ }
1986
+
1987
+ fclose($fp);
1988
+
1989
+ //split header/body
1990
+ preg_match("#^(.+?)\r\n\r\n(.*)#ms", $return, $body);
1991
+ //get statuscode
1992
+ preg_match('#HTTP/1.*([0-9]{3}).*#i', $body[1], $status);
1993
+ $this->info['http_code'] = $status[1];
1994
+ return $body[2];
1995
+ }
1996
+
1997
+ function error($error) {
1998
+ echo "<center><div style='width:500px;border: 3px solid #FFEEFF; padding: 3px; background-color: #FFDDFF;font-family: verdana; font-size: 10px'><b>cURL Error</b><br>$error</div></center>";
1999
+ die;
2000
+ }
2001
+ }
2002
+ /// @endcond
app/code/community/Paymentnetwork/Pnsofortueberweisung/Helper/log.txt ADDED
@@ -0,0 +1,974 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [2011-03-16 15:02:26] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
2
+ <multipay>
3
+ <project_id>99178</project_id>
4
+ <interface_version>pn_mag_1.9.9</interface_version>
5
+ <amount>52.76</amount>
6
+ <currency_code>EUR</currency_code>
7
+ <reasons>
8
+ <reason>Best. 100000112</reason>
9
+ <reason>magento_technicalsupport2</reason>
10
+ </reasons>
11
+ <success_url>
12
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000112/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]>
13
+ </success_url>
14
+ <abort_url>
15
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000112]]>
16
+ </abort_url>
17
+ <notification_urls>
18
+ <notification_url>
19
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/returnhttp/orderId/100000112/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]>
20
+ </notification_url>
21
+ </notification_urls>
22
+ <user_variables>
23
+ <user_variable>100000112</user_variable>
24
+ <user_variable>
25
+ </user_variable>
26
+ </user_variables>
27
+ <email_customer>sp@payment-network.com</email_customer>
28
+ <sr>
29
+ <customer_id>1</customer_id>
30
+ <order_id>100000112</order_id>
31
+ <invoice_address>
32
+ <salutation>1</salutation>
33
+ <firstname>test</firstname>
34
+ <lastname>testtest</lastname>
35
+ <street>teststraße</street>
36
+ <street_number>12</street_number>
37
+ <zipcode>13245</zipcode>
38
+ <city>testhausen</city>
39
+ <country_code>DE</country_code>
40
+ </invoice_address>
41
+ <shipping_address>
42
+ <salutation>1</salutation>
43
+ <firstname>test</firstname>
44
+ <lastname>testtest</lastname>
45
+ <street>teststraße</street>
46
+ <street_number>12</street_number>
47
+ <zipcode>13245</zipcode>
48
+ <city>testhausen</city>
49
+ <country_code>DE</country_code>
50
+ </shipping_address>
51
+ <items>
52
+ <item>
53
+ <product_number>1</product_number>
54
+ <product_type>0</product_type>
55
+ <title>testprodukt</title>
56
+ <description>
57
+ </description>
58
+ <quantity>3</quantity>
59
+ <unit_price>12.09</unit_price>
60
+ <tax>19.00</tax>
61
+ </item>
62
+ <item>
63
+ <product_number>1</product_number>
64
+ <product_type>1</product_type>
65
+ <title>Flat Rate - Fixed</title>
66
+ <description>
67
+ </description>
68
+ <quantity>1</quantity>
69
+ <unit_price>16.49</unit_price>
70
+ <tax>19.00</tax>
71
+ </item>
72
+ </items>
73
+ </sr>
74
+ </multipay>
75
+
76
+ [2011-03-16 15:02:26] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
77
+ <errors>
78
+ <error>
79
+ <code>8002</code>
80
+ <message>reasons.reason.2: invalid chars.</message>
81
+ </error>
82
+ <sr>
83
+ <error>
84
+ <code>8002</code>
85
+ <message>reasons.reason.2: invalid chars</message>
86
+ </error>
87
+ </sr>
88
+ </errors>
89
+
90
+ [2011-03-16 15:12:30] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
91
+ <multipay>
92
+ <project_id>99178</project_id>
93
+ <interface_version>pn_mag_1.9.9</interface_version>
94
+ <amount>17.59</amount>
95
+ <currency_code>EUR</currency_code>
96
+ <reasons>
97
+ <reason>Best.100000113</reason>
98
+ <reason>magentotechnicalsupport2</reason>
99
+ </reasons>
100
+ <success_url>
101
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000113/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]>
102
+ </success_url>
103
+ <abort_url>
104
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000113]]>
105
+ </abort_url>
106
+ <notification_urls>
107
+ <notification_url>
108
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/returnhttp/orderId/100000113/transId/-TRANSACTION-/var1/-USER_VARIABLE_1_MD5_PASS-]]>
109
+ </notification_url>
110
+ </notification_urls>
111
+ <user_variables>
112
+ <user_variable>100000113</user_variable>
113
+ <user_variable>
114
+ </user_variable>
115
+ </user_variables>
116
+ <email_customer>sp@payment-network.com</email_customer>
117
+ <sr>
118
+ <customer_id>1</customer_id>
119
+ <order_id>100000113</order_id>
120
+ <invoice_address>
121
+ <salutation>1</salutation>
122
+ <firstname>test</firstname>
123
+ <lastname>testtest</lastname>
124
+ <street>teststraße</street>
125
+ <street_number>12</street_number>
126
+ <zipcode>13245</zipcode>
127
+ <city>testhausen</city>
128
+ <country_code>DE</country_code>
129
+ </invoice_address>
130
+ <shipping_address>
131
+ <salutation>1</salutation>
132
+ <firstname>test</firstname>
133
+ <lastname>testtest</lastname>
134
+ <street>teststraße</street>
135
+ <street_number>12</street_number>
136
+ <zipcode>13245</zipcode>
137
+ <city>testhausen</city>
138
+ <country_code>DE</country_code>
139
+ </shipping_address>
140
+ <items>
141
+ <item>
142
+ <product_number>1</product_number>
143
+ <product_type>0</product_type>
144
+ <title>testprodukt</title>
145
+ <description>
146
+ </description>
147
+ <quantity>1</quantity>
148
+ <unit_price>12.09</unit_price>
149
+ <tax>19.00</tax>
150
+ </item>
151
+ <item>
152
+ <product_number>1</product_number>
153
+ <product_type>1</product_type>
154
+ <title>Flat Rate - Fixed</title>
155
+ <description>
156
+ </description>
157
+ <quantity>1</quantity>
158
+ <unit_price>5.50</unit_price>
159
+ <tax>19.00</tax>
160
+ </item>
161
+ </items>
162
+ </sr>
163
+ </multipay>
164
+
165
+ [2011-03-16 15:12:30] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
166
+ <new_transaction>
167
+ <transaction>16263-99178-4D80D35E-4BC3</transaction>
168
+ <payment_url>https://www.sofort.com/payment/go/16263-99178-4D80D35E-4BC3</payment_url>
169
+ </new_transaction>
170
+
171
+ [2011-03-16 15:23:11] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
172
+ <multipay>
173
+ <project_id>99178</project_id>
174
+ <interface_version>pn_mag_1.9.9</interface_version>
175
+ <amount>17.59</amount>
176
+ <currency_code>EUR</currency_code>
177
+ <reasons>
178
+ <reason>Best. 100000114</reason>
179
+ <reason>magento technicalsupport2</reason>
180
+ </reasons>
181
+ <success_url>
182
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000114]]>
183
+ </success_url>
184
+ <abort_url>
185
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000114]]>
186
+ </abort_url>
187
+ <notification_urls>
188
+ <notification_url>
189
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/notification/orderId/100000114]]>
190
+ </notification_url>
191
+ </notification_urls>
192
+ <user_variables>
193
+ <user_variable>100000114</user_variable>
194
+ <user_variable>
195
+ </user_variable>
196
+ </user_variables>
197
+ <email_customer>sp@payment-network.com</email_customer>
198
+ <sr>
199
+ <customer_id>1</customer_id>
200
+ <order_id>100000114</order_id>
201
+ <invoice_address>
202
+ <salutation>1</salutation>
203
+ <firstname>test</firstname>
204
+ <lastname>testtest</lastname>
205
+ <street>teststraße</street>
206
+ <street_number>12</street_number>
207
+ <zipcode>13245</zipcode>
208
+ <city>testhausen</city>
209
+ <country_code>DE</country_code>
210
+ </invoice_address>
211
+ <shipping_address>
212
+ <salutation>1</salutation>
213
+ <firstname>test</firstname>
214
+ <lastname>testtest</lastname>
215
+ <street>teststraße</street>
216
+ <street_number>12</street_number>
217
+ <zipcode>13245</zipcode>
218
+ <city>testhausen</city>
219
+ <country_code>DE</country_code>
220
+ </shipping_address>
221
+ <items>
222
+ <item>
223
+ <product_number>1</product_number>
224
+ <product_type>0</product_type>
225
+ <title>testprodukt</title>
226
+ <description>
227
+ </description>
228
+ <quantity>1</quantity>
229
+ <unit_price>12.09</unit_price>
230
+ <tax>19.00</tax>
231
+ </item>
232
+ <item>
233
+ <product_number>1</product_number>
234
+ <product_type>1</product_type>
235
+ <title>Flat Rate - Fixed</title>
236
+ <description>
237
+ </description>
238
+ <quantity>1</quantity>
239
+ <unit_price>5.50</unit_price>
240
+ <tax>19.00</tax>
241
+ </item>
242
+ </items>
243
+ </sr>
244
+ </multipay>
245
+
246
+ [2011-03-16 15:23:11] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
247
+ <new_transaction>
248
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
249
+ <payment_url>https://www.sofort.com/payment/go/16263-99178-4D80D5DF-9CCD</payment_url>
250
+ </new_transaction>
251
+
252
+ [2011-03-16 15:24:08] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
253
+ <status_notification>
254
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
255
+ <time>2011-03-16T16:24:07+01:00</time>
256
+ </status_notification>
257
+
258
+ [2011-03-16 15:24:08] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
259
+ <transaction_request>
260
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
261
+ </transaction_request>
262
+
263
+ [2011-03-16 15:24:08] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
264
+ <transactions>
265
+ <transaction_details>
266
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
267
+ <test>1</test>
268
+ <time>2011-03-16T16:23:11+01:00</time>
269
+ <status>pending</status>
270
+ <status_reason>confirm_invoice</status_reason>
271
+ <payment_method>sr</payment_method>
272
+ <language_code>de</language_code>
273
+ <amount>17.59</amount>
274
+ <currency_code>EUR</currency_code>
275
+ <reasons>
276
+ <reason>Best. 100000114</reason>
277
+ <reason>magento technicalsupport2</reason>
278
+ </reasons>
279
+ <user_variables>
280
+ <user_variable>100000114</user_variable>
281
+ </user_variables>
282
+ <sr>
283
+ <order_id>100000114</order_id>
284
+ <customer_id>1</customer_id>
285
+ <invoice_status>pending</invoice_status>
286
+ <invoice_objection />
287
+ <invoice_address>
288
+ <salutation>2</salutation>
289
+ <firstname>test</firstname>
290
+ <lastname>testtest</lastname>
291
+ <street>teststraße</street>
292
+ <street_number>12</street_number>
293
+ <zipcode>13245</zipcode>
294
+ <city>testhausen</city>
295
+ <country_code>DE</country_code>
296
+ </invoice_address>
297
+ <shipping_address>
298
+ <salutation>2</salutation>
299
+ <firstname>test</firstname>
300
+ <lastname>testtest</lastname>
301
+ <street>teststraße</street>
302
+ <street_number>12</street_number>
303
+ <zipcode>13245</zipcode>
304
+ <city>testhausen</city>
305
+ <country_code>DE</country_code>
306
+ </shipping_address>
307
+ <items>
308
+ <item>
309
+ <product_number>1</product_number>
310
+ <product_type>0</product_type>
311
+ <number_type />
312
+ <title>testprodukt</title>
313
+ <description />
314
+ <quantity>1</quantity>
315
+ <unit_price>12.09</unit_price>
316
+ <tax>19.00</tax>
317
+ </item>
318
+ <item>
319
+ <product_number>1</product_number>
320
+ <product_type>1</product_type>
321
+ <number_type />
322
+ <title>Flat Rate - Fixed</title>
323
+ <description />
324
+ <quantity>1</quantity>
325
+ <unit_price>5.50</unit_price>
326
+ <tax>19.00</tax>
327
+ </item>
328
+ </items>
329
+ </sr>
330
+ </transaction_details>
331
+ </transactions>
332
+
333
+ [2011-03-16 15:25:01] SofortLib_ConfirmSr -> <?xml version="1.0" encoding="UTF-8"?>
334
+ <confirm_sr>
335
+ <items>
336
+ <item>
337
+ <product_number>1</product_number>
338
+ <product_type>0</product_type>
339
+ <title>testprodukt</title>
340
+ <description>
341
+ </description>
342
+ <quantity>1</quantity>
343
+ <unit_price>12.09</unit_price>
344
+ <tax>19.00</tax>
345
+ </item>
346
+ <item>
347
+ <product_number>1</product_number>
348
+ <product_type>1</product_type>
349
+ <title>Flat Rate - Fixed</title>
350
+ <description>
351
+ </description>
352
+ <quantity>1</quantity>
353
+ <unit_price>5.50</unit_price>
354
+ <tax>19.00</tax>
355
+ </item>
356
+ </items>
357
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
358
+ </confirm_sr>
359
+
360
+ [2011-03-16 15:25:01] SofortLib_ConfirmSr <- <?xml version="1.0" encoding="UTF-8" ?>
361
+ <invoice>
362
+ <download_url>https://www.sofort.com/payment/api/invoiceDownload/371bce7dc83817b7893bcdeed13799b5</download_url>
363
+ </invoice>
364
+
365
+ [2011-03-16 15:25:01] SofortLib_ConfirmSr -> <?xml version="1.0" encoding="UTF-8"?>
366
+ <confirm_sr>
367
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
368
+ </confirm_sr>
369
+
370
+ [2011-03-16 15:25:01] SofortLib_ConfirmSr <- <?xml version="1.0" encoding="UTF-8" ?>
371
+ <invoice>
372
+ <download_url>https://www.sofort.com/payment/api/invoiceDownload/371bce7dc83817b7893bcdeed13799b5</download_url>
373
+ </invoice>
374
+
375
+ [2011-03-16 15:25:14] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
376
+ <status_notification>
377
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
378
+ <time>2011-03-16T16:25:13+01:00</time>
379
+ </status_notification>
380
+
381
+ [2011-03-16 15:25:19] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
382
+ <transaction_request>
383
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
384
+ </transaction_request>
385
+
386
+ [2011-03-16 15:25:19] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
387
+ <transactions>
388
+ <transaction_details>
389
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
390
+ <test>1</test>
391
+ <time>2011-03-16T16:23:11+01:00</time>
392
+ <status>pending</status>
393
+ <status_reason>not_credited_yet</status_reason>
394
+ <payment_method>sr</payment_method>
395
+ <language_code>de</language_code>
396
+ <amount>17.59</amount>
397
+ <currency_code>EUR</currency_code>
398
+ <reasons>
399
+ <reason>Best. 100000114</reason>
400
+ <reason>magento technicalsupport2</reason>
401
+ </reasons>
402
+ <user_variables>
403
+ <user_variable>100000114</user_variable>
404
+ </user_variables>
405
+ <sr>
406
+ <order_id>100000114</order_id>
407
+ <customer_id>1</customer_id>
408
+ <invoice_status>pending</invoice_status>
409
+ <invoice_objection />
410
+ <invoice_address>
411
+ <salutation>2</salutation>
412
+ <firstname>test</firstname>
413
+ <lastname>testtest</lastname>
414
+ <street>teststraße</street>
415
+ <street_number>12</street_number>
416
+ <zipcode>13245</zipcode>
417
+ <city>testhausen</city>
418
+ <country_code>DE</country_code>
419
+ </invoice_address>
420
+ <shipping_address>
421
+ <salutation>2</salutation>
422
+ <firstname>test</firstname>
423
+ <lastname>testtest</lastname>
424
+ <street>teststraße</street>
425
+ <street_number>12</street_number>
426
+ <zipcode>13245</zipcode>
427
+ <city>testhausen</city>
428
+ <country_code>DE</country_code>
429
+ </shipping_address>
430
+ <items>
431
+ <item>
432
+ <product_number>1</product_number>
433
+ <product_type>0</product_type>
434
+ <number_type />
435
+ <title>testprodukt</title>
436
+ <description />
437
+ <quantity>1</quantity>
438
+ <unit_price>12.09</unit_price>
439
+ <tax>19.00</tax>
440
+ </item>
441
+ <item>
442
+ <product_number>1</product_number>
443
+ <product_type>1</product_type>
444
+ <number_type />
445
+ <title>Flat Rate - Fixed</title>
446
+ <description />
447
+ <quantity>1</quantity>
448
+ <unit_price>5.50</unit_price>
449
+ <tax>19.00</tax>
450
+ </item>
451
+ </items>
452
+ </sr>
453
+ </transaction_details>
454
+ </transactions>
455
+
456
+ [2011-03-16 15:25:21] SofortLib_ConfirmSr -> <?xml version="1.0" encoding="UTF-8"?>
457
+ <confirm_sr>
458
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
459
+ </confirm_sr>
460
+
461
+ [2011-03-16 15:25:21] SofortLib_ConfirmSr <- <?xml version="1.0" encoding="UTF-8" ?>
462
+ <invoice>
463
+ <download_url>https://www.sofort.com/payment/api/invoiceDownload/371bce7dc83817b7893bcdeed13799b5</download_url>
464
+ </invoice>
465
+
466
+ [2011-03-16 15:26:06] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
467
+ <status_notification>
468
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
469
+ <time>2011-03-16T16:26:05+01:00</time>
470
+ </status_notification>
471
+
472
+ [2011-03-16 15:26:06] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
473
+ <transaction_request>
474
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
475
+ </transaction_request>
476
+
477
+ [2011-03-16 15:26:06] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
478
+ <transactions>
479
+ <transaction_details>
480
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
481
+ <test>1</test>
482
+ <time>2011-03-16T16:23:11+01:00</time>
483
+ <status>received</status>
484
+ <status_reason>credited</status_reason>
485
+ <payment_method>sr</payment_method>
486
+ <language_code>de</language_code>
487
+ <amount>17.59</amount>
488
+ <currency_code>EUR</currency_code>
489
+ <reasons>
490
+ <reason>Best. 100000114</reason>
491
+ <reason>magento technicalsupport2</reason>
492
+ </reasons>
493
+ <user_variables>
494
+ <user_variable>100000114</user_variable>
495
+ </user_variables>
496
+ <sr>
497
+ <order_id>100000114</order_id>
498
+ <customer_id>1</customer_id>
499
+ <invoice_status>pending</invoice_status>
500
+ <invoice_objection />
501
+ <invoice_address>
502
+ <salutation>2</salutation>
503
+ <firstname>test</firstname>
504
+ <lastname>testtest</lastname>
505
+ <street>teststraße</street>
506
+ <street_number>12</street_number>
507
+ <zipcode>13245</zipcode>
508
+ <city>testhausen</city>
509
+ <country_code>DE</country_code>
510
+ </invoice_address>
511
+ <shipping_address>
512
+ <salutation>2</salutation>
513
+ <firstname>test</firstname>
514
+ <lastname>testtest</lastname>
515
+ <street>teststraße</street>
516
+ <street_number>12</street_number>
517
+ <zipcode>13245</zipcode>
518
+ <city>testhausen</city>
519
+ <country_code>DE</country_code>
520
+ </shipping_address>
521
+ <items>
522
+ <item>
523
+ <product_number>1</product_number>
524
+ <product_type>0</product_type>
525
+ <number_type />
526
+ <title>testprodukt</title>
527
+ <description />
528
+ <quantity>1</quantity>
529
+ <unit_price>12.09</unit_price>
530
+ <tax>19.00</tax>
531
+ </item>
532
+ <item>
533
+ <product_number>1</product_number>
534
+ <product_type>1</product_type>
535
+ <number_type />
536
+ <title>Flat Rate - Fixed</title>
537
+ <description />
538
+ <quantity>1</quantity>
539
+ <unit_price>5.50</unit_price>
540
+ <tax>19.00</tax>
541
+ </item>
542
+ </items>
543
+ </sr>
544
+ </transaction_details>
545
+ </transactions>
546
+
547
+ [2011-03-16 15:26:51] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
548
+ <status_notification>
549
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
550
+ <time>2011-03-16T16:26:50+01:00</time>
551
+ </status_notification>
552
+
553
+ [2011-03-16 15:26:51] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
554
+ <transaction_request>
555
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
556
+ </transaction_request>
557
+
558
+ [2011-03-16 15:26:51] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
559
+ <transactions>
560
+ <transaction_details>
561
+ <transaction>16263-99178-4D80D5DF-9CCD</transaction>
562
+ <test>1</test>
563
+ <time>2011-03-16T16:23:11+01:00</time>
564
+ <status>refunded</status>
565
+ <status_reason>refunded</status_reason>
566
+ <payment_method>sr</payment_method>
567
+ <language_code>de</language_code>
568
+ <amount>0.00</amount>
569
+ <currency_code>EUR</currency_code>
570
+ <reasons>
571
+ <reason>Best. 100000114</reason>
572
+ <reason>magento technicalsupport2</reason>
573
+ </reasons>
574
+ <user_variables>
575
+ <user_variable>100000114</user_variable>
576
+ </user_variables>
577
+ <sr>
578
+ <order_id>100000114</order_id>
579
+ <customer_id>1</customer_id>
580
+ <invoice_status>refunded</invoice_status>
581
+ <invoice_objection />
582
+ <invoice_address>
583
+ <salutation>2</salutation>
584
+ <firstname>test</firstname>
585
+ <lastname>testtest</lastname>
586
+ <street>teststraße</street>
587
+ <street_number>12</street_number>
588
+ <zipcode>13245</zipcode>
589
+ <city>testhausen</city>
590
+ <country_code>DE</country_code>
591
+ </invoice_address>
592
+ <shipping_address>
593
+ <salutation>2</salutation>
594
+ <firstname>test</firstname>
595
+ <lastname>testtest</lastname>
596
+ <street>teststraße</street>
597
+ <street_number>12</street_number>
598
+ <zipcode>13245</zipcode>
599
+ <city>testhausen</city>
600
+ <country_code>DE</country_code>
601
+ </shipping_address>
602
+ </sr>
603
+ </transaction_details>
604
+ </transactions>
605
+
606
+ [2011-03-23 13:42:29] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
607
+ <multipay>
608
+ <project_id>99178</project_id>
609
+ <interface_version>pn_mag_1.9.9</interface_version>
610
+ <amount>123.10</amount>
611
+ <currency_code>EUR</currency_code>
612
+ <reasons>
613
+ <reason>Best. 100000115</reason>
614
+ <reason>magento technicalsupport2</reason>
615
+ </reasons>
616
+ <success_url>
617
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000115]]>
618
+ </success_url>
619
+ <abort_url>
620
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000115]]>
621
+ </abort_url>
622
+ <notification_urls>
623
+ <notification_url>
624
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/notification/orderId/100000115]]>
625
+ </notification_url>
626
+ </notification_urls>
627
+ <user_variables>
628
+ <user_variable>100000115</user_variable>
629
+ <user_variable>
630
+ </user_variable>
631
+ </user_variables>
632
+ <su>
633
+ </su>
634
+ </multipay>
635
+
636
+ [2011-03-23 13:42:29] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
637
+ <new_transaction>
638
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
639
+ <payment_url>https://www.sofortueberweisung.de/payment/go/16263-99178-4D89F8C5-5EE4</payment_url>
640
+ </new_transaction>
641
+
642
+ [2011-03-23 13:51:55] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
643
+ <status_notification>
644
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
645
+ <time>2011-03-23T14:51:54+01:00</time>
646
+ </status_notification>
647
+
648
+ [2011-03-23 13:51:55] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
649
+ <transaction_request>
650
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
651
+ </transaction_request>
652
+
653
+ [2011-03-23 13:51:55] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
654
+ <transactions>
655
+ <transaction_details>
656
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
657
+ <test>1</test>
658
+ <time>2011-03-23T14:51:19+01:00</time>
659
+ <status>pending</status>
660
+ <status_reason>not_credited_yet</status_reason>
661
+ <payment_method>su</payment_method>
662
+ <language_code>de</language_code>
663
+ <amount>123.10</amount>
664
+ <currency_code>EUR</currency_code>
665
+ <reasons>
666
+ <reason>Best. 100000115</reason>
667
+ <reason>magento technicalsupport2</reason>
668
+ </reasons>
669
+ <user_variables>
670
+ <user_variable>100000115</user_variable>
671
+ </user_variables>
672
+ <su>
673
+ <consumer_protection>0</consumer_protection>
674
+ </su>
675
+ </transaction_details>
676
+ </transactions>
677
+
678
+ [2011-03-23 13:54:01] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
679
+ <multipay>
680
+ <project_id>99178</project_id>
681
+ <interface_version>pn_mag_1.9.9</interface_version>
682
+ <amount>17.59</amount>
683
+ <currency_code>EUR</currency_code>
684
+ <reasons>
685
+ <reason>Best. 100000116</reason>
686
+ <reason>magento technicalsupport2</reason>
687
+ </reasons>
688
+ <success_url>
689
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000116]]>
690
+ </success_url>
691
+ <abort_url>
692
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000116]]>
693
+ </abort_url>
694
+ <notification_urls>
695
+ <notification_url>
696
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/notification/orderId/100000116]]>
697
+ </notification_url>
698
+ </notification_urls>
699
+ <user_variables>
700
+ <user_variable>100000116</user_variable>
701
+ <user_variable>
702
+ </user_variable>
703
+ </user_variables>
704
+ <su>
705
+ </su>
706
+ </multipay>
707
+
708
+ [2011-03-23 13:54:01] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
709
+ <new_transaction>
710
+ <transaction>16263-99178-4D89FB79-AB21</transaction>
711
+ <payment_url>https://www.sofortueberweisung.de/payment/go/16263-99178-4D89FB79-AB21</payment_url>
712
+ </new_transaction>
713
+
714
+ [2011-03-23 13:56:18] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
715
+ <multipay>
716
+ <project_id>99178</project_id>
717
+ <interface_version>pn_mag_1.9.9</interface_version>
718
+ <amount>17.59</amount>
719
+ <currency_code>EUR</currency_code>
720
+ <reasons>
721
+ <reason>Best. 100000117</reason>
722
+ <reason>magento technicalsupport2</reason>
723
+ </reasons>
724
+ <success_url>
725
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000117]]>
726
+ </success_url>
727
+ <abort_url>
728
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000117]]>
729
+ </abort_url>
730
+ <notification_urls>
731
+ <notification_url>
732
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/notification/orderId/100000117]]>
733
+ </notification_url>
734
+ </notification_urls>
735
+ <user_variables>
736
+ <user_variable>100000117</user_variable>
737
+ <user_variable>
738
+ </user_variable>
739
+ </user_variables>
740
+ <su>
741
+ </su>
742
+ </multipay>
743
+
744
+ [2011-03-23 13:56:18] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
745
+ <new_transaction>
746
+ <transaction>16263-99178-4D89FC02-2296</transaction>
747
+ <payment_url>https://www.sofortueberweisung.de/payment/go/16263-99178-4D89FC02-2296</payment_url>
748
+ </new_transaction>
749
+
750
+ [2011-03-23 14:04:00] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
751
+ <status_notification>
752
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
753
+ <time>2011-03-23T15:03:59+01:00</time>
754
+ </status_notification>
755
+
756
+ [2011-03-23 14:04:00] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
757
+ <transaction_request>
758
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
759
+ </transaction_request>
760
+
761
+ [2011-03-23 14:04:00] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
762
+ <transactions>
763
+ <transaction_details>
764
+ <transaction>16263-99178-4D89F8C5-5EE4</transaction>
765
+ <test>1</test>
766
+ <time>2011-03-23T14:51:19+01:00</time>
767
+ <status>received</status>
768
+ <status_reason>credited</status_reason>
769
+ <payment_method>su</payment_method>
770
+ <language_code>de</language_code>
771
+ <amount>123.10</amount>
772
+ <currency_code>EUR</currency_code>
773
+ <reasons>
774
+ <reason>Best. 100000115</reason>
775
+ <reason>magento technicalsupport2</reason>
776
+ </reasons>
777
+ <user_variables>
778
+ <user_variable>100000115</user_variable>
779
+ </user_variables>
780
+ <su>
781
+ <consumer_protection>0</consumer_protection>
782
+ </su>
783
+ </transaction_details>
784
+ </transactions>
785
+
786
+ [2011-03-23 16:33:03] SofortLib_Multipay -> <?xml version="1.0" encoding="UTF-8"?>
787
+ <multipay>
788
+ <project_id>99178</project_id>
789
+ <interface_version>pn_mag_1.9.9</interface_version>
790
+ <amount>17.59</amount>
791
+ <currency_code>EUR</currency_code>
792
+ <reasons>
793
+ <reason>Best. 100000118</reason>
794
+ <reason>magento technicalsupport2</reason>
795
+ </reasons>
796
+ <success_url>
797
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/return/orderId/100000118]]>
798
+ </success_url>
799
+ <abort_url>
800
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/error/orderId/100000118]]>
801
+ </abort_url>
802
+ <notification_urls>
803
+ <notification_url>
804
+ <![CDATA[http://www.direct-ebanking.com/shops/magento_technicalsupport2/index.php/pnsofortueberweisung/pnsofortueberweisung/notification/orderId/100000118]]>
805
+ </notification_url>
806
+ </notification_urls>
807
+ <user_variables>
808
+ <user_variable>100000118</user_variable>
809
+ <user_variable>
810
+ </user_variable>
811
+ </user_variables>
812
+ <email_customer>sp@payment-network.com</email_customer>
813
+ <sl>
814
+ </sl>
815
+ </multipay>
816
+
817
+ [2011-03-23 16:33:03] SofortLib_Multipay <- <?xml version="1.0" encoding="UTF-8" ?>
818
+ <new_transaction>
819
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
820
+ <payment_url>https://www.sofort.com/payment/go/16263-99178-4D8A20BF-CEE6</payment_url>
821
+ </new_transaction>
822
+
823
+ [2011-03-23 16:34:01] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
824
+ <status_notification>
825
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
826
+ <time>2011-03-23T17:34:00+01:00</time>
827
+ </status_notification>
828
+
829
+ [2011-03-23 16:34:01] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
830
+ <transaction_request>
831
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
832
+ </transaction_request>
833
+
834
+ [2011-03-23 16:34:01] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
835
+ <transactions>
836
+ <transaction_details>
837
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
838
+ <test>1</test>
839
+ <time>2011-03-23T17:33:25+01:00</time>
840
+ <status>pending</status>
841
+ <status_reason>not_credited_yet</status_reason>
842
+ <payment_method>sl</payment_method>
843
+ <language_code>de</language_code>
844
+ <amount>17.59</amount>
845
+ <currency_code>EUR</currency_code>
846
+ <reasons>
847
+ <reason>Best. 100000118</reason>
848
+ <reason>magento technicalsupport2</reason>
849
+ </reasons>
850
+ <user_variables>
851
+ <user_variable>100000118</user_variable>
852
+ </user_variables>
853
+ <sl>
854
+ <base_check>disabled</base_check>
855
+ <extended_check>disabled</extended_check>
856
+ <mobile_check>disabled</mobile_check>
857
+ </sl>
858
+ </transaction_details>
859
+ </transactions>
860
+
861
+ [2011-03-23 16:35:36] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
862
+ <status_notification>
863
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
864
+ <time>2011-03-23T17:35:35+01:00</time>
865
+ </status_notification>
866
+
867
+ [2011-03-23 16:35:36] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
868
+ <transaction_request>
869
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
870
+ </transaction_request>
871
+
872
+ [2011-03-23 16:35:36] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
873
+ <transactions>
874
+ <transaction_details>
875
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
876
+ <test>1</test>
877
+ <time>2011-03-23T17:33:25+01:00</time>
878
+ <status>received</status>
879
+ <status_reason>credited</status_reason>
880
+ <payment_method>sl</payment_method>
881
+ <language_code>de</language_code>
882
+ <amount>17.59</amount>
883
+ <currency_code>EUR</currency_code>
884
+ <reasons>
885
+ <reason>Best. 100000118</reason>
886
+ <reason>magento technicalsupport2</reason>
887
+ </reasons>
888
+ <user_variables>
889
+ <user_variable>100000118</user_variable>
890
+ </user_variables>
891
+ <sl>
892
+ <base_check>disabled</base_check>
893
+ <extended_check>disabled</extended_check>
894
+ <mobile_check>disabled</mobile_check>
895
+ </sl>
896
+ </transaction_details>
897
+ </transactions>
898
+
899
+ [2011-03-23 16:36:12] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
900
+ <status_notification>
901
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
902
+ <time>2011-03-23T17:36:11+01:00</time>
903
+ </status_notification>
904
+
905
+ [2011-03-23 16:36:13] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
906
+ <transaction_request>
907
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
908
+ </transaction_request>
909
+
910
+ [2011-03-23 16:36:13] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
911
+ <transactions>
912
+ <transaction_details>
913
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
914
+ <test>1</test>
915
+ <time>2011-03-23T17:33:25+01:00</time>
916
+ <status>received</status>
917
+ <status_reason>credited</status_reason>
918
+ <payment_method>sl</payment_method>
919
+ <language_code>de</language_code>
920
+ <amount>17.59</amount>
921
+ <currency_code>EUR</currency_code>
922
+ <reasons>
923
+ <reason>Best. 100000118</reason>
924
+ <reason>magento technicalsupport2</reason>
925
+ </reasons>
926
+ <user_variables>
927
+ <user_variable>100000118</user_variable>
928
+ </user_variables>
929
+ <sl>
930
+ <base_check>disabled</base_check>
931
+ <extended_check>disabled</extended_check>
932
+ <mobile_check>disabled</mobile_check>
933
+ </sl>
934
+ </transaction_details>
935
+ </transactions>
936
+
937
+ [2011-03-23 16:36:40] SofortLib_Notification <- <?xml version="1.0" encoding="UTF-8" ?>
938
+ <status_notification>
939
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
940
+ <time>2011-03-23T17:36:39+01:00</time>
941
+ </status_notification>
942
+
943
+ [2011-03-23 16:36:40] SofortLib_TransactionData -> <?xml version="1.0" encoding="UTF-8"?>
944
+ <transaction_request>
945
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
946
+ </transaction_request>
947
+
948
+ [2011-03-23 16:36:40] SofortLib_TransactionData <- <?xml version="1.0" encoding="UTF-8" ?>
949
+ <transactions>
950
+ <transaction_details>
951
+ <transaction>16263-99178-4D8A20BF-CEE6</transaction>
952
+ <test>1</test>
953
+ <time>2011-03-23T17:33:25+01:00</time>
954
+ <status>loss</status>
955
+ <status_reason>reversed</status_reason>
956
+ <payment_method>sl</payment_method>
957
+ <language_code>de</language_code>
958
+ <amount>17.59</amount>
959
+ <currency_code>EUR</currency_code>
960
+ <reasons>
961
+ <reason>Best. 100000118</reason>
962
+ <reason>magento technicalsupport2</reason>
963
+ </reasons>
964
+ <user_variables>
965
+ <user_variable>100000118</user_variable>
966
+ </user_variables>
967
+ <sl>
968
+ <base_check>disabled</base_check>
969
+ <extended_check>disabled</extended_check>
970
+ <mobile_check>disabled</mobile_check>
971
+ </sl>
972
+ </transaction_details>
973
+ </transactions>
974
+
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Abstract.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 285 2010-08-23 16:21:45Z poser $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Model_Abstract extends Mage_Payment_Model_Method_Abstract
22
+ {
23
+
24
+ /**
25
+ * Availability options
26
+ */
27
+ protected $_code = 'Abstract';
28
+ protected $_paymentMethod = 'pnsofortueberweisung';
29
+
30
+ protected $_formBlockType = 'pnsofortueberweisung/form_pnsofortueberweisung';
31
+ protected $_infoBlockType = 'pnsofortueberweisung/info_pnsofortueberweisung';
32
+
33
+ protected $_isGateway = false;
34
+ protected $_canAuthorize = true;
35
+ protected $_canCapture = false;
36
+ protected $_canCapturePartial = false;
37
+ protected $_canRefund = false;
38
+ protected $_canVoid = false;
39
+ protected $_canUseInternal = false;
40
+ protected $_canUseCheckout = true;
41
+ protected $_canUseForMultishipping = true;
42
+
43
+
44
+ public function _construct()
45
+ {
46
+ parent::_construct();
47
+ $this->_init('pnsofortueberweisung/pnsofortueberweisung');
48
+ }
49
+
50
+ public function getUrl(){
51
+ return $this->getConfigData('url');
52
+ }
53
+
54
+ /**
55
+ * Return redirect block type
56
+ *
57
+ * @return string
58
+ */
59
+ public function getRedirectBlockType()
60
+ {
61
+ return $this->_redirectBlockType;
62
+ }
63
+
64
+ /**
65
+ * Return payment method type string
66
+ *
67
+ * @return string
68
+ */
69
+ public function getPaymentMethodType()
70
+ {
71
+ return $this->_paymentMethod;
72
+ }
73
+
74
+
75
+ /**
76
+ * Get redirect URL
77
+ *
78
+ * @return Mage_Payment_Helper_Data
79
+ */
80
+ public function getOrderPlaceRedirectUrl()
81
+ {
82
+ return Mage::getUrl('pnsofortueberweisung/pnsofortueberweisung/redirect');
83
+ }
84
+
85
+ public function assignData($data)
86
+ {
87
+ if (!($data instanceof Varien_Object)) {
88
+ $data = new Varien_Object($data);
89
+ }
90
+ $info = $this->getInfoInstance();
91
+
92
+ return $this;
93
+ }
94
+
95
+ public function getSecurityKey(){
96
+ return uniqid(rand(), true);
97
+ }
98
+
99
+ public function validate()
100
+ {
101
+ parent::validate();
102
+
103
+
104
+ return $this;
105
+ }
106
+
107
+ public function getFormFields()
108
+ {
109
+ $amount = number_format($this->getOrder()->getGrandTotal(),2,'.','');
110
+ $billing = $this->getOrder()->getBillingAddress();
111
+ $security = $this->getSecurityKey();
112
+
113
+ $this->getOrder()->getPayment()->setSuSecurity($security)->save();
114
+ return;
115
+ }
116
+
117
+ /**
118
+ * Get quote
119
+ *
120
+ * @return Mage_Sales_Model_Order
121
+ */
122
+ public function getQuote()
123
+ {
124
+ if (empty($this->_quote)) {
125
+ $this->_quote = $this->getCheckout()->getQuote();
126
+ }
127
+ return $this->_quote;
128
+ }
129
+
130
+ /**
131
+ * Get checkout
132
+ *
133
+ * @return Mage_Sales_Model_Order
134
+ */
135
+ public function getCheckout()
136
+ {
137
+ if (empty($this->_checkout)) {
138
+ $this->_checkout = Mage::getSingleton('checkout/session');
139
+ }
140
+ return $this->_checkout;
141
+ }
142
+
143
+ /**
144
+ * Get order model
145
+ *
146
+ * @return Mage_Sales_Model_Order
147
+ */
148
+ public function getOrder()
149
+ {
150
+ if (!$this->_order) {
151
+ $paymentInfo = $this->getInfoInstance();
152
+ $this->_order = Mage::getModel('sales/order')
153
+ ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId());
154
+ }
155
+ return $this->_order;
156
+ }
157
+
158
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Convert/Order.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Order.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Convert_Order extends Mage_Sales_Model_Convert_Order
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Order.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Convert_Order extends Mage_Sales_Model_Convert_Order
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Convert/Quote.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Quote.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Convert_Quote extends Mage_Sales_Model_Convert_Quote
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Quote.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Convert_Quote extends Mage_Sales_Model_Convert_Quote
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Data/Form/Element/Link.php CHANGED
@@ -22,7 +22,7 @@
22
  * @package Paymentnetwork_Sofortueberweisung
23
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
- * @version $Id: Link.php 190 2010-06-02 14:34:14Z thoma $
26
  */
27
 
28
  /**
@@ -32,7 +32,7 @@
32
  * @package Paymentnetwork_Sofortueberweisung
33
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
34
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
35
- * @version $Id: Link.php 190 2010-06-02 14:34:14Z thoma $
36
  */
37
  class Varien_Data_Form_Element_Label extends Varien_Data_Form_Element_Abstract
38
  {
22
  * @package Paymentnetwork_Sofortueberweisung
23
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
24
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ * @version $Id: Link.php 378 2010-06-02 14:34:14Z thoma $
26
  */
27
 
28
  /**
32
  * @package Paymentnetwork_Sofortueberweisung
33
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
34
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
35
+ * @version $Id: Link.php 378 2010-06-02 14:34:14Z thoma $
36
  */
37
  class Varien_Data_Form_Element_Label extends Varien_Data_Form_Element_Abstract
38
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Mysql4/Setup.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Setup.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Setup.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Order/Invoice.php ADDED
@@ -0,0 +1,876 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Sales
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Paymentnetwork_Pnsofortueberweisung_Model_Order_Invoice extends Mage_Sales_Model_Order_Invoice
29
+ {
30
+ /**
31
+ * Invoice states
32
+ */
33
+ /* const STATE_OPEN = 1;
34
+ const STATE_PAID = 2;
35
+ const STATE_CANCELED = 3;
36
+
37
+ const CAPTURE_ONLINE = 'online';
38
+ const CAPTURE_OFFLINE = 'offline';
39
+ const NOT_CAPTURE = 'not_capture';
40
+
41
+ const XML_PATH_EMAIL_TEMPLATE = 'sales_email/invoice/template';
42
+ const XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice/guest_template';
43
+ const XML_PATH_EMAIL_IDENTITY = 'sales_email/invoice/identity';
44
+ const XML_PATH_EMAIL_COPY_TO = 'sales_email/invoice/copy_to';
45
+ const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/invoice/copy_method';
46
+ const XML_PATH_EMAIL_ENABLED = 'sales_email/invoice/enabled';
47
+
48
+ const XML_PATH_UPDATE_EMAIL_TEMPLATE = 'sales_email/invoice_comment/template';
49
+ const XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice_comment/guest_template';
50
+ const XML_PATH_UPDATE_EMAIL_IDENTITY = 'sales_email/invoice_comment/identity';
51
+ const XML_PATH_UPDATE_EMAIL_COPY_TO = 'sales_email/invoice_comment/copy_to';
52
+ const XML_PATH_UPDATE_EMAIL_COPY_METHOD = 'sales_email/invoice_comment/copy_method';
53
+ const XML_PATH_UPDATE_EMAIL_ENABLED = 'sales_email/invoice_comment/enabled';
54
+
55
+ const REPORT_DATE_TYPE_ORDER_CREATED = 'order_created';
56
+ const REPORT_DATE_TYPE_INVOICE_CREATED = 'invoice_created';
57
+
58
+ protected static $_states;
59
+
60
+ protected $_items;
61
+ protected $_comments;
62
+ protected $_order;
63
+
64
+ protected $_saveBeforeDestruct = false;
65
+
66
+ protected $_eventPrefix = 'sales_order_invoice';
67
+ protected $_eventObject = 'invoice';
68
+ */
69
+ /**
70
+ * Whether the pay() was called
71
+ * @var bool
72
+ */
73
+ /* protected $_wasPayCalled = false;
74
+
75
+ public function __destruct()
76
+ {
77
+ if ($this->_saveBeforeDestruct) {
78
+ $this->save();
79
+ }
80
+ }
81
+ */
82
+ /**
83
+ * Initialize invoice resource model
84
+ */
85
+ /* protected function _construct()
86
+ {
87
+ $this->_init('sales/order_invoice');
88
+ }
89
+ */
90
+ /**
91
+ * Load invoice by increment id
92
+ *
93
+ * @param string $incrementId
94
+ * @return Mage_Sales_Model_Order_Invoice
95
+ */
96
+ /* public function loadByIncrementId($incrementId)
97
+ {
98
+ $ids = $this->getCollection()
99
+ ->addAttributeToFilter('increment_id', $incrementId)
100
+ ->getAllIds();
101
+
102
+ if (!empty($ids)) {
103
+ reset($ids);
104
+ $this->load(current($ids));
105
+ }
106
+ return $this;
107
+ }
108
+ */
109
+ /**
110
+ * Retrieve invoice configuration model
111
+ *
112
+ * @return Mage_Sales_Model_Order_Invoice_Config
113
+ */
114
+ /* public function getConfig()
115
+ {
116
+ return Mage::getSingleton('sales/order_invoice_config');
117
+ }
118
+ */
119
+ /**
120
+ * Retrieve store model instance
121
+ *
122
+ * @return Mage_Core_Model_Store
123
+ */
124
+ /* public function getStore()
125
+ {
126
+ return $this->getOrder()->getStore();
127
+ }
128
+ */
129
+ /**
130
+ * Declare order for invoice
131
+ *
132
+ * @param Mage_Sales_Model_Order $order
133
+ * @return Mage_Sales_Model_Order_Invoice
134
+ */
135
+ public function setOrder(Mage_Sales_Model_Order $order)
136
+ {
137
+ $this->_order = $order;
138
+ $this->setOrderId($order->getId())
139
+ ->setStoreId($order->getStoreId());
140
+ return $this;
141
+ }
142
+
143
+ /**
144
+ * Retrieve the order the invoice for created for
145
+ *
146
+ * @return Mage_Sales_Model_Order
147
+ */
148
+ public function getOrder()
149
+ {
150
+ if (!$this->_order instanceof Mage_Sales_Model_Order) {
151
+ $this->_order = Mage::getModel('sales/order')->load($this->getOrderId());
152
+ }
153
+ return $this->_order;
154
+ }
155
+
156
+ /**
157
+ * Retrieve the increment_id of the order
158
+ *
159
+ * @return string
160
+ */
161
+ public function getOrderIncrementId()
162
+ {
163
+ return Mage::getModel('sales/order')->getResource()->getIncrementId($this->getOrderId());
164
+ }
165
+
166
+ /**
167
+ * Retrieve billing address
168
+ *
169
+ * @return Mage_Sales_Model_Order_Address
170
+ */
171
+ public function getBillingAddress()
172
+ {
173
+ return $this->getOrder()->getBillingAddress();
174
+ }
175
+
176
+ /**
177
+ * Retrieve shipping address
178
+ *
179
+ * @return Mage_Sales_Model_Order_Address
180
+ */
181
+ public function getShippingAddress()
182
+ {
183
+ return $this->getOrder()->getShippingAddress();
184
+ }
185
+
186
+ /**
187
+ * Check invoice cancel state
188
+ *
189
+ * @return bool
190
+ */
191
+ public function isCanceled()
192
+ {
193
+ return $this->getState() == self::STATE_CANCELED;
194
+ }
195
+
196
+ /**
197
+ * Check invice capture action availability
198
+ *
199
+ * @return bool
200
+ */
201
+ public function canCapture()
202
+ {
203
+ return $this->getState() != self::STATE_CANCELED
204
+ && $this->getState() != self::STATE_PAID
205
+ && $this->getOrder()->getPayment()->canCapture();
206
+ }
207
+
208
+ /**
209
+ * Check invice void action availability
210
+ *
211
+ * @return bool
212
+ */
213
+ public function canVoid()
214
+ {
215
+ $canVoid = false;
216
+ if ($this->getState() == self::STATE_PAID) {
217
+ $canVoid = $this->getCanVoidFlag();
218
+ /**
219
+ * If we not retrieve negative answer from payment yet
220
+ */
221
+ if (is_null($canVoid)) {
222
+ $canVoid = $this->getOrder()->getPayment()->canVoid($this);
223
+ if ($canVoid === false) {
224
+ $this->setCanVoidFlag(false);
225
+ $this->_saveBeforeDestruct = true;
226
+ }
227
+ }
228
+ else {
229
+ $canVoid = (bool) $canVoid;
230
+ }
231
+ }
232
+ return $canVoid;
233
+ }
234
+
235
+ /**
236
+ * Check invoice cancel action availability
237
+ *
238
+ * @return bool
239
+ */
240
+ public function canCancel()
241
+ {
242
+ return $this->getState() == self::STATE_OPEN;
243
+ }
244
+
245
+ /**
246
+ * Check invoice refund action availability
247
+ *
248
+ * @return bool
249
+ */
250
+ public function canRefund()
251
+ {
252
+ if ($this->getState() != self::STATE_PAID) {
253
+ return false;
254
+ }
255
+ if (abs($this->getBaseGrandTotal() - $this->getBaseTotalRefunded()) < .0001) {
256
+ return false;
257
+ }
258
+ return true;
259
+ }
260
+
261
+ /**
262
+ * Capture invoice
263
+ *
264
+ * @return Mage_Sales_Model_Order_Invoice
265
+ */
266
+ public function capture()
267
+ {
268
+ $this->getOrder()->getPayment()->capture($this);
269
+ if ($this->getIsPaid()) {
270
+ $this->pay();
271
+ }
272
+ return $this;
273
+ }
274
+
275
+ /**
276
+ * Pay invoice
277
+ *
278
+ * @return Mage_Sales_Model_Order_Invoice
279
+ */
280
+ public function pay()
281
+ {
282
+ if ($this->_wasPayCalled) {
283
+ return $this;
284
+ }
285
+ $this->_wasPayCalled = true;
286
+
287
+ $invoiceState = self::STATE_PAID;
288
+ if ($this->getOrder()->getPayment()->hasForcedState()) {
289
+ $invoiceState = $this->getOrder()->getPayment()->getForcedState();
290
+ }
291
+
292
+ $this->setState($invoiceState);
293
+
294
+ $this->getOrder()->getPayment()->pay($this);
295
+ $this->getOrder()->setTotalPaid(
296
+ $this->getOrder()->getTotalPaid()+$this->getGrandTotal()
297
+ );
298
+ $this->getOrder()->setBaseTotalPaid(
299
+ $this->getOrder()->getBaseTotalPaid()+$this->getBaseGrandTotal()
300
+ );
301
+ Mage::dispatchEvent('sales_order_invoice_pay', array($this->_eventObject=>$this));
302
+ return $this;
303
+ }
304
+
305
+ /**
306
+ * Whether pay() method was called (whether order and payment totals were updated)
307
+ * @return bool
308
+ */
309
+ public function wasPayCalled()
310
+ {
311
+ return $this->_wasPayCalled;
312
+ }
313
+
314
+ /**
315
+ * Void invoice
316
+ *
317
+ * @return Mage_Sales_Model_Order_Invoice
318
+ */
319
+ public function void()
320
+ {
321
+ $this->getOrder()->getPayment()->void($this);
322
+ $this->cancel();
323
+ return $this;
324
+ }
325
+
326
+ /**
327
+ * Cancel invoice action
328
+ *
329
+ * @return Mage_Sales_Model_Order_Invoice
330
+ */
331
+ public function cancel()
332
+ {
333
+ $order = $this->getOrder();
334
+ $order->getPayment()->cancelInvoice($this);
335
+ foreach ($this->getAllItems() as $item) {
336
+ $item->cancel();
337
+ }
338
+
339
+ /**
340
+ * Unregister order totals only for invoices in state PAID
341
+ */
342
+ $order->setTotalInvoiced($order->getTotalInvoiced() - $this->getGrandTotal());
343
+ $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() - $this->getBaseGrandTotal());
344
+
345
+ $order->setSubtotalInvoiced($order->getSubtotalInvoiced() - $this->getSubtotal());
346
+ $order->setBaseSubtotalInvoiced($order->getBaseSubtotalInvoiced() - $this->getBaseSubtotal());
347
+
348
+ $order->setTaxInvoiced($order->getTaxInvoiced() - $this->getTaxAmount());
349
+ $order->setBaseTaxInvoiced($order->getBaseTaxInvoiced() - $this->getBaseTaxAmount());
350
+
351
+ $order->setHiddenTaxInvoiced($order->getHiddenTaxInvoiced() - $this->getHiddenTaxAmount());
352
+ $order->setBaseHiddenTaxInvoiced($order->getBaseHiddenTaxInvoiced() - $this->getBaseHiddenTaxAmount());
353
+
354
+ $order->setShippingTaxInvoiced($order->getShippingTaxInvoiced() - $this->getShippingTaxAmount());
355
+ $order->setBaseShippingTaxInvoiced($order->getBaseShippingTaxInvoiced() - $this->getBaseShippingTaxAmount());
356
+
357
+ $order->setShippingInvoiced($order->getShippingInvoiced() - $this->getShippingAmount());
358
+ $order->setBaseShippingInvoiced($order->getBaseShippingInvoiced() - $this->getBaseShippingAmount());
359
+
360
+ $order->setDiscountInvoiced($order->getDiscountInvoiced() - $this->getDiscountAmount());
361
+ $order->setBaseDiscountInvoiced($order->getBaseDiscountInvoiced() - $this->getBaseDiscountAmount());
362
+ $order->setBaseTotalInvoicedCost($order->getBaseTotalInvoicedCost() - $this->getBaseCost());
363
+
364
+
365
+ if ($this->getState() == self::STATE_PAID) {
366
+ $this->getOrder()->setTotalPaid($this->getOrder()->getTotalPaid()-$this->getGrandTotal());
367
+ $this->getOrder()->setBaseTotalPaid($this->getOrder()->getBaseTotalPaid()-$this->getBaseGrandTotal());
368
+ }
369
+ $this->setState(self::STATE_CANCELED);
370
+ $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true);
371
+ Mage::dispatchEvent('sales_order_invoice_cancel', array($this->_eventObject=>$this));
372
+ return $this;
373
+ }
374
+
375
+ /**
376
+ * Invoice totals collecting
377
+ *
378
+ * @return Mage_Sales_Model_Order_Invoice
379
+ */
380
+ public function collectTotals()
381
+ {
382
+ foreach ($this->getConfig()->getTotalModels() as $model) {
383
+ $model->collect($this);
384
+ }
385
+ return $this;
386
+ }
387
+
388
+ public function getItemsCollection()
389
+ {
390
+ if (empty($this->_items)) {
391
+ $this->_items = Mage::getResourceModel('sales/order_invoice_item_collection')
392
+ ->setInvoiceFilter($this->getId());
393
+
394
+ if ($this->getId()) {
395
+ foreach ($this->_items as $item) {
396
+ $item->setInvoice($this);
397
+ }
398
+ }
399
+ }
400
+ return $this->_items;
401
+ }
402
+
403
+ public function getAllItems()
404
+ {
405
+ $items = array();
406
+ foreach ($this->getItemsCollection() as $item) {
407
+ if (!$item->isDeleted()) {
408
+ $items[] = $item;
409
+ }
410
+ }
411
+ return $items;
412
+ }
413
+
414
+ public function getItemById($itemId)
415
+ {
416
+ foreach ($this->getItemsCollection() as $item) {
417
+ if ($item->getId()==$itemId) {
418
+ return $item;
419
+ }
420
+ }
421
+ return false;
422
+ }
423
+
424
+ public function addItem(Mage_Sales_Model_Order_Invoice_Item $item)
425
+ {
426
+ $item->setInvoice($this)
427
+ ->setParentId($this->getId())
428
+ ->setStoreId($this->getStoreId());
429
+
430
+ if (!$item->getId()) {
431
+ $this->getItemsCollection()->addItem($item);
432
+ }
433
+ return $this;
434
+ }
435
+
436
+ /**
437
+ * Retrieve invoice states array
438
+ *
439
+ * @return array
440
+ */
441
+ public static function getStates()
442
+ {
443
+ if (is_null(self::$_states)) {
444
+ self::$_states = array(
445
+ self::STATE_OPEN => Mage::helper('sales')->__('Pending'),
446
+ self::STATE_PAID => Mage::helper('sales')->__('Paid'),
447
+ self::STATE_CANCELED => Mage::helper('sales')->__('Canceled'),
448
+ );
449
+ }
450
+ return self::$_states;
451
+ }
452
+
453
+ /**
454
+ * Retrieve invoice state name by state identifier
455
+ *
456
+ * @param int $stateId
457
+ * @return string
458
+ */
459
+ public function getStateName($stateId = null)
460
+ {
461
+ if (is_null($stateId)) {
462
+ $stateId = $this->getState();
463
+ }
464
+
465
+ if (is_null(self::$_states)) {
466
+ self::getStates();
467
+ }
468
+ if (isset(self::$_states[$stateId])) {
469
+ return self::$_states[$stateId];
470
+ }
471
+ return Mage::helper('sales')->__('Unknown State');
472
+ }
473
+
474
+ /**
475
+ * Register invoice
476
+ *
477
+ * Apply to order, order items etc.
478
+ *
479
+ * @return unknown
480
+ */
481
+ public function register()
482
+ {
483
+ if($this->getOrder()->getPayment()->getMethod() != 'sofortrechnung')
484
+ return parent::register();
485
+
486
+ if ($this->getId()) {
487
+ Mage::throwException(Mage::helper('sales')->__('Cannot register existing invoice'));
488
+ }
489
+
490
+ $tid = $this->getOrder()->getPayment()->getPnSuTransactionId();
491
+ if(!empty($tid))
492
+ {
493
+ Mage::helper('pnsofortueberweisung/sofortlib');
494
+ $sObj = new SofortLib_ConfirmSr(Mage::getStoreConfig('payment/pnsofortueberweisung/apikey'));
495
+
496
+ $order = $this->getOrder();
497
+
498
+ foreach ($this->getAllItems() as $item) {
499
+ $sObj->addItem($item->getSku(), $item->getName(), $item->getPriceInclTax(), 0, $item->getDescription(), $item->getQty(), round(($item->getPriceInclTax()/$item->getPrice() - 1)*100));
500
+ }
501
+ $sObj->addItem(1, $order->getShippingDescription(), $this->getShippingInclTax(), 1, '', 1, round($this->getShippingTaxAmount()/$this->getShippingAmount()*100));
502
+
503
+ $sObj->setTransaction($tid)->sendRequest();
504
+ if($sObj->isError()) {
505
+ Mage::throwException(Mage::helper('sales')->__($sObj->getError()));
506
+ return;
507
+ }
508
+
509
+ $sObj->confirmInvoice()->sendRequest();
510
+ if($sObj->isError()) {
511
+ Mage::throwException(Mage::helper('sales')->__($sObj->getError()));
512
+ return;
513
+ }
514
+ }
515
+
516
+ return parent::register();
517
+
518
+
519
+ foreach ($this->getAllItems() as $item) {
520
+ if ($item->getQty()>0) {
521
+ $item->register();
522
+ }
523
+ else {
524
+ $item->isDeleted(true);
525
+ }
526
+ }
527
+
528
+ $order = $this->getOrder();
529
+ $captureCase = $this->getRequestedCaptureCase();
530
+ if ($this->canCapture()) {
531
+ if ($captureCase) {
532
+ if ($captureCase == self::CAPTURE_ONLINE) {
533
+ $this->capture();
534
+ }
535
+ elseif ($captureCase == self::CAPTURE_OFFLINE) {
536
+ $this->setCanVoidFlag(false);
537
+ $this->pay();
538
+ }
539
+ }
540
+ } elseif(!$order->getPayment()->getMethodInstance()->isGateway() || $captureCase == self::CAPTURE_OFFLINE) {
541
+ if (!$order->getPayment()->getIsTransactionPending()) {
542
+ $this->setCanVoidFlag(false);
543
+ $this->pay();
544
+ }
545
+ }
546
+
547
+ $order->setTotalInvoiced($order->getTotalInvoiced() + $this->getGrandTotal());
548
+ $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() + $this->getBaseGrandTotal());
549
+
550
+ $order->setSubtotalInvoiced($order->getSubtotalInvoiced() + $this->getSubtotal());
551
+ $order->setBaseSubtotalInvoiced($order->getBaseSubtotalInvoiced() + $this->getBaseSubtotal());
552
+
553
+ $order->setTaxInvoiced($order->getTaxInvoiced() + $this->getTaxAmount());
554
+ $order->setBaseTaxInvoiced($order->getBaseTaxInvoiced() + $this->getBaseTaxAmount());
555
+
556
+ $order->setHiddenTaxInvoiced($order->getHiddenTaxInvoiced() + $this->getHiddenTaxAmount());
557
+ $order->setBaseHiddenTaxInvoiced($order->getBaseHiddenTaxInvoiced() + $this->getBaseHiddenTaxAmount());
558
+
559
+ $order->setShippingTaxInvoiced($order->getShippingTaxInvoiced() + $this->getShippingTaxAmount());
560
+ $order->setBaseShippingTaxInvoiced($order->getBaseShippingTaxInvoiced() + $this->getBaseShippingTaxAmount());
561
+
562
+
563
+ $order->setShippingInvoiced($order->getShippingInvoiced() + $this->getShippingAmount());
564
+ $order->setBaseShippingInvoiced($order->getBaseShippingInvoiced() + $this->getBaseShippingAmount());
565
+
566
+ $order->setDiscountInvoiced($order->getDiscountInvoiced() + $this->getDiscountAmount());
567
+ $order->setBaseDiscountInvoiced($order->getBaseDiscountInvoiced() + $this->getBaseDiscountAmount());
568
+ $order->setBaseTotalInvoicedCost($order->getBaseTotalInvoicedCost() + $this->getBaseCost());
569
+
570
+ $state = $this->getState();
571
+ if (is_null($state)) {
572
+ $this->setState(self::STATE_OPEN);
573
+ }
574
+
575
+ Mage::dispatchEvent('sales_order_invoice_register', array($this->_eventObject=>$this, 'order' => $order));
576
+ return $this;
577
+ }
578
+
579
+ /**
580
+ * Checking if the invoice is last
581
+ *
582
+ * @return bool
583
+ */
584
+ public function isLast()
585
+ {
586
+ foreach ($this->getAllItems() as $item) {
587
+ if (!$item->isLast()) {
588
+ return false;
589
+ }
590
+ }
591
+ return true;
592
+ }
593
+
594
+ /**
595
+ * Adds comment to invoice with additional possibility to send it to customer via email
596
+ * and show it in customer account
597
+ *
598
+ * @param bool $notify
599
+ * @param bool $visibleOnFront
600
+ *
601
+ * @return Mage_Sales_Model_Order_Invoice
602
+ */
603
+ public function addComment($comment, $notify=false, $visibleOnFront=false)
604
+ {
605
+ if (!($comment instanceof Mage_Sales_Model_Order_Invoice_Comment)) {
606
+ $comment = Mage::getModel('sales/order_invoice_comment')
607
+ ->setComment($comment)
608
+ ->setIsCustomerNotified($notify)
609
+ ->setIsVisibleOnFront($visibleOnFront);
610
+ }
611
+ $comment->setInvoice($this)
612
+ ->setStoreId($this->getStoreId())
613
+ ->setParentId($this->getId());
614
+ if (!$comment->getId()) {
615
+ $this->getCommentsCollection()->addItem($comment);
616
+ }
617
+ return $this;
618
+ }
619
+
620
+ public function getCommentsCollection($reload=false)
621
+ {
622
+ if (is_null($this->_comments) || $reload) {
623
+ $this->_comments = Mage::getResourceModel('sales/order_invoice_comment_collection')
624
+ ->setInvoiceFilter($this->getId())
625
+ ->setCreatedAtOrder();
626
+ /**
627
+ * When invoice created with adding comment, comments collection must be loaded before we added this comment.
628
+ */
629
+ $this->_comments->load();
630
+
631
+ if ($this->getId()) {
632
+ foreach ($this->_comments as $comment) {
633
+ $comment->setInvoice($this);
634
+ }
635
+ }
636
+ }
637
+ return $this->_comments;
638
+ }
639
+
640
+ /**
641
+ * Send email with invoice data
642
+ *
643
+ * @param boolean $notifyCustomer
644
+ * @param string $comment
645
+ * @return Mage_Sales_Model_Order_Invoice
646
+ */
647
+ public function sendEmail($notifyCustomer = true, $comment = '')
648
+ {
649
+ $order = $this->getOrder();
650
+ $storeId = $order->getStore()->getId();
651
+
652
+ if (!Mage::helper('sales')->canSendNewInvoiceEmail($storeId)) {
653
+ return $this;
654
+ }
655
+ // Get the destination email addresses to send copies to
656
+ $copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
657
+ $copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
658
+ // Check if at least one recepient is found
659
+ if (!$notifyCustomer && !$copyTo) {
660
+ return $this;
661
+ }
662
+
663
+ // Start store emulation process
664
+ $appEmulation = Mage::getSingleton('core/app_emulation');
665
+ $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
666
+
667
+ try {
668
+ // Retrieve specified view block from appropriate design package (depends on emulated store)
669
+ $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment())
670
+ ->setIsSecureMode(true);
671
+ $paymentBlock->getMethod()->setStore($storeId);
672
+ $paymentBlockHtml = $paymentBlock->toHtml();
673
+ } catch (Exception $exception) {
674
+ // Stop store emulation process
675
+ $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
676
+ throw $exception;
677
+ }
678
+
679
+ // Stop store emulation process
680
+ $appEmulation->stopEnvironmentEmulation($initialEnvironmentInfo);
681
+
682
+ // Retrieve corresponding email template id and customer name
683
+ if ($order->getCustomerIsGuest()) {
684
+ $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $storeId);
685
+ $customerName = $order->getBillingAddress()->getName();
686
+ } else {
687
+ $templateId = Mage::getStoreConfig(self::XML_PATH_EMAIL_TEMPLATE, $storeId);
688
+ $customerName = $order->getCustomerName();
689
+ }
690
+
691
+ $mailer = Mage::getModel('core/email_template_mailer');
692
+ if ($notifyCustomer) {
693
+ $emailInfo = Mage::getModel('core/email_info');
694
+ $emailInfo->addTo($order->getCustomerEmail(), $customerName);
695
+ if ($copyTo && $copyMethod == 'bcc') {
696
+ // Add bcc to customer email
697
+ foreach ($copyTo as $email) {
698
+ $emailInfo->addBcc($email);
699
+ }
700
+ }
701
+ $mailer->addEmailInfo($emailInfo);
702
+ }
703
+
704
+ // Email copies are sent as separated emails if their copy method is 'copy' or a customer should not be notified
705
+ if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
706
+ foreach ($copyTo as $email) {
707
+ $emailInfo = Mage::getModel('core/email_info');
708
+ $emailInfo->addTo($email);
709
+ $mailer->addEmailInfo($emailInfo);
710
+ }
711
+ }
712
+
713
+ // Set all required params and send emails
714
+ $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_EMAIL_IDENTITY, $storeId));
715
+ $mailer->setStoreId($storeId);
716
+ $mailer->setTemplateId($templateId);
717
+ $mailer->setTemplateParams(array(
718
+ 'order' => $order,
719
+ 'invoice' => $this,
720
+ 'comment' => $comment,
721
+ 'billing' => $order->getBillingAddress(),
722
+ 'payment_html' => $paymentBlockHtml
723
+ )
724
+ );
725
+ $mailer->send();
726
+
727
+ return $this;
728
+ }
729
+
730
+ /**
731
+ * Send email with invoice update information
732
+ *
733
+ * @param boolean $notifyCustomer
734
+ * @param string $comment
735
+ * @return Mage_Sales_Model_Order_Invoice
736
+ */
737
+ public function sendUpdateEmail($notifyCustomer = true, $comment = '')
738
+ {
739
+ $order = $this->getOrder();
740
+ $storeId = $order->getStore()->getId();
741
+
742
+ if (!Mage::helper('sales')->canSendInvoiceCommentEmail($storeId)) {
743
+ return $this;
744
+ }
745
+ // Get the destination email addresses to send copies to
746
+ $copyTo = $this->_getEmails(self::XML_PATH_UPDATE_EMAIL_COPY_TO);
747
+ $copyMethod = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_COPY_METHOD, $storeId);
748
+ // Check if at least one recepient is found
749
+ if (!$notifyCustomer && !$copyTo) {
750
+ return $this;
751
+ }
752
+
753
+ // Retrieve corresponding email template id and customer name
754
+ if ($order->getCustomerIsGuest()) {
755
+ $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_GUEST_TEMPLATE, $storeId);
756
+ $customerName = $order->getBillingAddress()->getName();
757
+ } else {
758
+ $templateId = Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_TEMPLATE, $storeId);
759
+ $customerName = $order->getCustomerName();
760
+ }
761
+
762
+ $mailer = Mage::getModel('core/email_template_mailer');
763
+ if ($notifyCustomer) {
764
+ $emailInfo = Mage::getModel('core/email_info');
765
+ $emailInfo->addTo($order->getCustomerEmail(), $customerName);
766
+ if ($copyTo && $copyMethod == 'bcc') {
767
+ // Add bcc to customer email
768
+ foreach ($copyTo as $email) {
769
+ $emailInfo->addBcc($email);
770
+ }
771
+ }
772
+ $mailer->addEmailInfo($emailInfo);
773
+ }
774
+
775
+ // Email copies are sent as separated emails if their copy method is 'copy' or a customer should not be notified
776
+ if ($copyTo && ($copyMethod == 'copy' || !$notifyCustomer)) {
777
+ foreach ($copyTo as $email) {
778
+ $emailInfo = Mage::getModel('core/email_info');
779
+ $emailInfo->addTo($email);
780
+ $mailer->addEmailInfo($emailInfo);
781
+ }
782
+ }
783
+
784
+ // Set all required params and send emails
785
+ $mailer->setSender(Mage::getStoreConfig(self::XML_PATH_UPDATE_EMAIL_IDENTITY, $storeId));
786
+ $mailer->setStoreId($storeId);
787
+ $mailer->setTemplateId($templateId);
788
+ $mailer->setTemplateParams(array(
789
+ 'order' => $order,
790
+ 'invoice' => $this,
791
+ 'comment' => $comment,
792
+ 'billing' => $order->getBillingAddress()
793
+ )
794
+ );
795
+ $mailer->send();
796
+
797
+ return $this;
798
+ }
799
+
800
+ protected function _getEmails($configPath)
801
+ {
802
+ $data = Mage::getStoreConfig($configPath, $this->getStoreId());
803
+ if (!empty($data)) {
804
+ return explode(',', $data);
805
+ }
806
+ return false;
807
+ }
808
+
809
+ protected function _beforeDelete()
810
+ {
811
+ $this->_protectFromNonAdmin();
812
+ return parent::_beforeDelete();
813
+ }
814
+
815
+ /**
816
+ * Reset invoice object
817
+ *
818
+ * @return Mage_Sales_Model_Order_Invoice
819
+ */
820
+ public function reset()
821
+ {
822
+ $this->unsetData();
823
+ $this->_origData = null;
824
+ $this->_items = null;
825
+ $this->_comments = null;
826
+ $this->_order = null;
827
+ $this->_saveBeforeDestruct = false;
828
+ $this->_wasPayCalled = false;
829
+ return $this;
830
+ }
831
+
832
+ /**
833
+ * Before object save manipulations
834
+ *
835
+ * @return Mage_Sales_Model_Order_Shipment
836
+ */
837
+ protected function _beforeSave()
838
+ {
839
+ parent::_beforeSave();
840
+
841
+ if (!$this->getOrderId() && $this->getOrder()) {
842
+ $this->setOrderId($this->getOrder()->getId());
843
+ $this->setBillingAddressId($this->getOrder()->getBillingAddress()->getId());
844
+ }
845
+
846
+ return $this;
847
+ }
848
+
849
+ /**
850
+ * After object save manipulation
851
+ *
852
+ * @return Mage_Sales_Model_Order_Shipment
853
+ */
854
+ protected function _afterSave()
855
+ {
856
+
857
+ if (null !== $this->_items) {
858
+ /**
859
+ * Save invoice items
860
+ */
861
+ foreach ($this->_items as $item) {
862
+ $item->setOrderItem($item->getOrderItem());
863
+ $item->save();
864
+ }
865
+ }
866
+
867
+ if (null !== $this->_comments) {
868
+ foreach($this->_comments as $comment) {
869
+ $comment->save();
870
+ }
871
+ }
872
+
873
+ return parent::_afterSave();
874
+ }
875
+
876
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Order/Pdf/Invoice.php ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Sales
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ /**
29
+ * Sales Order Invoice PDF model
30
+ *
31
+ * @category Mage
32
+ * @package Mage_Sales
33
+ * @author Magento Core Team <core@magentocommerce.com>
34
+ */
35
+ class Paymentnetwork_Pnsofortueberweisung_Model_Order_Pdf_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice
36
+ {
37
+ public function getPdf($invoices = array())
38
+ {
39
+ if($invoices[0]->getOrder()->getPayment()->getMethod() != 'sofortrechnung')
40
+ return parent::getPdf($invoices);
41
+
42
+ $this->_beforeGetPdf();
43
+ $this->_initRenderer('invoice');
44
+
45
+ $pdf = new Zend_Pdf();
46
+ $this->_setPdf($pdf);
47
+ $style = new Zend_Pdf_Style();
48
+ $this->_setFontBold($style, 10);
49
+
50
+ foreach ($invoices as $invoice) {
51
+ if ($invoice->getStoreId()) {
52
+ Mage::app()->getLocale()->emulate($invoice->getStoreId());
53
+ Mage::app()->setCurrentStore($invoice->getStoreId());
54
+ }
55
+ $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
56
+ $pdf->pages[] = $page;
57
+
58
+ $order = $invoice->getOrder();
59
+
60
+ $tid = $order->getPayment()->getPnSuTransactionId();
61
+ if(!empty($tid))
62
+ {
63
+ Mage::helper('pnsofortueberweisung/sofortlib');
64
+ $sObj = new SofortLib_ConfirmSr(Mage::getStoreConfig('payment/pnsofortueberweisung/apikey'));
65
+ $sObj->confirmInvoice($tid)->sendRequest();
66
+ if($sObj->isError()) {
67
+ Mage::throwException(Mage::helper('sales')->__($sObj->getError()));
68
+ return;
69
+ } else {
70
+ $url = $sObj->getInvoiceUrl();
71
+ $pdf = file_get_contents($url);
72
+ return Zend_Pdf::parse($pdf);
73
+ }
74
+ }
75
+
76
+ /* Add image */
77
+ $this->insertLogo($page, $invoice->getStore());
78
+
79
+ /* Add address */
80
+ $this->insertAddress($page, $invoice->getStore());
81
+
82
+ /* Add head */
83
+ $this->insertOrder($page, $order, Mage::getStoreConfigFlag(self::XML_PATH_SALES_PDF_INVOICE_PUT_ORDER_ID, $order->getStoreId()));
84
+
85
+
86
+ $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));
87
+ $this->_setFontRegular($page);
88
+ $page->drawText(Mage::helper('sales')->__('Invoice # ') . $invoice->getIncrementId(), 35, 780, 'UTF-8');
89
+
90
+ /* Add table */
91
+ $page->setFillColor(new Zend_Pdf_Color_RGB(0.93, 0.92, 0.92));
92
+ $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
93
+ $page->setLineWidth(0.5);
94
+
95
+ $page->drawRectangle(25, $this->y, 570, $this->y -15);
96
+ $this->y -=10;
97
+
98
+ /* Add table head */
99
+ $page->setFillColor(new Zend_Pdf_Color_RGB(0.4, 0.4, 0.4));
100
+ $page->drawText(Mage::helper('sales')->__('Products'), 35, $this->y, 'UTF-8');
101
+ $page->drawText(Mage::helper('sales')->__('SKU'), 255, $this->y, 'UTF-8');
102
+ $page->drawText(Mage::helper('sales')->__('Price'), 380, $this->y, 'UTF-8');
103
+ $page->drawText(Mage::helper('sales')->__('Qty'), 430, $this->y, 'UTF-8');
104
+ $page->drawText(Mage::helper('sales')->__('Tax'), 480, $this->y, 'UTF-8');
105
+ $page->drawText(Mage::helper('sales')->__('Subtotal'), 535, $this->y, 'UTF-8');
106
+
107
+ $this->y -=15;
108
+
109
+ $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
110
+
111
+ /* Add body */
112
+ foreach ($invoice->getAllItems() as $item){
113
+ if ($item->getOrderItem()->getParentItem()) {
114
+ continue;
115
+ }
116
+
117
+ if ($this->y < 15) {
118
+ $page = $this->newPage(array('table_header' => true));
119
+ }
120
+
121
+ /* Draw item */
122
+ $page = $this->_drawItem($item, $page, $order);
123
+ }
124
+
125
+ /* Add totals */
126
+ $page = $this->insertTotals($page, $invoice);
127
+
128
+ if ($invoice->getStoreId()) {
129
+ Mage::app()->getLocale()->revert();
130
+ }
131
+ }
132
+
133
+ $this->_afterGetPdf();
134
+
135
+ return $pdf;
136
+ }
137
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Params.php CHANGED
@@ -16,6 +16,6 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Params.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Params extends Varien_Object{}
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Params.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Params extends Varien_Object{}
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Paycode.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Paycode.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Paycode extends Mage_Payment_Model_Method_Abstract
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Paycode.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Paycode extends Mage_Payment_Model_Method_Abstract
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Pnsofort.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
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 285 2010-08-23 16:21:45Z poser $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Model_Pnsofort extends Paymentnetwork_Pnsofortueberweisung_Model_Abstract
22
+ {
23
+
24
+ /**
25
+ * Availability options
26
+ */
27
+ protected $_code = 'pnsofort';
28
+
29
+ public function getUrl(){
30
+ $order = $this->getOrder();
31
+ $amount = number_format($order->getGrandTotal(),2,'.','');
32
+ $billing = $order->getBillingAddress();
33
+ $security = $this->getSecurityKey();
34
+ $reason1 = Mage::helper('pnsofortueberweisung')->__('Order No.: ').$order->getRealOrderId();
35
+ $reason1 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason1);
36
+ $reason2 = Mage::getStoreConfig('general/store_information/name');
37
+ $reason2 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason2);
38
+ $baseurl = Mage::app()->getStore()->getBaseUrl();
39
+ $success_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/return/orderId/'.$order->getRealOrderId();
40
+ $cancel_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/error/orderId/'.$order->getRealOrderId();
41
+ $notification_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/notification/orderId/'.$order->getRealOrderId();
42
+
43
+ Mage::helper('pnsofortueberweisung/sofortlib');
44
+ $sObj = new SofortLib_Multipay(Mage::getStoreConfig('payment/pnsofortueberweisung/apikey'), Mage::getStoreConfig('payment/pnsofortueberweisung/project'));
45
+ $sObj->setVersion('pn_mag_1.9.9');
46
+ $sObj->setAmount($amount, $this->getOrder()->getOrderCurrencyCode());
47
+ $sObj->setReason($reason1, $reason2);
48
+ $sObj->setSuccessUrl($success_url);
49
+ $sObj->setAbortUrl($cancel_url);
50
+ $sObj->setNotificationUrl($notification_url);
51
+ $sObj->addUserVariable($this->getOrder()->getRealOrderId());
52
+ $sObj->addUserVariable($this->getOrder()->getPayment()->getSuSecurity());
53
+ //$sObj->setEmailCustomer($order->customer['email_address']);
54
+ //$sObj->setPhoneNumberCustomer($order->customer['telephone']);
55
+
56
+ $sObj->setSofortueberweisung();
57
+ $sObj->sendRequest();
58
+
59
+ if(!$sObj->isError()) {
60
+ $url = $sObj->getPaymentUrl();
61
+ $tid = $sObj->getTransactionId();
62
+ $order->getPayment()->setPnSuTransactionId($tid);
63
+ return $url;
64
+ } else {
65
+ Mage::throwException(Mage::helper('pnsofortueberweisung')->__($sObj->getError()));
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Retrieve information from payment configuration
71
+ *
72
+ * @param string $field
73
+ * @return mixed
74
+ */
75
+ public function getConfigData($field, $storeId = null)
76
+ {
77
+ if (null === $storeId) {
78
+ $storeId = $this->getStore();
79
+ }
80
+
81
+ if($field == 'active')
82
+ $field = $this->getCode().'_'.$field;
83
+ elseif($field == 'title')
84
+ return Mage::getStoreConfig('payment/pnsofort/'.$field, $storeId);
85
+ elseif($field == 'sort_order')
86
+ return Mage::getStoreConfig('payment/sofort/sort_order');
87
+
88
+
89
+ $path = 'payment/sofort/'.$field;
90
+ return Mage::getStoreConfig($path, $storeId);
91
+ }
92
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Pnsofortueberweisung.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Pnsofortueberweisung.php 494 2011-05-25 12:41:19Z poser $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Pnsofortueberweisung extends Mage_Payment_Model_Method_Abstract
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 682 2011-05-25 12:41:19Z poser $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Model_Pnsofortueberweisung extends Mage_Payment_Model_Method_Abstract
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Sofortlastschrift.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 285 2010-08-23 16:21:45Z poser $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Model_Sofortlastschrift extends Paymentnetwork_Pnsofortueberweisung_Model_Abstract
22
+ {
23
+
24
+ /**
25
+ * Availability options
26
+ */
27
+ protected $_code = 'sofortlastschrift';
28
+ protected $_formBlockType = 'pnsofortueberweisung/form_sofortlastschrift';
29
+
30
+
31
+ public function getUrl(){
32
+ $order = $this->getOrder();
33
+ $amount = number_format($order->getGrandTotal(),2,'.','');
34
+ $billing = $order->getBillingAddress();
35
+ $security = $this->getSecurityKey();
36
+ $reason1 = Mage::helper('pnsofortueberweisung')->__('Order No.: ').$order->getRealOrderId();
37
+ $reason1 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason1);
38
+ $reason2 = Mage::getStoreConfig('general/store_information/name');
39
+ $reason2 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason2);
40
+ $baseurl = Mage::app()->getStore()->getBaseUrl();
41
+ $success_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/return/orderId/'.$order->getRealOrderId();
42
+ $cancel_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/error/orderId/'.$order->getRealOrderId();
43
+ $notification_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/notification/orderId/'.$order->getRealOrderId();
44
+
45
+ Mage::helper('pnsofortueberweisung/sofortlib');
46
+ $sObj = new SofortLib_Multipay(Mage::getStoreConfig('payment/pnsofortueberweisung/apikey'), Mage::getStoreConfig('payment/pnsofortueberweisung/project'));
47
+ $sObj->setVersion('pn_mag_1.9.9');
48
+ $sObj->setAmount($amount, $order->getOrderCurrencyCode());
49
+ $sObj->setReason($reason1, $reason2);
50
+ $sObj->setSuccessUrl($success_url);
51
+ $sObj->setAbortUrl($cancel_url);
52
+ $sObj->setNotificationUrl($notification_url);
53
+ $sObj->addUserVariable($order->getRealOrderId());
54
+ $sObj->addUserVariable($this->getOrder()->getPayment()->getSuSecurity());
55
+ $sObj->setEmailCustomer($order->getCustomerEmail());
56
+ //$sObj->setPhoneNumberCustomer($order->getCustomerTelephone());
57
+
58
+ $sObj->setSofortlastschrift();
59
+
60
+ $sObj->sendRequest();
61
+ if(!$sObj->isError()) {
62
+ $url = $sObj->getPaymentUrl();
63
+ $tid = $sObj->getTransactionId();
64
+ $order->getPayment()->setPnSuTransactionId($tid);
65
+ return $url;
66
+ } else {
67
+ Mage::throwException(Mage::helper('pnsofortueberweisung')->__($sObj->getError()));
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Retrieve information from payment configuration
73
+ *
74
+ * @param string $field
75
+ * @return mixed
76
+ */
77
+ public function getConfigData($field, $storeId = null)
78
+ {
79
+ if (null === $storeId) {
80
+ $storeId = $this->getStore();
81
+ }
82
+
83
+ if($field == 'active')
84
+ $field = $this->getCode().'_'.$field;
85
+ elseif($field == 'title')
86
+ return Mage::getStoreConfig('payment/sofortlastschrift/'.$field, $storeId);
87
+ elseif($field == 'sort_order')
88
+ return Mage::getStoreConfig('payment/sofort/sort_order') + 1;
89
+
90
+ $path = 'payment/sofort/'.$field;
91
+ return Mage::getStoreConfig($path, $storeId);
92
+ }
93
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/Sofortrechnung.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Pnsofortueberweisung.php 285 2010-08-23 16:21:45Z poser $
20
+ */
21
+ class Paymentnetwork_Pnsofortueberweisung_Model_Sofortrechnung extends Paymentnetwork_Pnsofortueberweisung_Model_Abstract
22
+ {
23
+
24
+ /**
25
+ * Availability options
26
+ */
27
+ protected $_code = 'sofortrechnung';
28
+ protected $_formBlockType = 'pnsofortueberweisung/form_sofortrechnung';
29
+
30
+
31
+ public function getUrl(){
32
+ $order = $this->getOrder();
33
+ $amount = number_format($order->getGrandTotal(),2,'.','');
34
+ $billing = $order->getBillingAddress();
35
+ $security = $this->getSecurityKey();
36
+ $reason1 = Mage::helper('pnsofortueberweisung')->__('Order No.: ').$order->getRealOrderId();
37
+ $reason1 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason1);
38
+ $reason2 = Mage::getStoreConfig('general/store_information/name');
39
+ $reason2 = preg_replace('#[^a-zA-Z0-9+-\.,]#', ' ', $reason2);
40
+ $baseurl = Mage::app()->getStore()->getBaseUrl();
41
+ $success_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/return/orderId/'.$order->getRealOrderId();
42
+ $cancel_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/error/orderId/'.$order->getRealOrderId();
43
+ $notification_url = $baseurl.'pnsofortueberweisung/pnsofortueberweisung/notification/orderId/'.$order->getRealOrderId();
44
+
45
+ Mage::helper('pnsofortueberweisung/sofortlib');
46
+ $sObj = new SofortLib_Multipay(Mage::getStoreConfig('payment/pnsofortueberweisung/apikey'), Mage::getStoreConfig('payment/pnsofortueberweisung/project'));
47
+ $sObj->setVersion('pn_mag_1.9.9');
48
+ $sObj->setAmount($amount, $order->getOrderCurrencyCode());
49
+ $sObj->setReason($reason1, $reason2);
50
+ $sObj->setSuccessUrl($success_url);
51
+ $sObj->setAbortUrl($cancel_url);
52
+ $sObj->setNotificationUrl($notification_url);
53
+ $sObj->addUserVariable($order->getRealOrderId());
54
+ $sObj->addUserVariable($this->getOrder()->getPayment()->getSuSecurity());
55
+ $sObj->setEmailCustomer($order->getCustomerEmail());
56
+ //$sObj->setPhoneNumberCustomer($order->getCustomerTelephone());
57
+
58
+
59
+ $sObj->setSofortrechnung();
60
+
61
+ $sObj->setSofortrechnungCustomerId($order->getCustomerId());
62
+ $sObj->setSofortrechnungOrderId($order->getRealOrderId());
63
+
64
+
65
+ $address = $order->getBillingAddress();
66
+ //split address into street and number at last dot or space
67
+ preg_match('#(.+)[ .](.+)#i', trim($address->getStreetFull()), $street);
68
+ $sObj->setSofortrechnungInvoiceAddress($address->getFirstname(), $address->getLastname(),
69
+ $street[1], $street[2], $address->getPostcode(), $address->getCity(), '1', $address->getCountryId());/*TODO salutation*/
70
+
71
+ $address = $order->getShippingAddress();
72
+ preg_match('#(.+)[ .](.+)#i', trim($address->getStreetFull()), $street);
73
+ $sObj->setSofortrechnungShippingAddress($address->getFirstname(), $address->getLastname(),
74
+ $street[1], $street[2], $address->getPostcode(), $address->getCity(), '1', $address->getCountryId());
75
+
76
+ foreach ($order->getAllItems() as $item) {
77
+ $sObj->addSofortrechnungItem($item->getSku(), $item->getName(), $item->getPriceInclTax(), 0, $item->getDescription(), $item->getQtyOrdered(), $item->getTaxPercent());
78
+ }
79
+ $sObj->addSofortrechnungItem(1, $order->getShippingDescription(), $order->getShippingInclTax(), 1, '', 1, round($order->getShippingTaxAmount()/$order->getShippingAmount()*100));
80
+
81
+ $sObj->sendRequest();
82
+ if(!$sObj->isError()) {
83
+ $url = $sObj->getPaymentUrl();
84
+ $tid = $sObj->getTransactionId();
85
+ $order->getPayment()->setPnSuTransactionId($tid);
86
+ return $url;
87
+ } else {
88
+ Mage::throwException(Mage::helper('pnsofortueberweisung')->__($sObj->getError()));
89
+ }
90
+ }
91
+
92
+ /**
93
+ * Retrieve information from payment configuration
94
+ *
95
+ * @param string $field
96
+ * @return mixed
97
+ */
98
+ public function getConfigData($field, $storeId = null)
99
+ {
100
+ if (null === $storeId) {
101
+ $storeId = $this->getStore();
102
+ }
103
+
104
+ if($field == 'active')
105
+ $field = $this->getCode().'_'.$field;
106
+ elseif($field == 'title')
107
+ return Mage::getStoreConfig('payment/sofortrechnung/'.$field, $storeId);
108
+ elseif($field == 'sort_order')
109
+ return Mage::getStoreConfig('payment/sofort/sort_order')+2;
110
+
111
+ $path = 'payment/sofort/'.$field;
112
+ return Mage::getStoreConfig($path, $storeId);
113
+ }
114
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/Model/System/Config/Source/Logo.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: PnsofortueberweisungController.php 277 2010-08-12 14:55:44Z poser $
20
+ */
21
+
22
+
23
+ class Paymentnetwork_Pnsofortueberweisung_Model_System_Config_Source_Logo
24
+ {
25
+ public function toOptionArray()
26
+ {
27
+ return array(
28
+ 'logo_155x50' => Mage::helper('pnsofortueberweisung')->__('Logo + Text'),
29
+ 'banner_300x100' => Mage::helper('pnsofortueberweisung')->__('Banner'),
30
+ );
31
+ }
32
+
33
+ }
app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/Adminhtml/PnsofortueberweisungController.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: PnsofortueberweisungController.php 205 2010-06-14 12:53:41Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Adminhtml_PnsofortueberweisungController extends Mage_Adminhtml_Controller_Action
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: PnsofortueberweisungController.php 393 2010-06-14 12:53:41Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_Adminhtml_PnsofortueberweisungController extends Mage_Adminhtml_Controller_Action
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/PcsofortueberweisungController.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: PcsofortueberweisungController.php 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_PaycodeController extends Mage_Core_Controller_Front_Action
22
  {
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: PcsofortueberweisungController.php 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  class Paymentnetwork_Pnsofortueberweisung_PaycodeController extends Mage_Core_Controller_Front_Action
22
  {
app/code/community/Paymentnetwork/Pnsofortueberweisung/controllers/PnsofortueberweisungController.php CHANGED
@@ -17,7 +17,7 @@
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- * @version $Id: PnsofortueberweisungController.php 494 2011-05-25 12:41:19Z poser $
21
  */
22
 
23
  class Paymentnetwork_Pnsofortueberweisung_PnsofortueberweisungController extends Mage_Core_Controller_Front_Action
@@ -164,7 +164,7 @@ class Paymentnetwork_Pnsofortueberweisung_PnsofortueberweisungController extends
164
  $payment->setTransactionId($data['transaction'])
165
  ->setIsTransactionClosed(1);
166
  if(method_exists($payment, 'addTransaction')) {
167
- $payment->addTransaction('order'); //transaction overview in magento > 1.5
168
  }
169
 
170
  $order->setPayment($payment);
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version $Id: PnsofortueberweisungController.php 736 2011-06-06 13:50:46Z poser $
21
  */
22
 
23
  class Paymentnetwork_Pnsofortueberweisung_PnsofortueberweisungController extends Mage_Core_Controller_Front_Action
164
  $payment->setTransactionId($data['transaction'])
165
  ->setIsTransactionClosed(1);
166
  if(method_exists($payment, 'addTransaction')) {
167
+ $payment->addTransaction('authorization'); //transaction overview in magento > 1.5
168
  }
169
 
170
  $order->setPayment($payment);
app/code/community/Paymentnetwork/Pnsofortueberweisung/etc/config.xml CHANGED
@@ -17,7 +17,7 @@
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- * @version $Id: config.xml 495 2011-05-25 13:06:11Z poser $
21
  */
22
  -->
23
 
@@ -25,7 +25,7 @@
25
  <modules>
26
  <Paymentnetwork_Pnsofortueberweisung>
27
  <!-- declare module's version information for database updates -->
28
- <version>1.1.8</version>
29
  </Paymentnetwork_Pnsofortueberweisung>
30
  </modules>
31
 
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version $Id: config.xml 736 2011-06-06 13:50:46Z poser $
21
  */
22
  -->
23
 
25
  <modules>
26
  <Paymentnetwork_Pnsofortueberweisung>
27
  <!-- declare module's version information for database updates -->
28
+ <version>1.1.9</version>
29
  </Paymentnetwork_Pnsofortueberweisung>
30
  </modules>
31
 
app/code/community/Paymentnetwork/Pnsofortueberweisung/etc/system.xml CHANGED
@@ -17,7 +17,7 @@
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
- * @version $Id: system.xml 205 2010-06-14 12:53:41Z thoma $
21
  */
22
  -->
23
 
17
  * @package Paymentnetwork_Sofortueberweisung
18
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
19
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ * @version $Id: system.xml 393 2010-06-14 12:53:41Z thoma $
21
  */
22
  -->
23
 
app/code/community/Paymentnetwork/Pnsofortueberweisung/sql/pnsofortueberweisung_setup/mysql4-install-1.1.1.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: mysql4-install-1.1.1.php 232 2010-07-06 16:54:28Z thoma $
20
  */
21
 
22
  $installer = $this;
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: mysql4-install-1.1.1.php 420 2010-07-06 16:54:28Z thoma $
20
  */
21
 
22
  $installer = $this;
app/design/adminhtml/default/default/template/pnsofortueberweisung/form/paycode.phtml CHANGED
@@ -16,6 +16,6 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: paycode.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?><?= Mage::helper('pnsofortueberweisung')->__('Not possible'); ?>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: paycode.phtml 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?><?= Mage::helper('pnsofortueberweisung')->__('Not possible'); ?>
app/design/adminhtml/default/default/template/pnsofortueberweisung/form/sofortueberweisung.phtml CHANGED
@@ -16,6 +16,6 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: sofortueberweisung.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?><?= Mage::helper('pnsofortueberweisung')->__('Not possible'); ?>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?><?= Mage::helper('pnsofortueberweisung')->__('Not possible'); ?>
app/design/adminhtml/default/default/template/pnsofortueberweisung/info/paycode.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: paycode.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
 
22
  -->
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: paycode.phtml 378 2010-06-02 14:34:14Z thoma $
20
  */
21
 
22
  -->
app/design/adminhtml/default/default/template/pnsofortueberweisung/info/pdf/paycode.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: paycode.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  -->
22
  <?= Mage::helper('pnsofortueberweisung')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: paycode.phtml 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  -->
22
  <?= Mage::helper('pnsofortueberweisung')->__('Paymentinformations: %s',$this->getMethod()->getTitle()) ?>
app/design/adminhtml/default/default/template/pnsofortueberweisung/info/pdf/sofortueberweisung.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: sofortueberweisung.phtml 194 2010-06-07 15:09:10Z thoma $
20
  */
21
 
22
  -->
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 382 2010-06-07 15:09:10Z thoma $
20
  */
21
 
22
  -->
app/design/adminhtml/default/default/template/pnsofortueberweisung/info/sofortueberweisung.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: sofortueberweisung.phtml 194 2010-06-07 15:09:10Z thoma $
20
  */
21
 
22
  -->
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 382 2010-06-07 15:09:10Z thoma $
20
  */
21
 
22
  -->
app/design/adminhtml/default/default/template/pnsofortueberweisung/system/config/fieldset/global.phtml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-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
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <?php
28
+ /**
29
+ * @see Paymentnetwork_Pnsofortueberweisung_Block_Adminhtml_System_Config_Fieldset_Global
30
+ */
31
+ ?>
32
+ <table class="form-list" id="sofort_checkout" cellspacing="0">
33
+ <colgroup class="label" width="20%"></colgroup>
34
+ <colgroup class="value" width="30%"></colgroup>
35
+ <colgroup class="scope-label" width="25%"></colgroup>
36
+ <colgroup width="25%"></colgroup>
37
+ <thead>
38
+ <tr>
39
+ <th colspan="3"><?php echo $this->escapeHtml($this->getFieldsetLabel()) ?></th>
40
+ <th style="text-align: right;"><a href="<?php echo $this->escapeHtml($this->getFieldsetHelpUrl()) ?>"><?php echo Mage::helper('pnsofortueberweisung')->__('Help')?></a></th>
41
+ </tr>
42
+ </thead>
43
+ <tbody>
44
+ <?php foreach($this->getElements() as $htmlId => $element): ?>
45
+ <tr>
46
+ <?php if($element->getType() == 'checkbox'):?>
47
+ <td colspan="3"><br />
48
+ <label for="<?php echo $htmlId?>"><?php echo $this->getElementHtml($element) ?><strong><?php echo $this->escapeHtml($this->getElementLabel($element))?></strong>&nbsp;&ndash; <?php echo $this->escapeHtml($this->getElementComment($element))?></label>
49
+ </td>
50
+ <td style="text-align: right;"><br />
51
+ <?php if ($url = $this->getElementOriginalData($element, 'more_url')):?>
52
+ <a href="<?php echo $this->escapeHtml($url) ?>"><?php echo Mage::helper('pnsofortueberweisung')->__('Learn More')?></a>
53
+ <?php endif;?>
54
+ </td>
55
+ <?php else:?>
56
+ <?php if($element->getType() == 'text') $element->addClass('input-text');?>
57
+ <td class="label">
58
+ <?php echo $element->getLabelHtml()?>
59
+ </td>
60
+ <td class="value">
61
+ <?php echo $element->getElementHtml() ?>
62
+ </td>
63
+ <td></td>
64
+ <td></td>
65
+ <?php endif;?>
66
+ </tr>
67
+ <?php endforeach;?>
68
+ </tbody>
69
+ </table>
app/design/frontend/default/default/template/pnsofortueberweisung/form/paycode.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: paycode.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?>
22
  <a name="<php echo $this->getMethodCode() ?>"></a>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: paycode.phtml 683 2011-05-25 13:06:11Z poser $
20
  */
21
  ?>
22
  <a name="<php echo $this->getMethodCode() ?>"></a>
app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortlastschrift.phtml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 417 2011-01-31 17:04:43Z poser $
20
+ */
21
+ ?>
22
+ <?php if(Mage::getStoreConfig('payment/sofort/active')):?>
23
+ <a name="<?php echo $this->getMethodCode() ?>"></a>
24
+ <?php $_code=$this->getMethodCode()?>
25
+ <div style="padding-left:20px;padding-bottom: 10px; display:none;" id="payment_form_<?php echo $this->getMethodCode() ?>">
26
+ <?php if($this->isDisplayText()):?>
27
+ <p style="font-size: 9px;">
28
+ <?=$this->__('Get stock articles.')?>
29
+ </p>
30
+ <div>
31
+ <strong><?php echo $this->__('Your benefit:')?></strong>
32
+ <ul style="list-style-type:disc;">
33
+ <li style="margin-left:15px;"><?=$this->__('Fast shippiung')?></li>
34
+ <li style="margin-left:15px;"><?=$this->__('Privacy')?></li>
35
+ <li style="margin-left:15px;"><?=$this->__('No registration')?></li>
36
+ <li style="margin-left:15px;"><?=$this->__('Save payment')?></li>
37
+ </ul>
38
+ </div>
39
+ <?php else:?>
40
+ <a href="#<?php echo $this->getMethodCode() ?>" title="Informationen zu Sofortlastschrift"><img src="<?php echo $this->getImageUrl();?>" alt="Sofortlastschrift" title="Sofortlastschrift" /></a>
41
+ <?php endif;?>
42
+ </div>
43
+ <div class="clear"></div>
44
+ <?php endif;?>
app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortrechnung.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Paymentnetwork
16
+ * @package Paymentnetwork_Sofortueberweisung
17
+ * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 417 2011-01-31 17:04:43Z poser $
20
+ */
21
+ ?>
22
+ <a name="<?php echo $this->getMethodCode() ?>"></a>
23
+ <?php $_code=$this->getMethodCode()?>
24
+ <div style="padding-left:20px;padding-bottom: 10px; display:none;" id="payment_form_<?php echo $this->getMethodCode() ?>">
25
+ <?php if($this->isDisplayText()):?>
26
+ <p style="font-size: 9px;">
27
+ <?=$this->__('Get stock articles.')?>
28
+ </p>
29
+ <div>
30
+ <strong><?php echo $this->__('Your benefit:')?></strong>
31
+ <ul style="list-style-type:disc;">
32
+ <li style="margin-left:15px;"><?=$this->__('Fast shippiung')?></li>
33
+ <li style="margin-left:15px;"><?=$this->__('Privacy')?></li>
34
+ <li style="margin-left:15px;"><?=$this->__('No registration')?></li>
35
+ <li style="margin-left:15px;"><?=$this->__('Save payment')?></li>
36
+ </ul>
37
+ </div>
38
+ <?php else:?>
39
+ <a href="#<?php echo $this->getMethodCode() ?>" title="Informationen zu Sofortrechnung"><img src="<?php echo $this->getImageUrl();?>" alt="Sofortrechnung" title="Sofortrechnung" /></a>
40
+ <?php endif;?>
41
+ </div>
42
+ <div class="clear"></div>
app/design/frontend/default/default/template/pnsofortueberweisung/form/sofortueberweisung.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: sofortueberweisung.phtml 494 2011-05-25 12:41:19Z poser $
20
  */
21
  ?>
22
  <?php if(Mage::getStoreConfig('payment/pnsofortueberweisung/active')):?>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 683 2011-05-25 13:06:11Z poser $
20
  */
21
  ?>
22
  <?php if(Mage::getStoreConfig('payment/pnsofortueberweisung/active')):?>
app/design/frontend/default/default/template/pnsofortueberweisung/info/paycode.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: paycode.phtml 190 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?>
22
  <p><?= $this->getMethod()->getTitle() ?></p>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: paycode.phtml 378 2010-06-02 14:34:14Z thoma $
20
  */
21
  ?>
22
  <p><?= $this->getMethod()->getTitle() ?></p>
app/design/frontend/default/default/template/pnsofortueberweisung/info/sofortueberweisung.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: sofortueberweisung.phtml 198 2010-06-09 15:49:29Z thoma $
20
  */
21
  ?>
22
  <p><?= $this->getMethod()->getTitle() ?></p>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: sofortueberweisung.phtml 386 2010-06-09 15:49:29Z thoma $
20
  */
21
  ?>
22
  <p><?= $this->getMethod()->getTitle() ?></p>
app/design/frontend/default/default/template/pnsofortueberweisung/infobox.phtml CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: infobox.phtml 494 2011-05-25 12:41:19Z poser $
20
  */
21
  ?>
22
  <?php if(Mage::getStoreConfig('payment/pnsofortueberweisung/active')):?>
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: infobox.phtml 683 2011-05-25 13:06:11Z poser $
20
  */
21
  ?>
22
  <?php if(Mage::getStoreConfig('payment/pnsofortueberweisung/active')):?>
app/locale/de_AT/Paymentnetwork_Sofortueberweisung.csv CHANGED
@@ -43,4 +43,10 @@
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
- "Netherlands banks","Niederländische Banken anzeigen?"
 
 
 
 
 
 
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
+ "Netherlands banks","Niederländische Banken anzeigen?"
47
+ "Enabled","Aktiviert"
48
+ "New order status","bestätigter Bestellstatus"
49
+ "Sort order","Sortierreihenfolge"
50
+ "Title","Bezeichnung"
51
+ "Payment from applicable countries","Länder einschränken"
52
+ "Payment from Specific countries","Zahlung aus bestimmten Ländern"
app/locale/de_CH/Paymentnetwork_Sofortueberweisung.csv CHANGED
@@ -43,4 +43,10 @@
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
- "Netherlands banks","Niederländische Banken anzeigen?"
 
 
 
 
 
 
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
+ "Netherlands banks","Niederländische Banken anzeigen?"
47
+ "Enabled","Aktiviert"
48
+ "New order status","bestätigter Bestellstatus"
49
+ "Sort order","Sortierreihenfolge"
50
+ "Title","Bezeichnung"
51
+ "Payment from applicable countries","Länder einschränken"
52
+ "Payment from Specific countries","Zahlung aus bestimmten Ländern"
app/locale/de_DE/Paymentnetwork_Sofortueberweisung.csv CHANGED
@@ -43,4 +43,10 @@
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
- "Netherlands banks","Niederländische Banken anzeigen?"
 
 
 
 
 
 
43
  "No registration","keine Registrierung notwendig"
44
  "Save payment","sicher und schnell bezahlen"
45
  "Paycode information","Ware wird umgehend nach Bezahlung mit paycode versandt. Sie benötigen erst zum Zeitpunkt der Bezahlung Ihre Online-Banking-Daten (PIN und TAN)."
46
+ "Netherlands banks","Niederländische Banken anzeigen?"
47
+ "Enabled","Aktiviert"
48
+ "New order status","bestätigter Bestellstatus"
49
+ "Sort order","Sortierreihenfolge"
50
+ "Title","Bezeichnung"
51
+ "Payment from applicable countries","Länder einschränken"
52
+ "Payment from Specific countries","Zahlung aus bestimmten Ländern"
lib/Varien/Data/Form/Element/Linkpnso.php CHANGED
@@ -16,7 +16,7 @@
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
- * @version $Id: Linkpnso.php 199 2010-06-10 14:56:03Z thoma $
20
  */
21
 
22
  class Varien_Data_Form_Element_Linkpnso extends Varien_Data_Form_Element_Abstract
16
  * @package Paymentnetwork_Sofortueberweisung
17
  * @copyright Copyright (c) 2008 [m]zentrale GbR, 2010 Payment Network AG
18
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ * @version $Id: Linkpnso.php 387 2010-06-10 14:56:03Z thoma $
20
  */
21
 
22
  class Varien_Data_Form_Element_Linkpnso extends Varien_Data_Form_Element_Abstract
package.xml CHANGED
@@ -1,23 +1,21 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>pn_sofortueberweisung</name>
4
- <version>1.1.8</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Modul f&#xFC;r Bezahlung mit sofort&#xFC;berweisung.de</summary>
10
- <description>sofort&#xFC;berweisung.de ist das Direkt-&#xDC;berweisungsverfahren der Payment Network AG. Mit sofort&#xFC;berweisung.de stellen Sie noch w&#xE4;hrend Ihrer Bestellung bequem eine &#xDC;berweisung &#xFC;ber den jeweiligen Betrag in Ihr Online-Banking-Konto ein. Der H&#xE4;ndler erh&#xE4;lt nach Abschluss der sofort&#xFC;berweisung.de eine Echtzeitbest&#xE4;tigung. So kann er Lagerware und digitale G&#xFC;ter sofort versenden - Sie erhalten dann Ihre Eink&#xE4;ufe schneller.
11
-
12
  sofort&#xFC;berweisung.de entspricht den hohen Sicherheitsstandards des Online-Bankings und verf&#xFC;gt &#xFC;ber T&#xDC;V-gepr&#xFC;ften Datenschutz. Sie m&#xFC;ssen sich weder registrieren noch ben&#xF6;tigen Sie eine Kreditkarte. Sie bezahlen einfach, sicher und schnell direkt mit Ihrem Online-Bankkonto.</description>
13
- <notes>- fixed sending of multiple emails on timeout
14
- - fixed issue with template/skin
15
- - fixed problem that status is set to processing for a short time before redirecting to payment form
16
- - add transaction id to overview for magento 1.5</notes>
17
  <authors><author><name>SP</name><user>auto-converted</user><email>sp@payment-network.com</email></author></authors>
18
- <date>2011-05-25</date>
19
- <time>13:06:34</time>
20
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pnsofortueberweisung"><dir name="form"><file name="paycode.phtml" hash="9e50d4b6c371f0ff7193dbd403402ad9"/><file name="sofortueberweisung.phtml" hash="114f6ffe18747ca9a9683e41a7adcf3d"/></dir><dir name="info"><dir name="pdf"><file name="paycode.phtml" hash="ed1a257b6971093e84a171f22acd925e"/><file name="sofortueberweisung.phtml" hash="5963d54a02fb356c7998b77a358999a7"/></dir><file name="paycode.phtml" hash="fe619e1d2f75d979a2b6c93dec62892a"/><file name="sofortueberweisung.phtml" hash="8a718ace28c89ed9f939c4daa8e9d83c"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="pnsofortueberweisung.xml" hash="6e20ddd757b54ba04ded82dba58ffddf"/></dir><dir name="template"><dir name="pnsofortueberweisung"><dir name="form"><file name="paycode.phtml" hash="131572372e72d865a2d3258084a96663"/><file name="sofortueberweisung.phtml" hash="24373712788c25a7ca4bf72220ff487c"/></dir><dir name="info"><file name="paycode.phtml" hash="e05a548633fbce5699e691adefd36685"/><file name="sofortueberweisung.phtml" hash="01c5caec35a4168d03395c20421e32b1"/></dir><file name="infobox.phtml" hash="204e0cb1a40a817f760d3f80d6d1310c"/><file name="notice.phtml" hash="a2516b689ebd35e234a0ec457b6be99e"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_AT"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="f964d9c73a2d9e1873bbaab7ecbbb62d"/></dir><dir name="de_CH"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="f964d9c73a2d9e1873bbaab7ecbbb62d"/></dir><dir name="de_DE"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="f964d9c73a2d9e1873bbaab7ecbbb62d"/></dir><dir name="en_US"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="7c4a7ff69cb21f305710530030844542"/></dir><dir name="fr_FR"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="84ad3331c213133aa989992af0835453"/></dir><dir name="it_IT"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="e9ffba3e84fea6d8f7c400f71db72575"/></dir><dir name="nl_NL"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="b92a43021631b83144b8a28962f54294"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="pnsofortueberweisung"><file name="logo_paycode_198.gif" hash="67a7a3f27350669fcdf17be86ee64250"/><file name="logo_sofortueberweisung170.jpg" hash="c7a66b881654c851f595faf9271b5d1a"/><file name="logo_sofortueberweisung200.jpg" hash="30309f53c3d09342f1af3acb9941c294"/><file name="logo_tuev_144px.gif" hash="6bee90a36853ca5aa99b71ae3c0a8542"/><file name="piktogram.jpg" hash="ce76a19b3314333bcff854985f5065e8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymentnetwork_Sofortueberweisung.xml" hash="b7d44d2343d94a67eb13089fdb903ff0"/></dir></target><target name="magecommunity"><dir name="Paymentnetwork"><dir name="Pnsofortueberweisung"><dir name="Block"><dir name="Adminhtml"><dir name="Pnsofortueberweisung"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="3843ce375cf7d0fc2e01362b1426d9cf"/></dir><file name="Form.php" hash="10a3bee9f80741468b7badd951838b9e"/><file name="Tabs.php" hash="1af8fbc5f6687f050c9745fb47c0db10"/></dir><file name="Edit.php" hash="5bb61ea68c63a6e1568568d29c401aec"/><file name="Grid.php" hash="e965a8137734c9f764a58425c058f3f7"/></dir><file name="Pnsofortueberweisung.php" hash="ee0bb6a50bc1b5204c2a1a643b9cc1d6"/></dir><dir name="Form"><file name="Paycode.php" hash="521e3a7cec06f9c335b2f5c041e724d7"/><file name="Pnsofortueberweisung.php" hash="7542a1429b02272ec761b6d4c02b9b8f"/></dir><dir name="Info"><file name="Paycode.php" hash="ba6e00fb01975349d9e1357e9e7e198c"/><file name="Pnsofortueberweisung.php" hash="bad2cbd693b8693902ebd5f2fbac2329"/></dir><file name="Infobox.php" hash="ee2ff11e1aa7855dba4db039d0cb6195"/><file name="Pnsofortueberweisung.php" hash="8ad47aba839c8f1664b0f41b1163da0e"/><file name="Pnsofortueberweisungnotice.php" hash="6d0d6b5b07c8f768d71d345778eaf723"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PnsofortueberweisungController.php" hash="50f5be162967859e63e08b3c5f458457"/></dir><file name="PcsofortueberweisungController.php" hash="631b00b71f5b88e9b975ded3722c1af7"/><file name="PnsofortueberweisungController.php" hash="7704eefa91e83b624c9c2ad6b75a8ddd"/></dir><dir name="etc"><file name="config.xml" hash="e9769012f0a37835c092fc3ef1e2f139"/><file name="system.xml" hash="ea121f8be67951d4d62c4c17e784c897"/></dir><dir name="Helper"><file name="Data.php" hash="c55af80c80ae671b934960e23f987aa1"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="dc9120374b59dbcb1aec72e779055e7c"/><file name="Quote.php" hash="45335503d7d2a0a30c3dc7573c2d272e"/></dir><dir name="Data"><dir name="Form"><dir name="Element"><file name="Link.php" hash="a2230a1936e0635e3bba54d93318e656"/></dir></dir></dir><dir name="Mysql4"><dir name="Pnsofortueberweisung"><file name="Collection.php" hash="75ee6b12b1125e15443a132210a5a6c6"/></dir><file name="Pnsofortueberweisung.php" hash="4c2ea3e6231a452d1c1ba3f74e8a17ae"/><file name="Setup.php" hash="9d7fba554af02f22a16b2c99202dee0a"/></dir><file name="Params.php" hash="c53bf552542a43550bceefa940b277a3"/><file name="Paycode.php" hash="99c635687730a76d631fb2cdb28a1226"/><file name="Pnsofortueberweisung.php" hash="b0c13d04fbc2cff23b35826730f10086"/><file name="Status.php" hash="9cd657c753e8492c69bb5f769531f502"/></dir><dir name="sql"><dir name="pnsofortueberweisung_setup"><file name="mysql4-install-1.1.1.php" hash="a4b9f98ea9dc763e236fdc73760b5ba3"/></dir></dir></dir></dir></target><target name="magelib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Linkpnso.php" hash="a3f7cea7f4e407197a20bd3c7107b981"/></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies/>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>pn_sofortueberweisung</name>
4
+ <version>1.1.9</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Modul f&#xFC;r Bezahlung mit sofort&#xFC;berweisung.de</summary>
10
+ <description>sofort&#xFC;berweisung.de ist das Direkt-&#xDC;berweisungsverfahren der Payment Network AG. Mit sofort&#xFC;berweisung.de stellen Sie noch w&#xE4;hrend Ihrer Bestellung bequem eine &#xDC;berweisung &#xFC;ber den jeweiligen Betrag in Ihr Online-Banking-Konto ein. Der H&#xE4;ndler erh&#xE4;lt nach Abschluss der sofort&#xFC;berweisung.de eine Echtzeitbest&#xE4;tigung. So kann er Lagerware und digitale G&#xFC;ter sofort versenden - Sie erhalten dann Ihre Eink&#xE4;ufe schneller.&#xD;
11
+ &#xD;
12
  sofort&#xFC;berweisung.de entspricht den hohen Sicherheitsstandards des Online-Bankings und verf&#xFC;gt &#xFC;ber T&#xDC;V-gepr&#xFC;ften Datenschutz. Sie m&#xFC;ssen sich weder registrieren noch ben&#xF6;tigen Sie eine Kreditkarte. Sie bezahlen einfach, sicher und schnell direkt mit Ihrem Online-Bankkonto.</description>
13
+ <notes>- added translationstrings&#xD;
14
+ - fixed issue with missing transaction-type "order" in magento 1.4.1.1 - 1.5</notes>
 
 
15
  <authors><author><name>SP</name><user>auto-converted</user><email>sp@payment-network.com</email></author></authors>
16
+ <date>2011-06-06</date>
17
+ <time>14:39:29</time>
18
+ <contents><target name="magecommunity"><dir name="Paymentnetwork"><dir name="Pnsofortueberweisung"><dir name="Block"><dir name="Adminhtml"><dir name="Pnsofortueberweisung"><dir name="Edit"><dir name="Tab"><file name="Form.php" hash="0178ee51d7bb88c37e09a6fe39b6e1dd"/></dir><file name="Form.php" hash="bd63de3b9cbacee2c6ba2a7edfbc22f8"/><file name="Tabs.php" hash="6353c179d050398331fcce52decbe135"/></dir><file name="Edit.php" hash="e29699441a990ecda9be0566118e84b9"/><file name="Grid.php" hash="de8e5dc70afd006fb1787dbdb7bf90e5"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Global.php" hash="424888106b36bd75330af58eb844eb3d"/></dir></dir></dir><file name="Pnsofortueberweisung.php" hash="ee0bb6a50bc1b5204c2a1a643b9cc1d6"/></dir><dir name="Form"><file name="Paycode.php" hash="05523887e4059c8ec4173dc5adbf6c6c"/><file name="Pnsofortueberweisung.php" hash="9185255e612e3d81ce15d2bdb7cf00c1"/><file name="Sofortlastschrift.php" hash="26f19d442751f3a925d2b2f38b8a9781"/><file name="Sofortrechnung.php" hash="0dc12a6e13c32a2485c3438cecbc4424"/></dir><dir name="Info"><file name="Paycode.php" hash="0e9b12de50bf0606974a507b5b72a9a4"/><file name="Pnsofortueberweisung.php" hash="1a998ebb18ef4594aeccba1cf65e0181"/></dir><file name="Infobox.php" hash="2919ea9ce7575eba0a1c454ccf5e749f"/><file name="Pnsofortueberweisung.php" hash="e1e9b4b03c707980e3494c8c6a318898"/><file name="Pnsofortueberweisungnotice.php" hash="aa1456727c739a781cc8eb2f7502d55f"/></dir><dir name="Helper"><file name="Data.php" hash="89fa83c08d2ea5a5ed89c90d1592142a"/><file name="Sofortlib.php" hash="bc15efcf0483e5e281e44ce6d51addb1"/><file name="log.txt" hash="2c8dca49dbd552d47066218fce5ea814"/></dir><dir name="Model"><dir name="Convert"><file name="Order.php" hash="d7fa8c45abaa6241c6a7397f56d22bce"/><file name="Quote.php" hash="b8adca78aee4ecc428bc244092eacc91"/></dir><dir name="Data"><dir name="Form"><dir name="Element"><file name="Link.php" hash="cf877811ec4da7dc84250465f69db3fc"/></dir></dir></dir><dir name="Mysql4"><dir name="Pnsofortueberweisung"><file name="Collection.php" hash="75ee6b12b1125e15443a132210a5a6c6"/></dir><file name="Pnsofortueberweisung.php" hash="4c2ea3e6231a452d1c1ba3f74e8a17ae"/><file name="Setup.php" hash="23ed70c058195a1ccf4bf7116b00be72"/></dir><dir name="Order"><dir name="Pdf"><file name="Invoice.php" hash="b6df4e247949607305f92222523670e2"/></dir><file name="Invoice.php" hash="afbeff3975fb7bf1af8b813aaec2757c"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Logo.php" hash="b0bccf66d969570a3287bddcc5f75180"/></dir></dir></dir><file name="Abstract.php" hash="259a1eda5d6eed9c9eb7ccbfaa442466"/><file name="Params.php" hash="6157e94ef8396a0cc972b79ea0eb0416"/><file name="Paycode.php" hash="a8d808c378f5ee6373862d130ea57c4a"/><file name="Pnsofort.php" hash="c7b4c6710f2be55e0501de35cd406268"/><file name="Pnsofortueberweisung.php" hash="e414916227b6856e28eee01c816a25f1"/><file name="Sofortlastschrift.php" hash="217089e75527564ae860a265ce5dd257"/><file name="Sofortrechnung.php" hash="9f57af0b38923f1b98e34871b9726804"/><file name="Status.php" hash="9cd657c753e8492c69bb5f769531f502"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="PnsofortueberweisungController.php" hash="5cade387a1bdbb27b3a759fd8c2fecc0"/></dir><file name="PcsofortueberweisungController.php" hash="e9caaaa5fe563a11ddfd6ba3c52fe31d"/><file name="PnsofortueberweisungController.php" hash="89401995ee486cd30f5064874e2835b4"/></dir><dir name="etc"><file name="config.xml" hash="b0497f8803e13e32d4c4488815bf8162"/><file name="system.xml" hash="a57ac7b06e2740fcea3d2061d5e06665"/></dir><dir name="sql"><dir name="pnsofortueberweisung_setup"><file name="mysql4-install-1.1.1.php" hash="681c2dbba7e0684a9c73eb458d61be05"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="pnsofortueberweisung"><dir name="form"><file name="paycode.phtml" hash="c0602e2b6bb1f2fcc8a1313a39be75e0"/><file name="sofortueberweisung.phtml" hash="226af1b5a1e67b88b7c773ffa9b0532e"/></dir><dir name="info"><dir name="pdf"><file name="paycode.phtml" hash="3cb08c0e2b387e99a8797bc8dc8ce5a5"/><file name="sofortueberweisung.phtml" hash="947ebc2035626eafe0e3bcc963467ced"/></dir><file name="paycode.phtml" hash="568491aa341379495ee01a33bb564115"/><file name="sofortueberweisung.phtml" hash="b98e61ef7dfdbe46a308899fa1a54ad7"/></dir><dir name="system"><dir name="config"><dir name="fieldset"><file name="global.phtml" hash="668cffe3bf86f29492cca7fbca4e307c"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="pnsofortueberweisung.xml" hash="6e20ddd757b54ba04ded82dba58ffddf"/></dir><dir name="template"><dir name="pnsofortueberweisung"><dir name="form"><file name="paycode.phtml" hash="f10d48b20f5e5fa75d61502366a5b412"/><file name="sofortlastschrift.phtml" hash="3aab77894fccab1757b1bfb9e4642d5e"/><file name="sofortrechnung.phtml" hash="536aad1ef4bae42fe41cdaeaa427a3bf"/><file name="sofortueberweisung.phtml" hash="b3d233dffe06e75c9ab473185958e9f1"/></dir><dir name="info"><file name="paycode.phtml" hash="cdd959942916715a10e89ac2e720515c"/><file name="sofortueberweisung.phtml" hash="f96d371241af05e6b4e38f92573b87d5"/></dir><file name="infobox.phtml" hash="a7459c9e9002e7486f127a71a8783484"/><file name="notice.phtml" hash="a2516b689ebd35e234a0ec457b6be99e"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="dc5505737db37a5f5edbe635f3593dd2"/></dir><dir name="en_US"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="7c4a7ff69cb21f305710530030844542"/></dir><dir name="de_AT"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="dc5505737db37a5f5edbe635f3593dd2"/></dir><dir name="de_CH"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="dc5505737db37a5f5edbe635f3593dd2"/></dir><dir name="fr_FR"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="84ad3331c213133aa989992af0835453"/></dir><dir name="it_IT"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="e9ffba3e84fea6d8f7c400f71db72575"/></dir><dir name="nl_NL"><file name="Paymentnetwork_Sofortueberweisung.csv" hash="b92a43021631b83144b8a28962f54294"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="pnsofortueberweisung"><file name="logo_paycode_198.gif" hash="67a7a3f27350669fcdf17be86ee64250"/><file name="logo_sofortueberweisung170.jpg" hash="c7a66b881654c851f595faf9271b5d1a"/><file name="logo_sofortueberweisung200.jpg" hash="30309f53c3d09342f1af3acb9941c294"/><file name="logo_tuev_144px.gif" hash="6bee90a36853ca5aa99b71ae3c0a8542"/><file name="piktogram.jpg" hash="ce76a19b3314333bcff854985f5065e8"/><file name="sofortlastschrift.png" hash="be31270c08e6a6265d4007252fc1556e"/><file name="sofortrechnung.gif" hash="356398728f6f08556ec450d0321cabd1"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Paymentnetwork_Sofortueberweisung.xml" hash="b7d44d2343d94a67eb13089fdb903ff0"/></dir></target><target name="magelib"><dir name="Varien"><dir name="Data"><dir name="Form"><dir name="Element"><file name="Linkpnso.php" hash="5f79de7cc1ea8e64732a773e64eb2653"/></dir></dir></dir></dir></target></contents>
19
  <compatible/>
20
  <dependencies/>
21
  </package>
skin/frontend/default/default/images/pnsofortueberweisung/sofortlastschrift.png ADDED
Binary file
skin/frontend/default/default/images/pnsofortueberweisung/sofortrechnung.gif ADDED
Binary file