Ltc_Komfortkasse - Version 1.3.0.4

Version Notes

Improved support for invoices and COD

Download this release

Release Info

Developer Komfortkasse
Extension Ltc_Komfortkasse
Version 1.3.0.4
Comparing to
See all releases


Code changes from version 1.2.3.3 to 1.3.0.4

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.2.3.3';
12
  const MAXLEN_SSL = 117;
13
  const LEN_MCRYPT = 16;
14
 
@@ -85,6 +85,7 @@ class Komfortkasse
85
  $order = Komfortkasse_Order::getRefund($id);
86
  } else {
87
  $order = Komfortkasse_Order::getOrder($id);
 
88
  }
89
 
90
  if (!$order) {
@@ -319,7 +320,7 @@ class Komfortkasse
319
  continue;
320
  }
321
 
322
- $newstatus = Komfortkasse::getNewStatus($status);
323
  if (empty($newstatus) === true) {
324
  continue;
325
  }
@@ -367,26 +368,19 @@ class Komfortkasse
367
  }
368
 
369
  $order = Komfortkasse_Order::getOrder($id);
 
370
 
371
  $queryRaw = http_build_query($order);
372
 
373
  $queryEnc = Komfortkasse::kkencrypt($queryRaw);
374
 
375
- $query = http_build_query(array (
376
- 'q' => $queryEnc,
377
- 'hash' => Komfortkasse_Config::getConfig(Komfortkasse_Config::accesscode),
378
- 'key' => Komfortkasse_Config::getConfig(Komfortkasse_Config::apikey)
379
  ));
380
 
381
- $contextData = array (
382
- 'method' => 'POST',
383
- 'timeout' => 2,
384
- 'header' => "Connection: close\r\n" . 'Content-Length: ' . strlen($query) . "\r\n",
385
- 'content' => $query
386
  );
387
 
388
- $context = stream_context_create(array (
389
- 'http' => $contextData
390
  ));
391
 
392
  // Development: http://localhost:8080/kkos01/api...
@@ -433,8 +427,10 @@ class Komfortkasse
433
  *
434
  * @return mixed
435
  */
436
- protected static function getNewStatus($status)
437
  {
 
 
438
  switch ($status) {
439
  case 'PAID' :
440
  return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid);
@@ -443,7 +439,23 @@ class Komfortkasse
443
  }
444
 
445
  return null;
446
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
448
 
449
  // end getNewStatus()
@@ -454,7 +466,7 @@ class Komfortkasse
454
  *
455
  * @return boolean
456
  */
457
- protected static function check()
458
  {
459
  $ac = Komfortkasse_Config::getRequestParameter('accesscode');
460
 
@@ -487,6 +499,9 @@ class Komfortkasse
487
  if (!$keystring) {
488
  $keystring = Komfortkasse_Config::getConfig(Komfortkasse_Config::publickey);
489
  }
 
 
 
490
 
491
  switch ($encryption) {
492
  case 'openssl' :
@@ -520,6 +535,9 @@ class Komfortkasse
520
  if (!$keystring) {
521
  $keystring = Komfortkasse_Config::getConfig(Komfortkasse_Config::privatekey);
522
  }
 
 
 
523
 
524
  switch ($encryption) {
525
  case 'openssl' :
@@ -781,13 +799,34 @@ class Komfortkasse
781
  }
782
 
783
  // end mybase64_encode()
784
- public static function getInvoiceNumber()
785
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
786
  if (Komfortkasse::check() === false) {
787
  return;
788
  }
 
789
  $param = Komfortkasse_Config::getRequestParameter('o');
790
- return Komfortkasse::kkdecrypt($param);
791
-
 
792
  }
793
  }
8
  */
9
  class Komfortkasse
10
  {
11
+ const PLUGIN_VER = '1.3.0.4';
12
  const MAXLEN_SSL = 117;
13
  const LEN_MCRYPT = 16;
14
 
85
  $order = Komfortkasse_Order::getRefund($id);
86
  } else {
87
  $order = Komfortkasse_Order::getOrder($id);
88
+ $order['type'] = self::getOrderType($order['payment_method']);
89
  }
90
 
91
  if (!$order) {
320
  continue;
321
  }
322
 
323
+ $newstatus = Komfortkasse::getNewStatus($status, self::getOrderType($order ['payment_method']));
324
  if (empty($newstatus) === true) {
325
  continue;
326
  }
368
  }
369
 
370
  $order = Komfortkasse_Order::getOrder($id);
371
+ $order['type'] = self::getOrderType($order['payment_method']);
372
 
373
  $queryRaw = http_build_query($order);
374
 
375
  $queryEnc = Komfortkasse::kkencrypt($queryRaw);
376
 
