Morningtime_Internetkassa - Version 1.4.1.1

Version Notes

Stable release.

Download this release

Release Info

Developer Magento Core Team
Extension Morningtime_Internetkassa
Version 1.4.1.1
Comparing to
See all releases


Code changes from version 1.3.2.4.5 to 1.4.1.1

Files changed (37) hide show
  1. app/code/community/Morningtime/Internetkassa/Block/Form.php +39 -25
  2. app/code/community/Morningtime/Internetkassa/Block/Info.php +41 -50
  3. app/code/community/Morningtime/Internetkassa/Block/Paypage.php +41 -0
  4. app/code/community/Morningtime/Internetkassa/Block/Placeform.php +90 -0
  5. app/code/community/Morningtime/Internetkassa/Block/Redirect.php +0 -42
  6. app/code/community/Morningtime/Internetkassa/Helper/Data.php +70 -21
  7. app/code/community/Morningtime/Internetkassa/Helper/ViewerList.php +0 -300
  8. app/code/community/Morningtime/Internetkassa/Model/Api.php +258 -0
  9. app/code/community/Morningtime/Internetkassa/Model/Api/Debug.php +40 -0
  10. app/code/community/Morningtime/Internetkassa/Model/Config.php +151 -0
  11. app/code/community/Morningtime/Internetkassa/Model/Internetkassa.php +0 -655
  12. app/code/community/Morningtime/Internetkassa/Model/Mysql4/Api/Debug.php +40 -0
  13. app/code/community/Morningtime/Internetkassa/Model/Source/Currencies.php +0 -43
  14. app/code/community/Morningtime/Internetkassa/Model/Source/Issuers.php +0 -31
  15. app/code/community/Morningtime/Internetkassa/Model/Source/Languages.php +0 -36
  16. app/code/community/Morningtime/Internetkassa/Model/Source/PaymentAction.php +45 -0
  17. app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethod.php +0 -97
  18. app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethods.php +0 -33
  19. app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethodsList.php +0 -264
  20. app/code/community/Morningtime/Internetkassa/Model/Source/Pmlist.php +45 -0
  21. app/code/community/Morningtime/Internetkassa/Model/Source/Template.php +44 -0
  22. app/code/community/Morningtime/Internetkassa/controllers/ApiController.php +492 -0
  23. app/code/community/Morningtime/Internetkassa/controllers/ResultController.php +0 -461
  24. app/code/community/Morningtime/Internetkassa/etc/config.xml +142 -182
  25. app/code/community/Morningtime/Internetkassa/etc/system.xml +144 -159
  26. app/code/community/Morningtime/Internetkassa/sql/internetkassa_setup/mysql4-install-0.0.1.php +46 -0
  27. app/design/adminhtml/default/default/template/morningtime/internetkassa/info.phtml +29 -25
  28. app/design/adminhtml/default/default/template/morningtime/internetkassa/pdf/info.phtml +0 -22
  29. app/design/frontend/default/default/layout/internetkassa.xml +59 -0
  30. app/design/frontend/default/default/template/morningtime/internetkassa/form.phtml +33 -55
  31. app/design/frontend/default/default/template/morningtime/internetkassa/info.phtml +27 -25
  32. app/design/frontend/default/default/template/morningtime/internetkassa/paypage.phtml +28 -0
  33. app/design/frontend/default/default/template/morningtime/internetkassa/placeform.phtml +45 -0
  34. app/etc/modules/Morningtime_Internetkassa.xml +21 -11
  35. app/locale/en_US/Morningtime_Internetkassa.csv +76 -25
  36. app/locale/nl_NL/Morningtime_Internetkassa.csv +76 -25
  37. package.xml +36 -28
