Version Notes
Minor bugfixes
Download this release
Release Info
Developer | Komfortkasse |
Extension | Ltc_Komfortkasse |
Version | 1.4.4.13 |
Comparing to | |
See all releases |
Code changes from version 1.4.4.12 to 1.4.4.13
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse.php +31 -31
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php +2 -2
- app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php +481 -480
- app/code/community/Ltc/Komfortkasse/Model/Encryptionoptions.php +19 -19
- app/code/community/Ltc/Komfortkasse/etc/config.xml +78 -78
- package.xml +5 -5
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse.php
CHANGED
@@ -8,7 +8,7 @@ require_once 'Komfortkasse_Order.php';
|
|
8 |
*/
|
9 |
class Komfortkasse
|
10 |
{
|
11 |
-
const PLUGIN_VER = '1.4.4.
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
@@ -392,7 +392,7 @@ class Komfortkasse
|
|
392 |
|
393 |
// See if order is relevant.
|
394 |
if (!self::isOpen($order)) {
|
395 |
-
return;
|
396 |
}
|
397 |
|
398 |
$queryRaw = http_build_query($order);
|
@@ -454,35 +454,35 @@ class Komfortkasse
|
|
454 |
*/
|
455 |
protected static function getNewStatus($status, $order)
|
456 |
{
|
457 |
-
$orderType = self::getOrderType($order);
|
458 |
-
|
459 |
-
switch ($orderType) {
|
460 |
-
case 'PREPAYMENT' :
|
461 |
-
switch ($status) {
|
462 |
-
case 'PAID' :
|
463 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid, $order);
|
464 |
-
case 'CANCELLED' :
|
465 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled, $order);
|
466 |
-
}
|
467 |
-
return null;
|
468 |
-
case 'INVOICE' :
|
469 |
-
switch ($status) {
|
470 |
-
case 'PAID' :
|
471 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_invoice, $order);
|
472 |
-
case 'CANCELLED' :
|
473 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_invoice, $order);
|
474 |
-
}
|
475 |
-
return null;
|
476 |
-
case 'COD' :
|
477 |
-
switch ($status) {
|
478 |
-
case 'PAID' :
|
479 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_cod, $order);
|
480 |
-
case 'CANCELLED' :
|
481 |
-
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_cod, $order);
|
482 |
-
}
|
483 |
-
return null;
|
484 |
-
}
|
485 |
-
|
486 |
}
|
487 |
|
488 |
// end getNewStatus()
|
8 |
*/
|
9 |
class Komfortkasse
|
10 |
{
|
11 |
+
const PLUGIN_VER = '1.4.4.13';
|
12 |
const MAXLEN_SSL = 117;
|
13 |
const LEN_MCRYPT = 16;
|
14 |
|
392 |
|
393 |
// See if order is relevant.
|
394 |
if (!self::isOpen($order)) {
|
395 |
+
return;
|
396 |
}
|
397 |
|
398 |
$queryRaw = http_build_query($order);
|
454 |
*/
|
455 |
protected static function getNewStatus($status, $order)
|
456 |
{
|
457 |
+
$orderType = self::getOrderType($order);
|
458 |
+
|
459 |
+
switch ($orderType) {
|
460 |
+
case 'PREPAYMENT' :
|
461 |
+
switch ($status) {
|
462 |
+
case 'PAID' :
|
463 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid, $order);
|
464 |
+
case 'CANCELLED' :
|
465 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled, $order);
|
466 |
+
}
|
467 |
+
return null;
|
468 |
+
case 'INVOICE' :
|
469 |
+
switch ($status) {
|
470 |
+
case 'PAID' :
|
471 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_invoice, $order);
|
472 |
+
case 'CANCELLED' :
|
473 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_invoice, $order);
|
474 |
+
}
|
475 |
+
return null;
|
476 |
+
case 'COD' :
|
477 |
+
switch ($status) {
|
478 |
+
case 'PAID' :
|
479 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_cod, $order);
|
480 |
+
case 'CANCELLED' :
|
481 |
+
return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_cod, $order);
|
482 |
+
}
|
483 |
+
return null;
|
484 |
+
}
|
485 |
+
|
486 |
}
|
487 |
|
488 |
// end getNewStatus()
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
-
* @version 1.4.4.
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
@@ -60,7 +60,7 @@ class Komfortkasse_Config
|
|
60 |
public static function getConfig($constantKey, $order=null)
|
61 |
{
|
62 |
$store_id = null;
|
63 |
-
if ($order != null) {
|
64 |
$store_id = $order['store_id'];
|
65 |
} else {
|
66 |
// export und update werden in den getId Methoden nochmals extra ber�cksichtigt.
|
3 |
/**
|
4 |
* Komfortkasse
|
5 |
* Config Class
|
6 |
+
* @version 1.4.4.13-Magento */
|
7 |
class Komfortkasse_Config
|
8 |
{
|
9 |
const activate_export = 'payment/komfortkasse/activate_export';
|
60 |
public static function getConfig($constantKey, $order=null)
|
61 |
{
|
62 |
$store_id = null;
|
63 |
+
if ($order != null && isset($order['store_id'])) {
|
64 |
$store_id = $order['store_id'];
|
65 |
} else {
|
66 |
// export und update werden in den getId Methoden nochmals extra ber�cksichtigt.
|
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php
CHANGED
@@ -1,481 +1,482 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
/**
|
5 |
-
* Komfortkasse Order Class
|
6 |
-
* in KK, an Order is an Array providing the following members:
|
7 |
-
* number, date, email, customer_number, payment_method, amount, currency_code, exchange_rate, language_code, invoice_number, store_id
|
8 |
-
* status: data type according to the shop system
|
9 |
-
* delivery_ and billing_: _firstname, _lastname, _company, _street, _postcode, _city, _countrycode
|
10 |
-
* products: an Array of item numbers
|
11 |
-
* @version 1.4.4.
|
12 |
-
*/
|
13 |
-
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
-
global $komfortkasse_order_extension;
|
15 |
-
$komfortkasse_order_extension = false;
|
16 |
-
if (file_exists("{$path}/Helper/Komfortkasse_Order_Extension.php") === true) {
|
17 |
-
$komfortkasse_order_extension = true;
|
18 |
-
include_once "{$path}/Helper/Komfortkasse_Order_Extension.php";
|
19 |
-
}
|
20 |
-
class Komfortkasse_Order
|
21 |
-
{
|
22 |
-
|
23 |
-
|
24 |
-
private static function createInClause($arr)
|
25 |
-
{
|
26 |
-
if (!is_array($arr)) {
|
27 |
-
$arr = explode(',', $arr);
|
28 |
-
}
|
29 |
-
$tmp = array ();
|
30 |
-
foreach ($arr as $item) {
|
31 |
-
$tmp [] = str_replace('\'', '', $item);
|
32 |
-
}
|
33 |
-
return '(\'' . implode('\', \'', $tmp) . '\')';
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Get open order IDs.
|
40 |
-
*
|
41 |
-
* @return string all order IDs that are "open" and relevant for transfer to kk
|
42 |
-
*/
|
43 |
-
public static function getOpenIDs()
|
44 |
-
{
|
45 |
-
$ret = array ();
|
46 |
-
|
47 |
-
$resource = Mage::getSingleton('core/resource');
|
48 |
-
$readConnection = $resource->getConnection('core_read');
|
49 |
-
$tableOrder = $resource->getTableName('sales/order');
|
50 |
-
$tablePayment = $resource->getTableName('sales/order_payment');
|
51 |
-
|
52 |
-
$minDate = date('Y-m-d', time() - 31536000); // 1 Jahr
|
53 |
-
|
54 |
-
foreach (Mage::app()->getWebsites() as $website) {
|
55 |
-
foreach ($website->getGroups() as $group) {
|
56 |
-
$stores = $group->getStores();
|
57 |
-
foreach ($stores as $store) {
|
58 |
-
$store_id = $store->getId();
|
59 |
-
$store_id_order = array ();
|
60 |
-
$store_id_order ['store_id'] = $store_id;
|
61 |
-
|
62 |
-
if (Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
63 |
-
|
64 |
-
$query = 'SELECT o.increment_id FROM ' . $tableOrder . ' o join ' . $tablePayment . ' p on p.parent_id = o.entity_id where o.store_id=' . $store_id . ' and created_at > ' . $minDate . ' and (';
|
65 |
-
$first = true;
|
66 |
-
|
67 |
-
// PREPAYMENT
|
68 |
-
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open, $store_id_order);
|
69 |
-
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order);
|
70 |
-
if ($openOrders && $paymentMethods) {
|
71 |
-
if (!$first)
|
72 |
-
$query .= ' or ';
|
73 |
-
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
74 |
-
$first = false;
|
75 |
-
}
|
76 |
-
|
77 |
-
// COD
|
78 |
-
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_cod, $store_id_order);
|
79 |
-
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod, $store_id_order);
|
80 |
-
if ($openOrders && $paymentMethods) {
|
81 |
-
if (!$first)
|
82 |
-
$query .= ' or ';
|
83 |
-
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
84 |
-
$first = false;
|
85 |
-
}
|
86 |
-
|
87 |
-
// INVOICE
|
88 |
-
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_invoice, $store_id_order);
|
89 |
-
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order);
|
90 |
-
if ($openOrders && $paymentMethods) {
|
91 |
-
if (!$first)
|
92 |
-
$query .= ' or ';
|
93 |
-
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
94 |
-
$first = false;
|
95 |
-
}
|
96 |
-
|
97 |
-
$query .= ')';
|
98 |
-
|
99 |
-
$results = $readConnection->fetchAll($query);
|
100 |
-
foreach ($results as $result) {
|
101 |
-
$ret [] = $result ['increment_id'];
|
102 |
-
}
|
103 |
-
}
|
104 |
-
}
|
105 |
-
}
|
106 |
-
}
|
107 |
-
|
108 |
-
return $ret;
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
// end getOpenIDs()
|
113 |
-
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Get refund IDS.
|
117 |
-
*
|
118 |
-
* @return string all refund IDs that are "open" and relevant for transfer to kk
|
119 |
-
*/
|
120 |
-
public static function getRefundIDs()
|
121 |
-
{
|
122 |
-
$ret = array ();
|
123 |
-
|
124 |
-
foreach (Mage::app()->getWebsites() as $website) {
|
125 |
-
foreach ($website->getGroups() as $group) {
|
126 |
-
$stores = $group->getStores();
|
127 |
-
foreach ($stores as $store) {
|
128 |
-
|
129 |
-
$store_id = $store->getId();
|
130 |
-
$store_id_order = array ();
|
131 |
-
$store_id_order ['store_id'] = $store_id;
|
132 |
-
|
133 |
-
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
134 |
-
continue;
|
135 |
-
}
|
136 |
-
|
137 |
-
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order));
|
138 |
-
$paymentMethodsInvoice = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order));
|
139 |
-
|
140 |
-
$cmModel = Mage::getModel("sales/order_creditmemo");
|
141 |
-
$cmCollection = $cmModel->getCollection()->addFieldToFilter('store_id', $store_id);
|
142 |
-
|
143 |
-
foreach ($cmCollection as $creditMemo) {
|
144 |
-
if ($creditMemo->getTransactionId() == null) {
|
145 |
-
$order = $creditMemo->getOrder();
|
146 |
-
try {
|
147 |
-
$method = $order->getPayment()->getMethodInstance()->getCode();
|
148 |
-
} catch ( Exception $e ) {
|
149 |
-
// payment method has been deleted
|
150 |
-
$method = null;
|
151 |
-
}
|
152 |
-
if ($method && (in_array($method, $paymentMethods, true) === true || in_array($method, $paymentMethodsInvoice, true) === true)) {
|
153 |
-
$cmId = $creditMemo->getIncrementId();
|
154 |
-
$ret [] = $cmId;
|
155 |
-
}
|
156 |
-
}
|
157 |
-
}
|
158 |
-
}
|
159 |
-
}
|
160 |
-
}
|
161 |
-
|
162 |
-
return $ret;
|
163 |
-
|
164 |
-
}
|
165 |
-
|
166 |
-
// end getRefundIDs()
|
167 |
-
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Get order.
|
171 |
-
*
|
172 |
-
* @param string $number order number
|
173 |
-
*
|
174 |
-
* @return array order
|
175 |
-
*/
|
176 |
-
public static function getOrder($number)
|
177 |
-
{
|
178 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($number);
|
179 |
-
if (empty($number) === true || empty($order) === true || $number != $order->getIncrementId()) {
|
180 |
-
return null;
|
181 |
-
}
|
182 |
-
|
183 |
-
$conf_general = Mage::getStoreConfig('general', $order->getStoreId());
|
184 |
-
|
185 |
-
$ret = array ();
|
186 |
-
$ret ['
|
187 |
-
$ret ['
|
188 |
-
$ret ['
|
189 |
-
$ret ['
|
190 |
-
$ret ['
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
$ret ['
|
197 |
-
$ret ['
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
$
|
202 |
-
$
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
$
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
$ret ['
|
230 |
-
$ret ['
|
231 |
-
$ret ['
|
232 |
-
$ret ['
|
233 |
-
$ret ['
|
234 |
-
$ret ['
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
$ret ['
|
241 |
-
$ret ['
|
242 |
-
$ret ['
|
243 |
-
$ret ['
|
244 |
-
$ret ['
|
245 |
-
$ret ['
|
246 |
-
$ret ['
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
*
|
277 |
-
*
|
278 |
-
*
|
279 |
-
*
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
$
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
$ret
|
293 |
-
|
294 |
-
|
295 |
-
$ret ['
|
296 |
-
$ret ['
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
*
|
308 |
-
*
|
309 |
-
* @param
|
310 |
-
* @param string $
|
311 |
-
*
|
312 |
-
*
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
Mage::
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
$stateCollection
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
$invoice->
|
340 |
-
|
341 |
-
$invoice->addComment
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
$payment
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
$order
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
$order->
|
361 |
-
$order->
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
$order->
|
371 |
-
|
372 |
-
|
373 |
-
$order->
|
374 |
-
$order->
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
$order->
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
*
|
395 |
-
*
|
396 |
-
* @param string $
|
397 |
-
* @param string $
|
398 |
-
*
|
399 |
-
*
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
$
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
$
|
410 |
-
$store_id_order
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
*
|
432 |
-
*
|
433 |
-
*
|
434 |
-
*
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
$
|
462 |
-
)
|
463 |
-
|
464 |
-
|
465 |
-
$
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
)
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
|
|
481 |
}//end class
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Komfortkasse Order Class
|
6 |
+
* in KK, an Order is an Array providing the following members:
|
7 |
+
* number, date, email, customer_number, payment_method, amount, currency_code, exchange_rate, language_code, invoice_number, store_id
|
8 |
+
* status: data type according to the shop system
|
9 |
+
* delivery_ and billing_: _firstname, _lastname, _company, _street, _postcode, _city, _countrycode
|
10 |
+
* products: an Array of item numbers
|
11 |
+
* @version 1.4.4.13-Magento1
|
12 |
+
*/
|
13 |
+
$path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
|
14 |
+
global $komfortkasse_order_extension;
|
15 |
+
$komfortkasse_order_extension = false;
|
16 |
+
if (file_exists("{$path}/Helper/Komfortkasse_Order_Extension.php") === true) {
|
17 |
+
$komfortkasse_order_extension = true;
|
18 |
+
include_once "{$path}/Helper/Komfortkasse_Order_Extension.php";
|
19 |
+
}
|
20 |
+
class Komfortkasse_Order
|
21 |
+
{
|
22 |
+
|
23 |
+
|
24 |
+
private static function createInClause($arr)
|
25 |
+
{
|
26 |
+
if (!is_array($arr)) {
|
27 |
+
$arr = explode(',', $arr);
|
28 |
+
}
|
29 |
+
$tmp = array ();
|
30 |
+
foreach ($arr as $item) {
|
31 |
+
$tmp [] = str_replace('\'', '', $item);
|
32 |
+
}
|
33 |
+
return '(\'' . implode('\', \'', $tmp) . '\')';
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get open order IDs.
|
40 |
+
*
|
41 |
+
* @return string all order IDs that are "open" and relevant for transfer to kk
|
42 |
+
*/
|
43 |
+
public static function getOpenIDs()
|
44 |
+
{
|
45 |
+
$ret = array ();
|
46 |
+
|
47 |
+
$resource = Mage::getSingleton('core/resource');
|
48 |
+
$readConnection = $resource->getConnection('core_read');
|
49 |
+
$tableOrder = $resource->getTableName('sales/order');
|
50 |
+
$tablePayment = $resource->getTableName('sales/order_payment');
|
51 |
+
|
52 |
+
$minDate = date('Y-m-d', time() - 31536000); // 1 Jahr
|
53 |
+
|
54 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
55 |
+
foreach ($website->getGroups() as $group) {
|
56 |
+
$stores = $group->getStores();
|
57 |
+
foreach ($stores as $store) {
|
58 |
+
$store_id = $store->getId();
|
59 |
+
$store_id_order = array ();
|
60 |
+
$store_id_order ['store_id'] = $store_id;
|
61 |
+
|
62 |
+
if (Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
63 |
+
|
64 |
+
$query = 'SELECT o.increment_id FROM ' . $tableOrder . ' o join ' . $tablePayment . ' p on p.parent_id = o.entity_id where o.store_id=' . $store_id . ' and created_at > ' . $minDate . ' and (';
|
65 |
+
$first = true;
|
66 |
+
|
67 |
+
// PREPAYMENT
|
68 |
+
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open, $store_id_order);
|
69 |
+
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order);
|
70 |
+
if ($openOrders && $paymentMethods) {
|
71 |
+
if (!$first)
|
72 |
+
$query .= ' or ';
|
73 |
+
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
74 |
+
$first = false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// COD
|
78 |
+
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_cod, $store_id_order);
|
79 |
+
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod, $store_id_order);
|
80 |
+
if ($openOrders && $paymentMethods) {
|
81 |
+
if (!$first)
|
82 |
+
$query .= ' or ';
|
83 |
+
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
84 |
+
$first = false;
|
85 |
+
}
|
86 |
+
|
87 |
+
// INVOICE
|
88 |
+
$openOrders = Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_invoice, $store_id_order);
|
89 |
+
$paymentMethods = Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order);
|
90 |
+
if ($openOrders && $paymentMethods) {
|
91 |
+
if (!$first)
|
92 |
+
$query .= ' or ';
|
93 |
+
$query .= '(o.status in ' . self::createInClause($openOrders) . ' and p.method in ' . self::createInClause($paymentMethods) . ')';
|
94 |
+
$first = false;
|
95 |
+
}
|
96 |
+
|
97 |
+
$query .= ')';
|
98 |
+
|
99 |
+
$results = $readConnection->fetchAll($query);
|
100 |
+
foreach ($results as $result) {
|
101 |
+
$ret [] = $result ['increment_id'];
|
102 |
+
}
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
return $ret;
|
109 |
+
|
110 |
+
}
|
111 |
+
|
112 |
+
// end getOpenIDs()
|
113 |
+
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get refund IDS.
|
117 |
+
*
|
118 |
+
* @return string all refund IDs that are "open" and relevant for transfer to kk
|
119 |
+
*/
|
120 |
+
public static function getRefundIDs()
|
121 |
+
{
|
122 |
+
$ret = array ();
|
123 |
+
|
124 |
+
foreach (Mage::app()->getWebsites() as $website) {
|
125 |
+
foreach ($website->getGroups() as $group) {
|
126 |
+
$stores = $group->getStores();
|
127 |
+
foreach ($stores as $store) {
|
128 |
+
|
129 |
+
$store_id = $store->getId();
|
130 |
+
$store_id_order = array ();
|
131 |
+
$store_id_order ['store_id'] = $store_id;
|
132 |
+
|
133 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export, $store_id_order)) {
|
134 |
+
continue;
|
135 |
+
}
|
136 |
+
|
137 |
+
$paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods, $store_id_order));
|
138 |
+
$paymentMethodsInvoice = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice, $store_id_order));
|
139 |
+
|
140 |
+
$cmModel = Mage::getModel("sales/order_creditmemo");
|
141 |
+
$cmCollection = $cmModel->getCollection()->addFieldToFilter('store_id', $store_id);
|
142 |
+
|
143 |
+
foreach ($cmCollection as $creditMemo) {
|
144 |
+
if ($creditMemo->getTransactionId() == null) {
|
145 |
+
$order = $creditMemo->getOrder();
|
146 |
+
try {
|
147 |
+
$method = $order->getPayment()->getMethodInstance()->getCode();
|
148 |
+
} catch ( Exception $e ) {
|
149 |
+
// payment method has been deleted
|
150 |
+
$method = null;
|
151 |
+
}
|
152 |
+
if ($method && (in_array($method, $paymentMethods, true) === true || in_array($method, $paymentMethodsInvoice, true) === true)) {
|
153 |
+
$cmId = $creditMemo->getIncrementId();
|
154 |
+
$ret [] = $cmId;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
}
|
161 |
+
|
162 |
+
return $ret;
|
163 |
+
|
164 |
+
}
|
165 |
+
|
166 |
+
// end getRefundIDs()
|
167 |
+
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Get order.
|
171 |
+
*
|
172 |
+
* @param string $number order number
|
173 |
+
*
|
174 |
+
* @return array order
|
175 |
+
*/
|
176 |
+
public static function getOrder($number)
|
177 |
+
{
|
178 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($number);
|
179 |
+
if (empty($number) === true || empty($order) === true || $number != $order->getIncrementId()) {
|
180 |
+
return null;
|
181 |
+
}
|
182 |
+
|
183 |
+
$conf_general = Mage::getStoreConfig('general', $order->getStoreId());
|
184 |
+
|
185 |
+
$ret = array ();
|
186 |
+
$ret ['invoice_date'] = null;
|
187 |
+
$ret ['number'] = $order->getIncrementId();
|
188 |
+
$ret ['status'] = $order->getStatus();
|
189 |
+
$ret ['date'] = date('d.m.Y', strtotime($order->getCreatedAtStoreDate()->get(Zend_Date::DATE_MEDIUM)));
|
190 |
+
$ret ['email'] = $order->getCustomerEmail();
|
191 |
+
$ret ['customer_number'] = $order->getCustomerId();
|
192 |
+
try {
|
193 |
+
$ret ['payment_method'] = $order->getPayment()->getMethodInstance()->getCode();
|
194 |
+
} catch ( Exception $e ) {
|
195 |
+
}
|
196 |
+
$ret ['amount'] = $order->getGrandTotal();
|
197 |
+
$ret ['currency_code'] = $order->getOrderCurrencyCode();
|
198 |
+
$ret ['exchange_rate'] = $order->getBaseToOrderRate();
|
199 |
+
|
200 |
+
// Rechnungsnummer und -datum, evtl. Rechnungsbetrag
|
201 |
+
$useInvoiceAmount = Komfortkasse::getOrderType($ret) == 'INVOICE' && Komfortkasse_Config::getConfig(Komfortkasse_Config::use_invoice_total);
|
202 |
+
$considerCreditnotes = $useInvoiceAmount && Komfortkasse_Config::getConfig(Komfortkasse_Config::consider_creditnotes);
|
203 |
+
$invoiceColl = $order->getInvoiceCollection();
|
204 |
+
if ($invoiceColl->getSize() > 0) {
|
205 |
+
$amount = 0.0;
|
206 |
+
foreach ($order->getInvoiceCollection() as $invoice) {
|
207 |
+
if (!$invoice->isCanceled()) {
|
208 |
+
$ret ['invoice_number'] [] = $invoice->getIncrementId();
|
209 |
+
$invoiceDate = date('d.m.Y', strtotime($invoice->getCreatedAt()));
|
210 |
+
if ($ret ['invoice_date'] == null || strtotime($ret ['invoice_date']) < strtotime($invoiceDate)) {
|
211 |
+
$ret ['invoice_date'] = $invoiceDate;
|
212 |
+
}
|
213 |
+
if ($useInvoiceAmount)
|
214 |
+
$amount = $amount + $invoice->getGrandTotal();
|
215 |
+
}
|
216 |
+
}
|
217 |
+
if ($considerCreditnotes) {
|
218 |
+
$creditColl = $order->getCreditmemosCollection();
|
219 |
+
foreach ($creditColl as $credit) {
|
220 |
+
$amount = $amount - $credit->getGrandTotal();
|
221 |
+
}
|
222 |
+
}
|
223 |
+
if ($useInvoiceAmount && $amount > 0)
|
224 |
+
$ret ['amount'] = $amount;
|
225 |
+
}
|
226 |
+
|
227 |
+
$shippingAddress = $order->getShippingAddress();
|
228 |
+
if ($shippingAddress) {
|
229 |
+
$ret ['delivery_firstname'] = utf8_encode($shippingAddress->getFirstname());
|
230 |
+
$ret ['delivery_lastname'] = utf8_encode($shippingAddress->getLastname());
|
231 |
+
$ret ['delivery_company'] = utf8_encode($shippingAddress->getCompany());
|
232 |
+
$ret ['delivery_street'] = utf8_encode($shippingAddress->getStreetFull());
|
233 |
+
$ret ['delivery_postcode'] = utf8_encode($shippingAddress->getPostcode());
|
234 |
+
$ret ['delivery_city'] = utf8_encode($shippingAddress->getCity());
|
235 |
+
$ret ['delivery_countrycode'] = utf8_encode($shippingAddress->getCountryId());
|
236 |
+
}
|
237 |
+
|
238 |
+
$billingAddress = $order->getBillingAddress();
|
239 |
+
if ($billingAddress) {
|
240 |
+
$ret ['language_code'] = substr($conf_general ['locale'] ['code'], 0, 2) . '-' . $billingAddress->getCountryId();
|
241 |
+
$ret ['billing_firstname'] = utf8_encode($billingAddress->getFirstname());
|
242 |
+
$ret ['billing_lastname'] = utf8_encode($billingAddress->getLastname());
|
243 |
+
$ret ['billing_company'] = utf8_encode($billingAddress->getCompany());
|
244 |
+
$ret ['billing_street'] = utf8_encode($billingAddress->getStreetFull());
|
245 |
+
$ret ['billing_postcode'] = utf8_encode($billingAddress->getPostcode());
|
246 |
+
$ret ['billing_city'] = utf8_encode($billingAddress->getCity());
|
247 |
+
$ret ['billing_countrycode'] = utf8_encode($billingAddress->getCountryId());
|
248 |
+
} else {
|
249 |
+
$ret ['language_code'] = substr($conf_general ['locale'] ['code'], 0, 2);
|
250 |
+
}
|
251 |
+
|
252 |
+
foreach ($order->getAllItems() as $itemId => $item) {
|
253 |
+
$sku = $item->getSku();
|
254 |
+
if ($sku) {
|
255 |
+
$ret ['products'] [] = $sku;
|
256 |
+
} else {
|
257 |
+
$ret ['products'] [] = $item->getName();
|
258 |
+
}
|
259 |
+
}
|
260 |
+
|
261 |
+
$ret ['store_id'] = $order->getStoreId();
|
262 |
+
|
263 |
+
global $komfortkasse_order_extension;
|
264 |
+
if ($komfortkasse_order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOrder') === true) {
|
265 |
+
$ret = Komfortkasse_Order_Extension::extendOrder($order, $ret);
|
266 |
+
}
|
267 |
+
|
268 |
+
return $ret;
|
269 |
+
|
270 |
+
}
|
271 |
+
|
272 |
+
// end getOrder()
|
273 |
+
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Get refund.
|
277 |
+
*
|
278 |
+
* @param string $number refund number
|
279 |
+
*
|
280 |
+
* @return array refund
|
281 |
+
*/
|
282 |
+
public static function getRefund($number)
|
283 |
+
{
|
284 |
+
$resource = Mage::getSingleton('core/resource');
|
285 |
+
$id = $resource->getConnection('core_read')->fetchOne('SELECT `entity_id` FROM `' . $resource->getTableName('sales/creditmemo') . "` WHERE `increment_id` = '" . $number . "'");
|
286 |
+
|
287 |
+
$creditMemo = Mage::getModel('sales/order_creditmemo')->load($id);
|
288 |
+
if (empty($number) === true || empty($creditMemo) === true || $number != $creditMemo->getIncrementId()) {
|
289 |
+
return null;
|
290 |
+
}
|
291 |
+
|
292 |
+
$ret = array ();
|
293 |
+
$ret ['number'] = $creditMemo->getOrder()->getIncrementId();
|
294 |
+
// Number of the Creditmemo.
|
295 |
+
$ret ['customer_number'] = $creditMemo->getIncrementId();
|
296 |
+
$ret ['date'] = date('d.m.Y', strtotime($creditMemo->getCreatedAt()));
|
297 |
+
$ret ['amount'] = $creditMemo->getGrandTotal();
|
298 |
+
|
299 |
+
return $ret;
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
+
// end getRefund()
|
304 |
+
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Update order.
|
308 |
+
*
|
309 |
+
* @param array $order order
|
310 |
+
* @param string $status status
|
311 |
+
* @param string $callbackid callback ID
|
312 |
+
*
|
313 |
+
* @return void
|
314 |
+
*/
|
315 |
+
public static function updateOrder($order, $status, $callbackid)
|
316 |
+
{
|
317 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_update, $order)) {
|
318 |
+
return;
|
319 |
+
}
|
320 |
+
|
321 |
+
// Hint: PAID and CANCELLED are supported as of now.
|
322 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($order ['number']);
|
323 |
+
|
324 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' START', null, 'komfortkasse.log');
|
325 |
+
Mage::dispatchEvent('komfortkasse_change_order_status_before', array ('order' => $order,'status' => $status,'callbackid' => $callbackid
|
326 |
+
));
|
327 |
+
|
328 |
+
$stateCollection = Mage::getModel('sales/order_status')->getCollection()->joinStates();
|
329 |
+
$stateCollection->addFieldToFilter('main_table.status', array ('like' => $status
|
330 |
+
));
|
331 |
+
$state = $stateCollection->getFirstItem()->getState();
|
332 |
+
|
333 |
+
if ($state == 'processing' || $state == 'closed' || $state == 'complete') {
|
334 |
+
|
335 |
+
// If there is already an invoice, update the invoice, not the order.
|
336 |
+
$invoiceColl = $order->getInvoiceCollection();
|
337 |
+
if ($invoiceColl->getSize() > 0) {
|
338 |
+
foreach ($order->getInvoiceCollection() as $invoice) {
|
339 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' invoice ' . $invoice->getIncrementId() . ' pay', null, 'komfortkasse.log');
|
340 |
+
$invoice->pay();
|
341 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' invoice ' . $invoice->getIncrementId() . ' addComment ' . $callbackid, null, 'komfortkasse.log');
|
342 |
+
$invoice->addComment($callbackid, false, false);
|
343 |
+
self::mysave($invoice);
|
344 |
+
}
|
345 |
+
} else {
|
346 |
+
$payment = $order->getPayment();
|
347 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' payment capture', null, 'komfortkasse.log');
|
348 |
+
$payment->capture(null);
|
349 |
+
|
350 |
+
if ($callbackid) {
|
351 |
+
$payment->setTransactionId($callbackid);
|
352 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' addTransaction', null, 'komfortkasse.log');
|
353 |
+
$transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
|
354 |
+
}
|
355 |
+
}
|
356 |
+
$order->save();
|
357 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($order->getIncrementId());
|
358 |
+
|
359 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' add status history ' . $status . ' / ' . $callbackid, null, 'komfortkasse.log');
|
360 |
+
$history = $order->addStatusHistoryComment('' . $callbackid, $status);
|
361 |
+
$order->setStatus($status);
|
362 |
+
$order->save();
|
363 |
+
} else if ($state == 'canceled') {
|
364 |
+
|
365 |
+
if ($callbackid) {
|
366 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' add status history ' . $status . ' / ' . $callbackid, null, 'komfortkasse.log');
|
367 |
+
$history = $order->addStatusHistoryComment('' . $callbackid, $status);
|
368 |
+
}
|
369 |
+
if ($order->canCancel()) {
|
370 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' cancel', null, 'komfortkasse.log');
|
371 |
+
$order->cancel();
|
372 |
+
}
|
373 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' set status ' . $status, null, 'komfortkasse.log');
|
374 |
+
$order->setStatus($status);
|
375 |
+
$order->save();
|
376 |
+
} else {
|
377 |
+
|
378 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' add status history ' . $status . ' / ' . $callbackid, null, 'komfortkasse.log');
|
379 |
+
$history = $order->addStatusHistoryComment('' . $callbackid, $status);
|
380 |
+
$order->save();
|
381 |
+
}
|
382 |
+
|
383 |
+
Mage::dispatchEvent('komfortkasse_change_order_status_after', array ('order' => $order,'status' => $status,'callbackid' => $callbackid
|
384 |
+
));
|
385 |
+
|
386 |
+
Mage::log('Komfortkasse: update order ' . $order->getIncrementId() . ' END. Status: ' . $order->getStatus, null, 'komfortkasse.log');
|
387 |
+
|
388 |
+
}
|
389 |
+
|
390 |
+
// end updateOrder()
|
391 |
+
|
392 |
+
|
393 |
+
/**
|
394 |
+
* Update order.
|
395 |
+
*
|
396 |
+
* @param string $refundIncrementId Increment ID of refund
|
397 |
+
* @param string $status status
|
398 |
+
* @param string $callbackid callback ID
|
399 |
+
*
|
400 |
+
* @return void
|
401 |
+
*/
|
402 |
+
public static function updateRefund($refundIncrementId, $status, $callbackid)
|
403 |
+
{
|
404 |
+
$resource = Mage::getSingleton('core/resource');
|
405 |
+
$id = $resource->getConnection('core_read')->fetchOne('SELECT `entity_id` FROM `' . $resource->getTableName('sales/creditmemo') . "` WHERE `increment_id` = '" . $refundIncrementId . "'");
|
406 |
+
|
407 |
+
$creditMemo = Mage::getModel('sales/order_creditmemo')->load($id);
|
408 |
+
|
409 |
+
$store_id = $creditMemo->getStoreId();
|
410 |
+
$store_id_order = array ();
|
411 |
+
$store_id_order ['store_id'] = $store_id;
|
412 |
+
|
413 |
+
if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_update, $store_id_order)) {
|
414 |
+
return;
|
415 |
+
}
|
416 |
+
|
417 |
+
if ($creditMemo->getTransactionId() == null) {
|
418 |
+
$creditMemo->setTransactionId($callbackid);
|
419 |
+
}
|
420 |
+
|
421 |
+
$history = $creditMemo->addComment($status . ' [' . $callbackid . ']', false, false);
|
422 |
+
|
423 |
+
$creditMemo->save();
|
424 |
+
|
425 |
+
}
|
426 |
+
|
427 |
+
// end updateRefund()
|
428 |
+
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Call an object's save method
|
432 |
+
*
|
433 |
+
* @param unknown $object
|
434 |
+
*
|
435 |
+
* @return void
|
436 |
+
*/
|
437 |
+
private static function mysave($object)
|
438 |
+
{
|
439 |
+
$object->save();
|
440 |
+
|
441 |
+
}
|
442 |
+
|
443 |
+
|
444 |
+
public static function getInvoicePdfPrepare()
|
445 |
+
{
|
446 |
+
|
447 |
+
}
|
448 |
+
|
449 |
+
|
450 |
+
public static function getInvoicePdf($invoiceNumber)
|
451 |
+
{
|
452 |
+
if ($invoiceNumber && $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceNumber)) {
|
453 |
+
$fileName = $invoiceNumber . '.pdf';
|
454 |
+
|
455 |
+
$pdfGenerated = false;
|
456 |
+
|
457 |
+
// try easy pdf (www.easypdfinvoice.com)
|
458 |
+
if (!$pdfGenerated) {
|
459 |
+
$pdfProModel = Mage::getModel('pdfpro/order_invoice');
|
460 |
+
if ($pdfProModel !== false) {
|
461 |
+
$invoiceData = $pdfProModel->initInvoiceData($invoice);
|
462 |
+
$result = Mage::helper('pdfpro')->initPdf(array ($invoiceData
|
463 |
+
));
|
464 |
+
if ($result ['success']) {
|
465 |
+
$content = $result ['content'];
|
466 |
+
$pdfGenerated = true;
|
467 |
+
}
|
468 |
+
}
|
469 |
+
}
|
470 |
+
|
471 |
+
// try Magento Standard
|
472 |
+
if (!$pdfGenerated) {
|
473 |
+
$pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array ($invoice
|
474 |
+
));
|
475 |
+
$content = $pdf->render();
|
476 |
+
}
|
477 |
+
|
478 |
+
return $content;
|
479 |
+
}
|
480 |
+
|
481 |
+
}
|
482 |
}//end class
|
app/code/community/Ltc/Komfortkasse/Model/Encryptionoptions.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
<?php
|
2 |
-
class Ltc_Komfortkasse_Model_Encryptionoptions
|
3 |
-
{
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Options getter
|
7 |
-
*
|
8 |
-
* @return array
|
9 |
-
*/
|
10 |
-
public function toOptionArray()
|
11 |
-
{
|
12 |
-
return array(
|
13 |
-
array('value' => "openssl", 'label'=>Mage::helper('adminhtml')->__('OpenSSL Encryption (asynchronous)')),
|
14 |
-
array('value' => "mcrypt", 'label'=>Mage::helper('adminhtml')->__('MCrypt Encryption (synchronous)')),
|
15 |
-
array('value' => "base64", 'label'=>Mage::helper('adminhtml')->__('Base64 Encoding')),
|
16 |
-
);
|
17 |
-
}
|
18 |
-
|
19 |
-
}
|
1 |
+
<?php
|
2 |
+
class Ltc_Komfortkasse_Model_Encryptionoptions
|
3 |
+
{
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Options getter
|
7 |
+
*
|
8 |
+
* @return array
|
9 |
+
*/
|
10 |
+
public function toOptionArray()
|
11 |
+
{
|
12 |
+
return array(
|
13 |
+
array('value' => "openssl", 'label'=>Mage::helper('adminhtml')->__('OpenSSL Encryption (asynchronous)')),
|
14 |
+
array('value' => "mcrypt", 'label'=>Mage::helper('adminhtml')->__('MCrypt Encryption (synchronous)')),
|
15 |
+
array('value' => "base64", 'label'=>Mage::helper('adminhtml')->__('Base64 Encoding')),
|
16 |
+
);
|
17 |
+
}
|
18 |
+
|
19 |
+
}
|
app/code/community/Ltc/Komfortkasse/etc/config.xml
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<!-- Komfortkasse Magento Plugin - config.xml -->
|
3 |
-
<config>
|
4 |
-
<modules>
|
5 |
-
<Ltc_Komfortkasse>
|
6 |
-
<version>1.4.4.
|
7 |
-
</Ltc_Komfortkasse>
|
8 |
-
</modules>
|
9 |
-
<global>
|
10 |
-
<helpers>
|
11 |
-
<Ltc_Komfortkasse>
|
12 |
-
<class>Ltc_Komfortkasse_Helper</class>
|
13 |
-
</Ltc_Komfortkasse>
|
14 |
-
</helpers>
|
15 |
-
<models>
|
16 |
-
<Ltc_Komfortkasse>
|
17 |
-
<class>Ltc_Komfortkasse_Model</class>
|
18 |
-
</Ltc_Komfortkasse>
|
19 |
-
</models>
|
20 |
-
<events>
|
21 |
-
<sales_order_place_after>
|
22 |
-
<observers>
|
23 |
-
<Ltc_Komfortkasse>
|
24 |
-
<class>Ltc_Komfortkasse/observer</class>
|
25 |
-
<method>noteNewOrder</method>
|
26 |
-
</Ltc_Komfortkasse>
|
27 |
-
</observers>
|
28 |
-
</sales_order_place_after>
|
29 |
-
<sales_order_load_after>
|
30 |
-
<observers>
|
31 |
-
<Ltc_Komfortkasse>
|
32 |
-
<class>Ltc_Komfortkasse/observer</class>
|
33 |
-
<method>noteOrderStatus</method>
|
34 |
-
</Ltc_Komfortkasse>
|
35 |
-
</observers>
|
36 |
-
</sales_order_load_after>
|
37 |
-
<sales_order_save_after>
|
38 |
-
<observers>
|
39 |
-
<Ltc_Komfortkasse>
|
40 |
-
<class>Ltc_Komfortkasse/observer</class>
|
41 |
-
<method>checkOrderStatus</method>
|
42 |
-
</Ltc_Komfortkasse>
|
43 |
-
</observers>
|
44 |
-
</sales_order_save_after>
|
45 |
-
<komfortkasse_change_order_status_before>
|
46 |
-
</komfortkasse_change_order_status_before>
|
47 |
-
<komfortkasse_change_order_status_after>
|
48 |
-
</komfortkasse_change_order_status_after>
|
49 |
-
</events>
|
50 |
-
</global>
|
51 |
-
<default>
|
52 |
-
<payment>
|
53 |
-
<komfortkasse>
|
54 |
-
<activate_export>1</activate_export>
|
55 |
-
<activate_update>1</activate_update>
|
56 |
-
<payment_methods>banktransfer</payment_methods>
|
57 |
-
<status_open>pending</status_open>
|
58 |
-
<status_paid>processing</status_paid>
|
59 |
-
<status_cancelled>canceled</status_cancelled>
|
60 |
-
<status_open_invoice>complete</status_open_invoice>
|
61 |
-
<use_invoice_total>0</use_invoice_total>
|
62 |
-
<consider_creditnotes>0</consider_creditnotes>
|
63 |
-
<status_open_cod>processing</status_open_cod>
|
64 |
-
</komfortkasse>
|
65 |
-
</payment>
|
66 |
-
</default>
|
67 |
-
<frontend>
|
68 |
-
<routers>
|
69 |
-
<Ltc_Komfortkasse>
|
70 |
-
<use>standard</use>
|
71 |
-
<args>
|
72 |
-
<module>Ltc_Komfortkasse</module>
|
73 |
-
<frontName>komfortkasse</frontName>
|
74 |
-
</args>
|
75 |
-
</Ltc_Komfortkasse>
|
76 |
-
</routers>
|
77 |
-
</frontend>
|
78 |
-
</config>
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!-- Komfortkasse Magento Plugin - config.xml -->
|
3 |
+
<config>
|
4 |
+
<modules>
|
5 |
+
<Ltc_Komfortkasse>
|
6 |
+
<version>1.4.4.13</version>
|
7 |
+
</Ltc_Komfortkasse>
|
8 |
+
</modules>
|
9 |
+
<global>
|
10 |
+
<helpers>
|
11 |
+
<Ltc_Komfortkasse>
|
12 |
+
<class>Ltc_Komfortkasse_Helper</class>
|
13 |
+
</Ltc_Komfortkasse>
|
14 |
+
</helpers>
|
15 |
+
<models>
|
16 |
+
<Ltc_Komfortkasse>
|
17 |
+
<class>Ltc_Komfortkasse_Model</class>
|
18 |
+
</Ltc_Komfortkasse>
|
19 |
+
</models>
|
20 |
+
<events>
|
21 |
+
<sales_order_place_after>
|
22 |
+
<observers>
|
23 |
+
<Ltc_Komfortkasse>
|
24 |
+
<class>Ltc_Komfortkasse/observer</class>
|
25 |
+
<method>noteNewOrder</method>
|
26 |
+
</Ltc_Komfortkasse>
|
27 |
+
</observers>
|
28 |
+
</sales_order_place_after>
|
29 |
+
<sales_order_load_after>
|
30 |
+
<observers>
|
31 |
+
<Ltc_Komfortkasse>
|
32 |
+
<class>Ltc_Komfortkasse/observer</class>
|
33 |
+
<method>noteOrderStatus</method>
|
34 |
+
</Ltc_Komfortkasse>
|
35 |
+
</observers>
|
36 |
+
</sales_order_load_after>
|
37 |
+
<sales_order_save_after>
|
38 |
+
<observers>
|
39 |
+
<Ltc_Komfortkasse>
|
40 |
+
<class>Ltc_Komfortkasse/observer</class>
|
41 |
+
<method>checkOrderStatus</method>
|
42 |
+
</Ltc_Komfortkasse>
|
43 |
+
</observers>
|
44 |
+
</sales_order_save_after>
|
45 |
+
<komfortkasse_change_order_status_before>
|
46 |
+
</komfortkasse_change_order_status_before>
|
47 |
+
<komfortkasse_change_order_status_after>
|
48 |
+
</komfortkasse_change_order_status_after>
|
49 |
+
</events>
|
50 |
+
</global>
|
51 |
+
<default>
|
52 |
+
<payment>
|
53 |
+
<komfortkasse>
|
54 |
+
<activate_export>1</activate_export>
|
55 |
+
<activate_update>1</activate_update>
|
56 |
+
<payment_methods>banktransfer</payment_methods>
|
57 |
+
<status_open>pending</status_open>
|
58 |
+
<status_paid>processing</status_paid>
|
59 |
+
<status_cancelled>canceled</status_cancelled>
|
60 |
+
<status_open_invoice>complete</status_open_invoice>
|
61 |
+
<use_invoice_total>0</use_invoice_total>
|
62 |
+
<consider_creditnotes>0</consider_creditnotes>
|
63 |
+
<status_open_cod>processing</status_open_cod>
|
64 |
+
</komfortkasse>
|
65 |
+
</payment>
|
66 |
+
</default>
|
67 |
+
<frontend>
|
68 |
+
<routers>
|
69 |
+
<Ltc_Komfortkasse>
|
70 |
+
<use>standard</use>
|
71 |
+
<args>
|
72 |
+
<module>Ltc_Komfortkasse</module>
|
73 |
+
<frontName>komfortkasse</frontName>
|
74 |
+
</args>
|
75 |
+
</Ltc_Komfortkasse>
|
76 |
+
</routers>
|
77 |
+
</frontend>
|
78 |
+
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ltc_Komfortkasse</name>
|
4 |
-
<version>1.4.4.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</license>
|
7 |
<channel>community</channel>
|
@@ -13,11 +13,11 @@ Zusätzlich können automatische Zahlungserinnerungen versendet werden u
|
|
13 |

|
14 |
Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verfügbar).
|
15 |
</description>
|
16 |
-
<notes>
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
-
<date>2016-
|
19 |
-
<time>
|
20 |
-
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="42f1d168bb70725128e15daf305802ba"/><file name="Komfortkasse.php" hash="
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ltc_Komfortkasse</name>
|
4 |
+
<version>1.4.4.13</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</license>
|
7 |
<channel>community</channel>
|
13 |

|
14 |
Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verfügbar).
|
15 |
</description>
|
16 |
+
<notes>Minor bugfixes</notes>
|
17 |
<authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
|
18 |
+
<date>2016-04-04</date>
|
19 |
+
<time>14:47:26</time>
|
20 |
+
<contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="42f1d168bb70725128e15daf305802ba"/><file name="Komfortkasse.php" hash="1b011d334b11b729118ec37dbc277ad9"/><file name="Komfortkasse_Config.php" hash="6b857a6bc172c30a01c9b2af2ba44fb5"/><file name="Komfortkasse_Order.php" hash="f8ac8cd3c2659475622f4246e70bcac1"/></dir><dir name="Model"><file name="Encryptionoptions.php" hash="1fbe2ffc43cc3c1489688d20f4c8af11"/><file name="Observer.php" hash="5b616b6d3651df44f8297c732dc478bb"/></dir><dir name="controllers"><file name="MainController.php" hash="b983fe60b2bbfa3aa1d57850cc6c045b"/></dir><dir name="etc"><file name="config.xml" hash="c44b91215b0667b7710de8a9820d0dca"/><file name="system.xml" hash="17b6f83e47f9e5f4d77a0f02be7f6814"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ltc_Komfortkasse.xml" hash="433066ef75047d9468dcea87888283d2"/></dir></target></contents>
|
21 |
<compatible/>
|
22 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
23 |
</package>
|