377
+ $query = http_build_query(array ('q' => $queryEnc,'hash' => Komfortkasse_Config::getConfig(Komfortkasse_Config::accesscode),'key' => Komfortkasse_Config::getConfig(Komfortkasse_Config::apikey)
 
 
 
378
  ));
379
 
380
+ $contextData = array ('method' => 'POST','timeout' => 2,'header' => "Connection: close\r\n" . 'Content-Length: ' . strlen($query) . "\r\n",'content' => $query
 
 
 
 
381
  );
382
 
383
+ $context = stream_context_create(array ('http' => $contextData
 
384
  ));
385
 
386
  // Development: http://localhost:8080/kkos01/api...
427
  *
428
  * @return mixed
429
  */
430
+ protected static function getNewStatus($status, $orderType)
431
  {
432
+ switch ($orderType) {
433
+ case 'PREPAYMENT' :
434
  switch ($status) {
435
  case 'PAID' :
436
  return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid);
439
  }
440
 
441
  return null;
442
+ case 'INVOICE' :
443
+ switch ($status) {
444
+ case 'PAID' :
445
+ return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_invoice);
446
+ case 'CANCELLED' :
447
+ return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_invoice);
448
+ }
449
+ return null;
450
+ case 'COD' :
451
+ switch ($status) {
452
+ case 'PAID' :
453
+ return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_paid_cod);
454
+ case 'CANCELLED' :
455
+ return Komfortkasse_Config::getConfig(Komfortkasse_Config::status_cancelled_cod);
456
+ }
457
+ return null;
458
+ }
459
  }
460
 
461
  // end getNewStatus()
466
  *
467
  * @return boolean
468
  */
469
+ public static function check()
470
  {
471
  $ac = Komfortkasse_Config::getRequestParameter('accesscode');
472
 
499
  if (!$keystring) {
500
  $keystring = Komfortkasse_Config::getConfig(Komfortkasse_Config::publickey);
501
  }
502
+ if ($s === '') {
503
+ return '';
504
+ }
505
 
506
  switch ($encryption) {
507
  case 'openssl' :
535
  if (!$keystring) {
536
  $keystring = Komfortkasse_Config::getConfig(Komfortkasse_Config::privatekey);
537
  }
538
+ if ($s === '') {
539
+ return '';
540
+ }
541
 
542
  switch ($encryption) {
543
  case 'openssl' :
799
  }
800
 
801
  // end mybase64_encode()
802
+
803
+ private static function getOrderType($payment_method) {
804
+ $paycodes = preg_split('/,/', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods));
805
+ if (in_array($payment_method, $paycodes))
806
+ return 'PREPAYMENT';
807
+ $paycodes = preg_split('/,/', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice));
808
+ if (in_array($payment_method, $paycodes))
809
+ return 'INVOICE';
810
+ $paycodes = preg_split('/,/', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod));
811
+ if (in_array($payment_method, $paycodes))
812
+ return 'COD';
813
+ return '';
814
+ }
815
+
816
+ public static function readinvoicepdf() {
817
+ Komfortkasse_Order::getInvoicePdfPrepare();
818
+
819
+ if (!Komfortkasse_Config::getConfig(Komfortkasse_Config::activate_export)) {
820
+ return;
821
+ }
822
+
823
  if (Komfortkasse::check() === false) {
824
  return;
825
  }
826
+
827
  $param = Komfortkasse_Config::getRequestParameter('o');
828
+ $param = Komfortkasse::kkdecrypt($param);
829
+
830
+ return Komfortkasse_Order::getInvoicePdf($param);
831
  }
832
  }
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Config.php CHANGED
@@ -3,28 +3,37 @@
3
  /**
4
  * Komfortkasse
5
  * Config Class
6
- * @version 1.2.1.8-Magento */
7
  class Komfortkasse_Config
8
  {
9
- const activate_export = 'payment/komfortkasse/activate_export';
10
- const activate_update = 'payment/komfortkasse/activate_update';
11
- const payment_methods = 'payment/komfortkasse/payment_methods';
12
- const status_open = 'payment/komfortkasse/status_open';
13
- const status_paid = 'payment/komfortkasse/status_paid';
14
  const status_cancelled = 'payment/komfortkasse/status_cancelled';
15
- const encryption = 'payment/komfortkasse/encryption';
16
- const accesscode = 'payment/komfortkasse/accesscode';
17
- const apikey = 'payment/komfortkasse/apikey';
18
- const publickey = 'payment/komfortkasse/publickey';
19
- const privatekey = 'payment/komfortkasse/privatekey';
 
 
 
 
 
 
 
 
20
 
21
 
22
  /**
23
- * Set Config.
24
- *
 
25
  * @param string $constantKey Constant Key
26
- * @param string $value Value
27
- *
28
  * @return void
29
  */
30
  public static function setConfig($constantKey, $value)
@@ -32,50 +41,57 @@ class Komfortkasse_Config
32
  Mage::getConfig()->saveConfig($constantKey, $value);
33
  Mage::getConfig()->reinit();
34
  Mage::app()->reinitStores();
 
 
35
 
36
- }//end setConfig()
37
-
38
 