app/code/community/Morningtime/Internetkassa/Block/Form.php CHANGED
@@ -1,25 +1,39 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Block_Form extends Mage_Payment_Block_Form
19
- {
20
- protected function _construct()
21
- {
22
- $this->setTemplate('morningtime/internetkassa/form.phtml');
23
- parent::_construct();
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Morningtime_Internetkassa_Block_Form extends Mage_Payment_Block_Form_Cc
29
+ {
30
+ /**
31
+ * Init Internetkassa pay from to use it on frontend
32
+ *
33
+ */
34
+ protected function _construct()
35
+ {
36
+ parent::_construct();
37
+ $this->setTemplate('morningtime/internetkassa/form.phtml');
38
+ }
39
+ }
app/code/community/Morningtime/Internetkassa/Block/Info.php CHANGED
@@ -1,50 +1,41 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Block_Info extends Mage_Payment_Block_Info
19
- {
20
- protected function _construct()
21
- {
22
- parent::_construct();
23
- $this->setTemplate('morningtime/internetkassa/info.phtml');
24
- }
25
-
26
- public function toPdf()
27
- {
28
- $this->setTemplate('morningtime/internetkassa/pdf/info.phtml');
29
- return $this->toHtml();
30
- }
31
-
32
- /**
33
- * Gets Payment Method Title
34
- *
35
- * @return string
36
- */
37
- public function getIssuerPaymentMethod()
38
- {
39
- $list = Mage::getModel('internetkassa/source_paymentMethodsList')->getPMList();
40
- $ccType = $this->getInfo()->getCcType();
41
-
42
- for ($i = 0; $i < sizeof($list); $i++) {
43
- $pm = $list[$i];
44
- if($pm->getPmName() == $ccType){
45
- return $pm;
46
- }
47
- }
48
- return false;
49
- }
50
- }
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa payment iformation block
29
+ */
30
+ class Morningtime_Internetkassa_Block_Info extends Mage_Payment_Block_Info_Cc
31
+ {
32
+ /**
33
+ * Init internetkassa payment information block to use on admin area
34
+ *
35
+ */
36
+ protected function _construct()
37
+ {
38
+ parent::_construct();
39
+ $this->setTemplate('morningtime/internetkassa/info.phtml');
40
+ }
41
+ }
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Block/Paypage.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Morningtime_Internetkassa_Block_Paypage extends Mage_Core_Block_Template
29
+ {
30
+ /**
31
+ * Init pay page block
32
+ *
33
+ * @return Morningtime_Internetkassa_Block_Paypage
34
+ */
35
+ protected function _construct()
36
+ {
37
+ parent::_construct();
38
+ $this->setTemplate('morningtime/internetkassa/paypage.phtml');
39
+ return $this;
40
+ }
41
+ }
app/code/community/Morningtime/Internetkassa/Block/Placeform.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Morningtime_Internetkassa_Block_Placeform extends Mage_Core_Block_Template
29
+ {
30
+ public function __construct()
31
+ {
32
+ }
33
+
34
+ /**
35
+ * Get checkout session namespace
36
+ *
37
+ * @return Mage_Checkout_Model_Session
38
+ */
39
+ public function getCheckout()
40
+ {
41
+ return Mage::getSingleton('checkout/session');
42
+ }
43
+
44
+ /**
45
+ * Internetkassa payment APi instance
46
+ *
47
+ * @return Morningtime_Internetkassa_Model_Api
48
+ */
49
+ protected function _getApi()
50
+ {
51
+ return Mage::getSingleton('internetkassa/api');
52
+ }
53
+
54
+ /**
55
+ * Return order instance with loaded onformation by increment id
56
+ *
57
+ * @return Mage_Sales_Model_Order
58
+ */
59
+ protected function _getOrder()
60
+ {
61
+ if ($this->getOrder()) {
62
+ $order = $this->getOrder();
63
+ } else if ($this->getCheckout()->getLastRealOrderId()) {
64
+ $order = Mage::getModel('sales/order')->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
65
+ } else {
66
+ return null;
67
+ }
68
+ return $order;
69
+ }
70
+
71
+ /**
72
+ * Get Form data by using internetkassa payment api
73
+ *
74
+ * @return array
75
+ */
76
+ public function getFormData()
77
+ {
78
+ return $this->_getApi()->getFormFields($this->_getOrder());
79
+ }
80
+
81
+ /**
82
+ * Getting gateway url
83
+ *
84
+ * @return string
85
+ */
86
+ public function getFormAction()
87
+ {
88
+ return $this->_getApi()->getConfig()->getGatewayPath();
89
+ }
90
+ }
app/code/community/Morningtime/Internetkassa/Block/Redirect.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Block_Redirect extends Mage_Core_Block_Abstract
19
- {
20
- protected function _toHtml()
21
- {
22
- $standard = Mage::getModel('internetkassa/internetkassa');
23
- $form = new Varien_Data_Form();
24
- $form->setAction($standard->getInternetkassaUrl())
25
- ->setId('internetkassa_payment_checkout')
26
- ->setName('internetkassa_payment_checkout')
27
- ->setMethod('POST')
28
- ->setUseContainer(true);
29
-
30
- $form = $standard->addInternetkassaFields($form);
31
-
32
- $formHTML = $form->toHtml();
33
-
34
- $html = '<html><body>';
35
- $html.= $this->__('You will be redirected to the Internetkassa in a few seconds.');
36
- $html.= $formHTML;
37
- $html.= '<script type="text/javascript">document.getElementById("internetkassa_payment_checkout").submit();</script>';
38
- $html.= '</body></html>';
39
-
40
- return $html;
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Helper/Data.php CHANGED
@@ -1,21 +1,70 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Helper_Data extends Mage_Core_Helper_Abstract
19
- {
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa data helper
29
+ */
30
+ class Morningtime_Internetkassa_Helper_Data extends Mage_Core_Helper_Abstract
31
+ {
32
+ const HASH_ALGO = 'sha1';
33
+
34
+ /**
35
+ * Crypt Data by SHA1 ctypting algorithm by secret key
36
+ *
37
+ * @param array $data
38
+ * @param string $key
39
+ * @return hash
40
+ */
41
+ public function shaCrypt($data, $key = '')
42
+ {
43
+ if (is_array($data)) {
44
+ return hash(self::HASH_ALGO, implode("", $data));
45
+ }if (is_string($data)) {
46
+ return hash(self::HASH_ALGO, $data);
47
+ } else {
48
+ return "";
49
+ }
50
+ }
51
+
52
+ /**
53
+ * Check hash crypted by SHA1 with existing data
54
+ *
55
+ * @param array $data
56
+ * @param string $hash
57
+ * @param string $key
58
+ * @return bool
59
+ */
60
+ public function shaCryptValidation($data, $hash, $key='')
61
+ {
62
+ if (is_array($data)) {
63
+ return (bool)(strtoupper(hash(self::HASH_ALGO, implode("", $data)))== $hash);
64
+ } elseif (is_string($data)) {
65
+ return (bool)(strtoupper(hash(self::HASH_ALGO, $data))== $hash);
66
+ } else {
67
+ return false;
68
+ }
69
+ }
70
+ }
app/code/community/Morningtime/Internetkassa/Helper/ViewerList.php DELETED
@@ -1,300 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Helper_ViewerList extends Mage_Core_Helper_Abstract
19
- {
20
-
21
- public function getPMList(){
22
-
23
- $pmList = array();
24
- // Cards: General
25
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
26
- ->setPmName('AIRPLUS')
27
- ->setPmValue('CreditCard')
28
- ->setPmBrand('AIRPLUS')
29
- ->setPmUrlLogo('AIRPLUS_choice.gif')
30
- ->setPmFamily('Cards: General');
31
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
32
- ->setPmName('American Express')
33
- ->setPmValue('CreditCard')
34
- ->setPmBrand('American Express')
35
- ->setPmUrlLogo('American Express_choice.gif')
36
- ->setPmFamily('Cards: General');
37
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
38
- ->setPmName('Aurora')
39
- ->setPmValue('CreditCard')
40
- ->setPmBrand('Aurora')
41
- ->setPmUrlLogo('Aurora_choice.gif')
42
- ->setPmFamily('Cards: General');
43
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
44
- ->setPmName('Aurore')
45
- ->setPmValue('CreditCard')
46
- ->setPmBrand('Aurore')
47
- ->setPmUrlLogo('Aurore_choice.gif')
48
- ->setPmFamily('Cards: General');
49
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
50
- ->setPmName('Cofinoga')
51
- ->setPmValue('CreditCard')
52
- ->setPmBrand('Cofinoga')
53
- ->setPmUrlLogo('Cofinoga_choice.gif')
54
- ->setPmFamily('Cards: General');
55
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
56
- ->setPmName('Dankort')
57
- ->setPmValue('CreditCard')
58
- ->setPmBrand('Dankort')
59
- ->setPmUrlLogo('Dankort_choice.gif')
60
- ->setPmFamily('Cards: General');
61
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
62
- ->setPmName('Diners Club')
63
- ->setPmValue('CreditCard')
64
- ->setPmBrand('Diners Club')
65
- ->setPmUrlLogo('Diners Club_choice.gif')
66
- ->setPmFamily('Cards: General');
67
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
68
- ->setPmName('JCB')
69
- ->setPmValue('CreditCard')
70
- ->setPmBrand('JCB')
71
- ->setPmUrlLogo('JCB_choice.gif')
72
- ->setPmFamily('Cards: General');
73
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
74
- ->setPmName('MaestroUK')
75
- ->setPmValue('CreditCard')
76
- ->setPmBrand('MaestroUK')
77
- ->setPmUrlLogo('MaestroUK_choice.gif')
78
- ->setPmFamily('Cards: General');
79
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
80
- ->setPmName('Eurocard')
81
- ->setPmValue('CreditCard')
82
- ->setPmBrand('Eurocard')
83
- ->setPmUrlLogo('Eurocard_choice.gif')
84
- ->setPmFamily('Cards: General');
85
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
86
- ->setPmName('Solo')
87
- ->setPmValue('CreditCard')
88
- ->setPmBrand('Solo')
89
- ->setPmUrlLogo('Solo_choice.gif')
90
- ->setPmFamily('Cards: General');
91
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
92
- ->setPmName('UATP')
93
- ->setPmValue('CreditCard')
94
- ->setPmBrand('UATP')
95
- ->setPmUrlLogo('UATP_choice.gif')
96
- ->setPmFamily('Cards: General');
97
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
98
- ->setPmName('VISA')
99
- ->setPmValue('CreditCard')
100
- ->setPmBrand('VISA')
101
- ->setPmUrlLogo('VISA_choice.gif')
102
- ->setPmFamily('Cards: General');
103
-
104
- // Cards: exceptions
105
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
106
- ->setPmName('BCMC')
107
- ->setPmValue('CreditCard')
108
- ->setPmBrand('BCMC')
109
- ->setPmUrlLogo('BCMC_choice.gif')
110
- ->setPmFamily('Cards: exceptions');
111
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
112
- ->setPmName('Maestro')
113
- ->setPmValue('CreditCard')
114
- ->setPmBrand('Maestro')
115
- ->setPmUrlLogo('Maestro_choice.gif')
116
- ->setPmFamily('Cards: exceptions');
117
-
118
- // Cards: Online Credit 
119
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
120
- ->setPmName('NetReserve ')
121
- ->setPmValue('CreditCard ')
122
- ->setPmBrand('NetReserve ')
123
- ->setPmUrlLogo('NetReserve_choice.gif')
124
- ->setPmFamily('Cards: Online Credit ');
125
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
126
- ->setPmName('UNEUROCOM ')
127
- ->setPmValue('UNEUROCOM ')
128
- ->setPmBrand('UNEUROCOM ')
129
- ->setPmUrlLogo('UNEUROCOM_choice.gif')
130
- ->setPmFamily('Cards: Online Credit ');
131
-
132
-
133
- // WebBanking
134
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
135
- ->setPmName('CBC Online')
136
- ->setPmValue('CBC Online')
137
- ->setPmBrand('CBC Online')
138
- ->setPmUrlLogo('CBC Online_choice.gif')
139
- ->setPmFamily('WebBanking');
140
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
141
- ->setPmName('CENTEA Online')
142
- ->setPmValue('CENTEA Online')
143
- ->setPmBrand('CENTEA Online')
144
- ->setPmUrlLogo('CENTEA Online_choice.gif')
145
- ->setPmFamily('WebBanking');
146
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
147
- ->setPmName('Dexia Direct Net')
148
- ->setPmValue('Dexia Direct Net')
149
- ->setPmBrand('Dexia Direct Net')
150
- ->setPmUrlLogo('Dexia Direct Net_choice.gif')
151
- ->setPmFamily('WebBanking');
152
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
153
- ->setPmName('eDankort')
154
- ->setPmValue('eDankort')
155
- ->setPmBrand('eDankort')
156
- ->setPmUrlLogo('eDankort_choice.gif')
157
- ->setPmFamily('WebBanking');
158
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
159
- ->setPmName('EPS')
160
- ->setPmValue('EPS')
161
- ->setPmBrand('EPS')
162
- ->setPmUrlLogo('EPS_choice.gif')
163
- ->setPmFamily('WebBanking');
164
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
165
- ->setPmName('iDEAL')
166
- ->setPmValue('iDEAL')
167
- ->setPmBrand('iDEAL')
168
- ->setPmUrlLogo('iDEAL_choice.gif')
169
- ->setPmFamily('WebBanking');
170
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
171
- ->setPmName('ING HomePay')
172
- ->setPmValue('ING HomePay')
173
- ->setPmBrand('ING HomePay')
174
- ->setPmUrlLogo('ING HomePay_choice.gif')
175
- ->setPmFamily('WebBanking');
176
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
177
- ->setPmName('KBC Online')
178
- ->setPmValue('KBC Online')
179
- ->setPmBrand('KBC Online')
180
- ->setPmUrlLogo('KBC Online_choice.gif')
181
- ->setPmFamily('WebBanking');
182
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
183
- ->setPmName('PostFinance Debit Direct')
184
- ->setPmValue('PostFinance Debit Direct')
185
- ->setPmBrand('PostFinance Debit Direct')
186
- ->setPmUrlLogo('PostFinance Debit Direct_choice.gif')
187
- ->setPmFamily('WebBanking');
188
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
189
- ->setPmName('PostFinance yellownet')
190
- ->setPmValue('PostFinance yellownet')
191
- ->setPmBrand('PostFinance yellownet')
192
- ->setPmUrlLogo('PostFinance yellownet_choice.gif')
193
- ->setPmFamily('WebBanking');
194
-
195
- // Direct Debits
196
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
197
- ->setPmName('Direct Debits DE')
198
- ->setPmValue('Direct Debits DE')
199
- ->setPmBrand('Direct Debits DE')
200
- ->setPmUrlLogo('Direct Debits DE_choice.gif')
201
- ->setPmFamily('Direct Debits');
202
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
203
- ->setPmName('Direct Debits NL')
204
- ->setPmValue('Direct Debits NL')
205
- ->setPmBrand('Direct Debits NL')
206
- ->setPmUrlLogo('Direct Debits NL_choice.gif')
207
- ->setPmFamily('Direct Debits');
208
-
209
- // Offline payment
210
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
211
- ->setPmName('Acceptgiro ')
212
- ->setPmValue('Acceptgiro ')
213
- ->setPmBrand('Acceptgiro ')
214
- ->setPmUrlLogo('Acceptgiro _choice.gif')
215
- ->setPmFamily('Offline payment ');
216
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
217
- ->setPmName('Bank transfer ')
218
- ->setPmValue('Bank transfer ')
219
- ->setPmBrand('Bank transfer ')
220
- ->setPmUrlLogo('Bank transfer _choice.gif')
221
- ->setPmFamily('Offline payment ');
222
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
223
- ->setPmName('Payment on Delivery ')
224
- ->setPmValue('Payment on Delivery ')
225
- ->setPmBrand('Payment on Delivery ')
226
- ->setPmUrlLogo('Payment on Delivery _choice.gif')
227
- ->setPmFamily('Offline payment ');
228
-
229
-
230
- // Micro
231
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
232
- ->setPmName('MiniTix')
233
- ->setPmValue('MiniTix')
234
- ->setPmBrand('MiniTix')
235
- ->setPmUrlLogo('MiniTix_choice.gif')
236
- ->setPmFamily('Micro');
237
-
238
- // Mobile
239
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
240
- ->setPmName('TUNZ')
241
- ->setPmValue('TUNZ')
242
- ->setPmBrand('TUNZ')
243
- ->setPmUrlLogo('TUNZ_choice.gif')
244
- ->setPmFamily('Mobile');
245
-
246
- // Others
247
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
248
- ->setPmName('PAYPAL')
249
- ->setPmValue('PAYPAL')
250
- ->setPmBrand('PAYPAL')
251
- ->setPmUrlLogo('PAYPAL_choice.gif')
252
- ->setPmFamily('Others');
253
- $pmList[] = Mage::getModel('internetkassa/paymentMethod')
254
- ->setPmName('Wallie')
255
- ->setPmValue('Wallie')
256
- ->setPmBrand('Wallie')
257
- ->setPmUrlLogo('Wallie_choice.gif')
258
- ->setPmFamily('Others');
259
-
260
- return $pmList;
261
- }
262
-
263
- public function getLangList(){
264
-
265
- return array(
266
- array('value' => 'en_US', 'label' => Mage::helper('internetkassa')->__('English (default)')),
267
- array('value' => 'fr_FR', 'label' => Mage::helper('internetkassa')->__('French')),
268
- array('value' => 'nl_NL', 'label' => Mage::helper('internetkassa')->__('Dutch')),
269
- array('value' => 'nl_BE', 'label' => Mage::helper('internetkassa')->__('Flemish')),
270
- array('value' => 'it_IT', 'label' => Mage::helper('internetkassa')->__('Italian')),
271
- array('value' => 'de_DE', 'label' => Mage::helper('internetkassa')->__('German')),
272
- array('value' => 'es_ES', 'label' => Mage::helper('internetkassa')->__('Spanish')),
273
- array('value' => 'no_NO', 'label' => Mage::helper('internetkassa')->__('Norwegian')),
274
- array('value' => 'tr_TR', 'label' => Mage::helper('internetkassa')->__('Turkish')),
275
- );
276
-
277
- }
278
-
279
- public function getCurrencyList(){
280
-
281
- return array(
282
-
283
- array('value' => 'AED', 'label' => Mage::helper('internetkassa')->__('United Arab Emirates Dirham')),
284
- array('value' => 'AUD', 'label' => Mage::helper('internetkassa')->__('Australian Dollar')),
285
- array('value' => 'CAD', 'label' => Mage::helper('internetkassa')->__('Canadian Dollar')),
286
- array('value' => 'CHF', 'label' => Mage::helper('internetkassa')->__('Swiss Franc')),
287
- array('value' => 'CNY', 'label' => Mage::helper('internetkassa')->__('Chinese Yuan Renminbi')),
288
- array('value' => 'CYP', 'label' => Mage::helper('internetkassa')->__('Cyprus Pound')),
289
- array('value' => 'CZK', 'label' => Mage::helper('internetkassa')->__('Czech koruna')),
290
- array('value' => 'DKK', 'label' => Mage::helper('internetkassa')->__('Danish Krone')),
291
- array('value' => 'EEK', 'label' => Mage::helper('internetkassa')->__('Estonian Kroon')),
292
- array('value' => 'GBP', 'label' => Mage::helper('internetkassa')->__('Pound sterling')),
293
- array('value' => 'EUR', 'label' => Mage::helper('internetkassa')->__('Euro')),
294
- array('value' => 'HKD', 'label' => Mage::helper('internetkassa')->__('Hong Kong Dollar')),
295
- array('value' => 'HRK', 'label' => Mage::helper('internetkassa')->__('Croatian Kuna')),
296
- array('value' => 'USD', 'label' => Mage::helper('internetkassa')->__('US Dollar')),
297
- );
298
-
299
- }
300
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Api.php ADDED
@@ -0,0 +1,258 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa payment method model
29
+ */
30
+ class Morningtime_Internetkassa_Model_Api extends Mage_Payment_Model_Method_Abstract
31
+ {
32
+ protected $_code = 'internetkassa';
33
+ protected $_formBlockType = 'internetkassa/form';
34
+ protected $_infoBlockType = 'internetkassa/info';
35
+ protected $_config = null;
36
+
37
+ /**
38
+ * Availability options
39
+ */
40
+ protected $_isGateway = false;
41
+ protected $_canAuthorize = true;
42
+ protected $_canCapture = false;
43
+ protected $_canCapturePartial = false;
44
+ protected $_canRefund = false;
45
+ protected $_canVoid = false;
46
+ protected $_canUseInternal = false;
47
+ protected $_canUseCheckout = true;
48
+ protected $_canUseForMultishipping = false;
49
+
50
+ /* Internetkassa template modes */
51
+ const TEMPLATE_OGONE = 'internetkassa';
52
+ const TEMPLATE_MAGENTO = 'magento';
53
+
54
+ /* Internetkassa payment process statuses */
55
+ const PENDING_OGONE_STATUS = 'pending_internetkassa';
56
+ const CANCEL_OGONE_STATUS = 'cancel_internetkassa';
57
+ const DECLINE_OGONE_STATUS = 'decline_internetkassa';
58
+ const PROCESSING_OGONE_STATUS = 'processing_internetkassa';
59
+ const WAITING_AUTHORIZATION = 'waiting_authorozation';
60
+ const PROCESSED_OGONE_STATUS = 'processed_internetkassa';
61
+
62
+ /* Internetkassa responce statuses */
63
+ const OGONE_PAYMENT_REQUESTED_STATUS = 9;
64
+ const OGONE_PAYMENT_PROCESSING_STATUS = 91;
65
+ const OGONE_AUTH_UKNKOWN_STATUS = 52;
66
+ const OGONE_PAYMENT_UNCERTAIN_STATUS = 92;
67
+ const OGONE_PAYMENT_INCOMPLETE = 1;
68
+ const OGONE_AUTH_REFUZED = 2;
69
+ const OGONE_AUTH_PROCESSING = 51;
70
+ const OGONE_TECH_PROBLEM = 93;
71
+ const OGONE_AUTHORIZED = 5;
72
+
73
+ /* Layout of the payment method */
74
+ const PMLIST_HORISONTAL_LEFT = 0;
75
+ const PMLIST_HORISONTAL = 1;
76
+ const PMLIST_VERTICAL = 2;
77
+
78
+ /* internetkassa paymen action constant*/
79
+ const OGONE_AUTHORIZE_ACTION = 'RES';
80
+ const OGONE_AUTHORIZE_CAPTURE_ACTION = 'SAL';
81
+
82
+ /**
83
+ * Init Internetkassa Api instance, detup default values
84
+ *
85
+ * @return Morningtime_Internetkassa_Model_Api
86
+ */
87
+ public function __construct()
88
+ {
89
+ $this->_config = Mage::getSingleton('internetkassa/config');
90
+ return $this;
91
+ }
92
+
93
+ /**
94
+ * Return internetkassa config instance
95
+ *
96
+ * @return Morningtime_Internetkassa_Model_Config
97
+ */
98
+ public function getConfig()
99
+ {
100
+ return $this->_config;
101
+ }
102
+
103
+ /**
104
+ * Return debug flag by storeConfig
105
+ *
106
+ * @param int storeId
107
+ * @return bool
108
+ */
109
+ public function getDebug($storeId=null)
110
+ {
111
+ return $this->getConfig()->getConfigData('debug_flag', $storeId);
112
+ }
113
+
114
+ /**
115
+ * Flag witch prevent automatic invoice creation
116
+ *
117
+ * @return bool
118
+ */
119
+ public function isInitializeNeeded()
120
+ {
121
+ return true;
122
+ }
123
+
124
+ /**
125
+ * Redirect url to internetkassa submit form
126
+ *
127
+ * @return string
128
+ */
129
+ public function getOrderPlaceRedirectUrl()
130
+ {
131
+ return Mage::getUrl('internetkassa/api/placeform', array('_secure' => true));
132
+ }
133
+
134
+ /**
135
+ * Return payment_action value from config area
136
+ *
137
+ * @return string
138
+ */
139
+ public function getPaymentAction()
140
+ {
141
+ return $this->getConfig()->getConfigData('payment_action');
142
+ }
143
+
144
+ /**
145
+ * Rrepare params array to send it to gateway page via POST
146
+ *
147
+ * @param Mage_Sales_Model_Order
148
+ * @return array
149
+ */
150
+ public function getFormFields($order)
151
+ {
152
+ if (empty($order)) {
153
+ if (!($order = $this->getOrder())) {
154
+ return array();
155
+ }
156
+ }
157
+ $billingAddress = $order->getBillingAddress();
158
+ $formFields = array();
159
+ $formFields['PSPID'] = $this->getConfig()->getPSPID();
160
+ $formFields['orderID'] = $order->getIncrementId();
161
+ $formFields['amount'] = round($order->getBaseGrandTotal()*100);
162
+ $formFields['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
163
+ $formFields['language'] = Mage::app()->getLocale()->getLocaleCode();
164
+
165
+ $formFields['CN'] = $this->_translate($billingAddress->getFirstname().' '.$billingAddress->getLastname());
166
+ $formFields['EMAIL'] = $order->getCustomerEmail();
167
+ $formFields['ownerZIP'] = $billingAddress->getPostcode();
168
+ $formFields['ownercty'] = $billingAddress->getCountry();
169
+ $formFields['ownertown']= $this->_translate($billingAddress->getCity());
170
+ $formFields['COM'] = $this->_translate($this->_getOrderDescription($order));
171
+ $formFields['ownertelno'] = $billingAddress->getTelephone();
172
+ $formFields['owneraddress'] = $this->_translate(str_replace("\n", ' ',$billingAddress->getStreet(-1)));
173
+
174
+ $paymentAction = $this->_getInternetkassaPaymentOperation();
175
+ if ($paymentAction ) {
176
+ $formFields['operation'] = $paymentAction;
177
+ }
178
+
179
+ $secretCode = $this->getConfig()->getShaOutCode();
180
+ $secretSet = $formFields['orderID'] . $formFields['amount'] . $formFields['currency'] .
181
+ $formFields['PSPID'] . $paymentAction . $secretCode;
182
+
183
+ $formFields['SHASign'] = Mage::helper('internetkassa')->shaCrypt($secretSet);
184
+
185
+ $formFields['homeurl'] = $this->getConfig()->getHomeUrl();
186
+ $formFields['catalogurl'] = $this->getConfig()->getHomeUrl();
187
+ $formFields['accepturl'] = $this->getConfig()->getAcceptUrl();
188
+ $formFields['declineurl'] = $this->getConfig()->getDeclineUrl();
189
+ $formFields['exceptionurl'] = $this->getConfig()->getExceptionUrl();
190
+ $formFields['cancelurl'] = $this->getConfig()->getCancelUrl();
191
+
192
+ if ($this->getConfig()->getConfigData('template')=='internetkassa') {
193
+ $formFields['TP']= '';
194
+ $formFields['PMListType'] = $this->getConfig()->getConfigData('pmlist');
195
+ } else {
196
+ $formFields['TP']= $this->getConfig()->getPayPageTemplate();
197
+ }
198
+ $formFields['TITLE'] = $this->_translate($this->getConfig()->getConfigData('html_title'));
199
+ $formFields['BGCOLOR'] = $this->getConfig()->getConfigData('bgcolor');
200
+ $formFields['TXTCOLOR'] = $this->getConfig()->getConfigData('txtcolor');
201
+ $formFields['TBLBGCOLOR'] = $this->getConfig()->getConfigData('tblbgcolor');
202
+ $formFields['TBLTXTCOLOR'] = $this->getConfig()->getConfigData('tbltxtcolor');
203
+ $formFields['BUTTONBGCOLOR'] = $this->getConfig()->getConfigData('buttonbgcolor');
204
+ $formFields['BUTTONTXTCOLOR'] = $this->getConfig()->getConfigData('buttontxtcolor');
205
+ $formFields['FONTTYPE'] = $this->getConfig()->getConfigData('fonttype');
206
+ $formFields['LOGO'] = $this->getConfig()->getConfigData('logo');
207
+ return $formFields;
208
+ }
209
+
210
+ /**
211
+ * to translate UTF 8 to ISO 8859-1
212
+ * Internetkassa system is only compatible with iso-8859-1 and does not (yet) fully support the utf-8
213
+ */
214
+ protected function _translate($text)
215
+ {
216
+ return htmlentities(iconv("UTF-8", "ISO-8859-1", $text));
217
+ }
218
+
219
+ /**
220
+ * Get Internetkassa Payment Action value
221
+ *
222
+ * @param string
223
+ * @return string
224
+ */
225
+ protected function _getInternetkassaPaymentOperation()
226
+ {
227
+ $value = $this->getPaymentAction();
228
+ if ($value==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE) {
229
+ $value = Morningtime_Internetkassa_Model_Api::OGONE_AUTHORIZE_ACTION;
230
+ } elseif ($value==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE) {
231
+ $value = Morningtime_Internetkassa_Model_Api::OGONE_AUTHORIZE_CAPTURE_ACTION;
232
+ }
233
+ return $value;
234
+ }
235
+
236
+ /**
237
+ * get formated order description
238
+ *
239
+ * @param Mage_Sales_Model_Order
240
+ * @return string
241
+ */
242
+ protected function _getOrderDescription($order)
243
+ {
244
+ $invoiceDesc = '';
245
+ $lengs = 0;
246
+ foreach ($order->getAllItems() as $item) {
247
+ if ($item->getParentItem()) {
248
+ continue;
249
+ }
250
+ //COM filed can only handle max 100
251
+ if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 100) {
252
+ break;
253
+ }
254
+ $invoiceDesc .= $item->getName() . ', ';
255
+ }
256
+ return Mage::helper('core/string')->substr($invoiceDesc, 0, -2);
257
+ }
258
+ }
app/code/community/Morningtime/Internetkassa/Model/Api/Debug.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa debug model
29
+ */
30
+ class Morningtime_Internetkassa_Model_Api_Debug extends Mage_Core_Model_Abstract
31
+ {
32
+ /**
33
+ * Init internetkassa debug model
34
+ *
35
+ */
36
+ protected function _construct()
37
+ {
38
+ $this->_init('internetkassa/api_debug');
39
+ }
40
+ }
app/code/community/Morningtime/Internetkassa/Model/Config.php ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Config model
29
+ */
30
+ class Morningtime_Internetkassa_Model_Config extends Mage_Payment_Model_Config
31
+ {
32
+ const OGONE_PAYMENT_PATH = 'payment/internetkassa/';
33
+
34
+ /**
35
+ * Return internetkassa payment config information
36
+ *
37
+ * @param string $path
38
+ * @param int $storeId
39
+ * @return Simple_Xml
40
+ */
41
+ public function getConfigData($path, $storeId=null)
42
+ {
43
+ if (!empty($path)) {
44
+ return Mage::getStoreConfig(self::OGONE_PAYMENT_PATH . $path, $storeId);
45
+ }
46
+ return false;
47
+ }
48
+
49
+ /**
50
+ * Return SHA1-in crypt key from config. Setup on admin place.
51
+ *
52
+ * @param int $storeId
53
+ * @return string
54
+ */
55
+ public function getShaInCode($storeId=null)
56
+ {
57
+ return Mage::helper('core')->decrypt($this->getConfigData('secret_key_in', $storeId));
58
+ }
59
+
60
+ /**
61
+ * Return SHA1-out crypt key from config. Setup on admin place.
62
+ * @param int $storeId
63
+ * @return string
64
+ */
65
+ public function getShaOutCode($storeId=null)
66
+ {
67
+ return Mage::helper('core')->decrypt($this->getConfigData('secret_key_out', $storeId));
68
+ }
69
+
70
+ /**
71
+ * Return gateway path, get from confing. Setup on admin place.
72
+ *
73
+ * @param int $storeId
74
+ * @return string
75
+ */
76
+ public function getGatewayPath($storeId=null)
77
+ {
78
+ return $this->getConfigData('internetkassa_gateway', $storeId);
79
+ }
80
+
81
+ /**
82
+ * Get PSPID, affiliation name in internetkassa system
83
+ *
84
+ * @param int $storeId
85
+ * @return string
86
+ */
87
+ public function getPSPID($storeId=null)
88
+ {
89
+ return $this->getConfigData('pspid', $storeId);
90
+ }
91
+
92
+ /**
93
+ * Get paypage template for magento style templates using
94
+ *
95
+ * @return string
96
+ */
97
+ public function getPayPageTemplate()
98
+ {
99
+ return Mage::getUrl('internetkassa/api/paypage');
100
+ }
101
+
102
+ /**
103
+ * Return url which internetkassa system will use as accept
104
+ *
105
+ * @return string
106
+ */
107
+ public function getAcceptUrl()
108
+ {
109
+ return Mage::getUrl('internetkassa/api/accept');
110
+ }
111
+
112
+ /**
113
+ * Return url which internetkassa system will use as decline url
114
+ *
115
+ * @return string
116
+ */
117
+ public function getDeclineUrl()
118
+ {
119
+ return Mage::getUrl('internetkassa/api/decline');
120
+ }
121
+
122
+ /**
123
+ * Return url which internetkassa system will use as exception url
124
+ *
125
+ * @return string
126
+ */
127
+ public function getExceptionUrl()
128
+ {
129
+ return Mage::getUrl('internetkassa/api/exception');
130
+ }
131
+
132
+ /**
133
+ * Return url which internetkassa system will use as cancel url
134
+ *
135
+ * @return string
136
+ */
137
+ public function getCancelUrl()
138
+ {
139
+ return Mage::getUrl('internetkassa/api/cancel');
140
+ }
141
+
142
+ /**
143
+ * Return url which internetkassa system will use as our magento home url on internetkassa success page
144
+ *
145
+ * @return string
146
+ */
147
+ public function getHomeUrl()
148
+ {
149
+ return Mage::getUrl('checkout/cart');
150
+ }
151
+ }
app/code/community/Morningtime/Internetkassa/Model/Internetkassa.php DELETED
@@ -1,655 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Internetkassa extends Mage_Payment_Model_Method_Abstract
19
- {
20
- protected $_code = 'internetkassa';
21
-
22
- protected $_formBlockType = 'internetkassa/form';
23
- protected $_infoBlockType = 'internetkassa/info';
24
-
25
- /*
26
- * Switch the payment provider
27
- */
28
- public function getIssuerUrls() {
29
- $issuer = Mage::getStoreConfig('payment/internetkassa/issuer');
30
-
31
- switch($issuer) {
32
- case "RABO":
33
- return array("prod" => "https://i-kassa.rabobank.nl/ncol/prod/orderstandard.asp",
34
- "test" => "https://i-kassa.rabobank.nl/ncol/test/orderstandard.asp");
35
- break;
36
-
37
- case "ABNAMRO":
38
- return array("prod" => "https://internetkassa.abnamro.nl/ncol/prod/orderstandard.asp",
39
- "test" => "https://internetkassa.abnamro.nl/ncol/test/orderstandard.asp");
40
- break;
41
-
42
- case "NEOS":
43
- return array("prod" => "https://www.secure.neos-solution.com/ncol/prod/orderstandard.asp",
44
- "test" => "https://www.secure.neos-solution.com/ncol/test/orderstandard.asp");
45
- break;
46
-
47
- case "TWYP":
48
- return array("prod" => "https://twyp.secure-ing.com/ncol/prod/orderstandard.asp",
49
- "test" => "https://twyp.secure-ing.com/ncol/test/orderstandard.asp");
50
- break;
51
-
52
- case "OGONE":
53
- return array("prod" => "https://secure.ogone.com/ncol/prod/orderstandard.asp",
54
- "test" => "https://secure.ogone.com/ncol/test/orderstandard.asp");
55
- break;
56
-
57
- }
58
-
59
- }
60
-
61
- const TEST_MERCHANT_kEY = '58 6d fc 9c 34 91 9b 86 3f fd 64 63 c9 13 4a 26 ba 29 74 1e c7 e9 80 79';
62
- const TEST_CODE_SIRET = '00000000000001';
63
- const TEST_CODE_SITE = '001';
64
-
65
- protected $_customer;
66
- protected $_checkout;
67
- protected $_quote;
68
- protected $_order;
69
- protected $_allowCurrencyCodes;
70
- protected $_allowedParamToSend;
71
-
72
- /**
73
- * Availability options
74
- */
75
- protected $_isGateway = true;
76
- protected $_canAuthorize = true;
77
- protected $_canCapture = true;
78
- protected $_canCapturePartial = false;
79
- protected $_canRefund = false;
80
- protected $_canVoid = false;
81
- protected $_canUseInternal = false;
82
- protected $_canUseCheckout = true;
83
- protected $_canUseForMultishipping = true;
84
-
85
- protected $moduleTitle;
86
- protected $moduleDebugMode;
87
-
88
- /**
89
- * Internetkassa Settings
90
- *
91
- **/
92
- protected $internetkassa_PSPID;
93
- protected $internetkassa_SHA1PASS;
94
-
95
- protected $internetkassa_Currency;
96
- protected $internetkassa_Language;
97
- /* Optional fields for design */
98
- /* Static template page */
99
- protected $internetkassa_TITLE; /* Title for static template */
100
- protected $internetkassa_BGCOLOR; /* Background color for static template */
101
- protected $internetkassa_TXTCOLOR; /* Text color for static template */
102
- protected $internetkassa_TBLBGCOLOR; /* Table background color for static template */
103
- protected $internetkassa_TBLTXTCOLOR; /* Table text color for static template */
104
- protected $internetkassa_BUTTONBGCOLOR; /* Button background color for static template */
105
- protected $internetkassa_BUTTONTXTCOLOR; /* Button text color for static template */
106
- protected $internetkassa_FONTTYPE; /* Font Type for static template: default = Verdana */
107
- protected $internetkassa_LOGO; /* Logo filename for static template: send logo to support with your PSPID in the subject */
108
- /* or dynamic template page */
109
- protected $internetkassa_TP; /* The full URL of the Template Page hosted on the merchant's site and containing the "payment string" eg: http://www.MyEcommerceSite.com/TemplatePage.htm or templateSTD3.htm */
110
- /* Post-payment redirection */
111
- protected $internetkassa_accepturl; /* demo_accepturl.htm */
112
- protected $internetkassa_declineurl; /* demo_declineurl.htm */
113
- protected $internetkassa_exceptionurl; /* demo_exceptionurl.htm */
114
- protected $internetkassa_cancelurl; /* demo_cancelurl.htm */
115
- /* Link to your website in case of standard confirmation page built by Internetkassa */
116
- protected $internetkassa_homeurl;
117
- protected $internetkassa_catalogurl;
118
- /* Other optional fields */
119
- protected $internetkassa_CN; /* Optional client name */
120
- protected $internetkassa_EMAIL; /* Optional client email */
121
- protected $internetkassa_PM; /* Optional Payment Method : <EM>CreditCard, iDEAL, ING HomePay, KBC Online, CBC Online, DEXIA NetBanking</EM> */
122
- protected $internetkassa_BRAND; /* Optional, can be deduced from the card number */
123
- protected $internetkassa_SHASign;
124
- protected $internetkassa_Signature;
125
- protected $internetkassa_ownerZIP;
126
- protected $internetkassa_owneraddress;
127
- protected $internetkassa_ownercty;
128
- protected $internetkassa_Alias;
129
- protected $internetkassa_AliasUsage;
130
- protected $internetkassa_AliasOperationCOM; /* Optional order description */
131
- protected $internetkassa_COMPLUS; /* Optional additional info for post-payment feedback */
132
- protected $internetkassa_PARAMPLUS; /* Optional params for post-payment feedback */
133
- protected $internetkassa_PARAMVAR; /* Optional url Variable for post-payment feedback */
134
- protected $internetkassa_USERID; /* Optional userid for account with User Manager. */
135
- protected $internetkassa_CreditCode; /* Optional CreditCode for Cofinoga/NetReserve. */
136
-
137
-
138
- /* Getters */
139
- public function getTitle(){
140
- if($this->moduleTitle == null)
141
- $this->moduleTitle = Mage::getStoreConfig('payment/internetkassa/title');
142
-
143
- return $this->moduleTitle;
144
- }
145
-
146
- public function getDebugMode(){
147
- if($this->moduleDebugMode == null)
148
- $this->moduleDebugMode = Mage::getStoreConfig('payment/internetkassa/test');
149
-
150
- return $this->moduleDebugMode;
151
- }
152
-
153
-
154
- public function getInternetkassaPSPID(){
155
-
156
- if($this->internetkassa_PSPID == null)
157
- $this->internetkassa_PSPID = Mage::getStoreConfig('payment/internetkassa/PSPID');
158
-
159
- return $this->internetkassa_PSPID;
160
- }
161
-
162
- public function getInternetkassaSHA1PASS(){
163
-
164
- if($this->internetkassa_SHA1PASS == null)
165
- $this->internetkassa_SHA1PASS = Mage::getStoreConfig('payment/internetkassa/SHA1PASS');
166
-
167
- return $this->internetkassa_SHA1PASS;
168
- }
169
-
170
- public function getInternetkassaCurrency(){
171
-
172
- if($this->internetkassa_Currency == null)
173
- $this->internetkassa_Currency = Mage::getStoreConfig('payment/internetkassa/Currency');
174
-
175
- return $this->internetkassa_Currency;
176
- }
177
-
178
- public function getInternetkassaLanguage(){
179
- if($this->internetkassa_Language == null)
180
- $this->internetkassa_Language = Mage::getStoreConfig('payment/internetkassa/Language');
181
-
182
- return $this->internetkassa_Language;
183
- }
184
-
185
- public function getInternetkassaTITLE(){
186
- if($this->internetkassa_TITLE == null)
187
- $this->internetkassa_TITLE = Mage::getStoreConfig('payment/internetkassa/TITLE');
188
-
189
- return $this->internetkassa_TITLE;
190
- }
191
-
192
- public function getInternetkassaBGCOLOR(){
193
- if($this->internetkassa_BGCOLOR == null)
194
- $this->internetkassa_BGCOLOR = Mage::getStoreConfig('payment/internetkassa/BGCOLOR');
195
-
196
- return $this->internetkassa_BGCOLOR;
197
- }
198
-
199
- public function getInternetkassaTXTCOLOR(){
200
- if($this->internetkassa_TXTCOLOR == null)
201
- $this->internetkassa_TXTCOLOR = Mage::getStoreConfig('payment/internetkassa/TXTCOLOR');
202
-
203
- return $this->internetkassa_TXTCOLOR;
204
- }
205
-
206
- public function getInternetkassaTBLBGCOLOR(){
207
- if($this->internetkassa_TBLBGCOLOR == null)
208
- $this->internetkassa_TBLBGCOLOR = Mage::getStoreConfig('payment/internetkassa/TBLBGCOLOR');
209
-
210
- return $this->internetkassa_TBLBGCOLOR;
211
- }
212
-
213
- public function getInternetkassaTBLTXTCOLOR(){
214
- if($this->internetkassa_TBLTXTCOLOR == null)
215
- $this->internetkassa_TBLTXTCOLOR = Mage::getStoreConfig('payment/internetkassa/TBLTXTCOLOR');
216
-
217
- return $this->internetkassa_TBLTXTCOLOR;
218
- }
219
-
220
- public function getInternetkassaBUTTONBGCOLOR(){
221
- if($this->internetkassa_BUTTONBGCOLOR == null)
222
- $this->internetkassa_BUTTONBGCOLOR = Mage::getStoreConfig('payment/internetkassa/BUTTONBGCOLOR');
223
-
224
- return $this->internetkassa_BUTTONBGCOLOR;
225
- }
226
-
227
- public function getInternetkassaBUTTONTXTCOLOR(){
228
- if($this->internetkassa_BUTTONTXTCOLOR == null)
229
- $this->internetkassa_BUTTONTXTCOLOR = Mage::getStoreConfig('payment/internetkassa/BUTTONTXTCOLOR');
230
-
231
- return $this->internetkassa_BUTTONTXTCOLOR;
232
- }
233
-
234
- public function getInternetkassaFONTTYPE(){
235
- if($this->internetkassa_FONTTYPE == null)
236
- $this->internetkassa_FONTTYPE = Mage::getStoreConfig('payment/internetkassa/FONTTYPE');
237
-
238
- return $this->internetkassa_FONTTYPE;
239
- }
240
-
241
- public function getInternetkassaLOGO(){
242
- if($this->internetkassa_LOGO == null)
243
- $this->internetkassa_LOGO = Mage::getStoreConfig('payment/internetkassa/LOGO');
244
-
245
- return $this->internetkassa_LOGO;
246
- }
247
-
248
- public function getInternetkassaTP(){
249
- if($this->internetkassa_TP == null)
250
- $this->internetkassa_TP = Mage::getStoreConfig('payment/internetkassa/TP');
251
-
252
- return $this->internetkassa_TP;
253
- }
254
-
255
- public function getInternetkassaAcceptUrl(){
256
- if($this->internetkassa_accepturl == null)
257
- $this->internetkassa_accepturl = Mage::getStoreConfig('payment/internetkassa/accepturl');
258
-
259
- return $this->internetkassa_accepturl;
260
- }
261
-
262
- public function getInternetkassaDeclineUrl(){
263
- if($this->internetkassa_declineurl == null)
264
- $this->internetkassa_declineurl = Mage::getStoreConfig('payment/internetkassa/declineurl');
265
-
266
- return $this->internetkassa_declineurl;
267
- }
268
-
269
- public function getInternetkassaExceptionUrl(){
270
- if($this->internetkassa_exceptionurl == null)
271
- $this->internetkassa_exceptionurl = Mage::getStoreConfig('payment/internetkassa/exceptionurl');
272
-
273
- return $this->internetkassa_exceptionurl;
274
- }
275
-
276
- public function getInternetkassaCancelUrl(){
277
- if($this->internetkassa_cancelurl == null)
278
- $this->internetkassa_cancelurl = Mage::getStoreConfig('payment/internetkassa/cancelurl');
279
-
280
- return $this->internetkassa_cancelurl;
281
- }
282
-
283
- public function getInternetkassaHomeUrl(){
284
- if($this->internetkassa_homeurl == null)
285
- $this->internetkassa_homeurl = Mage::getStoreConfig('payment/internetkassa/homeurl');
286
-
287
- return $this->internetkassa_homeurl;
288
- }
289
-
290
- public function getInternetkassaCatalogUrl(){
291
- if($this->internetkassa_catalogurl == null)
292
- $this->internetkassa_catalogurl = Mage::getStoreConfig('payment/internetkassa/catalogurl');
293
-
294
- return $this->internetkassa_catalogurl;
295
- }
296
-
297
- public function getInternetkassaCN(){
298
- if($this->internetkassa_CN == null)
299
- $this->internetkassa_CN = Mage::getStoreConfig('payment/internetkassa/CN');
300
-
301
- return $this->internetkassa_CN;
302
- }
303
-
304
- public function getInternetkassaEMAIL(){
305
- if($this->internetkassa_EMAIL == null)
306
- $this->internetkassa_EMAIL = Mage::getStoreConfig('payment/internetkassa/EMAIL');
307
-
308
- return $this->internetkassa_EMAIL;
309
- }
310
-
311
- public function getInternetkassaPM(){
312
- if($this->internetkassa_PM == null)
313
- $this->internetkassa_PM = Mage::getStoreConfig('payment/internetkassa/PM');
314
-
315
- return $this->internetkassa_PM;
316
- }
317
-
318
- public function getInternetkassaBRAND(){
319
- if($this->internetkassa_BRAND == null)
320
- $this->internetkassa_BRAND = Mage::getStoreConfig('payment/internetkassa/BRAND');
321
-
322
- return $this->internetkassa_BRAND;
323
- }
324
-
325
-
326
- public function getInternetkassaSignature(){
327
- if($this->internetkassa_Signature == null)
328
- $this->internetkassa_Signature = Mage::getStoreConfig('payment/internetkassa/Signature');
329
-
330
- return $this->internetkassa_Signature;
331
- }
332
-
333
- public function getInternetkassaOwnerZIP(){
334
- if($this->internetkassa_ownerZIP == null)
335
- $this->internetkassa_ownerZIP = Mage::getStoreConfig('payment/internetkassa/ownerZIP');
336
-
337
- return $this->internetkassa_ownerZIP;
338
- }
339
-
340
- public function getInternetkassaOwnerAddress(){
341
- if($this->internetkassa_owneraddress == null)
342
- $this->internetkassa_owneraddress = Mage::getStoreConfig('payment/internetkassa/owneraddress');
343
-
344
- return $this->internetkassa_owneraddress;
345
- }
346
-
347
- public function getInternetkassaOwnerCty(){
348
- if($this->internetkassa_ownercty == null)
349
- $this->internetkassa_ownercty = Mage::getStoreConfig('payment/internetkassa/ownercty');
350
-
351
- return $this->internetkassa_ownercty;
352
- }
353
-
354
- public function getInternetkassaAlias(){
355
- if($this->internetkassa_Alias == null)
356
- $this->internetkassa_Alias = Mage::getStoreConfig('payment/internetkassa/Alias');
357
-
358
- return $this->internetkassa_Alias;
359
- }
360
-
361
- public function getInternetkassaAliasUsage(){
362
- if($this->internetkassa_AliasUsage == null)
363
- $this->internetkassa_AliasUsage = Mage::getStoreConfig('payment/internetkassa/AliasUsage');
364
-
365
- return $this->internetkassa_AliasUsage;
366
- }
367
-
368
- public function getInternetkassaAliasOperationCOM(){
369
- if($this->internetkassa_OperationCOM == null)
370
- $this->internetkassa_OperationCOM = Mage::getStoreConfig('payment/internetkassa/OperationCOM');
371
-
372
- return $this->internetkassa_OperationCOM;
373
- }
374
-
375
- public function getInternetkassaCOMPLUS(){
376
- if($this->internetkassa_COMPLUS == null)
377
- $this->internetkassa_COMPLUS = Mage::getStoreConfig('payment/internetkassa/COMPLUS');
378
-
379
- return $this->internetkassa_COMPLUS;
380
- }
381
-
382
- public function getInternetkassaPARAMPLUS(){
383
- if($this->internetkassa_PARAMPLUS == null)
384
- $this->internetkassa_PARAMPLUS = Mage::getStoreConfig('payment/internetkassa/PARAMPLUS');
385
-
386
- return $this->internetkassa_PARAMPLUS;
387
- }
388
-
389
- public function getInternetkassaPARAMVAR(){
390
- if($this->internetkassa_PARAMVAR == null)
391
- $this->internetkassa_PARAMVAR = Mage::getStoreConfig('payment/internetkassa/PARAMVAR');
392
-
393
- return $this->internetkassa_PARAMVAR;
394
- }
395
-
396
- public function getInternetkassaUSERID(){
397
- if($this->internetkassa_USERID == null)
398
- $this->internetkassa_USERID = Mage::getStoreConfig('payment/internetkassa/USERID');
399
-
400
- return $this->internetkassa_USERID;
401
- }
402
-
403
- public function getInternetkassaCreditCode(){
404
- if($this->internetkassa_CreditCode == null)
405
- $this->internetkassa_CreditCode = Mage::getStoreConfig('payment/internetkassa/CreditCode');
406
-
407
- return $this->internetkassa_CreditCode;
408
- }
409
-
410
- /**
411
- * Return the url for the getaway
412
- * @return
413
- */
414
- public function getInternetkassaUrl(){
415
-
416
- $setIssuerUrls = $this->getIssuerUrls();
417
-
418
- if($this->getDebugMode())
419
- return $setIssuerUrls["test"];
420
- else
421
- return $setIssuerUrls["prod"];
422
- }
423
-
424
- /**
425
- * Assign data to info model instance
426
- *
427
- * @param mixed $data
428
- * @return Mage_Internetkassa_Model_Method_Internetkassa
429
- */
430
-
431
- public function assignData($data)
432
- {
433
- if (!($data instanceof Varien_Object)) {
434
- $data = new Varien_Object($data);
435
- }
436
- $info = $this->getInfoInstance();
437
- $info->setCcType($data->getCcType());
438
-
439
- return $this;
440
- }
441
-
442
-
443
- public function validate()
444
- {
445
- $errorMsg = false;
446
- $info = $this->getInfoInstance();
447
-
448
- $ccType = $info->getCcType();
449
-
450
- if(empty($ccType)){
451
- $errorMsg = $this->__('You have to choose a payment method!');
452
- }
453
-
454
- if($errorMsg){
455
- Mage::throwException($errorMsg);
456
- }
457
-
458
- return $this;
459
- }
460
-
461
- protected function getSuccessURL()
462
- {
463
- return Mage::getUrl('/internetkassa/result/success', array('_secure' => true));
464
- }
465
-
466
- protected function getErrorURL()
467
- {
468
- return Mage::getUrl('/internetkassa/result/error', array('_secure' => true));
469
- }
470
-
471
- /**
472
- * Capture payment
473
- *
474
- * @param Varien_Object $orderPayment
475
- * @return Mage_Payment_Model_Abstract
476
- */
477
- public function capture(Varien_Object $payment, $amount)
478
- {
479
- $payment->setStatus(self::STATUS_APPROVED)
480
- ->setLastTransId($this->getTransactionId());
481
-
482
- return $this;
483
- }
484
-
485
-
486
- /**
487
- * add all needed fields for internetkassa
488
- * @return
489
- * @param $forms Object
490
- */
491
- public function addInternetkassaFields($form){
492
-
493
- // get payment mode
494
- $payment = $this->getQuote()->getPayment();
495
-
496
- $ccType = $payment->getCcType();
497
-
498
- $list = Mage::getModel('internetkassa/source_paymentMethodsList')->getPMList();
499
- for ($i = 0; $i < sizeof($list); $i++) {
500
- if($list[$i]->getPmName() == $ccType){
501
- $this->internetkassa_PM = $list[$i]->getPmValue();
502
- $this->internetkassa_BRAND = $list[$i]->getPmBrand();
503
- }
504
- }
505
-
506
- // set values
507
- // customer information
508
- $this->internetkassa_CN = $this->getCustomer()->getFirstname() . ' ' . $this->getCustomer()->getLastname();
509
- $this->internetkassa_EMAIL = $this->getCustomer()->getEmail();
510
- //$this->internetkassa_owneraddress =
511
- //$this->internetkassa_ownerZIP =
512
- //$this->internetkassa_ownercty =
513
-
514
- // order information
515
- $form->addField("amount", 'hidden', array('name' => 'amount', 'value' => round($this->getOrder()->getBaseGrandTotal(), 2)*100));
516
- $form->addField("orderID", 'hidden', array('name' => 'orderID', 'value' => $this->getOrder()->getRealOrderId()));
517
-
518
- $form->addField("PSPID", 'hidden', array('name' => 'PSPID', 'value' => $this->getInternetkassaPSPID()));
519
-
520
- $form->addField("Currency", 'hidden', array('name' => 'Currency', 'value' => $this->getInternetkassaCurrency()));
521
-
522
- $form->addField("Language", 'hidden', array('name' => 'Language', 'value' => $this->getInternetkassaLanguage()));
523
-
524
- $form->addField("PAGE_TITLE", 'hidden', array('name' => 'PAGE_TITLE', 'value' => $this->getInternetkassaTITLE()));
525
- $form->addField("BGCOLOR", 'hidden', array('name' => 'Language', 'value' => $this->getInternetkassaLanguage()));
526
- $form->addField("TXTCOLOR", 'hidden', array('name' => 'TXTCOLOR', 'value' => $this->getInternetkassaTXTCOLOR()));
527
- $form->addField("TBLBGCOLOR", 'hidden', array('name' => 'TBLBGCOLOR', 'value' => $this->getInternetkassaTBLBGCOLOR()));
528
- $form->addField("TBLTXTCOLOR", 'hidden', array('name' => 'TBLTXTCOLOR', 'value' => $this->getInternetkassaTBLTXTCOLOR()));
529
- $form->addField("BUTTONBGCOL", 'hidden', array('name' => 'BUTTONBGCOL', 'value' => $this->getInternetkassaBUTTONBGCOL()));
530
- $form->addField("BUTTONTXTCOLOR", 'hidden', array('name' => 'BUTTONTXTCOLOR', 'value' => $this->getInternetkassaBUTTONTXTCOLOR()));
531
- $form->addField("FONTTYPE", 'hidden', array('name' => 'FONTTYPE', 'value' => $this->getInternetkassaFONTTYPE()));
532
- $form->addField("LOGO", 'hidden', array('name' => 'LOGO', 'value' => $this->getInternetkassaLOGO()));
533
- $form->addField("TP", 'hidden', array('name' => 'TP', 'value' => $this->getInternetkassaTP()));
534
-
535
- $form->addField("accepturl", 'hidden', array('name' => 'accepturl', 'value' => $this->getInternetkassaAccepturl()));
536
- $form->addField("declineurl", 'hidden', array('name' => 'declineurl', 'value' => $this->getInternetkassaDeclineurl()));
537
- $form->addField("exceptionurl", 'hidden', array('name' => 'exceptionurl', 'value' => $this->getInternetkassaExceptionurl()));
538
- $form->addField("cancelurl", 'hidden', array('name' => 'cancelurl', 'value' => $this->getInternetkassaCancelurl()));
539
- $form->addField("homeurl", 'hidden', array('name' => 'homeurl', 'value' => $this->getInternetkassaHomeurl()));
540
- $form->addField("catalogurl", 'hidden', array('name' => 'catalogurl', 'value' => $this->getInternetkassaCatalogurl()));
541
-
542
- $form->addField("CN", 'hidden', array('name' => 'CN', 'value' => $this->getInternetkassaCN()));
543
- $form->addField("EMAIL", 'hidden', array('name' => 'EMAIL', 'value' => $this->getInternetkassaEMAIL()));
544
- $form->addField("PM", 'hidden', array('name' => 'PM', 'value' => $this->getInternetkassaPM()));
545
- $form->addField("BRAND", 'hidden', array('name' => 'BRAND', 'value' => $this->getInternetkassaBRAND()));
546
-
547
- $form->addField("Signature", 'hidden', array('name' => 'Signature', 'value' => $this->getInternetkassaSignature()));
548
- $form->addField("ownerZIP", 'hidden', array('name' => 'ownerZIP', 'value' => $this->getInternetkassaOwnerZIP()));
549
- $form->addField("owneraddress", 'hidden', array('name' => 'owneraddress', 'value' => $this->getInternetkassaOwneraddress()));
550
- $form->addField("ownercty", 'hidden', array('name' => 'ownercty', 'value' => $this->getInternetkassaOwnercty()));
551
- $form->addField("Alias", 'hidden', array('name' => 'Alias', 'value' => $this->getInternetkassaAlias()));
552
- $form->addField("AliasUsage", 'hidden', array('name' => 'AliasUsage', 'value' => $this->getInternetkassaAliasUsage()));
553
- $form->addField("AliasOperationCOM", 'hidden', array('name' => 'AliasOperationCOM', 'value' => $this->getInternetkassaAliasOperationCOM()));
554
- $form->addField("COMPLUS", 'hidden', array('name' => 'COMPLUS', 'value' => $this->getInternetkassaCOMPLUS()));
555
- $form->addField("PARAMPLUS", 'hidden', array('name' => 'PARAMPLUS', 'value' => $this->getInternetkassaPARAMPLUS()));
556
- $form->addField("PARAMVAR", 'hidden', array('name' => 'PARAMVAR', 'value' => $this->getInternetkassaPARAMVAR()));
557
- $form->addField("USERID", 'hidden', array('name' => 'USERID', 'value' => $this->getInternetkassaUSERID()));
558
- $form->addField("CreditCode", 'hidden', array('name' => 'CreditCode', 'value' => $this->getInternetkassaCreditCode()));
559
-
560
- $form->addField("SHASign", 'hidden', array('name' => 'SHASign', 'value' =>
561
-
562
- $this->signSHAOrder(
563
- $this->getOrder()->getRealOrderId(),
564
- round($this->getOrder()->getBaseGrandTotal(),2)*100,
565
- $this->getInternetkassaCurrency(),
566
- $this->getInternetkassaPSPID(),
567
- $this->getInternetkassaSHA1PASS()
568
- )
569
- ));
570
-
571
- return $form;
572
-
573
- }
574
-
575
- /**
576
- * Enter description here...
577
- *
578
- * @param string $orderID
579
- * @param double $amount
580
- * @param string $currency
581
- * @param string $PSPID
582
- * @param string $passSha
583
- * @return sha1 signature for this parameters
584
- */
585
- protected function signSHAOrder($orderID, $amount, $currency, $PSPID, $passSha){
586
- return sha1($orderID.$amount.$currency.$PSPID.$passSha);
587
- }
588
-
589
- /**
590
- * Return Order Place Redirect URL
591
- *
592
- * @return string Order Redirect URL
593
- */
594
- public function getOrderPlaceRedirectUrl(){
595
- return Mage::getUrl('internetkassa/result/redirect');
596
- }
597
-
598
- public function getCustomer()
599
- {
600
- if (empty($this->_customer)) {
601
- $this->_customer = Mage::getSingleton('customer/session')->getCustomer();
602
- }
603
- return $this->_customer;
604
- }
605
-
606
- public function getCheckout()
607
- {
608
- if (empty($this->_checkout)) {
609
- $this->_checkout = Mage::getSingleton('checkout/session');
610
- }
611
- return $this->_checkout;
612
- }
613
-
614
- public function getQuote()
615
- {
616
- if (empty($this->_quote)) {
617
- if (!$this->getCheckout()->getQuoteId()) {
618
- $this->getCheckout()->setQuoteId($this->getCheckout()->getInternetkassaQuoteId());
619
- }
620
- $this->_quote = $this->getCheckout()->getQuote();
621
- }
622
- return $this->_quote;
623
- }
624
-
625
- public function getOrder()
626
- {
627
- if (empty($this->_order)) {
628
- $order = Mage::getModel('sales/order');
629
- $order->loadByIncrementId($this->getCheckout()->getLastRealOrderId());
630
- $this->_order = $order;
631
- }
632
- return $this->_order;
633
- }
634
-
635
-
636
- /**
637
- * Checking response
638
- *
639
- * @param array $response
640
- * @return bool
641
- */
642
- public function checkResponse($response)
643
- {
644
- //TODO manage debugging
645
- if (isset(
646
- $response['orderID'], $response['amount'],
647
- $response['STATUS'], $response['PAYID'],
648
- $response['PM'],$response['BRAND'])) {
649
- return true;
650
- }
651
-
652
- return false;
653
- }
654
- }
655
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Mysql4/Api/Debug.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa Debug
29
+ */
30
+ class Morningtime_Internetkassa_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract
31
+ {
32
+ /**
33
+ * Init internetkassa debug resource model
34
+ *
35
+ */
36
+ protected function _construct()
37
+ {
38
+ $this->_init('internetkassa/api_debug', 'debug_id');
39
+ }
40
+ }
app/code/community/Morningtime/Internetkassa/Model/Source/Currencies.php DELETED
@@ -1,43 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_Currencies
19
- {
20
-
21
- public function toOptionArray()
22
- {
23
-
24
- return array(
25
-
26
- array('value' => 'AED', 'label' => Mage::helper('internetkassa')->__('United Arab Emirates Dirham')),
27
- array('value' => 'AUD', 'label' => Mage::helper('internetkassa')->__('Australian Dollar')),
28
- array('value' => 'CAD', 'label' => Mage::helper('internetkassa')->__('Canadian Dollar')),
29
- array('value' => 'CHF', 'label' => Mage::helper('internetkassa')->__('Swiss Franc')),
30
- array('value' => 'CNY', 'label' => Mage::helper('internetkassa')->__('Chinese Yuan Renminbi')),
31
- array('value' => 'CYP', 'label' => Mage::helper('internetkassa')->__('Cyprus Pound')),
32
- array('value' => 'CZK', 'label' => Mage::helper('internetkassa')->__('Czech koruna')),
33
- array('value' => 'DKK', 'label' => Mage::helper('internetkassa')->__('Danish Krone')),
34
- array('value' => 'EEK', 'label' => Mage::helper('internetkassa')->__('Estonian Kroon')),
35
- array('value' => 'GBP', 'label' => Mage::helper('internetkassa')->__('Pound Sterling')),
36
- array('value' => 'EUR', 'label' => Mage::helper('internetkassa')->__('Euro')),
37
- array('value' => 'HKD', 'label' => Mage::helper('internetkassa')->__('Hong Kong Dollar')),
38
- array('value' => 'HRK', 'label' => Mage::helper('internetkassa')->__('Croatian Kuna')),
39
- array('value' => 'USD', 'label' => Mage::helper('internetkassa')->__('US Dollar')),
40
- );
41
-
42
- }
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/Issuers.php DELETED
@@ -1,31 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_Issuers
19
- {
20
- public function toOptionArray()
21
- {
22
- return array(
23
- array('value' => 'RABO', 'label' => Mage::helper('internetkassa')->__('Rabo Internetkassa')),
24
- array('value' => 'ABNAMRO', 'label' => Mage::helper('internetkassa')->__('ABN AMRO Internetkassa')),
25
- array('value' => 'TWYP', 'label' => Mage::helper('internetkassa')->__('ING Bank (The Way You Pay)')),
26
- array('value' => 'NEOS', 'label' => Mage::helper('internetkassa')->__('Fortis Bank (NEOS Solutions)')),
27
- array('value' => 'OGONE', 'label' => Mage::helper('internetkassa')->__('Ogone')),
28
- );
29
-
30
- }
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/Languages.php DELETED
@@ -1,36 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_Languages
19
- {
20
-
21
- public function toOptionArray()
22
- {
23
- return array(
24
- array('value' => 'en_US', 'label' => Mage::helper('internetkassa')->__('English (default)')),
25
- array('value' => 'fr_FR', 'label' => Mage::helper('internetkassa')->__('French')),
26
- array('value' => 'nl_NL', 'label' => Mage::helper('internetkassa')->__('Dutch')),
27
- array('value' => 'nl_BE', 'label' => Mage::helper('internetkassa')->__('Flemish')),
28
- array('value' => 'it_IT', 'label' => Mage::helper('internetkassa')->__('Italian')),
29
- array('value' => 'de_DE', 'label' => Mage::helper('internetkassa')->__('German')),
30
- array('value' => 'es_ES', 'label' => Mage::helper('internetkassa')->__('Spanish')),
31
- array('value' => 'no_NO', 'label' => Mage::helper('internetkassa')->__('Norwegian')),
32
- array('value' => 'tr_TR', 'label' => Mage::helper('internetkassa')->__('Turkish')),
33
- );
34
-
35
- }
36
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/PaymentAction.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa Payment Action Dropdown source
29
+ */
30
+ class Morningtime_Internetkassa_Model_Source_PaymentAction
31
+ {
32
+ /**
33
+ * Prepare payment action list as optional array
34
+ *
35
+ * @return array
36
+ */
37
+ public function toOptionArray()
38
+ {
39
+ return array(
40
+ array('value' => '', 'label' => Mage::helper('internetkassa')->__('Internetkassa default Operation')),
41
+ array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, 'label' => Mage::helper('internetkassa')->__('Authorization')),
42
+ array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, 'label' => Mage::helper('internetkassa')->__('Direct Sale')),
43
+ );
44
+ }
45
+ }
app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethod.php DELETED
@@ -1,97 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_PaymentMethod extends Varien_Object
19
- {
20
-
21
- protected $_pmName;
22
- protected $_pmValue;
23
- protected $_pmBrand;
24
- protected $_pmUrlLogo;
25
- protected $_pmFamily;
26
- protected $_isActive;
27
-
28
- public function __construct()
29
- {
30
- parent::__construct();
31
- }
32
-
33
- public function __PaymentMethod(
34
- $pmName, $pmValue, $pmBrand, $pmUrlLogo,
35
- $pmFamily, $isActive
36
- ){
37
-
38
- $this->_pmName = $pmName;
39
- $this->_pmValue = $pmValue;
40
- $this->_pmBrand = $pmBrand;
41
- $this->_pmUrlLogo = $pmUrlLogo;
42
- $this->_pmFamily = $pmFamily;
43
- $this->_isActive = $isActive;
44
-
45
- }
46
-
47
- // getters
48
- public function getPmName(){
49
- return $this->_pmName;
50
- }
51
-
52
- public function getPmValue(){
53
- return $this->_pmValue;
54
- }
55
-
56
- public function getPmBrand(){
57
- return $this->_pmBrand;
58
- }
59
-
60
- public function getPmUrlLogo(){
61
- return $this->_pmUrlLogo;
62
- }
63
-
64
- public function getPmFamily(){
65
- return $this->_pmFamily;
66
- }
67
-
68
- public function isActive(){
69
- return $this->_isActive;
70
- }
71
-
72
- // setters
73
- public function setPmName($pmName){
74
- $this->_pmName = $pmName;
75
- }
76
-
77
- public function setPmValue($pmValue){
78
- $this->_pmValue = $pmValue;
79
- }
80
-
81
- public function setPmBrand($pmBrand){
82
- $this->_pmBrand = $pmBrand;
83
- }
84
-
85
- public function setPmUrlLogo($pmUrlLogo){
86
- $this->_pmUrlLogo = $pmUrlLogo;
87
- }
88
-
89
- public function setPmFamily($pmFamily){
90
- $this->_pmFamily = $pmFamily;
91
- }
92
-
93
- public function setIsActive($isActive){
94
- $this->_isActive = $isActive;
95
- }
96
-
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethods.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_PaymentMethods
19
- {
20
-
21
- public function toOptionArray(){
22
-
23
- $list = Mage::getModel('internetkassa/source_paymentMethodsList')->getPMList();
24
-
25
- for ($i = 0; $i < sizeof($list); $i++) {
26
- $pm = $list[$i];
27
- $pmArrayOption[] = array('value' => $pm->getPmName(), 'label' => $pm->getPmName());
28
- }
29
-
30
- return $pmArrayOption;
31
- }
32
-
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/PaymentMethodsList.php DELETED
@@ -1,264 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_Model_Source_PaymentMethodsList
19
- {
20
-
21
- public function getPMList(){
22
-
23
- $pmList = array();
24
-
25
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
26
- $pm->__PaymentMethod('=== Cards: Commons ===','Cards: exceptions',
27
- '','_choice.gif','', false);
28
- $pmList[] = $pm;
29
-
30
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
31
- $pm->__PaymentMethod('CB','CreditCard',
32
- '','Carte%20bleue_choice.gif','Cards: General', false);
33
- $pmList[] = $pm;
34
-
35
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
36
- $pm->__PaymentMethod('AIRPLUS','CreditCard',
37
- 'AIRPLUS','AIRPLUS_choice.gif','Cards: General', false);
38
- $pmList[] = $pm;
39
-
40
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
41
- $pm->__PaymentMethod('American Express','CreditCard',
42
- 'American Express','American Express_choice.gif',
43
- 'Cards: General', false);
44
- $pmList[] = $pm;
45
-
46
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
47
- $pm->__PaymentMethod('Aurora','CreditCard',
48
- 'Aurora','Aurora_choice.gif','Cards: General'
49
- , false);
50
- $pmList[] = $pm;
51
-
52
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
53
- $pm->__PaymentMethod('Aurore','CreditCard',
54
- 'Aurore','Aurore_choice.gif','Cards: General', false);
55
- $pmList[] = $pm;
56
-
57
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
58
- $pm->__PaymentMethod('Cofinoga','CreditCard',
59
- 'Cofinoga','Cofinoga_choice.gif','Cards: General', false);
60
- $pmList[] = $pm;
61
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
62
- $pm->__PaymentMethod('Dankort','CreditCard',
63
- 'Dankort','Dankort_choice.gif',
64
- 'Cards: General', false);
65
- $pmList[] = $pm;
66
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
67
- $pm->__PaymentMethod('Diners Club','CreditCard',
68
- 'Diners Club','Diners Club_choice.gif','Cards: General', false);
69
- $pmList[] = $pm;
70
-
71
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
72
- $pm->__PaymentMethod('JCB','CreditCard',
73
- 'JCB','JCB_choice.gif','Cards: General', false);
74
- $pmList[] = $pm;
75
-
76
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
77
- $pm->__PaymentMethod('MaestroUK','CreditCard',
78
- 'MaestroUK','MaestroUK_choice.gif','Cards: General', false);
79
- $pmList[] = $pm;
80
-
81
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
82
- $pm->__PaymentMethod('MasterCard','CreditCard',
83
- 'MasterCard','Eurocard_choice.gif','Cards: General', false);
84
- $pmList[] = $pm;
85
-
86
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
87
- $pm->__PaymentMethod('Solo','CreditCard',
88
- 'Solo','Solo_choice.gif','Cards: General', false);
89
- $pmList[] = $pm;
90
-
91
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
92
- $pm->__PaymentMethod('UATP','CreditCard',
93
- 'UATP','UATP_choice.gif','Cards: General', false);
94
- $pmList[] = $pm;
95
-
96
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
97
- $pm->__PaymentMethod('VISA','CreditCard',
98
- 'VISA','VISA_choice.gif','Cards: General', false);
99
- $pmList[] = $pm;
100
-
101
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
102
- $pm->__PaymentMethod('=== Cards: exceptions ===','Cards: exceptions',
103
- '','_choice.gif','', false);
104
- $pmList[] = $pm;
105
-
106
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
107
- $pm->__PaymentMethod('BCMC','CreditCard',
108
- 'BCMC','BCMC_choice.gif','Cards: exceptions', false);
109
- $pmList[] = $pm;
110
-
111
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
112
- $pm->__PaymentMethod('Maestro','CreditCard',
113
- 'Maestro','Maestro_choice.gif',
114
- 'Cards: exceptions', false);
115
- $pmList[] = $pm;
116
-
117
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
118
- $pm->__PaymentMethod('=== Cards: Online Credit ===','Cards: Online Credit',
119
- '','_choice.gif','', false);
120
- $pmList[] = $pm;
121
-
122
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
123
- $pm->__PaymentMethod('NetReserve','CreditCard',
124
- 'NetReserve','NetReserve_choice.gif',
125
- 'Cards: Online Credit', false);
126
- $pmList[] = $pm;
127
-
128
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
129
- $pm->__PaymentMethod('UNEUROCOM','UNEUROCOM',
130
- 'UNEUROCOM','UNEUROCOM_choice.gif',
131
- 'Cards: Online Credit', false);
132
- $pmList[] = $pm;
133
-
134
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
135
- $pm->__PaymentMethod('=== WebBanking ===','WebBanking',
136
- '','_choice.gif','', false);
137
- $pmList[] = $pm;
138
-
139
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
140
- $pm->__PaymentMethod('CBC Online','CBC Online',
141
- 'CBC Online','CBC Online_choice.gif',
142
- 'WebBanking', false);
143
- $pmList[] = $pm;
144
-
145
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
146
- $pm->__PaymentMethod('CENTEA Online','CENTEA Online',
147
- 'CENTEA Online','CENTEA Online_choice.gif',
148
- 'WebBanking', false);
149
- $pmList[] = $pm;
150
-
151
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
152
- $pm->__PaymentMethod('Dexia Direct Net','Dexia Direct Net',
153
- 'Dexia Direct Net','Dexia Direct Net_choice.gif',
154
- 'WebBanking', false);
155
- $pmList[] = $pm;
156
-
157
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
158
- $pm->__PaymentMethod('eDankort','eDankort',
159
- 'eDankort','eDankort_choice.gif','WebBanking', false);
160
- $pmList[] = $pm;
161
-
162
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
163
- $pm->__PaymentMethod('EPS','EPS',
164
- 'EPS','EPS_choice.gif','WebBanking', false);
165
- $pmList[] = $pm;
166
-
167
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
168
- $pm->__PaymentMethod('iDEAL','iDEAL',
169
- 'iDEAL','iDEAL_choice.gif','WebBanking', false);
170
- $pmList[] = $pm;
171
-
172
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
173
- $pm->__PaymentMethod('ING HomePay','ING HomePay',
174
- 'ING HomePay','ING HomePay_choice.gif','WebBanking', false);
175
- $pmList[] = $pm;
176
-
177
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
178
- $pm->__PaymentMethod('KBC Online','KBC Online',
179
- 'KBC Online','KBC Online_choice.gif','WebBanking', false);
180
- $pmList[] = $pm;
181
-
182
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
183
- $pm->__PaymentMethod('PostFinance Debit Direct','PostFinance Debit Direct',
184
- 'PostFinance Debit Direct','PostFinance Debit Direct_choice.gif','WebBanking', false);
185
- $pmList[] = $pm;
186
-
187
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
188
- $pm->__PaymentMethod('PostFinance yellownet','PostFinance yellownet',
189
- 'PostFinance yellownet','PostFinance yellownet_choice.gif','WebBanking', false);
190
- $pmList[] = $pm;
191
-
192
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
193
- $pm->__PaymentMethod('=== Direct Debit ===','Direct Debits',
194
- '','_choice.gif','', false);
195
- $pmList[] = $pm;
196
-
197
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
198
- $pm->__PaymentMethod('Direct Debits DE','Direct Debits DE',
199
- 'Direct Debits DE','Direct Debits DE_choice.gif','Direct Debits', false);
200
- $pmList[] = $pm;
201
-
202
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
203
- $pm->__PaymentMethod('Direct Debits NL','Direct Debits NL',
204
- 'Direct Debits NL','Direct Debits NL_choice.gif','Direct Debits', false);
205
- $pmList[] = $pm;
206
-
207
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
208
- $pm->__PaymentMethod('=== Offline payment ===','Offline payment',
209
- '','_choice.gif','', false);
210
- $pmList[] = $pm;
211
-
212
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
213
- $pm->__PaymentMethod('Acceptgiro','Acceptgiro',
214
- 'Acceptgiro','Acceptgiro_choice.gif','Offline payment', false);
215
- $pmList[] = $pm;
216
-
217
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
218
- $pm->__PaymentMethod('Bank transfer','Bank transfer',
219
- 'Bank transfer','Bank transfer_choice.gif','Offline payment', false);
220
- $pmList[] = $pm;
221
-
222
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
223
- $pm->__PaymentMethod('Payment on Delivery','Payment on Delivery',
224
- 'Payment on Delivery','Payment on Delivery_choice.gif','Offline payment', false);
225
- $pmList[] = $pm;
226
-
227
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
228
- $pm->__PaymentMethod('=== Micro ===','Micro',
229
- '','_choice.gif','', false);
230
- $pmList[] = $pm;
231
-
232
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
233
- $pm->__PaymentMethod('MiniTix','MiniTix',
234
- 'MiniTix','MiniTix_choice.gif','Micro', false);
235
- $pmList[] = $pm;
236
-
237
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
238
- $pm->__PaymentMethod('=== Mobile ===','Mobile',
239
- '','_choice.gif','', false);
240
- $pmList[] = $pm;
241
-
242
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
243
- $pm->__PaymentMethod('TUNZ','TUNZ',
244
- 'TUNZ','TUNZ_choice.gif','Mobile', false);
245
- $pmList[] = $pm;
246
-
247
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
248
- $pm->__PaymentMethod('=== Others ===','Others',
249
- '','_choice.gif','', false);
250
- $pmList[] = $pm;
251
-
252
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
253
- $pm->__PaymentMethod('PAYPAL','PAYPAL',
254
- 'PAYPAL','PAYPAL_choice.gif','Others', false);
255
- $pmList[] = $pm;
256
-
257
- $pm = Mage::getModel('internetkassa/source_paymentMethod');
258
- $pm->__PaymentMethod('Wallie','Wallie',
259
- 'Wallie','Wallie_choice.gif','Others', false);
260
- $pmList[] = $pm;
261
-
262
- return $pmList;
263
- }
264
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/Model/Source/Pmlist.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa template Action Dropdown source
29
+ */
30
+ class Morningtime_Internetkassa_Model_Source_Pmlist
31
+ {
32
+ /**
33
+ * Prepare internetkassa payment block layout as option array
34
+ *
35
+ * @return array
36
+ */
37
+ public function toOptionArray()
38
+ {
39
+ return array(
40
+ array('value' => Morningtime_Internetkassa_Model_Api::PMLIST_HORISONTAL_LEFT, 'label' => Mage::helper('internetkassa')->__('Horizontally grouped logo with group name on left')),
41
+ array('value' => Morningtime_Internetkassa_Model_Api::PMLIST_HORISONTAL, 'label' => Mage::helper('internetkassa')->__('Horizontally grouped logo with no group name')),
42
+ array('value' => Morningtime_Internetkassa_Model_Api::PMLIST_VERTICAL, 'label' => Mage::helper('internetkassa')->__('Verical list')),
43
+ );
44
+ }
45
+ }
app/code/community/Morningtime/Internetkassa/Model/Source/Template.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * 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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa template Action Dropdown source
29
+ */
30
+ class Morningtime_Internetkassa_Model_Source_Template
31
+ {
32
+ /**
33
+ * Prepare internetkassa template mode list as option array
34
+ *
35
+ * @return array
36
+ */
37
+ public function toOptionArray()
38
+ {
39
+ return array(
40
+ array('value' => Morningtime_Internetkassa_Model_Api::TEMPLATE_OGONE, 'label' => Mage::helper('internetkassa')->__('Internetkassa')),
41
+ array('value' => Morningtime_Internetkassa_Model_Api::TEMPLATE_MAGENTO, 'label' => Mage::helper('internetkassa')->__('Magento')),
42
+ );
43
+ }
44
+ }
app/code/community/Morningtime/Internetkassa/controllers/ApiController.php ADDED
@@ -0,0 +1,492 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Internetkassa Api Controller
29
+ */
30
+ class Morningtime_Internetkassa_ApiController extends Mage_Core_Controller_Front_Action
31
+ {
32
+ /**
33
+ * Order instance
34
+ */
35
+ protected $_order;
36
+
37
+ /**
38
+ * Get checkout session namespace
39
+ *
40
+ * @return Mage_Checkout_Model_Session
41
+ */
42
+ protected function _getCheckout()
43
+ {
44
+ return Mage::getSingleton('checkout/session');
45
+ }
46
+
47
+ /**
48
+ * Get singleton with Checkout by Internetkassa Api
49
+ *
50
+ * @return Morningtime_Internetkassa_Model_Api
51
+ */
52
+ protected function _getApi()
53
+ {
54
+ return Mage::getSingleton('internetkassa/api');
55
+ }
56
+
57
+ /**
58
+ * Return order instance loaded by increment id'
59
+ *
60
+ * @return Mage_Sales_Model_Order
61
+ */
62
+ protected function _getOrder()
63
+ {
64
+ if (empty($this->_order)) {
65
+ $orderId = $this->getRequest()->getParam('orderID');
66
+ $this->_order = Mage::getModel('sales/order');
67
+ $this->_order->loadByIncrementId($orderId);
68
+ }
69
+ return $this->_order;
70
+ }
71
+
72
+ /**
73
+ * Validation of incoming Internetkassa data
74
+ *
75
+ * @return bool
76
+ */
77
+ protected function _validateInternetkassaData()
78
+ {
79
+ if ($this->_getApi()->getDebug()) {
80
+ $debug = Mage::getModel('internetkassa/api_debug')
81
+ ->setDir('in')
82
+ ->setUrl($this->getRequest()->getPathInfo())
83
+ ->setData('data',http_build_query($this->getRequest()->getParams()))
84
+ ->save();
85
+ }
86
+
87
+ $params = $this->getRequest()->getParams();
88
+ $secureKey = $this->_getApi()->getConfig()->getShaInCode();
89
+ $secureSet = $this->_getSHAInSet($params, $secureKey);
90
+
91
+ if (Mage::helper('internetkassa')->shaCryptValidation($secureSet, $params['SHASIGN'])!=true) {
92
+ $this->_getCheckout()->addError($this->__('Hash is not valid'));
93
+ return false;
94
+ }
95
+
96
+ $order = $this->_getOrder();
97
+ if (!$order->getId()){
98
+ $this->_getCheckout()->addError($this->__('Order is not valid'));
99
+ return false;
100
+ }
101
+
102
+ return true;
103
+ }
104
+
105
+ /**
106
+ * Load place from layout to make POST on internetkassa
107
+ */
108
+ public function placeformAction()
109
+ {
110
+ $lastIncrementId = $this->_getCheckout()->getLastRealOrderId();
111
+ if ($lastIncrementId) {
112
+ $order = Mage::getModel('sales/order');
113
+ $order->loadByIncrementId($lastIncrementId);
114
+ if ($order->getId()) {
115
+ $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Morningtime_Internetkassa_Model_Api::PENDING_OGONE_STATUS, Mage::helper('internetkassa')->__('Start internetkassa processing'));
116
+ $order->save();
117
+
118
+ if ($this->_getApi()->getDebug()) {
119
+ $debug = Mage::getModel('internetkassa/api_debug')
120
+ ->setDir('out')
121
+ ->setUrl($this->getRequest()->getPathInfo())
122
+ ->setData('data', http_build_query($this->_getApi()->getFormFields($order)))
123
+ ->save();
124
+ }
125
+ }
126
+ }
127
+
128
+ $this->_getCheckout()->getQuote()->setIsActive(false)->save();
129
+ $this->_getCheckout()->setInternetkassaQuoteId($this->_getCheckout()->getQuoteId());
130
+ $this->_getCheckout()->setInternetkassaLastSuccessQuoteId($this->_getCheckout()->getLastSuccessQuoteId());
131
+ $this->_getCheckout()->clear();
132
+
133
+ $this->loadLayout();
134
+ $this->renderLayout();
135
+ }
136
+
137
+ /**
138
+ * Display our pay page, need to internetkassa payment with external pay page mode *
139
+ */
140
+ public function paypageAction()
141
+ {
142
+ $this->loadLayout();
143
+ $this->renderLayout();
144
+ }
145
+
146
+ /**
147
+ * Action to control postback data from internetkassa
148
+ *
149
+ */
150
+ public function postBackAction()
151
+ {
152
+ if (!$this->_validateInternetkassaData()) {
153
+ $this->getResponse()->setHeader("Status", "404 Not Found");
154
+ return false;
155
+ }
156
+
157
+ $this->_internetkassaProcess();
158
+ }
159
+
160
+ /**
161
+ * Action to process internetkassa offline data
162
+ *
163
+ */
164
+ public function offlineProcessAction()
165
+ {
166
+ if (!$this->_validateInternetkassaData()) {
167
+ $this->getResponse()->setHeader("Status","404 Not Found");
168
+ return false;
169
+ }
170
+ $this->_internetkassaProcess();
171
+ }
172
+
173
+ /**
174
+ * Made offline internetkassa data processing, depending of incoming statuses
175
+ */
176
+ protected function _internetkassaProcess()
177
+ {
178
+ $status = $this->getRequest()->getParam('STATUS');
179
+ switch ($status) {
180
+ case Morningtime_Internetkassa_Model_Api::OGONE_AUTHORIZED :
181
+ case Morningtime_Internetkassa_Model_Api::OGONE_AUTH_PROCESSING:
182
+ case Morningtime_Internetkassa_Model_Api::OGONE_PAYMENT_REQUESTED_STATUS :
183
+ $this->_acceptProcess();
184
+ break;
185
+ case Morningtime_Internetkassa_Model_Api::OGONE_AUTH_REFUZED:
186
+ case Morningtime_Internetkassa_Model_Api::OGONE_PAYMENT_INCOMPLETE:
187
+ case Morningtime_Internetkassa_Model_Api::OGONE_TECH_PROBLEM:
188
+ $this->_declineProcess();
189
+ break;
190
+ case Morningtime_Internetkassa_Model_Api::OGONE_AUTH_UKNKOWN_STATUS:
191
+ case Morningtime_Internetkassa_Model_Api::OGONE_PAYMENT_UNCERTAIN_STATUS:
192
+ $this->_exceptionProcess();
193
+ break;
194
+ default:
195
+ //all unknown transaction will accept as exceptional
196
+ $this->_exceptionProcess();
197
+ }
198
+ }
199
+
200
+ /**
201
+ * when payment gateway accept the payment, it will land to here
202
+ * need to change order status as processed internetkassa
203
+ * update transaction id
204
+ *
205
+ */
206
+ public function acceptAction()
207
+ {
208
+ if (!$this->_validateInternetkassaData()) {
209
+ $this->_redirect('checkout/cart');
210
+ return;
211
+ }
212
+ $this->_internetkassaProcess();
213
+ }
214
+
215
+ /**
216
+ * Process success action by accept url
217
+ */
218
+ protected function _acceptProcess()
219
+ {
220
+ $params = $this->getRequest()->getParams();
221
+ $order = $this->_getOrder();
222
+
223
+ $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId());
224
+
225
+ $this->_prepareCCInfo($order, $params);
226
+ $order->getPayment()->setTransactionId($params['PAYID']);
227
+
228
+ try{
229
+ if ($this->_getApi()->getPaymentAction()==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE) {
230
+ $this->_processDirectSale();
231
+ } else {
232
+ $this->_processAuthorize();
233
+ }
234
+ }catch(Exception $e) {
235
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Order can\'t save'));
236
+ $this->_redirect('checkout/cart');
237
+ return;
238
+ }
239
+ }
240
+
241
+ /**
242
+ * Process Configured Payment Action: Direct Sale, create invoce if state is Pending
243
+ *
244
+ */
245
+ protected function _processDirectSale()
246
+ {
247
+ $order = $this->_getOrder();
248
+ $status = $this->getRequest()->getParam('STATUS');
249
+ try{
250
+ if ($status == Morningtime_Internetkassa_Model_Api::OGONE_AUTH_PROCESSING) {
251
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::WAITING_AUTHORIZATION, Mage::helper('internetkassa')->__('Authorization Waiting from Internetkassa'));
252
+ $order->save();
253
+ }elseif ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
254
+ if ($status == Morningtime_Internetkassa_Model_Api::OGONE_AUTHORIZED) {
255
+ if ($order->getStatus() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
256
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::PROCESSING_OGONE_STATUS, Mage::helper('internetkassa')->__('Processed by Internetkassa'));
257
+ }
258
+ } else {
259
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::PROCESSED_OGONE_STATUS, Mage::helper('internetkassa')->__('Processed by Internetkassa'));
260
+ }
261
+
262
+ if (!$order->getInvoiceCollection()->getSize()) {
263
+ $invoice = $order->prepareInvoice();
264
+ $invoice->register();
265
+ $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
266
+ $invoice->getOrder()->setIsInProcess(true);
267
+
268
+ $transactionSave = Mage::getModel('core/resource_transaction')
269
+ ->addObject($invoice)
270
+ ->addObject($invoice->getOrder())
271
+ ->save();
272
+ $order->sendNewOrderEmail();
273
+ }
274
+ } else {
275
+ $order->save();
276
+ }
277
+ $this->_redirect('checkout/onepage/success');
278
+ return;
279
+ } catch (Exception $e) {
280
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Order can\'t save'));
281
+ $this->_redirect('checkout/cart');
282
+ return;
283
+ }
284
+ }
285
+
286
+ /**
287
+ * Process Configured Payment Actions: Authorized, Default operation
288
+ * just place order
289
+ */
290
+ protected function _processAuthorize()
291
+ {
292
+ $order = $this->_getOrder();
293
+ $status = $this->getRequest()->getParam('STATUS');
294
+ try {
295
+ if ($status == Morningtime_Internetkassa_Model_Api::OGONE_AUTH_PROCESSING) {
296
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::WAITING_AUTHORIZATION, Mage::helper('internetkassa')->__('Authorization Waiting from Internetkassa'));
297
+ } else {
298
+ //to send new order email only when state is pending payment
299
+ if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
300
+ $order->sendNewOrderEmail();
301
+ }
302
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::PROCESSED_OGONE_STATUS, Mage::helper('internetkassa')->__('Processed by Internetkassa'));
303
+ }
304
+ $order->save();
305
+ $this->_redirect('checkout/onepage/success');
306
+ return;
307
+ } catch(Exception $e) {
308
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Order can\'t save'));
309
+ $this->_redirect('checkout/cart');
310
+ return;
311
+ }
312
+ }
313
+
314
+ /**
315
+ * We get some CC info from internetkassa, so we must save it
316
+ *
317
+ * @param Mage_Sales_Model_Order $order
318
+ * @param array $ccInfo
319
+ *
320
+ * @return Morningtime_Internetkassa_ApiController
321
+ */
322
+ protected function _prepareCCInfo($order, $ccInfo)
323
+ {
324
+ $order->getPayment()->setCcOwner($ccInfo['CN']);
325
+ $order->getPayment()->setCcNumberEnc($ccInfo['CARDNO']);
326
+ $order->getPayment()->setCcLast4(substr($ccInfo['CARDNO'], -4));
327
+ $order->getPayment()->setCcExpMonth(substr($ccInfo['ED'], 0, 2));
328
+ $order->getPayment()->setCcExpYear(substr($ccInfo['ED'], 2, 2));
329
+ return $this;
330
+ }
331
+
332
+
333
+ /**
334
+ * the payment result is uncertain
335
+ * exception status can be 52 or 92
336
+ * need to change order status as processing internetkassa
337
+ * update transaction id
338
+ *
339
+ */
340
+ public function exceptionAction()
341
+ {
342
+ if (!$this->_validateInternetkassaData()) {
343
+ $this->_redirect('checkout/cart');
344
+ return;
345
+ }
346
+ $this->_exceptionProcess();
347
+ }
348
+
349
+ /**
350
+ * Process exception action by internetkassa exception url
351
+ */
352
+ public function _exceptionProcess()
353
+ {
354
+ $params = $this->getRequest()->getParams();
355
+ $order = $this->_getOrder();
356
+
357
+ $exception = '';
358
+ switch($params['STATUS']) {
359
+ case Morningtime_Internetkassa_Model_Api::OGONE_PAYMENT_UNCERTAIN_STATUS :
360
+ $exception = Mage::helper('internetkassa')->__('Payment uncertain: A technical problem arose during payment process, giving unpredictable result');
361
+ break;
362
+ case Morningtime_Internetkassa_Model_Api::OGONE_AUTH_UKNKOWN_STATUS :
363
+ $exception = Mage::helper('internetkassa')->__('Authorization not known: A technical problem arose during authorization process, giving unpredictable result');
364
+ break;
365
+ default:
366
+ $exception = Mage::helper('internetkassa')->__('Unknown exception');
367
+ }
368
+
369
+ if (!empty($exception)) {
370
+ try{
371
+ $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId());
372
+ $this->_prepareCCInfo($order, $params);
373
+ $order->getPayment()->setLastTransId($params['PAYID']);
374
+ //to send new order email only when state is pending payment
375
+ if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {
376
+ $order->sendNewOrderEmail();
377
+ $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Morningtime_Internetkassa_Model_Api::PROCESSING_OGONE_STATUS, $exception);
378
+ } else {
379
+ $order->addStatusToHistory(Morningtime_Internetkassa_Model_Api::PROCESSING_OGONE_STATUS, $exception);
380
+ }
381
+ $order->save();
382
+ }catch(Exception $e) {
383
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Order can not be save for system reason'));
384
+ }
385
+ } else {
386
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Exception not defined'));
387
+ }
388
+
389
+ $this->_redirect('checkout/onepage/success');
390
+ }
391
+
392
+ /**
393
+ * when payment got decline
394
+ * need to change order status to cancelled
395
+ * take the user back to shopping cart
396
+ *
397
+ */
398
+ public function declineAction()
399
+ {
400
+ if (!$this->_validateInternetkassaData()) {
401
+ $this->_redirect('checkout/cart');
402
+ return;
403
+ }
404
+ $this->_getCheckout()->setQuoteId($this->_getCheckout()->getInternetkassaQuoteId());
405
+ $this->_declineProcess();
406
+ return $this;
407
+ }
408
+
409
+ /**
410
+ * Process decline action by internetkassa decline url
411
+ */
412
+ protected function _declineProcess()
413
+ {
414
+ $status = Morningtime_Internetkassa_Model_Api::DECLINE_OGONE_STATUS;
415
+ $comment = Mage::helper('internetkassa')->__('Declined Order on internetkassa side');
416
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Payment transaction has been declined.'));
417
+ $this->_cancelOrder($status, $comment);
418
+ }
419
+
420
+ /**
421
+ * when user cancel the payment
422
+ * change order status to cancelled
423
+ * need to rediect user to shopping cart
424
+ *
425
+ * @return Morningtime_Internetkassa_ApiController
426
+ */
427
+ public function cancelAction()
428
+ {
429
+ if (!$this->_validateInternetkassaData()) {
430
+ $this->_redirect('checkout/cart');
431
+ return;
432
+ }
433
+ $this->_getCheckout()->setQuoteId($this->_getCheckout()->getInternetkassaQuoteId());
434
+ $this->_cancelProcess();
435
+ return $this;
436
+ }
437
+
438
+ /**
439
+ * Process cancel action by cancel url
440
+ *
441
+ * @return Morningtime_Internetkassa_ApiController
442
+ */
443
+ public function _cancelProcess()
444
+ {
445
+ $status = Morningtime_Internetkassa_Model_Api::CANCEL_OGONE_STATUS;
446
+ $comment = Mage::helper('internetkassa')->__('Order canceled on internetkassa side');
447
+ $this->_cancelOrder($status, $comment);
448
+ return $this;
449
+ }
450
+
451
+ /**
452
+ * Cancel action, used for decline and cancel processes
453
+ *
454
+ * @return Morningtime_Internetkassa_ApiController
455
+ */
456
+ protected function _cancelOrder($status, $comment='')
457
+ {
458
+ $order = $this->_getOrder();
459
+ try{
460
+ $order->cancel();
461
+ $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $status, $comment);
462
+ $order->save();
463
+ }catch(Exception $e) {
464
+ $this->_getCheckout()->addError(Mage::helper('internetkassa')->__('Order can not be canceled for system reason'));
465
+ }
466
+
467
+ $this->_redirect('checkout/cart');
468
+ return $this;
469
+ }
470
+
471
+ /**
472
+ * Return set of data which is ready for SHA crypt
473
+ *
474
+ * @param array $data
475
+ * @param string $key
476
+ *
477
+ * @return string
478
+ */
479
+ protected function _getSHAInSet($params, $key)
480
+ {
481
+ return $this->getRequest()->getParam('orderID') .
482
+ $this->getRequest()->getParam('currency') .
483
+ $this->getRequest()->getParam('amount') .
484
+ $this->getRequest()->getParam('PM') .
485
+ $this->getRequest()->getParam('ACCEPTANCE') .
486
+ $this->getRequest()->getParam('STATUS') .
487
+ $this->getRequest()->getParam('CARDNO') .
488
+ $this->getRequest()->getParam('PAYID') .
489
+ $this->getRequest()->getParam('NCERROR') .
490
+ $this->getRequest()->getParam('BRAND') . $key;
491
+ }
492
+ }
app/code/community/Morningtime/Internetkassa/controllers/ResultController.php DELETED
@@ -1,461 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
-
18
- class Morningtime_Internetkassa_ResultController extends Mage_Core_Controller_Front_Action
19
- {
20
- /**
21
- * Get Checkout Singleton
22
- *
23
- * @return Mage_Checkout_Model_Session
24
- */
25
- public function getCheckout()
26
- {
27
- return Mage::getSingleton('checkout/session');
28
- }
29
-
30
- /**
31
- * Order instance
32
- */
33
- protected $_order;
34
- protected $_internetkassaResponse = null;
35
-
36
- protected function _expireAjax()
37
- {
38
- if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
39
- $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
40
- exit();
41
- }
42
- }
43
-
44
- /**
45
- * Get singleton with internetkassa order transaction information
46
- *
47
- * @return Morningtime_Internetkassa_Model_Internetkassa
48
- */
49
- public function getInternetkassa()
50
- {
51
- return Mage::getSingleton('internetkassa/internetkassa');
52
- }
53
-
54
- /**
55
- * Get order
56
- *
57
- * @param none
58
- * @return Mage_Sales_Model_Order
59
- */
60
- public function getOrder()
61
- {
62
- if ($this->_order == null) {
63
- $session = Mage::getSingleton('checkout/session');
64
- $this->_order = Mage::getModel('sales/order');
65
- $this->_order->loadByIncrementId($session->getLastRealOrderId());
66
- }
67
- return $this->_order;
68
- }
69
-
70
- /**
71
- * seting response after returning from internetkassa
72
- *
73
- * @param array $response
74
- * @return object $this
75
- */
76
- protected function setInternetkassaResponse($response)
77
- {
78
- if (count($response)) {
79
- $this->_internetkassaResponse = $response;
80
- }
81
- return $this;
82
- }
83
-
84
- /**
85
- * Checking response and Internetkassa session variables
86
- *
87
- * @return unknown
88
- */
89
- protected function _checkResponse()
90
- {
91
-
92
- if (!$this->_internetkassaResponse) {
93
- Mage::throwException($this->__('No HTML response! Missing POST/GET vars in return URL from payment processor.'));
94
- return false;
95
- }
96
-
97
- //check for valid response
98
- if ($this->getInternetkassa()->checkResponse($this->_internetkassaResponse)) {
99
-
100
- $order = Mage::getModel('sales/order')
101
- ->loadByIncrementId($this->_internetkassaResponse['orderID']);
102
-
103
- $orderId = $order->getId();
104
- if(!isset($orderId)){
105
- Mage::throwException($this->__('Order identifier is not valid!'));
106
- return false;
107
- }
108
-
109
- // test the amount
110
- if( $this->_internetkassaResponse['amount']*100 !=
111
- round($order->getBaseGrandTotal(), 2)*100 ){
112
- Mage::throwException($this->__('Amount order is not valid!'));
113
- return false;
114
- }
115
-
116
- // test the payment method
117
- $payment = $this->getInternetkassa()->getQuote()->getPayment();
118
- $ccType = $payment->getCcType();
119
-
120
- $list = Mage::getModel('internetkassa/source_paymentMethodsList')->getPMList();
121
- $orderInternetkassaPM = "";
122
- $orderInternetkassaBrand = "";
123
-
124
- for ($i = 0; $i < sizeof($list); $i++) {
125
- if($list[$i]->getPmName() == $ccType){
126
- $orderInternetkassaPM = $list[$i]->getPmValue();
127
- $orderInternetkassaBrand = $list[$i]->getPmBrand();
128
- }
129
- }
130
-
131
- if($orderInternetkassaPM == null && $orderInternetkassaBrand == null && $ccType != "CB" ){
132
- Mage::throwException($this->__('No payment method found for this order!'));
133
- return false;
134
- }
135
-
136
- if( $orderInternetkassaPM != $this->_internetkassaResponse['PM'] ||
137
- ($orderInternetkassaBrand != $this->_internetkassaResponse['BRAND'] && $ccType != "CB")){
138
- Mage::throwException($this->__('No payment method or brand not valid for this order!'));
139
- return false;
140
- }
141
-
142
- // compute the feedback sha1 sign to compare it
143
- $feedbackSign = strtoupper(sha1(
144
- $this->_internetkassaResponse['orderID'].
145
- $this->_internetkassaResponse['currency'].
146
- $this->_internetkassaResponse['amount'].
147
- $this->_internetkassaResponse['PM'].
148
- $this->_internetkassaResponse['ACCEPTANCE'].
149
- $this->_internetkassaResponse['STATUS'].
150
- $this->_internetkassaResponse['CARDNO'].
151
- $this->_internetkassaResponse['PAYID'].
152
- $this->_internetkassaResponse['NCERROR'].
153
- $this->_internetkassaResponse['BRAND'].
154
- $this->getInternetkassa()->getInternetkassaSHA1PASS()
155
- ));
156
-
157
- if($this->_internetkassaResponse['SHASIGN'] != $feedbackSign){
158
- Mage::throwException($this->__('Feedback signature (SHA1Sign) is not valid!'));
159
- return false;
160
- }
161
-
162
- return true;
163
- }
164
-
165
- return true;
166
- }
167
-
168
- /**
169
- * When a customer chooses Internetkassa Payment on Checkout/Payment page
170
- *
171
- */
172
- public function redirectAction()
173
- {
174
- $session = Mage::getSingleton('checkout/session');
175
-
176
- $order = $this->getOrder();
177
-
178
- if (!$order->getId()) {
179
- $this->norouteAction();
180
- return;
181
- }
182
-
183
- $order->addStatusToHistory(
184
- $order->getStatus(),
185
- $this->__('Customer was redirected to Internetkassa.')
186
- );
187
- $order->save();
188
-
189
- $this->getResponse()
190
- ->setBody($this->getLayout()
191
- ->createBlock('internetkassa/redirect')
192
- ->setOrder($order)
193
- ->toHtml());
194
-
195
- }
196
-
197
- /**
198
- * Transaction result: 1. cancelled
199
- *
200
- * Payment cancelled by user: redirect back to checkout/cart
201
- * We do not reset the cart, allowing user to re-order
202
- */
203
- public function cancelAction()
204
- {
205
- if ($this->getRequest()->isPost()) {
206
- $this->setInternetkassaResponse($this->getRequest()->getPost());
207
- } else if ($this->getRequest()->isGet()) {
208
- $this->setInternetkassaResponse($this->getRequest()->getParams());
209
- }
210
-
211
- $order = Mage::getModel('sales/order')
212
- ->loadByIncrementId($this->_internetkassaResponse['orderID']);
213
-
214
- $order->cancel();
215
-
216
- $order->addStatusToHistory($order->getStatus(),
217
- $this->__('Payment was canceled by customer.')
218
- . "<br />Status: " . $this->_internetkassaResponse['STATUS']
219
- . "<br />Error Code: " . $this->_internetkassaResponse['NCERROR']
220
- );
221
- $order->save();
222
-
223
- $session = $this->getCheckout();
224
- $session->addError($this->__('You cancelled the payment. Please try again.'));
225
- $this->_redirect('checkout/cart');
226
- }
227
-
228
- /**
229
- * Transaction result: 2. declined
230
- *
231
- * Payment declined by processor: redirect back to checkout/cart
232
- * We do not reset the cart
233
- */
234
- public function declineAction()
235
- {
236
- if ($this->getRequest()->isPost()) {
237
- $this->setInternetkassaResponse($this->getRequest()->getPost());
238
- } else if ($this->getRequest()->isGet()) {
239
- $this->setInternetkassaResponse($this->getRequest()->getParams());
240
- }
241
-
242
- $order = Mage::getModel('sales/order')
243
- ->loadByIncrementId($this->_internetkassaResponse['orderID']);
244
-
245
- $order->addStatusToHistory($order->getStatus(),
246
- $this->__('Payment was declined by processor.')
247
- . "<br />Status: " . $this->_internetkassaResponse['STATUS']
248
- . "<br />Error Code: " . $this->_internetkassaResponse['NCERROR']
249
- );
250
- $order->save();
251
-
252
- $session = $this->getCheckout();
253
- $session->addError($this->__('The payment processor declined your payment. Please try again.'));
254
- $this->_redirect('checkout/cart');
255
- }
256
-
257
- /**
258
- * Transaction result: 3. exception
259
- *
260
- * An exception occurred at the processor
261
- * We have to reset the cart for precaution
262
- */
263
- public function exceptionAction()
264
- {
265
- if ($this->getRequest()->isPost()) {
266
- $this->setInternetkassaResponse($this->getRequest()->getPost());
267
- } else if ($this->getRequest()->isGet()) {
268
- $this->setInternetkassaResponse($this->getRequest()->getParams());
269
- }
270
-
271
- $order = Mage::getModel('sales/order')
272
- ->loadByIncrementId($this->_internetkassaResponse['orderID']);
273
-
274
- $order->cancel();
275
-
276
- $order->addStatusToHistory($order->getStatus(),
277
- $this->__('There was an exception. Payment failed.')
278
- . "<br />Status: " . $this->_internetkassaResponse['STATUS']
279
- . "<br />Error Code: " . $this->_internetkassaResponse['NCERROR']
280
- );
281
- $order->save();
282
-
283
- $session = $this->getCheckout();
284
- $session->setQuoteId($session->getInternetkassaQuoteId(true));
285
- $session->getQuote()->setIsActive(false)->save();
286
- $session->unsInternetkassaQuoteId();
287
- $session->addError($this->__('There was an exception. Your order was cancelled. Please try again.'));
288
- $this->_redirect('checkout/cart');
289
- }
290
-
291
- /**
292
- * Transaction result: 4. success
293
- *
294
- * Client has returned from processor successfully
295
- */
296
- public function successAction()
297
- {
298
- if ($this->getRequest()->isPost()) {
299
- $this->setInternetkassaResponse($this->getRequest()->getPost());
300
- } else if ($this->getRequest()->isGet()) {
301
- $this->setInternetkassaResponse($this->getRequest()->getParams());
302
- }
303
-
304
- if ($this->_checkResponse()) {
305
-
306
- $order = Mage::getModel('sales/order');
307
- $order->loadByIncrementId($this->_internetkassaResponse['orderID']);
308
-
309
- if ($this->_internetkassaResponse['STATUS'] == '5' ||
310
- $this->_internetkassaResponse['STATUS'] == '9' // status 9 is for direct sales...
311
- ) {
312
- $order->addStatusToHistory(
313
- $order->getStatus(),
314
- $this->__('Customer successfully returned from Internetkassa.')
315
- . "\n<br>Payment Method:" .$this->_internetkassaResponse['PM']
316
- . "\n<br>Operator:" .$this->_internetkassaResponse['BRAND']
317
- . "\n<br>Card No:" . $this->_internetkassaResponse['CARDNO']
318
- . "\n<br>TransactionId:" . $this->_internetkassaResponse['PAYID']
319
- ."\n<br>\n<br>Operator Code :" . $this->_internetkassaResponse['ACCEPTANCE']
320
- ."\n<br>\n<br>Error Code:" . $this->_internetkassaResponse['NCERROR']
321
- );
322
-
323
- if ($order->canInvoice()) {
324
- $invoice = $order->prepareInvoice();
325
- $invoice->register()->capture();
326
- Mage::getModel('core/resource_transaction')
327
- ->addObject($invoice)
328
- ->addObject($invoice->getOrder())
329
- ->save();
330
- }
331
-
332
- $order->sendNewOrderEmail();
333
- $order->save();
334
-
335
- $this->_redirect('checkout/onepage/success');
336
- return;
337
-
338
- } else {
339
- $order->cancel();
340
- $order->addStatusToHistory($order->getStatus(), $this->__('An unexpected error occurred.'));
341
-
342
- $session = Mage::getSingleton('checkout/session');
343
- $session->addError($this->__('An unexpected error occurred. Your order was cancelled. Please try again.'));
344
- $this->_redirect('checkout/cart');
345
- return;
346
- }
347
- } else {
348
- $this->norouteAction();
349
- return;
350
- }
351
- }
352
-
353
- /**
354
- * Post-payment processing
355
- *
356
- * Imagine a customer does not properly redirect after paying
357
- * This function is called by the Internetkassa dashboard, to re-repeat the call
358
- */
359
- public function processAction() {
360
-
361
- if ($this->getRequest()->isPost()) {
362
- $this->setInternetkassaResponse($this->getRequest()->getPost());
363
- } else if ($this->getRequest()->isGet()) {
364
- $this->setInternetkassaResponse($this->getRequest()->getParams());
365
- }
366
-
367
- if ($this->_checkResponse()) {
368
-
369
- $order = Mage::getModel('sales/order');
370
- $order->loadByIncrementId($this->_internetkassaResponse['orderID']);
371
-
372
- if ($this->_internetkassaResponse['STATUS'] == '5' ||
373
- $this->_internetkassaResponse['STATUS'] == '9'
374
- ) {
375
- $order->addStatusToHistory(
376
- $order->getStatus(),
377
- $this->__('Automatic update: payment successful!')
378
- . "<br />Payment Method:" .$this->_internetkassaResponse['PM']
379
- . "<br />Operator:" .$this->_internetkassaResponse['BRAND']
380
- . "<br />Card No:" . $this->_internetkassaResponse['CARDNO']
381
- . "<br />TransactionId:" . $this->_internetkassaResponse['PAYID']
382
- . "<br />Status :" . $this->_internetkassaResponse['STATUS']
383
- . "<br />Operator Code :" . $this->_internetkassaResponse['ACCEPTANCE']
384
- . "<br />Error Code:" . $this->_internetkassaResponse['NCERROR']
385
- );
386
-
387
- if ($order->canInvoice()) {
388
- $invoice = $order->prepareInvoice();
389
- $invoice->register()->capture();
390
- Mage::getModel('core/resource_transaction')
391
- ->addObject($invoice)
392
- ->addObject($invoice->getOrder())
393
- ->save();
394
- }
395
-
396
- $order->sendNewOrderEmail();
397
- $order->save();
398
-
399
- $this->norouteAction();
400
- return;
401
-
402
- } else {
403
- /**
404
- * All other response cancel the order
405
- * but we save the status
406
- */
407
- $order->cancel();
408
- $order->addStatusToHistory(
409
- $order->getStatus(),
410
- $this->__('Automatic update: customer was rejected by Internetkassa')
411
- . "\n<br>\n<br>Status :" . $this->_internetkassaResponse['STATUS']
412
- . "\n<br>\n<br>Error Code:" . $this->_internetkassaResponse['NCERROR']
413
- );
414
-
415
- $this->norouteAction();
416
- return;
417
- }
418
- } else {
419
- $this->norouteAction();
420
- return;
421
- }
422
- }
423
-
424
- /**
425
- * Error action. If request params to Internetkassa has mistakes,
426
- * i.e. SHA1Sign check failed
427
- */
428
- public function errorAction()
429
- {
430
- if ($this->getRequest()->isGet()) {
431
- $this->setInternetkassaResponse($this->getRequest()->getParams());
432
- }
433
-
434
- $session = Mage::getSingleton('checkout/session');
435
- $errorMsg = $this->__('An unexpected error occurred. Payment failed.')
436
- . "<br />Status: " .$this->_internetkassaResponse['STATUS'];
437
- $session->addError($errorMsg);
438
-
439
- $order = Mage::getModel('sales/order');
440
- $order->loadByIncrementId($this->_internetkassaResponse['orderID']);
441
-
442
- if (!$order->getId()) {
443
- $this->norouteAction();
444
- return;
445
- }
446
- if ($order instanceof Mage_Sales_Model_Order && $order->getId()) {
447
- $order->addStatusToHistory(
448
- $order->getStatus(),
449
- $this->__('Customer returned from Ogone with an error.') . $errorMsg
450
- );
451
-
452
- $order->save();
453
- }
454
-
455
- // $this->loadLayout();
456
- // $this->renderLayout();
457
- Mage::getSingleton('checkout/session')->unsLastRealOrderId();
458
- $this->_redirect('internetkassa/result/exception');
459
- }
460
-
461
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/etc/config.xml CHANGED
@@ -1,182 +1,142 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!--
3
- /**
4
- * Morningtime Internetkassa extension
5
- *
6
- * NOTICE OF LICENSE
7
- *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
- * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
12
- *
13
- * @category Morningtime
14
- * @package Morningtime_Internetkassa
15
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
16
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
- */
18
- -->
19
- <config>
20
- <modules>
21
- <Morningtime_Internetkassa>
22
- <version>1.3.2.4.4</version>
23
- </Morningtime_Internetkassa>
24
- </modules>
25
- <global>
26
- <models>
27
- <internetkassa>
28
- <class>Morningtime_Internetkassa_Model</class>
29
- </internetkassa>
30
- </models>
31
- <blocks>
32
- <internetkassa>
33
- <class>Morningtime_Internetkassa_Block</class>
34
- </internetkassa>
35
- </blocks>
36
- <resources>
37
- <internetkassa_write>
38
- <connection>
39
- <use>core_write</use>
40
- </connection>
41
- </internetkassa_write>
42
- <internetkassa_read>
43
- <connection>
44
- <use>core_read</use>
45
- </connection>
46
- </internetkassa_read>
47
- </resources>
48
- <helpers>
49
- <internetkassa>
50
- <class>Morningtime_Internetkassa_Helper</class>
51
- </internetkassa>
52
- </helpers>
53
- <payment>
54
- <internetkassa>
55
- <languages>
56
- <US>
57
- <code>US</code>
58
- <name>US ENglish</name>
59
- </US>
60
- <NL>
61
- <code>NL</code>
62
- <name>Dutch</name>
63
- </NL>
64
- </languages>
65
- <currencies>
66
- <EUR>
67
- <code>978</code>
68
- <name>Euro</name>
69
- </EUR>
70
- <CAD>
71
- <code>124</code>
72
- <name>Canadian Dollar</name>
73
- </CAD>
74
- <CHF>
75
- <code>756</code>
76
- <name>Swiss Franc</name>
77
- </CHF>
78
- <SEK>
79
- <code>752</code>
80
- <name>Swedish Krone</name>
81
- </SEK>
82
- <GBP>
83
- <code>826</code>
84
- <name>Pound Sterling</name>
85
- </GBP>
86
- <USD>
87
- <code>840</code>
88
- <name>US Dollar</name>
89
- </USD>
90
- </currencies>
91
- </internetkassa>
92
- </payment>
93
- </global>
94
-
95
- <adminhtml>
96
- <translate>
97
- <modules>
98
- <Morningtime_Internetkassa>
99
- <files>
100
- <default>Morningtime_Internetkassa.csv</default>
101
- </files>
102
- </Morningtime_Internetkassa>
103
- </modules>
104
- </translate>
105
- </adminhtml>
106
-
107
- <frontend>
108
- <blocks>
109
- <internetkassa>
110
- <class>Morningtime_Internetkassa_Block</class>
111
- </internetkassa>
112
- </blocks>
113
- <routers>
114
- <internetkassa>
115
- <use>standard</use>
116
- <args>
117
- <module>Morningtime_Internetkassa</module>
118
- <frontName>internetkassa</frontName>
119
- </args>
120
- </internetkassa>
121
- </routers>
122
- <translate>
123
- <modules>
124
- <Morningtime_Internetkassa>
125
- <files>
126
- <default>Morningtime_Internetkassa.csv</default>
127
- </files>
128
- </Morningtime_Internetkassa>
129
- </modules>
130
- </translate>
131
- </frontend>
132
-
133
- <default>
134
- <payment>
135
- <internetkassa>
136
- <active>0</active>
137
- <model>internetkassa/internetkassa</model>
138
- <title>Internetkassa</title>
139
- <order_status>pending</order_status>
140
- <ogone_logo>https://secure.ogone.com/images/ogone.gif</ogone_logo>
141
- <SHA1PASS></SHA1PASS>
142
- <PSPID></PSPID>
143
- <Currency>EUR</Currency>
144
- <Language>nl_NL</Language>
145
- <PAGE_TITLE></PAGE_TITLE>
146
- <BGCOLOR>#AF390A</BGCOLOR>
147
- <TXTCOLOR>#CDC40F</TXTCOLOR>
148
- <TBLBGCOLOR>#CDC40F</TBLBGCOLOR>
149
- <TBLTXTCOLOR>#000000</TBLTXTCOLOR>
150
- <BUTTONBGCOL>#763642</BUTTONBGCOL>
151
- <BUTTONTXTCOLOR>#CDC40F</BUTTONTXTCOLOR>
152
- <FONTTYPE>Verdana</FONTTYPE>
153
- <LOGO></LOGO>
154
- <TP></TP>
155
- <accepturl>{{unsecure_base_url}}internetkassa/result/success</accepturl>
156
- <declineurl>{{unsecure_base_url}}internetkassa/result/decline</declineurl>
157
- <exceptionurl>{{unsecure_base_url}}internetkassa/result/exception</exceptionurl>
158
- <cancelurl>{{unsecure_base_url}}internetkassa/result/cancel</cancelurl>
159
- <homeurl>{{unsecure_base_url}}</homeurl>
160
- <catalogurl>{{unsecure_base_url}}</catalogurl>
161
- <CN></CN>
162
- <EMAIL></EMAIL>
163
- <PM></PM>
164
- <BRAND></BRAND>
165
- <SHASign></SHASign>
166
- <Signature></Signature>
167
- <ownerZIP></ownerZIP>
168
- <owneraddress></owneraddress>
169
- <ownercty></ownercty>
170
- <Alias></Alias>
171
- <AliasUsage></AliasUsage>
172
- <AliasOperationCOM></AliasOperationCOM>
173
- <COMPLUS></COMPLUS>
174
- <PARAMPLUS></PARAMPLUS>
175
- <PARAMVAR></PARAMVAR>
176
- <USERID></USERID>
177
- <CreditCode></CreditCode>
178
- <allowspecific>0</allowspecific>
179
- </internetkassa>
180
- </payment>
181
- </default>
182
- </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Open Software License (OSL 3.0)
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Morningtime
23
+ * @package Morningtime_Internetkassa
24
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
+ */
27
+ -->
28
+ <config>
29
+ <modules>
30
+ <Morningtime_Internetkassa>
31
+ <version>1.4.1.1</version>
32
+ </Morningtime_Internetkassa>
33
+ </modules>
34
+ <global>
35
+ <models>
36
+ <internetkassa>
37
+ <class>Morningtime_Internetkassa_Model</class>
38
+ <resourceModel>internetkassa_mysql4</resourceModel>
39
+ </internetkassa>
40
+ <internetkassa_mysql4>
41
+ <class>Morningtime_Internetkassa_Model_Mysql4</class>
42
+ <entities>
43
+ <api_debug><table>internetkassa_api_debug</table></api_debug>
44
+ </entities>
45
+ </internetkassa_mysql4>
46
+ </models>
47
+ <resources>
48
+ <internetkassa_setup>
49
+ <setup>
50
+ <module>Morningtime_Internetkassa</module>
51
+ </setup>
52
+ <connection>
53
+ <use>core_setup</use>
54
+ </connection>
55
+ </internetkassa_setup>
56
+ <internetkassa_write>
57
+ <connection>
58
+ <use>core_write</use>
59
+ </connection>
60
+ </internetkassa_write>
61
+ <internetkassa_read>
62
+ <connection>
63
+ <use>core_read</use>
64
+ </connection>
65
+ </internetkassa_read>
66
+ </resources>
67
+ <helpers>
68
+ <internetkassa>
69
+ <class>Morningtime_Internetkassa_Helper</class>
70
+ </internetkassa>
71
+ </helpers>
72
+ <blocks>
73
+ <internetkassa>
74
+ <class>Morningtime_Internetkassa_Block</class>
75
+ </internetkassa>
76
+ </blocks>
77
+ <sales>
78
+ <order>
79
+ <statuses>
80
+ <pending_internetkassa translate="label"><label>Pending Internetkassa</label></pending_internetkassa>
81
+ <cancel_internetkassa translate="label"><label>Cancelled Internetkassa</label></cancel_internetkassa>
82
+ <decline_internetkassa translate="label"><label>Declined Internetkassa</label></decline_internetkassa>
83
+ <processing_internetkassa translate="label"><label>Processing Internetkassa Payment</label></processing_internetkassa>
84
+ <processed_internetkassa translate="label"><label>Processed Internetkassa Payment</label></processed_internetkassa>
85
+ <waiting_authorozation translate="label"><label>Waiting Authorization</label></waiting_authorozation>
86
+ </statuses>
87
+ <states>
88
+ <pending_payment>
89
+ <statuses>
90
+ <pending_internetkassa/>
91
+ </statuses>
92
+ </pending_payment>
93
+ <processing>
94
+ <statuses>
95
+ <processed_internetkassa />
96
+ </statuses>
97
+ </processing>
98
+ </states>
99
+ </order>
100
+ </sales>
101
+ </global>
102
+ <frontend>
103
+ <layout>
104
+ <updates>
105
+ <internetkassa>
106
+ <file>internetkassa.xml</file>
107
+ </internetkassa>
108
+ </updates>
109
+ </layout>
110
+ <secure_url>
111
+ <internetkassa_api>/internetkassa/api</internetkassa_api>
112
+ </secure_url>
113
+ <routers>
114
+ <internetkassa>
115
+ <use>standard</use>
116
+ <args>
117
+ <module>Morningtime_Internetkassa</module>
118
+ <frontName>internetkassa</frontName>
119
+ </args>
120
+ </internetkassa>
121
+ </routers>
122
+ </frontend>
123
+
124
+ <default>
125
+ <payment>
126
+ <internetkassa>
127
+ <model>internetkassa/api</model>
128
+ <title>Internetkassa</title>
129
+ <secret_key backend_model="adminhtml/system_config_backend_encrypted"/>
130
+ <payment_action>authorize</payment_action>
131
+ <template>internetkassa</template>
132
+ <internetkassa_gateway>https://secure.ogone.com/ncol/test/orderstandard.asp</internetkassa_gateway>
133
+ <pending_internetkassa>pending_internetkassa</pending_internetkassa>
134
+ <cancel_internetkassa>cancel_internetkassa</cancel_internetkassa>
135
+ <decline_internetkassa>decline_internetkassa</decline_internetkassa>
136
+ <processing_internetkassa>processing_internetkassa</processing_internetkassa>
137
+ <processed_internetkassa>processed_internetkassa</processed_internetkassa>
138
+ <waiting_authorozation>waiting_authorozation</waiting_authorozation>
139
+ </internetkassa>
140
+ </payment>
141
+ </default>
142
+ </config>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Morningtime/Internetkassa/etc/system.xml CHANGED
@@ -1,7 +1,7 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!--
3
  /**
4
- * Morningtime Internetkassa extension
5
  *
6
  * NOTICE OF LICENSE
7
  *
@@ -9,241 +9,226 @@
9
  * that is bundled with this package in the file LICENSE.txt.
10
  * It is also available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
 
 
 
12
  *
13
- * @category Morningtime
14
- * @package Morningtime_Internetkassa
15
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
16
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
 
 
17
  */
