Dibs - Version 1.0.0.0

Version Notes

First release 1.0.0.0

Download this release

Release Info

Developer Magento Core Team
Extension Dibs
Version 1.0.0.0
Comparing to
See all releases


Version 1.0.0.0

Files changed (88) hide show
  1. app/code/local/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php +311 -0
  2. app/code/local/Mage/Dibs/Block/Standard/Form.php +12 -0
  3. app/code/local/Mage/Dibs/Block/Standard/Redirect.php +20 -0
  4. app/code/local/Mage/Dibs/Helper/Data.php +8 -0
  5. app/code/local/Mage/Dibs/Model/Mysql4/Setup.php +9 -0
  6. app/code/local/Mage/Dibs/Model/Standard.php +358 -0
  7. app/code/local/Mage/Dibs/Model/System/Config/Source/Color.php +18 -0
  8. app/code/local/Mage/Dibs/Model/System/Config/Source/Decorator.php +18 -0
  9. app/code/local/Mage/Dibs/Model/System/Config/Source/Dibslogos.php +43 -0
  10. app/code/local/Mage/Dibs/Model/System/Config/Source/Lang.php +27 -0
  11. app/code/local/Mage/Dibs/Model/System/Config/Source/Paymentwindow.php +16 -0
  12. app/code/local/Mage/Dibs/controllers/StandardController.php +379 -0
  13. app/code/local/Mage/Dibs/etc/config.xml +143 -0
  14. app/code/local/Mage/Dibs/etc/system.xml +220 -0
  15. app/code/local/Mage/Dibs/sql/dibs_setup/mysql4-install-0.7.0.php +36 -0
  16. app/code/local/Mage/Sales/Block/Order/Info.php +250 -0
  17. app/code/local/Mage/Sales/Block/Order/Print.php +207 -0
  18. app/design/frontend/default/default/layout/dibs.xml +12 -0
  19. app/design/frontend/default/default/template/dibs/standard/form.phtml +157 -0
  20. app/design/frontend/default/default/template/dibs/standard/redirect_flexwin.phtml +120 -0
  21. app/design/frontend/default/default/template/dibs/standard/redirect_paymentwindow.phtml +114 -0
  22. app/etc/modules/dibs.xml +9 -0
  23. app/locale/da_DK/Mage_Dibs.csv +22 -0
  24. app/locale/en_US/Mage_Dibs.csv +22 -0
  25. app/locale/nb_NO/Mage_Dibs.csv +22 -0
  26. app/locale/nn_NO/Mage_Dibs.csv +22 -0
  27. app/locale/sv_SE/Mage_Dibs.csv +22 -0
  28. package.xml +40 -0
  29. skin/adminhtml/default/default/images/dibs/aktia.gif +0 -0
  30. skin/adminhtml/default/default/images/dibs/amex.gif +0 -0
  31. skin/adminhtml/default/default/images/dibs/bak.gif +0 -0
  32. skin/adminhtml/default/default/images/dibs/bankeinzug.gif +0 -0
  33. skin/adminhtml/default/default/images/dibs/dankort.gif +0 -0
  34. skin/adminhtml/default/default/images/dibs/danskenetbetaling.gif +0 -0
  35. skin/adminhtml/default/default/images/dibs/dibslogo.gif +0 -0
  36. skin/adminhtml/default/default/images/dibs/diners.gif +0 -0
  37. skin/adminhtml/default/default/images/dibs/edankort.gif +0 -0
  38. skin/adminhtml/default/default/images/dibs/ewire.gif +0 -0
  39. skin/adminhtml/default/default/images/dibs/forbrugforeningen.gif +0 -0
  40. skin/adminhtml/default/default/images/dibs/getitcard.gif +0 -0
  41. skin/adminhtml/default/default/images/dibs/ideal.gif +0 -0
  42. skin/adminhtml/default/default/images/dibs/jcb.gif +0 -0
  43. skin/adminhtml/default/default/images/dibs/jcbsecure.gif +0 -0
  44. skin/adminhtml/default/default/images/dibs/loading.gif +0 -0
  45. skin/adminhtml/default/default/images/dibs/maestro.gif +0 -0
  46. skin/adminhtml/default/default/images/dibs/mastercard.gif +0 -0
  47. skin/adminhtml/default/default/images/dibs/mastercardsecurecode.gif +0 -0
  48. skin/adminhtml/default/default/images/dibs/mobilcash.gif +0 -0
  49. skin/adminhtml/default/default/images/dibs/nordeasole.gif +0 -0
  50. skin/adminhtml/default/default/images/dibs/oko.gif +0 -0
  51. skin/adminhtml/default/default/images/dibs/pci.gif +0 -0
  52. skin/adminhtml/default/default/images/dibs/seb.gif +0 -0
  53. skin/adminhtml/default/default/images/dibs/shbdirektbetaling.gif +0 -0
  54. skin/adminhtml/default/default/images/dibs/swedbankdirektbetaling.gif +0 -0
  55. skin/adminhtml/default/default/images/dibs/valus.gif +0 -0
  56. skin/adminhtml/default/default/images/dibs/verifiedbyvisa.gif +0 -0
  57. skin/adminhtml/default/default/images/dibs/visa.gif +0 -0
  58. skin/adminhtml/default/default/images/dibs/visaelectron.gif +0 -0
  59. skin/frontend/default/default/images/dibs/aktia.gif +0 -0
  60. skin/frontend/default/default/images/dibs/amex.gif +0 -0
  61. skin/frontend/default/default/images/dibs/bak.gif +0 -0
  62. skin/frontend/default/default/images/dibs/bankeinzug.gif +0 -0
  63. skin/frontend/default/default/images/dibs/dankort.gif +0 -0
  64. skin/frontend/default/default/images/dibs/danskenetbetaling.gif +0 -0
  65. skin/frontend/default/default/images/dibs/dibslogo.gif +0 -0
  66. skin/frontend/default/default/images/dibs/diners.gif +0 -0
  67. skin/frontend/default/default/images/dibs/edankort.gif +0 -0
  68. skin/frontend/default/default/images/dibs/ewire.gif +0 -0
  69. skin/frontend/default/default/images/dibs/forbrugforeningen.gif +0 -0
  70. skin/frontend/default/default/images/dibs/getitcard.gif +0 -0
  71. skin/frontend/default/default/images/dibs/ideal.gif +0 -0
  72. skin/frontend/default/default/images/dibs/jcb.gif +0 -0
  73. skin/frontend/default/default/images/dibs/jcbsecure.gif +0 -0
  74. skin/frontend/default/default/images/dibs/loading.gif +0 -0
  75. skin/frontend/default/default/images/dibs/maestro.gif +0 -0
  76. skin/frontend/default/default/images/dibs/mastercard.gif +0 -0
  77. skin/frontend/default/default/images/dibs/mastercardsecurecode.gif +0 -0
  78. skin/frontend/default/default/images/dibs/mobilcash.gif +0 -0
  79. skin/frontend/default/default/images/dibs/nordeasole.gif +0 -0
  80. skin/frontend/default/default/images/dibs/oko.gif +0 -0
  81. skin/frontend/default/default/images/dibs/pci.gif +0 -0
  82. skin/frontend/default/default/images/dibs/seb.gif +0 -0
  83. skin/frontend/default/default/images/dibs/shbdirektbetaling.gif +0 -0
  84. skin/frontend/default/default/images/dibs/swedbankdirektbetaling.gif +0 -0
  85. skin/frontend/default/default/images/dibs/valus.gif +0 -0
  86. skin/frontend/default/default/images/dibs/verifiedbyvisa.gif +0 -0
  87. skin/frontend/default/default/images/dibs/visa.gif +0 -0
  88. skin/frontend/default/default/images/dibs/visaelectron.gif +0 -0