39
  /**
40
- * Get Config.
41
- *
 
42
  * @param string $constantKey Constant Key
43
- *
44
  * @return mixed
45
  */
46
  public static function getConfig($constantKey)
47
  {
48
  $value = Mage::getStoreConfig($constantKey);
49
-
50
  return $value;
 
 
51
 
52
- }//end getConfig()
53
-
54
 
55
  /**
56
- * Get Request Parameter.
57
- *
 
58
  * @param string $key Key
59
- *
60
  * @return string
61
  */
62
  public static function getRequestParameter($key)
63
  {
64
  return urldecode(Mage::app()->getRequest()->getParam($key));
 
 
65
 
66
- }//end getRequestParameter()
67
-
68
 
69
  /**
70
- * Get Magento Version.
71
- *
 
72
  * @return string
73
  */
74
  public static function getVersion()
75
  {
76
  return Mage::getVersion();
77
-
78
- }//end getVersion()
79
-
80
-
81
  }//end class
3
  /**
4
  * Komfortkasse
5
  * Config Class
6
+ * @version 1.3.0.1-Magento */
7
  class Komfortkasse_Config
8
  {
9
+ const activate_export = 'payment/komfortkasse/activate_export';
10
+ const activate_update = 'payment/komfortkasse/activate_update';
11
+ const payment_methods = 'payment/komfortkasse/payment_methods';
12
+ const status_open = 'payment/komfortkasse/status_open';
13
+ const status_paid = 'payment/komfortkasse/status_paid';
14
  const status_cancelled = 'payment/komfortkasse/status_cancelled';
15
+ const payment_methods_invoice = 'payment/komfortkasse/payment_methods_invoice';
16
+ const status_open_invoice = 'payment/komfortkasse/status_open_invoice';
17
+ const status_paid_invoice = 'payment/komfortkasse/status_paid_invoice';
18
+ const status_cancelled_invoice = 'payment/komfortkasse/status_cancelled_invoice';
19
+ const payment_methods_cod = 'payment/komfortkasse/payment_methods_cod';
20
+ const status_open_cod = 'payment/komfortkasse/status_open_cod';
21
+ const status_paid_cod = 'payment/komfortkasse/status_paid_cod';
22
+ const status_cancelled_cod = 'payment/komfortkasse/status_cancelled_cod';
23
+ const encryption = 'payment/komfortkasse/encryption';
24
+ const accesscode = 'payment/komfortkasse/accesscode';
25
+ const apikey = 'payment/komfortkasse/apikey';
26
+ const publickey = 'payment/komfortkasse/publickey';
27
+ const privatekey = 'payment/komfortkasse/privatekey';
28
 
29
 
30
  /**
31
+ * Set Config.
32
+ *
33
+ *
34
  * @param string $constantKey Constant Key
35
+ * @param string $value Value
36
+ *
37
  * @return void
38
  */
39
  public static function setConfig($constantKey, $value)
41
  Mage::getConfig()->saveConfig($constantKey, $value);
42
  Mage::getConfig()->reinit();
43
  Mage::app()->reinitStores();
44
+
45
+ }
46
 
47
+ // end setConfig()
48
+
49
 
50
  /**
51
+ * Get Config.
52
+ *
53
+ *
54
  * @param string $constantKey Constant Key
55
+ *
56
  * @return mixed
57
  */
58
  public static function getConfig($constantKey)
59
  {
60
  $value = Mage::getStoreConfig($constantKey);
61
+
62
  return $value;
63
+
64
+ }
65
 
66
+ // end getConfig()
67
+
68
 
69
  /**
70
+ * Get Request Parameter.
71
+ *
72
+ *
73
  * @param string $key Key
74
+ *
75
  * @return string
76
  */
77
  public static function getRequestParameter($key)
78
  {
79
  return urldecode(Mage::app()->getRequest()->getParam($key));
80
+
81
+ }
82
 
83
+ // end getRequestParameter()
84
+
85
 
86
  /**
87
+ * Get Magento Version.
88
+ *
89
+ *
90
  * @return string
91
  */
92
  public static function getVersion()
93
  {
94
  return Mage::getVersion();
95
+
96
+ } // end getVersion()
 
 
97
  }//end class
app/code/community/Ltc/Komfortkasse/Helper/Komfortkasse_Order.php CHANGED
@@ -8,10 +8,11 @@
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.2.3.3-Magento
12
  */