18
- -->
19
- <config>
20
  <sections>
21
  <payment>
22
  <groups>
23
- <internetkassa translate="label" module="internetkassa">
24
  <label>Internetkassa</label>
 
 
 
 
 
 
 
 
 
 
25
  <frontend_type>text</frontend_type>
26
- <sort_order>0</sort_order>
27
  <show_in_default>1</show_in_default>
28
  <show_in_website>1</show_in_website>
29
  <show_in_store>1</show_in_store>
30
  <fields>
31
- <title translate="label">
32
- <label>Title</label>
33
- <frontend_type>text</frontend_type>
34
- <sort_order>30</sort_order>
35
- <show_in_default>1</show_in_default>
36
- <show_in_website>1</show_in_website>
37
- <show_in_store>1</show_in_store>
38
- </title>
39
- <order_status translate="label">
40
- <label>New order status</label>
41
- <frontend_type>select</frontend_type>
42
- <source_model>adminhtml/system_config_source_order_status_processing</source_model>
43
- <sort_order>320</sort_order>
44
- <show_in_default>1</show_in_default>
45
- <show_in_website>1</show_in_website>
46
- <show_in_store>0</show_in_store>
47
- </order_status>
48
- <active translate="label">
49
  <label>Enabled</label>
50
  <frontend_type>select</frontend_type>