app/code/local/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_Adminhtml
23
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Order information tab
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Adminhtml
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_Adminhtml_Block_Sales_Order_View_Tab_Info
35
+ extends Mage_Adminhtml_Block_Sales_Order_Abstract
36
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
37
+ {
38
+ /**
39
+ * Retrieve order model instance
40
+ *
41
+ * @return Mage_Sales_Model_Order
42
+ */
43
+ public function getOrder()
44
+ {
45
+ return Mage::registry('current_order');
46
+ }
47
+
48
+ /**
49
+ * Retrieve source model instance
50
+ *
51
+ * @return Mage_Sales_Model_Order
52
+ */
53
+ public function getSource()
54
+ {
55
+ return $this->getOrder();
56
+ }
57
+
58
+ /**
59
+ * Retrieve order totals block settings
60
+ *
61
+ * @return array
62
+ */
63
+ public function getOrderTotalData()
64
+ {
65
+ return array(
66
+ 'can_display_total_due' => true,
67
+ 'can_display_total_paid' => true,
68
+ 'can_display_total_refunded' => true,
69
+ );
70
+ }
71
+
72
+ public function getOrderInfoData()
73
+ {
74
+ return array(
75
+ 'no_use_order_link' => true,
76
+ );
77
+ }
78
+
79
+ public function getTrackingHtml()
80
+ {
81
+ return $this->getChildHtml('order_tracking');
82
+ }
83
+
84
+ public function getItemsHtml()
85
+ {
86
+ return $this->getChildHtml('order_items');
87
+ }
88
+
89
+ /**
90
+ * Retrive giftmessage block html
91
+ *
92
+ * @return string
93
+ */
94
+ public function getGiftmessageHtml()
95
+ {
96
+ return $this->getChildHtml('order_giftmessage');
97
+ }
98
+
99
+ public function getPaymentHtml()
100
+ {
101
+ $res = $this->getChildHtml('order_payment');
102
+
103
+ //
104
+ // Read info directly from the database
105
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
106
+ $row = $read->fetchRow("select * from dibs_order_status where orderid = " . $this->getOrder()->getIncrementId());
107
+
108
+ $standard = Mage::getModel('dibs/standard');
109
+ if ($row['status'] == '1') {
110
+ //
111
+ // Payment has been made to this order
112
+ $res .= "<br><br>" . "<table border='0' width='100%'>";
113
+ $res .= "<tr><td colspan='2'><b>" . Mage::helper('dibs')->__('DIBS_LABEL_7') . "</b></td></tr>";
114
+ if ($row['transact'] != '0') {
115
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_8') . "</td>";
116
+ $res .= "<td>" . $row['transact'] . "</td></tr>";
117
+ }
118
+ if ($row['amount'] != '0') {
119
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_9') . "</td>";
120
+ $res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . "&nbsp;" . number_format(((int)$row['amount']) / 100, 2, ',', ' ') . "</td></tr>";
121
+ }
122
+ if ($row['currency'] != '0') {
123
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_10') . "</td>";
124
+ $res .= "<td>" . $row['currency'] . "</td></tr>";
125
+ }
126
+ if ($row['fee'] != '0') {
127
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_11') . "</td>";
128
+ $res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . "&nbsp;" . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
129
+ }
130
+ if ($row['paytype'] != '0') {
131
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_12') . "</td>";
132
+ $res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
133
+ }
134
+ if ($row['cardnomask'] != '0' && $row['cardprefix'] == '0') {
135
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_13') . "</td>";
136
+ $res .= "<td>............" . trim($row['cardnomask'],'X') . "</td></tr>";
137
+ }
138
+ if ($row['cardprefix'] != '0' && $row['cardnomask'] == '0') {
139
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_13') . "</td>";
140
+ $res .= "<td>" . $row['cardprefix'] . "..........</td></tr>";
141
+ }
142
+ if ($row['cardprefix'] != '0' && $row['cardnomask'] != '0') {
143
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_13') . "</td>";
144
+ $res .= "<td>" . $row['cardprefix'] . '......' . trim($row['cardnomask'],'X') . "</td></tr>";
145
+ }
146
+ if ($row['cardexpdate'] != '0') {
147
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_14') . "</td>";
148
+ $res .= "<td>" . substr($row['cardexpdate'],2,2) . " / " . substr($row['cardexpdate'],0,2) . "</td></tr>";
149
+ }
150
+ if ($row['cardcountry'] != '0') {
151
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_15') . "</td>";
152
+ $res .= "<td>" . $row['cardcountry'] . "</td></tr>";
153
+ }
154
+ if ($row['acquirer'] != '0') {
155
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_16') . "</td>";
156
+ $res .= "<td>" . $row['acquirer'] . "</td></tr>";
157
+ }
158
+ if ($row['enrolled'] != '0') {
159
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_17') . "</td>";
160
+ $res .= "<td>" . $row['enrolled'] . "</td></tr>";
161
+ }
162
+ $res .= "</table><br>";
163
+
164
+ $res .= "<a href='https://payment.architrade.com/admin/' target='_blank'>" . Mage::helper('dibs')->__('DIBS_LABEL_18') . "</a>";
165
+ $res .= "<br><br>";
166
+
167
+ } else {
168
+ $res .= "<br>" . Mage::helper('dibs')->__('DIBS_LABEL_19') . "<br>";
169
+ }
170
+
171
+ return $res;
172
+ }
173
+
174
+ public function printLogo($paytype) {
175
+
176
+ switch($paytype) {
177
+ case 'AMEX': {
178
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
179
+ }
180
+ case 'AMEX(DK)': {
181
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
182
+ }
183
+ case 'BAX': {
184
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bax.gif') . '" border="0" />'; break;
185
+ }
186
+ case 'DIN': {
187
+ $res = $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
188
+ }
189
+ case 'DIN(DK)': {
190
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
191
+ }
192
+ case 'DK': {
193
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/dankort.gif') . '" border="0" />'; break;
194
+ }
195
+ case 'FFK': {
196
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/forbrugforeningen.gif') . '" border="0" />'; break;
197
+ }
198
+ case 'JCB': {
199
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/jcb.gif') . '" border="0" />'; break;
200
+ }
201
+ case 'MC': {
202
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
203
+ }
204
+ case 'MC(DK)': {
205
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
206
+ }
207
+ case 'MC(SE)': {
208
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
209
+ }
210
+ case 'MTRO': {
211
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
212
+ }
213
+ case 'MTRO(DK)': {
214
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
215
+ }
216
+ case 'MTRO(SE)': {
217
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
218
+ }
219
+ case 'MOCA': {
220
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mobilcash.gif') . '" border="0" />'; break;
221
+ }
222
+ case 'V-DK': {
223
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
224
+ }
225
+ case 'VISA': {
226
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
227
+ }
228
+ case 'VISA(DK)': {
229
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
230
+ }
231
+ case 'VISA(SE)': {
232
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
233
+ }
234
+ case 'ELEC': {
235
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visaelectron.gif') . '" border="0" />'; break;
236
+ }
237
+ case 'AKTIA': {
238
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/aktia.gif') . '" border="0" />'; break;
239
+ }
240
+ case 'DNB': {
241
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/danskenetbetaling.gif') . '" border="0" />'; break;
242
+ }
243
+ case 'EDK': {
244
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/edankort.gif') . '" border="0" />'; break;
245
+ }
246
+ case 'ELV': {
247
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bankeinzug.gif') . '" border="0" />'; break;
248
+ }
249
+ case 'EW': {
250
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ewire.gif') . '" border="0" />'; break;
251
+ }
252
+ case 'FSB': {
253
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/swedbankdirektbetaling.gif') . '" border="0" />'; break;
254
+ }
255
+ case 'GIT': {
256
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/getitcard.gif') . '" border="0" />'; break;
257
+ }
258
+ case 'ING': {
259
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ideal.gif') . '" border="0" />'; break;
260
+ }
261
+ case 'NDB': {
262
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
263
+ }
264
+ case 'SEB': {
265
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/seb.gif') . '" border="0" />'; break;
266
+ }
267
+ case 'SHB': {
268
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/shbdirektbetaling.gif') . '" border="0" />'; break;
269
+ }
270
+ case 'SOLO': {
271
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
272
+ }
273
+ case 'VAL': {
274
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/valus.gif') . '" border="0" />'; break;
275
+ }
276
+ default: {
277
+ $res = '<img src="' . $paytype;
278
+ }
279
+
280
+ }
281
+ return $res;
282
+ }
283
+
284
+ public function getViewUrl($orderId)
285
+ {
286
+ return $this->getUrl('*/*/*', array('order_id'=>$orderId));
287
+ }
288
+
289
+ /**
290
+ * ######################## TAB settings #################################
291
+ */
292
+ public function getTabLabel()
293
+ {
294
+ return Mage::helper('sales')->__('Information');
295
+ }
296
+
297
+ public function getTabTitle()
298
+ {
299
+ return Mage::helper('sales')->__('Order Information');
300
+ }
301
+
302
+ public function canShowTab()
303
+ {
304
+ return true;
305
+ }
306
+
307
+ public function isHidden()
308
+ {
309
+ return false;
310
+ }
311
+ }
app/code/local/Mage/Dibs/Block/Standard/Form.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Block_Standard_Form extends Mage_Payment_Block_Form
6
+ {
7
+ protected function _construct()
8
+ {
9
+ $this->setTemplate('dibs/standard/form.phtml');
10
+ parent::_construct();
11
+ }
12
+ }
app/code/local/Mage/Dibs/Block/Standard/Redirect.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /** * Copyright DIBS | Secure Payment Services, (c) 2009. */
2
+
3
+ class Mage_Dibs_Block_Standard_Redirect extends Mage_Core_Block_Template
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+
9
+ $standard = Mage::getModel('dibs/standard');
10
+ if ($standard->getConfigData('paymentwindow') == '1') {
11
+ $this->setTemplate('dibs/standard/redirect_flexwin.phtml');
12
+ } else {
13
+ $this->setTemplate('dibs/standard/redirect_paymentwindow.phtml');
14
+ }
15
+
16
+ // Save the order into the dibs_order_status table
17
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
18
+ $write->insert('dibs_order_status', Array('orderid'=>$standard->getCheckout()->getLastRealOrderId()));
19
+ }
20
+ }
app/code/local/Mage/Dibs/Helper/Data.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Helper_Data extends Mage_Core_Helper_Abstract
6
+ {
7
+
8
+ }
app/code/local/Mage/Dibs/Model/Mysql4/Setup.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_Mysql4_Setup extends Mage_Eav_Model_Entity_Setup
6
+ {
7
+
8
+ }
9
+ ?>
app/code/local/Mage/Dibs/Model/Standard.php ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+
6
+ class Mage_Dibs_Model_Standard extends Mage_Payment_Model_Method_Abstract
7
+ {
8
+ //changing the payment to different from cc payment type and dibs payment type
9
+ const PAYMENT_TYPE_AUTH = 'AUTHORIZATION';
10
+ const PAYMENT_TYPE_SALE = 'SALE';
11
+
12
+ protected $_code = 'dibs_standard';
13
+ protected $_formBlockType = 'dibs/standard_form';
14
+
15
+ //
16
+ // Allowed currency types
17
+ //
18
+ protected $_allowCurrencyCode = array(
19
+ 'ADP','AED','AFA','ALL','AMD','ANG','AOA','ARS','AUD','AWG','AZM','BAM','BBD','BDT','BGL','BGN','BHD','BIF','BMD','BND','BOB',
20
+ 'BOV','BRL','BSD','BTN','BWP','BYR','BZD','CAD','CDF','CHF','CLF','CLP','CNY','COP','CRC','CUP','CVE','CYP','CZK','DJF','DKK',
21
+ 'DOP','DZD','ECS','ECV','EEK','EGP','ERN','ETB','EUR','FJD','FKP','GBP','GEL','GHC','GIP','GMD','GNF','GTQ','GWP','GYD','HKD',
22
+ 'HNL','HRK','HTG','HUF','IDR','ILS','INR','IQD','IRR','ISK','JMD','JOD','JPY','KES','KGS','KHR','KMF','KPW','KRW','KWD','KYD',
23
+ 'KZT','LAK','LBP','LKR','LRD','LSL','LTL','LVL','LYD','MAD','MDL','MGF','MKD','MMK','MNT','MOP','MRO','MTL','MUR','MVR','MWK',
24
+ 'MXN','MXV','MYR','MZM','NAD','NGN','NIO','NOK','NPR','NZD','OMR','PAB','PEN','PGK','PHP','PKR','PLN','PYG','QAR','ROL','RUB',
25
+ 'RUR','RWF','SAR','SBD','SCR','SDD','SEK','SGD','SHP','SIT','SKK','SLL','SOS','SRG','STD','SVC','SYP','SZL','THB','TJS','TMM',
26
+ 'TND','TOP','TPE','TRL','TRY','TTD','TWD','TZS','UAH','UGX','USD','UYU','UZS','VEB','VND','VUV','XAF','XCD','XOF','XPF','YER',
27
+ 'YUM','ZAR','ZMK','ZWD'
28
+ );
29
+
30
+ /**
31
+ * Get Dibs session namespace
32
+ *
33
+ * @return Mage_Dibs_Model_Session
34
+ */
35
+ public function getSession()
36
+ {
37
+ return Mage::getSingleton('dibs/session');
38
+ }
39
+
40
+ /**
41
+ * Get checkout session namespace
42
+ *
43
+ * @return Mage_Checkout_Model_Session
44
+ */
45
+ public function getCheckout()
46
+ {
47
+ return Mage::getSingleton('checkout/session');
48
+ }
49
+
50
+ /**
51
+ * Get current quote
52
+ *
53
+ * @return Mage_Sales_Model_Quote
54
+ */
55
+ public function getQuote()
56
+ {
57
+ return $this->getCheckout()->getQuote();
58
+ }
59
+
60
+ /**
61
+ * Using internal pages for input payment data
62
+ *
63
+ * @return bool
64
+ */
65
+ public function canUseInternal()
66
+ {
67
+ return false;
68
+ }
69
+
70
+ /**
71
+ * Using for multiple shipping address
72
+ *
73
+ * @return bool
74
+ */
75
+ public function canUseForMultishipping()
76
+ {
77
+ return false;
78
+ }
79
+
80
+ //
81
+ // Perhaps this can be used to make payments before the order is created
82
+ //
83
+ public function createFormBlock($name)
84
+ {
85
+ $block = $this->getLayout()->createBlock('dibs/standard_form', $name)
86
+ ->setMethod('dibs_standard')
87
+ ->setPayment($this->getPayment())
88
+ ->setTemplate('dibs/standard/form.phtml');
89
+
90
+ return $block;
91
+ }
92
+
93
+ /*validate the currency code is avaialable to use for dibs or not*/
94
+ public function validate()
95
+ {
96
+ parent::validate();
97
+ $currency_code = $this->getQuote()->getBaseCurrencyCode();
98
+ if (!in_array($currency_code,$this->_allowCurrencyCode)) {
99
+ Mage::throwException(Mage::helper('dibs')->__('Selected currency code ('.$currency_code.') is not compatabile with DIBS'));
100
+ }
101
+ return $this;
102
+ }
103
+
104
+ public function onOrderValidate(Mage_Sales_Model_Order_Payment $payment)
105
+ {
106
+ return $this;
107
+ }
108
+
109
+ public function onInvoiceCreate(Mage_Sales_Model_Invoice_Payment $payment)
110
+ {
111
+ return $this;
112
+ }
113
+
114
+ public function canCapture()
115
+ {
116
+ return true;
117
+ }
118
+
119
+ public function getOrderPlaceRedirectUrl() {
120
+ return Mage::getUrl('dibs/standard/redirect');
121
+ }
122
+
123
+ //
124
+ // Convert from Magento currency to DIBS currency
125
+ //
126
+ public function convertToDibsCurrency($cur)
127
+ {
128
+ switch ($cur)
129
+ {
130
+ case "ADP": return "020";
131
+ case "AED": return "784";
132
+ case "AFA": return "004";
133
+ case "ALL": return "008";
134
+ case "AMD": return "051";
135
+ case "ANG": return "532";
136
+ case "AOA": return "973";
137
+ case "ARS": return "032";
138
+ case "AUD": return "036";
139
+ case "AWG": return "533";
140
+ case "AZM": return "031";
141
+ case "BAM": return "977";
142
+ case "BBD": return "052";
143
+ case "BDT": return "050";
144
+ case "BGL": return "100";
145
+ case "BGN": return "975";
146
+ case "BHD": return "048";
147
+ case "BIF": return "108";
148
+ case "BMD": return "060";
149
+ case "BND": return "096";
150
+ case "BOB": return "068";
151
+ case "BOV": return "984";
152
+ case "BRL": return "986";
153
+ case "BSD": return "044";
154
+ case "BTN": return "064";
155
+ case "BWP": return "072";
156
+ case "BYR": return "974";
157
+ case "BZD": return "084";
158
+ case "CAD": return "124";
159
+ case "CDF": return "976";
160
+ case "CHF": return "756";
161
+ case "CLF": return "990";
162
+ case "CLP": return "152";
163
+ case "CNY": return "156";
164
+ case "COP": return "170";
165
+ case "CRC": return "188";
166
+ case "CUP": return "192";
167
+ case "CVE": return "132";
168
+ case "CYP": return "196";
169
+ case "CZK": return "203";
170
+ case "DJF": return "262";
171
+ case "DKK": return "208";
172
+ case "DOP": return "214";
173
+ case "DZD": return "012";
174
+ case "ECS": return "218";
175
+ case "ECV": return "983";
176
+ case "EEK": return "233";
177
+ case "EGP": return "818";
178
+ case "ERN": return "232";
179
+ case "ETB": return "230";
180
+ case "EUR": return "978";
181
+ case "FJD": return "242";
182
+ case "FKP": return "238";
183
+ case "GBP": return "826";
184
+ case "GEL": return "981";
185
+ case "GHC": return "288";
186
+ case "GIP": return "292";
187
+ case "GMD": return "270";
188
+ case "GNF": return "324";
189
+ case "GTQ": return "320";
190
+ case "GWP": return "624";
191
+ case "GYD": return "328";
192
+ case "HKD": return "344";
193
+ case "HNL": return "340";
194
+ case "HRK": return "191";
195
+ case "HTG": return "332";
196
+ case "HUF": return "348";
197
+ case "IDR": return "360";
198
+ case "ILS": return "376";
199
+ case "INR": return "356";
200
+ case "IQD": return "368";
201
+ case "IRR": return "364";
202
+ case "ISK": return "352";
203
+ case "JMD": return "388";
204
+ case "JOD": return "400";
205
+ case "JPY": return "392";
206
+ case "KES": return "404";
207
+ case "KGS": return "417";
208
+ case "KHR": return "116";
209
+ case "KMF": return "174";
210
+ case "KPW": return "408";
211
+ case "KRW": return "410";
212
+ case "KWD": return "414";
213
+ case "KYD": return "136";
214
+ case "KZT": return "398";
215
+ case "LAK": return "418";
216
+ case "LBP": return "422";
217
+ case "LKR": return "144";
218
+ case "LRD": return "430";
219
+ case "LSL": return "426";
220
+ case "LTL": return "440";
221
+ case "LVL": return "428";
222
+ case "LYD": return "434";
223
+ case "MAD": return "504";
224
+ case "MDL": return "498";
225
+ case "MGF": return "450";
226
+ case "MKD": return "807";
227
+ case "MMK": return "104";
228
+ case "MNT": return "496";
229
+ case "MOP": return "446";
230
+ case "MRO": return "478";
231
+ case "MTL": return "470";
232
+ case "MUR": return "480";
233
+ case "MVR": return "462";
234
+ case "MWK": return "454";
235
+ case "MXN": return "484";
236
+ case "MXV": return "979";
237
+ case "MYR": return "458";
238
+ case "MZM": return "508";
239
+ case "NAD": return "516";
240
+ case "NGN": return "566";
241
+ case "NIO": return "558";
242
+ case "NOK": return "578";
243
+ case "NPR": return "524";
244
+ case "NZD": return "554";
245
+ case "OMR": return "512";
246
+ case "PAB": return "590";
247
+ case "PEN": return "604";
248
+ case "PGK": return "598";
249
+ case "PHP": return "608";
250
+ case "PKR": return "586";
251
+ case "PLN": return "985";
252
+ case "PYG": return "600";
253
+ case "QAR": return "634";
254
+ case "ROL": return "642";
255
+ case "RUB": return "643";
256
+ case "RUR": return "810";
257
+ case "RWF": return "646";
258
+ case "SAR": return "682";
259
+ case "SBD": return "090";
260
+ case "SCR": return "690";
261
+ case "SDD": return "736";
262
+ case "SEK": return "752";
263
+ case "SGD": return "702";
264
+ case "SHP": return "654";
265
+ case "SIT": return "705";
266
+ case "SKK": return "703";
267
+ case "SLL": return "694";
268
+ case "SOS": return "706";
269
+ case "SRG": return "740";
270
+ case "STD": return "678";
271
+ case "SVC": return "222";
272
+ case "SYP": return "760";
273
+ case "SZL": return "748";
274
+ case "THB": return "764";
275
+ case "TJS": return "972";
276
+ case "TMM": return "795";
277
+ case "TND": return "788";
278
+ case "TOP": return "776";
279
+ case "TPE": return "626";
280
+ case "TRL": return "792";
281
+ case "TRY": return "949";
282
+ case "TTD": return "780";
283
+ case "TWD": return "901";
284
+ case "TZS": return "834";
285
+ case "UAH": return "980";
286
+ case "UGX": return "800";
287
+ case "USD": return "840";
288
+ case "UYU": return "858";
289
+ case "UZS": return "860";
290
+ case "VEB": return "862";
291
+ case "VND": return "704";
292
+ case "VUV": return "548";
293
+ case "XAF": return "950";
294
+ case "XCD": return "951";
295
+ case "XOF": return "952";
296
+ case "XPF": return "953";
297
+ case "YER": return "886";
298
+ case "YUM": return "891";
299
+ case "ZAR": return "710";
300
+ case "ZMK": return "894";
301
+ case "ZWD": return "716";
302
+ }
303
+
304
+ return "";
305
+ }
306
+
307
+ //
308
+ // Calculates if any of the trusted logos are to be shown - in that case return true
309
+ //
310
+ public function showTrustedList() {
311
+ $logoArray = explode(',', $this->getConfigData('dibslogos'));
312
+ foreach($logoArray as $item) {
313
+ if ($item == 'DIBS' ||
314
+ $item == 'VISA_SECURE' ||
315
+ $item == 'MC_SECURE' ||
316
+ $item == 'JCB_SECURE' ||
317
+ $item == 'PCI') {
318
+ return true;
319
+ }
320
+ }
321
+ return false;
322
+ }
323
+
324
+ //
325
+ // Calculates if any of the card logos are to be shown - in that case return true
326
+ //
327
+ public function showCardsList() {
328
+ $logoArray = explode(',', $this->getConfigData('dibslogos'));
329
+ foreach($logoArray as $item) {
330
+ if ($item == 'AMEX' ||
331
+ $item == 'BAX' ||
332
+ $item == 'DIN' ||
333
+ $item == 'DK' ||
334
+ $item == 'FFK' ||
335
+ $item == 'JCB' ||
336
+ $item == 'MC' ||
337
+ $item == 'MTRO' ||
338
+ $item == 'MOCA' ||
339
+ $item == 'VISA' ||
340
+ $item == 'ELEC' ||
341
+ $item == 'AKTIA' ||
342
+ $item == 'DNB' ||
343
+ $item == 'EDK' ||
344
+ $item == 'ELV' ||
345
+ $item == 'EW' ||
346
+ $item == 'FSB' ||
347
+ $item == 'GIT' ||
348
+ $item == 'ING' ||
349
+ $item == 'SEB' ||
350
+ $item == 'SHB' ||
351
+ $item == 'SOLO' ||
352
+ $item == 'VAL') {
353
+ return true;
354
+ }
355
+ }
356
+ return false;
357
+ }
358
+ }
app/code/local/Mage/Dibs/Model/System/Config/Source/Color.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_System_Config_Source_Color
6
+ {
7
+ public function toOptionArray()
8
+ {
9
+ return array(
10
+ array('value'=>'blank', 'label'=>Mage::helper('adminhtml')->__('_none_')),
11
+ array('value'=>'sand', 'label'=>Mage::helper('adminhtml')->__('sand')),
12
+ array('value'=>'grey', 'label'=>Mage::helper('adminhtml')->__('grey')),
13
+ array('value'=>'blue', 'label'=>Mage::helper('adminhtml')->__('blue')),
14
+ );
15
+ }
16
+
17
+
18
+ }
app/code/local/Mage/Dibs/Model/System/Config/Source/Decorator.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_System_Config_Source_Decorator
6
+ {
7
+ public function toOptionArray()
8
+ {
9
+ return array(
10
+ array('value'=>'default', 'label'=>Mage::helper('adminhtml')->__('default')),
11
+ array('value'=>'basal', 'label'=>Mage::helper('adminhtml')->__('basal')),
12
+ array('value'=>'rich', 'label'=>Mage::helper('adminhtml')->__('rich')),
13
+ array('value'=>'own', 'label'=>Mage::helper('adminhtml')->__('Own decorator')),
14
+ );
15
+ }
16
+
17
+
18
+ }
app/code/local/Mage/Dibs/Model/System/Config/Source/Dibslogos.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_System_Config_Source_Dibslogos
6
+ {
7
+
8
+ public function toOptionArray()
9
+ {
10
+ return array(
11
+ array('value'=>'DIBS', 'label'=>Mage::helper('adminhtml')->__('DIBS trusted')),
12
+ array('value'=>'VISA_SECURE', 'label'=>Mage::helper('adminhtml')->__('Verified by VISA')),
13
+ array('value'=>'MC_SECURE', 'label'=>Mage::helper('adminhtml')->__('MasterCard SecureCode')),
14
+ array('value'=>'JCB_SECURE', 'label'=>Mage::helper('adminhtml')->__('JCB J/Secure')),
15
+ array('value'=>'PCI', 'label'=>Mage::helper('adminhtml')->__('PCI')),
16
+ array('value'=>'AMEX', 'label'=>Mage::helper('adminhtml')->__('American Express')),
17
+ array('value'=>'BAX', 'label'=>Mage::helper('adminhtml')->__('BankAxess')),
18
+ array('value'=>'DIN', 'label'=>Mage::helper('adminhtml')->__('Diners Club')),
19
+ array('value'=>'DK', 'label'=>Mage::helper('adminhtml')->__('Dankort')),
20
+ array('value'=>'FFK', 'label'=>Mage::helper('adminhtml')->__('Forbrugsforeningen Card')),
21
+ array('value'=>'JCB', 'label'=>Mage::helper('adminhtml')->__('JCB (Japan Credit Bureau)')),
22
+ array('value'=>'MC', 'label'=>Mage::helper('adminhtml')->__('MasterCard')),
23
+ array('value'=>'MTRO', 'label'=>Mage::helper('adminhtml')->__('Maestro')),
24
+ array('value'=>'MOCA', 'label'=>Mage::helper('adminhtml')->__('Mobilcash')),
25
+ array('value'=>'VISA', 'label'=>Mage::helper('adminhtml')->__('Visa')),
26
+ array('value'=>'ELEC', 'label'=>Mage::helper('adminhtml')->__('Visa Electron')),
27
+ array('value'=>'AKTIA', 'label'=>Mage::helper('adminhtml')->__('Aktia Web Payment')),
28
+ array('value'=>'DNB', 'label'=>Mage::helper('adminhtml')->__('Danske Netbetaling (Danske Bank)')),
29
+ array('value'=>'EDK', 'label'=>Mage::helper('adminhtml')->__('eDankort')),
30
+ array('value'=>'ELV', 'label'=>Mage::helper('adminhtml')->__('Bank Einzug (eOLV)')),
31
+ array('value'=>'EW', 'label'=>Mage::helper('adminhtml')->__('eWire')),
32
+ array('value'=>'FSB', 'label'=>Mage::helper('adminhtml')->__('Swedbank Direktbetalning')),
33
+ array('value'=>'GIT', 'label'=>Mage::helper('adminhtml')->__('Getitcard')),
34
+ array('value'=>'ING', 'label'=>Mage::helper('adminhtml')->__('ING iDeal Payment')),
35
+ array('value'=>'SEB', 'label'=>Mage::helper('adminhtml')->__('SEB Direktbetalning')),
36
+ array('value'=>'SHB', 'label'=>Mage::helper('adminhtml')->__('SHB Direktbetalning')),
37
+ array('value'=>'SOLO', 'label'=>Mage::helper('adminhtml')->__('Nordea Solo-E betaling')),
38
+ array('value'=>'VAL', 'label'=>Mage::helper('adminhtml')->__('Valus')),
39
+
40
+ );
41
+ }
42
+
43
+ }
app/code/local/Mage/Dibs/Model/System/Config/Source/Lang.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_System_Config_Source_Lang
6
+ {
7
+ public function toOptionArray()
8
+ {
9
+ return array(
10
+ array('value'=>'auto', 'label'=>Mage::helper('adminhtml')->__('Auto')),
11
+ array('value'=>'da', 'label'=>Mage::helper('adminhtml')->__('Danish')),
12
+ array('value'=>'nl', 'label'=>Mage::helper('adminhtml')->__('Dutch')),
13
+ array('value'=>'en', 'label'=>Mage::helper('adminhtml')->__('English')),
14
+ array('value'=>'fo', 'label'=>Mage::helper('adminhtml')->__('Faroese')),
15
+ array('value'=>'fi', 'label'=>Mage::helper('adminhtml')->__('Finnish')),
16
+ array('value'=>'fr', 'label'=>Mage::helper('adminhtml')->__('French')),
17
+ array('value'=>'de', 'label'=>Mage::helper('adminhtml')->__('German')),
18
+ array('value'=>'it', 'label'=>Mage::helper('adminhtml')->__('Italian')),
19
+ array('value'=>'no', 'label'=>Mage::helper('adminhtml')->__('Norwegian')),
20
+ array('value'=>'pl', 'label'=>Mage::helper('adminhtml')->__('Polish')),
21
+ array('value'=>'es', 'label'=>Mage::helper('adminhtml')->__('Spanish')),
22
+ array('value'=>'sv', 'label'=>Mage::helper('adminhtml')->__('Swedish')),
23
+ );
24
+ }
25
+
26
+
27
+ }
app/code/local/Mage/Dibs/Model/System/Config/Source/Paymentwindow.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_Model_System_Config_Source_Paymentwindow
6
+ {
7
+ public function toOptionArray()
8
+ {
9
+ return array(
10
+ array('value'=>1, 'label'=>Mage::helper('adminhtml')->__('FlexWin')),
11
+ array('value'=>2, 'label'=>Mage::helper('adminhtml')->__('Payment Window')),
12
+ );
13
+ }
14
+
15
+
16
+ }
app/code/local/Mage/Dibs/controllers/StandardController.php ADDED
@@ -0,0 +1,379 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+ class Mage_Dibs_StandardController extends Mage_Core_Controller_Front_Action {
6
+
7
+ protected function _expireAjax() {
8
+ if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
9
+ $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
10
+ exit;
11
+ }
12
+ }
13
+
14
+ /**
15
+ * Get singleton with dibs strandard order transaction information
16
+ *
17
+ * @return Mage_Dibs_Model_Standard
18
+ */
19
+ public function getStandard()
20
+ {
21
+ return Mage::getSingleton('dibs/standard');
22
+ }
23
+
24
+ /**
25
+ * When a customer chooses Dibs on Checkout/Payment page
26
+ */
27
+ public function redirectAction() {
28
+
29
+ // Load layout
30
+ $this->loadLayout();
31
+ $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('dibs/standard_redirect'));
32
+ $this->renderLayout();
33
+
34
+ // Load the session object
35
+ $session = Mage::getSingleton('checkout/session');
36
+ $session->setDibsStandardQuoteId($session->getQuoteId());
37
+
38
+ // Save order comment
39
+ $order = Mage::getModel('sales/order');
40
+ $order->loadByIncrementId($session->getLastRealOrderId());
41
+ $order->addStatusToHistory(
42
+ $order->getStatus(),
43
+ $this->__('DIBS_LABEL_3')
44
+ );
45
+ $order->save();
46
+
47
+ // Add items back on stock (if used)
48
+ $this->addToStock();
49
+ }
50
+
51
+ public function addToStock() {
52
+
53
+ // Load the payment object
54
+ $payment = Mage::getModel('dibs/standard');
55
+
56
+ // Load the session object
57
+ $session = Mage::getSingleton('checkout/session');
58
+ $session->setDibsStandardQuoteId($session->getQuoteId());
59
+
60
+ // Load the order object
61
+ $order = Mage::getModel('sales/order');
62
+ $order->loadByIncrementId($session->getLastRealOrderId());
63
+
64
+ // add items back on stock
65
+ // Put the order back on stock as it is not yet paid!
66
+ // http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment
67
+ if (((int)$payment->getConfigData('handlestock')) == 1) {
68
+ if(!isset($_SESSION['stock_removed']) || $_SESSION['stock_removed'] != $session->getLastRealOrderId()) {
69
+ /* Put the stock back on, we don't want it taken off yet */
70
+ $items = $order->getAllItems(); // Get all items from the order
71
+ if ($items) {
72
+ foreach($items as $item) {
73
+ $quantity = $item->getQtyOrdered(); // get Qty ordered
74
+ $product_id = $item->getProductId(); // get it's ID
75
+
76
+ $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); // Load the stock for this product
77
+ $stock->setQty($stock->getQty()+$quantity); // Set to new Qty
78
+ $stock->save(); // Save
79
+ continue;
80
+ }
81
+ }
82
+
83
+ // Flag so that stock is only updated once!
84
+ $_SESSION['stock_removed'] = $session->getLastRealOrderId();
85
+ }
86
+ }
87
+ }
88
+
89
+ // Remove from stock (if used)
90
+ public function removeFromStock() {
91
+
92
+ // Load the payment object
93
+ $payment = Mage::getModel('dibs/standard');
94
+
95
+ // Load the session object
96
+ $session = Mage::getSingleton('checkout/session');
97
+ $session->setDibsStandardQuoteId($session->getQuoteId());
98
+
99
+ // Load the order object
100
+ $order = Mage::getModel('sales/order');
101
+ $order->loadByIncrementId($session->getLastRealOrderId());
102
+
103
+ // remove items from stock
104
+ // http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment
105
+ if (((int)$payment->getConfigData('handlestock')) == 1) {
106
+ $items = $order->getAllItems(); // Get all items from the order
107
+ if ($items) {
108
+ foreach($items as $item) {
109
+ $quantity = $item->getQtyOrdered(); // get Qty ordered
110
+ $product_id = $item->getProductId(); // get it's ID
111
+
112
+ $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); // Load the stock for this product
113
+ $stock->setQty($stock->getQty()-$quantity); // Set to new Qty
114
+ $stock->save(); // Save
115
+ continue;
116
+ }
117
+ }
118
+ }
119
+ }
120
+
121
+ /**
122
+ * When a customer cancel payment from dibs.
123
+ */
124
+ public function cancelAction() {
125
+ $session = Mage::getSingleton('checkout/session');
126
+ $session->setQuoteId($session->getDibsStandardQuoteId(true));
127
+ // Save order comment
128
+ $order = Mage::getModel('sales/order');
129
+ $order->loadByIncrementId($session->getLastRealOrderId());
130
+ $order->addStatusToHistory(
131
+ $order->getStatus(),
132
+ $this->__('DIBS_LABEL_20')
133
+ );
134
+ $order->save();
135
+ $this->_redirect('checkout/cart');
136
+ }
137
+
138
+ public function successAction() {
139
+ $session = Mage::getSingleton('checkout/session');
140
+ $session->setQuoteId($session->getDibsStandardQuoteId(true));
141
+
142
+ $order = Mage::getModel('sales/order');
143
+ $payment = Mage::getModel('dibs/standard');
144
+
145
+ // Load the order number
146
+ if (Mage::getSingleton('checkout/session')->getLastOrderId()) {
147
+ $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
148
+ } else {
149
+ if (isset($_REQUEST["orderid"])) {
150
+ $order->loadByIncrementId((int)$_REQUEST["orderid"]);
151
+ } else {
152
+ echo "<h1>An error occured!</h1>";
153
+ echo "No orderid was supplied to the system!";
154
+ exit();
155
+ }
156
+ }
157
+
158
+ // Validate the order and send email confirmation if enabled
159
+ if(!$order->getId()) {
160
+ echo "<h1>An error occured!</h1>";
161
+ echo "The order id was not known to the system";
162
+ exit();
163
+ }
164
+
165
+ /*if (!isset($_REQUEST["amount"])) {
166
+ echo "<h1>An error occured!</h1>";
167
+ echo "No amount supplied to the system!";
168
+ exit();
169
+ }
170
+ */
171
+ // Validate amount
172
+ if ((int)$_REQUEST["amount"] != (int)($order->getTotalDue() * 100)) {
173
+ echo "<h1>An error occured!</h1>";
174
+ echo "The amount received from DIBS did not match the order amount!";
175
+ exit();
176
+ }
177
+
178
+ if (!isset($_REQUEST["currency"])) {
179
+ echo "<h1>An error occured!</h1>";
180
+ echo "No currency (currency) supplied to the system!";
181
+ exit();
182
+ }
183
+
184
+ // Validate currency
185
+ if (((int)$payment->convertToDibsCurrency($order->getOrderCurrency())) != (int)$_REQUEST["currency"]) {
186
+ echo "<h1>An error occured!</h1>";
187
+ echo "The currency received from DIBS did not match the order currency!";
188
+ exit();
189
+ }
190
+
191
+ // validate md5 if enabled
192
+ if ($payment->getConfigData('md5key1') != "" && $payment->getConfigData('md5key2') != "") {
193
+ $transact = $_REQUEST["transact"];
194
+ $amount = $order->getTotalDue() * 100;
195
+ $currency = $_REQUEST["currency"];
196
+ $md5key1 = $payment->getConfigData('md5key1');
197
+ $md5key2 = $payment->getConfigData('md5key2');
198
+ $tmp = md5($md5key2.md5($md5key1.'transact='.$transact.'&amount='.$amount.'&currency='.$currency));
199
+
200
+ if ((int)$payment->getConfigData('calcfee') == 1) {
201
+ $amount = $_REQUEST["amount"] + $_REQUEST["fee"];
202
+ $tmp = md5($md5key2.md5($md5key1.'transact='.$transact.'&amount='.$amount.'&currency='.$currency));
203
+ }
204
+
205
+ //
206
+ // Validate authkey
207
+ if ($tmp != $_REQUEST["authkey"]) {
208
+ echo "<h1>An error occured!</h1>";
209
+ echo "The MD5 key does not match!";
210
+ exit();
211
+ }
212
+ }
213
+
214
+ // Remove items from stock if either not yet removed or only if stock handling is enabled
215
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
216
+ $row = $read->fetchRow("select * from dibs_order_status where orderid = '" . $_REQUEST['orderid'] . "'");
217
+ if ($row['status'] == '0') {
218
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
219
+ $write->query('update dibs_order_status set transact = "' . ((isset($_REQUEST['transact'])) ? $_REQUEST['transact'] : '0') . '", status = 1, ' .
220
+ 'amount = "' . ((isset($_REQUEST['amount'])) ? $_REQUEST['amount'] : '0') . '", '.
221
+ 'currency = "' . ((isset($_REQUEST['currency'])) ? $_REQUEST['currency'] : '0') . '", '.
222
+ 'paytype = "' . ((isset($_REQUEST['paytype'])) ? $_REQUEST['paytype'] : '0') . '", '.
223
+ 'cardnomask = "' . ((isset($_REQUEST['cardnomask'])) ? $_REQUEST['cardnomask'] : '0') . '", '.
224
+ 'cardprefix = "' . ((isset($_REQUEST['cardprefix'])) ? $_REQUEST['cardprefix'] : '0') . '", '.
225
+ 'cardexpdate = "' . ((isset($_REQUEST['cardexpdate'])) ? $_REQUEST['cardexpdate'] : '0') . '", '.
226
+ 'cardcountry = "' . ((isset($_REQUEST['cardcountry'])) ? $_REQUEST['cardcountry'] : '0') . '", '.
227
+ 'acquirer = "' . ((isset($_REQUEST['acquirer'])) ? $_REQUEST['acquirer'] : '0') . '", '.
228
+ 'enrolled = "' . ((isset($_REQUEST['enrolled'])) ? $_REQUEST['enrolled'] : '0') . '", '.
229
+ 'fee = "' . ((isset($_REQUEST['fee'])) ? $_REQUEST['fee'] : '0') . '" where orderid = "' . $_REQUEST['orderid'] . '"');
230
+
231
+ // Remove items from stock as the payment now has been made
232
+ $this->removeFromStock();
233
+
234
+ // Send email order confirmation (if enabled). May be done only once!
235
+ if (((int)$payment->getConfigData('sendmailorderconfirmation')) == 1) {
236
+ $order->sendNewOrderEmail();
237
+ }
238
+ }
239
+ // Save order comment
240
+ $order = Mage::getModel('sales/order');
241
+ $order->loadByIncrementId($session->getLastRealOrderId());
242
+ $order->addStatusToHistory(
243
+ $order->getStatus(),
244
+ $this->__('DIBS_LABEL_22')
245
+ );
246
+ $order->save();
247
+ //redirect the user to the success page
248
+ $this->_redirect('checkout/onepage/success');
249
+
250
+ }
251
+
252
+ public function callbackAction() {
253
+ $session = Mage::getSingleton('checkout/session');
254
+ $session->setQuoteId($session->getDibsStandardQuoteId(true));
255
+
256
+ $order = Mage::getModel('sales/order');
257
+ $payment = Mage::getModel('dibs/standard');
258
+
259
+ // Load the order number
260
+ if (Mage::getSingleton('checkout/session')->getLastOrderId()) {
261
+ $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
262
+ } else {
263
+ if (isset($_POST["orderid"])) {
264
+ $order->loadByIncrementId((int)$_POST["orderid"]);
265
+ } else {
266
+ echo "<h1>An error occured!</h1>";
267
+ echo "No orderid was supplied to the system!";
268
+ exit();
269
+ }
270
+ }
271
+
272
+ // Validate the order and send email confirmation if enabled
273
+ if(!$order->getId()) {
274
+ echo "<h1>An error occured!</h1>";
275
+ echo "The order id was not known to the system";
276
+ exit();
277
+ }
278
+
279
+ if (!isset($_REQUEST["amount"])) {
280
+ echo "<h1>An error occured!</h1>";
281
+ echo "No amount supplied to the system!";
282
+ exit();
283
+ }
284
+
285
+ // Validate amount
286
+ if ((int)$_REQUEST["amount"] != (int)($order->getTotalDue() * 100)) {
287
+ echo "<h1>An error occured!</h1>";
288
+ echo "The amount received from DIBS did not match the order amount!";
289
+ exit();
290
+ }
291
+
292
+ if (!isset($_REQUEST["currency"])) {
293
+ echo "<h1>An error occured!</h1>";
294
+ echo "No currency (currency) supplied to the system!";
295
+ exit();
296
+ }
297
+
298
+ // Validate currency
299
+ if (((int)$payment->convertToDibsCurrency($order->getOrderCurrency())) != (int)$_REQUEST["currency"]) {
300
+ echo "<h1>An error occured!</h1>";
301
+ echo "The currency received from DIBS did not match the order currency!";
302
+ exit();
303
+ }
304
+
305
+ // validate md5 if enabled
306
+ if ($payment->getConfigData('md5key1') != "" && $payment->getConfigData('md5key2') != "") {
307
+ $transact = $_POST["transact"];
308
+ $amount = $order->getTotalDue() * 100;
309
+ $currency = $_POST["currency"];
310
+ $md5key1 = $payment->getConfigData('md5key1');
311
+ $md5key2 = $payment->getConfigData('md5key2');
312
+ $tmp = md5($md5key2.md5($md5key1.'transact='.$transact.'&amount='.$amount.'&currency='.$currency));
313
+
314
+ if ((int)$payment->getConfigData('calcfee') == 1) {
315
+ $amount = $_POST["amount"] + $_POST["fee"];
316
+ $tmp = md5($md5key2.md5($md5key1.'transact='.$transact.'&amount='.$amount.'&currency='.$currency));
317
+ }
318
+
319
+ //
320
+ // Validate authkey
321
+ if ($tmp != $_POST["authkey"]) {
322
+ echo "<h1>An error occured!</h1>";
323
+ echo "The MD5 key does not match!";
324
+ exit();
325
+ }
326
+ }
327
+
328
+ // Remove items from stock if either not yet removed or only if stock handling is enabled
329
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
330
+ $row = $read->fetchRow("select * from dibs_order_status where orderid = '" . $_REQUEST['orderid'] . "'");
331
+ if ($row['status'] == '0') {
332
+ $write = Mage::getSingleton('core/resource')->getConnection('core_write');
333
+ $write->query('update dibs_order_status set transact = "' . ((isset($_POST['transact'])) ? $_POST['transact'] : '0') . '", status = 1, ' .
334
+ 'amount = "' . ((isset($_POST['amount'])) ? $_POST['amount'] : '0') . '", '.
335
+ 'currency = "' . ((isset($_POST['currency'])) ? $_POST['currency'] : '0') . '", '.
336
+ 'paytype = "' . ((isset($_POST['paytype'])) ? $_POST['paytype'] : '0') . '", '.
337
+ 'cardnomask = "' . ((isset($_POST['cardnomask'])) ? $_POST['cardnomask'] : '0') . '", '.
338
+ 'cardprefix = "' . ((isset($_POST['cardprefix'])) ? $_POST['cardprefix'] : '0') . '", '.
339
+ 'cardexpdate = "' . ((isset($_POST['cardexpdate'])) ? $_POST['cardexpdate'] : '0') . '", '.
340
+ 'cardcountry = "' . ((isset($_POST['cardcountry'])) ? $_POST['cardcountry'] : '0') . '", '.
341
+ 'acquirer = "' . ((isset($_POST['acquirer'])) ? $_POST['acquirer'] : '0') . '", '.
342
+ 'enrolled = "' . ((isset($_POST['enrolled'])) ? $_POST['enrolled'] : '0') . '", '.
343
+ 'fee = "' . ((isset($_POST['fee'])) ? $_POST['fee'] : '0') . '" where orderid = "' . $_POST['orderid'] . '"');
344
+
345
+ // Remove items from stock as the payment now has been made
346
+ $this->removeFromStock();
347
+
348
+ // Send email order confirmation (if enabled). May be done only once!
349
+ if (((int)$payment->getConfigData('sendmailorderconfirmation')) == 1) {
350
+ $order->sendNewOrderEmail();
351
+ }
352
+ $session->setQuoteId($session->getDibsStandardQuoteId(true));
353
+
354
+ // Save order comment
355
+ $order = Mage::getModel('sales/order');
356
+ $order->loadByIncrementId($session->getLastRealOrderId());
357
+ $order->addStatusToHistory(
358
+ $order->getStatus(),
359
+ $this->__('DIBS_LABEL_21')
360
+ );
361
+ $order->save();
362
+ }
363
+
364
+ if ($row['status'] == '1') {
365
+ // Save order comment
366
+ $order = Mage::getModel('sales/order');
367
+ $order->loadByIncrementId($session->getLastRealOrderId());
368
+ $order->addStatusToHistory(
369
+ $order->getStatus(),
370
+ $this->__('DIBS_LABEL_22')
371
+ );
372
+ $order->save();
373
+ }
374
+
375
+ // redirect the user to the success page
376
+ $this->_redirect('checkout/onepage/success');
377
+ }
378
+
379
+ }
app/code/local/Mage/Dibs/etc/config.xml ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
5
+ */
6
+ -->
7
+ <config>
8
+ <modules>
9
+ <Mage_Dibs>
10
+ <version>0.7.0</version>
11
+ <depends>
12
+ <Mage_Paygate />
13
+ </depends>
14
+ </Mage_Dibs>
15
+ </modules>
16
+ <global>
17
+ <models>
18
+ <dibs>
19
+ <class>Mage_Dibs_Model</class>
20
+ <resourceModel>dibs_mysql4</resourceModel>
21
+ </dibs>
22
+ <dibs_mysql4>
23
+ <class>Mage_Dibs_Model_Mysql4</class>
24
+ <entities>
25
+ <api_debug><table>dibs_api_debug</table></api_debug>
26
+ </entities>
27
+ </dibs_mysql4>
28
+ </models>
29
+ <resources>
30
+ <dibs_setup>
31
+ <setup>
32
+ <module>Mage_Dibs</module>
33
+ <class>Mage_Dibs_Model_Mysql4_Setup</class>
34
+ </setup>
35
+ <connection>
36
+ <use>core_setup</use>
37
+ </connection>
38
+ </dibs_setup>
39
+ <dibs_write>
40
+ <connection>
41
+ <use>core_write</use>
42
+ </connection>
43
+ </dibs_write>
44
+ <dibs_read>
45
+ <connection>
46
+ <use>core_read</use>
47
+ </connection>
48
+ </dibs_read>
49
+ </resources>
50
+ <blocks>
51
+ <dibs><class>Mage_Dibs_Block</class></dibs>
52
+ </blocks>
53
+ </global>
54
+ <frontend>
55
+ <secure_url>
56
+ <dibs_standard>/dibs/standard</dibs_standard>
57
+ </secure_url>
58
+ <routers>
59
+ <dibs>
60
+ <use>standard</use>
61
+ <args>
62
+ <module>Mage_Dibs</module>
63
+ <frontName>dibs</frontName>
64
+ </args>
65
+ </dibs>
66
+ </routers>
67
+ <translate>
68
+ <modules>
69
+ <Mage_Dibs>
70
+ <files>
71
+ <default>Mage_Dibs.csv</default>
72
+ </files>
73
+ </Mage_Dibs>
74
+ </modules>
75
+ </translate>
76
+ <layout>
77
+ <updates>
78
+ <dibs_standard_redirect>
79
+ <file>dibs.xml</file>
80
+ </dibs_standard_redirect>
81
+ </updates>
82
+ </layout>
83
+ </frontend>
84
+ <adminhtml>
85
+ <translate>
86
+ <modules>
87
+ <Mage_Dibs>
88
+ <files>
89
+ <default>Mage_Dibs.csv</default>
90
+ </files>
91
+ </Mage_Dibs>
92
+ </modules>
93
+ </translate>
94
+ <acl>
95
+ <resources>
96
+ <admin>
97
+ <children>
98
+ <system>
99
+ <children>
100
+ <config>
101
+ <children>
102
+ <dibs>
103
+ <title>Dibs Section</title>
104
+ </dibs>
105
+ </children>
106
+ </config>
107
+ </children>
108
+ </system>
109
+ </children>
110
+ </admin>
111
+ </resources>
112
+ </acl>
113
+ </adminhtml>
114
+
115
+ <default>
116
+ <payment>
117
+ <dibs_standard>
118
+ <model>dibs/standard</model>
119
+ <active>1</active>
120
+ <title>DIBS | Secure Payment Services</title>
121
+ <sort_order>1</sort_order>
122
+ <allowspecific>0</allowspecific>
123
+ <merchantid>ENTER YOUR MERCHANT ID HERE</merchantid>
124
+ <test_mode>1</test_mode>
125
+ <capturenow>0</capturenow>
126
+ <uniqueoid>0</uniqueoid>
127
+ <calcfee>1</calcfee>
128
+ <paymentwindow>1</paymentwindow>
129
+ <skiplastpage>0</skiplastpage>
130
+ <decorator>default</decorator>
131
+ <color>blank</color>
132
+ <lang>auto</lang>
133
+ <sendmailorderconfirmation>1</sendmailorderconfirmation>
134
+ <dibslogos>DIBS</dibslogos>
135
+ <handlestock>1</handlestock>
136
+ </dibs_standard>
137
+ </payment>
138
+ </default>
139
+ <interest_form>
140
+ <label>lead capture form</label>
141
+ <template>page/leadcapture.phtml</template>
142
+ </interest_form>
143
+ </config>
app/code/local/Mage/Dibs/etc/system.xml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!-- /** * Copyright DIBS | Secure Payment Services, (c) 2009. */ -->
3
+ <config>
4
+ <sections>
5
+ <payment>
6
+ <groups>
7
+ <dibs_standard translate="label" module="dibs">
8
+ <label>DIBS | Secure Payment Services (www.dibspayment.com)</label>
9
+ <frontend_type>text</frontend_type>
10
+ <sort_order>1</sort_order>
11
+ <show_in_default>1</show_in_default>
12
+ <show_in_website>1</show_in_website>
13
+ <show_in_store>0</show_in_store>
14
+ <fields>
15
+ <active translate="label">
16
+ <label>Enabled</label>
17
+ <frontend_type>select</frontend_type>
18
+ <source_model>adminhtml/system_config_source_yesno</source_model>
19
+ <sort_order>1</sort_order>
20
+ <show_in_default>1</show_in_default>
21
+ <show_in_website>1</show_in_website>
22
+ <show_in_store>0</show_in_store>
23
+ </active>
24
+ <title translate="label">
25
+ <label>Title</label>
26
+ <frontend_type>text</frontend_type>
27
+ <sort_order>2</sort_order>
28
+ <show_in_default>1</show_in_default>
29
+ <show_in_website>1</show_in_website>
30
+ <show_in_store>0</show_in_store>
31
+ </title>
32
+ <order_status translate="label">
33
+ <label>New order status (When the payment is made)</label>
34
+ <frontend_type>select</frontend_type>
35
+ <source_model>adminhtml/system_config_source_order_status</source_model>
36
+ <sort_order>4</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>0</show_in_store>
40
+ </order_status>
41
+ <sort_order translate="label">
42
+ <label>Sort order</label>
43
+ <frontend_type>text</frontend_type>
44
+ <sort_order>5</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>0</show_in_store>
48
+ </sort_order>
49
+ <allowspecific translate="label">
50
+ <label>Payment from applicable countries</label>
51
+ <frontend_type>allowspecific</frontend_type>
52
+ <sort_order>6</sort_order>
53
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>0</show_in_store>
57
+ </allowspecific>
58
+ <specificcountry translate="label">
59
+ <label>Payment from Specific countries</label>
60
+ <frontend_type>multiselect</frontend_type>
61
+ <sort_order>7</sort_order>
62
+ <source_model>adminhtml/system_config_source_country</source_model>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>0</show_in_store>
66
+ </specificcountry>
67
+ <merchantid translate="label">
68
+ <label>DIBS Merchant ID</label>
69
+ <frontend_type>text</frontend_type>
70
+ <sort_order>8</sort_order>
71
+ <show_in_default>1</show_in_default>
72
+ <show_in_website>1</show_in_website>
73
+ <show_in_store>0</show_in_store>
74
+ </merchantid>
75
+ <account translate="label">
76
+ <label>Account</label>
77
+ <frontend_type>text</frontend_type>
78
+ <sort_order>9</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>0</show_in_store>
82
+ </account>
83
+ <test_mode translate="label">
84
+ <label>Test mode</label>
85
+ <frontend_type>select</frontend_type>
86
+ <source_model>adminhtml/system_config_source_yesno</source_model>
87
+ <sort_order>10</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ </test_mode>
92
+ <capturenow translate="label">
93
+ <label>Capture Now</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>adminhtml/system_config_source_yesno</source_model>
96
+ <sort_order>11</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>0</show_in_store>
100
+ </capturenow>
101
+ <uniqueoid translate="label">
102
+ <label>Unique order id</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>adminhtml/system_config_source_yesno</source_model>
105
+ <sort_order>11</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>0</show_in_store>
109
+ </uniqueoid>
110
+ <calcfee translate="label">
111
+ <label>Calc fee</label>
112
+ <frontend_type>select</frontend_type>
113
+ <source_model>adminhtml/system_config_source_yesno</source_model>
114
+ <sort_order>12</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>0</show_in_store>
118
+ </calcfee>
119
+ <md5key1 translate="label">
120
+ <label>MD5 Key1</label>
121
+ <frontend_type>text</frontend_type>
122
+ <sort_order>13</sort_order>
123
+ <show_in_default>1</show_in_default>
124
+ <show_in_website>1</show_in_website>
125
+ <show_in_store>0</show_in_store>
126
+ </md5key1>
127
+ <md5key2 translate="label">
128
+ <label>MD5 Key2</label>
129
+ <frontend_type>text</frontend_type>
130
+ <sort_order>14</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>0</show_in_store>
134
+ </md5key2>
135
+ <paytype translate="label">
136
+ <label>Paytype</label>
137
+ <frontend_type>text</frontend_type>
138
+ <sort_order>15</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>0</show_in_store>
142
+ </paytype>
143
+ <paymentwindow translate="label">
144
+ <label>Payment Window or FlexWin</label>
145
+ <frontend_type>select</frontend_type>
146
+ <source_model>dibs/system_config_source_paymentwindow</source_model>
147
+ <sort_order>16</sort_order>
148
+ <show_in_default>2</show_in_default>
149
+ <show_in_website>2</show_in_website>
150
+ <show_in_store>0</show_in_store>
151
+ </paymentwindow>
152
+ <skiplastpage translate="label">
153
+ <label>Skip last page (Only used if FlexWin is selected)</label>
154
+ <frontend_type>select</frontend_type>
155
+ <source_model>adminhtml/system_config_source_yesno</source_model>
156
+ <sort_order>17</sort_order>
157
+ <show_in_default>2</show_in_default>
158
+ <show_in_website>2</show_in_website>
159
+ <show_in_store>0</show_in_store>
160
+ </skiplastpage>
161
+ <decorator translate="label">
162
+ <label>FlexWin Decorator (Only used if FlexWin is selected)</label>
163
+ <frontend_type>select</frontend_type>
164
+ <source_model>dibs/system_config_source_decorator</source_model>
165
+ <sort_order>18</sort_order>
166
+ <show_in_default>2</show_in_default>
167
+ <show_in_website>2</show_in_website>
168
+ <show_in_store>0</show_in_store>
169
+ </decorator>
170
+ <color translate="label">
171
+ <label>FlexWin / Payment Window Color</label>
172
+ <frontend_type>select</frontend_type>
173
+ <source_model>dibs/system_config_source_color</source_model>
174
+ <sort_order>19</sort_order>
175
+ <show_in_default>2</show_in_default>
176
+ <show_in_website>2</show_in_website>
177
+ <show_in_store>0</show_in_store>
178
+ </color>
179
+ <lang translate="label">
180
+ <label>Language used in Payment Window / FlexWin</label>
181
+ <frontend_type>select</frontend_type>
182
+ <source_model>dibs/system_config_source_lang</source_model>
183
+ <sort_order>20</sort_order>
184
+ <show_in_default>2</show_in_default>
185
+ <show_in_website>2</show_in_website>
186
+ <show_in_store>0</show_in_store>
187
+ </lang>
188
+ <sendmailorderconfirmation translate="label">
189
+ <label>Send Email Order Confirmation. Enabling this setting will result in an email confirmation is send to the cardholder as the payment is made.</label>
190
+ <frontend_type>select</frontend_type>
191
+ <source_model>adminhtml/system_config_source_yesno</source_model>
192
+ <sort_order>21</sort_order>
193
+ <show_in_default>1</show_in_default>
194
+ <show_in_website>1</show_in_website>
195
+ <show_in_store>0</show_in_store>
196
+ </sendmailorderconfirmation>
197
+ <dibslogos translate="label">
198
+ <label>Which logos to show</label>
199
+ <frontend_type>multiselect</frontend_type>
200
+ <source_model>dibs/system_config_source_dibslogos</source_model>
201
+ <sort_order>22</sort_order>
202
+ <show_in_default>1</show_in_default>
203
+ <show_in_website>1</show_in_website>
204
+ <show_in_store>0</show_in_store>
205
+ </dibslogos>
206
+ <handlestock translate="label">
207
+ <label>Handle stock. The quantity purchased in stock will at first be decremented as the payment is made.</label>
208
+ <frontend_type>select</frontend_type>
209
+ <source_model>adminhtml/system_config_source_yesno</source_model>
210
+ <sort_order>23</sort_order>
211
+ <show_in_default>1</show_in_default>
212
+ <show_in_website>1</show_in_website>
213
+ <show_in_store>0</show_in_store>
214
+ </handlestock>
215
+ </fields>
216
+ </dibs_standard>
217
+ </groups>
218
+ </payment>
219
+ </sections>
220
+ </config>
app/code/local/Mage/Dibs/sql/dibs_setup/mysql4-install-0.7.0.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Copyright DIBS | Secure Payment Services, (c) 2009.
4
+ */
5
+
6
+
7
+ $installer = $this;
8
+ /* @var $installer Mage_Dibs_Model_Mysql4_Setup */
9
+
10
+ $installer->startSetup();
11
+
12
+ $installer->run("
13
+
14
+ delete from {$installer->getTable('core_resource')} where code = 'dibs_setup';
15
+
16
+ CREATE TABLE if not exists `dibs_order_status` (
17
+ `orderid` VARCHAR(45) NOT NULL,
18
+ `transact` VARCHAR(50) NOT NULL,
19
+ `status` INTEGER UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = unpaid, 1 = paid',
20
+ `amount` VARCHAR(45) NOT NULL,
21
+ `currency` VARCHAR(45) NOT NULL,
22
+ `paytype` VARCHAR(45) NOT NULL,
23
+ `cardnomask` VARCHAR(45) NOT NULL,
24
+ `cardprefix` VARCHAR(45) NOT NULL,
25
+ `cardexpdate` VARCHAR(45) NOT NULL,
26
+ `cardcountry` VARCHAR(45) NOT NULL,
27
+ `acquirer` VARCHAR(45) NOT NULL,
28
+ `enrolled` VARCHAR(45) NOT NULL,
29
+ `fee` VARCHAR(45) NOT NULL
30
+ );
31
+
32
+ ");
33
+
34
+
35
+ $installer->endSetup();
36
+
app/code/local/Mage/Sales/Block/Order/Info.php ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
23
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24
+ */
25
+
26
+ /**
27
+ * Invoice view comments form
28
+ *
29
+ * @category Mage
30
+ * @package Mage_Sale
31
+ * @author Magento Core Team <core@magentocommerce.com>
32
+ */
33
+ class Mage_Sales_Block_Order_Info extends Mage_Core_Block_Template
34
+ {
35
+ protected $_links = array();
36
+
37
+ protected function _construct()
38
+ {
39
+ parent::_construct();
40
+ $this->setTemplate('sales/order/info.phtml');
41
+ }
42
+
43
+ protected function _prepareLayout()
44
+ {
45
+ if ($headBlock = $this->getLayout()->getBlock('head')) {
46
+ $headBlock->setTitle($this->__('Order # %s', $this->getOrder()->getRealOrderId()));
47
+ }
48
+ $this->setChild(
49
+ 'payment_info',
50
+ $this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
51
+ );
52
+ }
53
+
54
+ public function getPaymentInfoHtml()
55
+ {
56
+
57
+ $res = $this->getChildHtml('payment_info');
58
+
59
+ //
60
+ // Read info directly from the database
61
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
62
+ $row = $read->fetchRow("select * from dibs_order_status where orderid = " . $this->getOrder()->getIncrementId());
63
+ $standard = Mage::getModel('dibs/standard');
64
+
65
+ $standard = Mage::getModel('dibs/standard');
66
+ if ($row['status'] == '1') {
67
+ //
68
+ // Payment has been made to this order
69
+ $res .= "<table border='0' width='100%'>";
70
+ if ($row['transact'] != '0') {
71
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_8') . "</td>";
72
+ $res .= "<td>" . $row['transact'] . "</td></tr>";
73
+ }
74
+ if ($row['paytype'] != '0') {
75
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_12') . "</td>";
76
+ $res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
77
+ }
78
+ if ($row['fee'] != '0') {
79
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_11') . "</td>";
80
+ $res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . "&nbsp;" . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
81
+ }
82
+ $res .= "</table><br>";
83
+
84
+ } else {
85
+ $res .= "<br>" . Mage::helper('dibs')->__('DIBS_LABEL_19') . "<br>";
86
+ }
87
+
88
+ return $res;
89
+ }
90
+
91
+ public function printLogo($paytype) {
92
+
93
+ switch($paytype) {
94
+ case 'AMEX': {
95
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
96
+ }
97
+ case 'AMEX(DK)': {
98
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
99
+ }
100
+ case 'BAX': {
101
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bax.gif') . '" border="0" />'; break;
102
+ }
103
+ case 'DIN': {
104
+ $res = $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
105
+ }
106
+ case 'DIN(DK)': {
107
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
108
+ }
109
+ case 'DK': {
110
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/dankort.gif') . '" border="0" />'; break;
111
+ }
112
+ case 'FFK': {
113
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/forbrugforeningen.gif') . '" border="0" />'; break;
114
+ }
115
+ case 'JCB': {
116
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/jcb.gif') . '" border="0" />'; break;
117
+ }
118
+ case 'MC': {
119
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
120
+ }
121
+ case 'MC(DK)': {
122
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
123
+ }
124
+ case 'MC(SE)': {
125
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
126
+ }
127
+ case 'MTRO': {
128
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
129
+ }
130
+ case 'MTRO(DK)': {
131
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
132
+ }
133
+ case 'MTRO(SE)': {
134
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
135
+ }
136
+ case 'MOCA': {
137
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mobilcash.gif') . '" border="0" />'; break;
138
+ }
139
+ case 'V-DK': {
140
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
141
+ }
142
+ case 'VISA': {
143
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
144
+ }
145
+ case 'VISA(DK)': {
146
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
147
+ }
148
+ case 'VISA(SE)': {
149
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
150
+ }
151
+ case 'ELEC': {
152
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visaelectron.gif') . '" border="0" />'; break;
153
+ }
154
+ case 'AKTIA': {
155
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/aktia.gif') . '" border="0" />'; break;
156
+ }
157
+ case 'DNB': {
158
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/danskenetbetaling.gif') . '" border="0" />'; break;
159
+ }
160
+ case 'EDK': {
161
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/edankort.gif') . '" border="0" />'; break;
162
+ }
163
+ case 'ELV': {
164
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bankeinzug.gif') . '" border="0" />'; break;
165
+ }
166
+ case 'EW': {
167
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ewire.gif') . '" border="0" />'; break;
168
+ }
169
+ case 'FSB': {
170
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/swedbankdirektbetaling.gif') . '" border="0" />'; break;
171
+ }
172
+ case 'GIT': {
173
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/getitcard.gif') . '" border="0" />'; break;
174
+ }
175
+ case 'ING': {
176
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ideal.gif') . '" border="0" />'; break;
177
+ }
178
+ case 'NDB': {
179
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
180
+ }
181
+ case 'SEB': {
182
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/seb.gif') . '" border="0" />'; break;
183
+ }
184
+ case 'SHB': {
185
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/shbdirektbetaling.gif') . '" border="0" />'; break;
186
+ }
187
+ case 'SOLO': {
188
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
189
+ }
190
+ case 'VAL': {
191
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/valus.gif') . '" border="0" />'; break;
192
+ }
193
+ default: {
194
+ $res = '<img src="' . $paytype;
195
+ }
196
+
197
+ }
198
+ return $res;
199
+ }
200
+
201
+ /**
202
+ * Retrieve current order model instance
203
+ *
204
+ * @return Mage_Sales_Model_Order
205
+ */
206
+ public function getOrder()
207
+ {
208
+ return Mage::registry('current_order');
209
+ }
210
+
211
+ public function addLink($name, $path, $label)
212
+ {
213
+ $this->_links[$name] = new Varien_Object(array(
214
+ 'name' => $name,
215
+ 'label' => $label,
216
+ 'url' => empty($path) ? '' : Mage::getUrl($path, array('order_id' => $this->getOrder()->getId()))
217
+ ));
218
+ return $this;
219
+ }
220
+
221
+ public function getLinks()
222
+ {
223
+ $this->checkLinks();
224
+ return $this->_links;
225
+ }
226
+
227
+ private function checkLinks()
228
+ {
229
+ $order = $this->getOrder();
230
+ if (!$order->hasInvoices()) {
231
+ unset($this->_links['invoice']);
232
+ }
233
+ if (!$order->hasShipments()) {
234
+ unset($this->_links['shipment']);
235
+ }
236
+ if (!$order->hasCreditmemos()) {
237
+ unset($this->_links['creditmemo']);
238
+ }
239
+ }
240
+
241
+ public function getReorderUrl($order)
242
+ {
243
+ return $this->getUrl('sales/order/reorder', array('order_id' => $order->getId()));
244
+ }
245
+
246
+ public function getPrintUrl($order)
247
+ {
248
+ return $this->getUrl('sales/order/print', array('order_id' => $order->getId()));
249
+ }
250
+ }
app/code/local/Mage/Sales/Block/Order/Print.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Order information for print
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Sales
32
+ */
33
+
34
+ class Mage_Sales_Block_Order_Print extends Mage_Sales_Block_Items_Abstract
35
+ {
36
+ protected function _prepareLayout()
37
+ {
38
+ if ($headBlock = $this->getLayout()->getBlock('head')) {
39
+ $headBlock->setTitle($this->__('Print Order # %s', $this->getOrder()->getRealOrderId()));
40
+ }
41
+ $this->setChild(
42
+ 'payment_info',
43
+ $this->helper('payment')->getInfoBlock($this->getOrder()->getPayment())
44
+ );
45
+ }
46
+
47
+ public function getPaymentInfoHtml()
48
+ {
49
+ //return $this->getChildHtml('payment_info');
50
+
51
+ $res = $this->getChildHtml('payment_info');
52
+
53
+ //
54
+ // Read info directly from the database
55
+ $read = Mage::getSingleton('core/resource')->getConnection('core_read');
56
+ $row = $read->fetchRow("select * from dibs_order_status where orderid = " . $this->getOrder()->getIncrementId());
57
+ $standard = Mage::getModel('dibs/standard');
58
+
59
+ if ($row['status'] == '1') {
60
+ //
61
+ // Payment has been made to this order
62
+ $res .= "<table border='0' width='100%'>";
63
+ if ($row['transact'] != '0') {
64
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_8') . "</td>";
65
+ $res .= "<td>" . $row['transact'] . "</td></tr>";
66
+ }
67
+ if ($row['paytype'] != '0') {
68
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_12') . "</td>";
69
+ $res .= "<td>" . $this->printLogo($row['paytype']) . "</td></tr>";
70
+ }
71
+ if ($row['fee'] != '0') {
72
+ $res .= "<tr><td>" . Mage::helper('dibs')->__('DIBS_LABEL_11') . "</td>";
73
+ $res .= "<td>" . $this->getOrder()->getOrderCurrencyCode() . "&nbsp;" . number_format(((int)$row['fee']) / 100, 2, ',', ' ') . "</td></tr>";
74
+ }
75
+ $res .= "</table><br>";
76
+
77
+ } else {
78
+ $res .= "<br>" . Mage::helper('dibs')->__('DIBS_LABEL_19') . "<br>";
79
+ }
80
+
81
+ return $res;
82
+ }
83
+
84
+ public function printLogo($paytype) {
85
+
86
+ switch($paytype) {
87
+ case 'AMEX': {
88
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
89
+ }
90
+ case 'AMEX(DK)': {
91
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/amex.gif') . '" border="0" />'; break;
92
+ }
93
+ case 'BAX': {
94
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bax.gif') . '" border="0" />'; break;
95
+ }
96
+ case 'DIN': {
97
+ $res = $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
98
+ }
99
+ case 'DIN(DK)': {
100
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/diners.gif') . '" border="0" />'; break;
101
+ }
102
+ case 'DK': {
103
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/dankort.gif') . '" border="0" />'; break;
104
+ }
105
+ case 'FFK': {
106
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/forbrugforeningen.gif') . '" border="0" />'; break;
107
+ }
108
+ case 'JCB': {
109
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/jcb.gif') . '" border="0" />'; break;
110
+ }
111
+ case 'MC': {
112
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
113
+ }
114
+ case 'MC(DK)': {
115
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
116
+ }
117
+ case 'MC(SE)': {
118
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mastercard.gif') . '" border="0" />'; break;
119
+ }
120
+ case 'MTRO': {
121
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
122
+ }
123
+ case 'MTRO(DK)': {
124
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
125
+ }
126
+ case 'MTRO(SE)': {
127
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/maestro.gif') . '" border="0" />'; break;
128
+ }
129
+ case 'MOCA': {
130
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/mobilcash.gif') . '" border="0" />'; break;
131
+ }
132
+ case 'V-DK': {
133
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
134
+ }
135
+ case 'VISA': {
136
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
137
+ }
138
+ case 'VISA(DK)': {
139
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
140
+ }
141
+ case 'VISA(SE)': {
142
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visa.gif') . '" border="0" />'; break;
143
+ }
144
+ case 'ELEC': {
145
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/visaelectron.gif') . '" border="0" />'; break;
146
+ }
147
+ case 'AKTIA': {
148
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/aktia.gif') . '" border="0" />'; break;
149
+ }
150
+ case 'DNB': {
151
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/danskenetbetaling.gif') . '" border="0" />'; break;
152
+ }
153
+ case 'EDK': {
154
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/edankort.gif') . '" border="0" />'; break;
155
+ }
156
+ case 'ELV': {
157
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/bankeinzug.gif') . '" border="0" />'; break;
158
+ }
159
+ case 'EW': {
160
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ewire.gif') . '" border="0" />'; break;
161
+ }
162
+ case 'FSB': {
163
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/swedbankdirektbetaling.gif') . '" border="0" />'; break;
164
+ }
165
+ case 'GIT': {
166
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/getitcard.gif') . '" border="0" />'; break;
167
+ }
168
+ case 'ING': {
169
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/ideal.gif') . '" border="0" />'; break;
170
+ }
171
+ case 'NDB': {
172
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
173
+ }
174
+ case 'SEB': {
175
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/seb.gif') . '" border="0" />'; break;
176
+ }
177
+ case 'SHB': {
178
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/shbdirektbetaling.gif') . '" border="0" />'; break;
179
+ }
180
+ case 'SOLO': {
181
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/nordea.gif') . '" border="0" />'; break;
182
+ }
183
+ case 'VAL': {
184
+ $res = '<img src="' . $this->getSkinUrl('images/dibs/valus.gif') . '" border="0" />'; break;
185
+ }
186
+ default: {
187
+ $res = '<img src="' . $paytype;
188
+ }
189
+
190
+ }
191
+ return $res;
192
+ }
193
+
194
+ public function getOrder()
195
+ {
196
+ return Mage::registry('current_order');
197
+ }
198
+
199
+ protected function _prepareItem(Mage_Core_Block_Abstract $renderer)
200
+ {
201
+ $renderer->setPrintStatus(true);
202
+
203
+ return parent::_prepareItem($renderer);
204
+ }
205
+
206
+ }
207
+
app/design/frontend/default/default/layout/dibs.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+
3
+ <layout version="0.1.0">
4
+
5
+ <dibs_redirect>
6
+ <reference name="content">
7
+ <block type="page/html" name="redirect" template="dibs/standard/redirect.phtml"></block>
8
+ </reference>
9
+ </dibs_redirect>
10
+
11
+
12
+ </layout>
app/design/frontend/default/default/template/dibs/standard/form.phtml ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //
3
+ // Load the dibs standard object
4
+ //
5
+ $standard = Mage::getModel('dibs/standard');
6
+ ?>
7
+ <fieldset class="form-list">
8
+ <?php $_code=$this->getMethodCode() ?>
9
+ <ul id="payment_form_<?php echo $_code ?>" style="display:none">
10
+ <li>
11
+ <?php echo $this->__('DIBS_LABEL_1'); ?>
12
+ <?php
13
+ if ($standard->showTrustedList()) {
14
+ ?>
15
+ <br><br>
16
+ <?php
17
+ //
18
+ // Show trusted logos
19
+ //
20
+ $logoArray = explode(',', $standard->getConfigData('dibslogos'));
21
+ foreach($logoArray as $item) {
22
+ switch ($item) {
23
+ case 'DIBS': {
24
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/dibslogo.gif') ?>" border="0" title="DIBS | Secure Payment Services (www.dibspayment.com)" />&nbsp;&nbsp;<?php
25
+ break;
26
+ }
27
+ case 'VISA_SECURE': {
28
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/verifiedbyvisa.gif') ?>" border="0" />&nbsp;&nbsp;<?php
29
+ break;
30
+ }
31
+ case 'MC_SECURE': {
32
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/mastercardsecurecode.gif') ?>" border="0" />&nbsp;&nbsp;<?php
33
+ break;
34
+ }
35
+ case 'JCB_SECURE': {
36
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/jcbsecure.gif') ?>" border="0" />&nbsp;&nbsp;<?php
37
+ break;
38
+ }
39
+ case 'PCI': {
40
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/pci.gif') ?>" border="0" />&nbsp;&nbsp;<?php
41
+ break;
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ if ($standard->showCardsList()) {
48
+ ?>
49
+ <br><br>
50
+ <?php echo $this->__('DIBS_LABEL_2') ?>
51
+ <br>
52
+ <?php
53
+ //
54
+ // Show card logos
55
+ //
56
+ $logoArray = explode(',', $standard->getConfigData('dibslogos'));
57
+ foreach($logoArray as $item) {
58
+ switch ($item) {
59
+ case 'AMEX': {
60
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/amex.gif') ?>" border="0" title="American Express" />&nbsp;&nbsp;<?php
61
+ break;
62
+ }
63
+ case 'BAX': {
64
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/bax.gif') ?>" border="0" title="BankAxess" />&nbsp;&nbsp;<?php
65
+ break;
66
+ }
67
+ case 'DIN': {
68
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/diners.gif') ?>" border="0" title="Diners Club" />&nbsp;&nbsp;<?php
69
+ break;
70
+ }
71
+ case 'DK': {
72
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/dankort.gif') ?>" border="0" title="Dankort" />&nbsp;&nbsp;<?php
73
+ break;
74
+ }
75
+ case 'FFK': {
76
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/forbrugforeningen.gif') ?>" border="0" title="Forbrugsforeningen Card" />&nbsp;&nbsp;<?php
77
+ break;
78
+ }
79
+ case 'JCB': {
80
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/jcb.gif') ?>" border="0" title="JCB (Japan Credit Bureau)" />&nbsp;&nbsp;<?php
81
+ break;
82
+ }
83
+ case 'MC': {
84
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/mastercard.gif') ?>" border="0" title="MasterCard" />&nbsp;&nbsp;<?php
85
+ break;
86
+ }
87
+ case 'MTRO': {
88
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/maestro.gif') ?>" border="0" title="Maestro" />&nbsp;&nbsp;<?php
89
+ break;
90
+ }
91
+ case 'MOCA': {
92
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/mobilcash.gif') ?>" border="0" title="Mobilcash" />&nbsp;&nbsp;<?php
93
+ break;
94
+ }
95
+ case 'VISA': {
96
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/visa.gif') ?>" border="0" title="Visa" />&nbsp;&nbsp;<?php
97
+ break;
98
+ }
99
+ case 'ELEC': {
100
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/visaelectron.gif') ?>" border="0" title="Visa Electron" />&nbsp;&nbsp;<?php
101
+ break;
102
+ }
103
+ case 'AKTIA': {
104
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/aktia.gif') ?>" border="0" title="Aktia Web Payment" />&nbsp;&nbsp;<?php
105
+ break;
106
+ }
107
+ case 'DNB': {
108
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/danskenetbetaling.gif') ?>" border="0" title="Danske Netbetaling (Danske Bank)" />&nbsp;&nbsp;<?php
109
+ break;
110
+ }
111
+ case 'EDK': {
112
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/edankort.gif') ?>" border="0" title="eDankort" />&nbsp;&nbsp;<?php
113
+ break;
114
+ }
115
+ case 'ELV': {
116
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/bankeinzug.gif') ?>" border="0" title="Bank Einzug (eOLV)" />&nbsp;&nbsp;<?php
117
+ break;
118
+ }
119
+ case 'EW': {
120
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/ewire.gif') ?>" border="0" title="eWire" />&nbsp;&nbsp;<?php
121
+ break;
122
+ }
123
+ case 'FSB': {
124
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/swedbankdirektbetaling.gif') ?>" border="0" title="Swedbank Direktbetalning" />&nbsp;&nbsp;<?php
125
+ break;
126
+ }
127
+ case 'GIT': {
128
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/getitcard.gif') ?>" border="0" title="Getitcard" />&nbsp;&nbsp;<?php
129
+ break;
130
+ }
131
+ case 'ING': {
132
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/ideal.gif') ?>" border="0" title="ING iDeal Payment" />&nbsp;&nbsp;<?php
133
+ break;
134
+ }
135
+ case 'SEB': {
136
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/seb.gif') ?>" border="0" title="SEB Direktbetalning" />&nbsp;&nbsp;<?php
137
+ break;
138
+ }
139
+ case 'SHB': {
140
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/shbdirektbetaling.gif') ?>" border="0" title="SHB Direktbetalning" />&nbsp;&nbsp;<?php
141
+ break;
142
+ }
143
+ case 'SOLO': {
144
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/nordea.gif') ?>" border="0" title="Nordea Solo-E betaling" />&nbsp;&nbsp;<?php
145
+ break;
146
+ }
147
+ case 'VAL': {
148
+ ?><img src="<?php echo $this->getSkinUrl('images/dibs/valus.gif') ?>" border="0" title="Valus" />&nbsp;&nbsp;<?php
149
+ break;
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ?>
155
+ </li>
156
+ </ul>
157
+ </fieldset>
app/design/frontend/default/default/template/dibs/standard/redirect_flexwin.phtml ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //
3
+ // Load the dibs standard object
4
+ //
5
+ $standard = Mage::getModel('dibs/standard');
6
+
7
+ //
8
+ // If integrated is not set something is wrong - throw exception then
9
+ //
10
+ if ($standard->getConfigData('paymentwindow') != '1') {
11
+ throw new exception("Invalid integrated type!?!?");
12
+ }
13
+
14
+ //
15
+ // Fetch order invoice info
16
+ //
17
+ $order = Mage::getModel('sales/order');
18
+ $order->loadByIncrementId($standard->getCheckout()->getLastRealOrderId());
19
+ $convertor = Mage::getModel('sales/convert_order');
20
+ $invoice = $convertor->toInvoice($order);
21
+
22
+
23
+
24
+ //
25
+ // Go on and load the payment form containing the values
26
+ //
27
+ ?>
28
+ <br />
29
+ <br />
30
+ <br />
31
+ <table border="0" width="100%">
32
+ <tr>
33
+ <td>
34
+ <label for="Orderid"><?php echo $this->__('DIBS_LABEL_4') ?> :</label>
35
+ </td>
36
+ <td>
37
+ <label for="Orderid"><?php echo $standard->getCheckout()->getLastRealOrderId() ?></label>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td>
42
+ <label for="Amount"><?php echo $this->__('DIBS_LABEL_5') ?> :</label>
43
+ </td>
44
+ <td>
45
+ <label for="CurrencyAmount"><?php echo $order->getOrderCurrency() . "&nbsp;" . number_format($order->getTotalDue(), 2, ',', ' ') ?></label>
46
+ </td>
47
+ </tr>
48
+ </table>
49
+ <br />
50
+ <br />
51
+ <img src="<?php echo $this->getSkinUrl('images/dibs/loading.gif') ?>" border="0" title="loading" align="center" />
52
+ <p align="center" >
53
+ <b><?php echo $this->__('DIBS_LABEL_6') ?></b>
54
+ </p>
55
+
56
+ <form action="https://payment.architrade.com/paymentweb/start.action" method="post" name="dibs" id="dibs">
57
+ <input type="hidden" name="merchant" value="<?php echo $standard->getConfigData("merchantid") ?>">
58
+ <input type="hidden" name="accepturl" value="<?php echo Mage::getUrl('dibs/standard/success') ?>">
59
+ <input type="hidden" name="cancelurl" value="<?php echo Mage::getUrl('dibs/standard/cancel') ?>">
60
+ <input type="hidden" name="callbackurl" value="<?php echo Mage::getUrl('dibs/standard/callback') ?>">
61
+ <input type="hidden" name="orderid" value="<?php echo $standard->getCheckout()->getLastRealOrderId() ?>">
62
+ <input type="hidden" name="amount" value="<?php echo $order->getTotalDue() * 100 ?>">
63
+ <input type="hidden" name="currency" value="<?php echo $standard->convertToDibsCurrency($order->getOrderCurrency()) ?>">
64
+ <input type="hidden" name="HTTP_COOKIE" value="<?php echo getenv('HTTP_COOKIE')?>">
65
+ <?php
66
+ if ($standard->getConfigData("md5key1") != "" && $standard->getConfigData("md5key2") != "") {
67
+ $md5key=md5($standard->getConfigData("md5key2").md5($standard->getConfigData("md5key1").'merchant='.$standard->getConfigData("merchantid").'&orderid='.$standard->getCheckout()->getLastRealOrderId().'&currency='.$standard->convertToDibsCurrency($order->getOrderCurrency()).'&amount='.$order->getTotalDue() * 100));
68
+ print '<input type="hidden" name="md5key" value="'.$md5key.'" />';
69
+ }
70
+ if ($standard->getConfigData("test_mode") == "1") {
71
+ print '<input type="hidden" name="test" value="yes" />';
72
+ }
73
+ if ($standard->getConfigData("calcfee") == "1") {
74
+ print '<input type="hidden" name="calcfee" value="yes" />';
75
+ }
76
+ if ($standard->getConfigData("capturenow") == "1") {
77
+ print '<input type="hidden" name="capturenow" value="yes" />';
78
+ }
79
+ if ($standard->getConfigData("skiplastpage") == "1") {
80
+ print '<input type="hidden" name="skiplastpage" value="yes" />';
81
+ }
82
+ if ($standard->getConfigData("decorator") != "own") {
83
+ print '<input type="hidden" name="decorator" value="'.$standard->getConfigData("decorator").'" />';
84
+ if ($standard->getConfigData("color") != "blank") {
85
+ print '<input type="hidden" name="color" value="'.$standard->getConfigData("color").'" />';
86
+ }
87
+ }
88
+ if ($standard->getConfigData("paytype") != "") {
89
+ print '<input type="hidden" name="paytype" value="'.$standard->getConfigData("paytype").'" />';
90
+ }
91
+ if ($standard->getConfigData("account") != "") {
92
+ print '<input type="hidden" name="account" value="'.$standard->getConfigData("account").'" />';
93
+ }
94
+ if ($standard->getConfigData("uniqueoid") == "1") {
95
+ print '<input type="hidden" name="uniqueoid" value="yes" />';
96
+ }
97
+ if ($standard->getConfigData("lang") != "auto") {
98
+ print '<input type="hidden" name="lang" value="'.$standard->getConfigData("lang").'" />';
99
+ } else {
100
+ $dibs_lang_arr= array('da' => 'da','en' => 'en', 'sv' => 'sv', 'nn' => 'no', 'nb' => 'no', 'fi' => 'fi', 'de' => 'de', 'nl' => 'nl', 'fr' => 'fr', 'es' => 'es', 'it' => 'it', 'fo' => 'fo');
101
+ foreach ($dibs_lang_arr as $key => $value) {
102
+ if (substr(Mage::app()->getLocale()->getLocaleCode(),0,2) == $key) {
103
+ $status = true;
104
+ break;
105
+ } else {
106
+ $status = false;
107
+ }
108
+ }
109
+ if ($status) {
110
+ print '<input type="hidden" name="lang" value="'.$dibs_lang_arr[substr(Mage::app()->getLocale()->getLocaleCode(),0,2)].'" />';
111
+ } else {
112
+ print '<input type="hidden" name="lang" value="en" />';
113
+ }
114
+ }
115
+ ?>
116
+
117
+ <script type="text/javascript">
118
+ setTimeout("document.getElementById('dibs').submit();",1000);
119
+ </script>
120
+ </form>
app/design/frontend/default/default/template/dibs/standard/redirect_paymentwindow.phtml ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //
3
+ // Load the dibs standard object
4
+ //
5
+ $standard = Mage::getModel('dibs/standard');
6
+
7
+ //
8
+ // If integrated is not set something is wrong - throw exception then
9
+ //
10
+ if ($standard->getConfigData('paymentwindow') != '2') {
11
+ throw new exception("Invalid integrated type!?!?");
12
+ }
13
+
14
+ //
15
+ // Fetch order invoice info
16
+ //
17
+ $order = Mage::getModel('sales/order');
18
+ $order->loadByIncrementId($standard->getCheckout()->getLastRealOrderId());
19
+ $convertor = Mage::getModel('sales/convert_order');
20
+ $invoice = $convertor->toInvoice($order);
21
+
22
+
23
+
24
+ //
25
+ // Go on and load the payment form containing the values
26
+ //
27
+ ?>
28
+ <br />
29
+ <br />
30
+ <br />
31
+ <table border="0" width="100%">
32
+ <tr>
33
+ <td>
34
+ <label for="Orderid"><?php echo $this->__('DIBS_LABEL_4') ?> :</label>
35
+ </td>
36
+ <td>
37
+ <label for="Orderid"><?php echo $standard->getCheckout()->getLastRealOrderId() ?></label>
38
+ </td>
39
+ </tr>
40
+ <tr>
41
+ <td>
42
+ <label for="Amount"><?php echo $this->__('DIBS_LABEL_5') ?> :</label>
43
+ </td>
44
+ <td>
45
+ <label for="CurrencyAmount"><?php echo $order->getOrderCurrency() . "&nbsp;" . number_format($order->getTotalDue(), 2, ',', ' ') ?></label>
46
+ </td>
47
+ </tr>
48
+ </table>
49
+ <br />
50
+ <br />
51
+ <img src="<?php echo $this->getSkinUrl('images/dibs/loading.gif') ?>" border="0" title="loading" align="center" />
52
+ <p align="center" >
53
+ <b><?php echo $this->__('DIBS_LABEL_6') ?></b>
54
+ </p>
55
+
56
+ <form action="https://payment.architrade.com/payment/start.pml" method="post" name="dibs" id="dibs">
57
+ <input type="hidden" name="merchant" value="<?php echo $standard->getConfigData("merchantid") ?>">
58
+ <input type="hidden" name="accepturl" value="<?php echo Mage::getUrl('dibs/standard/success') ?>">
59
+ <input type="hidden" name="cancelurl" value="<?php echo Mage::getUrl('dibs/standard/cancel') ?>">
60
+ <input type="hidden" name="callbackurl" value="<?php echo Mage::getUrl('dibs/standard/callback') ?>">
61
+ <input type="hidden" name="orderid" value="<?php echo $standard->getCheckout()->getLastRealOrderId() ?>">
62
+ <input type="hidden" name="amount" value="<?php echo $order->getTotalDue() * 100 ?>">
63
+ <input type="hidden" name="currency" value="<?php echo $standard->convertToDibsCurrency($order->getOrderCurrency()) ?>">
64
+ <input type="hidden" name="HTTP_COOKIE" value="<?php echo getenv('HTTP_COOKIE')?>">
65
+ <?php
66
+ if ($standard->getConfigData("md5key1") != "" && $standard->getConfigData("md5key2") != "") {
67
+ $md5key=md5($standard->getConfigData("md5key2").md5($standard->getConfigData("md5key1").'merchant='.$standard->getConfigData("merchantid").'&orderid='.$standard->getCheckout()->getLastRealOrderId().'&currency='.$standard->convertToDibsCurrency($order->getOrderCurrency()).'&amount='.$order->getTotalDue() * 100));
68
+ print '<input type="hidden" name="md5key" value="'.$md5key.'" />';
69
+ }
70
+ if ($standard->getConfigData("test_mode") == "1") {
71
+ print '<input type="hidden" name="test" value="yes" />';
72
+ }
73
+ if ($standard->getConfigData("calcfee") == "1") {
74
+ print '<input type="hidden" name="calcfee" value="yes" />';
75
+ }
76
+ if ($standard->getConfigData("capturenow") == "1") {
77
+ print '<input type="hidden" name="capturenow" value="yes" />';
78
+ }
79
+ if ($standard->getConfigData("paytype") != "") {
80
+ print '<input type="hidden" name="paytype" value="'.$standard->getConfigData("paytype").'" />';
81
+ }
82
+ if ($standard->getConfigData("account") != "") {
83
+ print '<input type="hidden" name="account" value="'.$standard->getConfigData("account").'" />';
84
+ }
85
+ if ($standard->getConfigData("color") != "blank") {
86
+ print '<input type="hidden" name="color" value="'.$standard->getConfigData("color").'" />';
87
+ }
88
+ if ($standard->getConfigData("uniqueoid") == "1") {
89
+ print '<input type="hidden" name="uniqueoid" value="yes" />';
90
+ }
91
+ if ($standard->getConfigData("lang") != "auto") {
92
+ print '<input type="hidden" name="lang" value="'.$standard->getConfigData("lang").'" />';
93
+ } else {
94
+ $dibs_lang_arr= array('da' => 'da','en' => 'en', 'sv' => 'sv', 'nn' => 'no', 'nb' => 'no', 'fi' => 'fi', 'de' => 'de', 'nl' => 'nl', 'fr' => 'fr', 'es' => 'es', 'it' => 'it', 'fo' => 'fo');
95
+ foreach ($dibs_lang_arr as $key => $value) {
96
+ if (substr(Mage::app()->getLocale()->getLocaleCode(),0,2) == $key) {
97
+ $status = true;
98
+ break;
99
+ } else {
100
+ $status = false;
101
+ }
102
+ }
103
+ if ($status) {
104
+ print '<input type="hidden" name="lang" value="'.$dibs_lang_arr[substr(Mage::app()->getLocale()->getLocaleCode(),0,2)].'" />';
105
+ } else {
106
+ print '<input type="hidden" name="lang" value="en" />';
107
+ }
108
+ }
109
+ ?>
110
+
111
+ <script type="text/javascript">
112
+ setTimeout("document.getElementById('dibs').submit();",1000);
113
+ </script>
114
+ </form>
app/etc/modules/dibs.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Mage_Dibs>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Mage_Dibs>
8
+ </modules>
9
+ </config>
app/locale/da_DK/Mage_Dibs.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "DIBS_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
2
+ "DIBS_LABEL_2","You can pay with the following payment cards:"
3
+ "DIBS_LABEL_3","The order is now placed and payment must now be made by DIBS Payment Services (www.dibspayment.com)"
4
+ "DIBS_LABEL_4","Order number"
5
+ "DIBS_LABEL_5","Amount"
6
+ "DIBS_LABEL_6","Your are now being redirected to the payment gateway"
7
+ "DIBS_LABEL_7","DIBS Payment Information"
8
+ "DIBS_LABEL_8","Transaction ID:"
9
+ "DIBS_LABEL_9","Amount:"
10
+ "DIBS_LABEL_10","Currency Code:"
11
+ "DIBS_LABEL_11","Fee:"
12
+ "DIBS_LABEL_12","Pay type:"
13
+ "DIBS_LABEL_13","Card number:"
14
+ "DIBS_LABEL_14","Expire:"
15
+ "DIBS_LABEL_15","Country:"
16
+ "DIBS_LABEL_16","Acquirer:"
17
+ "DIBS_LABEL_17","3-D Secure:"
18
+ "DIBS_LABEL_18","Go to DIBS administration and process the payment"
19
+ "DIBS_LABEL_19","There is not registered any payment for this order yet!"
20
+ "DIBS_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
+ "DIBS_LABEL_21","Callback received from DIBS Payment Services (www.dibspayment.com)"
22
+ "DIBS_LABEL_22","Customer successfully returned to store from DIBS Payment Services (www.dibspayment.com)"
app/locale/en_US/Mage_Dibs.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "DIBS_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
2
+ "DIBS_LABEL_2","You can pay with the following payment cards:"
3
+ "DIBS_LABEL_3","The order is now placed and payment must now be made by DIBS Payment Services (www.dibspayment.com)"
4
+ "DIBS_LABEL_4","Order number"
5
+ "DIBS_LABEL_5","Amount"
6
+ "DIBS_LABEL_6","Your are now being redirected to the payment gateway"
7
+ "DIBS_LABEL_7","DIBS Payment Information"
8
+ "DIBS_LABEL_8","Transaction ID:"
9
+ "DIBS_LABEL_9","Amount:"
10
+ "DIBS_LABEL_10","Currency Code:"
11
+ "DIBS_LABEL_11","Fee:"
12
+ "DIBS_LABEL_12","Pay type:"
13
+ "DIBS_LABEL_13","Card number:"
14
+ "DIBS_LABEL_14","Expire:"
15
+ "DIBS_LABEL_15","Country:"
16
+ "DIBS_LABEL_16","Acquirer:"
17
+ "DIBS_LABEL_17","3-D Secure:"
18
+ "DIBS_LABEL_18","Go to DIBS administration and process the payment"
19
+ "DIBS_LABEL_19","There is not registered any payment for this order yet!"
20
+ "DIBS_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
+ "DIBS_LABEL_21","Callback received from DIBS Payment Services (www.dibspayment.com)"
22
+ "DIBS_LABEL_22","Customer successfully returned to store from DIBS Payment Services (www.dibspayment.com)"
app/locale/nb_NO/Mage_Dibs.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "DIBS_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
2
+ "DIBS_LABEL_2","You can pay with the following payment cards:"
3
+ "DIBS_LABEL_3","The order is now placed and payment must now be made by DIBS Payment Services (www.dibspayment.com)"
4
+ "DIBS_LABEL_4","Order number"
5
+ "DIBS_LABEL_5","Amount"
6
+ "DIBS_LABEL_6","Your are now being redirected to the payment gateway"
7
+ "DIBS_LABEL_7","DIBS Payment Information"
8
+ "DIBS_LABEL_8","Transaction ID:"
9
+ "DIBS_LABEL_9","Amount:"
10
+ "DIBS_LABEL_10","Currency Code:"
11
+ "DIBS_LABEL_11","Fee:"
12
+ "DIBS_LABEL_12","Pay type:"
13
+ "DIBS_LABEL_13","Card number:"
14
+ "DIBS_LABEL_14","Expire:"
15
+ "DIBS_LABEL_15","Country:"
16
+ "DIBS_LABEL_16","Acquirer:"
17
+ "DIBS_LABEL_17","3-D Secure:"
18
+ "DIBS_LABEL_18","Go to DIBS administration and process the payment"
19
+ "DIBS_LABEL_19","There is not registered any payment for this order yet!"
20
+ "DIBS_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
+ "DIBS_LABEL_21","Callback received from DIBS Payment Services (www.dibspayment.com)"
22
+ "DIBS_LABEL_22","Customer successfully returned to store from DIBS Payment Services (www.dibspayment.com)"
app/locale/nn_NO/Mage_Dibs.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "DIBS_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
2
+ "DIBS_LABEL_2","You can pay with the following payment cards:"
3
+ "DIBS_LABEL_3","The order is now placed and payment must now be made by DIBS Payment Services (www.dibspayment.com)"
4
+ "DIBS_LABEL_4","Order number"
5
+ "DIBS_LABEL_5","Amount"
6
+ "DIBS_LABEL_6","Your are now being redirected to the payment gateway"
7
+ "DIBS_LABEL_7","DIBS Payment Information"
8
+ "DIBS_LABEL_8","Transaction ID:"
9
+ "DIBS_LABEL_9","Amount:"
10
+ "DIBS_LABEL_10","Currency Code:"
11
+ "DIBS_LABEL_11","Fee:"
12
+ "DIBS_LABEL_12","Pay type:"
13
+ "DIBS_LABEL_13","Card number:"
14
+ "DIBS_LABEL_14","Expire:"
15
+ "DIBS_LABEL_15","Country:"
16
+ "DIBS_LABEL_16","Acquirer:"
17
+ "DIBS_LABEL_17","3-D Secure:"
18
+ "DIBS_LABEL_18","Go to DIBS administration and process the payment"
19
+ "DIBS_LABEL_19","There is not registered any payment for this order yet!"
20
+ "DIBS_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
+ "DIBS_LABEL_21","Callback received from DIBS Payment Services (www.dibspayment.com)"
22
+ "DIBS_LABEL_22","Customer successfully returned to store from DIBS Payment Services (www.dibspayment.com)"
app/locale/sv_SE/Mage_Dibs.csv ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "DIBS_LABEL_1","You have chosen to pay for the order online. Once you've completed your order, you will be transferred to the DIBS payment system. Here you need to process your payment. Once payment is completed, you will automatically be returned to our shop."
2
+ "DIBS_LABEL_2","You can pay with the following payment cards:"
3
+ "DIBS_LABEL_3","The order is now placed and payment must now be made by DIBS Payment Services (www.dibspayment.com)"
4
+ "DIBS_LABEL_4","Order number"
5
+ "DIBS_LABEL_5","Amount"
6
+ "DIBS_LABEL_6","Your are now being redirected to the payment gateway"
7
+ "DIBS_LABEL_7","DIBS Payment Information"
8
+ "DIBS_LABEL_8","Transaction ID:"
9
+ "DIBS_LABEL_9","Amount:"
10
+ "DIBS_LABEL_10","Currency Code:"
11
+ "DIBS_LABEL_11","Fee:"
12
+ "DIBS_LABEL_12","Pay type:"
13
+ "DIBS_LABEL_13","Card number:"
14
+ "DIBS_LABEL_14","Expire:"
15
+ "DIBS_LABEL_15","Country:"
16
+ "DIBS_LABEL_16","Acquirer:"
17
+ "DIBS_LABEL_17","3-D Secure:"
18
+ "DIBS_LABEL_18","Go to DIBS administration and process the payment"
19
+ "DIBS_LABEL_19","There is not registered any payment for this order yet!"
20
+ "DIBS_LABEL_20","Customer has cancelled the payment process - DIBS Payment Services (www.dibspayment.com)"
21
+ "DIBS_LABEL_21","Callback received from DIBS Payment Services (www.dibspayment.com)"
22
+ "DIBS_LABEL_22","Customer successfully returned to store from DIBS Payment Services (www.dibspayment.com)"
package.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>DIBS</name>
4
+ <version>1.0.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Accept all types of payments from DIBS - Secure Internet Payment Service Provider</summary>
10
+ <description>This is the payment gateway module for the DIBS payment gateway - http://www.dibspayment.com
11
+
12
+ DIBS Payment Services is the leading Scandinavian Internet service provider.
13
+
14
+ Security and credibility are important keywords to companies handling payment transactions. Hence, DIBS has achieved VISA/MasterCard PCI certification and devotes its efforts to constantly enhancing its security solutions.
15
+
16
+ Card types accepted by the DIBS payment gateway:
17
+ - Dankort
18
+ - VISA/Dankort
19
+ - VISA
20
+ - VISA Electron
21
+ - MasterCard
22
+ - Maestro
23
+ - JCB
24
+ - Diners
25
+ - American Express
26
+ - Forbrugsforeningen
27
+ - eWire
28
+ - VISA 3D Secure
29
+ - MaserCard 3D secure
30
+ - JCB 3D secure
31
+ - Danske Bank e-betaling
32
+ - Nordea e-betaling</description>
33
+ <notes>First release 1.0.0.0</notes>
34
+ <authors><author><name>DIBS AS</name><user>auto-converted</user><email>plugins@dibs.dk</email></author></authors>
35
+ <date>2009-05-14</date>
36
+ <time>00:29:12</time>
37
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="dibs"><file name="aktia.gif" hash="7afe00b19b4194fa4ffbdf20cdd469c1"/><file name="amex.gif" hash="f35f89ccdcb954e02a07f6c0a29c7b43"/><file name="bak.gif" hash="c315574fd839dae52a1316b6d8b836b6"/><file name="bankeinzug.gif" hash="3bd20355343bd250a6a704fdbaf9ba62"/><file name="dankort.gif" hash="daa5d5d2c0d541579b0e13aa3cd9d65b"/><file name="danskenetbetaling.gif" hash="1f616c382b72248334f6aa1ca910003b"/><file name="dibslogo.gif" hash="8b308757472fc5aaaedfefd5c79a2d54"/><file name="diners.gif" hash="fabce04659a94993a230285b9a4651e9"/><file name="edankort.gif" hash="4485910a0fb40512233c1a59ddd31015"/><file name="ewire.gif" hash="b50385f7d878be6a3834310d1fbc3a1d"/><file name="forbrugforeningen.gif" hash="d9cd7fa26230a850114b2dc99aea3b22"/><file name="getitcard.gif" hash="b70e244f36e7aec94fe3f6373e1ae8d7"/><file name="ideal.gif" hash="40f07b266bcd5953bb6c079f7eeaae67"/><file name="jcb.gif" hash="aea8c54e043a75b26887fa1307ad4312"/><file name="jcbsecure.gif" hash="1c687214f79b73d7e99f5011c9c22bce"/><file name="loading.gif" hash="7e99e1159a3686f6aa4f90043c554483"/><file name="maestro.gif" hash="d5df5f7986a21bf5a78b9c7a3656facd"/><file name="mastercard.gif" hash="2680e078159e5aedb561c3a705801a44"/><file name="mastercardsecurecode.gif" hash="730735c1e2d36d9fa3bd6468fa0b1a7d"/><file name="mobilcash.gif" hash="befd2f10976c0ab40333f01fc6db4743"/><file name="nordeasole.gif" hash="17b9be1a06125dcc7d1a6be8fea38dd6"/><file name="oko.gif" hash="1cde3c12036ebd74a643aee2ffb0513a"/><file name="pci.gif" hash="b55a87df550ea6789c17e389604e28e1"/><file name="seb.gif" hash="502b1dbeb81bce51abd1ea149d4dde14"/><file name="shbdirektbetaling.gif" hash="0aa7c7fab4133ff4843c0ae73cabe9de"/><file name="swedbankdirektbetaling.gif" hash="d6da3e67f8096811c2ad0135b2aad80a"/><file name="valus.gif" hash="e62b75eb172934e118a70366baac51ee"/><file name="verifiedbyvisa.gif" hash="517118742fce249485c8eaf6df174764"/><file name="visa.gif" hash="b61251f8c428aa5dca017c9f374957ef"/><file name="visaelectron.gif" hash="e5371ba0da9bb14990d1b8163cedd066"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="images"><dir name="dibs"><file name="aktia.gif" hash="7afe00b19b4194fa4ffbdf20cdd469c1"/><file name="amex.gif" hash="f35f89ccdcb954e02a07f6c0a29c7b43"/><file name="bak.gif" hash="c315574fd839dae52a1316b6d8b836b6"/><file name="bankeinzug.gif" hash="3bd20355343bd250a6a704fdbaf9ba62"/><file name="dankort.gif" hash="daa5d5d2c0d541579b0e13aa3cd9d65b"/><file name="danskenetbetaling.gif" hash="1f616c382b72248334f6aa1ca910003b"/><file name="dibslogo.gif" hash="8b308757472fc5aaaedfefd5c79a2d54"/><file name="diners.gif" hash="fabce04659a94993a230285b9a4651e9"/><file name="edankort.gif" hash="4485910a0fb40512233c1a59ddd31015"/><file name="ewire.gif" hash="b50385f7d878be6a3834310d1fbc3a1d"/><file name="forbrugforeningen.gif" hash="d9cd7fa26230a850114b2dc99aea3b22"/><file name="getitcard.gif" hash="b70e244f36e7aec94fe3f6373e1ae8d7"/><file name="ideal.gif" hash="40f07b266bcd5953bb6c079f7eeaae67"/><file name="jcb.gif" hash="aea8c54e043a75b26887fa1307ad4312"/><file name="jcbsecure.gif" hash="1c687214f79b73d7e99f5011c9c22bce"/><file name="loading.gif" hash="7e99e1159a3686f6aa4f90043c554483"/><file name="maestro.gif" hash="d5df5f7986a21bf5a78b9c7a3656facd"/><file name="mastercard.gif" hash="2680e078159e5aedb561c3a705801a44"/><file name="mastercardsecurecode.gif" hash="730735c1e2d36d9fa3bd6468fa0b1a7d"/><file name="mobilcash.gif" hash="befd2f10976c0ab40333f01fc6db4743"/><file name="nordeasole.gif" hash="17b9be1a06125dcc7d1a6be8fea38dd6"/><file name="oko.gif" hash="1cde3c12036ebd74a643aee2ffb0513a"/><file name="pci.gif" hash="b55a87df550ea6789c17e389604e28e1"/><file name="seb.gif" hash="502b1dbeb81bce51abd1ea149d4dde14"/><file name="shbdirektbetaling.gif" hash="0aa7c7fab4133ff4843c0ae73cabe9de"/><file name="swedbankdirektbetaling.gif" hash="d6da3e67f8096811c2ad0135b2aad80a"/><file name="valus.gif" hash="e62b75eb172934e118a70366baac51ee"/><file name="verifiedbyvisa.gif" hash="517118742fce249485c8eaf6df174764"/><file name="visa.gif" hash="b61251f8c428aa5dca017c9f374957ef"/><file name="visaelectron.gif" hash="e5371ba0da9bb14990d1b8163cedd066"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="da_DK"><file name="Mage_Dibs.csv" hash="96107e9f005b09d7c978d8cefdd5ecff"/></dir><dir name="en_US"><file name="Mage_Dibs.csv" hash="96107e9f005b09d7c978d8cefdd5ecff"/></dir><dir name="nb_NO"><file name="Mage_Dibs.csv" hash="96107e9f005b09d7c978d8cefdd5ecff"/></dir><dir name="nn_NO"><file name="Mage_Dibs.csv" hash="96107e9f005b09d7c978d8cefdd5ecff"/></dir><dir name="sv_SE"><file name="Mage_Dibs.csv" hash="96107e9f005b09d7c978d8cefdd5ecff"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="dibs.xml" hash="e0fcac411141323aec77d6b77862f063"/></dir><dir name="template"><dir name="dibs"><dir name="standard"><file name="form.phtml" hash="449b1b49d82239f3af471d598608ae4c"/><file name="redirect_flexwin.phtml" hash="60fabba5e1c4593b213877ea6b82e26f"/><file name="redirect_paymentwindow.phtml" hash="d4525cee67cab47a47513aaabc8a5aa1"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Mage"><dir name="Adminhtml"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Info.php" hash="ce54f910bfcdf2b41b2663dadb7ba2fc"/></dir></dir></dir></dir></dir></dir><dir name="Dibs"><dir name="Block"><dir name="Standard"><file name="Form.php" hash="83d5b53a34224290eeea745a4c3a159f"/><file name="Redirect.php" hash="c14482ae1cd5d95dfed3644675413fdb"/></dir></dir><dir name="controllers"><file name="StandardController.php" hash="a07995cc58b03dd8c4c348f3c7a6ca32"/></dir><dir name="etc"><file name="config.xml" hash="6f9a61f16119799b3626f54106345e8c"/><file name="system.xml" hash="edee3ab619eb80daddf20aef710d54e1"/></dir><dir name="Helper"><file name="Data.php" hash="4797bc2b45d818be26370fa21d540ed0"/></dir><dir name="Model"><dir name="Mysql4"><file name="Setup.php" hash="8840dcdcd6671d465c0e818d5dd673f9"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="78084ee39f49af7291ab0f6cb0ab7f8b"/><file name="Decorator.php" hash="29e5a6c1aa9f92b0542ad2381d5fbabc"/><file name="Dibslogos.php" hash="29a026f1229bafda94a04352e74739e8"/><file name="Lang.php" hash="842d86a353e0f5d1339bb38feea1ec00"/><file name="Paymentwindow.php" hash="0742db19898c94c777385ce2160e25f9"/></dir></dir></dir><file name="Standard.php" hash="f6bbc7ecb85a7aeb69d034abb906a183"/></dir><dir name="sql"><dir name="dibs_setup"><file name="mysql4-install-0.7.0.php" hash="d88086058012c15b9d9cf68251aa599a"/></dir></dir></dir><dir name="Sales"><dir name="Block"><dir name="Order"><file name="Info.php" hash="9e6166c1a038944900094a9dbde9a3a1"/><file name="Print.php" hash="990ab1545e691e8cdc4daf7a8e802069"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="dibs.xml" hash="8bd9e75f2ab5a6f258ea296caff89d7d"/></dir></target></contents>
38
+ <compatible/>
39
+ <dependencies/>
40
+ </package>
skin/adminhtml/default/default/images/dibs/aktia.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/amex.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/bak.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/bankeinzug.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/dankort.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/danskenetbetaling.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/dibslogo.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/diners.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/edankort.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/ewire.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/forbrugforeningen.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/getitcard.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/ideal.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/jcb.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/jcbsecure.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/loading.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/maestro.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/mastercard.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/mastercardsecurecode.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/mobilcash.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/nordeasole.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/oko.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/pci.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/seb.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/shbdirektbetaling.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/swedbankdirektbetaling.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/valus.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/verifiedbyvisa.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/visa.gif ADDED
Binary file
skin/adminhtml/default/default/images/dibs/visaelectron.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/aktia.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/amex.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/bak.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/bankeinzug.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/dankort.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/danskenetbetaling.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/dibslogo.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/diners.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/edankort.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/ewire.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/forbrugforeningen.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/getitcard.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/ideal.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/jcb.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/jcbsecure.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/loading.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/maestro.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/mastercard.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/mastercardsecurecode.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/mobilcash.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/nordeasole.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/oko.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/pci.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/seb.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/shbdirektbetaling.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/swedbankdirektbetaling.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/valus.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/verifiedbyvisa.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/visa.gif ADDED
Binary file
skin/frontend/default/default/images/dibs/visaelectron.gif ADDED
Binary file