13
  $path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
14
  if (file_exists("{$path}/Helper/Komfortkasse_Order_Extension.php") === true) {
 
15
  include_once "{$path}/Helper/Komfortkasse_Order_Extension.php";
16
  }
17
  class Komfortkasse_Order
@@ -27,6 +28,8 @@ class Komfortkasse_Order
27
  {
28
  $ret = array ();
29
 
 
 
30
  $openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open));
31
  $paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods));
32
 
@@ -51,12 +54,48 @@ class Komfortkasse_Order
51
  $method = $order->getPayment()->getMethodInstance()->getCode();
52
  if (in_array($method, $paymentMethods, true) === true) {
53
  $orderId = $order->getIncrementId();
54
- if (in_array($order_id, $ret) === false) {
55
  $ret [] = $orderId;
56
  }
57
  }
58
  }
59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  return $ret;
61
 
62
  }
@@ -165,7 +204,7 @@ class Komfortkasse_Order
165
  }
166
  }
167
 
168
- if (method_exists('Komfortkasse_Order_Extension', 'extendOrder') === true) {
169
  $ret = Komfortkasse_Order_Extension::extendOrder($order, $ret);
170
  }
171
 
@@ -323,4 +362,40 @@ class Komfortkasse_Order
323
  $object->save();
324
 
325
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }//end class
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.3.0.1-Magento
12
  */
13
  $path = Mage::getModuleDir('', 'Ltc_Komfortkasse');
14
  if (file_exists("{$path}/Helper/Komfortkasse_Order_Extension.php") === true) {
15
+ $order_extension = true;
16
  include_once "{$path}/Helper/Komfortkasse_Order_Extension.php";
17
  }
18
  class Komfortkasse_Order
28
  {
29
  $ret = array ();
30
 
31
+ // PREPAYMENT
32
+
33
  $openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open));
34
  $paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods));
35
 
54
  $method = $order->getPayment()->getMethodInstance()->getCode();
55
  if (in_array($method, $paymentMethods, true) === true) {
56
  $orderId = $order->getIncrementId();
57
+ if (in_array($orderId, $ret) === false) {
58
  $ret [] = $orderId;
59
  }
60
  }
61
  }
62
 
63
+ // INVOICE
64
+
65
+ $openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_invoice));
66
+ $paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_invoice));
67
+
68
+ $salesModel = Mage::getModel('sales/order');
69
+ $salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array (
70
+ 'in' => $openOrders
71
+ ));
72
+
73
+ foreach ($salesCollection as $order) {
74
+ $method = $order->getPayment()->getMethodInstance()->getCode();
75
+ if (in_array($method, $paymentMethods, true) === true) {
76
+ $orderId = $order->getIncrementId();
77
+ $ret [] = $orderId;
78
+ }
79
+ }
80
+
81
+ // COD
82
+
83
+ $openOrders = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::status_open_cod));
84
+ $paymentMethods = explode(',', Komfortkasse_Config::getConfig(Komfortkasse_Config::payment_methods_cod));
85
+
86
+ $salesModel = Mage::getModel('sales/order');
87
+ $salesCollection = $salesModel->getCollection()->addAttributeToFilter('status', array (
88
+ 'in' => $openOrders
89
+ ));
90
+
91
+ foreach ($salesCollection as $order) {
92
+ $method = $order->getPayment()->getMethodInstance()->getCode();
93
+ if (in_array($method, $paymentMethods, true) === true) {
94
+ $orderId = $order->getIncrementId();
95
+ $ret [] = $orderId;
96
+ }
97
+ }
98
+
99
  return $ret;
100
 
101
  }
204
  }
205
  }
206
 
207
+ if ($order_extension && method_exists('Komfortkasse_Order_Extension', 'extendOrder') === true) {
208
  $ret = Komfortkasse_Order_Extension::extendOrder($order, $ret);
209
  }
210
 
362
  $object->save();
363
 
364
  }
365
+
366
+ public static function getInvoicePdfPrepare()
367
+ {
368
+ }
369
+
370
+ public static function getInvoicePdf($invoiceNumber)
371
+ {
372
+ if ($invoiceNumber && $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceNumber)) {
373
+ $fileName = $invoiceNumber . '.pdf';
374
+
375
+ $pdfGenerated = false;
376
+
377
+ // try easy pdf (www.easypdfinvoice.com)
378
+ if (!$pdfGenerated) {
379
+ $pdfProModel = Mage::getModel('pdfpro/order_invoice');
380
+ if ($pdfProModel !== false) {
381
+ $invoiceData = $pdfProModel->initInvoiceData($invoice);
382
+ $result = Mage::helper('pdfpro')->initPdf(array($invoiceData));
383
+ if ($result['success']) {
384
+ $content = $result['content'];
385
+ $pdfGenerated = true;
386
+ }
387
+ }
388
+ }
389
+
390
+ // try Magento Standard
391
+ if (!$pdfGenerated) {
392
+ $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array (
393
+ $invoice
394
+ ));
395
+ $content = $pdf->render();
396
+ }
397
+
398
+ return $content;
399
+ }
400
+ }
401
  }//end class