51
  <source_model>adminhtml/system_config_source_yesno</source_model>
52
- <sort_order>10</sort_order>
53
  <show_in_default>1</show_in_default>
54
  <show_in_website>1</show_in_website>
55
- <show_in_store>1</show_in_store>
56
  </active>
57
- <test translate="label">
58
- <label>Test mode</label>
59
  <frontend_type>select</frontend_type>
60
  <source_model>adminhtml/system_config_source_yesno</source_model>
61
- <sort_order>20</sort_order>
62
  <show_in_default>1</show_in_default>
63
  <show_in_website>1</show_in_website>
64
  <show_in_store>0</show_in_store>
65
- </test>
66
- <issuer translate="label">
67
- <label>Issuer</label>
68
- <frontend_type>select</frontend_type>
69
- <source_model>internetkassa/source_issuers</source_model>
70
- <sort_order>25</sort_order>
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
- </issuer>
75
- <PSPID translate="label">
76
- <label>PSPID</label>
77
- <frontend_type>text</frontend_type>
78
- <sort_order>40</sort_order>
79
- <show_in_default>1</show_in_default>
80
- <show_in_website>1</show_in_website>
81
- <show_in_store>1</show_in_store>
82
- </PSPID>
83
- <SHA1PASS translate="label">
84
- <label>SHA1PASS</label>
85
- <frontend_type>text</frontend_type>
86
- <sort_order>50</sort_order>
87
- <show_in_default>1</show_in_default>
88
- <show_in_website>1</show_in_website>
89
- <show_in_store>1</show_in_store>
90
- </SHA1PASS>
91
- <Currency>
92
- <label>Currency</label>
93
- <frontend_type>multiselect</frontend_type>
94
- <source_model>internetkassa/source_currencies</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
- </Currency>
100
- <Language>
101
- <label>Language</label>
102
- <frontend_type>select</frontend_type>
103
- <source_model>internetkassa/source_languages</source_model>
104
- <sort_order>70</sort_order>
105
- <show_in_default>1</show_in_default>
106
- <show_in_website>1</show_in_website>
107
- <show_in_store>1</show_in_store>
108
- </Language>
109
- <PAGE_TITLE>
110
- <label>PAGE_TITLE</label>
111
  <frontend_type>text</frontend_type>