app/code/community/Ltc/Komfortkasse/controllers/MainController.php CHANGED
@@ -120,40 +120,15 @@ class Ltc_Komfortkasse_MainController extends Mage_Core_Controller_Front_Action
120
  // end getHelper()
121
  public function readinvoicepdfAction()
122
  {
123
- $invoiceNumber = self::getHelper()->readinvoicepdf();
124
- if ($invoiceNumber && $invoice = Mage::getModel('sales/order_invoice')->loadByIncrementId($invoiceNumber)) {
125
- $fileName = $invoiceNumber . '.pdf';
126
-
127
- $pdfGenerated = false;
128
-
129
- // try easy pdf (www.easypdfinvoice.com)
130
- if (!$pdfGenerated) {
131
- $pdfProModel = Mage::getModel('pdfpro/order_invoice');
132
- if ($pdfProModel !== false) {
133
- $invoiceData = $pdfProModel->initInvoiceData($invoice);
134
- $result = Mage::helper('pdfpro')->initPdf(array($invoiceData));
135
- if ($result['success']) {
136
- $content = $result['content'];
137
- $pdfGenerated = true;
138
- }
139
- }
140
- }
141
-
142
- // try Magento Standard
143
- if (!$pdfGenerated) {
144
- $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf(array (
145
- $invoice
146
- ));
147
- $content = $pdf->render();
148
- }
149
-
150
- $contentType = 'application/pdf';
151
- $contentLength = strlen($content);
152
-
153
- $this->getResponse()->setHttpResponseCode(200)->setHeader('Pragma', 'public', true)->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)->setHeader('Content-type', $contentType, true)->setHeader('Content-Length', is_null($contentLength) ? strlen($content) : $contentLength, true)->setHeader('Content-Disposition', 'attachment; filename="' . $fileName . '"', true)->setHeader('Last-Modified', date('r'), true);
154
- $this->getResponse()->setBody($content);
155
- }
156
-
157
  }
158
  }//end class
159
 
120
  // end getHelper()
121
  public function readinvoicepdfAction()
122
  {
123
+ $content = self::getHelper()->readinvoicepdf();
124
+ if (!$content)
125
+ return;
126
+
127
+ $contentType = 'application/pdf';
128
+ $contentLength = strlen($content);
129
+
130
+ $this->getResponse()->setHttpResponseCode(200)->setHeader('Pragma', 'public', true)->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)->setHeader('Content-type', $contentType, true)->setHeader('Content-Length', $contentLength, true)->setHeader('Content-Disposition', 'attachment; filename="' . $fileName . '"', true)->setHeader('Last-Modified', date('r'), true);
131
+ $this->getResponse()->setBody($content);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  }
133
  }//end class
134
 
app/code/community/Ltc/Komfortkasse/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
  <config>
4
  <modules>
5
  <Ltc_Komfortkasse>
6
- <version>1.2.3.3</version>
7
  </Ltc_Komfortkasse>
8
  </modules>
9
  <global>
@@ -57,6 +57,8 @@
57
  <status_open>pending</status_open>
58
  <status_paid>processing</status_paid>
59
  <status_cancelled>canceled</status_cancelled>
 
 
60
  </komfortkasse>
61
  </payment>
62
  </default>
3
  <config>
4
  <modules>
5
  <Ltc_Komfortkasse>
6
+ <version>1.3.0.4</version>
7
  </Ltc_Komfortkasse>
8
  </modules>
9
  <global>
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
+ <status_open_cod>processing</status_open_cod>
62
  </komfortkasse>
63
  </payment>
64
  </default>
app/code/community/Ltc/Komfortkasse/etc/system.xml CHANGED
@@ -2,7 +2,7 @@
2
  <!--
3
  Komfortkasse
4
  Magento Plugin - system.xml
5
- @version 1.2.1.9-Magento */ -->
6
  <config>
7
  <sections>
8
  <payment>
@@ -38,7 +38,7 @@
38
  <comment>Activate update of orders</comment>
39
  </activate_update>
40
  <payment_methods translate="label">
41
- <label>Payment Methods</label>
42
  <frontend_type>multiselect</frontend_type>
43
  <source_model>adminhtml/system_config_source_payment_allmethods
44
  </source_model>
@@ -46,11 +46,11 @@
46
  <show_in_default>1</show_in_default>
47
  <show_in_website>1</show_in_website>
48
  <show_in_store>1</show_in_store>
49
- <comment>All payment methods that should be exported.
50
  </comment>
51
  </payment_methods>
52
  <status_open translate="label">
53
- <label>Statuses Open</label>
54
  <frontend_type>multiselect</frontend_type>
55
  <source_model>adminhtml/system_config_source_order_status
56
  </source_model>
@@ -58,12 +58,11 @@
58
  <show_in_default>1</show_in_default>
59
  <show_in_website>1</show_in_website>
60
  <show_in_store>1</show_in_store>
61
- <comment>Order statuses that should be exported (open
62
- orders)
63
  </comment>
64
  </status_open>
65
  <status_paid translate="label">
66
- <label>Status Paid</label>
67
  <frontend_type>select</frontend_type>
68
  <source_model>adminhtml/system_config_source_order_status
69
  </source_model>
@@ -71,13 +70,11 @@
71
  <show_in_default>1</show_in_default>
72
  <show_in_website>1</show_in_website>
73
  <show_in_store>1</show_in_store>
74
- <comment>Order state that should be set when a payment has
75
- been
76
- received.
77
  </comment>
78
  </status_paid>
79
  <status_cancelled translate="label">
80
- <label>Status Cancelled</label>
81
  <frontend_type>select</frontend_type>
82
  <source_model>adminhtml/system_config_source_order_status
83
  </source_model>
@@ -85,24 +82,129 @@
85
  <show_in_default>1</show_in_default>
86
  <show_in_website>1</show_in_website>
87
  <show_in_store>1</show_in_store>
88
- <comment>Order state that should be set when an order has been cancelled.
89
  </comment>
90
  </status_cancelled>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  <encryption translate="label">
92
  <label>Encryption</label>
93
  <frontend_type>select</frontend_type>
94
  <source_model>adminhtml/system_config_source_KomfortkasseEncryptionOptions
95
  </source_model>
96
- <sort_order>60</sort_order>
97
  <show_in_default>1</show_in_default>
98
  <show_in_website>1</show_in_website>
99
  <show_in_store>1</show_in_store>
100
- <comment>Encryption technology</comment>
101
  </encryption>
102
  <accesscode translate="label">
103
  <label>Access code</label>
104
  <frontend_type>text</frontend_type>
105
- <sort_order>65</sort_order>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>1</show_in_website>
108
  <show_in_store>1</show_in_store>
@@ -111,7 +213,7 @@
111
  <apikey translate="label">
112
  <label>API key</label>
113
  <frontend_type>text</frontend_type>
114
- <sort_order>67</sort_order>
115
  <show_in_default>1</show_in_default>
116
  <show_in_website>1</show_in_website>
117
  <show_in_store>1</show_in_store>
@@ -120,7 +222,7 @@
120
  <publickey translate="label">
121
  <label>Secret Key 1</label>
122
  <frontend_type>text</frontend_type>
123
- <sort_order>70</sort_order>
124
  <show_in_default>1</show_in_default>
125
  <show_in_website>1</show_in_website>
126
  <show_in_store>1</show_in_store>
@@ -129,7 +231,7 @@
129
  <privatekey translate="label">
130
  <label>Secret Key 2</label>
131
  <frontend_type>text</frontend_type>
132
- <sort_order>80</sort_order>
133
  <show_in_default>1</show_in_default>
134
  <show_in_website>1</show_in_website>
135
  <show_in_store>1</show_in_store>
2
  <!--
3
  Komfortkasse
4
  Magento Plugin - system.xml
5
+ @version 1.3.0.1-Magento */ -->
6
  <config>
7
  <sections>
8
  <payment>
38
  <comment>Activate update of orders</comment>
39
  </activate_update>
40
  <payment_methods translate="label">
41
+ <label>Prepayment: Payment Methods</label>
42
  <frontend_type>multiselect</frontend_type>
43
  <source_model>adminhtml/system_config_source_payment_allmethods
44
  </source_model>
46
  <show_in_default>1</show_in_default>
47
  <show_in_website>1</show_in_website>
48
  <show_in_store>1</show_in_store>
49
+ <comment>All payment methods that should be exported for prepayment orders.
50
  </comment>
51
  </payment_methods>
52
  <status_open translate="label">
53
+ <label>Prepayment: Statuses Open</label>
54
  <frontend_type>multiselect</frontend_type>
55
  <source_model>adminhtml/system_config_source_order_status
56
  </source_model>
58
  <show_in_default>1</show_in_default>
59
  <show_in_website>1</show_in_website>
60
  <show_in_store>1</show_in_store>
61
+ <comment>Order statuses that should be exported for prepayment orders (open orders)
 