112
- <sort_order>80</sort_order>
113
  <show_in_default>1</show_in_default>
114
  <show_in_website>1</show_in_website>
115
  <show_in_store>1</show_in_store>
116
- </PAGE_TITLE>
117
- <BGCOLOR>
118
- <label>BGCOLOR</label>
119
  <frontend_type>text</frontend_type>
120
- <sort_order>90</sort_order>
 
121
  <show_in_default>1</show_in_default>
122
  <show_in_website>1</show_in_website>
123
- <show_in_store>1</show_in_store>
124
- </BGCOLOR>
125
- <TXTCOLOR>
126
- <label>TXTCOLOR</label>
127
- <frontend_type>text</frontend_type>
128
- <sort_order>100</sort_order>
 
 
 
 
 
129
  <show_in_default>1</show_in_default>
130
  <show_in_website>1</show_in_website>
131
- <show_in_store>1</show_in_store>
132
- </TXTCOLOR>
133
- <TBLBGCOLOR>
134
- <label>TBLBGCOLOR</label>
135
- <frontend_type>text</frontend_type>
136
- <sort_order>110</sort_order>
 
 
 
 
 
137
  <show_in_default>1</show_in_default>
138
  <show_in_website>1</show_in_website>
139
- <show_in_store>1</show_in_store>
140
- </TBLBGCOLOR>
141
- <TBLTXTCOLOR>
142
- <label>TBLTXTCOLOR</label>
143
  <frontend_type>text</frontend_type>