62
  </comment>
63
  </status_open>
64
  <status_paid translate="label">
65
+ <label>Prepayment: Status Paid</label>
66
  <frontend_type>select</frontend_type>
67
  <source_model>adminhtml/system_config_source_order_status
68
  </source_model>
70
  <show_in_default>1</show_in_default>
71
  <show_in_website>1</show_in_website>
72
  <show_in_store>1</show_in_store>
73
+ <comment>Order state that should be set when a payment has been received for a prepayment order.
 
 
74
  </comment>
75
  </status_paid>
76
  <status_cancelled translate="label">
77
+ <label>Prepayment: Status Cancelled</label>
78
  <frontend_type>select</frontend_type>
79
  <source_model>adminhtml/system_config_source_order_status
80
  </source_model>
82
  <show_in_default>1</show_in_default>
83
  <show_in_website>1</show_in_website>
84
  <show_in_store>1</show_in_store>
85
+ <comment>Order state that should be set when a prepayment order has been cancelled.
86
  </comment>
87
  </status_cancelled>
88
+
89
+
90
+ <payment_methods_invoice translate="label">
91
+ <label>Invoice: Payment Methods</label>
92
+ <frontend_type>multiselect</frontend_type>
93
+ <source_model>adminhtml/system_config_source_payment_allmethods
94
+ </source_model>
95
+ <sort_order>60</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>1</show_in_website>
98
+ <show_in_store>1</show_in_store>
99
+ <comment>All payment methods that should be exported for invoice orders.
100
+ </comment>
101
+ </payment_methods_invoice>
102
+ <status_open_invoice translate="label">
103
+ <label>Invoice: Statuses Open</label>
104
+ <frontend_type>multiselect</frontend_type>
105
+ <source_model>adminhtml/system_config_source_order_status
106
+ </source_model>
107
+ <sort_order>70</sort_order>
108
+ <show_in_default>1</show_in_default>
109
+ <show_in_website>1</show_in_website>
110
+ <show_in_store>1</show_in_store>
111
+ <comment>Order statuses that should be exported for invoice orders (open/unpaid invoices)
112
+ </comment>
113
+ </status_open_invoice>
114
+ <status_paid_invoice translate="label">
115
+ <label>Invoice: Status Paid</label>
116
+ <frontend_type>select</frontend_type>
117
+ <source_model>adminhtml/system_config_source_order_status
118
+ </source_model>
119
+ <sort_order>80</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ <comment>Order state that should be set an invoice has been paid.
124
+ </comment>
125
+ </status_paid_invoice>
126
+ <status_cancelled_invoice translate="label">
127
+ <label>Invoice: Status no payment/debt collection</label>
128
+ <frontend_type>select</frontend_type>
129
+ <source_model>adminhtml/system_config_source_order_status
130
+ </source_model>
131
+ <sort_order>90</sort_order>
132
+ <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
+ <comment>Order state that should be set when an invoice has not been paid.
136
+ </comment>
137
+ </status_cancelled_invoice>
138
+
139
+
140
+
141
+ <payment_methods_cod translate="label">
142
+ <label>COD: Payment Methods</label>
143
+ <frontend_type>multiselect</frontend_type>
144
+ <source_model>adminhtml/system_config_source_payment_allmethods
145
+ </source_model>
146
+ <sort_order>100</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>1</show_in_store>
150
+ <comment>All payment methods that should be exported for COD (cash on delivery) orders.
151
+ </comment>
152
+ </payment_methods_cod>
153
+ <status_open_cod translate="label">
154
+ <label>COD: Statuses Open</label>
155
+ <frontend_type>multiselect</frontend_type>
156
+ <source_model>adminhtml/system_config_source_order_status
157
+ </source_model>
158
+ <sort_order>110</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ <comment>Order statuses that should be exported for COD orders (dispatched COD parcel)
163
+ </comment>
164
+ </status_open_cod>
165
+ <status_paid_cod translate="label">
166
+ <label>COD: Status Paid</label>
167
+ <frontend_type>select</frontend_type>
168
+ <source_model>adminhtml/system_config_source_order_status
169
+ </source_model>
170
+ <sort_order>120</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ <comment>Order state that should be set when a COD order has been paid.
175
+ </comment>
176
+ </status_paid_cod>
177
+ <status_cancelled_cod translate="label">
178
+ <label>COD: Status Payment unresolved</label>
179
+ <frontend_type>select</frontend_type>
180
+ <source_model>adminhtml/system_config_source_order_status
181
+ </source_model>
182
+ <sort_order>130</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <show_in_store>1</show_in_store>
186
+ <comment>Order state that should be set when a COD order was not paid.
187
+ </comment>
188
+ </status_cancelled_cod>
189
+
190
+
191
+
192
+
193
  <encryption translate="label">