144
- <sort_order>120</sort_order>
 
145
  <show_in_default>1</show_in_default>
146
  <show_in_website>1</show_in_website>
147
- <show_in_store>1</show_in_store>
148
- </TBLTXTCOLOR>
149
- <BUTTONBGCOL>
150
- <label>BUTTONBGCOL</label>
151
- <frontend_type>text</frontend_type>
152
- <sort_order>130</sort_order>
 
 
153
  <show_in_default>1</show_in_default>
154
  <show_in_website>1</show_in_website>
155
- <show_in_store>1</show_in_store>
156
- </BUTTONBGCOL>
157
- <BUTTONTXTCOLOR>
158
- <label>BUTTONTXTCOLOR</label>
159
- <frontend_type>text</frontend_type>
160
- <sort_order>140</sort_order>
 
 
161
  <show_in_default>1</show_in_default>
162
  <show_in_website>1</show_in_website>
163
- <show_in_store>1</show_in_store>
164
- </BUTTONTXTCOLOR>
165
- <FONTTYPE>
166
- <label>FONTTYPE</label>
167
  <frontend_type>text</frontend_type>
168
- <sort_order>150</sort_order>
169
  <show_in_default>1</show_in_default>
170
  <show_in_website>1</show_in_website>
171
  <show_in_store>1</show_in_store>
172
- </FONTTYPE>
173
- <LOGO>
174
- <label>LOGO</label>
175
  <frontend_type>text</frontend_type>
176
- <sort_order>160</sort_order>
 
177
  <show_in_default>1</show_in_default>
178
  <show_in_website>1</show_in_website>
179
  <show_in_store>1</show_in_store>
180
- </LOGO>
181
- <TP>
182
- <label>TP</label>
183
  <frontend_type>text</frontend_type>
184
- <sort_order>170</sort_order>
 
185
  <show_in_default>1</show_in_default>
186
  <show_in_website>1</show_in_website>
187
  <show_in_store>1</show_in_store>
188
- </TP>
189
- <accepturl>
190
- <label>accepturl</label>
191
  <frontend_type>text</frontend_type>
192
- <sort_order>180</sort_order>
 
193
  <show_in_default>1</show_in_default>
194
  <show_in_website>1</show_in_website>
195
  <show_in_store>1</show_in_store>
196
- </accepturl>
197
- <declineurl>
198
- <label>declineurl</label>
199
  <frontend_type>text</frontend_type>
200
- <sort_order>190</sort_order>
 
201
  <show_in_default>1</show_in_default>
202
  <show_in_website>1</show_in_website>
203
  <show_in_store>1</show_in_store>
204
- </declineurl>
205
- <exceptionurl>
206
- <label>exceptionurl</label>
207
  <frontend_type>text</frontend_type>
208
- <sort_order>200</sort_order>
209
  <show_in_default>1</show_in_default>
210
  <show_in_website>1</show_in_website>
211
  <show_in_store>1</show_in_store>
212
- </exceptionurl>
213
- <cancelurl>
214
- <label>cancelurl</label>
215
  <frontend_type>text</frontend_type>
216
- <sort_order>210</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>
220
- </cancelurl>
221
- <homeurl>
222
- <label>homeurl</label>
223
  <frontend_type>text</frontend_type>
224
- <sort_order>220</sort_order>
 
225
  <show_in_default>1</show_in_default>
226
  <show_in_website>1</show_in_website>
227
  <show_in_store>1</show_in_store>
228
- </homeurl>
229
- <catalogurl>
230
- <label>catalogurl</label>
231
  <frontend_type>text</frontend_type>
232
- <sort_order>230</sort_order>
 
 
 
233
  <show_in_default>1</show_in_default>
234
  <show_in_website>1</show_in_website>
235
  <show_in_store>1</show_in_store>
236
- </catalogurl>
237
- <cctypes>
238
- <label>Payment Methods</label>
239
- <frontend_type>multiselect</frontend_type>
240
- <source_model>internetkassa/source_paymentMethods</source_model>
241
- <sort_order>240</sort_order>
 
242
  <show_in_default>1</show_in_default>
243
  <show_in_website>1</show_in_website>
244
  <show_in_store>1</show_in_store>
245
- </cctypes>
246
- </fields>
247
  </internetkassa>
248
  </groups>
249
  </payment>
1
+ <?xml version="1.0"?>
2
+ <!--
3
  /**
4
+ * Magento
5
  *
6
  * NOTICE OF LICENSE
7
  *
9
  * that is bundled with this package in the file LICENSE.txt.
10
  * It is also available through the world-wide-web at this URL:
11
  * http://opensource.org/licenses/osl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Morningtime
23
+ * @package Morningtime_Internetkassa
24
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
25
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
26
  */
27
+ -->
28
+ <config>
29
  <sections>
30
  <payment>
31
  <groups>
32
+ <internetkassa translate="label,comment" module="internetkassa">
33
  <label>Internetkassa</label>
34
+ <comment><![CDATA[<br />
35
+ <div class="custom-options">
36
+ <div class="box">
37
+ <p class="grand-total"><br /><b>Signing up with Internetkassa</b></p>
38
+ <p>Please enter the correct post back url and offline processiong url in Internetkassa configuration</p>
39
+ <p>post back url example: http://myMagentoStore.com/internetkassa/api/postBack</p>
40
+ <p>offline processing url example: http://myMagentoStore.com/internetkassa/api/offlineProcess</p>
41
+ </div>
42
+ </div>
43
+ ]]></comment>
44
  <frontend_type>text</frontend_type>
45
+ <sort_order>800</sort_order>
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
  <fields>
50
+ <active translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  <label>Enabled</label>
52
  <frontend_type>select</frontend_type>
53
  <source_model>adminhtml/system_config_source_yesno</source_model>
54
+ <sort_order>1</sort_order>
55
  <show_in_default>1</show_in_default>
56
  <show_in_website>1</show_in_website>
57
+ <show_in_store>0</show_in_store>
58
  </active>
59
+ <debug_flag translate="label">
60
+ <label>Debug</label>
61
  <frontend_type>select</frontend_type>
62
  <source_model>adminhtml/system_config_source_yesno</source_model>
63
+ <sort_order>2</sort_order>
64
  <show_in_default>1</show_in_default>
65
  <show_in_website>1</show_in_website>
66
  <show_in_store>0</show_in_store>
67
+ </debug_flag>
68
+ <title translate="label">
69
+ <label>Title</label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <frontend_type>text</frontend_type>
71
+ <sort_order>3</sort_order>
72
  <show_in_default>1</show_in_default>
73
  <show_in_website>1</show_in_website>
74
  <show_in_store>1</show_in_store>
75
+ </title>
76
+ <pspid translate="label">
77
+ <label>PSPID</label>
78
  <frontend_type>text</frontend_type>
79
+ <comment> PSPID is a case sensitive field</comment>
80
+ <sort_order>4</sort_order>
81
  <show_in_default>1</show_in_default>
82
  <show_in_website>1</show_in_website>
83
+ <show_in_store>0</show_in_store>
84
+ </pspid>
85
+ <secret_key_out translate="label comment">
86
+ <label>SHA-1-IN Signature</label>
87
+ <comment><![CDATA[
88
+ Use in posting data from Magento to Internetkassa. <br/>
89
+ Use in data checking by Internetkassa before the payment.
90
+ ]]></comment>
91
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
92
+ <frontend_type>obscure</frontend_type>
93
+ <sort_order>5</sort_order>
94
  <show_in_default>1</show_in_default>
95
  <show_in_website>1</show_in_website>
96
+ <show_in_store>0</show_in_store>
97
+ </secret_key_out>
98
+ <secret_key_in translate="label comment">
99
+ <label>SHA-1- OUT Signature</label>
100
+ <comment><![CDATA[
101
+ Use in posting data from Internetkassa to Magento. <br/>
102
+ Use in Feedback data checking by Magento
103
+ ]]></comment>
104
+ <backend_model>adminhtml/system_config_backend_encrypted</backend_model>
105
+ <frontend_type>obscure</frontend_type>
106
+ <sort_order>6</sort_order>
107
  <show_in_default>1</show_in_default>
108
  <show_in_website>1</show_in_website>
109
+ <show_in_store>0</show_in_store>
110
+ </secret_key_in>
111
+ <internetkassa_gateway translate="label comment">
112
+ <label>Gateway URL</label>
113
  <frontend_type>text</frontend_type>
114
+ <comment>For production, replace "test" with "prod" Example: https://secure.internetkassa.com/ncol/prod/orderstandard.asp</comment>
115
+ <sort_order>7</sort_order>
116
  <show_in_default>1</show_in_default>
117
  <show_in_website>1</show_in_website>
118
+ <show_in_store>0</show_in_store>
119
+ </internetkassa_gateway>
120
+ <payment_action translate="label comment">
121
+ <label>Payment Action</label>
122
+ <frontend_type>select</frontend_type>
123
+ <source_model>internetkassa/source_paymentAction</source_model>
124
+ <comment>If you choose "No Operation", Internetkassa will use default Payment procedure setup in Internetkassa configuration</comment>
125
+ <sort_order>8</sort_order>
126
  <show_in_default>1</show_in_default>
127
  <show_in_website>1</show_in_website>
128
+ <show_in_store>0</show_in_store>
129
+ </payment_action>
130
+ <template translate="label comment">
131
+ <label>Payment Template</label>
132
+ <frontend_type>select</frontend_type>
133
+ <source_model>internetkassa/source_template</source_model>
134
+ <comment>If you choose "Internetkassa Template", you will need to fill in all the following fields.</comment>
135
+ <sort_order>10</sort_order>
136
  <show_in_default>1</show_in_default>
137
  <show_in_website>1</show_in_website>
138
+ <show_in_store>0</show_in_store>
139
+ </template>
140
+ <html_title translate="label comment">
141
+ <label>Title of the Internetkassa Template</label>
142
  <frontend_type>text</frontend_type>
143
+ <sort_order>11</sort_order>
144
  <show_in_default>1</show_in_default>
145
  <show_in_website>1</show_in_website>
146
  <show_in_store>1</show_in_store>
147
+ </html_title>
148
+ <bgcolor translate="label comment">
149
+ <label>Background Color of Internetkassa Template</label>
150
  <frontend_type>text</frontend_type>
151
+ <comment><![CDATA[e.g: white]]></comment>
152
+ <sort_order>12</sort_order>
153
  <show_in_default>1</show_in_default>
154
  <show_in_website>1</show_in_website>
155
  <show_in_store>1</show_in_store>
156
+ </bgcolor>
157
+ <txtcolor translate="label comment">
158
+ <label>Text Color of the Internetkassa Template</label>
159
  <frontend_type>text</frontend_type>
160
+ <comment><![CDATA[e.g: black]]></comment>
161
+ <sort_order>13</sort_order>
162
  <show_in_default>1</show_in_default>
163
  <show_in_website>1</show_in_website>
164
  <show_in_store>1</show_in_store>
165
+ </txtcolor>
166
+ <tblbgcolor translate="label comment">
167
+ <label>Table Background Color of the Internetkassa Template</label>
168
  <frontend_type>text</frontend_type>
169
+ <comment><![CDATA[e.g: white]]></comment>
170
+ <sort_order>14</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
+ </tblbgcolor>
175
+ <tbltxtcolor translate="label comment">
176
+ <label>Table Text Color of the Internetkassa Template</label>
177
  <frontend_type>text</frontend_type>
178
+ <comment><![CDATA[e.g: black]]></comment>
179
+ <sort_order>15</sort_order>
180
  <show_in_default>1</show_in_default>
181
  <show_in_website>1</show_in_website>
182
  <show_in_store>1</show_in_store>
183
+ </tbltxtcolor>
184
+ <buttonbgcolor translate="label">
185
+ <label>Button Background Color of the Internetkassa Template</label>
186
  <frontend_type>text</frontend_type>
187
+ <sort_order>16</sort_order>
188
  <show_in_default>1</show_in_default>
189
  <show_in_website>1</show_in_website>
190
  <show_in_store>1</show_in_store>
191
+ </buttonbgcolor>
192
+ <buttontxtcolor translate="label comment">
193
+ <label>Button Text Color of the Internetkassa Template</label>
194
  <frontend_type>text</frontend_type>
195
+ <comment><![CDATA[e.g: white]]></comment>
196
+ <sort_order>17</sort_order>
197
  <show_in_default>1</show_in_default>
198
  <show_in_website>1</show_in_website>
199
  <show_in_store>1</show_in_store>
200
+ </buttontxtcolor>
201
+ <fonttype translate="label comment">
202
+ <label>Font Family of the Internetkassa Template</label>
203
  <frontend_type>text</frontend_type>
204
+ <comment><![CDATA[e.g: Verdana]]></comment>
205
+ <sort_order>18</sort_order>
206
  <show_in_default>1</show_in_default>
207
  <show_in_website>1</show_in_website>
208
  <show_in_store>1</show_in_store>
209
+ </fonttype>
210
+ <logo translate="label comment">
211
+ <label>Logo of the Internetkassa Template</label>
212
  <frontend_type>text</frontend_type>
213
+ <comment><![CDATA[URL/filename of the logo.
214
+ <br />The URL must be absolute and stored on a secure server.
215
+ ]]></comment>
216
+ <sort_order>19</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>
220
+ </logo>
221
+ <pmlist translate="label comment">
222
+ <label>Layout of Payment Methods</label>
223
+ <frontend_type>select</frontend_type>
224
+ <source_model>internetkassa/source_pmlist</source_model>
225
+ <comment>You can arrange the layout/list of the payment methods on Internetkassa payment page</comment>
226
+ <sort_order>20</sort_order>
227
  <show_in_default>1</show_in_default>
228
  <show_in_website>1</show_in_website>
229
  <show_in_store>1</show_in_store>
230
+ </pmlist>
231
+ </fields>
232
  </internetkassa>
233
  </groups>
234
  </payment>