194
  <label>Encryption</label>
195
  <frontend_type>select</frontend_type>
196
  <source_model>adminhtml/system_config_source_KomfortkasseEncryptionOptions
197
  </source_model>
198
+ <sort_order>1000</sort_order>
199
  <show_in_default>1</show_in_default>
200
  <show_in_website>1</show_in_website>
201
  <show_in_store>1</show_in_store>
202
+ <comment>Encryption technology. Do not change!</comment>
203
  </encryption>
204
  <accesscode translate="label">
205
  <label>Access code</label>
206
  <frontend_type>text</frontend_type>
207
+ <sort_order>1010</sort_order>
208
  <show_in_default>1</show_in_default>
209
  <show_in_website>1</show_in_website>
210
  <show_in_store>1</show_in_store>
213
  <apikey translate="label">
214
  <label>API key</label>
215
  <frontend_type>text</frontend_type>
216
+ <sort_order>1020</sort_order>
217
  <show_in_default>1</show_in_default>
218
  <show_in_website>1</show_in_website>
219
  <show_in_store>1</show_in_store>
222
  <publickey translate="label">
223
  <label>Secret Key 1</label>
224
  <frontend_type>text</frontend_type>
225
+ <sort_order>1030</sort_order>
226
  <show_in_default>1</show_in_default>
227
  <show_in_website>1</show_in_website>
228
  <show_in_store>1</show_in_store>
231
  <privatekey translate="label">
232
  <label>Secret Key 2</label>
233
  <frontend_type>text</frontend_type>
234
+ <sort_order>1040</sort_order>
235
  <show_in_default>1</show_in_default>
236
  <show_in_website>1</show_in_website>
237
  <show_in_store>1</show_in_store>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ltc_Komfortkasse</name>
4
- <version>1.2.3.3</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,11 +13,11 @@ Zus&#xE4;tzlich k&#xF6;nnen automatische Zahlungserinnerungen versendet werden u
13
  &#xD;
14
  Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verf&#xFC;gbar).&#xD;
15
  </description>
16
- <notes>Improved support for virtual goods</notes>
17
  <authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
18
- <date>2015-04-21</date>
19
- <time>19:26:41</time>
20
- <contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="d9245da9131fd90ed1f2cab0d9a2b888"/><file name="Komfortkasse.php" hash="c65c18c51964788c12b74ba1ca1717e9"/><file name="Komfortkasse_Config.php" hash="bd7c6f9752f2ddea4675c29437466cd0"/><file name="Komfortkasse_Order.php" hash="e396480dd6903e4444cc96ade005e8c2"/></dir><dir name="Model"><file name="Observer.php" hash="5b616b6d3651df44f8297c732dc478bb"/></dir><dir name="controllers"><file name="MainController.php" hash="36b64665160ae38daeb9416e1d40ca05"/></dir><dir name="etc"><file name="config.xml" hash="61f94c2f60f9f71111576b6343423e79"/><file name="system.xml" hash="60684635fed231ff9acdf76ece84786d"/></dir></dir></dir><dir name="Mage"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="KomfortkasseEncryptionOptions.php" hash="fea880dd3e60c13ede05be53511a6d93"/></dir></dir></dir></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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Ltc_Komfortkasse</name>
4
+ <version>1.3.0.4</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
  &#xD;
14
  Es ist eine Anmeldung auf www.komfortkasse.eu erforderlich (kostenloses Paket verf&#xFC;gbar).&#xD;
15
  </description>
16
+ <notes>Improved support for invoices and COD</notes>
17
  <authors><author><name>Komfortkasse</name><user>komfortkasse</user><email>integration@komfortkasse.eu</email></author></authors>
18
+ <date>2015-05-08</date>
19
+ <time>07:05:48</time>
20
+ <contents><target name="magecommunity"><dir name="Ltc"><dir name="Komfortkasse"><dir name="Helper"><file name="Data.php" hash="d9245da9131fd90ed1f2cab0d9a2b888"/><file name="Komfortkasse.php" hash="f36df8aceb553d8d16cfdc335ea56b56"/><file name="Komfortkasse_Config.php" hash="fa75a3dd731edc0f6017d252dcb65786"/><file name="Komfortkasse_Order.php" hash="a0bd1cd543a7908bcb7d2dc431db07ba"/></dir><dir name="Model"><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="53539d51febc374566ce540cd45838bd"/><file name="system.xml" hash="94ffefee8b481f609a29607813582b32"/></dir></dir></dir><dir name="Mage"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="KomfortkasseEncryptionOptions.php" hash="fea880dd3e60c13ede05be53511a6d93"/></dir></dir></dir></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>