app/code/community/Morningtime/Internetkassa/sql/internetkassa_setup/mysql4-install-0.0.1.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Morningtime
22
+ * @package Morningtime_Internetkassa
23
+ * @copyright Copyright (c) Morningtime Digital e.K. (http://www.morningtime.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ $installer = $this;
28
+ /* @var $installer Mage_Core_Model_Mysql4_Setup */
29
+
30
+ $installer->startSetup();
31
+
32
+ $installer->run("
33
+
34
+ DROP TABLE IF EXISTS `{$this->getTable('internetkassa/api_debug')}`;
35
+ CREATE TABLE `{$this->getTable('internetkassa/api_debug')}` (
36
+ `debug_id` int(10) unsigned NOT NULL auto_increment,
37
+ `dir` enum('in', 'out'),
38
+ `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
39
+ `url` varchar(255),
40
+ `data` text,
41
+ PRIMARY KEY (`debug_id`)
42
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
43
+
44
+ ");
45
+
46
+ $installer->endSetup();
app/design/adminhtml/default/default/template/morningtime/internetkassa/info.phtml CHANGED
@@ -1,25 +1,29 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <?php if($_info = $this->getInfo()): ?>
19
- <p><?php print $this->__('Paid with Ogone'); ?></p>
20
- <?php if($_info->getIssuerPaymentMethod()){ ?>
21
- <p><?php print $this->__('Card type'); ?>: <?php echo $_info->getPaymentMethod()->getValue(); ?></p>
22
- <p><?php print $this->__('Processor'); ?>: <?php echo $_info->getPaymentMethod()->getBrand(); ?></p>
23
- <?php } ?>
24
- <?php else: ?>
25
- <?php endif; ?>
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?><br />
29
+ <?php echo Mage::helper('payment')->__('Payment ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) ?><br/>
app/design/adminhtml/default/default/template/morningtime/internetkassa/pdf/info.phtml DELETED
@@ -1,22 +0,0 @@
1
- <?php
2
- /**
3
- * Morningtime Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <?php echo $this->__('Paid with Ogone') ?>
19
- {{pdf_row_separator}}
20
- <?php if($this->getIssuerPaymentMethod()->getValue()){ ?>
21
- <?php print $this->__('Card type'); ?>: <?php echo $this->getPaymentMethod()->getValue(); ?>
22
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/default/layout/internetkassa.xml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package default_default
24
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+ -->
28
+ <layout version="0.1.0">
29
+ <internetkassa_api_paypage>
30
+ <remove name="right"/>
31
+ <remove name="left"/>
32
+ <remove name="catalog.topnav"/>
33
+ <reference name="header">
34
+ <remove name="top.links"/>
35
+ <remove name="top.search"/>
36
+ <remove name="store_language"/>
37
+ <remove name="top.container"/>
38
+ </reference>
39
+ <reference name="footer">
40
+ <remove name="cms_footer_links"/>
41
+ <remove name="footer_links"/>
42
+ <remove name="store_switcher"/>
43
+ </reference>
44
+ <reference name="root">
45
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
46
+ </reference>
47
+ <reference name="content">
48
+ <block type="internetkassa/paypage" name="internetkassa_paypage" template="morningtime/internetkassa/paypage.phtml"/>
49
+ </reference>
50
+ </internetkassa_api_paypage>
51
+
52
+ <internetkassa_api_placeform>
53
+ <remove name="right"/>
54
+ <remove name="left"/>
55
+ <reference name="content">
56
+ <block type="internetkassa/placeform" name="internetkassa_placeform" template="morningtime/internetkassa/placeform.phtml"/>
57
+ </reference>
58
+ </internetkassa_api_placeform>
59
+ </layout>
app/design/frontend/default/default/template/morningtime/internetkassa/form.phtml CHANGED
@@ -1,55 +1,33 @@
1
- <?php
2
- /**
3
- * Magento Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <fieldset class="form-list">
19
- <?php
20
- $_code=$this->getMethodCode() ;
21
- $_method = $this->getMethod();
22
- ?>
23
- <span id="internetkassa-please-wait" style="display:none;" class="opc-please-wait">
24
- <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" class="v-middle" alt="" /> &nbsp; <?php echo $this->__('Loading next step...') ?> &nbsp;
25
- </span>
26
- <ul id="payment_form_<?php echo $_code ?>" style="display:none">
27
- <li>
28
- <strong><?php print $this->__('Choose your payment method'); ?>:</strong>
29
- </li>
30
- <?php
31
- $logoArray = array();
32
- $listItems = Mage::getModel('internetkassa/source_paymentMethodsList')->getPMList();
33
- foreach ($listItems as $item):
34
- $logoArray[$item->getPmName()] = $item->getPmUrlLogo();
35
- endforeach;
36
-
37
- if ($_method ) {
38
- $availableTypes = $_method->getConfigData('cctypes');
39
- if ($availableTypes) {
40
-
41
- $availableTypes = explode(',', $availableTypes);
42
-
43
- foreach ($availableTypes as $key=>$name) {
44
- ?>
45
- <li style="border-bottom: 1px solid #ddd; padding: 0.5em; margin: auto; height: 25px; line-height: 25px;">
46
- <img src="https://secure.ogone.com/images/<?php echo $logoArray[$name] ?>" style="float: right; margin-right: 1em;" height="25">
47
- <input type="radio" name="payment[cc_type]" value="<?php echo $name?>"> <?php echo $name?>
48
- </li>
49
- <?php
50
- }
51
- }
52
- }
53
- ?>
54
- </ul>
55
- </fieldset>
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <?php $_code=$this->getMethodCode() ?>
29
+ <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
30
+ <li>
31
+ <?php echo $this->__('You will be redirected to Internetkassa website when you place an order.') ?>
32
+ </li>
33
+ </ul>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/default/default/template/morningtime/internetkassa/info.phtml CHANGED
@@ -1,25 +1,27 @@
1
- <?php
2
- /**
3
- * Magento Internetkassa extension
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
- *
12
- * @category Morningtime
13
- * @package Morningtime_Internetkassa
14
- * @copyright Copyright (c) 2009 Morningtime Internet
15
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
16
- */
17
- ?>
18
- <?php if($_info = $this->getInfo()): ?>
19
- <p><?php print $this->__('Paid with Internetkassa'); ?></p>
20
- <?php if($_info->getIssuerPaymentMethod()){ ?>
21
- <p><?php print $this->__('Card type'); ?>: <?php echo $_info->getPaymentMethod()->getValue(); ?></p>
22
- <p><?php print $this->__('Processor'); ?>: <?php echo $_info->getPaymentMethod()->getBrand(); ?></p>
23
- <?php } ?>
24
- <?php else: ?>
25
- <?php endif; ?>
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+ <p><?php echo $this->htmlEscape($this->getMethod()->getTitle()) ?></p>
app/design/frontend/default/default/template/morningtime/internetkassa/paypage.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ $$$PAYMENT ZONE$$$
app/design/frontend/default/default/template/morningtime/internetkassa/placeform.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package default_default
23
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <p><strong><?php echo Mage::helper('internetkassa')->__('Please, wait a moment. This page will transfer your data to Internetkassa payment gateway in a few seconds.'); ?></strong></p>
29
+ <form name="internetkassa" id="internetkassa_review_form" action="<?php echo $this->getFormAction();?>" method="post" accept-charset="ISO-8859-1">
30
+ <?php if (is_array($this->getFormData())): ?>
31
+ <fieldset>
32
+ <?php foreach ($this->getFormData() as $name => $value) { ?>
33
+ <input type="hidden" name="<?php echo($name); ?>" value="<?php echo($value); ?>" />
34
+ <?php }?>
35
+ </fieldset>
36
+ <?php endif; ?>
37
+ </form>
38
+ <script type="text/javascript">
39
+ //<![CDATA[
40
+ var review = new VarienForm('internetkassa_review_form', '');
41
+ Event.observe(window, 'load', function() {
42
+ review.submit();
43
+ });
44
+ //]]>
45
+ </script>
app/etc/modules/Morningtime_Internetkassa.xml CHANGED
@@ -1,30 +1,40 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!--
3
  /**
4
- * Morningtime Internetkassa extension
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
- * This source file is subject to the Open Software License (OSL 3.0)
9
- * that is bundled with this package in the file LICENSE.txt.
10
  * It is also available through the world-wide-web at this URL:
11
- * http://opensource.org/licenses/osl-3.0.php
 
 
 
12
  *
13
- * @category Morningtime
14
- * @package Morningtime_Internetkassa
15
- * @copyright Copyright (c) 2009 Morningtime Internet, http://www.morningtime.com
16
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 
 
 
 
 
 
17
  */
18
- -->
19
  <config>
20
  <modules>
21
  <Morningtime_Internetkassa>
22
  <active>true</active>
23
  <codePool>community</codePool>
24
  <depends>
 
25
  <Mage_Payment/>
26
  </depends>
27
- <version>1.3.2.4.4</version>
28
  </Morningtime_Internetkassa>
29
  </modules>
30
  </config>
1
  <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
  /**
4
+ * Magento
5
  *
6
  * NOTICE OF LICENSE
7
  *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
  * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
  *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category Morningtime
23
+ * @package Morningtime_Internetkassa
24
+ * @copyright Copyright (c) 2010 Morningtime Digital e.K. (http://www.morningtime.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
  */
27
+ -->
28
  <config>
29
  <modules>
30
  <Morningtime_Internetkassa>
31
  <active>true</active>
32
  <codePool>community</codePool>
33
  <depends>
34
+ <Mage_Sales/>
35
  <Mage_Payment/>
36
  </depends>
37
+ <version>1.4.1.1</version>
38
  </Morningtime_Internetkassa>
39
  </modules>
40
  </config>
app/locale/en_US/Morningtime_Internetkassa.csv CHANGED
@@ -1,25 +1,76 @@
1
- "You will be redirected to the Internetkassa in a few seconds.","You will be redirected to the Internetkassa in a few seconds."
2
- "No HTML response! Missing POST/GET vars in return URL from payment processor.","No HTML response! Missing POST/GET vars in return URL from payment processor."
3
- "Order identifier is not valid!","Order identifier is not valid!"
4
- "Amount order is not valid!","Amount order is not valid!"
5
- "No payment method found for this order!","No payment method found for this order!"
6
- "No payment method or brand not valid for this order!","No payment method or brand not valid for this order!"
7
- "Feedback signature (SHA1Sign) is not valid!","Feedback signature (SHA1Sign) is not valid!"
8
- "Customer was redirected to Internetkassa.","Customer was redirected to Internetkassa."
9
- "Payment was canceled by customer.","Payment was canceled by customer."
10
- "You cancelled the payment. Please try again.","You cancelled the payment. Please try again."
11
- "Payment was declined by processor.","Payment was declined by processor."
12
- "The payment processor declined your payment. Please try again.","The payment processor declined your payment. Please try again."
13
- "There was an exception. Payment failed.","There was an exception. Payment failed."
14
- "There was an exception. Your order was cancelled. Please try again.","Er was een uitzondering. De betaling is mislukt. Probeer opnieuw."
15
- "Customer successfully returned from Internetkassa.","Customer successfully returned from Internetkassa."
16
- "An unexpected error occurred. Payment failed.","An unexpected error occurred. Payment failed."
17
- "An unexpected error occurred. Your order was cancelled. Please try again.","An unexpected error occurred. Your order was cancelled. Please try again."
18
- "Automatic update: payment successful!","Automatic update: payment successful!"
19
- "Automatic update: customer was rejected by Internetkassa","Automatic update: customer was rejected by Internetkassa."
20
- "Customer returned from Internetkassa.","Customer returned from Internetkassa."
21
- "Paid with Internetkassa","Paid with Internetkassa"
22
- "Card type","Card type"
23
- "Processor","Processor"
24
- "Choose your payment method","Choose your payment method"
25
- "You have to choose a payment method!","You have to choose a payment method!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "
2
+ Use in posting data from Magento to Internetkassa. <br/>
3
+ Use in data checking by Internetkassa before the payment.
4
+ ","
5
+ Use in posting data from Magento to Internetkassa. <br/>
6
+ Use in data checking by Internetkassa before the payment.
7
+ "
8
+ "
9
+ Use in posting data from Internetkassa to Magento. <br/>
10
+ Use in Feedback data checking by Magento
11
+ ","
12
+ Use in posting data from Internetkassa to Magento. <br/>
13
+ Use in Feedback data checking by Magento
14
+ "
15
+ "Authorization","Authorization"
16
+ "Authorization Waiting from Internetkassa","Authorization Waiting from Internetkassa"
17
+ "Authorization not known: A technical problem arose during authorization process, giving unpredictable result","Authorization not known: A technical problem arose during authorization process, giving unpredictable result"
18
+ "Background color of Internetkassa Template","Background color of Internetkassa Template"
19
+ "Button background color of the Internetkassa Template","Button background color of the Internetkassa Template"
20
+ "Button text color of the Internetkassa Template","Button text color of the Internetkassa Template"
21
+ "Cancelled Internetkassa","Cancelled Internetkassa"
22
+ "Debug","Debug"
23
+ "Declined Internetkassa","Declined Internetkassa"
24
+ "Declined Order on internetkassa side","Declined Order on internetkassa side"
25
+ "Direct Sale","Direct Sale"
26
+ "Enabled","Enabled"
27
+ "Exception not defined","Exception not defined"
28
+ "Font Family of the Internetkassa Template","Font Family of the Internetkassa Template"
29
+ "For production, replace ""test"" with ""prod"" Example: https://secure.internetkassa.com/ncol/prod/orderstandard.asp","For production, replace ""test"" with ""prod"" Example: https://secure.internetkassa.com/ncol/prod/orderstandard.asp"
30
+ "Gateway URL","Gateway URL"
31
+ "Hash is not valid","Hash is not valid"
32
+ "Horizontally grouped logo with group name on left","Horizontally grouped logo with group name on left"
33
+ "Horizontally grouped logo with no group name","Horizontally grouped logo with no group name"
34
+ "If you choose ""No Operation"", Internetkassa will use default Payment procedure setup in Internetkassa configuration","If you choose ""No Operation"", Internetkassa will use default Payment procedure setup in Internetkassa configuration"
35
+ "If you choose ""Internetkassa Template"", you will need to fill in all the following fields.","If you choose ""Internetkassa Template"", you will need to fill in all the following fields."
36
+ "Layout of Payment Methods","Layout of Payment Methods"
37
+ "Logo of the Internetkassa Template","Logo of the Internetkassa Template"
38
+ "Magento","Magento"
39
+ "Internetkassa","Internetkassa"
40
+ "Internetkassa default Operation","Internetkassa default Operation"
41
+ "Order can not be canceled for system reason","Order can not be canceled for system reason"
42
+ "Order can not be save for system reason","Order can not be save for system reason"
43
+ "Order can\'t save","Order can\'t save"
44
+ "Order canceled on internetkassa side","Order canceled on internetkassa side"
45
+ "Order is not valid","Order is not valid"
46
+ "PSPID","PSPID"
47
+ "Payment Action","Payment Action"
48
+ "Payment Template","Payment Template"
49
+ "Payment transaction has been declined.","Payment transaction has been declined."
50
+ "Payment uncertain: A technical problem arose during payment process, giving unpredictable result","Payment uncertain: A technical problem arose during payment process, giving unpredictable result"
51
+ "Pending Internetkassa","Pending Internetkassa"
52
+ "Please, wait a moment. This page will transfer your data to Internetkassa payment gateway in a few seconds.","Please, wait a moment. This page will transfer your data to Internetkassa payment gateway in a few seconds."
53
+ "Processed Internetkassa Payment","Processed Internetkassa Payment"
54
+ "Processed by Internetkassa","Processed by Internetkassa"
55
+ "Processing Internetkassa Payment","Processing Internetkassa Payment"
56
+ "SHA Signature (used by Magento)","SHA Signature (used by Magento)"
57
+ "SHA Signature (used by Internetkassa)","SHA Signature (used by Internetkassa)"
58
+ "Start internetkassa processing","Start internetkassa processing"
59
+ "Table background color of the Internetkassa Template","Table background color of the Internetkassa Template"
60
+ "Table text color of the Internetkassa Template","Table text color of the Internetkassa Template"
61
+ "Text Color of the Internetkassa Template","Text Color of the Internetkassa Template"
62
+ "Title","Title"
63
+ "Title of the Internetkassa Template","Title of the Internetkassa Template"
64
+ "URL/filename of the logo.
65
+ <br />The URL must be absolute and stored on a secure server.
66
+ ","URL/filename of the logo.
67
+ <br />The URL must be absolute and stored on a secure server.
68
+ "
69
+ "Unknown exception","Unknown exception"
70
+ "Verical list","Verical list"
71
+ "Waiting Authorization","Waiting Authorization"
72
+ "You can arrange the layout/list of the payment methods on Internetkassa payment page","You can arrange the layout/list of the payment methods on Internetkassa payment page"
73
+ "You will be redirected to Internetkassa website when you place an order.","You will be redirected to Internetkassa website when you place an order."
74
+ "e.g: Verdana","e.g: Verdana"
75
+ "e.g: black","e.g: black"
76
+ "e.g: white","e.g: white"
app/locale/nl_NL/Morningtime_Internetkassa.csv CHANGED
@@ -1,25 +1,76 @@
1
- "You will be redirected to the Internetkassa in a few seconds.","U wordt binnen enkele seconden naar de Internetkassa doorgestuurd."
2
- "No HTML response! Missing POST/GET vars in return URL from payment processor.","Geen HTML antwoord! Er ontbreken POST/GET variabelen in de terugkeer-URL."
3
- "Order identifier is not valid!","Order ID is niet geldig!"
4
- "Amount order is not valid!","Bedrag is niet geldig!"
5
- "No payment method found for this order!","Geen betaalmethode gevonden voor deze order!"
6
- "No payment method or brand not valid for this order!","Geen betaalmethode of type gevonden voor deze order!"
7
- "Feedback signature (SHA1Sign) is not valid!","Order is corrupt! SHA1Sign validatie mislukt."
8
- "Customer was redirected to Internetkassa.","Klant is doorverwezen naar de Internetkassa."
9
- "Payment was canceled by customer.","Betaling geannuleerd door klant."
10
- "You cancelled the payment. Please try again.","U heeft de betaling geannuleerd. Probeer opnieuw."
11
- "Payment was declined by processor.","Betaling geannuleerd door Internetkassa."
12
- "The payment processor declined your payment. Please try again.","Internetkassa heeft uw betaling geweigerd. Probeer opnieuw."
13
- "There was an exception. Payment failed.","Een uitzondering heeft plaatsgevonden. Betaling mislukt."
14
- "There was an exception. Your order was cancelled. Please try again.","Er was een uitzondering. De betaling is mislukt. Probeer opnieuw."
15
- "Customer successfully returned from Internetkassa.","Klant succesvol teruggekeerd van de Internetkassa."
16
- "An unexpected error occurred. Payment failed.","Een onverwachtte error heeft plaatsgevonden. Betaling mislukt."
17
- "An unexpected error occurred. Your order was cancelled. Please try again.","Een onverwachtte error heeft plaatsgevonden. Betaling mislukt. Probeer opnieuw."
18
- "Automatic update: payment successful!","Automatische update: klant heeft betaald!"
19
- "Automatic update: customer was rejected by Internetkassa","Automatische update: klant heeft NIET betaald!"
20
- "Customer returned from Internetkassa.","Klant teruggekeerd van de Internetkassa."
21
- "Paid with Internetkassa","Betaald met Internetkassa"
22
- "Card type","Betaalmethode"
23
- "Processor","Merk"
24
- "Choose your payment method","Kies uw betaalmethode"
25
- "You have to choose a payment method!","U dient een betaalmethode te kiezen!"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "
2
+ Use in posting data from Magento to Internetkassa. <br/>
3
+ Use in data checking by Internetkassa before the payment.
4
+ ","
5
+ Use in posting data from Magento to Internetkassa. <br/>
6
+ Use in data checking by Internetkassa before the payment.
7
+ "
8
+ "
9
+ Use in posting data from Internetkassa to Magento. <br/>
10
+ Use in Feedback data checking by Magento
11
+ ","
12
+ Use in posting data from Internetkassa to Magento. <br/>
13
+ Use in Feedback data checking by Magento
14
+ "
15
+ "Authorization","Autorisatie"
16
+ "Authorization Waiting from Internetkassa","Wacht op Autorisatie van Internetkassa"
17
+ "Authorization not known: A technical problem arose during authorization process, giving unpredictable result","Autorisatie onbekend: Er is een technisch probleem ontstaan tijdens het autorisatieproces met een onvoorspelbaar resultaat"
18
+ "Background color of Internetkassa Template","Achtergrondkleur van de Internetkassa Template"
19
+ "Button background color of the Internetkassa Template","Button achtergrondkleur van de Internetkassa Template"
20
+ "Button text color of the Internetkassa Template","Button tekstkleur van de Internetkassa Template"
21
+ "Cancelled Internetkassa","Geannuleerd Internetkassa"
22
+ "Debug","Debug"
23
+ "Declined Internetkassa","Afgewezen Internetkassa"
24
+ "Declined Order on internetkassa side","Afgewezen Order door Internetkassa"
25
+ "Direct Sale","Direct Sale"
26
+ "Enabled","Ingeschakeld"
27
+ "Exception not defined","Uitzondering niet gedefinieerd"
28
+ "Font Family of the Internetkassa Template","Font Family van de Internetkassa Template"
29
+ "For production, replace ""test"" with ""prod"" Example: https://secure.internetkassa.com/ncol/prod/orderstandard.asp","Vul de juist Gateway URL in. Voor productie, vervang ""test"" met ""prod"" Bijvoorbeeld: https://i-kassa.rabobank.nl/RIK/prod/orderstandard.asp"
30
+ "Gateway URL","Gateway URL"
31
+ "Hash is not valid","Hash is niet geldig"
32
+ "Horizontally grouped logo with group name on left","Horizontaal gegroepeerd logo met groepsnaam ter linkerzijde"
33
+ "Horizontally grouped logo with no group name","Horizontaal gegroepeerd logo zonder groepsnaam"
34
+ "If you choose ""No Operation"", Internetkassa will use default Payment procedure setup in Internetkassa configuration","Indien u ""No Operation"" kiest zal Internetkassa de standaard Betaalprocedure setup setup in de Internetkassa configuratie gebruiken"
35
+ "If you choose ""Internetkassa Template"", you will need to fill in all the following fields.","Indien u ""Internetkassa Template"" kiest, moet u alle volgende velden invullen."
36
+ "Layout of Payment Methods","Layout van de Betaalmethodes"
37
+ "Logo of the Internetkassa Template","Logo van de Internetkassa Template"
38
+ "Magento","Magento"
39
+ "Internetkassa","Internetkassa"
40
+ "Internetkassa default Operation","Internetkassa standaard Operatie"
41
+ "Order can not be canceled for system reason","Order kan niet worden geanuleerd wegens een technische grond"
42
+ "Order can not be save for system reason","Order kan niet worden opgeslagen wegens technische grond"
43
+ "Order can\'t save","Order kan niet worden opgeslagen"
44
+ "Order canceled on internetkassa side","Order geannuleerd door internetkassa"
45
+ "Order is not valid","Order is niet geldig"
46
+ "PSPID","PSPID"
47
+ "Payment Action","Payment Action"
48
+ "Payment Template","Payment Template"
49
+ "Payment transaction has been declined.","Betalingstransactie is afgewezen."
50
+ "Payment uncertain: A technical problem arose during payment process, giving unpredictable result","Betaling onzeker: Tijdens het betaalproces is een probleem ontstaan met een onvoorspelbaar resultaat."
51
+ "Pending Internetkassa","In Afwachting Internetkassa"
52
+ "Please, wait a moment. This page will transfer your data to Internetkassa payment gateway in a few seconds.","Een moment gedulgd alstublieft. Deze pagina zal uw data doorsturen naar de Internetkassa betaalpagina, in enkele ogenblikken."
53
+ "Processed Internetkassa Payment","Internetkassa Betaling Verwerkt"
54
+ "Processed by Internetkassa","Verwerkt door Internetkassa"
55
+ "Processing Internetkassa Payment","Verwerking van Internetkassa Betaling"
56
+ "SHA Signature (used by Magento)","SHA Handtekening (gebruikt door Magento)"
57
+ "SHA Signature (used by Internetkassa)","SHA Handtekening (gebruikt door Internetkassa)"
58
+ "Start internetkassa processing","Start internetkassa verwerking"
59
+ "Table background color of the Internetkassa Template","Tabel achtergrondskleur van de Internetkassa Template"
60
+ "Table text color of the Internetkassa Template","Tabel tekstkleur van de Internetkassa Template"
61
+ "Text Color of the Internetkassa Template","Tekstkleuer van de Internetkassa Template"
62
+ "Title","Titel"
63
+ "Title of the Internetkassa Template","Titel van de Internetkassa Template"
64
+ "URL/filename of the logo.
65
+ <br />The URL must be absolute and stored on a secure server.
66
+ ","URL/filename of the logo.
67
+ <br />The URL must be absolute and stored on a secure server.
68
+ "
69
+ "Unknown exception","Unknown exception"
70
+ "Verical list","Verical list"
71
+ "Waiting Authorization","Waiting Authorization"
72
+ "You can arrange the layout/list of the payment methods on Internetkassa payment page","You can arrange the layout/list of the payment methods on Internetkassa payment page"
73
+ "You will be redirected to Internetkassa website when you place an order.","You will be redirected to Internetkassa website when you place an order."
74
+ "e.g: Verdana","e.g: Verdana"
75
+ "e.g: black","e.g: black"
76
+ "e.g: white","e.g: white"
package.xml CHANGED
@@ -1,43 +1,29 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Morningtime_Internetkassa</name>
4
- <version>1.3.2.4.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
- <summary>(Dutch only) - Internetkassa voor iDEAL Only, Rabobank, ABN AMRO, ING Bank (TWYP), Fortis (NEOS) en Ogone. Ondersteuning voor iDEAL, Credit Cards, Paypal en veel meer!</summary>
10
- <description>== UPDATE 1.3.2.4.5 ==
11
- Fix for mastercard.
12
 
13
- == UPDATE 1.3.2.4.4 ==
14
-
15
- - Nu met configuratie instellingen per store-view
16
- - Daardoor ook toevoegen store-code in URL mogelijk (handmatig)
17
-
18
- Installatie in twee stappen. 1. Magento, 2. Internetkassa
19
 
20
  == 1. INSTALLATIE MAGENTO ==
21
- Installeren via Magento Connect. Refresh cache en opnieuw inloggen in admin. Bekijk de instellingen op Systeem &gt; Configuratie &gt; Betaalwijzen &gt; Internetkassa.
22
 
23
- De volgende instellingen wijzigen:
24
 
25
- - Enabled: Yes
26
- - Test mode: Yes
27
- - Issuer: kies uw bank / systeem
28
- - Currency: kies uw munteenheden
29
- - PSPID: uw pspid van uw bank / systeem
30
- - Language: kies transactie-taal
31
- - Payment methods: selecteer uw betaal opties, bijvoorbeeld iDEAL
32
- - Order status: in afwachting
33
 
34
- == 2. INTERNETKASSA ==
35
  - login op uw test account
36
  - activeer gewenste betaalmethoden, bijv. iDEAL en VISA (vraag hulp bij bank)
37
  - Ga naar "technische informatie":
38
 
39
  Tabblad Algemeen:
40
- - Standaard operatie: "Verkoop"
41
  - Verwerking transacties: "Altijd online"
42
 
43
  Tabblad Data en herkomst:
@@ -48,11 +34,33 @@ Tabblad Transactiefeedback
48
  - Urls leeg laten (loopt via shop)
49
  - " Ik wil transactie feedback parameters" aanvinken
50
  - SHA1OUT versleuteling: vooer hetzelfde wachtwoord in als bij SHA1IN
 
 
 
 
 
 
 
51
 
52
  KLAAR - na testen kunt u het test-account omzetten naar productie. Voer dan weer dezelfde instellingen in!
53
 
54
- == COMMERCIELE HULP ==
55
- Voor commerciele hulp bij installaties, stuur een email naar info@morningtime.com.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  == ONDERSTEUNING VOOR: ==
58
  - iDEAL Only Kassa's
@@ -73,12 +81,12 @@ Voor commerciele hulp bij installaties, stuur een email naar info@morningtime.co
73
 
74
  - Offline: Acceptgiro, Bank transfer, Payment on Delivery
75
 
76
- - Micro </description>
77
  <notes>Stable release.</notes>
78
  <authors><author><name>Mathijs Koenraadt</name><user>auto-converted</user><email>info@morningtime.com</email></author></authors>
79
- <date>2009-10-29</date>
80
- <time>07:14:05</time>
81
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="morningtime"><dir name="internetkassa"><file name="info.phtml" hash="8b92d5fd7b12cdc190fdfc8416e51630"/><dir name="pdf"><file name="info.phtml" hash="c210a66172ca6655faaca27de6ee941c"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="morningtime"><dir name="internetkassa"><file name="form.phtml" hash="c1098b177f0b1dfbb6147a9a709a0c7b"/><file name="info.phtml" hash="1109a89242b9700c6429e86b72e738d3"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Morningtime_Internetkassa.csv" hash="5319bbb126b9f483cb99b66bc12a4500"/></dir><dir name="nl_NL"><file name="Morningtime_Internetkassa.csv" hash="82037bd514a36f6c9d2c51f73eb3ed07"/></dir></target><target name="mageetc"><dir name="modules"><file name="Morningtime_Internetkassa.xml" hash="72bac1663ed0d6a23b101a272956144a"/></dir></target><target name="magecommunity"><dir name="Morningtime"><dir name="Internetkassa"><dir name="Block"><file name="Form.php" hash="67068968ef7ed62c359413d5e78d4a26"/><file name="Info.php" hash="93994916dc3cfe7467319a91f54f95b3"/><file name="Redirect.php" hash="8058a77971fa18d0f354bf8e8c02d0c2"/></dir><dir name="controllers"><file name="ResultController.php" hash="18315de65ef347fd727dcb4afa6cd017"/></dir><dir name="etc"><file name="config.xml" hash="39aa2d65713faeac4a2b08e63092caa1"/><file name="system.xml" hash="7e3e15001fc7c699cd19ca9b8808799d"/></dir><dir name="Helper"><file name="Data.php" hash="ceb27c2343b4930b268e88d5c4d61af9"/><file name="ViewerList.php" hash="df5990c71e175a67ffb5e759ef23cd0f"/></dir><dir name="Model"><file name="Internetkassa.php" hash="ec2b1f7375fc6ed4aafbd003e7c77c82"/><dir name="Source"><file name="Currencies.php" hash="70bdaf14bd97f39583b143f81e9d1355"/><file name="Issuers.php" hash="bbed5662abe2620bf7394e31e01181cc"/><file name="Languages.php" hash="3292f98c244e6d5c8124a96d174bbf83"/><file name="PaymentMethod.php" hash="0391f356879414f96f4e26af4a78c0de"/><file name="PaymentMethods.php" hash="fa108c22b42eab684441ddf168e1af6c"/><file name="PaymentMethodsList.php" hash="fa38614fdcba5dbbb59af984994c4c98"/></dir></dir></dir></dir></target></contents>
82
  <compatible/>
83
  <dependencies/>
84
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Morningtime_Internetkassa</name>
4
+ <version>1.4.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>(Dutch only) - Internetkassa is de betaalmodule voor alle Ogone-gebaseerde kassa's, zoals Rabo Internetkassa, ABN AMRO Internetkassa, NEOS Solutions kassa, TWYP (The Way You Pay) van ING Bank en Ogone. En wellicht diverse andere, minder bekende.</summary>
10
+ <description>Internetkassa is de betaalmodule voor alle Ogone-gebaseerde kassa's, zoals Rabo Internetkassa, ABN AMRO Internetkassa, NEOS Solutions kassa, TWYP (The Way You Pay) van ING Bank en Ogone. En wellicht diverse andere, minder bekende.
 
11
 
12
+ WAARSCHUWING:
13
+ "iDEAL Advanced" en "iDEAL Basic/Lite/Easy" WERKEN NIET MET DEZE MODULE.
 
 
 
 
14
 
15
  == 1. INSTALLATIE MAGENTO ==
 
16
 
17
+ Installeren via Magento Connect. Refresh cache en opnieuw inloggen in admin. Bekijk de instellingen op Systeem &gt; Configuratie &gt; Betaalwijzen &gt; Internetkassa.
18
 
19
+ == 2. INSTALLATIE IN INTERNETKASSA OMGEVING VAN UW BANK ==
 
 
 
 
 
 
 
20
 
 
21
  - login op uw test account
22
  - activeer gewenste betaalmethoden, bijv. iDEAL en VISA (vraag hulp bij bank)
23
  - Ga naar "technische informatie":
24
 
25
  Tabblad Algemeen:
26
+ - Standaard operatie: "Verkoop" (Direct Sale)
27
  - Verwerking transacties: "Altijd online"
28
 
29
  Tabblad Data en herkomst:
34
  - Urls leeg laten (loopt via shop)
35
  - " Ik wil transactie feedback parameters" aanvinken
36
  - SHA1OUT versleuteling: vooer hetzelfde wachtwoord in als bij SHA1IN
37
+ - ** Belangrijk: Direct HTTP server to server requestion moet op 'altijd uitgesteld' staan!
38
+
39
+ URLs voor "Direct HTTP server-to-server request ": (2x)
40
+ http://www.uwsite.com/internetkassa/api/postBack
41
+
42
+ URL voor "HTTP request for status changes" (1x) (zet op offline):
43
+ http://www.uwsite.com/internetkassa/api/offlineProcess
44
 
45
  KLAAR - na testen kunt u het test-account omzetten naar productie. Voer dan weer dezelfde instellingen in!
46
 
47
+ ===GATEWAY URLS===
48
+ Rabobank
49
+ https://i-kassa.rabobank.nl/RIK/prod/orderstandard.asp
50
+
51
+ ABN AMRO
52
+ https://internetkassa.abnamro.nl/ncol/prod/orderstandard.asp
53
+
54
+ NEOS
55
+ https://www.secure.neos-solution.com/ncol/prod/orderstandard.asp
56
+
57
+ TWYP
58
+ https://twyp.secure-ing.com/ncol/prod/orderstandard.asp
59
+
60
+ OGONE
61
+ https://secure.ogone.com/ncol/prod/orderstandard.asp
62
+
63
+ (en soorgelijke URLs voor alle andere Ogone-gebaseerde internetkassa).
64
 
65
  == ONDERSTEUNING VOOR: ==
66
  - iDEAL Only Kassa's
81
 
82
  - Offline: Acceptgiro, Bank transfer, Payment on Delivery
83
 
84
+ - Micro &amp; mobile: MiniTix, TUNZ</description>
85
  <notes>Stable release.</notes>
86
  <authors><author><name>Mathijs Koenraadt</name><user>auto-converted</user><email>info@morningtime.com</email></author></authors>
87
+ <date>2010-09-06</date>
88
+ <time>12:17:17</time>
89
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="morningtime"><dir name="internetkassa"><file name="info.phtml" hash="d0af03c7abe96515605a107251dab0a3"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="internetkassa.xml" hash="cb6513dd2f562bac92d786d4f3e914b4"/></dir><dir name="template"><dir name="morningtime"><dir name="internetkassa"><file name="form.phtml" hash="59b7fba1ddc2652651ae69cf268b3e20"/><file name="info.phtml" hash="ab903c6655ff46d650829043d6e81f5f"/><file name="paypage.phtml" hash="296ed4b5132a7005d3ed31cd1b73347d"/><file name="placeform.phtml" hash="80c1caa68f7076fa5ce13a3a18abb1cc"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Morningtime_Internetkassa.csv" hash="c6a7e3befa29fdfa69b777c5484519be"/></dir><dir name="nl_NL"><file name="Morningtime_Internetkassa.csv" hash="77242c46e7c6dbd54c105a6c54a6debd"/></dir></target><target name="mageetc"><dir name="modules"><file name="Morningtime_Internetkassa.xml" hash="8cc9d181325ac8f0b54e8282f10c4632"/></dir></target><target name="magecommunity"><dir name="Morningtime"><dir name="Internetkassa"><dir name="Block"><file name="Form.php" hash="be729e94259ef5ec6c47073b59c82b30"/><file name="Info.php" hash="75a08dd378cfece0c6db5b5a4894bc3b"/><file name="Paypage.php" hash="39016c0034e444d2f1d7fabd5815e99b"/><file name="Placeform.php" hash="4b360ea039895544bf5ef57d42e7ce5d"/></dir><dir name="controllers"><file name="ApiController.php" hash="db16adb449b50ed85f64914f1e1eb8c0"/></dir><dir name="etc"><file name="config.xml" hash="9d47c418d2bf9cf2b932a5a64733819b"/><file name="system.xml" hash="662b886db810028d67fcaa35baba0b7a"/></dir><dir name="Helper"><file name="Data.php" hash="152eac84f50e108ba7942e2983582c73"/></dir><dir name="Model"><file name="Api.php" hash="346bf447420e0e22b4e2e3d02a4c36fb"/><file name="Config.php" hash="401ff397854816aed6763b54a43d276e"/><dir name="Api"><file name="Debug.php" hash="6ace7e020d03bd6a5f63b4787dc1f897"/></dir><dir name="Mysql4"><dir name="Api"><file name="Debug.php" hash="7d0b1620f891dea9f28ef3da44a2ac2f"/></dir></dir><dir name="Source"><file name="PaymentAction.php" hash="3874f1c2657b274ac2c411daf6d76800"/><file name="Pmlist.php" hash="a6c47b2e975a04b4205c370e0de91861"/><file name="Template.php" hash="97f510d1600c15f5f9dc17c09791dd2a"/></dir></dir><dir name="sql"><dir name="internetkassa_setup"><file name="mysql4-install-0.0.1.php" hash="d365a3c9e3a9950eb5ac31bcd084b912"/></dir></dir></dir></dir></target></contents>
90
  <compatible/>
91
  <dependencies/>
92
  </package>