HeidelpayCDEdition - Version 17.3.30

Version Notes

- new payment method invoice secured
- new payment method direct debit secured

See CHANGELOG.md for the full list of changes.

Download this release

Release Info

Developer Heidelberger Payment GmbH
Extension HeidelpayCDEdition
Version 17.3.30
Comparing to
See all releases


Code changes from version 16.6.22 to 17.3.30

Files changed (115) hide show
  1. app/code/community/HeidelpayCD/Edition/Block/Abstract.php +37 -21
  2. app/code/community/HeidelpayCD/Edition/Block/Button.php +19 -6
  3. app/code/community/HeidelpayCD/Edition/Block/Form/Creditcard.php +24 -9
  4. app/code/community/HeidelpayCD/Edition/Block/Form/Debit.php +24 -9
  5. app/code/community/HeidelpayCD/Edition/Block/Form/Desconly.php +24 -9
  6. app/code/community/HeidelpayCD/Edition/Block/Form/DirectDebitSecured.php +24 -0
  7. app/code/community/HeidelpayCD/Edition/Block/Form/Eps.php +24 -9
  8. app/code/community/HeidelpayCD/Edition/Block/Form/Giropay.php +0 -0
  9. app/code/community/HeidelpayCD/Edition/Block/Form/Ideal.php +24 -9
  10. app/code/community/HeidelpayCD/Edition/Block/Form/InvoiceSecured.php +24 -0
  11. app/code/community/HeidelpayCD/Edition/Block/Form/Masterpass.php +24 -9
  12. app/code/community/HeidelpayCD/Edition/Block/Form/Postfinance.php +24 -9
  13. app/code/community/HeidelpayCD/Edition/Block/Index.php +24 -10
  14. app/code/community/HeidelpayCD/Edition/Block/Info/Debit.php +0 -0
  15. app/code/community/HeidelpayCD/Edition/Block/Info/DirectDebit.php +24 -0
  16. app/code/community/HeidelpayCD/Edition/Block/Info/Invoice.php +24 -9
  17. app/code/community/HeidelpayCD/Edition/Block/Info/Masterpass.php +27 -12
  18. app/code/community/HeidelpayCD/Edition/Block/Info/Prepayment.php +24 -0
  19. app/code/community/HeidelpayCD/Edition/Block/Onepage.php +49 -35
  20. app/code/community/HeidelpayCD/Edition/Block/Onepage/Billing.php +52 -37
  21. app/code/community/HeidelpayCD/Edition/Block/Onepage/Progress.php +104 -79
  22. app/code/community/HeidelpayCD/Edition/Block/Onepage/Shipping.php +51 -37
  23. app/code/community/HeidelpayCD/Edition/Block/Response.php +19 -0
  24. app/code/community/HeidelpayCD/Edition/Block/Success.php +38 -24
  25. app/code/community/HeidelpayCD/Edition/Helper/AbstractHelper.php +98 -0
  26. app/code/community/HeidelpayCD/Edition/Helper/BasketApi.php +136 -0
  27. app/code/community/HeidelpayCD/Edition/Helper/Data.php +19 -7
  28. app/code/community/HeidelpayCD/Edition/Helper/OrderState.php +105 -0
  29. app/code/community/HeidelpayCD/Edition/Helper/Payment.php +309 -551
  30. app/code/community/HeidelpayCD/Edition/Helper/Validator.php +41 -0
  31. app/code/community/HeidelpayCD/Edition/Model/Customer.php +24 -12
  32. app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer.php +23 -9
  33. app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer/Collection.php +24 -11
  34. app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction.php +23 -9
  35. app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction/Collection.php +20 -7
  36. app/code/community/HeidelpayCD/Edition/Model/Observer.php +196 -122
  37. app/code/community/HeidelpayCD/Edition/Model/Order/Pdf/Invoice.php +21 -101
  38. app/code/community/HeidelpayCD/Edition/Model/Payment/Abstract.php +1139 -695
  39. app/code/community/HeidelpayCD/Edition/Model/Payment/AbstractSecuredPaymentMethods.php +325 -0
  40. app/code/community/HeidelpayCD/Edition/Model/Payment/HcdDirectDebitSecured.php +105 -0
  41. app/code/community/HeidelpayCD/Edition/Model/Payment/HcdInvoiceSecured.php +35 -0
  42. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdbs.php +174 -46
  43. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdcc.php +76 -31
  44. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddc.php +67 -32
  45. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddd.php +79 -113
  46. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdeps.php +55 -45
  47. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdgp.php +22 -82
  48. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdide.php +60 -45
  49. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdiv.php +60 -10
  50. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmk.php +34 -16
  51. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmpa.php +142 -110
  52. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpal.php +65 -40
  53. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpf.php +56 -35
  54. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpp.php +183 -28
  55. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdsu.php +33 -14
  56. app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdyt.php +24 -14
  57. app/code/community/HeidelpayCD/Edition/Model/Resource/Encryption.php +39 -20
  58. app/code/community/HeidelpayCD/Edition/Model/Resource/Setup.php +19 -6
  59. app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Bookingmode.php +31 -12
  60. app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Recognition.php +32 -15
  61. app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Returnurl.php +31 -13
  62. app/code/community/HeidelpayCD/Edition/Model/Transaction.php +130 -111
  63. app/code/community/HeidelpayCD/Edition/controllers/.IndexController.php.swp +0 -0
  64. app/code/community/HeidelpayCD/Edition/controllers/CheckoutController.php +288 -268
  65. app/code/community/HeidelpayCD/Edition/controllers/IndexController.php +664 -731
  66. app/code/community/HeidelpayCD/Edition/controllers/ResponseController.php +274 -0
  67. app/code/community/HeidelpayCD/Edition/etc/config.xml +323 -337
  68. app/code/community/HeidelpayCD/Edition/etc/system.xml +1373 -1387
  69. app/code/community/HeidelpayCD/Edition/sql/hcd_setup/install-15.1.30.php +188 -170
  70. app/design/adminhtml/base/default/template/hcd/info/pdf/directdebit.phtml +40 -0
  71. app/design/adminhtml/base/default/template/hcd/info/pdf/invoice.phtml +41 -0
  72. app/design/adminhtml/base/default/template/hcd/info/pdf/prepayment.phtml +40 -0
  73. app/design/adminhtml/default/default/template/hcd/Info/masterpass.phtml +22 -22
  74. app/design/adminhtml/default/default/template/hcd/Info/pdf/invoice.phtml +0 -0
  75. app/design/frontend/base/default/layout/hcd.xml +137 -73
  76. app/design/frontend/base/default/template/hcd/Info/debit.phtml +0 -0
  77. app/design/frontend/base/default/template/hcd/Info/masterpass.phtml +0 -0
  78. app/design/frontend/base/default/template/hcd/Info/pdf/invoice.phtml +0 -6
  79. app/design/frontend/base/default/template/hcd/button.phtml +0 -0
  80. app/design/frontend/base/default/template/hcd/form/creditcard.phtml +96 -58
  81. app/design/frontend/base/default/template/hcd/form/debit.phtml +68 -135
  82. app/design/frontend/base/default/template/hcd/form/desconly.phtml +22 -6
  83. app/design/frontend/base/default/template/hcd/form/direct-debit-secured.phtml +147 -0
  84. app/design/frontend/base/default/template/hcd/form/eps.phtml +60 -38
  85. app/design/frontend/base/default/template/hcd/form/giropay.phtml +0 -0
  86. app/design/frontend/base/default/template/hcd/form/ideal.phtml +60 -38
  87. app/design/frontend/base/default/template/hcd/form/invoice-secured.phtml +118 -0
  88. app/design/frontend/base/default/template/hcd/form/masterpass.phtml +56 -42
  89. app/design/frontend/base/default/template/hcd/form/postfinance.phtml +40 -17
  90. app/design/frontend/base/default/template/hcd/index.phtml +0 -0
  91. app/design/frontend/base/default/template/hcd/mail/hcd_payment_info.phtml +0 -0
  92. app/design/frontend/base/default/template/hcd/onepage.phtml +0 -0
  93. app/design/frontend/base/default/template/hcd/onepage/billing.phtml +0 -0
  94. app/design/frontend/base/default/template/hcd/onepage/payment.phtml +0 -0
  95. app/design/frontend/base/default/template/hcd/onepage/payment/methods.phtml +0 -0
  96. app/design/frontend/base/default/template/hcd/onepage/progress.phtml +0 -0
  97. app/design/frontend/base/default/template/hcd/onepage/progress/payment.phtml +0 -0
  98. app/design/frontend/base/default/template/hcd/onepage/progress/shipping.phtml +0 -0
  99. app/design/frontend/base/default/template/hcd/onepage/shipping_method.phtml +0 -0
  100. app/design/frontend/base/default/template/hcd/response.phtml +0 -0
  101. app/design/frontend/base/default/template/hcd/success.phtml +0 -0
  102. app/etc/modules/HeidelpayCD_Edition.xml +11 -11
  103. app/locale/de_DE/HeidelpayCD_Edition.csv +15 -18
  104. app/locale/en_US/HeidelpayCD_Edition.csv +22 -20
  105. js/hcd/heidelpaycd.js +139 -121
  106. js/hcd/heidelpaypci3.js +101 -81
  107. js/hcd/opcheckout.js +1043 -962
  108. package.xml +10 -11
  109. skin/adminhtml/base/default/images/hcd/masterpass_100_28.jpg +0 -0
  110. skin/frontend/base/default/css/hcdcc_payment_frame.css +4 -4
  111. skin/frontend/base/default/css/hcddc_payment_frame.css +4 -4
  112. skin/frontend/base/default/css/heidelpaycd.css +110 -113
  113. skin/frontend/base/default/images/hcd/loading.gif +0 -0
  114. skin/frontend/base/default/images/hcd/masterpass_100_28.jpg +0 -0
  115. skin/frontend/base/default/images/hcd/masterpass_240_66.jpg +0 -0
app/code/community/HeidelpayCD/Edition/Block/Abstract.php CHANGED
@@ -1,21 +1,37 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Abstract extends Mage_Core_Block_Template
3
- {
4
- public function getSession() {
5
- return Mage::getSingleton('core/session');
6
- }
7
-
8
- public function getCheckout()
9
- {
10
- return Mage::getSingleton('checkout/session');
11
- }
12
-
13
- public function getCurrentOrder() {
14
- $order = Mage::getModel('sales/order');
15
- $session = $this->getCheckout();
16
- $order->loadByIncrementId($session->getLastRealOrderId());
17
-
18
- return $order ;
19
- }
20
-
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Abstract block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Abstract extends Mage_Core_Block_Template
18
+ {
19
+ public function getSession()
20
+ {
21
+ return Mage::getSingleton('core/session');
22
+ }
23
+
24
+ public function getCheckout()
25
+ {
26
+ return Mage::getSingleton('checkout/session');
27
+ }
28
+
29
+ public function getCurrentOrder()
30
+ {
31
+ $order = Mage::getModel('sales/order');
32
+ $session = $this->getCheckout();
33
+ $order->loadByIncrementId($session->getLastRealOrderId());
34
+
35
+ return $order;
36
+ }
37
+ }
app/code/community/HeidelpayCD/Edition/Block/Button.php CHANGED
@@ -1,6 +1,19 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Button extends HeidelpayCD_Edition_Block_Abstract
3
- {
4
-
5
-
6
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Button block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Button extends HeidelpayCD_Edition_Block_Abstract
18
+ {
19
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Creditcard.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Creditcard extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/creditcard.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Credit card block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Creditcard extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/creditcard.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Debit.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Debit extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/debit.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Direct debit block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Debit extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/debit.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Desconly.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Desconly extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/desconly.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Description only block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warnina
17
+ class HeidelpayCD_Edition_Block_Form_Desconly extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/desconly.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/DirectDebitSecured.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Direct debit block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_DirectDebitSecured extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/direct-debit-secured.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Eps.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Eps extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/eps.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Eps block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Eps extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/eps.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Giropay.php CHANGED
File without changes
app/code/community/HeidelpayCD/Edition/Block/Form/Ideal.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Ideal extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/ideal.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * IDeal block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Ideal extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/ideal.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/InvoiceSecured.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Invoice secured form block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_InvoiceSecured extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/invoice-secured.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Masterpass.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Masterpass extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/masterpass.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Masterpass block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Masterpass extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/masterpass.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Form/Postfinance.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Form_Postfinance extends Mage_Payment_Block_Form
3
- {
4
- protected function _construct()
5
- {
6
- parent::_construct();
7
- $this->setTemplate('hcd/form/postfinance.phtml');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Postfinance block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Form_Postfinance extends Mage_Payment_Block_Form
18
+ {
19
+ protected function _construct()
20
+ {
21
+ parent::_construct();
22
+ $this->setTemplate('hcd/form/postfinance.phtml');
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Index.php CHANGED
@@ -1,10 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Index extends HeidelpayCD_Edition_Block_Abstract
3
- {
4
-
5
- function getHcdHolder() {
6
- $order = $this->getCurrentOrder();
7
- return $order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname();
8
- }
9
-
10
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Index block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Index extends HeidelpayCD_Edition_Block_Abstract
18
+ {
19
+ public function getHcdHolder()
20
+ {
21
+ $order = $this->getCurrentOrder();
22
+ return $order->getBillingAddress()->getFirstname().' '.$order->getBillingAddress()->getLastname();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Info/Debit.php CHANGED
File without changes
app/code/community/HeidelpayCD/Edition/Block/Info/DirectDebit.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Direct debit info block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Info_DirectDebit extends Mage_Payment_Block_Info
18
+ {
19
+ public function toPdf()
20
+ {
21
+ $this->setTemplate('hcd/info/pdf/directdebit.phtml');
22
+ return $this->toHtml();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Info/Invoice.php CHANGED
@@ -1,9 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Info_Invoice extends Mage_Payment_Block_Info
3
- {
4
- public function toPdf()
5
- {
6
- $this->setTemplate('hcd/info/pdf/invoice.phtml');
7
- return $this->toHtml();
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Invoice info block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Info_Invoice extends Mage_Payment_Block_Info
18
+ {
19
+ public function toPdf()
20
+ {
21
+ $this->setTemplate('hcd/info/pdf/invoice.phtml');
22
+ return $this->toHtml();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Info/Masterpass.php CHANGED
@@ -1,12 +1,27 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Info_Masterpass extends Mage_Payment_Block_Info
3
- {
4
- /**
5
- * Init default template for block
6
- */
7
- protected function _construct()
8
- {
9
- parent::_construct();
10
- $this->setTemplate('hcd/info/masterpass.phtml');
11
- }
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Masterpass info block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Info_Masterpass extends Mage_Payment_Block_Info
18
+ {
19
+ /**
20
+ * Init default template for block
21
+ */
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('hcd/info/masterpass.phtml');
26
+ }
27
+ }
app/code/community/HeidelpayCD/Edition/Block/Info/Prepayment.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Invoice info block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Info_Prepayment extends Mage_Payment_Block_Info
18
+ {
19
+ public function toPdf()
20
+ {
21
+ $this->setTemplate('hcd/info/pdf/prepayment.phtml');
22
+ return $this->toHtml();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Block/Onepage.php CHANGED
@@ -1,35 +1,49 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Block_Onepage extends Mage_Checkout_Block_Onepage
4
- {
5
- /**
6
- * Get 'one step checkout' step data
7
- *
8
- * @return array
9
- */
10
- public function getSteps()
11
- {
12
- $steps = array();
13
- $stepCodes = $this->_getStepCodes();
14
-
15
- if ($this->isCustomerLoggedIn()) {
16
- $stepCodes = array_diff($stepCodes, array('login'));
17
- }
18
-
19
- foreach ($stepCodes as $step) {
20
- $steps[$step] = $this->getCheckout()->getStepData($step);
21
- }
22
-
23
- return $steps;
24
- }
25
-
26
- /**
27
- * Get active step
28
- *
29
- * @return string
30
- */
31
- public function getActiveStep()
32
- {
33
- return $this->isCustomerLoggedIn() ? 'billing' : 'billing';
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Onepage block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Onepage extends Mage_Checkout_Block_Onepage
18
+ {
19
+ /**
20
+ * Get 'one step checkout' step data
21
+ *
22
+ * @return array
23
+ */
24
+ public function getSteps()
25
+ {
26
+ $steps = array();
27
+ $stepCodes = $this->_getStepCodes();
28
+
29
+ if ($this->isCustomerLoggedIn()) {
30
+ $stepCodes = array_diff($stepCodes, array('login'));
31
+ }
32
+
33
+ foreach ($stepCodes as $step) {
34
+ $steps[$step] = $this->getCheckout()->getStepData($step);
35
+ }
36
+
37
+ return $steps;
38
+ }
39
+
40
+ /**
41
+ * Get active step
42
+ *
43
+ * @return string
44
+ */
45
+ public function getActiveStep()
46
+ {
47
+ return $this->isCustomerLoggedIn() ? 'billing' : 'billing';
48
+ }
49
+ }
app/code/community/HeidelpayCD/Edition/Block/Onepage/Billing.php CHANGED
@@ -1,37 +1,52 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Billing {
4
-
5
- public function getAddress() {
6
- $HcdWallet = Mage::getSingleton('checkout/session')->getHcdWallet();
7
- if (!empty($HcdWallet)){
8
-
9
-
10
- $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
11
- $this->_address = Mage::getModel('sales/quote_address')->setAddressType(
12
- Mage_Sales_Model_Quote_Address::TYPE_BILLING)
13
- ->setStoreId(Mage::app()->getStore()->getId())
14
- ->setFirstname($wallet['adress'] ['firstname'])
15
- ->setLastname($wallet['adress'] ['lastname'])
16
- ->setEmail($wallet['adress'] ['email'])
17
- ->setSuffix((''))
18
- ->setCompany('')
19
- ->setStreet(array(
20
- '0' => $wallet['adress'] ['street'][0],
21
- '1' => $wallet['adress'] ['street'][1]
22
- ))
23
- ->setCity($wallet['adress'] ['city'])
24
- ->setPostcode($wallet['adress'] ['postcode'])
25
- ->setCountry_id($wallet['adress'] ['country_id'])
26
- ->setRegion($wallet['adress'] ['region'])
27
- ->setRegion_id((string)$wallet['adress'] ['region_id'])
28
- ->setTelephone($wallet['adress'] ['telephone'])
29
- ->setFax();
30
-
31
- return $this->_address;
32
- } else
33
- return parent::getAddress();
34
- }
35
-
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Onepage billing block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Billing
18
+ {
19
+ public function getAddress()
20
+ {
21
+ $hcdWallet = Mage::getSingleton('checkout/session')->getHcdWallet();
22
+ if (!empty($hcdWallet)) {
23
+ $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
24
+ $this->_address = Mage::getModel('sales/quote_address')->setAddressType(
25
+ Mage_Sales_Model_Quote_Address::TYPE_BILLING
26
+ )
27
+ ->setStoreId(Mage::app()->getStore()->getId())
28
+ ->setFirstname($wallet['adress']['firstname'])
29
+ ->setLastname($wallet['adress']['lastname'])
30
+ ->setEmail($wallet['adress']['email'])
31
+ ->setSuffix((''))
32
+ ->setCompany('')
33
+ ->setStreet(
34
+ array(
35
+ '0' => $wallet['adress']['street'][0],
36
+ '1' => $wallet['adress']['street'][1]
37
+ )
38
+ )
39
+ ->setCity($wallet['adress']['city'])
40
+ ->setPostcode($wallet['adress']['postcode'])
41
+ ->setCountry_id($wallet['adress']['country_id'])
42
+ ->setRegion($wallet['adress']['region'])
43
+ ->setRegion_id((string)$wallet['adress']['region_id'])
44
+ ->setTelephone($wallet['adress']['telephone'])
45
+ ->setFax();
46
+
47
+ return $this->_address;
48
+ } else {
49
+ return parent::getAddress();
50
+ }
51
+ }
52
+ }
app/code/community/HeidelpayCD/Edition/Block/Onepage/Progress.php CHANGED
@@ -1,79 +1,104 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Block_Onepage_Progress extends Mage_Checkout_Block_Onepage_Progress {
4
-
5
- public function getBilling() {
6
- Mage::log(' getBillingAddress '.$this->getQuote()->getBillingAddress());
7
- return $this->getQuote()->getBillingAddress();
8
- }
9
-
10
- public function getShipping() {
11
- return $this->getQuote()->getShippingAddress();
12
- }
13
-
14
- public function getShippingMethod() {
15
- return $this->getQuote()->getShippingAddress()->getShippingMethod();
16
- }
17
-
18
- public function getShippingDescription() {
19
- return $this->getQuote()->getShippingAddress()->getShippingDescription();
20
- }
21
-
22
- public function getShippingAmount() {
23
- return $this->getQuote()->getShippingAddress()->getShippingAmount();
24
- }
25
-
26
- public function getPaymentHtml() {
27
- return $this->getChildHtml('payment_info');
28
- }
29
-
30
- /**
31
- * Get is step completed.
32
- * if is set 'toStep' then all steps after him is not completed.
33
- *
34
- * @param string $currentStep
35
- * @see : Mage_Checkout_Block_Onepage_Abstract::_getStepCodes() for allowed values
36
- * @return bool
37
- */
38
- public function isStepComplete($currentStep) {
39
- $autho = Mage::getSingleton('core/session');
40
-
41
- if (!empty(Mage::getSingleton('checkout/session')->getHcdWallet())) {
42
- Mage::log('isStepComplete yes');
43
- return true;
44
- } else {
45
- $stepsRevertIndex = array_flip($this->_getStepCodes());
46
-
47
- $toStep = $this->getRequest()->getParam('toStep');
48
-
49
- if (empty($toStep) || !isset($stepsRevertIndex [$currentStep])) {
50
- return $this->getCheckout()->getStepData($currentStep, 'complete');
51
- }
52
-
53
- if ($stepsRevertIndex [$currentStep] > $stepsRevertIndex [$toStep]) {
54
- return false;
55
- }
56
-
57
- return $this->getCheckout()->getStepData($currentStep, 'complete');
58
- }
59
- }
60
-
61
- /**
62
- * Get quote shipping price including tax
63
- *
64
- * @return float
65
- */
66
- public function getShippingPriceInclTax() {
67
- $inclTax = $this->getQuote()->getShippingAddress()->getShippingInclTax();
68
- return $this->formatPrice($inclTax);
69
- }
70
-
71
- public function getShippingPriceExclTax() {
72
- return $this->formatPrice($this->getQuote()->getShippingAddress()->getShippingAmount());
73
- }
74
-
75
- public function formatPrice($price) {
76
- return $this->getQuote()->getStore()->formatPrice($price);
77
- }
78
-
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Onepage progress block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Onepage_Progress extends Mage_Checkout_Block_Onepage_Progress
18
+ {
19
+ public function getBilling()
20
+ {
21
+ Mage::log(' getBillingAddress '.$this->getQuote()->getBillingAddress());
22
+ return $this->getQuote()->getBillingAddress();
23
+ }
24
+
25
+ public function getShipping()
26
+ {
27
+ return $this->getQuote()->getShippingAddress();
28
+ }
29
+
30
+ public function getShippingMethod()
31
+ {
32
+ return $this->getQuote()->getShippingAddress()->getShippingMethod();
33
+ }
34
+
35
+ public function getShippingDescription()
36
+ {
37
+ return $this->getQuote()->getShippingAddress()->getShippingDescription();
38
+ }
39
+
40
+ public function getShippingAmount()
41
+ {
42
+ return $this->getQuote()->getShippingAddress()->getShippingAmount();
43
+ }
44
+
45
+ public function getPaymentHtml()
46
+ {
47
+ return $this->getChildHtml('payment_info');
48
+ }
49
+
50
+ /**
51
+ * Get is step completed.
52
+ * if is set 'toStep' then all steps after him is not completed.
53
+ *
54
+ * @param string $currentStep
55
+ *
56
+ * @see : Mage_Checkout_Block_Onepage_Abstract::_getStepCodes() for allowed values
57
+ *
58
+ * @return bool
59
+ */
60
+ public function isStepComplete($currentStep)
61
+ {
62
+ $autho = Mage::getSingleton('core/session');
63
+
64
+ if (!empty(Mage::getSingleton('checkout/session')->getHcdWallet())) {
65
+ Mage::log('isStepComplete yes');
66
+ return true;
67
+ } else {
68
+ $stepsRevertIndex = array_flip($this->_getStepCodes());
69
+
70
+ $toStep = $this->getRequest()->getParam('toStep');
71
+
72
+ if (empty($toStep) || !isset($stepsRevertIndex[$currentStep])) {
73
+ return $this->getCheckout()->getStepData($currentStep, 'complete');
74
+ }
75
+
76
+ if ($stepsRevertIndex[$currentStep] > $stepsRevertIndex[$toStep]) {
77
+ return false;
78
+ }
79
+
80
+ return $this->getCheckout()->getStepData($currentStep, 'complete');
81
+ }
82
+ }
83
+
84
+ /**
85
+ * Get quote shipping price including tax
86
+ *
87
+ * @return float
88
+ */
89
+ public function getShippingPriceInclTax()
90
+ {
91
+ $inclTax = $this->getQuote()->getShippingAddress()->getShippingInclTax();
92
+ return $this->formatPrice($inclTax);
93
+ }
94
+
95
+ public function getShippingPriceExclTax()
96
+ {
97
+ return $this->formatPrice($this->getQuote()->getShippingAddress()->getShippingAmount());
98
+ }
99
+
100
+ public function formatPrice($price)
101
+ {
102
+ return $this->getQuote()->getStore()->formatPrice($price);
103
+ }
104
+ }
app/code/community/HeidelpayCD/Edition/Block/Onepage/Shipping.php CHANGED
@@ -1,37 +1,51 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Block_Onepage_Shipping extends Mage_Checkout_Block_Onepage_Shipping {
4
-
5
- public function getAddress() {
6
-
7
- if (!empty(Mage::getSingleton('checkout/session')->getHcdWallet())){
8
-
9
-
10
- $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
11
- $this->_address = Mage::getModel('sales/quote_address')->setAddressType(
12
- Mage_Sales_Model_Quote_Address::TYPE_BILLING)
13
- ->setStoreId(Mage::app()->getStore()->getId())
14
- ->setFirstname($wallet['adress'] ['firstname'])
15
- ->setLastname($wallet['adress'] ['lastname'])
16
- ->setEmail($wallet['adress'] ['email'])
17
- ->setSuffix((''))
18
- ->setCompany('')
19
- ->setStreet(array(
20
- '0' => $wallet['adress'] ['street'][0],
21
- '1' => $wallet['adress'] ['street'][1]
22
- ))
23
- ->setCity($wallet['adress'] ['city'])
24
- ->setPostcode($wallet['adress'] ['postcode'])
25
- ->setCountry_id($wallet['adress'] ['country_id'])
26
- ->setRegion($wallet['adress'] ['region'])
27
- ->setRegion_id((string)$wallet['adress'] ['region_id'])
28
- ->setTelephone($wallet['adress'] ['telephone'])
29
- ->setFax();
30
-
31
- return $this->_address;
32
- } else
33
- return parent::getAddress();
34
- }
35
-
36
-
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Onepage shipping block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Onepage_Shipping extends Mage_Checkout_Block_Onepage_Shipping
18
+ {
19
+ public function getAddress()
20
+ {
21
+ if (!empty(Mage::getSingleton('checkout/session')->getHcdWallet())) {
22
+ $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
23
+ $this->_address = Mage::getModel('sales/quote_address')->setAddressType(
24
+ Mage_Sales_Model_Quote_Address::TYPE_BILLING
25
+ )
26
+ ->setStoreId(Mage::app()->getStore()->getId())
27
+ ->setFirstname($wallet['adress']['firstname'])
28
+ ->setLastname($wallet['adress']['lastname'])
29
+ ->setEmail($wallet['adress']['email'])
30
+ ->setSuffix((''))
31
+ ->setCompany('')
32
+ ->setStreet(
33
+ array(
34
+ '0' => $wallet['adress']['street'][0],
35
+ '1' => $wallet['adress']['street'][1]
36
+ )
37
+ )
38
+ ->setCity($wallet['adress']['city'])
39
+ ->setPostcode($wallet['adress']['postcode'])
40
+ ->setCountry_id($wallet['adress']['country_id'])
41
+ ->setRegion($wallet['adress']['region'])
42
+ ->setRegion_id((string)$wallet['adress']['region_id'])
43
+ ->setTelephone($wallet['adress']['telephone'])
44
+ ->setFax();
45
+
46
+ return $this->_address;
47
+ } else {
48
+ return parent::getAddress();
49
+ }
50
+ }
51
+ }
app/code/community/HeidelpayCD/Edition/Block/Response.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Index block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Response extends HeidelpayCD_Edition_Block_Abstract
18
+ {
19
+ }
app/code/community/HeidelpayCD/Edition/Block/Success.php CHANGED
@@ -1,24 +1,38 @@
1
- <?php
2
- class HeidelpayCD_Edition_Block_Success extends HeidelpayCD_Edition_Block_Abstract
3
- {
4
- function showPaymentInfo() {
5
- $return = array();
6
- $order = $this->getCurrentOrder();
7
- $session = $this->getCheckout();
8
-
9
- $info = ($session->getHcdPaymentInfo() !== false) ? $session->getHcdPaymentInfo() : false;
10
-
11
- if(!empty($info)) {
12
-
13
- $return['Title'] = $order->getPayment()->getMethodInstance()->getTitle();
14
- $return['Message'] = $session->getHcdPaymentInfo();
15
-
16
- $session->unsHcdPaymentInfo();
17
-
18
- return $return;
19
- }
20
-
21
- return false;
22
-
23
- }
24
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Success block
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Block_Success extends HeidelpayCD_Edition_Block_Abstract
18
+ {
19
+ public function showPaymentInfo()
20
+ {
21
+ $return = array();
22
+ $order = $this->getCurrentOrder();
23
+ $session = $this->getCheckout();
24
+
25
+ $info = ($session->getHcdPaymentInfo() !== false) ? $session->getHcdPaymentInfo() : false;
26
+
27
+ if (!empty($info)) {
28
+ $return['Title'] = $order->getPayment()->getMethodInstance()->getTitle();
29
+ $return['Message'] = $session->getHcdPaymentInfo();
30
+
31
+ $session->unsHcdPaymentInfo();
32
+
33
+ return $return;
34
+ }
35
+
36
+ return false;
37
+ }
38
+ }
app/code/community/HeidelpayCD/Edition/Helper/AbstractHelper.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Heidelpay abstract helper
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Helper_AbstractHelper extends Mage_Core_Helper_Abstract
19
+ {
20
+ /**
21
+ * abstract log function because of backtrace
22
+ *
23
+ * @param mixed $message
24
+ * @param mixed $level
25
+ * @param mixed $file
26
+ */
27
+ public function log($message, $level = "DEBUG", $file = false)
28
+ {
29
+ $callers = debug_backtrace();
30
+ return $this->realLog($callers[1]['function'] . ' ' . $message, $level, $file);
31
+ }
32
+
33
+ /**
34
+ * real log function which will be called from all controllers and models
35
+ *
36
+ * @param mixed $message
37
+ * @param mixed $level
38
+ * @param mixed $file
39
+ */
40
+ public function realLog($message, $level = "DEBUG", $file = false)
41
+ {
42
+ $storeId = Mage::app()->getStore()->getId();
43
+ $path = "hcd/settings/";
44
+
45
+
46
+ switch ($level) {
47
+ case "CRIT":
48
+ $lev = Zend_Log::CRIT;
49
+ break;
50
+ case "ERR":
51
+ case "ERROR":
52
+ $lev = Zend_Log::ERR;
53
+ break;
54
+ case "WARN":
55
+ $lev = Zend_Log::WARN;
56
+ break;
57
+ case "NOTICE":
58
+ $lev = Zend_Log::NOTICE;
59
+ break;
60
+ case "INFO":
61
+ $lev = Zend_Log::INFO;
62
+ break;
63
+ default:
64
+ $lev = Zend_Log::DEBUG;
65
+ if (Mage::getStoreConfig($path . "log", $storeId) == 0) {
66
+ return true;
67
+ }
68
+ break;
69
+ }
70
+
71
+ $file = ($file === false) ? "Heidelpay.log" : $file;
72
+
73
+ Mage::log($message, $lev, $file);
74
+ return true;
75
+ }
76
+
77
+ /**
78
+ * function to split paymentCode into code and method
79
+ *
80
+ * @param $paymentCode string payment code from response
81
+ *
82
+ * @return array payment code and method as an array
83
+ */
84
+ public function splitPaymentCode($paymentCode)
85
+ {
86
+ return preg_split('/\./', $paymentCode);
87
+ }
88
+
89
+ /**
90
+ * function to format amount
91
+ *
92
+ * @param mixed $number
93
+ */
94
+ public function format($number)
95
+ {
96
+ return number_format($number, 2, '.', '');
97
+ }
98
+ }
app/code/community/HeidelpayCD/Edition/Helper/BasketApi.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Payment Helper
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Helper_BasketApi extends HeidelpayCD_Edition_Helper_AbstractHelper
19
+ {
20
+ /**
21
+ * collect items for basket api
22
+ *
23
+ * @param $quote Mage_Sales_Model_Order quote object
24
+ * @param $storeId integer current store id
25
+ * @param $includingShipment boolean include
26
+ *
27
+ * @return array return basket api array
28
+ */
29
+ public function basketItems($quote, $storeId, $includingShipment = false)
30
+ {
31
+ $shoppingCartItems = $quote->getAllVisibleItems();
32
+
33
+ $shoppingCart = array(
34
+
35
+ 'authentication' => array(
36
+
37
+ 'login' => trim(Mage::getStoreConfig('hcd/settings/user_id', $storeId)),
38
+ 'sender' => trim(Mage::getStoreConfig('hcd/settings/security_sender', $storeId)),
39
+ 'password' => trim(Mage::getStoreConfig('hcd/settings/user_pwd', $storeId)),
40
+
41
+ ),
42
+
43
+
44
+ 'basket' => array(
45
+ 'amountTotalNet' => floor(bcmul($quote->getGrandTotal(), 100, 10)),
46
+ 'currencyCode' => $quote->getGlobalCurrencyCode(),
47
+ 'amountTotalDiscount' => floor(bcmul($quote->getDiscountAmount(), 100, 10)),
48
+ 'itemCount' => count($shoppingCartItems)
49
+ )
50
+
51
+
52
+ );
53
+
54
+ $count = 1;
55
+ /** @var $item Mage_Sales_Model_Order_Item */
56
+ foreach ($shoppingCartItems as $item) {
57
+ $shoppingCart['basket']['basketItems'][] = array(
58
+ 'position' => $count,
59
+ 'basketItemReferenceId' => $item->getItemId(),
60
+ 'quantity' => ($item->getQtyOrdered() !== false) ? floor($item->getQtyOrdered()) : $item->getQty(),
61
+ 'vat' => floor($item->getTaxPercent()),
62
+ 'amountVat' => floor(bcmul($item->getTaxAmount(), 100, 10)),
63
+ 'amountGross' => floor(bcmul($item->getRowTotalInclTax(), 100, 10)),
64
+ 'amountNet' => floor(bcmul($item->getRowTotal(), 100, 10)),
65
+ 'amountPerUnit' => floor(bcmul($item->getPrice(), 100, 10)),
66
+ 'amountDiscount' => floor(bcmul($item->getDiscountAmount(), 100, 10)),
67
+ 'type' => 'goods',
68
+ 'title' => $item->getName(),
69
+ 'imageUrl' => (string)Mage::helper('catalog/image')->init($item->getProduct(), 'thumbnail')
70
+ );
71
+ $count++;
72
+ }
73
+
74
+ if ($includingShipment and $this->getShippingNetPrice($quote) > 0) {
75
+ // Shipping amount including tax
76
+ $shippingAmountInclTax = floor(
77
+ bcmul(
78
+ (($quote->getShippingAmount() - $quote->getShippingRefunded())
79
+ * (1 + $this->getShippingTaxPercent($quote) / 100)),
80
+ 100, 10
81
+ )
82
+ );
83
+
84
+ $shoppingCart['basket']['basketItems'][] = array(
85
+ 'position' => $count,
86
+ 'basketItemReferenceId' => $count,
87
+ "type" => "shipment",
88
+ "title" => "Shipping",
89
+ 'quantity' => 1,
90
+ 'vat' => $this->getShippingTaxPercent($quote),
91
+ 'amountVat' => floor(
92
+ bcmul(
93
+ ($shippingAmountInclTax - $this->getShippingTaxPercent($quote)),
94
+ 100, 10
95
+ )
96
+ ),
97
+ 'amountGross' => $shippingAmountInclTax,
98
+ 'amountNet' => $this->getShippingNetPrice($quote) ,
99
+ 'amountPerUnit' => $shippingAmountInclTax,
100
+ 'amountDiscount' => ''
101
+ );
102
+ }
103
+
104
+
105
+ return $shoppingCart;
106
+ }
107
+
108
+ /**
109
+ * Calculate shipping net price
110
+ *
111
+ * @param $order Mage_Sales_Model_Order magento order object
112
+ *
113
+ * @return string shipping net price
114
+ */
115
+ public function getShippingNetPrice($order)
116
+ {
117
+ $shippingTax = $order->getShippingTaxAmount();
118
+ $price = $order->getShippingInclTax() - $shippingTax;
119
+ $price -= $order->getShippingRefunded();
120
+ $price -= $order->getShippingCanceled();
121
+ return $price;
122
+ }
123
+
124
+ /**
125
+ * Calculate shipping tax in percent for BillSafe
126
+ *
127
+ * @param $order Mage_Sales_Model_Order magentp order object
128
+ *
129
+ * @return string shipping tex in percent
130
+ */
131
+ public function getShippingTaxPercent($order)
132
+ {
133
+ $tax = ($order->getShippingTaxAmount() * 100) / $order->getShippingAmount();
134
+ return $this->format(round($tax));
135
+ }
136
+ }
app/code/community/HeidelpayCD/Edition/Helper/Data.php CHANGED
@@ -1,7 +1,19 @@
1
- <?php
2
- /**
3
- */
4
- class HeidelpayCD_Edition_Helper_Data extends Mage_Core_Helper_Data
5
- {
6
- }
7
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Helper data
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Helper_Data extends Mage_Core_Helper_Data
18
+ {
19
+ }
app/code/community/HeidelpayCD/Edition/Helper/OrderState.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Order state Helper
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Helper_OrderState extends HeidelpayCD_Edition_Helper_AbstractHelper
19
+ {
20
+ /**
21
+ * @param $data HeidelpayCD_Edition_Model_Transaction
22
+ * @param $order Mage_Sales_Model_Order
23
+ * @param string $message order history message
24
+ */
25
+ public function mapStatus($data, $order, $message = '')
26
+ {
27
+ $this->log('mapStatus' . json_encode($data));
28
+ $paymentCode = $this->splitPaymentCode($data['PAYMENT_CODE']);
29
+
30
+ $message = ($message === '') ? $data['PROCESSING_RETURN'] : $message;
31
+
32
+
33
+ // Set language for mail template etc
34
+ if (strtoupper($data['CRITERION_LANGUAGE']) == 'DE') {
35
+ $locale = 'de_DE';
36
+ Mage::app()->getLocale()->setLocaleCode($locale);
37
+ Mage::getSingleton('core/translate')->setLocale($locale)->init('frontend', true);
38
+ }
39
+
40
+
41
+ // handle charge back notifications for cc, dc and dd
42
+ if ($paymentCode[1] == 'CB') {
43
+ $this->log('charge back for order ' . $order->getIncrementId());
44
+
45
+ $order->getPayment()->getMethodInstance()->chargeBackTransaction($order);
46
+
47
+ Mage::dispatchEvent('heidelpay_after_map_status_chargeBack', array('order' => $order));
48
+ $this->log('Is this order protected ? ' . (string)$order->isStateProtected());
49
+ $order->save();
50
+ return;
51
+ }
52
+
53
+ // Do nothing if status is already successful
54
+ if ($order->getStatus() == $order->getPayment()->getMethodInstance()->getStatusSuccess()) {
55
+ return;
56
+ }
57
+
58
+ // If the order is canceled, closed or complete do not change order status
59
+ if ($order->getStatus() == Mage_Sales_Model_Order::STATE_CANCELED or
60
+ $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED or
61
+ $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE
62
+ ) {
63
+ // you can use this event for example to get a notification when a canceled order has been paid
64
+ $this->log('Order '.$order->getRealOrderId().' is canceled, closed or complete.');
65
+ Mage::dispatchEvent('heidelpay_map_status_cancel', array('order' => $order, 'data' => $data));
66
+ return;
67
+ }
68
+
69
+ // Set status for transaction that are not ok
70
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
71
+ $order->getPayment()->getMethodInstance()->canceledTransaction($order, $message);
72
+ Mage::dispatchEvent('heidelpay_after_map_status_canceled', array('order' => $order));
73
+ $order->save();
74
+
75
+ return;
76
+ }
77
+
78
+ // Set status for transaction with payment transaction
79
+ $paidTransactionTypes = array('CP', 'DB', 'RC', 'FI');
80
+
81
+ if (in_array($paymentCode[1], $paidTransactionTypes)) {
82
+ // only Billsafe finalize will have impacted on the order status
83
+ if ($paymentCode[1] === 'FI' and $data['ACCOUNT_BRAND'] !== 'BILLSAFE') {
84
+ return;
85
+ }
86
+
87
+ $order->getPayment()->getMethodInstance()->processingTransaction($order, $data, $message);
88
+
89
+ Mage::dispatchEvent('heidelpay_after_map_status_processed', array('order' => $order));
90
+ $order->save();
91
+ return;
92
+ }
93
+
94
+ //
95
+ if ($order->getStatus() != $order->getPayment()->getMethodInstance()->getStatusSuccess() and
96
+ $order->getStatus() != $order->getPayment()->getMethodInstance()->getStatusError()
97
+ ) {
98
+ $order->getPayment()->getMethodInstance()->pendingTransaction($order, $data, $message);
99
+ }
100
+
101
+
102
+ Mage::dispatchEvent('heidelpay_after_map_status', array('order' => $order));
103
+ $order->save();
104
+ }
105
+ }
app/code/community/HeidelpayCD/Edition/Helper/Payment.php CHANGED
@@ -1,551 +1,309 @@
1
- <?php
2
- /**
3
- */
4
- class HeidelpayCD_Edition_Helper_Payment extends Mage_Core_Helper_Abstract
5
- {
6
- protected $_invoiceOrderEmail = true ;
7
- protected $_debug = false ;
8
-
9
- protected function _getHelper()
10
- {
11
- return Mage::helper('hcd');
12
- }
13
-
14
- public function splitPaymentCode($PAYMENT_CODE) {
15
- return preg_split('/\./' , $PAYMENT_CODE);
16
-
17
- }
18
-
19
- public function doRequest($url, $params=array())
20
- {
21
- $client = new Zend_Http_Client(trim($url), array(
22
-
23
- ));
24
-
25
- if (array_key_exists('raw', $params)) {
26
- $client->setRawData(json_encode($params['raw']), 'application/json');
27
- } else {
28
- $client->setParameterPost($params);
29
- }
30
- if (extension_loaded('curl')) {
31
- $adapter = new Zend_Http_Client_Adapter_Curl();
32
- $adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, true);
33
- $adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, 2);
34
- $adapter->setCurlOption(CURLOPT_SSLVERSION, 6);
35
- $client->setAdapter($adapter);
36
- }
37
- $response = $client->request('POST');
38
- $res = $response->getBody();
39
-
40
-
41
- if ($response->isError()) {
42
-
43
- $this->log("Request fail. Http code : ".$response->getStatus().' Message : '.$res,'ERROR');
44
- $this->log("Request data : ".print_r($params,1),'ERROR');
45
- if (array_key_exists('raw', $params)) return $response;
46
- }
47
-
48
- if (array_key_exists('raw', $params)) return json_decode($res,true);
49
-
50
- $result = null;
51
- parse_str($res, $result);
52
-
53
- return $result;
54
- }
55
-
56
- public function preparePostData ( $config = array(),
57
- $frontend = array(),
58
- $userData = array(),
59
- $basketData = array(),
60
- $criterion = array()) {
61
- $params = array();
62
- /*
63
- * configurtation part of this function
64
- */
65
- $params['SECURITY.SENDER'] = $config['SECURITY.SENDER'];
66
- $params['USER.LOGIN'] = $config['USER.LOGIN'];
67
- $params['USER.PWD'] = $config['USER.PWD'];
68
-
69
- switch ($config['TRANSACTION.MODE']) {
70
- case 'INTEGRATOR_TEST':
71
- $params['TRANSACTION.MODE'] = 'INTEGRATOR_TEST';
72
- break;
73
- case 'CONNECTOR_TEST':
74
- $params['TRANSACTION.MODE'] = 'CONNECTOR_TEST';
75
- break;
76
- default:
77
- $params['TRANSACTION.MODE'] = 'LIVE';
78
- }
79
- $params['TRANSACTION.CHANNEL'] = $config['TRANSACTION.CHANNEL'];
80
-
81
-
82
- /* Set payment methode */
83
- switch ($config['PAYMENT.METHOD']) {
84
- /* sofortbanking */
85
- case 'su':
86
- /* griopay */
87
- case 'gp':
88
- /* ideal */
89
- case 'ide':
90
- /* eps */
91
- case 'eps':
92
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
93
- $params['PAYMENT.CODE'] = "OT.".$type ;
94
- break;
95
- /* postfinace */
96
- case 'pf':
97
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
98
- $params['PAYMENT.CODE'] = "OT.".$type ;
99
- break;
100
- /* yapital */
101
- case 'yt':
102
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'];
103
- $params['PAYMENT.CODE'] = "OT.".$type;
104
- $params['ACCOUNT.BRAND'] = "YAPITAL";
105
- $params['FRONTEND.ENABLED'] = "false";
106
- break;
107
- /* paypal */
108
- case 'pal';
109
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'DB' : $config['PAYMENT.TYPE'] ;
110
- $params['PAYMENT.CODE'] = "VA.".$type ;
111
- $params['ACCOUNT.BRAND'] = "PAYPAL" ;
112
- $params['FRONTEND.PM.DEFAULT_DISABLE_ALL'] = "true";
113
- $params['FRONTEND.PM.0.ENABLED'] = "true";
114
- $params['FRONTEND.PM.0.METHOD'] = "VA";
115
- $params['FRONTEND.PM.0.SUBTYPES'] = "PAYPAL" ;
116
- break;
117
- /* prepayment */
118
- case 'pp' :
119
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
120
- $params['PAYMENT.CODE'] = "PP.".$type ;
121
- break;
122
- /* invoce */
123
- case 'iv' :
124
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
125
- $params['PAYMENT.CODE'] = "IV.".$type ;
126
- break;
127
- /* BillSafe */
128
- case 'bs' :
129
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
130
- $params['PAYMENT.CODE'] = "IV.".$type ;
131
- $params['ACCOUNT.BRAND'] = "BILLSAFE";
132
- $params['FRONTEND.ENABLED'] = "false";
133
- break;
134
- /* BarPay */
135
- case 'bp' :
136
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
137
- $params['PAYMENT.CODE'] = "PP.".$type ;
138
- $params['ACCOUNT.BRAND'] = "BARPAY";
139
- $params['FRONTEND.ENABLED'] = "false";
140
- break;
141
- /* MangirKart */
142
- case 'mk' :
143
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'] ;
144
- $params['PAYMENT.CODE'] = "PC.".$type ;
145
- $params['ACCOUNT.BRAND'] = "MANGIRKART";
146
- $params['FRONTEND.ENABLED'] = "false";
147
- break;
148
- /* MasterPass */
149
- case 'mpa' :
150
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'DB' : $config['PAYMENT.TYPE'] ;
151
-
152
- // masterpass as a payment methode
153
- if (!array_key_exists('IDENTIFICATION.REFERENCEID',$userData) and( $type == 'DB' or $type == 'PA')) {
154
- $params['WALLET.DIRECT_PAYMENT'] = "true";
155
- $params['WALLET.DIRECT_PAYMENT_CODE'] = "WT.".$type ;
156
- $type = 'IN';
157
-
158
- }
159
-
160
- $params['PAYMENT.CODE'] = "WT.".$type ;
161
- $params['ACCOUNT.BRAND'] = "MASTERPASS";
162
- break;
163
- /* default */
164
- default:
165
- $type = (!array_key_exists('PAYMENT.TYPE',$config)) ? 'PA' : $config['PAYMENT.TYPE'];
166
- $params['PAYMENT.CODE'] = strtoupper($config['PAYMENT.METHOD']).'.'.$type;
167
- break;
168
- }
169
-
170
- /* Debit on registration */
171
- if(array_key_exists('ACCOUNT.REGISTRATION',$config)) {
172
- $params['ACCOUNT.REGISTRATION'] = $config['ACCOUNT.REGISTRATION'];
173
- $params['FRONTEND.ENABLED'] = "false";
174
- }
175
-
176
- if (array_key_exists('SHOP.TYPE',$config)) $params['SHOP.TYPE'] = $config['SHOP.TYPE'] ;
177
- if (array_key_exists('SHOPMODUL.VERSION',$config)) $params['SHOPMODUL.VERSION'] = $config['SHOPMODUL.VERSION'] ;
178
-
179
- /* frontend configuration */
180
-
181
- /* override FRONTEND.ENABLED if nessessary */
182
- if (array_key_exists('FRONTEND.ENABLED',$frontend)) {
183
- $params['FRONTEND.ENABLED'] = $frontend['FRONTEND.ENABLED'];
184
- unset($frontend['FRONTEND.ENABLED']);
185
- }
186
-
187
- if (array_key_exists('FRONTEND.MODE',$frontend)) {
188
- $params['FRONTEND.MODE'] = $frontend['FRONTEND.MODE'];
189
- unset($frontend['FRONTEND.MODE']);
190
- } else {
191
- $params['FRONTEND.MODE'] = "WHITELABEL";
192
- $params['TRANSACTION.RESPONSE'] = "SYNC";
193
- $params['FRONTEND.ENABLED'] = 'true';
194
- };
195
-
196
-
197
- $params = array_merge($params, $frontend);
198
-
199
- /* costumer data configuration */
200
- $params = array_merge($params, $userData);
201
-
202
- /* basket data configuration */
203
- $params = array_merge($params, $basketData);
204
-
205
- /* criterion data configuration */
206
- $params = array_merge($params, $criterion);
207
-
208
- $params['REQUEST.VERSION'] = "1.0";
209
-
210
- return $params ;
211
- }
212
-
213
-
214
- public function mapStatus ($data ,$order, $message=false) {
215
- $this->log('mapStatus'.print_r($data,1));
216
- $PaymentCode = $this->splitPaymentCode($data['PAYMENT_CODE']);
217
- $totalypaid = false ;
218
- $invoiceMailComment = '';
219
-
220
- if (strtoupper($data['CRITERION_LANGUAGE']) == 'DE') {
221
- $locale = 'de_DE';
222
- Mage::app()->getLocale()->setLocaleCode($locale);
223
- Mage::getSingleton('core/translate')->setLocale($locale)->init('frontend', true);
224
- };
225
-
226
- // handle chageback notifications for cc, dc and dd
227
- if ($PaymentCode[1] == 'CB') {
228
-
229
- $this->log('Chargeback');
230
-
231
- if ($PaymentCode[0] == 'DD') {
232
- // message block for direct debit chargebacks
233
- $message = Mage::helper('hcd')->__('debit failed');
234
- } else {
235
- // message block for credit and debit cart chargebacks
236
- $message = Mage::helper('hcd')->__('chargeback');
237
- }
238
- if ($order->hasInvoices()) {
239
- $invIncrementIDs = array();
240
- foreach ($order->getInvoiceCollection() as $inv) {
241
- $this->log('Invoice Number '.(string)$inv->getIncrementId());
242
- $inv->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
243
- $inv->setIsPaid(false);
244
- $inv->save();
245
- }
246
- $order->setIsInProcess(false);
247
- }
248
-
249
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusPendig(false),
250
- true,
251
- $message );
252
-
253
- Mage::dispatchEvent('heidelpay_after_map_status_chargeback', array('order' => $order));
254
- $this->log('Is this order protected ? '.(string)$order->isStateProtected() );
255
- $order->save();
256
- return;
257
- }
258
-
259
-
260
- $message = (!empty($message)) ? $message : $data['PROCESSING_RETURN'];
261
-
262
- $quoteID = ($order->getLastQuoteId() === false) ? $order->getQuoteId() : $order->getLastQuoteId() ; // last_quote_id workaround for trusted shop buyerprotection
263
-
264
- /**
265
- * Do nothing if status is allready successfull
266
- */
267
- if ($order->getStatus() == $order->getPayment()->getMethodInstance()->getStatusSuccess() ) return ;
268
- /**
269
- * If an order has been canceled, cloesed or complete do not change order status
270
- */
271
- if ($order->getStatus() == Mage_Sales_Model_Order::STATE_CANCELED or
272
- $order->getStatus() == Mage_Sales_Model_Order::STATE_CLOSED or
273
- $order->getStatus() == Mage_Sales_Model_Order::STATE_COMPLETE
274
- ) {
275
-
276
- // you can use this event for example to get a notification when a canceled order has been paid
277
- Mage::dispatchEvent('heidelpay_map_status_cancel', array('order' => $order, 'data' => $data));
278
- return ;
279
- }
280
-
281
- if ($data['PROCESSING_RESULT'] == 'NOK'){
282
- if ($order->canCancel()) {
283
- $order->cancel();
284
-
285
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusError(false),
286
- $order->getPayment()->getMethodInstance()->getStatusError(true),
287
- $message );
288
- }
289
-
290
- } elseif ( ( $PaymentCode[1] == 'CP' or $PaymentCode[1] == 'DB' or $PaymentCode[1] == 'FI' or $PaymentCode[1] == 'RC')
291
- and ( $data['PROCESSING_RESULT'] == 'ACK' and $data['PROCESSING_STATUS_CODE'] != 80 )) {
292
-
293
-
294
-
295
-
296
- $message = (isset($data['ACCOUNT_BRAND']) and $data['ACCOUNT_BRAND'] == 'BILLSAFE') ? 'BillSafe Id: '.$data['CRITERION_BILLSAFE_REFERENCE'] : 'Heidelpay ShortID: '.$data['IDENTIFICATION_SHORTID'];
297
-
298
- if ($PaymentCode[0] == "IV" or $PaymentCode[0] == "PP") $message = Mage::helper('hcd')->__('recived amount ').$data['PRESENTATION_AMOUNT'].' '.$data['PRESENTATION_CURRENCY'].' '.$message;
299
-
300
- $order->getPayment()->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
301
- ->setParentTransactionId( $order->getPayment()->getLastTransId());
302
- $order->getPayment()->setIsTransactionClosed(true);
303
-
304
- if ( $this->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and $order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']) {
305
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusSuccess(false),
306
- $order->getPayment()->getMethodInstance()->getStatusSuccess(true),
307
- $message );
308
- $totalypaid = true ;
309
-
310
- } else {
311
- /*
312
- * in case rc is ack and amount is to low or curreny missmatch
313
- */
314
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
315
- $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
316
- $message );
317
- }
318
-
319
- $this->log('$totalypaid '.$totalypaid);
320
-
321
- $code = $order->getPayment()->getMethodInstance()->getCode();
322
-
323
- $path = "payment/".$code."/";
324
-
325
- $this->log($path.' Auto invoiced :'.Mage::getStoreConfig($path."invioce", $data['CRITERION_STOREID']).$data['CRITERION_STOREID']);
326
-
327
- if ($order->canInvoice() and (Mage::getStoreConfig($path."invioce", $data['CRITERION_STOREID']) == 1 or $code == 'hcdbs') and $totalypaid === true ) {
328
- $this->log('Can Invoice ? '.($order->canInvoice()) ? 'YES': 'NO');
329
- $invoice = $order->prepareInvoice();
330
- $invoice->register()->capture();
331
- $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
332
- $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
333
- $invoice->setIsPaid(true);
334
- $order->setIsInProcess(true);
335
- $order->addStatusHistoryComment(
336
- Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
337
- false
338
- );
339
- $invoice->save();
340
- if ($this->_invoiceOrderEmail) {
341
- if ($code != 'hcdpp' and $code != 'hcdiv') {
342
- $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
343
- $invoiceMailComment = ($info === false) ? '' : '<h3>'.$this->__('Payment Information').'</h3>'.$info.'<br/>';
344
- }
345
- $invoice->sendEmail(true, $invoiceMailComment); // Rechnung versenden
346
- }
347
-
348
-
349
-
350
- $transactionSave = Mage::getModel('core/resource_transaction')
351
- ->addObject($invoice)
352
- ->addObject($invoice->getOrder());
353
- $transactionSave->save();
354
- };
355
-
356
- $order->getPayment()->addTransaction(
357
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
358
- null,
359
- true,
360
- $message
361
- );
362
-
363
- $order->setIsInProcess(true);
364
- }else {
365
- if ($order->getStatus() != $order->getPayment()->getMethodInstance()->getStatusSuccess() and $order->getStatus() != $order->getPayment()->getMethodInstance()->getStatusError()) {
366
- $message = (isset($data['ACCOUNT_BRAND']) and $data['ACCOUNT_BRAND'] == 'BILLSAFE') ? 'BillSafe Id: '.$data['CRITERION_BILLSAFE_REFERENCE'] : 'Heidelpay ShortID: '.$data['IDENTIFICATION_SHORTID'];
367
- $order->getPayment()->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
368
- $order->getPayment()->setIsTransactionClosed(0);
369
- $order->getPayment()->setTransactionAdditionalInfo(Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS, null);
370
- $this->log('Set Transaction to Pending : '.$order->getPayment()->getMethodInstance()->getStatusPendig());
371
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusPendig(false),
372
- $order->getPayment()->getMethodInstance()->getStatusPendig(true),
373
- $message );
374
- $order->getPayment()->addTransaction(
375
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
376
- null,
377
- true,
378
- $message
379
- );
380
- }
381
- }
382
- Mage::dispatchEvent('heidelpay_after_map_status', array('order' => $order));
383
- $order->save();
384
-
385
- }
386
-
387
- /**
388
- * function to format amount
389
- */
390
- public function format($number)
391
- {
392
- return number_format($number, 2, '.', '');
393
- }
394
-
395
-
396
- public function getLang($default='en')
397
- {
398
- $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
399
- if (!empty($locale) ) {
400
- return strtoupper($locale[0]);
401
- }
402
- return strtoupper($default); //TOBO falses Module
403
- }
404
-
405
-
406
- /**
407
- * helper to generate customer payment error messages
408
- */
409
- public function handleError($errorMsg, $errorCode=null, $ordernr=null) {
410
- // default is return generic error message
411
- if ( $ordernr != null) $this->log('Ordernumber '.$ordernr.' -> '.$errorMsg.' ['.$errorCode.']','NOTICE');
412
-
413
- if ($errorCode) {
414
- if (!preg_match('/HPError-[0-9]{3}\.[0-9]{3}\.[0-9]{3}/', $this->_getHelper()->__('HPError-'.$errorCode), $matches)) //JUST return when snipet exists
415
- return $this->_getHelper()->__('HPError-'.$errorCode);
416
- }
417
-
418
- return $this->_getHelper()->__('An unexpected error occurred. Please contact us to get further information.');
419
- }
420
-
421
- /**
422
- * anstracted log function because of backtrace
423
- */
424
-
425
- public function log($message, $level="DEBUG", $file=false) {
426
- $callers=debug_backtrace();
427
- return $this->realLog( $callers[1]['function'].' '.$message , $level , $file);
428
- }
429
-
430
- /**
431
- * real log function which will becalled from all controllers and models
432
- */
433
-
434
- public function realLog($message, $level="DEBUG", $file=false) {
435
- $storeId = Mage::app()->getStore()->getId();
436
- $path = "hcd/settings/";
437
- $config = array();
438
-
439
-
440
- switch($level) {
441
- case "CRIT":
442
- $lev = Zend_Log::CRIT;
443
- break;
444
- case "ERR":
445
- case "ERROR":
446
- $lev = Zend_Log::ERR ;
447
- break;
448
- case "WARN";
449
- $lev = Zend_Log::WARN;
450
- break;
451
- case "NOTICE":
452
- $lev = Zend_Log::NOTICE;
453
- break;
454
- case "INFO":
455
- $lev = Zend_Log::INFO;
456
- break;
457
- default:
458
- $lev = Zend_Log::DEBUG;
459
- if (Mage::getStoreConfig($path."log", $storeId) == 0) return true;
460
- break;
461
- }
462
- $file = ($file === false) ? "Heidelpay.log" : $file;
463
-
464
- Mage::log($message, $lev, $file);
465
- return true;
466
- }
467
-
468
- public function basketItems ($quote, $storeId) {
469
-
470
-
471
- $ShoppingCartItems = $quote->getAllVisibleItems();
472
-
473
- $ShoppingCart = array();
474
-
475
-
476
- $ShoppingCart = array(
477
-
478
- 'authentication' => array(
479
-
480
- 'login' => trim(Mage::getStoreConfig('hcd/settings/user_id', $storeId)),
481
- 'sender' => trim(Mage::getStoreConfig('hcd/settings/security_sender', $storeId)),
482
- 'password' => trim(Mage::getStoreConfig('hcd/settings/user_pwd', $storeId)),
483
-
484
- ),
485
-
486
-
487
- 'basket' => array (
488
- 'amountTotalNet' => floor(bcmul($quote->getGrandTotal(),100,10)),
489
- 'currencyCode' => $quote->getGlobalCurrencyCode(),
490
- 'amountTotalDiscount' => floor(bcmul($quote->getDiscountAmount(),100,10)),
491
- 'itemCount' => count($ShoppingCartItems)
492
- )
493
-
494
-
495
-
496
- );
497
-
498
- $count=1;
499
-
500
- foreach ($ShoppingCartItems as $item) {
501
-
502
- if($this->_debug === true) echo 'Item: '.$count.'<br/><pre>'.print_r($item,1).'</pre>';
503
-
504
- $ShoppingCart['basket']['basketItems'][] = array(
505
- 'position' => $count,
506
- 'basketItemReferenceId' => $item->getItemId(),
507
- 'unit' => 'Stk.',
508
- 'quantity' => ($item->getQtyOrdered() !== false ) ? floor($item->getQtyOrdered()) : $item->getQty() ,
509
- 'vat' => floor($item->getTaxPercent()),
510
- 'amountVat' => floor(bcmul($item->getTaxAmount(),100,10)),
511
- 'amountGross' => floor(bcmul($item->getRowTotalInclTax(),100,10)),
512
- 'amountNet' => floor(bcmul($item->getRowTotal(),100,10)),
513
- 'amountPerUnit' => floor(bcmul($item->getPrice(),100,10)),
514
- 'amountDiscount' => floor(bcmul($item->getDiscountAmount(),100,10)),
515
- 'type' => 'goods',
516
- 'title' => $item->getName(),
517
- 'imageUrl' => (string)Mage::helper('catalog/image')->init($item->getProduct(), 'thumbnail')
518
-
519
- );
520
- $count++;
521
- }
522
-
523
- if($this->_debug === true) {
524
- echo '<pre>'.print_r($ShoppingCart,1).'</pre>';
525
- exit();
526
- }
527
- return $ShoppingCart;
528
-
529
- }
530
-
531
- public function getRegion($countryCode, $stateByName) {
532
- //$regionData = Mage::getModel ( 'directory/region_api' )->items ( $countryCode );
533
- $regionData = Mage::getModel('directory/region')->getResourceCollection()
534
- ->addCountryFilter($countryCode)
535
- ->load();
536
-
537
- //$this->log(print_r($regionData,1));
538
-
539
- $regionId = null;
540
-
541
- foreach ( $regionData as $region ) {
542
- if (strtolower($stateByName) == strtolower($region ['name']) or $stateByName == $region ['code']) {
543
- return $region['region_id'];
544
- }
545
- }
546
- // Return last region if mapping fails
547
- return $region['region_id'] ;
548
- }
549
-
550
- }
551
- ?>
1
+ <?php
2
+
3
+ /**
4
+ * Payment Helper
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Helper_Payment extends HeidelpayCD_Edition_Helper_AbstractHelper
19
+ {
20
+ /**
21
+ * send request to heidelpay apo
22
+ *
23
+ * @param $url string url for the heidelpay api
24
+ * @param array $params post parameter
25
+ *
26
+ * @return mixed|null|Zend_Http_Response response from heidelpay api
27
+ */
28
+ public function doRequest($url, $params = array())
29
+ {
30
+ $client = new Zend_Http_Client(trim($url), array());
31
+
32
+ if (array_key_exists('raw', $params)) {
33
+ $client->setRawData(json_encode($params['raw']), 'application/json');
34
+ } else {
35
+ $client->setParameterPost($params);
36
+ }
37
+
38
+ if (extension_loaded('curl')) {
39
+ $adapter = new Zend_Http_Client_Adapter_Curl();
40
+ $adapter->setCurlOption(CURLOPT_SSL_VERIFYPEER, true);
41
+ $adapter->setCurlOption(CURLOPT_SSL_VERIFYHOST, 2);
42
+ $adapter->setCurlOption(CURLOPT_SSLVERSION, 6);
43
+ $client->setAdapter($adapter);
44
+ }
45
+
46
+ $response = $client->request('POST');
47
+ $res = $response->getBody();
48
+
49
+
50
+ if ($response->isError()) {
51
+ $this->log("Request fail. Http code : " . $response->getStatus() . ' Message : ' . $res, 'ERROR');
52
+ $this->log("Request data : " . json_encode($params), 'ERROR');
53
+ if (array_key_exists('raw', $params)) {
54
+ return $response;
55
+ }
56
+ }
57
+
58
+ if (array_key_exists('raw', $params)) {
59
+ return json_decode($res, true);
60
+ }
61
+
62
+ $result = null;
63
+ // @codingStandardsIgnoreLine parse_str is discouraged
64
+ parse_str($res, $result);
65
+ ksort($result);
66
+ return $result;
67
+ }
68
+
69
+ // @codingStandardsIgnoreLine more than 120 characters
70
+ public function preparePostData($config = array(), $front = array(), $customer = array(), $basket = array(), $criterion = array())
71
+ {
72
+ $params = array();
73
+ /*
74
+ * configuration part of this function
75
+ */
76
+ $params['SECURITY.SENDER'] = $config['SECURITY.SENDER'];
77
+ $params['USER.LOGIN'] = $config['USER.LOGIN'];
78
+ $params['USER.PWD'] = $config['USER.PWD'];
79
+
80
+ switch ($config['TRANSACTION.MODE']) {
81
+ case 'INTEGRATOR_TEST':
82
+ $params['TRANSACTION.MODE'] = 'INTEGRATOR_TEST';
83
+ break;
84
+ case 'CONNECTOR_TEST':
85
+ $params['TRANSACTION.MODE'] = 'CONNECTOR_TEST';
86
+ break;
87
+ default:
88
+ $params['TRANSACTION.MODE'] = 'LIVE';
89
+ }
90
+
91
+ $params['TRANSACTION.CHANNEL'] = $config['TRANSACTION.CHANNEL'];
92
+
93
+
94
+ $params = array_merge($params, $this->_setPaymentMethod($config, $customer));
95
+
96
+
97
+ /* debit on registration */
98
+ if (array_key_exists('ACCOUNT.REGISTRATION', $config)) {
99
+ $params['ACCOUNT.REGISTRATION'] = $config['ACCOUNT.REGISTRATION'];
100
+ $params['FRONTEND.ENABLED'] = "false";
101
+ }
102
+
103
+ if (array_key_exists('SHOP.TYPE', $config)) {
104
+ $params['SHOP.TYPE'] = $config['SHOP.TYPE'];
105
+ }
106
+
107
+ if (array_key_exists('SHOPMODUL.VERSION', $config)) {
108
+ $params['SHOPMODUL.VERSION'] = $config['SHOPMODUL.VERSION'];
109
+ }
110
+
111
+ /* frontend configuration */
112
+
113
+ /* override FRONTEND.ENABLED if necessary */
114
+ if (array_key_exists('FRONTEND.ENABLED', $front)) {
115
+ $params['FRONTEND.ENABLED'] = $front['FRONTEND.ENABLED'];
116
+ unset($front['FRONTEND.ENABLED']);
117
+ }
118
+
119
+ if (array_key_exists('FRONTEND.MODE', $front)) {
120
+ $params['FRONTEND.MODE'] = $front['FRONTEND.MODE'];
121
+ unset($front['FRONTEND.MODE']);
122
+ } else {
123
+ $params['FRONTEND.MODE'] = "WHITELABEL";
124
+ $params['TRANSACTION.RESPONSE'] = "SYNC";
125
+ $params['FRONTEND.ENABLED'] = 'true';
126
+ }
127
+
128
+
129
+ $params = array_merge($params, $front);
130
+
131
+ /* costumer data configuration */
132
+ $params = array_merge($params, $customer);
133
+
134
+ /* basket data configuration */
135
+ $params = array_merge($params, $basket);
136
+
137
+ /* criterion data configuration */
138
+ $params = array_merge($params, $criterion);
139
+
140
+ $params['REQUEST.VERSION'] = "1.0";
141
+
142
+ // sort the parameter
143
+ ksort($params);
144
+
145
+ return $params;
146
+ }
147
+
148
+ // @codingStandardsIgnoreLine should be refactored - issue #3
149
+ protected function _setPaymentMethod($config = array(), $customer = array())
150
+ {
151
+ $type = (!array_key_exists('PAYMENT.TYPE', $config)) ? 'PA' : $config['PAYMENT.TYPE'];
152
+ /* Set payment method */
153
+ switch ($config['PAYMENT.METHOD']) {
154
+ /* sofort */
155
+ case 'su':
156
+ $params['ACCOUNT.BRAND'] = "SOFORT";
157
+ $params['PAYMENT.CODE'] = "OT." . $type;
158
+ break;
159
+ /* griopay */
160
+ case 'gp':
161
+ $params['ACCOUNT.BRAND'] = "GIROPAY";
162
+ $params['PAYMENT.CODE'] = "OT." . $type;
163
+ break;
164
+ /* ideal */
165
+ case 'ide':
166
+ $params['ACCOUNT.BRAND'] = "IDEAL";
167
+ $params['PAYMENT.CODE'] = "OT." . $type;
168
+ break;
169
+ /* eps */
170
+ case 'eps':
171
+ $params['ACCOUNT.BRAND'] = "EPS";
172
+ $params['PAYMENT.CODE'] = "OT." . $type;
173
+ break;
174
+ /* postfinance */
175
+ case 'pf':
176
+ $params['PAYMENT.CODE'] = "OT." . $type;
177
+ break;
178
+ /* paypal */
179
+ case 'pal':
180
+ $type = (!array_key_exists('PAYMENT.TYPE', $config)) ? 'DB' : $config['PAYMENT.TYPE'];
181
+ $params['PAYMENT.CODE'] = "VA." . $type;
182
+ $params['ACCOUNT.BRAND'] = "PAYPAL";
183
+ break;
184
+ /* prepayment */
185
+ case 'pp':
186
+ $params['PAYMENT.CODE'] = "PP." . $type;
187
+ break;
188
+ /* invoce */
189
+ case 'iv':
190
+ $params['PAYMENT.CODE'] = "IV." . $type;
191
+ break;
192
+ /* invoice secured */
193
+ case 'ivsec':
194
+ $params['PAYMENT.CODE'] = "IV." . $type;
195
+ break;
196
+ /* direct debit secured */
197
+ case 'ddsec':
198
+ $type = (!array_key_exists('PAYMENT.TYPE', $config)) ? 'DB' : $config['PAYMENT.TYPE'];
199
+ $params['PAYMENT.CODE'] = "DD." . $type;
200
+ break;
201
+ /* BillSafe */
202
+ case 'bs':
203
+ $params['PAYMENT.CODE'] = "IV." . $type;
204
+ $params['ACCOUNT.BRAND'] = "BILLSAFE";
205
+ $params['FRONTEND.ENABLED'] = "false";
206
+ break;
207
+ /* MasterPass */
208
+ case 'mpa':
209
+ $type = (!array_key_exists('PAYMENT.TYPE', $config)) ? 'DB' : $config['PAYMENT.TYPE'];
210
+
211
+ // masterpass as a payment method
212
+ if (!array_key_exists('IDENTIFICATION.REFERENCEID', $customer) and ($type == 'DB' or $type == 'PA')) {
213
+ $params['WALLET.DIRECT_PAYMENT'] = "true";
214
+ $params['WALLET.DIRECT_PAYMENT_CODE'] = "WT." . $type;
215
+ $type = 'IN';
216
+ }
217
+
218
+ $params['PAYMENT.CODE'] = "WT." . $type;
219
+ $params['ACCOUNT.BRAND'] = "MASTERPASS";
220
+ break;
221
+ default:
222
+ $params['PAYMENT.CODE'] = strtoupper($config['PAYMENT.METHOD']) . '.' . $type;
223
+ break;
224
+ }
225
+
226
+ return $params;
227
+ }
228
+
229
+ /**
230
+ * get language code
231
+ *
232
+ * @param string $default default language code
233
+ *
234
+ * @return string return current lang code
235
+ */
236
+ public function getLang($default = 'en')
237
+ {
238
+ $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
239
+ if (!empty($locale)) {
240
+ return strtoupper($locale[0]);
241
+ }
242
+
243
+ return strtoupper($default);
244
+ }
245
+
246
+ /**
247
+ * helper to generate customer payment error messages
248
+ *
249
+ * @param mixed $errorMsg
250
+ * @param null|mixed $errorCode
251
+ * @param null|mixed $orderNumber
252
+ */
253
+ public function handleError($errorMsg, $errorCode = null, $orderNumber = null)
254
+ {
255
+ // default is return generic error message
256
+ if ($orderNumber != null) {
257
+ $this->log('Ordernumber ' . $orderNumber . ' -> ' . $errorMsg . ' [' . $errorCode . ']', 'NOTICE');
258
+ }
259
+
260
+ if ($errorCode) {
261
+ if (!preg_match(
262
+ '/HPError-[0-9]{3}\.[0-9]{3}\.[0-9]{3}/', $this->_getHelper()->__('HPError-' . $errorCode),
263
+ $matches
264
+ )
265
+ ) { //JUST return when snipet exists
266
+ return $this->_getHelper()->__('HPError-' . $errorCode);
267
+ }
268
+ }
269
+
270
+ return $this->_getHelper()->__('An unexpected error occurred. Please contact us to get further information.');
271
+ }
272
+
273
+ /**
274
+ * get helper instance
275
+ *
276
+ * @return Mage_Core_Helper_Abstract
277
+ */
278
+ protected function _getHelper()
279
+ {
280
+ return Mage::helper('hcd');
281
+ }
282
+
283
+ /**
284
+ * Get region code
285
+ *
286
+ * @param $countryCode string country code
287
+ * @param $stateByName string state name
288
+ *
289
+ * @return mixed regionId
290
+ */
291
+ public function getRegion($countryCode, $stateByName)
292
+ {
293
+ $regionData = Mage::getModel('directory/region')->getResourceCollection()
294
+ ->addCountryFilter($countryCode)
295
+ ->load();
296
+
297
+
298
+ $regionId = null;
299
+
300
+ foreach ($regionData as $region) {
301
+ if (strtolower($stateByName) == strtolower($region['name']) or $stateByName == $region['code']) {
302
+ return $region['region_id'];
303
+ }
304
+ }
305
+
306
+ // Return last region if mapping fails
307
+ return $region['region_id'];
308
+ }
309
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/HeidelpayCD/Edition/Helper/Validator.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Validator Helper
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Helper_Validator extends HeidelpayCD_Edition_Helper_AbstractHelper
19
+ {
20
+ /**
21
+ * Validates the age of the customer
22
+ *
23
+ * It will return true if the costumer is older then 18 years
24
+ *
25
+ * @param $day integer day of the customers birth
26
+ * @param $mount integer month of the customers birth
27
+ * @param $year integer year of the customers birth
28
+ * @param mixed $month
29
+ *
30
+ * @return bool return true if the costumer is older then 18 years
31
+ */
32
+ public function validateDateOfBirth($day, $month, $year)
33
+ {
34
+ // @codingStandardsIgnoreLine should be refactored - issue #2
35
+ if (strtotime("$year/$month/$day") < (time() - (18 * 60 * 60 * 24 * 365))) {
36
+ return true;
37
+ }
38
+
39
+ return false;
40
+ }
41
+ }
app/code/community/HeidelpayCD/Edition/Model/Customer.php CHANGED
@@ -1,12 +1,24 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Customer extends Mage_Core_Model_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/customer');
8
- parent::_construct();
9
- }
10
-
11
-
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer Model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Customer extends Mage_Core_Model_Abstract
18
+ {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/customer');
22
+ parent::_construct();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer.php CHANGED
@@ -1,9 +1,23 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Mysql4_Customer extends Mage_Core_Model_Mysql4_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/customer', 'id');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer mysql driver
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Mysql4_Customer extends Mage_Core_Model_Mysql4_Abstract
18
+ {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/customer', 'id');
22
+ }
23
+ }
app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer/Collection.php CHANGED
@@ -1,11 +1,24 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Mysql4_Customer_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/customer');
8
- parent::_construct();
9
- }
10
- }
11
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Customer collection
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Mysql4_Customer_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
18
+ {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/customer');
22
+ parent::_construct();
23
+ }
24
+ }
app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction.php CHANGED
@@ -1,9 +1,23 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Mysql4_Transaction extends Mage_Core_Model_Mysql4_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/transaction', 'id');
8
- }
9
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Transaction mysql driver
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Mysql4_Transaction extends Mage_Core_Model_Mysql4_Abstract
18
+ {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/transaction', 'id');
22
+ }
23
+ }
app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction/Collection.php CHANGED
@@ -1,11 +1,24 @@
1
  <?php
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  class HeidelpayCD_Edition_Model_Mysql4_Transaction_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
  {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/transaction');
8
- parent::_construct();
9
- }
10
  }
11
-
1
  <?php
2
+ /**
3
+ * Transaction collection
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
  class HeidelpayCD_Edition_Model_Mysql4_Transaction_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
18
  {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/transaction');
22
+ parent::_construct();
23
+ }
24
  }
 
app/code/community/HeidelpayCD/Edition/Model/Observer.php CHANGED
@@ -1,122 +1,196 @@
1
- <?php
2
-
3
- /*
4
- * To change this template, choose Tools | Templates and open the template in the editor.
5
- */
6
- class HeidelpayCD_Edition_Model_Observer {
7
-
8
- var $_invoiceOrderEmail = true;
9
-
10
- public function removeWalletDataFromCheckout($observer) {
11
- // unset wallet data from session
12
- if($session = Mage::getSingleton('checkout/session')) $session->unsHcdWallet();
13
- //Mage::log('remove masterpass');
14
- }
15
-
16
- public function handleWalletDataDuringCheckout($observer) {
17
-
18
- $controller = $observer->getControllerAction();
19
-
20
- $ControllerName = $controller->getRequest()->getControllerName();
21
-
22
- $ActionName = $controller->getRequest()->getActionName();
23
-
24
- if (($ControllerName == "cart" and $ActionName == "index") or ($ControllerName == "onepage" and $ActionName == "index")) {
25
-
26
- /**
27
- * remove wallet infomation from session (currently only masterpass)
28
- */
29
- if($session = Mage::getSingleton('checkout/session')) $session->unsHcdWallet();
30
- }
31
-
32
- }
33
-
34
- public function saveInvoice($observer) {
35
-
36
- $this->log('saveInvoice '.print_r($observer->debug(),1));
37
-
38
- $this->log('saveInvoice '.print_r($observer->getOrder()->debug(),1));
39
-
40
- }
41
-
42
- public function reportShippingToHeidelpay($observer) {
43
- $shipment = $observer->getEvent()->getShipment();
44
- $order = $shipment->getOrder();
45
- if (empty($order)) return $this;
46
- $payment = $order->getPayment()->getMethodInstance();
47
-
48
- $paymentCode = $payment->getCode();
49
-
50
-
51
- $PaymentMethode = array ( 'hcdiv' );
52
-
53
-
54
-
55
- if (!in_array($paymentCode, $PaymentMethode)) {
56
- return $this;
57
- } else {
58
-
59
- $path = "payment/".$paymentCode."/";
60
- if (Mage::getStoreConfig($path."capture_on_delivery",$order->getStoreId())) {
61
- // if invoice on delivery is on try to invoice this order
62
- $criterion = array();
63
- $Autorisation = Mage::getModel('hcd/transaction')->getOneTransactionByMethode($order->getRealOrderId() , 'PA');
64
-
65
- if( $Autorisation === false ) return $this;
66
-
67
-
68
- $config = $payment->getMainConfig($paymentCode, $order->getStoreId());
69
- $config['PAYMENT.TYPE'] = 'FI';
70
-
71
-
72
- $frontend = $payment->getFrontend($order->getRealOrderId(), $Autorisation['CRITERION_STOREID']);
73
- $frontend['FRONTEND.MODE'] = 'DEFAULT';
74
- $frontend['FRONTEND.ENABLED'] = 'false';
75
-
76
- $user = $payment->getUser($order, true);
77
-
78
- $basketData = $payment->getBasketData($order);
79
-
80
- $basketData['IDENTIFICATION.REFERENCEID'] = $Autorisation['IDENTIFICATION_UNIQUEID'];
81
- Mage::dispatchEvent('heidelpay_reportShippingToHeidelpay_bevor_preparePostData', array('payment' => $payment, 'config' => $config, 'frontend' => $frontend, 'user' => $user, 'basketData' => $basketData, 'criterion' => $criterion ));
82
- $params = Mage::helper('hcd/payment')->preparePostData( $config, $frontend, $user, $basketData,
83
- $criterion);
84
-
85
-
86
-
87
- $this->log("doRequest url : ".$config['URL']);
88
- $this->log("doRequest params : ".print_r($params,1));
89
-
90
- $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
91
-
92
- $this->log("doRequest response : ".print_r($src,1));
93
-
94
-
95
-
96
- if($src['PROCESSING_RESULT'] == "NOK") {
97
- Mage::getSingleton('core/session')->addError(Mage::helper('hcd')->__('Delivery notes to Heidelpay fail, because of : ').$src['PROCESSING_RETURN']);
98
- $shipment->_dataSaveAllowed = false;
99
- Mage::app()->getResponse()->setRedirect($_SERVER['HTTP_REFERER']);
100
- Mage::app()->getResponse()->sendResponse();
101
- exit();
102
- } else {
103
-
104
- Mage::getSingleton('core/session')->addSuccess(Mage::helper('hcd')->__('Successfully report delivery to Heidelpay.'));
105
- }
106
-
107
- };
108
-
109
- }
110
-
111
-
112
- }
113
-
114
-
115
- private function log($message, $level="DEBUG", $file=false) {
116
- $callers=debug_backtrace();
117
- return Mage::helper('hcd/payment')->realLog( $callers[1]['function'].' '.$message , $level , $file);
118
- }
119
-
120
- }
121
-
122
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * heidelpay observer model
4
+ *
5
+ * @license Use of this software requires acceptance of the License Agreement.
6
+ * @copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Observer
18
+ {
19
+ public $invoiceOrderEmail = true;
20
+
21
+ /**
22
+ * Unset session variable hcdWallet if the customers return to backet
23
+ *
24
+ * @param $observer
25
+ */
26
+ public function removeWalletDataFromCheckout()
27
+ {
28
+ // unset wallet data from session
29
+ if ($session = Mage::getSingleton('checkout/session')) {
30
+ $session->unsHcdWallet();
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Unset session variable hcdWallet if the customers return to backet
36
+ *
37
+ * @param $observer
38
+ */
39
+ public function handleWalletDataDuringCheckout($observer)
40
+ {
41
+ $controller = $observer->getControllerAction();
42
+
43
+ $controllerName = $controller->getRequest()->getControllerName();
44
+
45
+ $actionName = $controller->getRequest()->getActionName();
46
+
47
+ if (($controllerName == "cart" and $actionName == "index")
48
+ or ($controllerName == "onepage" and $actionName == "index")
49
+ ) {
50
+
51
+ /**
52
+ * remove wallet information from session (currently only masterpass)
53
+ */
54
+ if ($session = Mage::getSingleton('checkout/session')) {
55
+ $session->unsHcdWallet();
56
+ }
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Observer on save shipment to report the shipment to heidelpay
62
+ *
63
+ * @param $observer
64
+ */
65
+ public function reportShippingToHeidelpay($observer)
66
+ {
67
+ $shipment = $observer->getEvent()->getShipment();
68
+ $order = $shipment->getOrder();
69
+ if (empty($order)) {
70
+ return $this;
71
+ }
72
+
73
+ $payment = $order->getPayment()->getMethodInstance();
74
+
75
+ $paymentCode = $payment->getCode();
76
+
77
+
78
+ $paymentMethod = array('hcdivsec', 'hcdbs');
79
+
80
+
81
+ // return $this when reporting shipment is not needed
82
+ if (!in_array($paymentCode, $paymentMethod)) {
83
+ return $this;
84
+ }
85
+
86
+ /** @var $transactionModel HeidelpayCD_Edition_Model_Transaction */
87
+ $transactionModel = Mage::getModel('hcd/transaction');
88
+ /** @var $sessionModel Mage_Core_Model_Session */
89
+ $sessionModel = Mage::getSingleton('core/session');
90
+ /** @var $heidelpayHelper HeidelpayCD_Edition_Helper_Data */
91
+ $heidelpayHelper = Mage::helper('hcd');
92
+ /** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
93
+ $paymentHelper = Mage::helper('hcd/payment');
94
+
95
+ // load authorisation form database
96
+ $authorisation = $transactionModel->getOneTransactionByMethode($order->getRealOrderId(), 'PA');
97
+ // no authorisation found
98
+ if ($authorisation === false) {
99
+ $sessionModel->addError(
100
+ $heidelpayHelper->__(
101
+ 'Delivery notes to Heidelpay fail, because of no initial authorisation'
102
+ )
103
+ );
104
+ return $this;
105
+ }
106
+
107
+ // set config parameter for request
108
+ $config = $payment->getMainConfig($paymentCode, $order->getStoreId());
109
+ $config['PAYMENT.TYPE'] = 'FI';
110
+
111
+ // set frontend parameter for request
112
+ $frontend = $payment->getFrontend($order->getRealOrderId(), $authorisation['CRITERION_STOREID']);
113
+ $frontend['FRONTEND.MODE'] = 'DEFAULT';
114
+ $frontend['FRONTEND.ENABLED'] = 'false';
115
+
116
+ // set user parameter for request
117
+ $user = $payment->getUser($order, true);
118
+
119
+ $basketData = $payment->getBasketData($order);
120
+ $basketData['IDENTIFICATION.REFERENCEID'] = $authorisation['IDENTIFICATION_UNIQUEID'];#
121
+
122
+ $criterion = array();
123
+
124
+ Mage::dispatchEvent(
125
+ 'heidelpay_reportShippingToHeidelpay_bevor_preparePostData',
126
+ array(
127
+ 'payment' => $payment,
128
+ 'config' => $config,
129
+ 'frontend' => $frontend,
130
+ 'user' => $user,
131
+ 'basketData' => $basketData,
132
+ 'criterion' => $criterion
133
+ )
134
+ );
135
+
136
+ // prepare shipment report
137
+ $params = $paymentHelper->preparePostData($config, $frontend, $user, $basketData, $criterion);
138
+
139
+ $this->log("doRequest url : " . $config['URL']);
140
+ $this->log("doRequest params : " . json_encode($params));
141
+ // send shipment report to heidelpay api
142
+ $src = $paymentHelper->doRequest($config['URL'], $params);
143
+
144
+ $this->log("doRequest response : " . json_encode($src));
145
+
146
+ // generate error message in case of api error
147
+ if ($src['PROCESSING_RESULT'] == "NOK") {
148
+ $sessionModel
149
+ ->addError(
150
+ $heidelpayHelper
151
+ ->__(
152
+ 'Delivery notes to Heidelpay fail, because of :
153
+ '
154
+ )
155
+ . $src['PROCESSING_RETURN']
156
+ );
157
+ $shipment->_dataSaveAllowed = false;
158
+ Mage::app()->getResponse()
159
+ // @codingStandardsIgnoreLine use of S_SERVER is discouraged
160
+ ->setRedirect($_SERVER['HTTP_REFERER'])
161
+ ->sendResponse();
162
+ return;
163
+ }
164
+
165
+ $message = $heidelpayHelper->__('report shipment to heidelpay successful. Waiting for receipt of money');
166
+ $order->setState(
167
+ $order->getPayment()->getMethodInstance()->getStatusPendig(false),
168
+ $order->getPayment()->getMethodInstance()->getStatusPendig(true),
169
+ $message
170
+ )->save();
171
+
172
+
173
+ // successful send shipment report to heidelpay
174
+ $sessionModel
175
+ ->addSuccess(
176
+ $heidelpayHelper
177
+ ->__('Successfully report delivery to Heidelpay.')
178
+ );
179
+ }
180
+
181
+ /**
182
+ * log function
183
+ *
184
+ * @param $message string log message
185
+ * @param $level string log level
186
+ * @param $file string log file
187
+ *
188
+ * @return mixed
189
+ */
190
+ protected function log($message, $level = "DEBUG", $file = false)
191
+ {
192
+ $callers = debug_backtrace();
193
+ return Mage::helper('hcd/payment')
194
+ ->realLog($callers[1]['function'] . ' ' . $message, $level, $file);
195
+ }
196
+ }
app/code/community/HeidelpayCD/Edition/Model/Order/Pdf/Invoice.php CHANGED
@@ -1,101 +1,21 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Order_Pdf_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice
3
- {
4
-
5
- public function getPdf($invoices = array())
6
- {
7
- Mage::log('Invoice'.print_r($invoices,1));
8
-
9
- // return $this->myPdf($invoices);
10
- }
11
-
12
- public function myPdf($invoices = array())
13
- {
14
- $debug = false;
15
- if ($debug){
16
- $this->_beforeGetPdf();
17
- $this->_initRenderer('invoice');
18
-
19
- $pdf = new Zend_Pdf();
20
- $this->_setPdf($pdf);
21
- $style = new Zend_Pdf_Style();
22
- $this->_setFontBold($style, 10);
23
-
24
- $page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
25
- $pdf->pages[] = $page;
26
- //$page->setFillColor(new Zend_Pdf_Color_RGB(1, 0, 0));
27
- $this->_setFontRegular($page);
28
- //$page->drawText('Dies ist ein Test', 35, 780, 'UTF-8');
29
-
30
- $x = 50;
31
- $y = 800;
32
- }
33
- foreach ($invoices as $invoice) {
34
- $order = $invoice->getOrder();
35
- $billing = $order->getBillingAddress();
36
- $payment = $order->getPayment()->getMethodInstance();
37
-
38
- // Immer in der Basisw�hrung des Shops abrechnen
39
- //$amount = number_format($this->getOrder()->getBaseGrandTotal(), 2, '.', '');
40
- //$currency = $this->getOrder()->getBaseCurrencyCode();
41
- // in der aktuell ausgew�hlten W�hrung abrechnen
42
- $amount = number_format($order->getGrandTotal(), 2, '.', '');
43
- $currency = $order->getOrderCurrencyCode();
44
-
45
- $street = $billing->getStreet();
46
- $locale = explode('_', Mage::app()->getLocale()->getLocaleCode());
47
- if (is_array($locale) && ! empty($locale))
48
- $language = $locale[0];
49
- else
50
- $language = $this->getDefaultLocale();
51
-
52
- $userId = $order->getCustomerId();
53
- $orderId = $payment->getTransactionId();
54
- $insertId = $orderId;
55
- $orderId .= '-'.$userId;
56
- $payCode = 'IV';
57
- $payMethod = 'FI';
58
-
59
- $userData = array(
60
- 'firstname' => $billing->getFirstname(),
61
- 'lastname' => $billing->getLastname(),
62
- 'salutation'=> 'MR',#($order->customer['gender']=='f' ? 'MRS' : 'MR'),
63
- 'street' => $street[0],
64
- 'zip' => $billing->getPostcode(),
65
- 'city' => $billing->getCity(),
66
- 'country' => $billing->getCountry(),
67
- 'email' => $order->getCustomerEmail(),
68
- 'ip' => $order->getRemoteIp(),
69
- );
70
- if (empty($userData['ip'])) $userData['ip'] = $_SERVER['REMOTE_ADDR']; // Falls IP Leer, dann aus dem Server holen
71
- // Payment Request zusammenschrauben
72
- $data = $payment->prepareData($orderId, $amount, $currency, $payCode, $userData, $language, $payMethod, true);
73
- $bsParams = $payment->getBillsafeBasket($order);
74
- $data = array_merge($data, $bsParams);
75
- $data['IDENTIFICATION.REFERENCEID'] = $order->getPayment()->getLastTransId();
76
- if ($debug){
77
- foreach ($data AS $k => $v){
78
- $page->drawText($k.': '.$v, $x, $y, 'UTF-8');
79
- $y-= 10;
80
- }
81
- }
82
- // Mit Payment kommunizieren
83
- $res = $payment->doRequest($data);
84
- //if ($debug) echo '<pre>resp('.print_r($this->response, 1).')</pre>';
85
- //if ($debug) echo '<pre>'.print_r($res, 1).'</pre>';
86
- // Payment Antwort auswerten
87
- $res = $payment->parseResult($res);
88
- //if ($debug) echo '<pre>'.print_r($res, 1).'</pre>';
89
- if ($debug) $page->drawText(print_r($res,1), $x, $y, 'UTF-8');
90
- }
91
- if ($debug){
92
- $this->_afterGetPdf();
93
- return $pdf;
94
- }
95
- return parent::getPdf($invoices);
96
- }
97
- public function log($message, $level="DEBUG", $file=false) {
98
- $callers=debug_backtrace();
99
- return Mage::helper('hcd/payment')->realLog( $callers[1]['function'].' '. $message , $level , $file);
100
- }
101
- };
1
+ <?php
2
+ /**
3
+ * Order pdf invoice
4
+ *
5
+ * this is now handled by pdf templates
6
+ *
7
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
8
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
9
+ *
10
+ * @link https://dev.heidelpay.de/magento
11
+ *
12
+ * @author Jens Richter
13
+ *
14
+ * @package Heidelpay
15
+ * @subpackage Magento
16
+ * @category Magento
17
+ */
18
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
19
+ class HeidelpayCD_Edition_Model_Order_Pdf_Invoice extends Mage_Sales_Model_Order_Pdf_Invoice
20
+ {
21
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/HeidelpayCD/Edition/Model/Payment/Abstract.php CHANGED
@@ -1,695 +1,1139 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Abstract extends Mage_Payment_Model_Method_Abstract
3
- {
4
- /*{{{Vars*/
5
- /**
6
- * unique internal payment method identifier
7
- *
8
- * @var string [a-z0-9_]
9
- */
10
- protected $_code = 'abstract';
11
- protected $_order;
12
- protected $_isGateway = true;
13
- protected $_canAuthorize = false;
14
- protected $_canCapture = false;
15
- protected $_canCapturePartial = false;
16
- protected $_canRefund = true;
17
- protected $_canRefundInvoicePartial = true;
18
- protected $_canVoid = true;
19
- protected $_canUseInternal = false;
20
- protected $_canUseCheckout = true;
21
- protected $_canUseForMultishipping = false;
22
- var $_canBasketApi = false;
23
- protected $_isInitializeNeeded = true;
24
-
25
-
26
- protected $_live_url = 'https://heidelpay.hpcgw.net/ngw/post';
27
- protected $_sandbox_url = 'https://test-heidelpay.hpcgw.net/ngw/post';
28
-
29
- /**
30
- *
31
- */
32
- public function activRedirct() {
33
- return true ;
34
- }
35
-
36
- /*
37
- public function getCode() {
38
- return $this->_code ;
39
- }
40
- */
41
-
42
- protected $_formBlockType = 'hcd/form_desconly';
43
-
44
- public function getFormBlockType(){
45
- return $this->_formBlockType;
46
- }
47
-
48
- public function getCheckout()
49
- {
50
- return Mage::getSingleton('checkout/session');
51
- }
52
- /** Get Status Pending*/
53
- public function getStatusPendig($param=false) {
54
-
55
- if ($param == false) return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT; // status
56
-
57
- return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT; //state
58
-
59
- }
60
- /** Get Status Error/Cancel*/
61
- public function getStatusError($param=false) {
62
-
63
- if ($param == false) return Mage_Sales_Model_Order::STATE_CANCELED; // status
64
-
65
- return Mage_Sales_Model_Order::STATE_CANCELED; //state
66
-
67
- }
68
- /** Get Status Success*/
69
- public function getStatusSuccess($param=false) {
70
-
71
- if ($param == false) return Mage_Sales_Model_Order::STATE_PROCESSING; // status
72
-
73
- return Mage_Sales_Model_Order::STATE_PROCESSING; //state
74
- }
75
- /** Get Status PartlyPaid*/
76
- public function getStatusPartlyPaid($param=false) {
77
-
78
- if ($param == false) return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW; // status
79
-
80
- return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW; //state
81
-
82
- }
83
-
84
- /**
85
- * Get current quote
86
- *
87
- * @return Mage_Sales_Model_Quote
88
- */
89
- public function getQuote()
90
- {
91
- return $this->getCheckout()->getQuote();
92
- }
93
-
94
- /**
95
- * Get heidelpay session namespace
96
- *
97
- * @return Mage_Heidelpay_Model_Session
98
- */
99
- public function getSession()
100
- {
101
- return Mage::getSingleton('core/session');
102
- }
103
-
104
- public function validate()/*{{{*/
105
- {
106
- parent::validate();
107
- return $this;
108
- }/*}}}*/
109
-
110
- public function initialize($paymentAction, $stateObject)
111
- {
112
- /*
113
- $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
114
- $stateObject->setState($state);
115
- $stateObject->setStatus(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT);
116
- $stateObject->setIsNotified(false);
117
- */
118
- }
119
-
120
- /**
121
- * Retirve block type for display method information
122
- *
123
- * @return string
124
- */
125
- public function getInfoBlockType()/*{{{*/
126
- {
127
- return $this->_infoBlockType;
128
- }/*}}}*/
129
-
130
- /**
131
- * Return true if the method can be used at this time
132
- *
133
- * @return bool
134
- */
135
- public function isAvailable($quote=null)
136
- {
137
- # Minimum and maximum amount
138
- $totals = $this->getQuote()->getTotals();
139
- if(!isset($totals['grand_total']) ) return false;
140
- $storeId = Mage::app()->getStore()->getId();
141
-
142
- /*
143
- if(Mage::getStoreConfig("hcd/settings/transactionmode", $storeId) != 0)
144
- Mage::getSingleton('core/session')->addNotice('"'.$this->getTitle().'"'.$this->_getHelper()->__(' is in sandbox mode.'));
145
- */
146
-
147
- $amount = sprintf('%1.2f', $totals['grand_total']->getData('value'));
148
- $amount = $amount * 100;
149
- $path = "payment/".$this->_code."/";
150
-
151
- $minamount = Mage::getStoreConfig($path.'min_amount', $storeId );
152
- $maxamount = Mage::getStoreConfig($path.'max_amount', $storeId );
153
- if (is_numeric($minamount) && $minamount > 0 && $minamount > $amount) return false;
154
- if (is_numeric($maxamount) && $maxamount > 0 && $maxamount < $amount) return false;
155
- return parent::isAvailable($quote);
156
- }
157
-
158
- public function getOrderPlaceRedirectUrl()
159
- {
160
-
161
- return Mage::getUrl('hcd/', array('_secure' => true));
162
- }
163
-
164
-
165
-
166
- public function getHeidelpayUrl($isRegistration=false, $BasketId=false, $RefId=false)
167
- {
168
- $config = $frontend = $user = $basketData = array();
169
- $criterion = array();
170
-
171
- if ($isRegistration === false) {
172
- $order = Mage::getModel('sales/order');
173
- $session = $this->getCheckout();
174
- $order->loadByIncrementId($session->getLastRealOrderId());
175
- $ordernr = $order->getRealOrderId();
176
- }else {
177
- $CustomerId = $this->getCustomerId();
178
- $visitorData = Mage::getSingleton('core/session')->getVisitorData();
179
- $ordernr = ( $CustomerId == 0) ? $visitorData['visitor_id'] : $CustomerId;
180
- $order = $this->getQuote() ;
181
- };
182
- $this->log("Heidelpay Payment Code : ".$this->_code);
183
- $config = $this->getMainConfig($this->_code);
184
- if ($isRegistration === true)$config['PAYMENT.TYPE'] = 'RG';
185
- if ($isRegistration === true)$basketData['PRESENTATION.CURRENCY'] = $this->getQuote()->getQuoteCurrencyCode();
186
-
187
- // add parameters for pci 3 iframe
188
-
189
- if ($this->_code == 'hcdcc' or $this->_code == 'hcddc' ) {
190
- $url = explode( '/', Mage::getUrl('/', array('_secure' => true)));
191
- $criterion['FRONTEND.PAYMENT_FRAME_ORIGIN'] = $url[0].'//'.$url[2];
192
- $criterion['FRONTEND.CSS_PATH'] = Mage::getDesign()->getSkinUrl('css/'.$this->_code.'_payment_frame.css', array('_secure' => true));
193
- // set frame to sync modus if frame is used in bevor order mode (this is the registration case)
194
- $criterion['FRONTEND.PREVENT_ASYNC_REDIRECT'] = ($isRegistration === true) ? 'TRUE' : 'FALSE';
195
- }
196
-
197
- $frontend = $this->getFrontend($ordernr);
198
- if ($isRegistration === true) $frontend['FRONTEND.SUCCESS_URL'] = Mage::getUrl('hcd/', array('_secure' => true));
199
- if ($isRegistration === true) $frontend['CRITERION.SHIPPPING_HASH'] = $this->getShippingHash();
200
- $user = $this->getUser($order, $isRegistration);
201
-
202
-
203
- if ($isRegistration === false) {
204
- $completeBasket = ($config['INVOICEING'] == 1 or $this->_code == "hcdbs") ? true : false;
205
- $basketData = $this->getBasketData($order, $completeBasket);
206
- } else {
207
-
208
- };
209
- if ($RefId !== false ) $user['IDENTIFICATION.REFERENCEID'] = $RefId ;
210
- if ($BasketId !== false ) $basketData['BASKET.ID'] = $BasketId ;
211
- Mage::dispatchEvent('heidelpay_getHeidelpayUrl_bevor_preparePostData', array('order' => $order, 'config' => $config, 'frontend' => $frontend, 'user' => $user, 'basketData' => $basketData, 'criterion' => $criterion ));
212
- $params = Mage::helper('hcd/payment')->preparePostData( $config, $frontend, $user, $basketData,
213
- $criterion);
214
- $this->log("doRequest url : ".$config['URL'], 'DEBUG');
215
- $this->log("doRequest params : ".print_r($params,1), 'DEBUG');
216
- $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
217
- $this->log("doRequest response : ".print_r($src,1), 'DEBUG');
218
-
219
- return $src;
220
- }
221
-
222
- public function getBasketData($order , $completeBasket = false, $amount=false) {
223
- $data = array (
224
- 'PRESENTATION.AMOUNT' => ($amount) ? $amount : Mage::helper('hcd/payment')->format($order->getGrandTotal()),
225
- 'PRESENTATION.CURRENCY' => $order->getOrderCurrencyCode(),
226
- 'IDENTIFICATION.TRANSACTIONID' => $order->getRealOrderId()
227
- );
228
- // Add basket details in case of BillSafe or invoicing over heidelpay
229
- $basket = array();
230
- if ($completeBasket) {
231
- $basket = $this->getBasket($order);
232
- }
233
-
234
- return array_merge($basket, $data);
235
- }
236
-
237
-
238
-
239
- public function getFrontend($ordernr, $storeId=false) {
240
-
241
- return array(
242
- 'FRONTEND.LANGUAGE' => Mage::helper('hcd/payment')->getLang(),
243
- 'FRONTEND.RESPONSE_URL' => Mage::getUrl('hcd/index/response', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
244
- 'FRONTEND.SUCCESS_URL' => Mage::getUrl('hcd/index/success', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
245
- 'FRONTEND.FAILURE_URL' => Mage::getUrl('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
246
- 'CRITERION.PUSH_URL' => Mage::getUrl('hcd/index/push', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)), // PUSH proxy is only used for development purpose
247
- 'CRITERION.SECRET' => Mage::getModel('hcd/resource_encryption')->getHash((string)$ordernr),
248
- 'CRITERION.LANGUAGE' => strtolower(Mage::helper('hcd/payment')->getLang()),
249
- 'CRITERION.STOREID' => ($storeId) ? $storeId : Mage::app()->getStore()->getId(),
250
- 'SHOP.TYPE' => 'Magento '. Mage::getVersion(),
251
- 'SHOPMODULE.VERSION' => 'HeidelpayCD Edition - '. (string) Mage::getConfig()->getNode()->modules->HeidelpayCD_Edition->version
252
- );
253
- }
254
-
255
- public function getUser($order, $isReg=false) {
256
-
257
- $user = array();
258
- $billing = $order->getBillingAddress();
259
- $email = ($order->getBillingAddress()->getEmail()) ? $order->getBillingAddress()->getEmail() : $order->getCustomerEmail();
260
- $CustomerId = $billing->getCustomerId();
261
- $user['CRITERION.GUEST'] = 'false';
262
- if ( $CustomerId == 0) {
263
- $visitorData = Mage::getSingleton('core/session')->getVisitorData();
264
- $CustomerId = $visitorData['visitor_id'];
265
- $user['CRITERION.GUEST'] = 'true';
266
- }
267
-
268
- $user['IDENTIFICATION.SHOPPERID'] = $CustomerId;
269
- if ($billing->getCompany() == true) $user['NAME.COMPANY'] = trim($billing->getCompany());
270
- $user['NAME.GIVEN'] = trim($billing->getFirstname());
271
- $user['NAME.FAMILY'] = trim($billing->getLastname());
272
- $user['ADDRESS.STREET'] = trim($billing->getStreet1()." ".$billing->getStreet2());
273
- $user['ADDRESS.ZIP'] = trim($billing->getPostcode());
274
- $user['ADDRESS.CITY'] = trim($billing->getCity());
275
- $user['ADDRESS.COUNTRY'] = trim($billing->getCountry());
276
- $user['CONTACT.EMAIL'] = trim($email);
277
- $user['CONTACT.IP'] = (filter_var(trim(Mage::app()->getRequest()->getClientIp()), FILTER_VALIDATE_IP)) ? trim(Mage::app()->getRequest()->getClientIp()) : '127.0.0.1' ;
278
-
279
-
280
- //load reconized data
281
-
282
- if ($isReg === false and $order->getPayment()->getMethodInstance()->activRedirct() === true) {
283
-
284
-
285
- if($this->getCustomerData($this->_code, $billing->getCustomerId())) {
286
- $paymentData = $this->getCustomerData($this->_code, $billing->getCustomerId());
287
-
288
-
289
- $this->log('getUser Customer: '. print_r($paymentData,1), 'DEBUG');
290
-
291
- if (isset($paymentData['payment_data']['ACCOUNT.IBAN'])) {
292
- $paymentData['payment_data']['ACCOUNT.IBAN'] = strtoupper($paymentData['payment_data']['ACCOUNT.IBAN']);
293
- }
294
-
295
- // remove SHIPPPING_HASH from parameters
296
- if (isset($paymentData['payment_data']['SHIPPPING_HASH']))
297
- unset($paymentData['payment_data']['SHIPPPING_HASH']);
298
-
299
- // remove cc or dc reference data
300
- if ($this->_code == 'hcdcc' or $this->_code == 'hcddc') {
301
- if (isset($paymentData['payment_data']['ACCOUNT_BRAND']))
302
- unset($paymentData['payment_data']['ACCOUNT_BRAND']);
303
- if (isset($paymentData['payment_data']['ACCOUNT_NUMBER']))
304
- unset($paymentData['payment_data']['ACCOUNT_NUMBER']);
305
- if (isset($paymentData['payment_data']['ACCOUNT_HOLDER']))
306
- unset($paymentData['payment_data']['ACCOUNT_HOLDER']);
307
- if (isset($paymentData['payment_data']['ACCOUNT_EXPIRY_MONTH']))
308
- unset($paymentData['payment_data']['ACCOUNT_EXPIRY_MONTH']);
309
- if (isset($paymentData['payment_data']['ACCOUNT_EXPIRY_YEAR']))
310
- unset($paymentData['payment_data']['ACCOUNT_EXPIRY_YEAR']);
311
-
312
- }
313
- foreach($paymentData['payment_data'] AS $k => $v )
314
- $user[$k] = $v;
315
- }
316
-
317
- }
318
- return $user;
319
- }
320
-
321
- public function getBasket($order)
322
- {
323
- $items = $order->getAllVisibleItems();
324
-
325
- if ($items) {
326
- $i = 0;
327
- foreach($items as $item) {
328
- $i++;
329
- $prefix = 'CRITERION.POS_'.sprintf('%02d', $i);
330
- $quantity = (int)$item->getQtyOrdered();
331
- $parameters[$prefix.'.POSITION'] = $i;
332
- $parameters[$prefix.'.QUANTITY'] = $quantity;
333
- $parameters[$prefix.'.UNIT'] = 'Stk.'; // Liter oder so
334
- $parameters[$prefix.'.AMOUNT_UNIT_GROSS'] = floor(bcmul($item->getPriceInclTax(), 100, 10));
335
- $parameters[$prefix.'.AMOUNT_GROSS'] = floor(bcmul($item->getPriceInclTax() * $quantity, 100, 10));
336
-
337
-
338
- $parameters[$prefix.'.TEXT'] = $item->getName();
339
- $parameters[$prefix.'.COL1'] = 'SKU:'.$item->getSku();
340
- $parameters[$prefix.'.ARTICLE_NUMBER'] = $item->getProductId();
341
- $parameters[$prefix.'.PERCENT_VAT'] = sprintf('%1.2f', $item->getTaxPercent());
342
- $parameters[$prefix.'.ARTICLE_TYPE'] = 'goods';
343
- }
344
- }
345
-
346
- if ($this->getShippingNetPrice($order) > 0){
347
- $i++;
348
- $prefix = 'CRITERION.POS_'.sprintf('%02d', $i);
349
- $parameters[$prefix.'.POSITION'] = $i;
350
- $parameters[$prefix.'.QUANTITY'] = '1';
351
- $parameters[$prefix.'.UNIT'] = 'Stk.'; // Liter oder so
352
- $parameters[$prefix.'.AMOUNT_UNIT_GROSS'] = floor(bcmul((($order->getShippingAmount() - $order->getShippingRefunded()) * (1 + $this->getShippingTaxPercent($order)/100)), 100, 10));
353
- $parameters[$prefix.'.AMOUNT_GROSS'] = floor(bcmul((($order->getShippingAmount() - $order->getShippingRefunded()) * (1 + $this->getShippingTaxPercent($order)/100)), 100, 10));
354
-
355
- $parameters[$prefix.'.TEXT'] = 'Shipping';
356
- $parameters[$prefix.'.ARTICLE_NUMBER'] = '0';
357
- $parameters[$prefix.'.PERCENT_VAT'] = $this->getShippingTaxPercent($order);
358
- $parameters[$prefix.'.ARTICLE_TYPE'] = 'shipment';
359
- }
360
-
361
- if ($order->getDiscountAmount() < 0){
362
- $i++;
363
- $prefix = 'CRITERION.POS_'.sprintf('%02d', $i);
364
- $parameters[$prefix.'.POSITION'] = $i;
365
- $parameters[$prefix.'.QUANTITY'] = '1';
366
- $parameters[$prefix.'.UNIT'] = 'Stk.'; // Liter oder so
367
- $parameters[$prefix.'.AMOUNT_UNIT_GROSS'] = floor(bcmul($order->getDiscountAmount(), 100, 10));
368
- $parameters[$prefix.'.AMOUNT_GROSS'] = floor(bcmul($order->getDiscountAmount(), 100, 10));
369
-
370
- $parameters[$prefix.'.TEXT'] = 'Voucher';
371
- $parameters[$prefix.'.ARTICLE_NUMBER'] = '0';
372
- $parameters[$prefix.'.PERCENT_VAT'] = '0.00';
373
- $parameters[$prefix.'.ARTICLE_TYPE'] = 'voucher';
374
- }
375
-
376
- return $parameters;
377
- }
378
-
379
- protected function getShippingTaxPercent($order)
380
- {
381
- $tax = ($order->getShippingTaxAmount() * 100) / $order->getShippingAmount();
382
- return Mage::helper('hcd/payment')->format(round($tax));
383
- }
384
-
385
- protected function getShippingNetPrice($order)
386
- {
387
- $shippingTax = $order->getShippingTaxAmount();
388
- $price = $order->getShippingInclTax() - $shippingTax;
389
- $price -= $order->getShippingRefunded();
390
- $price -= $order->getShippingCanceled();
391
- return $price;
392
- }
393
-
394
-
395
- /**
396
- * Retrieve information from payment configuration
397
- *
398
- * @param string $field
399
- * @return mixed
400
- */
401
- public function getMainConfig($code, $storeId=false)
402
- {
403
- $storeId = ($storeId) ? $storeId : $this->getStore();
404
- $path = "hcd/settings/";
405
- $config = array();
406
- $config['PAYMENT.METHOD'] = preg_replace('/^hcd/','',$code);
407
- $config['SECURITY.SENDER'] = Mage::getStoreConfig($path."security_sender", $storeId);
408
- if(Mage::getStoreConfig($path."transactionmode", $storeId) == 0) {
409
- $config['TRANSACTION.MODE'] = 'LIVE';
410
- $config['URL'] = $this->_live_url ;
411
-
412
- } else {
413
- $config['TRANSACTION.MODE'] = 'CONNECTOR_TEST';
414
- $config['URL'] = $this->_sandbox_url ;
415
- }
416
- $config['USER.LOGIN'] = trim(Mage::getStoreConfig($path."user_id", $storeId));
417
- $config['USER.PWD'] = trim(Mage::getStoreConfig($path."user_pwd", $storeId));
418
- $config['INVOICEING'] = (Mage::getStoreConfig($path."invoicing", $storeId) == 1) ? 1 : 0 ;
419
- $config['USER.PWD'] = trim(Mage::getStoreConfig($path."user_pwd", $storeId));
420
-
421
- $path = "payment/".$code."/";
422
- $config['TRANSACTION.CHANNEL'] = trim(Mage::getStoreConfig($path."channel", $storeId));
423
- (Mage::getStoreConfig($path."bookingmode", $storeId) == true) ? $config['PAYMENT.TYPE'] = Mage::getStoreConfig($path."bookingmode", $storeId) : false ;
424
-
425
- return $config;
426
- }
427
-
428
-
429
- public function getTitle(){
430
- $storeId = $this->getStore();
431
- $path = "payment/".$this->_code."/";
432
- return $this->_getHelper()->__(Mage::getStoreConfig($path."title", $storeId));
433
- }
434
-
435
- public function getAdminTitle(){
436
- $storeId = $this->getStore();
437
- $path = "payment/".$this->_code."/";
438
- return $this->_getHelper()->__(Mage::getStoreConfig($path."title", $storeId));
439
- }
440
-
441
-
442
- public function canCapture() {
443
-
444
- //check wether this payment method supports capture
445
-
446
- if($this->_canCapture === false ) return false ;
447
-
448
- // prevent frontent to capture an amount in case of direct booking with automatical invoice
449
- if (Mage::app()->getStore()->getId() != 0) {
450
- $this->log('try to capture amount in frontend ... this is not necessary !');
451
- return false;
452
- }
453
-
454
-
455
- // loading order object to check wether this
456
- $orderIncrementId = Mage::app()->getRequest()->getParam('order_id');
457
- $this->log('$orderIncrementId '.$orderIncrementId);
458
- $order = Mage::getModel('sales/order');
459
- $order->loadByAttribute('entity_id', (int)$orderIncrementId);
460
-
461
- if (Mage::getModel('hcd/transaction')->getOneTransactionByMethode($order->getRealOrderId() , 'PA') === false) {
462
- $this->log('there is no preauthorisation for the order '.$order->getRealOrderId());
463
- return false;
464
- }
465
-
466
- return true;
467
- }
468
-
469
-
470
- public function capture(Varien_Object $payment, $amount)
471
- {
472
- $criterion=array();
473
-
474
- $order = $payment->getOrder();
475
- $this->log('StoreId'.$order->getStoreId());
476
- $Autorisation = array();
477
- if ($this->canCapture()) {
478
-
479
- $Autorisation = Mage::getModel('hcd/transaction')->getOneTransactionByMethode($order->getRealOrderId() , 'PA');
480
-
481
-
482
- if ($Autorisation === false) {
483
- Mage::throwException(Mage::helper('hcd')->__('This Transaction could not be capture online.'));
484
- return $this;
485
- }
486
-
487
- $config = $this->getMainConfig($this->_code, $Autorisation['CRITERION_STOREID']);
488
- $config['PAYMENT.TYPE'] = 'CP';
489
-
490
-
491
- $frontend = $this->getFrontend($order->getRealOrderId(), $Autorisation['CRITERION_STOREID']);
492
- $frontend['FRONTEND.MODE'] = 'DEFAULT';
493
- $frontend['FRONTEND.ENABLED'] = 'false';
494
-
495
- $user = $this->getUser($order, true);
496
- $basketdetails = ($this->_code == 'hcdbs') ? true : false; // If billsafe set to fin
497
- $basketData = $this->getBasketData($order, $basketdetails , $amount);
498
-
499
- $basketData['IDENTIFICATION.REFERENCEID'] = $Autorisation['IDENTIFICATION_UNIQUEID'];
500
- Mage::dispatchEvent('heidelpay_capture_bevor_preparePostData', array('payment' => $payment, 'config' => $config, 'frontend' => $frontend, 'user' => $user, 'basketData' => $basketData, 'criterion' => $criterion ));
501
- $params = Mage::helper('hcd/payment')->preparePostData( $config, $frontend, $user, $basketData,
502
- $criterion);
503
-
504
-
505
-
506
- $this->log("doRequest url : ".$config['URL']);
507
- $this->log("doRequest params : ".print_r($params,1));
508
-
509
- $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
510
-
511
- $this->log("doRequest response : ".print_r($src,1));
512
- //Mage::throwException('Heidelpay Error: '.'<pre>'.print_r($src,1).'</pre>');
513
-
514
-
515
- if($src['PROCESSING_RESULT'] == "NOK") {
516
- Mage::throwException('Heidelpay Error: '.$src['PROCESSING_RETURN']);
517
- return $this;;
518
- }
519
-
520
- $payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
521
- Mage::getModel('hcd/transaction')->saveTransactionData($src);
522
- }
523
- return $this;
524
- }
525
-
526
- public function refund(Varien_Object $payment, $amount)
527
- {
528
- $order = $payment->getOrder();
529
-
530
- $CaptureData = Mage::getModel('hcd/transaction')->loadLastTransactionDataByUniqeId((string)$payment->getRefundTransactionId());
531
-
532
- $config = $this->getMainConfig($this->_code, $CaptureData['CRITERION_STOREID']);
533
- $config['PAYMENT.TYPE'] = 'RF';
534
- $frontend = $this->getFrontend($order->getRealOrderId(), $CaptureData['CRITERION_STOREID']);
535
- $frontend['FRONTEND.MODE'] = 'DEFAULT';
536
- $frontend['FRONTEND.ENABLED'] = 'false';
537
- $user = $this->getUser($order, true);
538
- $basketData = $this->getBasketData($order, false , $amount);
539
- $basketData['IDENTIFICATION.REFERENCEID'] = (string)$payment->getRefundTransactionId();
540
- $params = Mage::helper('hcd/payment')->preparePostData( $config, $frontend, $user, $basketData,
541
- $criterion=array());
542
- $this->log("doRequest url : ".$config['URL']);
543
- $this->log("doRequest params : ".print_r($params,1));
544
-
545
- $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
546
- $this->log("doRequest response : ".print_r($src,1));
547
- if($src['PROCESSING_RESULT'] == "NOK") {
548
- Mage::throwException('Heidelpay Error: '.$src['PROCESSING_RETURN']);
549
- return $this;;
550
- }
551
- $payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
552
- Mage::getModel('hcd/transaction')->saveTransactionData($src);
553
- return $this;;
554
- }
555
-
556
-
557
- private function restock($order){
558
- $session = $this->getSession();
559
- if(floatval(substr(Mage::getVersion(),0,-4)) <= floatval('1.7')){
560
-
561
- if ($session->getStockUpdated() != $session->getLastRealOrderId()){
562
- $items = $order->getAllItems();
563
- if ($items){
564
- foreach($items as $item){
565
- $quantity = $item->getQtyOrdered();
566
- $product_id = $item->getProductId();
567
- // load stock for product
568
- $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);
569
- // set to old qty
570
- $stock->setQty($stock->getQty() + $quantity)->setIsInStock(true);
571
- $stock->save();
572
- }
573
- }
574
- $session->setStockUpdated($session->getLastRealOrderId());
575
- }
576
- }
577
- }
578
- public function log($message, $level="DEBUG", $file=false) {
579
- $callers=debug_backtrace();
580
- return Mage::helper('hcd/payment')->realLog( $callers[1]['function'].' '. $message , $level , $file);
581
- }
582
-
583
- function getCustomerName($session=false)
584
- {
585
- if ( $session === true ) {
586
- $session = $this->getCheckout();
587
- return $session->getQuote()->getBillingAddress()->getFirstname().' '.$session->getQuote()->getBillingAddress()->getLastname();
588
- }
589
-
590
- return $this->getQuote()->getBillingAddress()->getFirstname().' '.$this->getQuote()->getBillingAddress()->getLastname();
591
- }
592
-
593
- public function saveCustomerData($data, $uniqeID=NULL) {
594
- $custumerData = Mage::getModel('hcd/customer');
595
-
596
- if ($this->getCustomerData() !== false) {
597
- $lastdata = $this->getCustomerData();
598
- $custumerData->load($lastdata['id']);
599
- }
600
-
601
- $this->log('StoreID :'.Mage::app()->getStore()->getId());
602
- $CustomerId = $this->getQuote()->getBillingAddress()->getCustomerId();
603
- $StoreId = Mage::app()->getStore()->getId();
604
- if ( $CustomerId == 0) {
605
- $visitorData = Mage::getSingleton('core/session')->getVisitorData();
606
- $CustomerId = $visitorData['visitor_id'];
607
- $StoreId = 0;
608
- }
609
-
610
-
611
- $custumerData->setPaymentmethode($this->_code);
612
- $custumerData->setUniqeid($uniqeID);
613
- $custumerData->setCustomerid($CustomerId);
614
- $custumerData->setStoreid($StoreId);
615
- $data['SHIPPPING_HASH'] = $this->getShippingHash();
616
- $custumerData->setPaymentData(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
617
-
618
- $custumerData->save();
619
-
620
- }
621
-
622
- function getCustomerData($code=false, $customerId=false, $storeId=false ) {
623
-
624
- $PaymentCode = ($code)? $code : $this->_code ;
625
- $CustomerId = ($customerId) ? $customerId : $this->getQuote()->getBillingAddress()->getCustomerId() ;
626
- $StoreId = ($storeId) ? $storeId : Mage::app()->getStore()->getId();
627
- if ( $CustomerId == 0) {
628
- $visitorData = Mage::getSingleton('core/session')->getVisitorData();
629
- $CustomerId = $visitorData['visitor_id'];
630
- $StoreId = 0;
631
- }
632
-
633
- $this->log('StoreID :'.Mage::app()->getStore()->getId());
634
-
635
- $custumerData = Mage::getModel('hcd/customer')
636
- ->getCollection()
637
- ->addFieldToFilter('Customerid', $CustomerId)
638
- ->addFieldToFilter('Storeid', $StoreId)
639
- ->addFieldToFilter('Paymentmethode', $PaymentCode );
640
-
641
- $custumerData->load();
642
- $data = $custumerData->getData();
643
-
644
- /* retun false if not */
645
- if (empty($data[0]['id'])) return false;
646
-
647
- $return = array();
648
-
649
- $return['id'] = $data[0]['id'];
650
-
651
- if (!empty($data[0]['uniqeid'])) $return['uniqeid'] = $data[0]['uniqeid'];
652
- if (!empty($data[0]['payment_data'])) $return['payment_data'] = json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['payment_data']), true);
653
- return $return ;
654
-
655
- }
656
-
657
- function getShippingHash() {
658
- $shipping = $this->getQuote()->getShippingAddress();
659
- return md5( $shipping->getFirstname().
660
- $shipping->getLastname().
661
- $shipping->getStreet1()." ".$shipping->getStreet2().
662
- $shipping->getPostcode().
663
- $shipping->getCity().
664
- $shipping->getCountry()
665
- );
666
-
667
-
668
- }
669
-
670
- function getCustomerId() {
671
- return $this->getQuote()->getBillingAddress()->getCustomerId() ;
672
- }
673
-
674
- public function showPaymentInfo($payment_data) {
675
- /*
676
- * This function should not be modified please overright this function
677
- * in the class of the used payment methode !!!
678
- *
679
- * your function should set $this->getCheckout()->setHcdPaymentInfo($userMessage)
680
- */
681
-
682
- return false;
683
- }
684
-
685
- public function validateDateOfBirth($day, $mount, $year) {
686
- if( strtotime("$year/$mount/$day") < (time() - (18 * 60 * 60 * 24 * 365))) {
687
- return true;
688
- } else {
689
- return false;
690
- }
691
-
692
-
693
- }
694
- }
695
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Abstract payment method
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Model_Payment_Abstract extends Mage_Payment_Model_Method_Abstract
19
+ {
20
+ /**
21
+ * @var string payment code of the method
22
+ */
23
+ protected $_code = 'abstract';
24
+ /**
25
+ * @var Mage_Sales_Model_Order magento order object
26
+ */
27
+ protected $_order;
28
+ /**
29
+ * @var bool weather this payment method is a gateway method
30
+ */
31
+ protected $_isGateway = true;
32
+ /**
33
+ * @var bool this payment method allows authorisation
34
+ */
35
+ protected $_canAuthorize = false;
36
+ /**
37
+ * @var bool this payment method is able to capture
38
+ */
39
+ protected $_canCapture = false;
40
+ /**
41
+ * @var bool this payment method is capable of partly capture
42
+ */
43
+ protected $_canCapturePartial = false;
44
+ /**
45
+ * @var bool the chard amount can be reverted to the given account
46
+ */
47
+ protected $_canRefund = true;
48
+ /**
49
+ * @var bool even spear invoice can be reverted
50
+ */
51
+ protected $_canRefundInvoicePartial = true;
52
+
53
+ protected $_canVoid = true;
54
+ /**
55
+ * @var bool payment method can be used from backend
56
+ */
57
+ protected $_canUseInternal = false;
58
+ /**
59
+ * @var bool payment method can be used for checkout
60
+ */
61
+ protected $_canUseCheckout = true;
62
+ /**
63
+ * @var bool payment method supports multishipping checkout
64
+ */
65
+ protected $_canUseForMultishipping = false;
66
+ /**
67
+ * @var bool Basket details will be send to the payment server
68
+ */
69
+ protected $_canBasketApi = false;
70
+ /**
71
+ * @var bool payment method needs to be initialized
72
+ */
73
+ protected $_isInitializeNeeded = true;
74
+ /**
75
+ * @var bool invoice order mail send
76
+ */
77
+ protected $_invoiceOrderEmail = true;
78
+
79
+ /**
80
+ * @var string productive payment server url
81
+ */
82
+ protected $_liveUrl = 'https://heidelpay.hpcgw.net/ngw/post';
83
+ /**
84
+ * @var string sandbox payment server url
85
+ */
86
+ protected $_sandboxUrl = 'https://test-heidelpay.hpcgw.net/ngw/post';
87
+ /**
88
+ * @var string checkout information and form
89
+ */
90
+ protected $_formBlockType = 'hcd/form_desconly';
91
+
92
+ /**
93
+ * @return bool payment method will redirect the customer directly to heidelpay
94
+ */
95
+ public function activeRedirect()
96
+ {
97
+ return true;
98
+ }
99
+
100
+ /**
101
+ * Inject template for checkout
102
+ *
103
+ * @return string template form
104
+ */
105
+ public function getFormBlockType()
106
+ {
107
+ return $this->_formBlockType;
108
+ }
109
+
110
+ /**
111
+ * This payment method supports basket api
112
+ *
113
+ * @return bool
114
+ */
115
+ public function canBasketApi()
116
+ {
117
+ return $this->_canBasketApi;
118
+ }
119
+
120
+ /**
121
+ * Getter for pending status
122
+ *
123
+ * @param bool $param return state or status
124
+ *
125
+ * @return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
126
+ */
127
+ public function getStatusPendig($param = false)
128
+ {
129
+ if ($param == false) {
130
+ return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT;
131
+ } // status
132
+
133
+ return Mage_Sales_Model_Order::STATE_PENDING_PAYMENT; //state
134
+ }
135
+
136
+ /**
137
+ * Getter for error status
138
+ *
139
+ * @param bool $param return state or status
140
+ *
141
+ * @return Mage_Sales_Model_Order::STATE_CANCELED;
142
+ */
143
+ public function getStatusError($param = false)
144
+ {
145
+ if ($param == false) {
146
+ return Mage_Sales_Model_Order::STATE_CANCELED;
147
+ } // status
148
+
149
+ return Mage_Sales_Model_Order::STATE_CANCELED; //state
150
+ }
151
+
152
+ /**
153
+ * Getter for success status
154
+ *
155
+ * @param bool $param return state or status
156
+ *
157
+ * @return Mage_Sales_Model_Order::STATE_PROCESSING;
158
+ */
159
+ public function getStatusSuccess($param = false)
160
+ {
161
+ if ($param == false) {
162
+ return Mage_Sales_Model_Order::STATE_PROCESSING;
163
+ } // status
164
+
165
+ return Mage_Sales_Model_Order::STATE_PROCESSING; //state
166
+ }
167
+
168
+ /**
169
+ * Getter for partly paid status
170
+ *
171
+ * @param bool $param return state or status
172
+ *
173
+ * @return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
174
+ */
175
+ public function getStatusPartlyPaid($param = false)
176
+ {
177
+ if ($param == false) {
178
+ return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
179
+ } // status
180
+
181
+ return Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW; //state
182
+ }
183
+
184
+ /**
185
+ * Getter for core session
186
+ *
187
+ * @return Mage_Heidelpay_Model_Session
188
+ */
189
+ public function getSession()
190
+ {
191
+ return Mage::getSingleton('core/session');
192
+ }
193
+
194
+ /**
195
+ * Validate input data from checkout
196
+ *
197
+ * @return HeidelpayCD_Edition_Model_Payment_Abstract
198
+ */
199
+ public function validate()
200
+ {
201
+ parent::validate();
202
+ return $this;
203
+ }
204
+
205
+ /**
206
+ * Inject information template
207
+ *
208
+ * @return string
209
+ */
210
+ public function getInfoBlockType()
211
+ {
212
+ return $this->_infoBlockType;
213
+ }
214
+
215
+ /**
216
+ * Deactivate payment method in case of wrong currency or other credentials
217
+ *
218
+ * @param Mage_Quote
219
+ * @param null|mixed $quote
220
+ *
221
+ * @return bool
222
+ */
223
+ public function isAvailable($quote = null)
224
+ {
225
+ # Minimum and maximum amount
226
+ $totals = $this->getQuote()->getTotals();
227
+ if (!isset($totals['grand_total'])) {
228
+ return false;
229
+ }
230
+
231
+ $storeId = Mage::app()->getStore()->getId();
232
+
233
+ $amount = sprintf('%1.2f', $totals['grand_total']->getData('value'));
234
+ $amount = $amount * 100;
235
+ $path = "payment/" . $this->_code . "/";
236
+ $minamount = Mage::getStoreConfig($path . 'min_amount', $storeId);
237
+ $maxamount = Mage::getStoreConfig($path . 'max_amount', $storeId);
238
+ if (is_numeric($minamount) && $minamount > 0 && $minamount > $amount) {
239
+ return false;
240
+ }
241
+
242
+ if (is_numeric($maxamount) && $maxamount > 0 && $maxamount < $amount) {
243
+ return false;
244
+ }
245
+
246
+ return parent::isAvailable($quote);
247
+ }
248
+
249
+ /**
250
+ * Get current quote
251
+ *
252
+ * @return Mage_Sales_Model_Quote
253
+ */
254
+ public function getQuote()
255
+ {
256
+ return $this->getCheckout()->getQuote();
257
+ }
258
+
259
+ /**
260
+ * Get current checkout session
261
+ *
262
+ * @return Mage_Core_Model_Abstract::getSingleton('checkout/session')
263
+ */
264
+ public function getCheckout()
265
+ {
266
+ return Mage::getSingleton('checkout/session');
267
+ }
268
+
269
+ /**
270
+ * Redirect to heidelpay index controller in case of placing the order
271
+ *
272
+ * @return string controller url
273
+ */
274
+ public function getOrderPlaceRedirectUrl()
275
+ {
276
+ return Mage::getUrl('hcd/', array('_secure' => true));
277
+ }
278
+
279
+ /**
280
+ * Call heidelpay api for a payment request
281
+ *
282
+ * @param bool $isRegistration payment method supports registration
283
+ * @param bool $BasketI Id of a heidelpay basket api call
284
+ * @param bool $refId payment reference id for debit/authorize on a registration
285
+ * @param mixed $basketId
286
+ *
287
+ * @return mixed
288
+ */
289
+ public function getHeidelpayUrl($isRegistration = false, $basketId = false, $refId = false)
290
+ {
291
+ $config = $frontend = $user = $basketData = array();
292
+ $criterion = array();
293
+
294
+ if ($isRegistration === false) {
295
+ $order = Mage::getModel('sales/order');
296
+ $session = $this->getCheckout();
297
+ $order->loadByIncrementId($session->getLastRealOrderId());
298
+ $ordernr = $order->getRealOrderId();
299
+ } else {
300
+ $customerId = $this->getCustomerId();
301
+ $visitorData = Mage::getSingleton('core/session')->getVisitorData();
302
+ $ordernr = ($customerId == 0) ? $visitorData['visitor_id'] : $customerId;
303
+ $order = $this->getQuote();
304
+ }
305
+
306
+ $this->log("Heidelpay Payment Code : " . $this->_code);
307
+ $config = $this->getMainConfig($this->_code);
308
+ if ($isRegistration === true) {
309
+ $config['PAYMENT.TYPE'] = 'RG';
310
+ }
311
+
312
+ if ($isRegistration === true) {
313
+ $basketData['PRESENTATION.CURRENCY'] =
314
+ $this->getQuote()->getQuoteCurrencyCode();
315
+ }
316
+
317
+ // add parameters for pci 3 iframe
318
+
319
+ if ($this->_code == 'hcdcc' or $this->_code == 'hcddc') {
320
+ $url = explode('/', Mage::getUrl('/', array('_secure' => true)));
321
+ $criterion['FRONTEND.PAYMENT_FRAME_ORIGIN'] = $url[0] . '//' . $url[2];
322
+ $criterion['FRONTEND.CSS_PATH'] =
323
+ Mage::getDesign()->getSkinUrl(
324
+ 'css/' . $this->_code . '_payment_frame.css',
325
+ array('_secure' => true)
326
+ );
327
+ // set frame to sync modus if frame is used in befor order mode
328
+ // (this is the registration case)
329
+ $criterion['FRONTEND.PREVENT_ASYNC_REDIRECT'] =
330
+ ($isRegistration === true) ? 'TRUE' : 'FALSE';
331
+ }
332
+
333
+ $frontend = $this->getFrontend($ordernr);
334
+ if ($isRegistration === true) {
335
+ $frontend['FRONTEND.SUCCESS_URL'] =
336
+ Mage::getUrl('hcd/', array('_secure' => true));
337
+ }
338
+
339
+ if ($isRegistration === true) {
340
+ $frontend['CRITERION.SHIPPPING_HASH'] = $this->getShippingHash();
341
+ }
342
+
343
+ $user = $this->getUser($order, $isRegistration);
344
+
345
+
346
+ if ($isRegistration === false) {
347
+ $completeBasket =
348
+ ($config['INVOICEING'] == 1
349
+ or $this->_code == "hcdbs") ? true : false;
350
+ $basketData = $this->getBasketData($order, $completeBasket);
351
+ }
352
+
353
+ if ($refId !== false) {
354
+ $user['IDENTIFICATION.REFERENCEID'] = $refId;
355
+ }
356
+
357
+ if ($basketId !== false) {
358
+ $basketData['BASKET.ID'] = $basketId;
359
+ }
360
+
361
+ Mage::dispatchEvent(
362
+ 'heidelpay_getHeidelpayUrl_bevor_preparePostData',
363
+ array(
364
+ 'order' => $order,
365
+ 'config' => $config,
366
+ 'frontend' => $frontend,
367
+ 'user' => $user,
368
+ 'basketData' => $basketData,
369
+ 'criterion' => $criterion
370
+ )
371
+ );
372
+
373
+ $params = Mage::helper('hcd/payment')->preparePostData(
374
+ $config, $frontend, $user, $basketData,
375
+ $criterion
376
+ );
377
+ $this->log("doRequest url : " . $config['URL'], 'DEBUG');
378
+ $this->log("doRequest params : " . json_encode($params), 'DEBUG');
379
+ $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
380
+ $this->log("doRequest response : " . json_encode($src), 'DEBUG');
381
+
382
+ return $src;
383
+ }
384
+
385
+ /**
386
+ * Getter for customer identification number
387
+ *
388
+ * @return int customer identification number
389
+ */
390
+ public function getCustomerId()
391
+ {
392
+ return $this->getQuote()->getBillingAddress()->getCustomerId();
393
+ }
394
+
395
+ /**
396
+ * logger
397
+ *
398
+ * @param $message string message that should be logged
399
+ * @param string $level message level (like debug,info or warning)
400
+ * @param bool $file name of the logfile
401
+ *
402
+ * @return mixed
403
+ */
404
+ public function log($message, $level = "DEBUG", $file = false)
405
+ {
406
+ $callers = debug_backtrace();
407
+ $paymentHelper = Mage::helper('hcd/payment');
408
+ return $paymentHelper->realLog($callers[1]['function'] . ' ' . $message, $level, $file);
409
+ }
410
+
411
+ /**
412
+ * Load configuration parameter for the given payment method
413
+ *
414
+ * @param mixed $code payment method code
415
+ * @param mixed $storeId magento store identification number
416
+ *
417
+ * @return mixed
418
+ */
419
+ public function getMainConfig($code, $storeId = false)
420
+ {
421
+ $storeId = ($storeId) ? $storeId : $this->getStore();
422
+ $path = "hcd/settings/";
423
+ $config = array();
424
+ $config['PAYMENT.METHOD'] = preg_replace('/^hcd/', '', $code);
425
+ $config['SECURITY.SENDER'] = Mage::getStoreConfig($path . "security_sender", $storeId);
426
+ if (Mage::getStoreConfig($path . "transactionmode", $storeId) == 0) {
427
+ $config['TRANSACTION.MODE'] = 'LIVE';
428
+ $config['URL'] = $this->_liveUrl;
429
+ } else {
430
+ $config['TRANSACTION.MODE'] = 'CONNECTOR_TEST';
431
+ $config['URL'] = $this->_sandboxUrl;
432
+ }
433
+
434
+ $config['USER.LOGIN'] = trim(Mage::getStoreConfig($path . "user_id", $storeId));
435
+ $config['USER.PWD'] = trim(Mage::getStoreConfig($path . "user_pwd", $storeId));
436
+ $config['INVOICEING'] = (Mage::getStoreConfig($path . "invoicing", $storeId) == 1) ? 1 : 0;
437
+ $config['USER.PWD'] = trim(Mage::getStoreConfig($path . "user_pwd", $storeId));
438
+
439
+ $path = "payment/" . $code . "/";
440
+ $config['TRANSACTION.CHANNEL'] = trim(Mage::getStoreConfig($path . "channel", $storeId));
441
+ (Mage::getStoreConfig(
442
+ $path . "bookingmode",
443
+ $storeId
444
+ ) == true) ? $config['PAYMENT.TYPE'] = Mage::getStoreConfig(
445
+ $path . "bookingmode",
446
+ $storeId
447
+ ) : false;
448
+
449
+ return $config;
450
+ }
451
+
452
+ /**
453
+ * Prepare frontend parameter for heidelpay api call
454
+ *
455
+ * @param $orderNumber order identification number
456
+ * @param bool $storeId shore identification number
457
+ *
458
+ * @return array
459
+ */
460
+ public function getFrontend($orderNumber, $storeId = false)
461
+ {
462
+ return array(
463
+ 'FRONTEND.LANGUAGE' => Mage::helper('hcd/payment')->getLang(),
464
+ 'FRONTEND.RESPONSE_URL' => Mage::getUrl(
465
+ 'hcd/response/',
466
+ array('_forced_secure' => true,'_store_to_url' => true,'_nosid' => true)
467
+ ),
468
+ 'FRONTEND.SUCCESS_URL' => Mage::getUrl(
469
+ 'hcd/index/success',
470
+ array('_forced_secure' => true,'_store_to_url' => true,'_nosid' => true)
471
+ ),
472
+ 'FRONTEND.FAILURE_URL' => Mage::getUrl(
473
+ 'hcd/index/error',
474
+ array('_forced_secure' => true,'_store_to_url' => true,'_nosid' => true)
475
+ ),
476
+ 'CRITERION.PUSH_URL' => Mage::getUrl(
477
+ 'hcd/index/push',
478
+ array('_forced_secure' => true,'_store_to_url' => true,'_nosid' => true)
479
+ ),
480
+ 'CRITERION.SECRET' => Mage::getModel('hcd/resource_encryption')
481
+ ->getHash((string)$orderNumber),
482
+ 'CRITERION.LANGUAGE' => strtolower(Mage::helper('hcd/payment')->getLang()),
483
+ 'CRITERION.STOREID' => ($storeId) ? $storeId : Mage::app()->getStore()->getId(),
484
+ 'SHOP.TYPE' => 'Magento ' . Mage::getVersion(),
485
+ 'SHOPMODULE.VERSION' => 'HeidelpayCD Edition - ' .
486
+ (string)Mage::getConfig()->getNode()->modules->HeidelpayCD_Edition->version
487
+ );
488
+ }
489
+
490
+ /**
491
+ * ShippingHash Getter
492
+ *
493
+ * A hash of the customers shipping details
494
+ *
495
+ * @return string hash
496
+ *
497
+ */
498
+ public function getShippingHash()
499
+ {
500
+ $shipping = $this->getQuote()->getShippingAddress();
501
+ // @codingStandardsIgnoreStart can not be replace because of backwards compatiblity
502
+ return md5(
503
+ $shipping->getFirstname() .
504
+ $shipping->getLastname() .
505
+ $shipping->getStreet1() . " " . $shipping->getStreet2() .
506
+ $shipping->getPostcode() .
507
+ $shipping->getCity() .
508
+ $shipping->getCountry()
509
+ );
510
+ // @codingStandardsIgnoreEnd
511
+ }
512
+
513
+ /**
514
+ * Customer parameter for heidelpay api call
515
+ *
516
+ * @param $order Mage_Sales_Model_Order magento order object
517
+ * @param bool $isReg in case of registration
518
+ *
519
+ * @return array
520
+ *
521
+ */
522
+ // @codingStandardsIgnoreLine should be refactored - issue #1
523
+ public function getUser($order, $isReg = false)
524
+ {
525
+ $user = array();
526
+ $billing = $order->getBillingAddress();
527
+ $email = ($order->getBillingAddress()->getEmail())
528
+ ? $order->getBillingAddress()->getEmail() : $order->getCustomerEmail();
529
+ $customerId = $billing->getCustomerId();
530
+ $user['CRITERION.GUEST'] = 'false';
531
+ if ($customerId == 0) {
532
+ $visitorData = Mage::getSingleton('core/session')->getVisitorData();
533
+ $customerId = $visitorData['visitor_id'];
534
+ $user['CRITERION.GUEST'] = 'true';
535
+ }
536
+
537
+ $user['IDENTIFICATION.SHOPPERID'] = $customerId;
538
+ if ($billing->getCompany() == true) {
539
+ $user['NAME.COMPANY'] = trim($billing->getCompany());
540
+ }
541
+
542
+ $user['NAME.GIVEN'] = trim($billing->getFirstname());
543
+ $user['NAME.FAMILY'] = trim($billing->getLastname());
544
+ $user['ADDRESS.STREET'] =
545
+ trim($billing->getStreet1() . " " . $billing->getStreet2());
546
+ $user['ADDRESS.ZIP'] = trim($billing->getPostcode());
547
+ $user['ADDRESS.CITY'] = trim($billing->getCity());
548
+ $user['ADDRESS.COUNTRY'] = trim($billing->getCountry());
549
+ $user['CONTACT.EMAIL'] = trim($email);
550
+ $user['CONTACT.IP'] =
551
+ (filter_var(
552
+ trim(Mage::app()->getRequest()->getClientIp()), FILTER_VALIDATE_IP
553
+ )) ? trim(Mage::app()->getRequest()->getClientIp()) : '127.0.0.1';
554
+
555
+
556
+ //load recognized data
557
+
558
+ if ($isReg === false
559
+ and $order->getPayment()->getMethodInstance()
560
+ ->activeRedirect() === true
561
+ ) {
562
+ if ($this->getCustomerData($this->_code, $billing->getCustomerId())) {
563
+ $paymentData =
564
+ $this->getCustomerData($this->_code, $billing->getCustomerId());
565
+
566
+
567
+ $this->log('getUser Customer: ' . json_encode($paymentData), 'DEBUG');
568
+
569
+ if (isset($paymentData['payment_data']['ACCOUNT.IBAN'])) {
570
+ $paymentData['payment_data']['ACCOUNT.IBAN'] =
571
+ strtoupper($paymentData['payment_data']['ACCOUNT.IBAN']);
572
+ }
573
+
574
+ // remove SHIPPING_HASH from parameters
575
+ if (isset($paymentData['payment_data']['SHIPPPING_HASH'])) {
576
+ unset($paymentData['payment_data']['SHIPPPING_HASH']);
577
+ }
578
+
579
+ // remove cc or dc reference data
580
+ if ($this->_code == 'hcdcc' or $this->_code == 'hcddc') {
581
+ if (isset($paymentData['payment_data']['ACCOUNT_BRAND'])) {
582
+ unset($paymentData['payment_data']['ACCOUNT_BRAND']);
583
+ }
584
+
585
+ if (isset($paymentData['payment_data']['ACCOUNT_NUMBER'])) {
586
+ unset($paymentData['payment_data']['ACCOUNT_NUMBER']);
587
+ }
588
+
589
+ if (isset($paymentData['payment_data']['ACCOUNT_HOLDER'])) {
590
+ unset($paymentData['payment_data']['ACCOUNT_HOLDER']);
591
+ }
592
+
593
+ if (isset($paymentData['payment_data']['ACCOUNT_EXPIRY_MONTH'])
594
+ ) {
595
+ unset($paymentData['payment_data']['ACCOUNT_EXPIRY_MONTH']);
596
+ }
597
+
598
+ if (isset($paymentData['payment_data']['ACCOUNT_EXPIRY_YEAR'])) {
599
+ unset($paymentData['payment_data']['ACCOUNT_EXPIRY_YEAR']);
600
+ }
601
+ }
602
+
603
+ foreach ($paymentData['payment_data'] as $k => $v) {
604
+ $user[$k] = $v;
605
+ }
606
+ }
607
+ }
608
+
609
+ return $user;
610
+ }
611
+
612
+ /**
613
+ * Load additional payment information
614
+ *
615
+ * @param bool $code current payment method
616
+ * @param bool $customerId the customers identification number
617
+ * @param bool $storeId magento store id
618
+ *
619
+ * @return array|bool additional payment information
620
+ */
621
+ public function getCustomerData($code = false, $customerId = false, $storeId = false)
622
+ {
623
+ $paymentCode = ($code) ? $code : $this->_code;
624
+ $customerId = ($customerId) ? $customerId : $this->getQuote()->getBillingAddress()->getCustomerId();
625
+ $storeId = ($storeId) ? $storeId : Mage::app()->getStore()->getId();
626
+ if ($customerId == 0) {
627
+ $visitorData = Mage::getSingleton('core/session')->getVisitorData();
628
+ $customerId = $visitorData['visitor_id'];
629
+ $storeId = 0;
630
+ }
631
+
632
+ $this->log('StoreID :' . Mage::app()->getStore()->getId());
633
+
634
+ $customerData = Mage::getModel('hcd/customer')
635
+ ->getCollection()
636
+ ->addFieldToFilter('Customerid', $customerId)
637
+ ->addFieldToFilter('Storeid', $storeId)
638
+ ->addFieldToFilter('Paymentmethode', $paymentCode);
639
+
640
+ $customerData->load();
641
+ $data = $customerData->getData();
642
+
643
+ /* retun false if not */
644
+ if (empty($data[0]['id'])) {
645
+ return false;
646
+ }
647
+
648
+ $return = array();
649
+
650
+ $return['id'] = $data[0]['id'];
651
+
652
+ if (!empty($data[0]['uniqeid'])) {
653
+ $return['uniqeid'] = $data[0]['uniqeid'];
654
+ }
655
+
656
+ if (!empty($data[0]['payment_data'])) {
657
+ $return['payment_data'] = json_decode(
658
+ Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['payment_data']),
659
+ true
660
+ );
661
+ }
662
+
663
+ return $return;
664
+ }
665
+
666
+ /**
667
+ * Prepare basket details for heidelpay basket call
668
+ *
669
+ * @param $order Mage_Sales_Model_Order magento order object
670
+ * @param bool $completeBasket
671
+ * @param bool $amount order amount
672
+ *
673
+ * @return array
674
+ */
675
+ public function getBasketData($order, $completeBasket = false, $amount = false)
676
+ {
677
+ $data = array(
678
+ 'PRESENTATION.AMOUNT' => ($amount) ? $amount : Mage::helper('hcd/payment')
679
+ ->format($order->getGrandTotal()),
680
+ 'PRESENTATION.CURRENCY' => $order->getOrderCurrencyCode(),
681
+ 'IDENTIFICATION.TRANSACTIONID' => $order->getRealOrderId()
682
+ );
683
+ // Add basket details in case of BillSafe or invoicing over heidelpay
684
+ $basket = array();
685
+ if ($completeBasket) {
686
+ $basket = $this->getBasket($order);
687
+ }
688
+
689
+ return array_merge($basket, $data);
690
+ }
691
+
692
+ /**
693
+ * Getter for the payment method backend title
694
+ *
695
+ * @return string payment method title
696
+ */
697
+ public function getAdminTitle()
698
+ {
699
+ return $this->getTitle();
700
+ }
701
+
702
+ /**
703
+ * Getter for the payment method frontend title
704
+ *
705
+ * @return string payment method title
706
+ */
707
+ public function getTitle()
708
+ {
709
+ $storeId = $this->getStore();
710
+ $path = "payment/" . $this->_code . "/";
711
+ return $this->_getHelper()->__(Mage::getStoreConfig($path . "title", $storeId));
712
+ }
713
+
714
+ /**
715
+ * Api call to capture a given amount on an invoice
716
+ *
717
+ * @param $payment Mage_Sales_Model_Order_Payment current payment object
718
+ * @param $amount float amount to capture
719
+ *
720
+ * @return $this
721
+ */
722
+ public function capture(Varien_Object $payment, $amount)
723
+ {
724
+ $criterion = array();
725
+
726
+ $order = $payment->getOrder();
727
+ $this->log('StoreId' . $order->getStoreId());
728
+ $authorisation = array();
729
+ if ($this->canCapture()) {
730
+ $authorisation = Mage::getModel('hcd/transaction');
731
+ /**
732
+ * @var $authorisation HeidelpayCD_Edition_Model_Transaction
733
+ */
734
+ $authorisation->getOneTransactionByMethode(
735
+ $order->getRealOrderId(),
736
+ 'PA'
737
+ );
738
+
739
+
740
+ if ($authorisation === false) {
741
+ Mage::throwException(Mage::helper('hcd')->__('This Transaction could not be capture online.'));
742
+ return $this;
743
+ }
744
+
745
+ $config = $this->getMainConfig($this->_code, $authorisation['CRITERION_STOREID']);
746
+ $config['PAYMENT.TYPE'] = 'CP';
747
+
748
+
749
+ $frontend = $this->getFrontend($order->getRealOrderId(), $authorisation['CRITERION_STOREID']);
750
+ $frontend['FRONTEND.MODE'] = 'DEFAULT';
751
+ $frontend['FRONTEND.ENABLED'] = 'false';
752
+
753
+ $user = $this->getUser($order, true);
754
+ $basketdetails = ($this->_code == 'hcdbs') ? true : false; // If billsafe set to fin
755
+ $basketData = $this->getBasketData($order, $basketdetails, $amount);
756
+
757
+ $basketData['IDENTIFICATION.REFERENCEID'] = $authorisation['IDENTIFICATION_UNIQUEID'];
758
+ Mage::dispatchEvent(
759
+ 'heidelpay_capture_bevor_preparePostData', array(
760
+ 'payment' => $payment,
761
+ 'config' => $config,
762
+ 'frontend' => $frontend,
763
+ 'user' => $user,
764
+ 'basketData' => $basketData,
765
+ 'criterion' => $criterion
766
+ )
767
+ );
768
+ $params = Mage::helper('hcd/payment')->preparePostData(
769
+ $config, $frontend, $user, $basketData,
770
+ $criterion
771
+ );
772
+
773
+
774
+ $this->log("doRequest url : " . $config['URL']);
775
+ $this->log("doRequest params : " . json_encode($params));
776
+
777
+ $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
778
+
779
+ $this->log("doRequest response : " . json_encode($src));
780
+
781
+
782
+
783
+ if ($src['PROCESSING_RESULT'] == "NOK") {
784
+ Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
785
+ return $this;
786
+ }
787
+
788
+ $payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
789
+ Mage::getModel('hcd/transaction')->saveTransactionData($src);
790
+ }
791
+
792
+ return $this;
793
+ }
794
+
795
+ /**
796
+ * Calculate weather a order can be captured or not
797
+ *
798
+ * @return bool canCapture
799
+ */
800
+ public function canCapture()
801
+ {
802
+ //check weather this payment method supports capture
803
+
804
+ if ($this->_canCapture === false) {
805
+ return false;
806
+ }
807
+
808
+ // prevent frontend to capture an amount in case of direct booking with automatical invoice
809
+ if (Mage::app()->getStore()->getId() != 0) {
810
+ $this->log('try to capture amount in frontend ... this is not necessary !');
811
+ return false;
812
+ }
813
+
814
+ // loading order object to check wether this
815
+ $orderIncrementId = Mage::app()->getRequest()->getParam('order_id');
816
+ $this->log('$orderIncrementId ' . $orderIncrementId);
817
+ /**
818
+ * @var $order Mage_Sales_Model_Order order object
819
+ */
820
+ $order = Mage::getModel('sales/order');
821
+ $order->loadByAttribute('entity_id', (int)$orderIncrementId);
822
+ /**
823
+ * @var $transaction HeidelpayCD_Edition_Model_Transaction
824
+ */
825
+ $transaction = Mage::getModel('hcd/transaction');
826
+ if ($transaction->getOneTransactionByMethode($order->getRealOrderId(), 'PA') === false) {
827
+ $this->log('there is no preauthorisation for the order ' . $order->getRealOrderId());
828
+ return false;
829
+ }
830
+
831
+ return true;
832
+ }
833
+
834
+ /**
835
+ * Api call for refunding a given invoice
836
+ *
837
+ * @param Mage_Sales_Model_Order_Payment $payment current payment object
838
+ * @param float $amount amount to refund
839
+ *
840
+ * @return $this
841
+ */
842
+ public function refund(Varien_Object $payment, $amount)
843
+ {
844
+ /** @var $order Mage_Sales_Model_Order */
845
+ $order = $payment->getOrder();
846
+
847
+ /** @var $transaction HeidelpayCD_Edition_Model_Transaction */
848
+ $transaction = Mage::getModel('hcd/transaction');
849
+ $captureData = $transaction->loadLastTransactionDataByUniqeId((string)$payment->getRefundTransactionId());
850
+
851
+ $config = $this->getMainConfig($this->_code, $captureData['CRITERION_STOREID']);
852
+ $config['PAYMENT.TYPE'] = 'RF';
853
+ $frontend = $this->getFrontend($order->getRealOrderId(), $captureData['CRITERION_STOREID']);
854
+ $frontend['FRONTEND.MODE'] = 'DEFAULT';
855
+ $frontend['FRONTEND.ENABLED'] = 'false';
856
+ $user = $this->getUser($order, true);
857
+ $basketData = $this->getBasketData($order, false, $amount);
858
+ $basketData['IDENTIFICATION.REFERENCEID'] = (string)$payment->getRefundTransactionId();
859
+ $params = Mage::helper('hcd/payment')->preparePostData(
860
+ $config, $frontend, $user, $basketData,
861
+ $criterion = array()
862
+ );
863
+ $this->log("doRequest url : " . $config['URL']);
864
+ $this->log("doRequest params : " . json_encode($params));
865
+
866
+ $src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
867
+ $this->log("doRequest response : " . json_encode($src));
868
+ if ($src['PROCESSING_RESULT'] == "NOK") {
869
+ Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
870
+ return $this;
871
+ }
872
+
873
+ $payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
874
+ Mage::getModel('hcd/transaction')->saveTransactionData($src);
875
+ return $this;
876
+ }
877
+
878
+ /**
879
+ * Getter for customer given plus family name
880
+ *
881
+ * @param $session Mage_Checkout_Model_Session checkout session
882
+ *
883
+ * @return string given plus family name
884
+ */
885
+ public function getCustomerName($session = false)
886
+ {
887
+ if ($session === true) {
888
+ $session = $this->getCheckout();
889
+ return $session->getQuote()->getBillingAddress()->getFirstname() . ' '
890
+ . $session->getQuote()->getBillingAddress()->getLastname();
891
+ }
892
+
893
+ return $this->getQuote()->getBillingAddress()->getFirstname() . ' '
894
+ . $this->getQuote()->getBillingAddress()->getLastname();
895
+ }
896
+
897
+ /**
898
+ * Save additional payment data of the customer to the database
899
+ *
900
+ * @param $data array additional payment information of the customer
901
+ * @param $uniqeID string payment reference of a account registration
902
+ */
903
+ public function saveCustomerData($data, $uniqeID = null)
904
+ {
905
+ /** @var $customerData HeidelpayCD_Edition_Model_Customer */
906
+ $customerData = Mage::getModel('hcd/customer');
907
+
908
+ if ($this->getCustomerData() !== false) {
909
+ $lastdata = $this->getCustomerData();
910
+ $customerData->load($lastdata['id']);
911
+ }
912
+
913
+ $this->log('StoreID :' . Mage::app()->getStore()->getId());
914
+ $customerId = $this->getQuote()->getBillingAddress()->getCustomerId();
915
+ $storeId = Mage::app()->getStore()->getId();
916
+ if ($customerId == 0) {
917
+ $visitorData = Mage::getSingleton('core/session')->getVisitorData();
918
+ $customerId = $visitorData['visitor_id'];
919
+ $storeId = 0;
920
+ }
921
+
922
+ $customerData->setPaymentmethode($this->_code);
923
+ $customerData->setUniqeid($uniqeID);
924
+ $customerData->setCustomerid($customerId);
925
+ $customerData->setStoreid($storeId);
926
+ $data['SHIPPPING_HASH'] = $this->getShippingHash();
927
+ $customerData->setPaymentData(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
928
+
929
+ $customerData->save();
930
+ }
931
+
932
+ /**
933
+ * Generates a customer message for the success page
934
+ *
935
+ * Will be used for prepayment and direct debit to show the customer
936
+ * the billing information
937
+ *
938
+ * @param $paymentData transaction details form heidelpay api
939
+ *
940
+ * @return bool| string customer message for the success page
941
+ */
942
+ public function showPaymentInfo($paymentData)
943
+ {
944
+ /*
945
+ * This function should not be modified please overwrite this function
946
+ * in the class of the used payment method !!!
947
+ */
948
+ return false;
949
+ }
950
+
951
+ /**
952
+ * Handle charge back notices from heidelpay payment
953
+ *
954
+ * @param $order Mage_Sales_Model_Order
955
+ * @param $message string order history message
956
+ *
957
+ * @return Mage_Sales_Model_Order
958
+ */
959
+ public function chargeBackTransaction($order, $message="")
960
+ {
961
+ // message block for direct debit charge back
962
+ if ($order->hasInvoices()) {
963
+ $invIncrementIDs = array();
964
+ /** @var $invoice Mage_Sales_Model_Order_Invoice */
965
+ foreach ($order->getInvoiceCollection() as $invoice) {
966
+ $this->log('Invoice Number ' . (string)$invoice->getIncrementId());
967
+ $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
968
+ $invoice->setIsPaid(false);
969
+ // @codingStandardsIgnoreLine use of save in a loop
970
+ $invoice->save();
971
+ }
972
+
973
+ $order->setIsInProcess(false);
974
+ $order->setTotalInvoiced(0);
975
+ $order->setTotalPaid(0);
976
+ }
977
+
978
+ $order->setState(
979
+ $order->getPayment()->getMethodInstance()->getStatusPendig(false),
980
+ true,
981
+ $message
982
+ );
983
+
984
+ return $order;
985
+ }
986
+
987
+ /**
988
+ * Handle transaction with an not ok status
989
+ *
990
+ * @param $order Mage_Sales_Model_Order
991
+ * @param $message string order history message
992
+ *
993
+ * @return Mage_Sales_Model_Order
994
+ */
995
+ public function canceledTransaction($order, $message)
996
+ {
997
+ if ($order->canCancel()) {
998
+ $order->cancel();
999
+
1000
+ $order->setState(
1001
+ $order->getPayment()->getMethodInstance()->getStatusError(false),
1002
+ $order->getPayment()->getMethodInstance()->getStatusError(true),
1003
+ $message
1004
+ );
1005
+ }
1006
+
1007
+ return $order;
1008
+ }
1009
+
1010
+ /**
1011
+ * Handle transaction with means processing
1012
+ *
1013
+ * @param $order Mage_Sales_Model_Order
1014
+ * @param $data HeidelpayCD_Edition_Model_Transaction
1015
+ * @param $message string order history message
1016
+ *
1017
+ * @return Mage_Sales_Model_Order
1018
+ */
1019
+ public function processingTransaction($order, $data, $message='')
1020
+ {
1021
+
1022
+ /** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
1023
+ $paymentHelper = Mage::helper('hcd/payment');
1024
+
1025
+
1026
+ $message = ($message === '') ? 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] : $message;
1027
+ $totallyPaid = false;
1028
+
1029
+ $order->getPayment()
1030
+ ->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
1031
+ ->setParentTransactionId($order->getPayment()->getLastTransId())
1032
+ ->setIsTransactionClosed(true);
1033
+
1034
+ if ($paymentHelper->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and
1035
+ $order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']
1036
+ ) {
1037
+ $order->setState(
1038
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(false),
1039
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(true),
1040
+ $message
1041
+ );
1042
+ $totallyPaid = true;
1043
+ } else {
1044
+ /*
1045
+ * in case rc is ack and amount is to low or currency miss match
1046
+ */
1047
+ $order->setState(
1048
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
1049
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
1050
+ $message
1051
+ );
1052
+ }
1053
+
1054
+ $code = $order->getPayment()->getMethodInstance()->getCode();
1055
+
1056
+ $path = "payment/" . $code . "/";
1057
+ $autoInvoice = (Mage::getStoreConfig($path . "invioce", $data['CRITERION_STOREID']) == 1) ? true : false;
1058
+
1059
+ $this->log('Auto invoiced :'. (string) $autoInvoice);
1060
+
1061
+ if ($order->canInvoice() and ($autoInvoice or $code == 'hcdbs') and $totallyPaid === true) {
1062
+ $invoice = $order->prepareInvoice();
1063
+ $invoice->register()->capture();
1064
+ $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
1065
+ $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
1066
+ $invoice->setIsPaid(true);
1067
+ $order->setIsInProcess(true);
1068
+ $order->addStatusHistoryComment(
1069
+ Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
1070
+ false
1071
+ );
1072
+ $invoice->save();
1073
+
1074
+ if ($this->_invoiceOrderEmail) {
1075
+ if ($code != 'hcdpp' and $code != 'hcdiv') {
1076
+ $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
1077
+ $invoiceMailComment = ($info === false) ? '' : '<h3>'
1078
+ . $this->_getHelper()->__('Payment Information') . '</h3>' . $info . '<br/>';
1079
+ }
1080
+
1081
+ $invoice->sendEmail(true, $invoiceMailComment); // send invoice mail
1082
+ }
1083
+
1084
+
1085
+ $transactionSave = Mage::getModel('core/resource_transaction')
1086
+ ->addObject($invoice)
1087
+ ->addObject($invoice->getOrder());
1088
+ $transactionSave->save();
1089
+ }
1090
+
1091
+ $order->getPayment()->addTransaction(
1092
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
1093
+ null,
1094
+ true,
1095
+ $message
1096
+ );
1097
+
1098
+ $order->setIsInProcess(true);
1099
+
1100
+ return $order;
1101
+ }
1102
+
1103
+ /**
1104
+ * Handle transaction with means pending
1105
+ *
1106
+ * @param $order Mage_Sales_Model_Order
1107
+ * @param $data HeidelpayCD_Edition_Model_Transaction
1108
+ * @param $message string order history message
1109
+ *
1110
+ * @return Mage_Sales_Model_Order
1111
+ */
1112
+ public function pendingTransaction($order, $data, $message='')
1113
+ {
1114
+ $message = 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] .' '.$message;
1115
+
1116
+ $order->getPayment()->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
1117
+
1118
+ $order->getPayment()->setIsTransactionClosed(0);
1119
+
1120
+ $order->getPayment()->setTransactionAdditionalInfo(
1121
+ Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,
1122
+ null
1123
+ );
1124
+
1125
+ $this->log('Set Transaction to Pending : ');
1126
+ $order->setState(
1127
+ $order->getPayment()->getMethodInstance()->getStatusPendig(false),
1128
+ $order->getPayment()->getMethodInstance()->getStatusPendig(true),
1129
+ $message
1130
+ );
1131
+ $order->getPayment()->addTransaction(
1132
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
1133
+ null,
1134
+ true,
1135
+ $message
1136
+ );
1137
+ return $order;
1138
+ }
1139
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/AbstractSecuredPaymentMethods.php ADDED
@@ -0,0 +1,325 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Abstract payment method
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Model_Payment_AbstractSecuredPaymentMethods extends HeidelpayCD_Edition_Model_Payment_Abstract
19
+ {
20
+ /**
21
+ * validation helper
22
+ *
23
+ * @var $_validatorHelper HeidelpayCD_Edition_Helper_Validator
24
+ */
25
+ protected $_validatorHelper;
26
+ /**
27
+ * send basket information to basket api
28
+ *
29
+ * @var bool send basket information to basket api
30
+ */
31
+ protected $_canBasketApi = false;
32
+
33
+ /**
34
+ * set checkout form block
35
+ *
36
+ * @var string checkout form block
37
+ */
38
+ protected $_formBlockType = 'hcd/form_invoiceSecured';
39
+
40
+ /**
41
+ * over write existing info block
42
+ *
43
+ * @var string
44
+ */
45
+ protected $_infoBlockType = 'hcd/info_invoice';
46
+
47
+ /**
48
+ * validated parameter
49
+ *
50
+ * @var array validated parameter
51
+ */
52
+ protected $_validatedParameters = array();
53
+
54
+ /**
55
+ * post data from checkout
56
+ *
57
+ * @var $_postPayload array post data from checkout
58
+ */
59
+ protected $_postPayload = array();
60
+
61
+ /**
62
+ * HeidelpayCD_Edition_Model_Payment_AbstractSecuredPaymentMethods constructor.
63
+ *
64
+ * @param $emptyArray array empty array from upstream
65
+ * @param HeidelpayCD_Edition_Helper_Validator $validatorHelper
66
+ */
67
+ // @codingStandardsIgnoreLine magento sets an empty array
68
+ public function __construct()
69
+ {
70
+ $this->_validatorHelper = Mage::helper('hcd/validator');
71
+ }
72
+
73
+ /**
74
+ * Over wright from block
75
+ *
76
+ * @return string
77
+ */
78
+ public function getFormBlockType()
79
+ {
80
+ return $this->_formBlockType;
81
+ }
82
+
83
+ /**
84
+ * is payment method available
85
+ *
86
+ * @param null $quote
87
+ *
88
+ * @return bool is payment method available
89
+ */
90
+ public function isAvailable($quote = null)
91
+ {
92
+ $billing = $this->getQuote()->getBillingAddress();
93
+ $shipping = $this->getQuote()->getShippingAddress();
94
+
95
+ /* billing and shipping address has to match */
96
+ if (($billing->getFirstname() != $shipping->getFirstname()) or
97
+ ($billing->getLastname() != $shipping->getLastname()) or
98
+ ($billing->getStreet() != $shipping->getStreet()) or
99
+ ($billing->getPostcode() != $shipping->getPostcode()) or
100
+ ($billing->getCity() != $shipping->getCity()) or
101
+ ($billing->getCountry() != $shipping->getCountry())
102
+ ) {
103
+ return false;
104
+ }
105
+
106
+ /* payment method is b2c only */
107
+ if (!empty($billing->getCompany())) {
108
+ return false;
109
+ }
110
+
111
+ return parent::isAvailable($quote);
112
+ }
113
+
114
+ /**
115
+ * Validate customer input on checkout
116
+ *
117
+ * @return $this
118
+ */
119
+ public function validate()
120
+ {
121
+ parent::validate();
122
+
123
+ if (isset($this->_postPayload['method']) and $this->_postPayload['method'] == $this->_code) {
124
+ if (array_key_exists($this->_code . '_salutation', $this->_postPayload)) {
125
+ $this->_validatedParameters['NAME.SALUTATION'] =
126
+ (
127
+ $this->_postPayload[$this->_code . '_salutation'] == 'MR' or
128
+ $this->_postPayload[$this->_code . '_salutation'] == 'MRS'
129
+ )
130
+ ? $this->_postPayload[$this->_code . '_salutation'] : '';
131
+ }
132
+
133
+ if (array_key_exists($this->_code . '_dobday', $this->_postPayload) &&
134
+ array_key_exists($this->_code . '_dobmonth', $this->_postPayload) &&
135
+ array_key_exists($this->_code . '_dobyear', $this->_postPayload)
136
+ ) {
137
+ $day = (int)$this->_postPayload[$this->_code . '_dobday'];
138
+ $mounth = (int)$this->_postPayload[$this->_code . '_dobmonth'];
139
+ $year = (int)$this->_postPayload[$this->_code . '_dobyear'];
140
+
141
+ if ($this->_validatorHelper->validateDateOfBirth($day, $mounth, $year)) {
142
+ $this->_validatedParameters['NAME.BIRTHDATE']
143
+ = $year . '-' . sprintf("%02d", $mounth) . '-' . sprintf("%02d", $day);
144
+ } else {
145
+ Mage::throwException(
146
+ $this->_getHelper()
147
+ ->__('The minimum age is 18 years for this payment methode.')
148
+ );
149
+ }
150
+ }
151
+
152
+
153
+ $this->saveCustomerData($this->_validatedParameters);
154
+ }
155
+
156
+ return $this;
157
+ }
158
+
159
+ /**
160
+ * Payment information for invoice mail
161
+ *
162
+ * @param array $paymentData transaction response
163
+ *
164
+ * @return string return payment information text
165
+ */
166
+ public function showPaymentInfo($paymentData)
167
+ {
168
+ $loadSnippet = $this->_getHelper()->__("Invoice Info Text");
169
+
170
+ $replace = array(
171
+ '{AMOUNT}' => $paymentData['CLEARING_AMOUNT'],
172
+ '{CURRENCY}' => $paymentData['CLEARING_CURRENCY'],
173
+ '{CONNECTOR_ACCOUNT_HOLDER}' => $paymentData['CONNECTOR_ACCOUNT_HOLDER'],
174
+ '{CONNECTOR_ACCOUNT_IBAN}' => $paymentData['CONNECTOR_ACCOUNT_IBAN'],
175
+ '{CONNECTOR_ACCOUNT_BIC}' => $paymentData['CONNECTOR_ACCOUNT_BIC'],
176
+ '{IDENTIFICATION_SHORTID}' => $paymentData['IDENTIFICATION_SHORTID'],
177
+ );
178
+
179
+ return strtr($loadSnippet, $replace);
180
+ }
181
+
182
+ /**
183
+ * Handle transaction with means pending
184
+ *
185
+ * @param $order Mage_Sales_Model_Order
186
+ * @param $data HeidelpayCD_Edition_Model_Transaction
187
+ * @param $message string order history message
188
+ *
189
+ * @return Mage_Sales_Model_Order
190
+ */
191
+ public function pendingTransaction($order, $data, $message = '')
192
+ {
193
+ $message = 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] . ' ' . $message;
194
+
195
+ $order->getPayment()
196
+ ->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
197
+ ->setParentTransactionId($order->getPayment()->getLastTransId())
198
+ ->setIsTransactionClosed(false);
199
+
200
+ $invoice = $order->prepareInvoice();
201
+ $invoice->register();
202
+ $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
203
+ $order->setIsInProcess(true);
204
+ $invoice->setIsPaid(false);
205
+ $order->addStatusHistoryComment(
206
+ Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
207
+ false
208
+ );
209
+ $invoice->save();
210
+ if ($this->_invoiceOrderEmail) {
211
+ $code = $order->getPayment()->getMethodInstance()->getCode();
212
+ if ($code == 'hcdiv' or $code == 'hcdivsec') {
213
+ $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
214
+ $invoiceMailComment = ($info === false) ? '' : '<h3>'
215
+ . $this->_getHelper()->__('payment information') . '</h3><p>' . $info . '</p>';
216
+ }
217
+
218
+ $invoice->sendEmail(true, $invoiceMailComment); // send invoice mail
219
+ }
220
+
221
+
222
+ $transactionSave = Mage::getModel('core/resource_transaction')
223
+ ->addObject($invoice)
224
+ ->addObject($invoice->getOrder());
225
+ $transactionSave->save();
226
+
227
+ $this->log('Set transaction to processed and generate invoice ');
228
+ $order->setState(
229
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(false),
230
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(true),
231
+ $message
232
+ );
233
+
234
+ $order->getPayment()->addTransaction(
235
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
236
+ null,
237
+ true,
238
+ $message
239
+ );
240
+
241
+ return $order;
242
+ }
243
+
244
+ /**
245
+ * Handle transaction with means processing
246
+ *
247
+ * @param $order Mage_Sales_Model_Order
248
+ * @param $data HeidelpayCD_Edition_Model_Transaction
249
+ * @param $message string order history message
250
+ *
251
+ * @return Mage_Sales_Model_Order
252
+ */
253
+ public function processingTransaction($order, $data, $message = '')
254
+ {
255
+
256
+ /** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
257
+ $paymentHelper = Mage::helper('hcd/payment');
258
+
259
+
260
+ $message = ($message === '') ? 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] : $message;
261
+ $totallyPaid = false;
262
+
263
+ $order->getPayment()
264
+ ->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
265
+ ->setParentTransactionId($order->getPayment()->getLastTransId())
266
+ ->setIsTransactionClosed(true);
267
+
268
+ if ($paymentHelper->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and
269
+ $order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']
270
+ ) {
271
+ $order->setState(
272
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(false),
273
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(true),
274
+ $message
275
+ );
276
+ $totallyPaid = true;
277
+ } else {
278
+ // in case rc is ack and amount is to low or currency miss match
279
+
280
+ $order->setState(
281
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
282
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
283
+ $message
284
+ );
285
+ }
286
+
287
+ // Set invoice to paid when the total amount matches
288
+ if ($order->hasInvoices() and $totallyPaid) {
289
+
290
+ /** @var $invoice Mage_Sales_Model_Order_Invoice */
291
+ foreach ($order->getInvoiceCollection() as $invoice) {
292
+ $this->log('Set invoice ' . (string)$invoice->getIncrementId() . ' to paid.');
293
+ $invoice
294
+ ->capture()
295
+ ->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)
296
+ ->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE)
297
+ ->setIsPaid(true)
298
+ // @codingStandardsIgnoreLine use of save in a loop
299
+ ->save();
300
+
301
+ $transactionSave = Mage::getModel('core/resource_transaction')
302
+ ->addObject($invoice)
303
+ ->addObject($invoice->getOrder());
304
+ // @codingStandardsIgnoreLine use of save in a loop
305
+ $transactionSave->save();
306
+ }
307
+ }
308
+
309
+ // Set total paid and invoice to the connector amount
310
+ $order->setTotalInvoiced($data['PRESENTATION_AMOUNT']);
311
+ $order->setTotalPaid($data['PRESENTATION_AMOUNT']);
312
+
313
+
314
+ $order->getPayment()->addTransaction(
315
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
316
+ null,
317
+ true,
318
+ $message
319
+ );
320
+
321
+ $order->setIsInProcess(true);
322
+
323
+ return $order;
324
+ }
325
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/HcdDirectDebitSecured.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Direct debit secured payment method
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Model_Payment_HcdDirectDebitSecured extends HeidelpayCD_Edition_Model_Payment_AbstractSecuredPaymentMethods
19
+ {
20
+ /**
21
+ * payment code
22
+ *
23
+ * @var string payment code
24
+ */
25
+ protected $_code = 'hcdddsec';
26
+
27
+ /**
28
+ * set checkout form block
29
+ *
30
+ * @var string checkout form block
31
+ */
32
+ protected $_formBlockType = 'hcd/form_directDebitSecured';
33
+
34
+ /**
35
+ * over write existing info block
36
+ *
37
+ * @var string
38
+ */
39
+ protected $_infoBlockType = 'hcd/info_directDebit';
40
+
41
+ /**
42
+ * Validate customer input on checkout
43
+ *
44
+ * @return $this
45
+ */
46
+ public function validate()
47
+ {
48
+ $this->_postPayload = Mage::app()->getRequest()->getPOST('payment');
49
+
50
+ if (isset($this->_postPayload['method']) and $this->_postPayload['method'] == $this->_code) {
51
+ parent::validate();
52
+
53
+ if (empty($this->_postPayload[$this->_code . '_holder'])) {
54
+ Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
55
+ }
56
+
57
+ if (empty($this->_postPayload[$this->_code . '_iban'])) {
58
+ Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
59
+ }
60
+
61
+ $this->_validatedParameters['ACCOUNT.HOLDER'] = $this->_postPayload[$this->_code . '_holder'];
62
+
63
+ if (preg_match('#^[\d]#', $this->_postPayload[$this->_code . '_iban'])) {
64
+ $this->_validatedParameters['ACCOUNT.NUMBER'] = $this->_postPayload[$this->_code . '_iban'];
65
+ } else {
66
+ $this->_validatedParameters['ACCOUNT.IBAN'] = $this->_postPayload[$this->_code . '_iban'];
67
+ }
68
+
69
+ parent::validate();
70
+ }
71
+
72
+ return $this;
73
+ }
74
+
75
+ /**
76
+ * Payment information for invoice mail
77
+ *
78
+ * @param $paymentData array transaction response
79
+ *
80
+ * @return string return payment information text
81
+ */
82
+ public function showPaymentInfo($paymentData)
83
+ {
84
+ $loadSnippet = $this->_getHelper()->__("Direct Debit Info Text");
85
+
86
+ $repl = array(
87
+ '{AMOUNT}' => $paymentData['CLEARING_AMOUNT'],
88
+ '{CURRENCY}' => $paymentData['CLEARING_CURRENCY'],
89
+ '{Iban}' => $paymentData['ACCOUNT_IBAN'],
90
+ '{Ident}' => $paymentData['ACCOUNT_IDENTIFICATION'],
91
+ '{CreditorId}' => $paymentData['IDENTIFICATION_CREDITOR_ID'],
92
+ );
93
+
94
+ return strtr($loadSnippet, $repl);
95
+ }
96
+
97
+ /**
98
+ * @inheritdoc
99
+ */
100
+ public function chargeBack($order, $message = "")
101
+ {
102
+ $message = Mage::helper('hcd')->__('debit failed');
103
+ return parent::chargeBack($order, $message);
104
+ }
105
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/HcdInvoiceSecured.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Invoice secured payment method
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Model_Payment_HcdInvoiceSecured extends HeidelpayCD_Edition_Model_Payment_AbstractSecuredPaymentMethods
19
+ {
20
+ /**
21
+ * payment code
22
+ *
23
+ * @var string payment code
24
+ */
25
+ protected $_code = 'hcdivsec';
26
+
27
+ /**
28
+ * @inheritdoc
29
+ */
30
+ public function validate()
31
+ {
32
+ $this->_postPayload = Mage::app()->getRequest()->getPOST('payment');
33
+ return parent::validate();
34
+ }
35
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdbs.php CHANGED
@@ -1,46 +1,174 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdbs extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdbs';
5
- protected $_canRefund = false;
6
- protected $_canRefundInvoicePartial = false;
7
-
8
-
9
- public function isAvailable($quote=null) {
10
- $billing = $this->getQuote()->getBillingAddress();
11
- $shipping = $this->getQuote()->getShippingAddress();
12
-
13
- if (($billing->getFirstname() != $shipping->getFirstname()) or
14
- ($billing->getLastname() != $shipping->getLastname()) or
15
- ($billing->getStreet() != $shipping->getStreet()) or
16
- ($billing->getPostcode() != $shipping->getPostcode()) or
17
- ($billing->getCity() != $shipping->getCity()) or
18
- ($billing->getCountry() != $shipping->getCountry())) {
19
-
20
- return false;
21
- }
22
- return parent::isAvailable($quote);
23
- }
24
-
25
- public function showPaymentInfo($payment_data) {
26
-
27
- $load_snippet = $this->_getHelper()->__("BillSafe Info Text");
28
-
29
- $repl = array(
30
- '{LEGALNOTE}' => $payment_data['CRITERION_BILLSAFE_LEGALNOTE'],
31
- '{AMOUNT}' => $payment_data['CRITERION_BILLSAFE_AMOUNT'],
32
- '{CURRENCY}' => $payment_data['CRITERION_BILLSAFE_CURRENCY'],
33
- '{CONNECTOR_ACCOUNT_HOLDER}' => $payment_data['CRITERION_BILLSAFE_RECIPIENT'],
34
- '{CONNECTOR_ACCOUNT_IBAN}' => $payment_data['CRITERION_BILLSAFE_IBAN'],
35
- '{CONNECTOR_ACCOUNT_BIC}' => $payment_data['CRITERION_BILLSAFE_BIC'],
36
- '{IDENTIFICATION_SHORTID}' => $payment_data['CRITERION_BILLSAFE_REFERENCE'],
37
- '{PERIOD}' => $payment_data['CRITERION_BILLSAFE_PERIOD']
38
- );
39
-
40
- $load_snippet= strtr( $load_snippet , $repl);
41
-
42
-
43
- return $load_snippet;
44
-
45
- }
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * BillSafe payment method
5
+ *
6
+ * @license Use of this software requires acceptance of the License Agreement.
7
+ * @copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
18
+ class HeidelpayCD_Edition_Model_Payment_Hcdbs extends HeidelpayCD_Edition_Model_Payment_Abstract
19
+ {
20
+ /** @var $_code string payment method code */
21
+ protected $_code = 'hcdbs';
22
+ /** @var $_canRefund bool */
23
+ protected $_canRefund = false;
24
+ /** @var $_canRefundInvoicePartial bool */
25
+ protected $_canRefundInvoicePartial = false;
26
+
27
+ /** @var $_basketApiHelper HeidelpayCD_Edition_Helper_BasketApi */
28
+ protected $_basketApiHelper;
29
+
30
+ /**
31
+ * HeidelpayCD_Edition_Model_Payment_Hcdbs constructor.
32
+ */
33
+ public function __construct()
34
+ {
35
+ parent::__construct();
36
+ $this->_basketApiHelper = Mage::helper('hcd/basketApi');
37
+ }
38
+
39
+ /**
40
+ * @inheritdoc
41
+ */
42
+ public function isAvailable($quote = null)
43
+ {
44
+ $billing = $this->getQuote()->getBillingAddress();
45
+ $shipping = $this->getQuote()->getShippingAddress();
46
+
47
+ if (($billing->getFirstname() != $shipping->getFirstname()) or
48
+ ($billing->getLastname() != $shipping->getLastname()) or
49
+ ($billing->getStreet() != $shipping->getStreet()) or
50
+ ($billing->getPostcode() != $shipping->getPostcode()) or
51
+ ($billing->getCity() != $shipping->getCity()) or
52
+ ($billing->getCountry() != $shipping->getCountry())
53
+ ) {
54
+ return false;
55
+ }
56
+
57
+ return parent::isAvailable($quote);
58
+ }
59
+
60
+ /**
61
+ * @inheritdoc
62
+ */
63
+ public function showPaymentInfo($paymentData)
64
+ {
65
+ $loadSnippet = $this->_getHelper()->__("BillSafe Info Text");
66
+
67
+ $replace = array(
68
+ '{LEGALNOTE}' => $paymentData['CRITERION_BILLSAFE_LEGALNOTE'],
69
+ '{AMOUNT}' => $paymentData['CRITERION_BILLSAFE_AMOUNT'],
70
+ '{CURRENCY}' => $paymentData['CRITERION_BILLSAFE_CURRENCY'],
71
+ '{CONNECTOR_ACCOUNT_HOLDER}' => $paymentData['CRITERION_BILLSAFE_RECIPIENT'],
72
+ '{CONNECTOR_ACCOUNT_IBAN}' => $paymentData['CRITERION_BILLSAFE_IBAN'],
73
+ '{CONNECTOR_ACCOUNT_BIC}' => $paymentData['CRITERION_BILLSAFE_BIC'],
74
+ '{IDENTIFICATION_SHORTID}' => $paymentData['CRITERION_BILLSAFE_REFERENCE'],
75
+ '{PERIOD}' => $paymentData['CRITERION_BILLSAFE_PERIOD']
76
+ );
77
+
78
+ $loadSnippet = strtr($loadSnippet, $replace);
79
+
80
+
81
+ return $loadSnippet;
82
+ }
83
+
84
+ /**
85
+ * @inheritdoc
86
+ */
87
+ public function processingTransaction($order, $data, $message='')
88
+ {
89
+ $message = 'BillSafe Id: ' . $data['CRITERION_BILLSAFE_REFERENCE'];
90
+ parent::processingTransaction($order, $data, $message);
91
+ }
92
+
93
+ /**
94
+ * Prepare basket items for BillSafe
95
+ *
96
+ * @param $order Mage_Sales_Model_Order magento order object
97
+ *
98
+ * @return array basket details for heidelpay billSafe api call
99
+ */
100
+ public function getBasket($order)
101
+ {
102
+ $parameters =array();
103
+ $items = $order->getAllVisibleItems();
104
+ $itemCount = 0;
105
+
106
+ if ($items) {
107
+ foreach ($items as $item) {
108
+ $itemCount++;
109
+ $prefix = 'CRITERION.POS_' . sprintf('%02d', $itemCount);
110
+
111
+ /** @var $item Mage_Sales_Model_Order_Item */
112
+ $quantity = (int)$item->getQtyOrdered();
113
+ $parameters[$prefix . '.POSITION'] = $itemCount;
114
+ $parameters[$prefix . '.QUANTITY'] = $quantity;
115
+ $parameters[$prefix . '.UNIT'] = 'Stk.'; // Liter oder so
116
+ $parameters[$prefix . '.AMOUNT_UNIT_GROSS'] =
117
+ floor(bcmul($item->getPriceInclTax(), 100, 10));
118
+ $parameters[$prefix . '.AMOUNT_GROSS'] =
119
+ floor(bcmul($item->getPriceInclTax() * $quantity, 100, 10));
120
+
121
+
122
+ $parameters[$prefix . '.TEXT'] = $item->getName();
123
+ $parameters[$prefix . '.COL1'] = 'SKU:' . $item->getSku();
124
+ $parameters[$prefix . '.ARTICLE_NUMBER'] = $item->getProductId();
125
+ $parameters[$prefix . '.PERCENT_VAT'] = sprintf('%1.2f', $item->getTaxPercent());
126
+ $parameters[$prefix . '.ARTICLE_TYPE'] = 'goods';
127
+ }
128
+ }
129
+
130
+ if ($this->_basketApiHelper->getShippingNetPrice($order) > 0) {
131
+ $itemCount++;
132
+ $prefix = 'CRITERION.POS_' . sprintf('%02d', $itemCount);
133
+ $parameters[$prefix . '.POSITION'] = $itemCount;
134
+ $parameters[$prefix . '.QUANTITY'] = '1';
135
+ $parameters[$prefix . '.UNIT'] = 'Stk.'; // Liter oder so
136
+ $parameters[$prefix . '.AMOUNT_UNIT_GROSS'] = floor(
137
+ bcmul(
138
+ (($order->getShippingAmount() - $order->getShippingRefunded())
139
+ * (1 + $this->_basketApiHelper->getShippingTaxPercent($order) / 100)),
140
+ 100, 10
141
+ )
142
+ );
143
+ $parameters[$prefix . '.AMOUNT_GROSS'] = floor(
144
+ bcmul(
145
+ (($order->getShippingAmount() - $order->getShippingRefunded())
146
+ * (1 + $this->_basketApiHelper->getShippingTaxPercent($order) / 100)),
147
+ 100, 10
148
+ )
149
+ );
150
+
151
+ $parameters[$prefix . '.TEXT'] = 'Shipping';
152
+ $parameters[$prefix . '.ARTICLE_NUMBER'] = '0';
153
+ $parameters[$prefix . '.PERCENT_VAT'] = $this->_basketApiHelper->getShippingTaxPercent($order);
154
+ $parameters[$prefix . '.ARTICLE_TYPE'] = 'shipment';
155
+ }
156
+
157
+ if ($order->getDiscountAmount() < 0) {
158
+ $itemCount++;
159
+ $prefix = 'CRITERION.POS_' . sprintf('%02d', $itemCount);
160
+ $parameters[$prefix . '.POSITION'] = $itemCount;
161
+ $parameters[$prefix . '.QUANTITY'] = '1';
162
+ $parameters[$prefix . '.UNIT'] = 'Stk.'; // Liter oder so
163
+ $parameters[$prefix . '.AMOUNT_UNIT_GROSS'] = floor(bcmul($order->getDiscountAmount(), 100, 10));
164
+ $parameters[$prefix . '.AMOUNT_GROSS'] = floor(bcmul($order->getDiscountAmount(), 100, 10));
165
+
166
+ $parameters[$prefix . '.TEXT'] = 'Voucher';
167
+ $parameters[$prefix . '.ARTICLE_NUMBER'] = '0';
168
+ $parameters[$prefix . '.PERCENT_VAT'] = '0.00';
169
+ $parameters[$prefix . '.ARTICLE_TYPE'] = 'voucher';
170
+ }
171
+
172
+ return $parameters;
173
+ }
174
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdcc.php CHANGED
@@ -1,31 +1,76 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdcc extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdcc';
10
- protected $_canCapture = true;
11
- protected $_canCapturePartial = true;
12
-
13
- public function isRecognation() {
14
- $path = "payment/".$this->_code."/";
15
- $storeId = Mage::app()->getStore()->getId();
16
- return Mage::getStoreConfig($path.'recognition', $storeId);
17
-
18
- }
19
-
20
- public function activRedirct() {
21
- $recognation = $this->isRecognation();
22
- if ($recognation > 0) return true;
23
- return false ;
24
- }
25
- protected $_formBlockType = 'hcd/form_creditcard';
26
-
27
- public function getFormBlockType(){
28
- return $this->_formBlockType;
29
- }
30
-
31
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Credit card payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdcc extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ /**
20
+ * @var string payment code of the method
21
+ */
22
+ protected $_code = 'hcdcc';
23
+ /**
24
+ * @var bool this payment method is able to capture
25
+ */
26
+ protected $_canCapture = true;
27
+ /**
28
+ * @var bool this payment method is capable of partly capture
29
+ */
30
+ protected $_canCapturePartial = true;
31
+
32
+ /**
33
+ * @inheritdoc
34
+ */
35
+ public function isRecognition()
36
+ {
37
+ $path = "payment/".$this->_code."/";
38
+ $storeId = Mage::app()->getStore()->getId();
39
+ return Mage::getStoreConfig($path.'recognition', $storeId);
40
+ }
41
+
42
+ /**
43
+ * @inheritdoc
44
+ */
45
+ public function activeRedirect()
46
+ {
47
+ $recognition = $this->isRecognition();
48
+ if ($recognition > 0) {
49
+ return true;
50
+ }
51
+
52
+ return false;
53
+ }
54
+
55
+ /**
56
+ * @inheritdoc
57
+ */
58
+ protected $_formBlockType = 'hcd/form_creditcard';
59
+
60
+ /**
61
+ * @inheritdoc
62
+ */
63
+ public function getFormBlockType()
64
+ {
65
+ return $this->_formBlockType;
66
+ }
67
+
68
+ /**
69
+ * @inheritdoc
70
+ */
71
+ public function chargeBack($order, $message = "")
72
+ {
73
+ $message = Mage::helper('hcd')->__('chargeback');
74
+ return parent::chargeBack($order, $message);
75
+ }
76
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddc.php CHANGED
@@ -1,32 +1,67 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcddc extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcddc';
10
- protected $_canCapture = true;
11
- protected $_canCapturePartial = true;
12
-
13
- public function isRecognation() {
14
- $path = "payment/".$this->_code."/";
15
- $storeId = Mage::app()->getStore()->getId();
16
- return Mage::getStoreConfig($path.'recognition', $storeId);
17
-
18
- }
19
-
20
- public function activRedirct() {
21
- $recognation = $this->isRecognation();
22
- if ($recognation > 0) return true;
23
- return false ;
24
- }
25
-
26
- protected $_formBlockType = 'hcd/form_creditcard';
27
-
28
- public function getFormBlockType(){
29
- return $this->_formBlockType;
30
- }
31
-
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Debit card payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcddc extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcddc';
20
+ protected $_canCapture = true;
21
+ protected $_canCapturePartial = true;
22
+
23
+ /**
24
+ * @inheritdoc
25
+ */
26
+ public function isRecognition()
27
+ {
28
+ $path = "payment/".$this->_code."/";
29
+ $storeId = Mage::app()->getStore()->getId();
30
+ return Mage::getStoreConfig($path.'recognition', $storeId);
31
+ }
32
+
33
+ /**
34
+ * @inheritdoc
35
+ */
36
+ public function activeRedirect()
37
+ {
38
+ $recognation = $this->isRecognition();
39
+ if ($recognation > 0) {
40
+ return true;
41
+ }
42
+
43
+ return false;
44
+ }
45
+
46
+ /**
47
+ * @inheritdoc
48
+ */
49
+ protected $_formBlockType = 'hcd/form_creditcard';
50
+
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ public function getFormBlockType()
55
+ {
56
+ return $this->_formBlockType;
57
+ }
58
+
59
+ /**
60
+ * @inheritdoc
61
+ */
62
+ public function chargeBack($order, $message = "")
63
+ {
64
+ $message = Mage::helper('hcd')->__('chargeback');
65
+ return parent::chargeBack($order, $message);
66
+ }
67
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddd.php CHANGED
@@ -1,120 +1,86 @@
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  class HeidelpayCD_Edition_Model_Payment_Hcddd extends HeidelpayCD_Edition_Model_Payment_Abstract
3
  {
4
- protected $_code = 'hcddd';
5
- protected $_canCapture = true;
6
- protected $_canCapturePartial = true;
7
- // protected $_infoBlockType = 'hcd/info_debit';
8
- protected $_formBlockType = 'hcd/form_debit';
9
-
10
- public function getFormBlockType(){
11
- return $this->_formBlockType;
12
- }
13
-
14
- public function isAvailable($quote = null) {
15
-
16
- $path = "payment/" . $this->_code . "/";
17
- $storeId = Mage::app ()->getStore ()->getId ();
18
- $insurence = Mage::getStoreConfig ( $path . 'insurence', $storeId );
19
-
20
- // in case if insurence billing and shipping adress
21
- if ($insurence > 0) {
22
-
23
- $billing = $this->getQuote ()->getBillingAddress ();
24
- $shipping = $this->getQuote ()->getShippingAddress ();
25
-
26
- if (($billing->getFirstname () != $shipping->getFirstname ()) or ($billing->getLastname () != $shipping->getLastname ()) or ($billing->getStreet () != $shipping->getStreet ()) or ($billing->getPostcode () != $shipping->getPostcode ()) or ($billing->getCity () != $shipping->getCity ()) or ($billing->getCountry () != $shipping->getCountry ())) {
27
- $this->log('direct debit with insurence not allowed with diffrend adresses');
28
- return false;
29
- }
30
- }
31
- return parent::isAvailable ( $quote );
32
- }
33
-
34
-
35
- public function validate(){
36
- parent::validate();
37
- $payment = array();
38
- $params = array();
39
- $payment = Mage::app()->getRequest()->getPOST('payment');
40
-
41
- //Mage::throwException(print_r($payment,1));
42
-
43
- if(isset($payment['method']) and $payment['method'] == $this->_code) {
44
-
45
- if (array_key_exists($this->_code.'_salut', $payment)) {
46
- $params['NAME.SALUTATION'] = (preg_match('/[A-z]{2}/', $payment[$this->_code.'_salut'])) ? $payment[$this->_code.'_salut'] : '';
47
- }
48
-
49
- if (array_key_exists($this->_code.'_dobday', $payment) &&
50
- array_key_exists($this->_code.'_dobmonth', $payment) &&
51
- array_key_exists($this->_code.'_dobyear', $payment)
52
- ) {
53
-
54
- $day = (int)$payment[$this->_code.'_dobday'];
55
- $mounth = (int)$payment[$this->_code.'_dobmonth'];
56
- $year = (int)$payment[$this->_code.'_dobyear'];
57
-
58
- if($this->validateDateOfBirth( $day, $mounth, $year)) {
59
- $params['NAME.BIRTHDATE'] = $year.'-'.sprintf("%02d",$mounth).'-'.sprintf("%02d",$day) ;
60
- } else {
61
- Mage::throwException($this->_getHelper()->__('The minimum age is 18 years for this payment methode.'));
62
- }
63
-
64
- }
65
-
66
- if(empty($payment[$this->_code.'_holder']))
67
- Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
68
- if(empty($payment[$this->_code.'_iban']))
69
- Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
70
- if(empty($payment[$this->_code.'_bic'])){
71
 
72
- if(!preg_match('/^[A-Za-z]{2}/', $payment[$this->_code.'_iban'])){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
- Mage::throwException($this->_getHelper()->__('Please specify a bank code'));
75
- }
76
- }
77
-
78
- $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
79
-
80
- if (preg_match('#^[\d]#',$payment[$this->_code.'_iban'])) {
81
- $params['ACCOUNT.NUMBER'] = $payment[$this->_code.'_iban'];
82
- } else {
83
- $params['ACCOUNT.IBAN'] = $payment[$this->_code.'_iban'];
84
- };
85
-
86
- if (preg_match('#^[\d]#',$payment[$this->_code.'_bic'])) {
87
- $params['ACCOUNT.BANK'] = $payment[$this->_code.'_bic'];
88
- $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
89
- } else {
90
- $params['ACCOUNT.BIC'] = $payment[$this->_code.'_bic'];
91
- }
92
- $this->saveCustomerData($params);
93
-
94
- return $this;
95
  }
96
 
97
- return $this;
98
- }
99
-
100
- public function showPaymentInfo($payment_data) {
101
-
102
- $load_snippet = $this->_getHelper()->__("Direct Debit Info Text");
103
-
104
- $repl = array(
105
- '{AMOUNT}' => $payment_data['CLEARING_AMOUNT'],
106
- '{CURRENCY}' => $payment_data['CLEARING_CURRENCY'],
107
- '{Iban}' => $payment_data['ACCOUNT_IBAN'],
108
- '{Bic}' => $payment_data['ACCOUNT_BIC'],
109
- '{Ident}' => $payment_data['ACCOUNT_IDENTIFICATION'],
110
- '{CreditorId}' => $payment_data['IDENTIFICATION_CREDITOR_ID'],
111
- );
112
-
113
- $load_snippet= strtr( $load_snippet , $repl);
114
-
115
-
116
- return $load_snippet;
117
-
118
- }
119
-
120
- }
 
 
 
1
  <?php
2
+ /**
3
+ * Direct debit payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
  class HeidelpayCD_Edition_Model_Payment_Hcddd extends HeidelpayCD_Edition_Model_Payment_Abstract
18
  {
19
+ protected $_code = 'hcddd';
20
+ protected $_canCapture = true;
21
+ protected $_canCapturePartial = true;
22
+ protected $_formBlockType = 'hcd/form_debit';
23
+ /**
24
+ * over write existing info block
25
+ *
26
+ * @var string
27
+ */
28
+ protected $_infoBlockType = 'hcd/info_directDebit';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ public function getFormBlockType()
31
+ {
32
+ return $this->_formBlockType;
33
+ }
34
+
35
+ public function validate()
36
+ {
37
+ parent::validate();
38
+ $payment = array();
39
+ $params = array();
40
+ $payment = Mage::app()->getRequest()->getPOST('payment');
41
+
42
+
43
+ if (isset($payment['method']) and $payment['method'] == $this->_code) {
44
+ if (empty($payment[$this->_code.'_holder'])) {
45
+ Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
46
+ }
47
+
48
+ if (empty($payment[$this->_code.'_iban'])) {
49
+ Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
50
+ }
51
 
52
+ $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
53
+
54
+ $params['ACCOUNT.IBAN'] = $payment[$this->_code.'_iban'];
55
+
56
+
57
+ $this->saveCustomerData($params);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  }
59
 
60
+ return $this;
61
+ }
62
+
63
+ public function showPaymentInfo($paymentData)
64
+ {
65
+ $loadSnippet = $this->_getHelper()->__("Direct Debit Info Text");
66
+
67
+ $repl = array(
68
+ '{AMOUNT}' => $paymentData['CLEARING_AMOUNT'],
69
+ '{CURRENCY}' => $paymentData['CLEARING_CURRENCY'],
70
+ '{Iban}' => $paymentData['ACCOUNT_IBAN'],
71
+ '{Ident}' => $paymentData['ACCOUNT_IDENTIFICATION'],
72
+ '{CreditorId}' => $paymentData['IDENTIFICATION_CREDITOR_ID'],
73
+ );
74
+
75
+ return $loadSnippet= strtr($loadSnippet, $repl);
76
+ }
77
+
78
+ /**
79
+ * @inheritdoc
80
+ */
81
+ public function chargeBack($order, $message = "")
82
+ {
83
+ $message = Mage::helper('hcd')->__('debit failed');
84
+ return parent::chargeBack($order, $message);
85
+ }
86
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdeps.php CHANGED
@@ -1,45 +1,55 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdeps extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdeps';
10
- protected $_canRefund = false;
11
- protected $_canRefundInvoicePartial = false;
12
-
13
- protected $_formBlockType = 'hcd/form_eps';
14
-
15
-
16
- public function getFormBlockType(){
17
- return $this->_formBlockType;
18
- }
19
-
20
- public function validate(){
21
- parent::validate();
22
- $payment = array();
23
- $params = array();
24
- $payment = Mage::app()->getRequest()->getPOST('payment');
25
-
26
- if($payment['method'] == $this->_code) {
27
-
28
- if(empty($payment[$this->_code.'_holder']))
29
- Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
30
-
31
- $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
32
-
33
- $params['ACCOUNT.BANKNAME'] = $payment[$this->_code.'_bank'];
34
- $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
35
-
36
-
37
- $this->saveCustomerData($params);
38
-
39
- return $this;
40
- }
41
-
42
- return $this;
43
- }
44
- }
45
-
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * EPS payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdeps extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcdeps';
20
+ protected $_canRefund = false;
21
+ protected $_canRefundInvoicePartial = false;
22
+
23
+ protected $_formBlockType = 'hcd/form_eps';
24
+
25
+ public function getFormBlockType()
26
+ {
27
+ return $this->_formBlockType;
28
+ }
29
+
30
+ public function validate()
31
+ {
32
+ parent::validate();
33
+ $payment = array();
34
+ $params = array();
35
+ $payment = Mage::app()->getRequest()->getPOST('payment');
36
+
37
+ if ($payment['method'] == $this->_code) {
38
+ if (empty($payment[$this->_code.'_holder'])) {
39
+ Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
40
+ }
41
+
42
+ $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
43
+
44
+ $params['ACCOUNT.BANKNAME'] = $payment[$this->_code.'_bank'];
45
+ $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
46
+
47
+
48
+ $this->saveCustomerData($params);
49
+
50
+ return $this;
51
+ }
52
+
53
+ return $this;
54
+ }
55
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdgp.php CHANGED
@@ -1,82 +1,22 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdgp extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdgp';
5
- // protected $_infoBlockType = 'hcd/info_debit';
6
- protected $_formBlockType = 'hcd/form_giropay';
7
-
8
- public function getFormBlockType(){
9
- return $this->_formBlockType;
10
- }
11
-
12
- public function validate(){
13
- parent::validate();
14
- $payment = array();
15
- $params = array();
16
- $payment = Mage::app()->getRequest()->getPOST('payment');
17
-
18
- if($payment['method'] == $this->_code) {
19
-
20
- if(empty($payment[$this->_code.'_holder']))
21
- Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
22
- if(empty($payment[$this->_code.'_iban']))
23
- Mage::throwException($this->_getHelper()->__('Please specify a iban or account'));
24
- if(empty($payment[$this->_code.'_bic']))
25
- Mage::throwException($this->_getHelper()->__('Please specify a bic or bank code'));
26
-
27
- $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
28
-
29
- if (preg_match('#^[\d]#',$payment[$this->_code.'_iban'])) {
30
- $params['ACCOUNT.NUMBER'] = $payment[$this->_code.'_iban'];
31
- } else {
32
- $params['ACCOUNT.IBAN'] = $payment[$this->_code.'_iban'];
33
- };
34
-
35
- if (preg_match('#^[\d]#',$payment[$this->_code.'_bic'])) {
36
- $params['ACCOUNT.BANK'] = $payment[$this->_code.'_bic'];
37
- $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
38
- } else {
39
- $params['ACCOUNT.BIC'] = $payment[$this->_code.'_bic'];
40
- };
41
-
42
-
43
- $this->saveCustomerData($params);
44
-
45
- return $this;
46
- }
47
-
48
- return $this;
49
- }
50
-
51
- /*
52
- public function getUser($order) {
53
- $account = array();
54
- $params = array();
55
- $params = parent::getUser($order);
56
-
57
-
58
- $usersession = $this->getCheckout();
59
-
60
- $account = $usersession->getHcddata();
61
-
62
- $params['ACCOUNT.HOLDER'] = $account['hgwdd_holder'];
63
-
64
- if (is_int($account['hgwdd_iban'])) {
65
- $params['ACCOUNT.NUMBER'] = $account['hgwdd_iban'];
66
- } else {
67
- $params['ACCOUNT.IBAN'] = $account['hgwdd_iban'];
68
- };
69
-
70
- if (is_int($account['hgwdd_bic'])) {
71
- $params['ACCOUNT.BANK'] = $account['hgwdd_iban'];
72
- } else {
73
- $params['ACCOUNT.BIC'] = $account['hgwdd_iban'];
74
- };
75
-
76
- parent::log('Account data : '. print_r($account,1), 'DEBUG');
77
-
78
- return $params ;
79
-
80
- }
81
- */
82
- }
1
+ <?php
2
+ /**
3
+ * Giropay payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdgp extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcdgp';
20
+ protected $_canRefund = true;
21
+ protected $_canRefundInvoicePartial = true;
22
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdide.php CHANGED
@@ -1,45 +1,60 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdide extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdide';
10
- protected $_canRefund = false;
11
- protected $_canRefundInvoicePartial = false;
12
-
13
- protected $_formBlockType = 'hcd/form_ideal';
14
-
15
- public function getFormBlockType(){
16
- return $this->_formBlockType;
17
- }
18
-
19
- public function validate(){
20
- parent::validate();
21
- $payment = array();
22
- $params = array();
23
- $payment = Mage::app()->getRequest()->getPOST('payment');
24
-
25
- if($payment['method'] == $this->_code) {
26
-
27
- if(empty($payment[$this->_code.'_holder']))
28
- Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
29
-
30
- $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
31
-
32
- $params['ACCOUNT.BANKNAME'] = $payment[$this->_code.'_bank'];
33
- $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
34
-
35
-
36
- $this->saveCustomerData($params);
37
-
38
- return $this;
39
- }
40
-
41
- return $this;
42
- }
43
-
44
- }
45
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Ideal payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdide extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ /**
20
+ * unique internal payment method identifier
21
+ *
22
+ * @var string [a-z0-9_]
23
+ **/
24
+ protected $_code = 'hcdide';
25
+ protected $_canRefund = false;
26
+ protected $_canRefundInvoicePartial = false;
27
+
28
+ protected $_formBlockType = 'hcd/form_ideal';
29
+
30
+ public function getFormBlockType()
31
+ {
32
+ return $this->_formBlockType;
33
+ }
34
+
35
+ public function validate()
36
+ {
37
+ parent::validate();
38
+ $payment = array();
39
+ $params = array();
40
+ $payment = Mage::app()->getRequest()->getPOST('payment');
41
+
42
+ if ($payment['method'] == $this->_code) {
43
+ if (empty($payment[$this->_code.'_holder'])) {
44
+ Mage::throwException($this->_getHelper()->__('Please specify a account holder'));
45
+ }
46
+
47
+ $params['ACCOUNT.HOLDER'] = $payment[$this->_code.'_holder'];
48
+
49
+ $params['ACCOUNT.BANKNAME'] = $payment[$this->_code.'_bank'];
50
+ $params['ACCOUNT.COUNTRY'] = $this->getQuote()->getBillingAddress()->getCountry();
51
+
52
+
53
+ $this->saveCustomerData($params);
54
+
55
+ return $this;
56
+ }
57
+
58
+ return $this;
59
+ }
60
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdiv.php CHANGED
@@ -1,10 +1,60 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdiv extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdiv';
5
-
6
- protected $_infoBlockType = 'hcd/info_invoice';
7
-
8
-
9
- }
10
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Invoice unsecured payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdiv extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcdiv';
20
+
21
+ /**
22
+ * over write existing info block
23
+ *
24
+ * @var string
25
+ */
26
+ protected $_infoBlockType = 'hcd/info_invoice';
27
+
28
+ /**
29
+ * Payment information for invoice mail
30
+ *
31
+ * @param array $paymentData transaction response
32
+ *
33
+ * @return string return payment information text
34
+ */
35
+ public function showPaymentInfo($paymentData)
36
+ {
37
+ $loadSnippet = $this->_getHelper()->__("Invoice Info Text");
38
+
39
+ $repl = array(
40
+ '{AMOUNT}' => $paymentData['CLEARING_AMOUNT'],
41
+ '{CURRENCY}' => $paymentData['CLEARING_CURRENCY'],
42
+ '{CONNECTOR_ACCOUNT_HOLDER}' => $paymentData['CONNECTOR_ACCOUNT_HOLDER'],
43
+ '{CONNECTOR_ACCOUNT_IBAN}' => $paymentData['CONNECTOR_ACCOUNT_IBAN'],
44
+ '{CONNECTOR_ACCOUNT_BIC}' => $paymentData['CONNECTOR_ACCOUNT_BIC'],
45
+ '{IDENTIFICATION_SHORTID}' => $paymentData['IDENTIFICATION_SHORTID'],
46
+ );
47
+
48
+ return strtr($loadSnippet, $repl);
49
+ }
50
+
51
+ /**
52
+ * @inheritdoc
53
+ */
54
+ public function processingTransaction($order, $data, $message='')
55
+ {
56
+ $message = Mage::helper('hcd')->__('received amount ')
57
+ . $data['PRESENTATION_AMOUNT'] . ' ' . $data['PRESENTATION_CURRENCY'] . ' ' . $message;
58
+ parent::processingTransaction($order, $data, $message);
59
+ }
60
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmk.php CHANGED
@@ -1,16 +1,34 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdmk extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdmk';
5
- protected $_canRefund = false;
6
- protected $_canRefundInvoicePartial = false;
7
-
8
- public function isAvailable($quote=null) {
9
- $currency_code=$this->getQuote()->getQuoteCurrencyCode();
10
- if (!empty($currency_code) && $currency_code != 'TRY') return false;
11
- return parent::isAvailable($quote);
12
- }
13
-
14
-
15
- }
16
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * MagirKart payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ *
16
+ * @deprecated This payment method is not longer available
17
+ */
18
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
19
+ class HeidelpayCD_Edition_Model_Payment_Hcdmk extends HeidelpayCD_Edition_Model_Payment_Abstract
20
+ {
21
+ protected $_code = 'hcdmk';
22
+ protected $_canRefund = false;
23
+ protected $_canRefundInvoicePartial = false;
24
+
25
+ public function isAvailable($quote=null)
26
+ {
27
+ $currencyCode=$this->getQuote()->getQuoteCurrencyCode();
28
+ if (!empty($currencyCode) && $currencyCode != 'TRY') {
29
+ return false;
30
+ }
31
+
32
+ return parent::isAvailable($quote);
33
+ }
34
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmpa.php CHANGED
@@ -1,110 +1,142 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdmpa extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdmpa';
10
- protected $_canCapture = true;
11
- protected $_canCapturePartial = true;
12
- protected $_canRefund = true;
13
- protected $_canRefundInvoicePartial = true;
14
- var $_canBasketApi = true;
15
-
16
- protected $_formBlockType = 'hcd/form_masterpass';
17
- protected $_infoBlockType = 'hcd/info_masterpass';
18
-
19
-
20
- /**
21
- public function isAvailable($quote=null) {
22
- return true;
23
- }
24
- */
25
-
26
- function getPaymentData($code=false, $customerId=false, $storeId=false ) {
27
- $session = Mage::getSingleton('checkout/session');
28
-
29
- if ($session->getHcdWallet() !== false) {
30
-
31
- $hpdata = $session->getHcdWallet();
32
-
33
- if ($hpdata['code'] != $this->_code) return '';
34
-
35
- $html = (array_key_exists('mail', $hpdata)) ? $hpdata['mail'].'<br />' : '' ;
36
- $html .= (array_key_exists('brand', $hpdata)) ? $this->_getHelper()->__($hpdata['brand']).' ' : '' ;
37
- $html .= (array_key_exists('number', $hpdata)) ? $hpdata['number'].'<br/>' : '' ;
38
- $html .= (array_key_exists('expiryMonth', $hpdata)) ? $this->_getHelper()->__('Expires').' '.$hpdata['expiryMonth'].'/' : '' ;
39
- $html .= (array_key_exists('expiryYear', $hpdata)) ? $hpdata['expiryYear'] : '' ;
40
-
41
- return $html;
42
- }
43
- }
44
-
45
- /*
46
- * MasterPass need shipping adress instead of billing (REV20150707 FullCheckout Adressen)
47
- */
48
- public function getUser($order, $isReg=false) {
49
-
50
- $user = array();
51
-
52
- $user = parent::getUser($order, $isReg);
53
- $adress = ($order->getShippingAddress() == false) ? $order->getBillingAddress() : $order->getShippingAddress() ;
54
- $email = ($adress->getEmail()) ? $adress->getEmail() : $order->getCustomerEmail();
55
-
56
-
57
- $user['IDENTIFICATION.SHOPPERID'] = $adress->getCustomerId();
58
- if ($adress->getCompany() == true) $user['NAME.COMPANY'] = trim($adress->getCompany());
59
- $user['NAME.GIVEN'] = trim($adress->getFirstname());
60
- $user['NAME.FAMILY'] = trim($adress->getLastname());
61
- $user['ADDRESS.STREET'] = $adress->getStreet1()." ".$adress->getStreet2();
62
- $user['ADDRESS.ZIP'] = $adress->getPostcode();
63
- $user['ADDRESS.CITY'] = $adress->getCity();
64
- $user['ADDRESS.COUNTRY'] = $adress->getCountry();
65
- $user['CONTACT.EMAIL'] = $email;
66
-
67
- return $user;
68
- }
69
-
70
- public function showPaymentInfo($payment_data) {
71
-
72
- $lang = Mage::app()->getLocale()->getLocaleCode();
73
- switch ($lang) {
74
- case 'de_DE':
75
- case 'de_AT':
76
- case 'de_CH':
77
- $url_lang = 'de/DE';
78
- break;
79
- case 'fr_FR':
80
- $url_lang = 'fr/FR';
81
- break;
82
- case 'en_GB':
83
- case 'en_US':
84
- default:
85
- $url_lang = 'en/US';
86
- break;
87
- }
88
-
89
- $html = '<center><button type="button" title="MasterPass"
90
- class="btn-hcdmpa-payment-data" style="position: static"
91
- onclick="window.open(\'https://www.mastercard.com/mc_us/wallet/learnmore/'.$url_lang.'\')">
92
- </button>
93
- <div sytle="margin-top: 10px !important;">';
94
-
95
- $html .= (array_key_exists('CONTACT_EMAIL', $payment_data)) ? $payment_data['CONTACT_EMAIL'].'<br />' : '' ;
96
- $html .= (array_key_exists('ACCOUNT_BRAND', $payment_data)) ? $this->_getHelper()->__($payment_data['ACCOUNT_BRAND']).' ' : '' ;
97
- $html .= (array_key_exists('ACCOUNT_NUMBER', $payment_data)) ? $payment_data['ACCOUNT_NUMBER'].'<br/>' : '' ;
98
- $html .= (array_key_exists('ACCOUNT_EXPIRY_MONTH', $payment_data)) ? $this->_getHelper()->__('Expires').' '.$payment_data['ACCOUNT_EXPIRY_MONTH'].'/' : '' ;
99
- $html .= (array_key_exists('ACCOUNT_EXPIRY_YEAR', $payment_data)) ? $payment_data['ACCOUNT_EXPIRY_YEAR'] : '' ;
100
-
101
- $html .= '</div></center>';
102
-
103
- $this->getCheckout()->setHcdPaymentInfo($html);
104
-
105
- return ;
106
-
107
- }
108
-
109
- }
110
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Masterpass payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdmpa extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ /**
20
+ * unique internal payment method identifier
21
+ *
22
+ * @var string [a-z0-9_]
23
+ **/
24
+ protected $_code = 'hcdmpa';
25
+ protected $_canCapture = true;
26
+ protected $_canCapturePartial = true;
27
+ protected $_canRefund = true;
28
+ protected $_canRefundInvoicePartial = true;
29
+ protected $_canBasketApi = true;
30
+
31
+ protected $_formBlockType = 'hcd/form_masterpass';
32
+ protected $_infoBlockType = 'hcd/info_masterpass';
33
+
34
+ /**
35
+ public function isAvailable($quote=null) {
36
+ return true;
37
+ }
38
+ * @param mixed $code
39
+ * @param mixed $customerId
40
+ * @param mixed $storeId
41
+ */
42
+ public function getPaymentData()
43
+ {
44
+ $session = Mage::getSingleton('checkout/session');
45
+
46
+ if ($session->getHcdWallet() !== false) {
47
+ $hpdata = $session->getHcdWallet();
48
+
49
+ if ($hpdata['code'] != $this->_code) {
50
+ return '';
51
+ }
52
+
53
+ $html = (array_key_exists('mail', $hpdata)) ? $hpdata['mail'].'<br />' : '';
54
+ $html .= (array_key_exists('brand', $hpdata)) ? $this->_getHelper()->__($hpdata['brand']).' ' : '';
55
+ $html .= (array_key_exists('number', $hpdata)) ? $hpdata['number'].'<br/>' : '';
56
+ $html .= (array_key_exists('expiryMonth', $hpdata))
57
+ ? $this->_getHelper()->__('Expires').' '.$hpdata['expiryMonth'].'/' : '';
58
+ $html .= (array_key_exists('expiryYear', $hpdata)) ? $hpdata['expiryYear'] : '';
59
+
60
+ return $html;
61
+ }
62
+ }
63
+
64
+ /*
65
+ * MasterPass need shipping adress instead of billing (REV20150707 FullCheckout Adressen)
66
+ */
67
+ public function getUser($order, $isReg=false)
68
+ {
69
+ $user = array();
70
+
71
+ $user = parent::getUser($order, $isReg);
72
+ $adress = ($order->getShippingAddress() == false)
73
+ ? $order->getBillingAddress() : $order->getShippingAddress();
74
+ $email = ($adress->getEmail()) ? $adress->getEmail() : $order->getCustomerEmail();
75
+
76
+
77
+ $user['IDENTIFICATION.SHOPPERID'] = $adress->getCustomerId();
78
+ if ($adress->getCompany() == true) {
79
+ $user['NAME.COMPANY'] = trim($adress->getCompany());
80
+ }
81
+
82
+ $user['NAME.GIVEN'] = trim($adress->getFirstname());
83
+ $user['NAME.FAMILY'] = trim($adress->getLastname());
84
+ $user['ADDRESS.STREET'] = $adress->getStreet1()." ".$adress->getStreet2();
85
+ $user['ADDRESS.ZIP'] = $adress->getPostcode();
86
+ $user['ADDRESS.CITY'] = $adress->getCity();
87
+ $user['ADDRESS.COUNTRY'] = $adress->getCountry();
88
+ $user['CONTACT.EMAIL'] = $email;
89
+
90
+ return $user;
91
+ }
92
+
93
+ public function showPaymentInfo($paymentData)
94
+ {
95
+ $lang = Mage::app()->getLocale()->getLocaleCode();
96
+ switch ($lang) {
97
+ case 'de_DE':
98
+ case 'de_AT':
99
+ case 'de_CH':
100
+ $urlLang = 'de/DE';
101
+ break;
102
+ case 'fr_FR':
103
+ $urlLang = 'fr/FR';
104
+ break;
105
+ case 'en_GB':
106
+ case 'en_US':
107
+ default:
108
+ $urlLang = 'en/US';
109
+ break;
110
+ }
111
+
112
+ $html = '<center><button type="button" title="MasterPass"
113
+ class="btn-hcdmpa-payment-data" style="position: static"
114
+ onclick="window.open(\'https://www.mastercard.com/mc_us/wallet/learnmore/'.$urlLang.'\')">
115
+ </button>
116
+ <div sytle="margin-top: 10px !important;">';
117
+
118
+ $html .= (array_key_exists('CONTACT_EMAIL', $paymentData))
119
+ ? $paymentData['CONTACT_EMAIL'].'<br />' : '';
120
+ $html .= (array_key_exists('ACCOUNT_BRAND', $paymentData))
121
+ ? $this->_getHelper()->__($paymentData['ACCOUNT_BRAND']).' ' : '';
122
+ $html .= (array_key_exists('ACCOUNT_NUMBER', $paymentData))
123
+ ? $paymentData['ACCOUNT_NUMBER'].'<br/>' : '';
124
+ $html .= (array_key_exists('ACCOUNT_EXPIRY_MONTH', $paymentData))
125
+ ? $this->_getHelper()->__('Expires').' '.$paymentData['ACCOUNT_EXPIRY_MONTH'].'/' : '';
126
+ $html .= (array_key_exists('ACCOUNT_EXPIRY_YEAR', $paymentData))
127
+ ? $paymentData['ACCOUNT_EXPIRY_YEAR'] : '';
128
+
129
+ $html .= '</div></center>';
130
+
131
+ $this->getCheckout()->setHcdPaymentInfo($html);
132
+ }
133
+
134
+ /**
135
+ * @inheritdoc
136
+ */
137
+ public function chargeBack($order, $message = "")
138
+ {
139
+ $message = Mage::helper('hcd')->__('chargeback');
140
+ return parent::chargeBack($order, $message);
141
+ }
142
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpal.php CHANGED
@@ -1,40 +1,65 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdpal extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdpal';
10
- protected $_canCapture = true;
11
- protected $_canCapturePartial = true;
12
-
13
-
14
- /*
15
- * PayPal seller protection, need shipping adress instead of billing (PAYPAL REV 20141215)
16
- */
17
- public function getUser($order, $isReg=false) {
18
-
19
- $user = array();
20
-
21
- $user = parent::getUser($order, $isReg);
22
- $adress = ($order->getShippingAddress() == false) ? $order->getBillingAddress() : $order->getShippingAddress() ;
23
- $email = ($adress->getEmail()) ? $adress->getEmail() : $order->getCustomerEmail();
24
-
25
-
26
- $user['IDENTIFICATION.SHOPPERID'] = $adress->getCustomerId();
27
- if ($adress->getCompany() == true) $user['NAME.COMPANY'] = trim($adress->getCompany());
28
- $user['NAME.GIVEN'] = trim($adress->getFirstname());
29
- $user['NAME.FAMILY'] = trim($adress->getLastname());
30
- $user['ADDRESS.STREET'] = $adress->getStreet1()." ".$adress->getStreet2();
31
- $user['ADDRESS.ZIP'] = $adress->getPostcode();
32
- $user['ADDRESS.CITY'] = $adress->getCity();
33
- $user['ADDRESS.COUNTRY'] = $adress->getCountry();
34
- $user['CONTACT.EMAIL'] = $email;
35
-
36
- return $user;
37
- }
38
-
39
- }
40
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * PayPal payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdpal extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ /**
20
+ * unique internal payment method identifier
21
+ *
22
+ * @var string [a-z0-9_]
23
+ **/
24
+ protected $_code = 'hcdpal';
25
+ protected $_canCapture = true;
26
+ protected $_canCapturePartial = true;
27
+
28
+ /*
29
+ * PayPal seller protection, need shipping adress instead of billing (PAYPAL REV 20141215)
30
+ */
31
+ public function getUser($order, $isReg=false)
32
+ {
33
+ $user = array();
34
+
35
+ $user = parent::getUser($order, $isReg);
36
+ $adress = ($order->getShippingAddress() == false)
37
+ ? $order->getBillingAddress() : $order->getShippingAddress();
38
+ $email = ($adress->getEmail()) ? $adress->getEmail() : $order->getCustomerEmail();
39
+
40
+
41
+ $user['IDENTIFICATION.SHOPPERID'] = $adress->getCustomerId();
42
+ if ($adress->getCompany() == true) {
43
+ $user['NAME.COMPANY'] = trim($adress->getCompany());
44
+ }
45
+
46
+ $user['NAME.GIVEN'] = trim($adress->getFirstname());
47
+ $user['NAME.FAMILY'] = trim($adress->getLastname());
48
+ $user['ADDRESS.STREET'] = $adress->getStreet1()." ".$adress->getStreet2();
49
+ $user['ADDRESS.ZIP'] = $adress->getPostcode();
50
+ $user['ADDRESS.CITY'] = $adress->getCity();
51
+ $user['ADDRESS.COUNTRY'] = $adress->getCountry();
52
+ $user['CONTACT.EMAIL'] = $email;
53
+
54
+ return $user;
55
+ }
56
+
57
+ /**
58
+ * @inheritdoc
59
+ */
60
+ public function chargeBack($order, $message = "")
61
+ {
62
+ $message = Mage::helper('hcd')->__('chargeback');
63
+ return parent::chargeBack($order, $message);
64
+ }
65
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpf.php CHANGED
@@ -1,35 +1,56 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdpf extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdpf';
5
- protected $_canRefund = false;
6
- protected $_canRefundInvoicePartial = false;
7
- protected $_formBlockType = 'hcd/form_postfinance';
8
-
9
- public function getFormBlockType(){
10
- return $this->_formBlockType;
11
- }
12
-
13
- public function isAvailable($quote=null) {
14
- $currency_code=$this->getQuote()->getQuoteCurrencyCode();
15
- if (!empty($currency_code) && $currency_code != 'CHF') return false;
16
- return parent::isAvailable($quote);
17
- }
18
-
19
- public function validate(){
20
- parent::validate();
21
- $payment = Mage::app()->getRequest()->getPOST('payment');
22
-
23
-
24
- if(empty($payment[$this->_code.'_pf'])) {
25
- $errorCode = 'invalid_data';
26
- $errorMsg = $this->_getHelper()->__('No Postfinance method selected');
27
- Mage::throwException($errorMsg);
28
- return $this;
29
- }
30
-
31
- $this->saveCustomerData(array('ACCOUNT.BRAND' => $payment[$this->_code.'_pf']));
32
-
33
- return $this;
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Postfinance payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdpf extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcdpf';
20
+ protected $_canRefund = false;
21
+ protected $_canRefundInvoicePartial = false;
22
+ protected $_formBlockType = 'hcd/form_postfinance';
23
+
24
+ public function getFormBlockType()
25
+ {
26
+ return $this->_formBlockType;
27
+ }
28
+
29
+ public function isAvailable($quote=null)
30
+ {
31
+ $currencyCode=$this->getQuote()->getQuoteCurrencyCode();
32
+ if (!empty($currencyCode) && $currencyCode != 'CHF') {
33
+ return false;
34
+ }
35
+
36
+ return parent::isAvailable($quote);
37
+ }
38
+
39
+ public function validate()
40
+ {
41
+ parent::validate();
42
+ $payment = Mage::app()->getRequest()->getPOST('payment');
43
+
44
+
45
+ if (empty($payment[$this->_code.'_pf'])) {
46
+ $errorCode = 'invalid_data';
47
+ $errorMsg = $this->_getHelper()->__('No Postfinance method selected');
48
+ Mage::throwException($errorMsg);
49
+ return $this;
50
+ }
51
+
52
+ $this->saveCustomerData(array('ACCOUNT.BRAND' => $payment[$this->_code.'_pf']));
53
+
54
+ return $this;
55
+ }
56
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpp.php CHANGED
@@ -1,28 +1,183 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdpp extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- protected $_code = 'hcdpp';
5
-
6
-
7
- public function showPaymentInfo($payment_data) {
8
-
9
- $load_snippet = $this->_getHelper()->__("Prepayment Info Text");
10
-
11
- $repl = array(
12
- '{AMOUNT}' => $payment_data['CLEARING_AMOUNT'],
13
- '{CURRENCY}' => $payment_data['CLEARING_CURRENCY'],
14
- '{CONNECTOR_ACCOUNT_HOLDER}' => $payment_data['CONNECTOR_ACCOUNT_HOLDER'],
15
- '{CONNECTOR_ACCOUNT_IBAN}' => $payment_data['CONNECTOR_ACCOUNT_IBAN'],
16
- '{CONNECTOR_ACCOUNT_BIC}' => $payment_data['CONNECTOR_ACCOUNT_BIC'],
17
- '{IDENTIFICATION_SHORTID}' => $payment_data['IDENTIFICATION_SHORTID'],
18
- );
19
-
20
- $load_snippet= strtr( $load_snippet , $repl);
21
-
22
- return $load_snippet;
23
-
24
-
25
- }
26
-
27
- }
28
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Prepayment payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Payment_Hcdpp extends HeidelpayCD_Edition_Model_Payment_Abstract
18
+ {
19
+ protected $_code = 'hcdpp';
20
+
21
+ protected $_infoBlockType = 'hcd/info_prepayment';
22
+
23
+ public function showPaymentInfo($paymentData)
24
+ {
25
+ $loadSnippet = $this->_getHelper()->__("Prepayment Info Text");
26
+
27
+ $repl = array(
28
+ '{AMOUNT}' => $paymentData['CLEARING_AMOUNT'],
29
+ '{CURRENCY}' => $paymentData['CLEARING_CURRENCY'],
30
+ '{CONNECTOR_ACCOUNT_HOLDER}' => $paymentData['CONNECTOR_ACCOUNT_HOLDER'],
31
+ '{CONNECTOR_ACCOUNT_IBAN}' => $paymentData['CONNECTOR_ACCOUNT_IBAN'],
32
+ '{IDENTIFICATION_SHORTID}' => $paymentData['IDENTIFICATION_SHORTID'],
33
+ );
34
+
35
+ $loadSnippet= strtr($loadSnippet, $repl);
36
+
37
+ return $loadSnippet;
38
+ }
39
+
40
+ /**
41
+ * Handle transaction with means pending
42
+ *
43
+ * @param $order Mage_Sales_Model_Order
44
+ * @param $data HeidelpayCD_Edition_Model_Transaction
45
+ * @param $message string order history message
46
+ *
47
+ * @return Mage_Sales_Model_Order
48
+ */
49
+ public function pendingTransaction($order, $data, $message = '')
50
+ {
51
+ $message = 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] . ' ' . $message;
52
+
53
+ $order->getPayment()
54
+ ->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
55
+ ->setParentTransactionId($order->getPayment()->getLastTransId())
56
+ ->setIsTransactionClosed(false);
57
+
58
+ $invoice = $order->prepareInvoice();
59
+ $invoice->register();
60
+ $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
61
+ $order->setIsInProcess(true);
62
+ $invoice->setIsPaid(false);
63
+ $order->addStatusHistoryComment(
64
+ Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
65
+ false
66
+ );
67
+ $invoice->save();
68
+ if ($this->_invoiceOrderEmail) {
69
+ $code = $order->getPayment()->getMethodInstance()->getCode();
70
+ if ($code == 'hcdiv' or $code == 'hcdivsec') {
71
+ $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
72
+ $invoiceMailComment = ($info === false) ? '' : '<h3>'
73
+ . $this->_getHelper()->__('payment information') . '</h3><p>' . $info . '</p>';
74
+ }
75
+
76
+ $invoice->sendEmail(true, $invoiceMailComment); // send invoice mail
77
+ }
78
+
79
+
80
+ $transactionSave = Mage::getModel('core/resource_transaction')
81
+ ->addObject($invoice)
82
+ ->addObject($invoice->getOrder());
83
+ $transactionSave->save();
84
+
85
+ $this->log('Set transaction to processed and generate invoice ');
86
+ $order->setState(
87
+ $order->getPayment()->getMethodInstance()->getStatusPendig(false),
88
+ $order->getPayment()->getMethodInstance()->getStatusPendig(true),
89
+ $message
90
+ );
91
+
92
+ $order->getPayment()->addTransaction(
93
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
94
+ null,
95
+ true,
96
+ $message
97
+ );
98
+
99
+ return $order;
100
+ }
101
+
102
+ /**
103
+ * Handle transaction with means processing
104
+ *
105
+ * @param $order Mage_Sales_Model_Order
106
+ * @param $data HeidelpayCD_Edition_Model_Transaction
107
+ * @param $message string order history message
108
+ *
109
+ * @return Mage_Sales_Model_Order
110
+ */
111
+ public function processingTransaction($order, $data, $message = '')
112
+ {
113
+
114
+ /** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
115
+ $paymentHelper = Mage::helper('hcd/payment');
116
+
117
+
118
+ $message = ($message === '') ? 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] : $message;
119
+ $totallyPaid = false;
120
+
121
+ $order->getPayment()
122
+ ->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
123
+ ->setParentTransactionId($order->getPayment()->getLastTransId())
124
+ ->setIsTransactionClosed(true);
125
+
126
+ if ($paymentHelper->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and
127
+ $order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']
128
+ ) {
129
+ $order->setState(
130
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(false),
131
+ $order->getPayment()->getMethodInstance()->getStatusSuccess(true),
132
+ $message
133
+ );
134
+ $totallyPaid = true;
135
+ } else {
136
+ // in case rc is ack and amount is to low or currency miss match
137
+
138
+ $order->setState(
139
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
140
+ $order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
141
+ $message
142
+ );
143
+ }
144
+
145
+ // Set invoice to paid when the total amount matches
146
+ if ($order->hasInvoices() and $totallyPaid) {
147
+
148
+ /** @var $invoice Mage_Sales_Model_Order_Invoice */
149
+ foreach ($order->getInvoiceCollection() as $invoice) {
150
+ $this->log('Set invoice ' . (string)$invoice->getIncrementId() . ' to paid.');
151
+ $invoice
152
+ ->capture()
153
+ ->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)
154
+ ->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE)
155
+ ->setIsPaid(true)
156
+ // @codingStandardsIgnoreLine use of save in a loop
157
+ ->save();
158
+
159
+ $transactionSave = Mage::getModel('core/resource_transaction')
160
+ ->addObject($invoice)
161
+ ->addObject($invoice->getOrder());
162
+ // @codingStandardsIgnoreLine use of save in a loop
163
+ $transactionSave->save();
164
+ }
165
+ }
166
+
167
+ // Set total paid and invoice to the connector amount
168
+ $order->setTotalInvoiced($data['PRESENTATION_AMOUNT']);
169
+ $order->setTotalPaid($data['PRESENTATION_AMOUNT']);
170
+
171
+
172
+ $order->getPayment()->addTransaction(
173
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
174
+ null,
175
+ true,
176
+ $message
177
+ );
178
+
179
+ $order->setIsInProcess(true);
180
+
181
+ return $order;
182
+ }
183
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdsu.php CHANGED
@@ -1,14 +1,33 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdsu extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdsu';
10
- protected $_canRefund = false;
11
- protected $_canRefundInvoicePartial = false;
12
-
13
- }
14
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Sofort payment method
4
+ *
5
+ * Also called "Sofortüberweisung" in germany.
6
+ *
7
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
8
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
9
+ *
10
+ * @link https://dev.heidelpay.de/magento
11
+ *
12
+ * @author Jens Richter
13
+ *
14
+ * @package Heidelpay
15
+ * @subpackage Magento
16
+ * @category Magento
17
+ */
18
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
19
+ class HeidelpayCD_Edition_Model_Payment_Hcdsu extends HeidelpayCD_Edition_Model_Payment_Abstract
20
+ {
21
+ protected $_code = 'hcdsu';
22
+ protected $_canRefund = true;
23
+ protected $_canRefundInvoicePartial = true;
24
+
25
+ /**
26
+ * @inheritdoc
27
+ */
28
+ public function chargeBack($order, $message = "")
29
+ {
30
+ $message = Mage::helper('hcd')->__('chargeback');
31
+ return parent::chargeBack($order, $message);
32
+ }
33
+ }
app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdyt.php CHANGED
@@ -1,14 +1,24 @@
1
- <?php
2
- class HeidelpayCD_Edition_Model_Payment_Hcdyt extends HeidelpayCD_Edition_Model_Payment_Abstract
3
- {
4
- /**
5
- * unique internal payment method identifier
6
- *
7
- * @var string [a-z0-9_]
8
- **/
9
- protected $_code = 'hcdyt';
10
- protected $_canRefund = false;
11
- protected $_canRefundInvoicePartial = false;
12
-
13
- }
14
-
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Yapital payment method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ *
16
+ * @deprecated This payment method is not longer available
17
+ */
18
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
19
+ class HeidelpayCD_Edition_Model_Payment_Hcdyt extends HeidelpayCD_Edition_Model_Payment_Abstract
20
+ {
21
+ protected $_code = 'hcdyt';
22
+ protected $_canRefund = false;
23
+ protected $_canRefundInvoicePartial = false;
24
+ }
app/code/community/HeidelpayCD/Edition/Model/Resource/Encryption.php CHANGED
@@ -1,20 +1,39 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Resource_Encryption extends Mage_Core_Model_Encryption {
4
-
5
- public function hash($data) {
6
- return hash('sha256', $data);
7
- }
8
-
9
- public function getHash($string, $salt = false) {
10
-
11
- if ($salt === false) {
12
- $salt = (string)Mage::getConfig()->getNode('global/crypt/key');
13
- }
14
- return $this->hash( $salt.(string)$string ) ;
15
- }
16
-
17
- public function validateHash($string, $hash) {
18
- return $this->getHash((string)$string) === $hash;
19
- }
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Heidelpay encryption model
4
+ *
5
+ * replace the magento md5 hashing with sha256
6
+ *
7
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
8
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
9
+ *
10
+ * @link https://dev.heidelpay.de/magento
11
+ *
12
+ * @author Jens Richter
13
+ *
14
+ * @package Heidelpay
15
+ * @subpackage Magento
16
+ * @category Magento
17
+ */
18
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
19
+ class HeidelpayCD_Edition_Model_Resource_Encryption extends Mage_Core_Model_Encryption
20
+ {
21
+ public function hash($data)
22
+ {
23
+ return hash('sha256', $data);
24
+ }
25
+
26
+ public function getHash($string, $salt = false)
27
+ {
28
+ if ($salt === false) {
29
+ $salt = (string)Mage::getConfig()->getNode('global/crypt/key');
30
+ }
31
+
32
+ return $this->hash($salt.(string)$string);
33
+ }
34
+
35
+ public function validateHash($string, $hash)
36
+ {
37
+ return $this->getHash((string)$string) === $hash;
38
+ }
39
+ }
app/code/community/HeidelpayCD/Edition/Model/Resource/Setup.php CHANGED
@@ -1,6 +1,19 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Modul_Resource_Setup extends Mage_Core_Model_Resource_Setup
4
- {
5
-
6
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * heidelpay resource model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Modul_Resource_Setup extends Mage_Core_Model_Resource_Setup
18
+ {
19
+ }
app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Bookingmode.php CHANGED
@@ -1,12 +1,31 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_System_Config_Source_Bookingmode
4
- {
5
- public function toOptionArray()
6
- {
7
- return array(
8
- array('value'=>'DB', 'label'=>Mage::helper('hcd')->__('Direct Booking')),
9
- array('value'=>'PA', 'label'=>Mage::helper('hcd')->__('Preauthorisation'))
10
- );
11
- }
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Booking mode configuration model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine
17
+ class HeidelpayCD_Edition_Model_System_Config_Source_Bookingmode
18
+ {
19
+ /**
20
+ * returns the available booking modes for backend configuration
21
+ *
22
+ * @return array
23
+ */
24
+ public function toOptionArray()
25
+ {
26
+ return array(
27
+ array('value'=>'DB', 'label'=>Mage::helper('hcd')->__('Direct Booking')),
28
+ array('value'=>'PA', 'label'=>Mage::helper('hcd')->__('Preauthorisation'))
29
+ );
30
+ }
31
+ }
app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Recognition.php CHANGED
@@ -1,15 +1,32 @@
1
-
2
-
3
- <?php
4
-
5
- class HeidelpayCD_Edition_Model_System_Config_Source_Recognition
6
- {
7
- public function toOptionArray()
8
- {
9
- return array(
10
- array('value'=>'0', 'label'=>Mage::helper('hcd')->__('no recognition')),
11
- array('value'=>'1', 'label'=>Mage::helper('hcd')->__('only if shippping adress is unchanged')),
12
- array('value'=>'2', 'label'=>Mage::helper('hcd')->__('always'))
13
- );
14
- }
15
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recognition configuration model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine
17
+ class HeidelpayCD_Edition_Model_System_Config_Source_Recognition
18
+ {
19
+ /**
20
+ * Returns the recognition configuration option for the backend
21
+ *
22
+ * @return array
23
+ */
24
+ public function toOptionArray()
25
+ {
26
+ return array(
27
+ array('value'=>'0', 'label'=>Mage::helper('hcd')->__('no recognition')),
28
+ array('value'=>'1', 'label'=>Mage::helper('hcd')->__('only if shippping adress is unchanged')),
29
+ array('value'=>'2', 'label'=>Mage::helper('hcd')->__('always'))
30
+ );
31
+ }
32
+ }
app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Returnurl.php CHANGED
@@ -1,13 +1,31 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_System_Config_Source_Returnurl
4
- {
5
- public function toOptionArray()
6
- {
7
- return array(
8
- array('value'=>'basket', 'label'=>Mage::helper('hcd')->__('Basket')),
9
- array('value'=>'onepage', 'label'=>Mage::helper('hcd')->__('Onepage Checkout')),
10
- // array('value'=>'onestepcheckout', 'label'=>Mage::helper('hcd')->__('Onestep Checkout'))
11
- );
12
- }
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Return url configuration model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine
17
+ class HeidelpayCD_Edition_Model_System_Config_Source_Returnurl
18
+ {
19
+ /**
20
+ * Return the configuration option for the return urk in case of a payment error
21
+ *
22
+ * @return array currently you can choose between basket and checkout page
23
+ */
24
+ public function toOptionArray()
25
+ {
26
+ return array(
27
+ array('value'=>'basket', 'label'=>Mage::helper('hcd')->__('Basket')),
28
+ array('value'=>'onepage', 'label'=>Mage::helper('hcd')->__('Onepage Checkout')),
29
+ );
30
+ }
31
+ }
app/code/community/HeidelpayCD/Edition/Model/Transaction.php CHANGED
@@ -1,111 +1,130 @@
1
- <?php
2
-
3
- class HeidelpayCD_Edition_Model_Transaction extends Mage_Core_Model_Abstract
4
- {
5
- public function _construct()
6
- {
7
- $this->_init('hcd/transaction');
8
- parent::_construct();
9
- }
10
-
11
- public function saveTransactionData($data, $source='shop') {
12
-
13
- $PaymentCode = Mage::helper('hcd/payment')->splitPaymentCode($data['PAYMENT_CODE']);
14
-
15
- $this->setPaymentMethode($PaymentCode[0]);
16
- $this->setPaymentType($PaymentCode[1]);
17
- $this->setTransactionid($data['IDENTIFICATION_TRANSACTIONID']);
18
- $this->setUniqeid($data['IDENTIFICATION_UNIQUEID']);
19
- $this->setResult($data['PROCESSING_RESULT']);
20
- $this->setShortid($data['IDENTIFICATION_SHORTID']);
21
- $this->setStatuscode($data['PROCESSING_STATUS_CODE']);
22
- $this->setReturn($data['PROCESSING_RETURN']);
23
- $this->setReturncode($data['PROCESSING_RETURN_CODE']);
24
- $this->setJsonresponse(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
25
- $this->setDatetime(date('Y-m-d H:i:s'));
26
- $this->setSource($source);
27
- return $this->save();
28
-
29
- }
30
-
31
- public function loadTransactionDataByX($filter=array(),$sortby=false) {
32
-
33
- $data = array();
34
- $trans = $this->getCollection();
35
-
36
- foreach($filter AS $k => $v)
37
- $trans->addFieldToFilter($k,$v);
38
-
39
- if ($sortby) {
40
- $trans->getSelect()->order($sortby);
41
- }
42
-
43
- $trans->load();
44
-
45
-
46
-
47
- $data = $trans->getData();
48
- $temp = array();
49
- foreach($data AS $k => $v) {
50
- $temp[] = json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[$k]['jsonresponse']),true);
51
- }
52
-
53
- return $temp;
54
- }
55
-
56
- public function loadLastTransactionDataByTransactionnr($transid) {
57
-
58
- $data = array();
59
- $trans = $this->getCollection();
60
- $trans->addFieldToFilter('transactionid',$transid);
61
- $trans->getSelect()->order('id DESC');
62
- $trans->getSelect()->limit(1);
63
- $trans->load();
64
-
65
-
66
- $data = $trans->getData();
67
- return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']),true);
68
-
69
- }
70
-
71
- public function loadLastTransactionDataByUniqeId($id) {
72
-
73
- $data = array();
74
- $trans = $this->getCollection();
75
- $trans->addFieldToFilter('uniqeid',$id);
76
- $trans->getSelect()->limit(1);
77
- $trans->load();
78
-
79
-
80
- $data = $trans->getData();
81
- if (isset($data[0])){
82
- return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']),true);
83
- } else {
84
-
85
- return false;
86
- }
87
- }
88
-
89
- public function getOneTransactionByMethode($transid , $methode) {
90
-
91
- $data = false;
92
- $trans = $this->getCollection();
93
- $trans->addFieldToFilter('transactionid',$transid)
94
- ->addFieldToFilter('Payment_Type', $methode );;
95
- $trans->getSelect()->order('id DESC');
96
- $trans->getSelect()->limit(1);
97
- $trans->load();
98
-
99
-
100
- $data = $trans->getData();
101
-
102
- if (isset($data[0])){
103
- return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']),true);
104
- } else {
105
-
106
- return false;
107
- }
108
-
109
- }
110
-
111
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Transaction model
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_Model_Transaction extends Mage_Core_Model_Abstract
18
+ {
19
+ public function _construct()
20
+ {
21
+ $this->_init('hcd/transaction');
22
+ parent::_construct();
23
+ }
24
+
25
+ public function saveTransactionData($data, $source='shop')
26
+ {
27
+ $paymentCode = Mage::helper('hcd/payment')->splitPaymentCode($data['PAYMENT_CODE']);
28
+
29
+ $this->setPaymentMethode($paymentCode[0]);
30
+ $this->setPaymentType($paymentCode[1]);
31
+ $this->setTransactionid($data['IDENTIFICATION_TRANSACTIONID']);
32
+ $this->setUniqeid($data['IDENTIFICATION_UNIQUEID']);
33
+ $this->setResult($data['PROCESSING_RESULT']);
34
+ $this->setShortid($data['IDENTIFICATION_SHORTID']);
35
+ $this->setStatuscode($data['PROCESSING_STATUS_CODE']);
36
+ $this->setReturn($data['PROCESSING_RETURN']);
37
+ $this->setReturncode($data['PROCESSING_RETURN_CODE']);
38
+ $this->setJsonresponse(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
39
+ // @codingStandardsIgnoreLine should be refactored - issue #2
40
+ $this->setDatetime(date('Y-m-d H:i:s'));
41
+ $this->setSource($source);
42
+ return $this->save();
43
+ }
44
+
45
+ public function loadTransactionDataByX($filter=array(), $sortby=false)
46
+ {
47
+ $data = array();
48
+ $trans = $this->getCollection();
49
+
50
+ foreach ($filter as $k => $v) {
51
+ $trans->addFieldToFilter($k, $v);
52
+ }
53
+
54
+ if ($sortby) {
55
+ $trans->getSelect()->order($sortby);
56
+ }
57
+
58
+ $trans->load();
59
+
60
+
61
+
62
+ $data = $trans->getData();
63
+ $temp = array();
64
+ foreach ($data as $k => $v) {
65
+ $temp[] = json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[$k]['jsonresponse']), true);
66
+ }
67
+
68
+ return $temp;
69
+ }
70
+
71
+ public function loadLastTransactionDataByTransactionnr($transid)
72
+ {
73
+ $data = array();
74
+ $trans = $this->getCollection();
75
+ $trans->addFieldToFilter('transactionid', $transid);
76
+ $trans->getSelect()->order('id DESC');
77
+ // @codingStandardsIgnoreLine
78
+ $trans->getSelect()->limit(1);
79
+ $trans->load();
80
+
81
+
82
+ $data = $trans->getData();
83
+
84
+ // @codingStandardsIgnoreLine seem to be a bug in marketplace ready
85
+ if (is_array($data)) {
86
+ return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']), true);
87
+ }
88
+
89
+ return false;
90
+ }
91
+
92
+ public function loadLastTransactionDataByUniqeId($id)
93
+ {
94
+ $data = array();
95
+ $trans = $this->getCollection();
96
+ $trans->addFieldToFilter('uniqeid', $id);
97
+ // @codingStandardsIgnoreLine should be refactored - issue #6
98
+ $trans->getSelect()->limit(1);
99
+ $trans->load();
100
+
101
+
102
+ $data = $trans->getData();
103
+ if (isset($data[0])) {
104
+ return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']), true);
105
+ } else {
106
+ return false;
107
+ }
108
+ }
109
+
110
+ public function getOneTransactionByMethode($transid, $methode)
111
+ {
112
+ $data = false;
113
+ $trans = $this->getCollection();
114
+ $trans->addFieldToFilter('transactionid', $transid)
115
+ ->addFieldToFilter('Payment_Type', $methode);
116
+ $trans->getSelect()->order('id DESC');
117
+ // @codingStandardsIgnoreLine should be refactored - issue #6
118
+ $trans->getSelect()->limit(1);
119
+ $trans->load();
120
+
121
+
122
+ $data = $trans->getData();
123
+
124
+ if (isset($data[0])) {
125
+ return json_decode(Mage::getModel('hcd/resource_encryption')->decrypt($data[0]['jsonresponse']), true);
126
+ } else {
127
+ return false;
128
+ }
129
+ }
130
+ }
app/code/community/HeidelpayCD/Edition/controllers/.IndexController.php.swp DELETED
Binary file
app/code/community/HeidelpayCD/Edition/controllers/CheckoutController.php CHANGED
@@ -1,268 +1,288 @@
1
- <?php
2
-
3
- /*
4
- * Wallet Express Checkout
5
- */
6
-
7
- $module_path = Mage::getModuleDir('', 'Mage_Checkout');
8
- require_once ($module_path."/controllers/OnepageController.php");
9
-
10
- class HeidelpayCD_Edition_CheckoutController extends Mage_Checkout_OnepageController {
11
-
12
- public function indexAction() {
13
-
14
- $session = Mage::getSingleton('checkout/session');
15
- $checkout = $this->getOnepage();
16
- $quote = $session->getQuote();
17
-
18
- if (!$quote->hasItems() || $quote->getHasError()) {
19
- $this->_redirect('checkout/cart');
20
- return;
21
- }
22
-
23
-
24
- $data = false;
25
- $this->loadLayout();
26
- $this->getLayout()->getBlock('head')->setTitle($this->__('MasterPass Checkout'));
27
-
28
- $session->setCurrency($quote->getGlobalCurrencyCode());
29
- $session->setTotalamount($quote->getGrandTotal());
30
-
31
- $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByTransactionnr(Mage::getSingleton('checkout/session')->getQuoteId());
32
-
33
- Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
34
- Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_secure' => true)));
35
- $this->getOnepage()->initCheckout();
36
-
37
-
38
- $this->log('Data from wallet '.print_r($data,1));
39
-
40
-
41
-
42
- $this->getOnepage()->saveCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_GUEST);
43
-
44
- $this->getOnepage()->getCheckout()->setStepData('login', 'complete', true);
45
-
46
- $region = Mage::helper('hcd/payment')->getRegion($data['ADDRESS_COUNTRY'],$data['ADDRESS_STATE']);
47
-
48
- $billingAddress = Array(
49
- "address_id" => '',
50
- "firstname" => trim($data['NAME_GIVEN']),
51
- "lastname" => trim($data['NAME_FAMILY']),
52
- "company" => '',
53
- "email" => trim($data['CONTACT_EMAIL']),
54
- "street" => array(
55
- "0" => $data['ADDRESS_STREET'],
56
- "1" => '',
57
- ),
58
- "region_id" =>(string) $region,
59
- "region" => $data['ADDRESS_STATE'],
60
- "city" => $data['ADDRESS_CITY'],
61
- "postcode" => $data['ADDRESS_ZIP'],
62
- "country_id" => $data['ADDRESS_COUNTRY'],
63
- "telephone" => preg_replace('/[A-z]-/', '',$data['CONTACT_PHONE']),
64
- "customer_password" =>"",
65
- "confirm_password" =>"",
66
- "save_in_address_book" => 1
67
- );
68
-
69
- $this->log('adress'.print_r($billingAddress,1));
70
-
71
- $hpdata = array(
72
- 'code' => 'hcdmpa',
73
- 'brand' => (array_key_exists('ACCOUNT_BRAND', $data)) ? $data['ACCOUNT_BRAND'] : false ,
74
- 'mail' => (array_key_exists('CONTACT_EMAIL', $data)) ? $data['CONTACT_EMAIL'] : false ,
75
- 'number' => (array_key_exists('ACCOUNT_NUMBER', $data)) ? $data['ACCOUNT_NUMBER'] : false ,
76
- 'expiryMonth' => (array_key_exists('ACCOUNT_EXPIRY_MONTH', $data)) ? $data['ACCOUNT_EXPIRY_MONTH'] : false ,
77
- 'expiryYear' => (array_key_exists('ACCOUNT_EXPIRY_YEAR', $data)) ? $data['ACCOUNT_EXPIRY_YEAR'] : false ,
78
- 'referenceId' => (array_key_exists('IDENTIFICATION_UNIQUEID', $data)) ? $data['IDENTIFICATION_UNIQUEID'] : false ,
79
- 'adress' => $billingAddress
80
- );
81
-
82
- $session->setHcdWallet($hpdata);
83
-
84
-
85
- $customAddress = Mage::getModel('customer/address');
86
- $customAddress->setData($billingAddress);
87
-
88
- $quote->setBillingAddress(Mage::getSingleton('sales/quote_address')
89
- ->importCustomerAddress($customAddress));
90
-
91
- $quote->setShippingAddress(Mage::getSingleton('sales/quote_address')
92
- ->importCustomerAddress($customAddress));
93
-
94
- $this->getOnepage()->getQuote()->collectTotals()->save();
95
-
96
-
97
- $this->getOnepage()->getCheckout()->setStepData('billing', 'complete', true);
98
- $this->getOnepage()->getCheckout()->setStepData('shipping', 'allow', true);
99
-
100
- $this->getOnepage()->getCheckout()->setStepData('shipping', 'complete', true);
101
- $this->getOnepage()->getCheckout()->setStepData('payment', 'allow', true);
102
- $this->getOnepage()->savePayment(array('method'=>'hcdmpa'));
103
-
104
-
105
-
106
- $this->renderLayout();
107
-
108
- }
109
-
110
- public function saveBillingAction()
111
- {
112
- if ($this->_expireAjax()) {
113
- return;
114
- }
115
- if ($this->getRequest()->isPost()) {
116
-
117
- $data = $this->getRequest()->getPost('billing', array());
118
- $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
119
-
120
- if (isset($data['email'])) {
121
- $data['email'] = trim($data['email']);
122
- }
123
- $result = $this->getOnepage()->saveBilling($data, $customerAddressId);
124
-
125
-
126
- if (!isset($result['error'])) {
127
- if ($this->getOnepage()->getQuote()->isVirtual()) {
128
- $result['goto_section'] = 'payment';
129
- $result['update_section'] = array(
130
- 'name' => 'payment-method',
131
- 'html' => $this->_getPaymentMethodsHtml()
132
- );
133
-
134
- } else {
135
-
136
- $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
137
-
138
- $result = $this->getOnepage()->saveShipping($wallet['adress'], false);
139
- $this->getOnepage()->getCheckout()->setStepData('shipping', 'allow', true)
140
- ->setStepData('shipping', 'complete', true);
141
-
142
- if (!isset($result['error'])) {
143
- $result['goto_section'] = 'shipping_method';
144
- $result['update_section'] = array(
145
- 'name' => 'shipping-method',
146
- 'html' => $this->_getShippingMethodsHtml()
147
- );
148
- }
149
- }
150
- }
151
-
152
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
153
- }
154
- }
155
-
156
- public function savePayment($data)
157
- {
158
- try {
159
- $result = $this->getOnepage()->savePayment($data);
160
-
161
-
162
- $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
163
- if (empty($result['error']) && !$redirectUrl) {
164
- $this->loadLayout('checkout_onepage_review');
165
- $result['goto_section'] = 'review';
166
- $result['update_section'] = array(
167
- 'name' => 'review',
168
- 'html' => $this->_getReviewHtml()
169
- );
170
- }
171
- if ($redirectUrl) {
172
- $result['redirect'] = $redirectUrl;
173
- }
174
- } catch (Mage_Payment_Exception $e) {
175
- if ($e->getFields()) {
176
- $result['fields'] = $e->getFields();
177
- }
178
- $result['error'] = $e->getMessage();
179
- } catch (Mage_Core_Exception $e) {
180
- $result['error'] = $e->getMessage();
181
- } catch (Exception $e) {
182
- Mage::logException($e);
183
- $result['error'] = $this->__('Unable to set Payment Method.');
184
- }
185
- $this->getOnepage()->getCheckout()->setStepData('payment', 'complete', true);
186
- return $result ;
187
- }
188
-
189
-
190
- public function savePaymentAction()
191
- {
192
- if ($this->_expireAjax()) {
193
- return;
194
- }
195
- $result = $this->savePayment(array('method'=>'hcdmpa'));
196
-
197
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
198
- }
199
-
200
- protected function _getPaymentMethodsHtml()
201
- {
202
- $layout = $this->getLayout();
203
- $update = $layout->getUpdate();
204
- $update->load('hcd_checkout_paymentmethod');
205
- $layout->generateXml();
206
- $layout->generateBlocks();
207
- $output = $layout->getOutput();
208
- return $output;
209
- }
210
-
211
-
212
- public function saveShippingMethodAction()
213
- {
214
- if ($this->_expireAjax()) {
215
- return;
216
- }
217
- if ($this->getRequest()->isPost()) {
218
- $data = $this->getRequest()->getPost('shipping_method', '');
219
- $result = $this->getOnepage()->saveShippingMethod($data);
220
- // $result will contain error data if shipping method is empty
221
- if (!$result) {
222
- Mage::dispatchEvent(
223
- 'checkout_controller_onepage_save_shipping_method',
224
- array(
225
- 'request' => $this->getRequest(),
226
- 'quote' => $this->getOnepage()->getQuote()));
227
- $this->getOnepage()->getQuote()->collectTotals();
228
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
229
-
230
- $result['goto_section'] = 'payment';
231
- $result['update_section'] = array(
232
- 'name' => 'payment-method',
233
- 'html' => $this->_getPaymentMethodsHtml()
234
- );
235
- }
236
- $this->getOnepage()->getQuote()->collectTotals()->save();
237
- $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
238
- }
239
- }
240
-
241
-
242
- public function progressAction()
243
- {
244
- // previous step should never be null. We always start with billing and go forward
245
- $prevStep = $this->getRequest()->getParam('prevStep', false);
246
-
247
- if ($this->_expireAjax() || !$prevStep) {
248
- return null;
249
- }
250
-
251
- $layout = $this->getLayout();
252
- $update = $layout->getUpdate();
253
- /* Load the block belonging to the current step*/
254
- $update->load('hcd_checkout_progress_' . $prevStep);
255
- $layout->generateXml();
256
- $layout->generateBlocks();
257
- $output = $layout->getOutput();
258
- $this->getResponse()->setBody($output);
259
- return $output;
260
- }
261
-
262
-
263
- private function log($message, $level="DEBUG", $file=false) {
264
- $callers=debug_backtrace();
265
- return Mage::helper('hcd/payment')->realLog( $callers[1]['function'].' '.$message , $level , $file);
266
- }
267
-
268
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Checkout controller
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+
17
+ $modulePath = Mage::getModuleDir('', 'Mage_Checkout');
18
+ require_once($modulePath."/controllers/OnepageController.php");
19
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
20
+ class HeidelpayCD_Edition_CheckoutController extends Mage_Checkout_OnepageController
21
+ {
22
+ public function indexAction()
23
+ {
24
+ $session = Mage::getSingleton('checkout/session');
25
+ $checkout = $this->getOnepage();
26
+ $quote = $session->getQuote();
27
+
28
+ if (!$quote->hasItems() || $quote->getHasError()) {
29
+ $this->_redirect('checkout/cart');
30
+ return;
31
+ }
32
+
33
+
34
+ $data = false;
35
+ $this->loadLayout();
36
+ $this->getLayout()->getBlock('head')->setTitle($this->__('MasterPass Checkout'));
37
+
38
+ $session->setCurrency($quote->getGlobalCurrencyCode());
39
+ $session->setTotalamount($quote->getGrandTotal());
40
+
41
+ $data = Mage::getModel('hcd/transaction')
42
+ ->loadLastTransactionDataByTransactionnr(Mage::getSingleton('checkout/session')->getQuoteId());
43
+
44
+ Mage::getSingleton('checkout/session')->setCartWasUpdated(false);
45
+ Mage::getSingleton('customer/session')->setBeforeAuthUrl(Mage::getUrl('*/*/*', array('_secure' => true)));
46
+ $this->getOnepage()->initCheckout();
47
+
48
+
49
+ // @codingStandardsIgnoreLine should be refactored - issue #4
50
+ $this->log('Data from wallet '.print_r($data, 1));
51
+
52
+
53
+
54
+ $this->getOnepage()->saveCheckoutMethod(Mage_Checkout_Model_Type_Onepage::METHOD_GUEST);
55
+
56
+ $this->getOnepage()->getCheckout()->setStepData('login', 'complete', true);
57
+
58
+ $region = Mage::helper('hcd/payment')->getRegion($data['ADDRESS_COUNTRY'], $data['ADDRESS_STATE']);
59
+
60
+ $billingAddress = array(
61
+ "address_id" => '',
62
+ "firstname" => trim($data['NAME_GIVEN']),
63
+ "lastname" => trim($data['NAME_FAMILY']),
64
+ "company" => '',
65
+ "email" => trim($data['CONTACT_EMAIL']),
66
+ "street" => array(
67
+ "0" => $data['ADDRESS_STREET'],
68
+ "1" => '',
69
+ ),
70
+ "region_id" =>(string) $region,
71
+ "region" => $data['ADDRESS_STATE'],
72
+ "city" => $data['ADDRESS_CITY'],
73
+ "postcode" => $data['ADDRESS_ZIP'],
74
+ "country_id" => $data['ADDRESS_COUNTRY'],
75
+ "telephone" => preg_replace('/[A-z]-/', '', $data['CONTACT_PHONE']),
76
+ "customer_password" =>"",
77
+ "confirm_password" =>"",
78
+ "save_in_address_book" => 1
79
+ );
80
+ // @codingStandardsIgnoreLine should be refactored - issue #4
81
+ $this->log('adress'.print_r($billingAddress, 1));
82
+
83
+ $hpdata = array(
84
+ 'code' => 'hcdmpa',
85
+ 'brand' => (array_key_exists('ACCOUNT_BRAND', $data)) ? $data['ACCOUNT_BRAND'] : false ,
86
+ 'mail' => (array_key_exists('CONTACT_EMAIL', $data)) ? $data['CONTACT_EMAIL'] : false ,
87
+ 'number' => (array_key_exists('ACCOUNT_NUMBER', $data)) ? $data['ACCOUNT_NUMBER'] : false ,
88
+ 'expiryMonth' => (array_key_exists('ACCOUNT_EXPIRY_MONTH', $data))
89
+ ? $data['ACCOUNT_EXPIRY_MONTH'] : false ,
90
+ 'expiryYear' => (array_key_exists('ACCOUNT_EXPIRY_YEAR', $data))
91
+ ? $data['ACCOUNT_EXPIRY_YEAR'] : false ,
92
+ 'referenceId' => (array_key_exists('IDENTIFICATION_UNIQUEID', $data))
93
+ ? $data['IDENTIFICATION_UNIQUEID'] : false ,
94
+ 'adress' => $billingAddress
95
+ );
96
+
97
+ $session->setHcdWallet($hpdata);
98
+
99
+
100
+ $customAddress = Mage::getModel('customer/address');
101
+ $customAddress->setData($billingAddress);
102
+
103
+ $quote->setBillingAddress(
104
+ Mage::getSingleton('sales/quote_address')
105
+ ->importCustomerAddress($customAddress)
106
+ );
107
+
108
+ $quote->setShippingAddress(
109
+ Mage::getSingleton('sales/quote_address')
110
+ ->importCustomerAddress($customAddress)
111
+ );
112
+
113
+ $this->getOnepage()->getQuote()->collectTotals()->save();
114
+
115
+
116
+ $this->getOnepage()->getCheckout()->setStepData('billing', 'complete', true);
117
+ $this->getOnepage()->getCheckout()->setStepData('shipping', 'allow', true);
118
+
119
+ $this->getOnepage()->getCheckout()->setStepData('shipping', 'complete', true);
120
+ $this->getOnepage()->getCheckout()->setStepData('payment', 'allow', true);
121
+ $this->getOnepage()->savePayment(array('method'=>'hcdmpa'));
122
+
123
+
124
+
125
+ $this->renderLayout();
126
+ }
127
+
128
+ public function saveBillingAction()
129
+ {
130
+ if ($this->_expireAjax()) {
131
+ return;
132
+ }
133
+
134
+ if ($this->getRequest()->isPost()) {
135
+ $data = $this->getRequest()->getPost('billing', array());
136
+ $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
137
+
138
+ if (isset($data['email'])) {
139
+ $data['email'] = trim($data['email']);
140
+ }
141
+
142
+ $result = $this->getOnepage()->saveBilling($data, $customerAddressId);
143
+
144
+
145
+ if (!isset($result['error'])) {
146
+ if ($this->getOnepage()->getQuote()->isVirtual()) {
147
+ $result['goto_section'] = 'payment';
148
+ $result['update_section'] = array(
149
+ 'name' => 'payment-method',
150
+ 'html' => $this->_getPaymentMethodsHtml()
151
+ );
152
+ } else {
153
+ $wallet = Mage::getSingleton('checkout/session')->getHcdWallet();
154
+
155
+ $result = $this->getOnepage()->saveShipping($wallet['adress'], false);
156
+ $this->getOnepage()->getCheckout()->setStepData('shipping', 'allow', true)
157
+ ->setStepData('shipping', 'complete', true);
158
+
159
+ if (!isset($result['error'])) {
160
+ $result['goto_section'] = 'shipping_method';
161
+ $result['update_section'] = array(
162
+ 'name' => 'shipping-method',
163
+ 'html' => $this->_getShippingMethodsHtml()
164
+ );
165
+ }
166
+ }
167
+ }
168
+
169
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
170
+ }
171
+ }
172
+
173
+ public function savePayment($data)
174
+ {
175
+ try {
176
+ $result = $this->getOnepage()->savePayment($data);
177
+
178
+
179
+ $redirectUrl = $this->getOnepage()->getQuote()->getPayment()->getCheckoutRedirectUrl();
180
+ if (empty($result['error']) && !$redirectUrl) {
181
+ $this->loadLayout('checkout_onepage_review');
182
+ $result['goto_section'] = 'review';
183
+ $result['update_section'] = array(
184
+ 'name' => 'review',
185
+ 'html' => $this->_getReviewHtml()
186
+ );
187
+ }
188
+
189
+ if ($redirectUrl) {
190
+ $result['redirect'] = $redirectUrl;
191
+ }
192
+ } catch (Mage_Payment_Exception $e) {
193
+ if ($e->getFields()) {
194
+ $result['fields'] = $e->getFields();
195
+ }
196
+
197
+ $result['error'] = $e->getMessage();
198
+ } catch (Mage_Core_Exception $e) {
199
+ $result['error'] = $e->getMessage();
200
+ } catch (Exception $e) {
201
+ Mage::logException($e);
202
+ $result['error'] = $this->__('Unable to set Payment Method.');
203
+ }
204
+
205
+ $this->getOnepage()->getCheckout()->setStepData('payment', 'complete', true);
206
+ return $result;
207
+ }
208
+
209
+ public function savePaymentAction()
210
+ {
211
+ if ($this->_expireAjax()) {
212
+ return;
213
+ }
214
+
215
+ $result = $this->savePayment(array('method'=>'hcdmpa'));
216
+
217
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
218
+ }
219
+
220
+ protected function _getPaymentMethodsHtml()
221
+ {
222
+ $layout = $this->getLayout();
223
+ $update = $layout->getUpdate();
224
+ $update->load('hcd_checkout_paymentmethod');
225
+ $layout->generateXml();
226
+ $layout->generateBlocks();
227
+ $output = $layout->getOutput();
228
+ return $output;
229
+ }
230
+
231
+ public function saveShippingMethodAction()
232
+ {
233
+ if ($this->_expireAjax()) {
234
+ return;
235
+ }
236
+
237
+ if ($this->getRequest()->isPost()) {
238
+ $data = $this->getRequest()->getPost('shipping_method', '');
239
+ $result = $this->getOnepage()->saveShippingMethod($data);
240
+ // $result will contain error data if shipping method is empty
241
+ if (!$result) {
242
+ Mage::dispatchEvent(
243
+ 'checkout_controller_onepage_save_shipping_method',
244
+ array(
245
+ 'request' => $this->getRequest(),
246
+ 'quote' => $this->getOnepage()->getQuote())
247
+ );
248
+ $this->getOnepage()->getQuote()->collectTotals();
249
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
250
+
251
+ $result['goto_section'] = 'payment';
252
+ $result['update_section'] = array(
253
+ 'name' => 'payment-method',
254
+ 'html' => $this->_getPaymentMethodsHtml()
255
+ );
256
+ }
257
+
258
+ $this->getOnepage()->getQuote()->collectTotals()->save();
259
+ $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
260
+ }
261
+ }
262
+
263
+ public function progressAction()
264
+ {
265
+ // previous step should never be null. We always start with billing and go forward
266
+ $prevStep = $this->getRequest()->getParam('prevStep', false);
267
+
268
+ if ($this->_expireAjax() || !$prevStep) {
269
+ return null;
270
+ }
271
+
272
+ $layout = $this->getLayout();
273
+ $update = $layout->getUpdate();
274
+ /* Load the block belonging to the current step*/
275
+ $update->load('hcd_checkout_progress_' . $prevStep);
276
+ $layout->generateXml();
277
+ $layout->generateBlocks();
278
+ $output = $layout->getOutput();
279
+ $this->getResponse()->setBody($output);
280
+ return $output;
281
+ }
282
+
283
+ protected function log($message, $level="DEBUG", $file=false)
284
+ {
285
+ $callers=debug_backtrace();
286
+ return Mage::helper('hcd/payment')->realLog($callers[1]['function'].' '.$message, $level, $file);
287
+ }
288
+ }
app/code/community/HeidelpayCD/Edition/controllers/IndexController.php CHANGED
@@ -1,731 +1,664 @@
1
- <?php
2
- class HeidelpayCD_Edition_IndexController extends Mage_Core_Controller_Front_Action
3
- {
4
- protected $_sendNewOrderEmail = TRUE;
5
- protected $_invoiceOrderEmail = TRUE;
6
- protected $_order = NULL;
7
- protected $_paymentInst = NULL;
8
- protected $_debug = TRUE;
9
-
10
- protected $_live_url = 'https://heidelpay.hpcgw.net/ngw/post';
11
- protected $_sandbox_url = 'https://test-heidelpay.hpcgw.net/ngw/post';
12
-
13
-
14
- protected $_live_basket_url = 'https://heidelpay.hpcgw.net/ngw/basket/';
15
- protected $_sandbox_basket_url = 'https://test-heidelpay.hpcgw.net/ngw/basket/';
16
-
17
-
18
- public $importantPPFields = array(
19
- 'PRESENTATION_AMOUNT',
20
- 'PRESENTATION_CURRENCY',
21
- 'CONNECTOR_ACCOUNT_COUNTRY',
22
- 'CONNECTOR_ACCOUNT_HOLDER',
23
- 'CONNECTOR_ACCOUNT_NUMBER',
24
- 'CONNECTOR_ACCOUNT_BANK',
25
- 'CONNECTOR_ACCOUNT_BIC',
26
- 'CONNECTOR_ACCOUNT_IBAN',
27
- 'IDENTIFICATION_SHORTID',
28
- );
29
-
30
- public function preDispatch()
31
- {
32
- parent::preDispatch();
33
-
34
- /* Review because of fail behavior in case of gueste buyer TODO
35
- $action = $this->getRequest()->getActionName();
36
- if ($action != 'response')
37
- {
38
- if (!Mage::getSingleton('customer/session')->authenticate($this))
39
- {
40
- $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());
41
- $this->setFlag('', self::FLAG_NO_DISPATCH, true);
42
- return $this;
43
- }
44
- }
45
- */
46
-
47
- }
48
-
49
- protected function _getHelper()
50
- {
51
- return Mage::helper('hcd');
52
- }
53
-
54
- private function log($message, $level="DEBUG", $file=false) {
55
- $callers=debug_backtrace();
56
- return Mage::helper('hcd/payment')->realLog( $callers[1]['function'].' '.$message , $level , $file);
57
- }
58
-
59
- protected function _expireAjax()
60
- {
61
- if (!$this->getCheckout()->getQuote()->hasItems()) {
62
- $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired');
63
- exit;
64
- }
65
- }
66
-
67
-
68
- /**
69
- * Get order model
70
- *
71
- * @return Mage_Sales_Model_Order
72
- */
73
- public function getOrder()
74
- {
75
- return Mage::getModel('sales/order');
76
- }
77
-
78
- /**
79
- * Get checkout session namespace
80
- *
81
- * @return Mage_Checkout_Model_Session
82
- */
83
- public function getCheckout()
84
- {
85
- return Mage::getSingleton('checkout/session');
86
- }
87
-
88
- /**
89
- * Get current quote
90
- *
91
- * @return Mage_Sales_Model_Quote
92
- */
93
- public function getQuote()
94
- {
95
- return $this->getCheckout()->getQuote();
96
- }
97
-
98
- /**
99
- * Get hp session namespace
100
- *
101
- * @return Mage_Heidelpay_Model_Session
102
- */
103
- public function getSession()
104
- {
105
- return Mage::getSingleton('core/session');
106
- }
107
-
108
- protected function _getCheckout()
109
- {
110
- return Mage::getSingleton('checkout/session');
111
- }
112
-
113
- public function getOnepage() {
114
- return Mage::getSingleton('checkout/type_onepage');
115
- }
116
-
117
- public function getStore() {
118
- return Mage::app()->getStore()->getId();
119
- }
120
-
121
- /**
122
- * successful return from Heidelpay payment
123
- */
124
- public function successAction()
125
- {
126
- $session = $this->getCheckout();
127
- $order = Mage::getModel('sales/order');
128
- $order->loadByIncrementId($session->getLastRealOrderId());
129
- if($order->getPayment() === false) {
130
- $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
131
- return $this;
132
- }
133
-
134
- //$this->log('No Mail '.Mage::app()->getRequest()->getParam('no_mail'));
135
- $no_mail = (Mage::app()->getRequest()->getParam('no_mail') == 1) ? true : false;
136
-
137
-
138
- $this->getCheckout()->getQuote()->setIsActive(false)->save();
139
- $this->getCheckout()->clear();
140
-
141
- $message = "";
142
-
143
- $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByTransactionnr($session->getLastRealOrderId());
144
-
145
- /*
146
- * validate Hash to prevent manipulation
147
- */
148
- if (Mage::getModel('hcd/resource_encryption')->validateHash($data['IDENTIFICATION_TRANSACTIONID'],$data['CRITERION_SECRET']) === false) {
149
- $this->log("Customer tries to redirect directly to success page. IP " . Mage::app()->getRequest()->getServer('REMOTE_ADDR') . " . This could be some kind of manipulation.", 'WARN');
150
- $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
151
- };
152
-
153
- $session->unsHcdPaymentInfo();
154
-
155
- if ($order->getPayment()->getMethodInstance()->getCode() != 'hcdiv') {
156
- $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
157
- if ($info !== false) {
158
- $session->setHcdPaymentInfo($info);
159
- $order->setCustomerNote($info);
160
- }
161
- }
162
-
163
- $quoteID = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId() ; // last_quote_id workaround for trusted shop buyerprotection
164
- $this->getCheckout()->setLastSuccessQuoteId($quoteID);
165
- $this->log('LastQuteID :'. $quoteID );
166
-
167
- if ($no_mail === false) {
168
- Mage::helper('hcd/payment')->mapStatus (
169
- $data,
170
- $order
171
- );
172
- }
173
-
174
- if($order->getId() and $no_mail === false) {
175
- $order->sendNewOrderEmail();
176
- //$this->log('sendOrderMail');
177
- }
178
- $order->save();
179
- $this->_redirect('checkout/onepage/success', array('_secure' => true));
180
- return;
181
- }
182
-
183
- public function errorAction()
184
- {
185
- $session = $this->getCheckout();
186
- $errorCode = null;
187
- $order = Mage::getModel('sales/order');
188
- $order->loadByIncrementId($session->getLastRealOrderId());
189
- $this->log(' LastRealOrderId '.print_r($session->getLastRealOrderId(),1));
190
-
191
- $Request = Mage::app()->getRequest();
192
- $GET_ERROR = $Request->getParam('HPError');
193
-
194
-
195
-
196
-
197
- // in case of an error in the server to server request
198
- $usersession = $this->getSession();
199
- // var_dump($usersession->getHcdError());
200
- // exit;
201
- $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByTransactionnr($session->getLastRealOrderId());
202
- $this->log(' data '.print_r($data,1));
203
-
204
- if($usersession->getHcdError() !== NULL ) {
205
- $message = Mage::helper('hcd/payment')->handleError($usersession->getHcdError(),$errorCode,(string)$order->getRealOrderId());
206
- $intMessage = $usersession->getHcdError();
207
- $usersession->unsHcdError();
208
- } else {
209
- if (isset($data['PROCESSING_RETURN_CODE'])) $errorCode = $data['PROCESSING_RETURN_CODE'];
210
- if (isset($GET_ERROR)) {
211
- $errorCode = $GET_ERROR;
212
- $data['PROCESSING_RESULT'] = 'NOK';
213
- }
214
- $message = Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN'],$errorCode,(string)$order->getRealOrderId());
215
- $intMessage = (!empty($data['PROCESSING_RETURN'])) ? $data['PROCESSING_RETURN'] : $message ;
216
- }
217
-
218
- $quoteId = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId() ; // last_quote_id workaround for trusted shop buyerprotection
219
- if ($quoteId) {
220
- $quote = Mage::getModel('sales/quote')->load($quoteId);
221
- if ($quote->getId()) {
222
- $quote->setIsActive(true)->save();
223
- $session->setQuoteId($quoteId);
224
- }
225
- }
226
-
227
- Mage::helper('hcd/payment')->mapStatus (
228
- $data,
229
- $order,
230
- $intMessage
231
- );
232
-
233
- $storeId = Mage::app()->getStore()->getId();
234
- $redirectController = Mage::getStoreConfig("hcd/settings/returnurl", $storeId);
235
-
236
- switch ($redirectController){
237
- case "basket":
238
- $session->addError($message);
239
- $this->_redirect('checkout/cart', array('_secure' => true));
240
- break;
241
- /*
242
- case "onestepcheckout":
243
- $session->addError($message);
244
- $this->_redirect('onestepcheckout/', array('_secure' => true));
245
- break;
246
- */
247
- default:
248
- $usersession->addError($message);
249
- $this->_redirect('checkout/onepage', array('_secure' => true));
250
- }
251
-
252
- }
253
- /**
254
- * redirect return from Heidelpay payment (iframe)
255
- */
256
- public function indexAction()
257
- {
258
- $data = array();
259
- $order = $this->getOrder();
260
-
261
- $RefId = false;
262
- $BasketId = false;
263
-
264
- $session = $this->getCheckout();
265
- $order->loadByIncrementId($session->getLastRealOrderId());
266
- if ($order->getPayment() === false ) {
267
- $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());
268
- $this->setFlag('', self::FLAG_NO_DISPATCH, true);
269
- return $this;
270
- }
271
- $payment = $order->getPayment()->getMethodInstance();
272
-
273
- if ($session->getHcdWallet() !== false) {
274
- $wallet = $session->getHcdWallet();
275
- $RefId = (!empty($wallet['referenceId'])) ? $wallet['referenceId'] : false;
276
- $this->log('Wallet reference id :'.$RefId);
277
- }
278
-
279
-
280
- if($payment->_canBasketApi == true and empty($RefId)) {
281
-
282
- $ShoppingCart = Mage::helper('hcd/payment')->basketItems($order, $this->getStore());
283
-
284
- $url = (Mage::getStoreConfig('hcd/settings/transactionmode', $this->getStore()) == 0) ? $this->_live_basket_url : $this->_sandbox_basket_url;
285
-
286
- $this->log("doRequest shoppingcart : ".print_r($ShoppingCart,1), 'DEBUG');
287
-
288
- $result = Mage::helper('hcd/payment')->doRequest($url, array( 'raw' => $ShoppingCart));
289
-
290
- if (array_key_exists('result', $result) && $result['result'] == 'NOK'){
291
- $this->log('Send basket to payment fail, because of : '.print_r($result,1),'ERROR');
292
- Mage::getSingleton('core/session')->setHcdError($result['basketErrors']['message']);
293
- $this->_redirect('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
294
- return;
295
- }
296
-
297
- $this->log("doRequest shoppingcart response : ".print_r($result,1), 'DEBUG');
298
- $BasketId = (array_key_exists('basketId',$result)) ? $result['basketId'] : false ;
299
-
300
-
301
- }
302
-
303
-
304
- // if order status is cancel redirect to cancel page
305
- if ($order->getStatus() == $payment->getStatusError()) {
306
- $this->_redirect('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
307
- return;
308
- };
309
-
310
- // if order status is success redirect to success page
311
- if ($order->getStatus() == $payment->getStatusSuccess() or $order->getStatus() == $payment->getStatusPendig()) {
312
- $this->_redirect('hcd/index/success', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true,'no_mail' => true));
313
- return;
314
- }
315
-
316
-
317
-
318
- $data = $payment->getHeidelpayUrl(false , $BasketId, $RefId);
319
-
320
- if($data['POST_VALIDATION'] == 'ACK' and $data['PROCESSING_RESULT'] == 'ACK' )
321
- {
322
- if($data['PAYMENT_CODE'] == "OT.PA" ) {
323
- $quoteID = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId() ; // last_quote_id workaround for trusted shop buyerprotection
324
- $order->getPayment()->setTransactionId($quoteID);
325
- $order->getPayment()->setIsTransactionClosed(true);
326
- }
327
- $order->setState( $order->getPayment()->getMethodInstance()->getStatusPendig(false),
328
- $order->getPayment()->getMethodInstance()->getStatusPendig(true),
329
- Mage::helper('hcd')->__('Get payment url from Heidelpay -> ').$data['FRONTEND_REDIRECT_URL'] );
330
- $order->getPayment()->addTransaction(
331
- Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
332
- null,
333
- true
334
- );
335
- $order->save();
336
-
337
- $session->getQuote()->setIsActive(true)->save();
338
- $session->clear();
339
-
340
- if ( $payment->activRedirct() === true ) {
341
- $this->_redirectUrl($data['FRONTEND_REDIRECT_URL']);
342
- return;
343
- }
344
- $this->loadLayout();
345
- $this->log('RedirectUrl ' .$data['FRONTEND_PAYMENT_FRAME_URL'] );
346
- $this->log('CCHolder ' .$payment->getCustomerName() );
347
- $this->getLayout()->getBlock('hcd_index')->setHcdUrl($data['FRONTEND_PAYMENT_FRAME_URL']);
348
- $this->getLayout()->getBlock('hcd_index')->setHcdCode($payment->getCode());
349
- } else {
350
- Mage::getModel('hcd/transaction')->saveTransactionData($data);
351
- Mage::getSingleton('core/session')->setHcdError($data['PROCESSING_RETURN']);
352
- $this->_redirect('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
353
- }
354
-
355
-
356
-
357
- $this->renderLayout();
358
- return $this ;
359
- }
360
-
361
- public function walletAction()
362
- {
363
- $data = array();
364
- $Request = Mage::app()->getRequest();
365
- $paymentCode = $Request->getParam('_wallet');
366
- $storeId = $this->getStore();
367
- $code = false;
368
- $mageBasketId = (string)$this->getCheckout()->getQuoteId();
369
-
370
- if ($paymentCode == 'hcdmpa') {
371
- $code = 'hcdmpa';
372
- };
373
-
374
- $quote = $this->getOnepage()->getQuote();
375
- if (!$quote->hasItems() || $quote->getHasError() || $code === false ) {
376
- $this->_redirect('checkout/cart');
377
- return;
378
- }
379
-
380
-
381
- $ShoppingCart = Mage::helper('hcd/payment')->basketItems($quote, $storeId);
382
-
383
- $url = (Mage::getStoreConfig('hcd/settings/transactionmode', $storeId) == 0) ? $this->_live_basket_url : $this->_sandbox_basket_url;
384
-
385
- $this->log("doRequest shoppingcart : ".print_r($ShoppingCart,1), 'DEBUG');
386
- $this->log("doRequest shoppingcart : ".print_r(json_encode($ShoppingCart),1), 'DEBUG');
387
-
388
- $result = Mage::helper('hcd/payment')->doRequest($url, array( 'raw' => $ShoppingCart));
389
-
390
- if (array_key_exists('result', $result) && $result['result'] == 'NOK'){
391
- $this->log('Send basket to payment fail, because of : '.print_r($result,1),'ERROR');
392
- $message = $this->_getHelper()->__('An unexpected error occurred. Please contact us to get further information.');
393
- Mage::getSingleton('core/session')->addError($message);
394
- $this->_redirect('checkout/cart', array('_secure' => true));
395
- return;
396
- }
397
-
398
- $this->log("doRequest shoppingcart response : ".print_r($result,1), 'DEBUG');
399
-
400
- $config = array( 'PAYMENT.METHOD' => preg_replace('/^hcd/','',$code ),
401
- 'SECURITY.SENDER' => Mage::getStoreConfig('hcd/settings/security_sender', $storeId),
402
- 'TRANSACTION.MODE' => (Mage::getStoreConfig('hcd/settings/transactionmode', $storeId) == 0) ? 'LIVE' : 'CONNECTOR_TEST' ,
403
- 'URL' => (Mage::getStoreConfig('hcd/settings/transactionmode', $storeId) == 0) ? $this->_live_url : $this->_sandbox_url ,
404
- 'USER.LOGIN' => trim(Mage::getStoreConfig('hcd/settings/user_id', $storeId)),
405
- 'USER.PWD' => trim(Mage::getStoreConfig('hcd/settings/user_pwd', $storeId)),
406
- 'TRANSACTION.CHANNEL' => trim(Mage::getStoreConfig('payment/'.$code.'/channel', $storeId)),
407
- 'PAYMENT.TYPE' => 'IN'
408
- );
409
- $frontend = array( 'FRONTEND.LANGUAGE' => Mage::helper('hcd/payment')->getLang(),
410
- 'FRONTEND.RESPONSE_URL' => Mage::getUrl('hcd/index/response', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
411
- //'FRONTEND.SUCCESS_URL' => Mage::getUrl('hcd/index/success', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
412
- //'FRONTEND.FAILURE_URL' => Mage::getUrl('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)),
413
- 'CRITERION.SECRET' => Mage::getModel('hcd/resource_encryption')->getHash($mageBasketId),
414
- 'CRITERION.LANGUAGE' => strtolower(Mage::helper('hcd/payment')->getLang()),
415
- 'CRITERION.STOREID' => $storeId,
416
- 'SHOP.TYPE' => 'Magento '. Mage::getVersion(),
417
- 'SHOPMODULE.VERSION' => 'HeidelpayCD Edition - '. (string) Mage::getConfig()->getNode()->modules->HeidelpayCD_Edition->version,
418
- 'WALLET.DIRECT_PAYMENT' => 'false'
419
- );
420
-
421
- $visitorData = Mage::getSingleton('core/session')->getVisitorData();
422
-
423
- $user = array( 'IDENTIFICATION.SHOPPERID' => $visitorData['visitor_id'],
424
- 'NAME.GIVEN' => ' - ',
425
- 'NAME.FAMILY' => ' - ',
426
- 'ADDRESS.STREET' => ' - ',
427
- 'ADDRESS.ZIP' => ' - ',
428
- 'ADDRESS.CITY' => ' - ',
429
- 'ADDRESS.COUNTRY' => 'DE',
430
- 'CONTACT.EMAIL' => 'dummy@heidelpay.de',
431
- 'CONTACT.IP' => (filter_var(trim(Mage::app()->getRequest()->getClientIp()), FILTER_VALIDATE_IP)) ? trim(Mage::app()->getRequest()->getClientIp()) : '127.0.0.1'
432
- );
433
-
434
- $basketData = array ( 'PRESENTATION.AMOUNT' => Mage::helper('hcd/payment')->format($quote->getGrandTotal()) ,
435
- 'PRESENTATION.CURRENCY' => $quote->getGlobalCurrencyCode(),
436
- 'IDENTIFICATION.TRANSACTIONID' => $mageBasketId,
437
- 'BASKET.ID' => (array_key_exists('basketId',$result)) ? $result['basketId'] : ''
438
- );
439
-
440
- $params = Mage::helper('hcd/payment')->preparePostData( $config, $frontend, $user, $basketData ,$criterion = array());
441
-
442
-
443
- $this->log("doRequest url : ".$config['URL'], 'DEBUG');
444
- $this->log("doRequest params : ".print_r($params,1), 'DEBUG');
445
- $data = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
446
- $this->log("doRequest response : ".print_r($data,1), 'DEBUG');
447
-
448
-
449
- if($data['POST_VALIDATION'] == 'ACK' and $data['PROCESSING_RESULT'] == 'ACK' )
450
- {
451
- /** Redirect on Success */
452
- //print $data['FRONTEND_REDIRECT_URL'] ;
453
- //exit();
454
- $this->_redirectUrl(trim($data['FRONTEND_REDIRECT_URL']));
455
- return;
456
- } else {
457
- /** Error Case */
458
- $this->log('Wallet Redirect for '.$code.' fail, because of : '.$data['PROCESSING_RETURN'],'ERROR');
459
- $message = $this->_getHelper()->__('An unexpected error occurred. Please contact us to get further information.');
460
- Mage::getSingleton('core/session')->addError($message);
461
- $this->_redirect('checkout/cart', array('_secure' => true));
462
- return;
463
- }
464
-
465
- }
466
-
467
- /**
468
- * response from Heidelpay payment
469
- */
470
- public function responseAction()
471
- {
472
- /*
473
- * collect variables
474
- */
475
- $Request = Mage::app()->getRequest();
476
- $Request->setParamSources(array('_POST'));
477
- $FRONTEND_SESSIONID = $Request->getPost('CRITERION_SECRET');
478
- $data = array();
479
- $IDENTIFICATION_TRANSACTIONID = $Request->getPOST('IDENTIFICATION_TRANSACTIONID');
480
- $data['IDENTIFICATION_TRANSACTIONID'] = (!empty($IDENTIFICATION_TRANSACTIONID)) ? $Request->getPOST('IDENTIFICATION_TRANSACTIONID') : $Request->getPOST('IDENTIFICATION_SHOPPERID') ;
481
-
482
- /*
483
- * validate Hash to prevent manipulation
484
- */
485
- if (Mage::getModel('hcd/resource_encryption')->validateHash($data['IDENTIFICATION_TRANSACTIONID'],$FRONTEND_SESSIONID) === false) {
486
- echo Mage::getUrl('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
487
- $this->log("Get response form server " . $Request->getServer('REMOTE_ADDR') . " with an invalid hash. This could be some kind of manipulation.", 'WARN');
488
- exit();
489
- };
490
-
491
- $data= $Request->getParams();
492
-
493
-
494
- $data['PROCESSING_RESULT'] = $Request->getPOST('PROCESSING_RESULT');
495
- $data['IDENTIFICATION_TRANSACTIONID'] = $Request->getPOST('IDENTIFICATION_TRANSACTIONID');
496
- $data['PROCESSING_STATUS_CODE'] = $Request->getPOST('PROCESSING_STATUS_CODE');
497
- $data['PROCESSING_RETURN'] = $Request->getPOST('PROCESSING_RETURN');
498
- $data['PROCESSING_RETURN_CODE'] = $Request->getPOST('PROCESSING_RETURN_CODE');
499
- $data['PAYMENT_CODE'] = $Request->getPOST('PAYMENT_CODE');
500
- $data['IDENTIFICATION_UNIQUEID'] = $Request->getPOST('IDENTIFICATION_UNIQUEID');
501
- $data['FRONTEND_SUCCESS_URL'] = $Request->getPOST('FRONTEND_SUCCESS_URL');
502
- $data['FRONTEND_FAILURE_URL'] = $Request->getPOST('FRONTEND_FAILURE_URL');
503
- $data['IDENTIFICATION_SHORTID'] = $Request->getPOST('IDENTIFICATION_SHORTID');
504
- $data['IDENTIFICATION_SHOPPERID'] = $Request->getPOST('IDENTIFICATION_SHOPPERID');
505
- $data['CRITERION_GUEST'] = $Request->getPOST('CRITERION_GUEST');
506
-
507
- $PaymentCode = Mage::helper('hcd/payment')->splitPaymentCode ($data['PAYMENT_CODE']);
508
-
509
- $this->log("Post params: " . print_r($data,1));
510
-
511
- if ($PaymentCode[1] == 'RG') {
512
- if ($data['PROCESSING_RESULT'] == 'NOK'){
513
- $message = Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN'],$data['PROCESSING_RETURN_CODE']);
514
- $checkout = $this->getCheckout()->addError($message);
515
- $url = Mage::getUrl('hcd/index/error', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true, 'HPError' => $data['PROCESSING_RETURN_CODE']));
516
- }else {
517
-
518
- // save cc and dc registration data
519
- $custumerData = Mage::getModel('hcd/customer');
520
- $currentPaymnet = 'hcd'.strtolower($PaymentCode[0]);
521
- $Storeid = ($data['CRITERION_GUEST'] == 'true') ? 0 : trim($data['CRITERION_STOREID']);
522
- $RgData = Mage::getModel('hcd/customer')
523
- ->getCollection()
524
- ->addFieldToFilter('Customerid', trim($data['IDENTIFICATION_SHOPPERID']))
525
- ->addFieldToFilter('Storeid', $Storeid)
526
- ->addFieldToFilter('Paymentmethode', trim($currentPaymnet));
527
- $RgData->load();
528
- $returnData = $RgData->getData();
529
- if (!empty($returnData[0]['id'])) $custumerData->setId((int)$returnData[0]['id']);
530
-
531
- $custumerData->setPaymentmethode($currentPaymnet);
532
- $custumerData->setUniqeid($data['IDENTIFICATION_UNIQUEID']);
533
- $custumerData->setCustomerid($data['IDENTIFICATION_SHOPPERID']);
534
- $custumerData->setStoreid($Storeid);
535
- $custumerData->setPaymentData(
536
- Mage::getModel('hcd/resource_encryption')
537
- ->encrypt(json_encode(
538
- array(
539
- 'ACCOUNT.REGISTRATION' => $data['IDENTIFICATION_UNIQUEID'],
540
- 'SHIPPPING_HASH' => $data['CRITERION_SHIPPPING_HASH'],
541
- 'ACCOUNT_BRAND' => $data['ACCOUNT_BRAND'],
542
- 'ACCOUNT_NUMBER' => $data['ACCOUNT_NUMBER'],
543
- 'ACCOUNT_HOLDER' => $data['ACCOUNT_HOLDER'],
544
- 'ACCOUNT_EXPIRY_MONTH' => $data['ACCOUNT_EXPIRY_MONTH'],
545
- 'ACCOUNT_EXPIRY_YEAR' => $data['ACCOUNT_EXPIRY_YEAR']
546
- ))));
547
-
548
- $custumerData->save();
549
-
550
- $url = Mage::getUrl('hcd/', array('_secure' => true));
551
-
552
- }
553
- } elseif ($PaymentCode[1] == 'IN' and $Request->getPost('WALLET_DIRECT_PAYMENT') == 'false') {
554
-
555
- // Back to checkout after wallet init
556
- if ($data['PROCESSING_RESULT'] == 'NOK'){
557
- $this->log('Wallet for basketId '.$data['IDENTIFICATION_TRANSACTIONID'].' failed because of '.$data['PROCESSING_RETURN'],'NOTICE');
558
- $url = Mage::getUrl('checkout/cart', array('_secure' => true));
559
- }else {
560
- $url = Mage::getUrl('hcd/checkout/', array('_secure' => true, '_wallet' => 'hcdmpa'));
561
- }
562
- Mage::getModel('hcd/transaction')->saveTransactionData($data);
563
- } else {
564
-
565
-
566
- /* load order */
567
- $order = $this->getOrder();
568
- $order->loadByIncrementId($data['IDENTIFICATION_TRANSACTIONID']);
569
- if ($order->getPayment() !== false){
570
- $payment = $order->getPayment()->getMethodInstance();
571
- }
572
- $this->log('UniqeID: '.$data['IDENTIFICATION_UNIQUEID']);
573
-
574
-
575
-
576
- if ($data['PROCESSING_RESULT'] == 'NOK'){
577
- if (isset($data['FRONTEND_REQUEST_CANCELLED'])){
578
- $url = $data['FRONTEND_FAILURE_URL'];
579
- }else {
580
- $url = $data['FRONTEND_FAILURE_URL'];
581
- }
582
-
583
- } elseif ( ( $PaymentCode[1] == 'CP' or $PaymentCode[1] == 'DB' or $PaymentCode[1] == 'FI' or $PaymentCode[1] == 'RC')
584
- and ( $data['PROCESSING_RESULT'] == 'ACK' and $data['PROCESSING_STATUS_CODE'] != 80 )) {
585
- $url = $data['FRONTEND_SUCCESS_URL'];
586
- }else {
587
- $url = $data['FRONTEND_SUCCESS_URL'];
588
- }
589
-
590
- Mage::getModel('hcd/transaction')->saveTransactionData($data);
591
-
592
- }
593
-
594
- $this->log('Url: '.$url);
595
-
596
-
597
- echo $url;
598
- }
599
-
600
- /**
601
- * Controller for push notification
602
- */
603
- public function pushAction() {
604
-
605
-
606
- $rawPost = false;
607
- $lastdata = null;
608
- $Request = Mage::app()->getRequest();
609
- $rawPost = $Request->getRawBody();
610
-
611
- if ($rawPost === false) {
612
- $this->_redirect('', array('_secure' => true));
613
- }
614
-
615
- /** Hack to remove a structur problem in criterion node */
616
- $rawPost = preg_replace('/<Criterion(\s+)name="(.+?)">(.+?)<\/Criterion>/', '<$2>$3</$2>',$rawPost);
617
-
618
- $xml = simplexml_load_string($rawPost);
619
-
620
- $this->log('XML Object from Push : '.$rawPost);
621
-
622
- list($type , $methode) = Mage::helper('hcd/payment')->splitPaymentCode((string)$xml->Transaction->Payment['code']);
623
- if ( $methode == 'RG') return;
624
-
625
- $hash = (string)$xml->Transaction->Analysis->SECRET ;
626
- $orderID =(string)$xml->Transaction->Identification->TransactionID;
627
-
628
-
629
-
630
- if (Mage::getModel('hcd/resource_encryption')->validateHash($orderID,$hash) === false) {
631
- $this->log("Get response form server " . Mage::app()->getRequest()->getServer('REMOTE_ADDR') . " with an invalid hash. This could be some kind of manipulation.", 'WARN');
632
- $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
633
- return;
634
- };
635
-
636
-
637
-
638
-
639
- $xmlData = array(
640
- 'PAYMENT_CODE' => (string)$xml->Transaction->Payment['code'],
641
- 'IDENTIFICATION_TRANSACTIONID' => (string)$orderID,
642
- 'IDENTIFICATION_UNIQUEID' => (string)$xml->Transaction->Identification->UniqueID,
643
- 'PROCESSING_RESULT' => (string)$xml->Transaction->Processing->Result,
644
- 'IDENTIFICATION_SHORTID' => (string)$xml->Transaction->Identification->ShortID,
645
- 'PROCESSING_STATUS_CODE' => (string)$xml->Transaction->Processing->Status['code'],
646
- 'PROCESSING_RETURN' => (string)$xml->Transaction->Processing->Return,
647
- 'PROCESSING_RETURN_CODE' => (string)$xml->Transaction->Processing->Return['code'],
648
- 'PRESENTATION_AMOUNT' => (string)$xml->Transaction->Payment->Presentation->Amount,
649
- 'PRESENTATION_CURRENCY' => (string)$xml->Transaction->Payment->Presentation->Currency,
650
- 'IDENTIFICATION_REFERENCEID' => (string)$xml->Transaction->Identification->ReferenceID,
651
- 'CRITERION_STOREID' => (int)$xml->Transaction->Analysis->STOREID,
652
- 'ACCOUNT_BRAND' => false,
653
- 'CRITERION_LANGUAGE' => strtoupper((string)$xml->Transaction->Analysis->LANGUAGE)
654
- );
655
-
656
-
657
-
658
-
659
- $order = $this->getOrder();
660
- $order->loadByIncrementId($orderID);
661
- $paymentCode = $order->getPayment()->getMethodInstance()->getCode();
662
-
663
- switch ($paymentCode) {
664
-
665
- case 'hcddd':
666
- $xmlData['CLEARING_AMOUNT'] = (string)$xml->Transaction->Payment->Clearing->Amount;
667
- $xmlData['CLEARING_CURRENCY'] = (string)$xml->Transaction->Payment->Clearing->Currency;
668
- $xmlData['ACCOUNT_IBAN'] = (string)$xml->Transaction->Account->Iban;
669
- $xmlData['ACCOUNT_BIC'] = (string)$xml->Transaction->Account->Bic;
670
- $xmlData['ACCOUNT_IDENTIFICATION'] = (string)$xml->Transaction->Account->Identification;
671
- $xmlData['IDENTIFICATION_CREDITOR_ID'] = (string)$xml->Transaction->Identification->CreditorID;
672
- break;
673
- case 'hcdbs':
674
- if ($methode == 'FI') {
675
- $xmlData['CRITERION_BILLSAFE_LEGALNOTE'] = (string)$xml->Transaction->Analysis->BILLSAFE_LEGALNOTE;
676
- $xmlData['CRITERION_BILLSAFE_AMOUNT'] = (string)$xml->Transaction->Analysis->BILLSAFE_AMOUNT;
677
- $xmlData['CRITERION_BILLSAFE_CURRENCY'] = (string)$xml->Transaction->Analysis->BILLSAFE_CURRENCY;
678
- $xmlData['CRITERION_BILLSAFE_RECIPIENT'] = (string)$xml->Transaction->Analysis->BILLSAFE_RECIPIENT;
679
- $xmlData['CRITERION_BILLSAFE_IBAN'] = (string)$xml->Transaction->Analysis->BILLSAFE_IBAN;
680
- $xmlData['CRITERION_BILLSAFE_BIC'] = (string)$xml->Transaction->Analysis->BILLSAFE_BIC;
681
- $xmlData['CRITERION_BILLSAFE_REFERENCE'] = (string)$xml->Transaction->Analysis->BILLSAFE_REFERENCE;
682
- $xmlData['CRITERION_BILLSAFE_PERIOD'] = (string)$xml->Transaction->Analysis->BILLSAFE_PERIOD;
683
- $xmlData['ACCOUNT_BRAND'] = 'BILLSAFE';
684
- }
685
- break;
686
- }
687
-
688
- if (!empty($xml->Transaction->Identification->UniqueID))
689
- $lastdata = Mage::getModel('hcd/transaction')->loadLastTransactionDataByUniqeId($xmlData['IDENTIFICATION_UNIQUEID']);
690
-
691
- if($lastdata === false) {
692
- Mage::getModel('hcd/transaction')->saveTransactionData($xmlData, 'push');
693
- }
694
-
695
-
696
- $this->log('PaymentCode '.$paymentCode);
697
-
698
- $this->log($type ." ". $methode);
699
- if ($methode == 'CB' or $methode == 'RC' or $methode == 'CP' or $methode == 'DB' or ($methode == 'FI' and $paymentCode == 'hcdbs' )) {
700
- Mage::helper('hcd/payment')->mapStatus (
701
- $xmlData,
702
- $order
703
- );
704
-
705
- }
706
-
707
- }
708
-
709
- /*
710
-
711
- public function testAction() {
712
- $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByTransactionnr('302000092');//->loadTransactionDataByX( );
713
- var_dump($data);
714
- foreach($data AS $k) echo "<pre>".print_r($k,1)."</pre>";
715
- }
716
-
717
-
718
-
719
- public function orderAction() {
720
- $orderID = '302000373';
721
- $order = $this->getOrder();
722
- $order->loadByIncrementId($orderID);
723
-
724
- if (abs($order->getStore()->roundPrice($order->getTotalPaid()) - $order->getTotalRefunded()) < .0001) {
725
- print 'nicht ok';
726
- } else
727
- print "ok";
728
- }
729
- */
730
-
731
- }
1
+ <?php
2
+ /**
3
+ * Index controller
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ // @codingStandardsIgnoreLine magento marketplace namespace warning
17
+ class HeidelpayCD_Edition_IndexController extends Mage_Core_Controller_Front_Action
18
+ {
19
+ protected $_sendNewOrderEmail = true;
20
+ protected $_invoiceOrderEmail = true;
21
+ protected $_order = null;
22
+ protected $_paymentInst = null;
23
+ protected $_debug = true;
24
+
25
+ protected $_liveUrl = 'https://heidelpay.hpcgw.net/ngw/post';
26
+ protected $_sandboxUrl = 'https://test-heidelpay.hpcgw.net/ngw/post';
27
+
28
+
29
+ protected $_liveBasketUrl = 'https://heidelpay.hpcgw.net/ngw/basket/';
30
+ protected $_sandboxBasketUrl = 'https://test-heidelpay.hpcgw.net/ngw/basket/';
31
+
32
+
33
+ public $importantPPFields = array(
34
+ 'PRESENTATION_AMOUNT',
35
+ 'PRESENTATION_CURRENCY',
36
+ 'CONNECTOR_ACCOUNT_COUNTRY',
37
+ 'CONNECTOR_ACCOUNT_HOLDER',
38
+ 'CONNECTOR_ACCOUNT_NUMBER',
39
+ 'CONNECTOR_ACCOUNT_BANK',
40
+ 'CONNECTOR_ACCOUNT_BIC',
41
+ 'CONNECTOR_ACCOUNT_IBAN',
42
+ 'IDENTIFICATION_SHORTID',
43
+ );
44
+
45
+ /** @var $_basketApiHelper HeidelpayCD_Edition_Helper_BasketApi */
46
+ protected $_basketApiHelper;
47
+
48
+ protected function _getHelper()
49
+ {
50
+ return Mage::helper('hcd');
51
+ }
52
+
53
+ /**
54
+ * HeidelpayCD_Edition_IndexController constructor.
55
+ *
56
+ * @param Zend_Controller_Request_Abstract $request
57
+ * @param Zend_Controller_Response_Abstract $response
58
+ * @param HeidelpayCD_Edition_Helper_BasketApi $basketApiHelper
59
+ * @param array $invokeArgs
60
+ */
61
+ // @codingStandardsIgnoreLine bug in multi line standard
62
+ public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
63
+ {
64
+ parent::__construct($request, $response, $invokeArgs);
65
+ $this->_basketApiHelper = Mage::helper('hcd/basketApi');
66
+ }
67
+
68
+ protected function log($message, $level = "DEBUG", $file = false)
69
+ {
70
+ $callers = debug_backtrace();
71
+ return Mage::helper('hcd/payment')->realLog($callers[1]['function'] . ' ' . $message, $level, $file);
72
+ }
73
+
74
+ protected function _expireAjax()
75
+ {
76
+ if (!$this->getCheckout()->getQuote()->hasItems()) {
77
+ $this->getResponse()->setHeader('HTTP/1.1', '403 Session Expired');
78
+ return false;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Get order model
84
+ *
85
+ * @return Mage_Sales_Model_Order
86
+ */
87
+ public function getOrder()
88
+ {
89
+ return Mage::getModel('sales/order');
90
+ }
91
+
92
+ /**
93
+ * Get checkout session namespace
94
+ *
95
+ * @return Mage_Checkout_Model_Session
96
+ */
97
+ public function getCheckout()
98
+ {
99
+ return Mage::getSingleton('checkout/session');
100
+ }
101
+
102
+ /**
103
+ * Get current quote
104
+ *
105
+ * @return Mage_Sales_Model_Quote
106
+ */
107
+ public function getQuote()
108
+ {
109
+ return $this->getCheckout()->getQuote();
110
+ }
111
+
112
+ /**
113
+ * Get hp session namespace
114
+ *
115
+ * @return Mage_Heidelpay_Model_Session
116
+ */
117
+ public function getSession()
118
+ {
119
+ return Mage::getSingleton('core/session');
120
+ }
121
+
122
+ protected function _getCheckout()
123
+ {
124
+ return Mage::getSingleton('checkout/session');
125
+ }
126
+
127
+ public function getOnepage()
128
+ {
129
+ return Mage::getSingleton('checkout/type_onepage');
130
+ }
131
+
132
+ public function getStore()
133
+ {
134
+ return Mage::app()->getStore()->getId();
135
+ }
136
+
137
+ /**
138
+ * successful return from Heidelpay payment
139
+ */
140
+ public function successAction()
141
+ {
142
+ $session = $this->getCheckout();
143
+ $order = Mage::getModel('sales/order');
144
+ $this->log('SuccessAction Session: '. json_encode($session->getLastRealOrderId()));
145
+ $order->loadByIncrementId($session->getLastRealOrderId());
146
+ if ($order->getPayment() === false) {
147
+ $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
148
+ return $this;
149
+ }
150
+
151
+ $noMail = (Mage::app()->getRequest()->getParam('no_mail') == 1) ? true : false;
152
+
153
+
154
+ $this->getCheckout()->getQuote()->setIsActive(false)->save();
155
+ $this->getCheckout()->clear();
156
+
157
+ $message = "";
158
+
159
+ $data = Mage::getModel('hcd/transaction')
160
+ ->loadLastTransactionDataByTransactionnr($session->getLastRealOrderId());
161
+
162
+ $this->log('SuccessAction Data: '. json_encode($data));
163
+
164
+ /*
165
+ * validate Hash to prevent manipulation
166
+ */
167
+ if (Mage::getModel('hcd/resource_encryption')
168
+ ->validateHash($data['IDENTIFICATION_TRANSACTIONID'], $data['CRITERION_SECRET']) === false
169
+ ) {
170
+ $this->log(
171
+ "Customer tries to redirect directly to success page. IP "
172
+ . Mage::app()->getRequest()->getServer('REMOTE_ADDR')
173
+ . " . This could be some kind of manipulation.", 'WARN'
174
+ );
175
+ $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
176
+ }
177
+
178
+ $session->unsHcdPaymentInfo();
179
+
180
+ if ($order->getPayment()->getMethodInstance()->getCode() != 'hcdiv' and
181
+ $order->getPayment()->getMethodInstance()->getCode() != 'hcdivsec') {
182
+ $info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
183
+ if ($info !== false) {
184
+ $session->setHcdPaymentInfo($info);
185
+ $order->setCustomerNote($info);
186
+ }
187
+ }
188
+
189
+ // last_quote_id workaround for trusted shop buyerprotection
190
+ $quoteID = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId();
191
+ $this->getCheckout()->setLastSuccessQuoteId($quoteID);
192
+ $this->log('LastQuteID :' . $quoteID);
193
+
194
+ if ($noMail === false) {
195
+ /** @var $orderStateHelper HeidelpayCD_Edition_Helper_OrderState */
196
+ $orderStateHelper = Mage::helper('hcd/orderState');
197
+ $orderStateHelper->mapStatus(
198
+ $data,
199
+ $order
200
+ );
201
+ }
202
+
203
+ if ($order->getId() and $noMail === false) {
204
+ $order->sendNewOrderEmail();
205
+ }
206
+
207
+ $order->save();
208
+ $this->_redirect('checkout/onepage/success', array('_secure' => true));
209
+ }
210
+
211
+ public function errorAction()
212
+ {
213
+ $session = $this->getCheckout();
214
+ $errorCode = null;
215
+ $order = Mage::getModel('sales/order');
216
+ $order->loadByIncrementId($session->getLastRealOrderId());
217
+ $this->log(' LastRealOrderId ' . json_encode($session->getLastRealOrderId()));
218
+
219
+ $request = Mage::app()->getRequest();
220
+ $getError = $request->getParam('HPError');
221
+
222
+
223
+ // in case of an error in the server to server request
224
+ $usersession = $this->getSession();
225
+ $data = Mage::getModel('hcd/transaction')
226
+ ->loadLastTransactionDataByTransactionnr($session->getLastRealOrderId());
227
+ $this->log(' data ' . json_encode($data));
228
+
229
+ if ($usersession->getHcdError() !== null) {
230
+ $message = Mage::helper('hcd/payment')
231
+ ->handleError($usersession->getHcdError(), $errorCode, (string)$order->getRealOrderId());
232
+ $intMessage = $usersession->getHcdError();
233
+ $data['PROCESSING_RESULT'] = 'NOK';
234
+ $usersession->unsHcdError();
235
+ } else {
236
+ if (isset($data['PROCESSING_RETURN_CODE'])) {
237
+ $errorCode = $data['PROCESSING_RETURN_CODE'];
238
+ }
239
+
240
+ if (isset($getError)) {
241
+ $errorCode = $getError;
242
+ $data['PROCESSING_RESULT'] = 'NOK';
243
+ }
244
+
245
+ $message = Mage::helper('hcd/payment')
246
+ ->handleError($data['PROCESSING_RETURN'], $errorCode, (string)$order->getRealOrderId());
247
+ $intMessage = (!empty($data['PROCESSING_RETURN'])) ? $data['PROCESSING_RETURN'] : $message;
248
+ }
249
+
250
+ $quoteId = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId();
251
+ // last_quote_id workaround for trusted shop buyerprotection
252
+
253
+ if ($quoteId) {
254
+ $quote = Mage::getModel('sales/quote')->load($quoteId);
255
+ if ($quote->getId()) {
256
+ $quote->setIsActive(true)->save();
257
+ $session->setQuoteId($quoteId);
258
+ }
259
+ }
260
+
261
+ /** @var $orderStateHelper HeidelpayCD_Edition_Helper_OrderState */
262
+ $orderStateHelper = Mage::helper('hcd/orderState');
263
+ $orderStateHelper->mapStatus(
264
+ $data,
265
+ $order,
266
+ $intMessage
267
+ );
268
+
269
+ $storeId = Mage::app()->getStore()->getId();
270
+ $redirectController = Mage::getStoreConfig("hcd/settings/returnurl", $storeId);
271
+
272
+ switch ($redirectController) {
273
+ case "basket":
274
+ $session->addError($message);
275
+ $this->_redirect('checkout/cart', array('_secure' => true));
276
+ break;
277
+ default:
278
+ $usersession->addError($message);
279
+ $this->_redirect('checkout/onepage', array('_secure' => true));
280
+ }
281
+ }
282
+
283
+ /**
284
+ * redirect return from Heidelpay payment (iframe)
285
+ */
286
+ public function indexAction()
287
+ {
288
+ $data = array();
289
+ $order = $this->getOrder();
290
+
291
+ $refId = false;
292
+ $basketId = false;
293
+
294
+ $session = $this->getCheckout();
295
+ $order->loadByIncrementId($session->getLastRealOrderId());
296
+ if ($order->getPayment() === false) {
297
+ $this->getResponse()->setRedirect(Mage::helper('customer')->getLoginUrl());
298
+ $this->setFlag('', self::FLAG_NO_DISPATCH, true);
299
+ return $this;
300
+ }
301
+
302
+ $payment = $order->getPayment()->getMethodInstance();
303
+
304
+ if ($session->getHcdWallet() !== false) {
305
+ $wallet = $session->getHcdWallet();
306
+ $refId = (!empty($wallet['referenceId'])) ? $wallet['referenceId'] : false;
307
+ $this->log('Wallet reference id :' . $refId);
308
+ }
309
+
310
+
311
+ if ($payment->canBasketApi() and empty($refId)) {
312
+ $shoppingCart = $this->_basketApiHelper->basketItems($order, $this->getStore());
313
+
314
+ $url = (Mage::getStoreConfig('hcd/settings/transactionmode', $this->getStore()) == 0)
315
+ ? $this->_liveBasketUrl : $this->_sandboxBasketUrl;
316
+
317
+ $this->log("doRequest shoppingcart : " . json_encode($shoppingCart), 'DEBUG');
318
+
319
+ $result = Mage::helper('hcd/payment')->doRequest($url, array('raw' => $shoppingCart));
320
+
321
+ if (array_key_exists('result', $result) && $result['result'] == 'NOK') {
322
+ $this->log(
323
+ 'Send basket to payment fail, because of : ' .
324
+ json_encode($result), 'ERROR'
325
+ );
326
+ Mage::getSingleton('core/session')->setHcdError($result['basketErrors']['message']);
327
+ $this->_redirect(
328
+ 'hcd/index/error',
329
+ array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)
330
+ );
331
+ return;
332
+ }
333
+
334
+ $this->log(
335
+ "doRequest shopping cart response : " .
336
+ json_encode($result), 'DEBUG'
337
+ );
338
+ $basketId = (array_key_exists('basketId', $result)) ? $result['basketId'] : false;
339
+ }
340
+
341
+
342
+ // if order status is cancel redirect to cancel page
343
+ if ($order->getStatus() == $payment->getStatusError()) {
344
+ $this->_redirect(
345
+ 'hcd/index/error',
346
+ array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)
347
+ );
348
+ return;
349
+ }
350
+
351
+ // if order status is success redirect to success page
352
+ if ($order->getStatus() == $payment->getStatusSuccess() or $order->getStatus() == $payment->getStatusPendig()) {
353
+ $this->_redirect(
354
+ 'hcd/index/success',
355
+ array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true, 'no_mail' => true)
356
+ );
357
+ return;
358
+ }
359
+
360
+
361
+ $data = $payment->getHeidelpayUrl(false, $basketId, $refId);
362
+
363
+ if ($data['POST_VALIDATION'] == 'ACK' and $data['PROCESSING_RESULT'] == 'ACK') {
364
+ if ($data['PAYMENT_CODE'] == "OT.PA") {
365
+ $quoteID = ($session->getLastQuoteId() === false) ? $session->getQuoteId() : $session->getLastQuoteId();
366
+ // last_quote_id workaround for trusted shop buyerprotection
367
+ $order->getPayment()->setTransactionId($quoteID);
368
+ $order->getPayment()->setIsTransactionClosed(true);
369
+ }
370
+
371
+ $order->setState(
372
+ $order->getPayment()->getMethodInstance()->getStatusPendig(false),
373
+ $order->getPayment()->getMethodInstance()->getStatusPendig(true),
374
+ Mage::helper('hcd')->__('Get payment url from Heidelpay -> ') . $data['FRONTEND_REDIRECT_URL']
375
+ );
376
+ $order->getPayment()->addTransaction(
377
+ Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
378
+ null,
379
+ true
380
+ );
381
+ $order->save();
382
+
383
+ $session->getQuote()->setIsActive(true)->save();
384
+ $session->clear();
385
+
386
+ if ($payment->activeRedirect() === true) {
387
+ $this->_redirectUrl($data['FRONTEND_REDIRECT_URL']);
388
+ return;
389
+ }
390
+
391
+ $this->loadLayout();
392
+ $this->log('RedirectUrl ' . $data['FRONTEND_PAYMENT_FRAME_URL']);
393
+ $this->log('CCHolder ' . $payment->getCustomerName());
394
+ $this->getLayout()->getBlock('hcd_index')->setHcdUrl($data['FRONTEND_PAYMENT_FRAME_URL']);
395
+ $this->getLayout()->getBlock('hcd_index')->setHcdCode($payment->getCode());
396
+ } else {
397
+ Mage::getModel('hcd/transaction')->saveTransactionData($data);
398
+ Mage::getSingleton('core/session')->setHcdError($data['PROCESSING_RETURN']);
399
+ $this->_redirect(
400
+ 'hcd/index/error',
401
+ array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)
402
+ );
403
+ }
404
+
405
+
406
+ $this->renderLayout();
407
+ return $this;
408
+ }
409
+
410
+ /**
411
+ * masterpass wallet controller
412
+ */
413
+ public function walletAction()
414
+ {
415
+ $data = array();
416
+ $request = Mage::app()->getRequest();
417
+ $paymentCode = $request->getParam('_wallet');
418
+ $storeId = $this->getStore();
419
+ $code = false;
420
+ $mageBasketId = (string)$this->getCheckout()->getQuoteId();
421
+
422
+ if ($paymentCode == 'hcdmpa') {
423
+ $code = 'hcdmpa';
424
+ }
425
+
426
+ $quote = $this->getOnepage()->getQuote();
427
+ if (!$quote->hasItems() || $quote->getHasError() || $code === false) {
428
+ $this->_redirect('checkout/cart');
429
+ return;
430
+ }
431
+
432
+
433
+ $shoppingCart = $this->_basketApiHelper->basketItems($quote, $storeId, false);
434
+
435
+ $url = (Mage::getStoreConfig(
436
+ 'hcd/settings/transactionmode',
437
+ $storeId
438
+ ) == 0) ? $this->_liveBasketUrl : $this->_sandboxBasketUrl;
439
+
440
+ $this->log("doRequest shoppingcart : " . json_encode($shoppingCart), 'DEBUG');
441
+ $this->log("doRequest shoppingcart : " . json_encode($shoppingCart), 'DEBUG');
442
+
443
+ $result = Mage::helper('hcd/payment')->doRequest($url, array('raw' => $shoppingCart));
444
+
445
+ if (array_key_exists('result', $result) && $result['result'] == 'NOK') {
446
+ $this->log(
447
+ 'Send basket to payment fail, because of : ' .
448
+ json_encode($result), 'ERROR'
449
+ );
450
+ $message = $this->_getHelper()
451
+ ->__('An unexpected error occurred. Please contact us to get further information.');
452
+ Mage::getSingleton('core/session')->addError($message);
453
+ $this->_redirect('checkout/cart', array('_secure' => true));
454
+ return;
455
+ }
456
+
457
+ $this->log("doRequest shoppingcart response : " . json_encode($result), 'DEBUG');
458
+
459
+ $config = array(
460
+ 'PAYMENT.METHOD' => preg_replace('/^hcd/', '', $code),
461
+ 'SECURITY.SENDER' => Mage::getStoreConfig('hcd/settings/security_sender', $storeId),
462
+ 'TRANSACTION.MODE' => (Mage::getStoreConfig(
463
+ 'hcd/settings/transactionmode',
464
+ $storeId
465
+ ) == 0) ? 'LIVE' : 'CONNECTOR_TEST',
466
+ 'URL' => (Mage::getStoreConfig(
467
+ 'hcd/settings/transactionmode',
468
+ $storeId
469
+ ) == 0) ? $this->_liveUrl : $this->_sandboxUrl,
470
+ 'USER.LOGIN' => trim(Mage::getStoreConfig('hcd/settings/user_id', $storeId)),
471
+ 'USER.PWD' => trim(Mage::getStoreConfig('hcd/settings/user_pwd', $storeId)),
472
+ 'TRANSACTION.CHANNEL' => trim(Mage::getStoreConfig('payment/' . $code . '/channel', $storeId)),
473
+ 'PAYMENT.TYPE' => 'IN'
474
+ );
475
+ $frontend = array(
476
+ 'FRONTEND.LANGUAGE' => Mage::helper('hcd/payment')->getLang(),
477
+ 'FRONTEND.RESPONSE_URL' => Mage::getUrl(
478
+ 'hcd/index/response',
479
+ array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true)
480
+ ),
481
+ 'CRITERION.SECRET' => Mage::getModel('hcd/resource_encryption')->getHash($mageBasketId),
482
+ 'CRITERION.LANGUAGE' => strtolower(Mage::helper('hcd/payment')->getLang()),
483
+ 'CRITERION.STOREID' => $storeId,
484
+ 'SHOP.TYPE' => 'Magento ' . Mage::getVersion(),
485
+ 'SHOPMODULE.VERSION' => 'HeidelpayCD Edition - '
486
+ . (string)Mage::getConfig()->getNode()->modules->HeidelpayCD_Edition->version,
487
+ 'WALLET.DIRECT_PAYMENT' => 'false'
488
+ );
489
+
490
+ $visitorData = Mage::getSingleton('core/session')->getVisitorData();
491
+
492
+ $user = array(
493
+ 'IDENTIFICATION.SHOPPERID' => $visitorData['visitor_id'],
494
+ 'NAME.GIVEN' => ' - ',
495
+ 'NAME.FAMILY' => ' - ',
496
+ 'ADDRESS.STREET' => ' - ',
497
+ 'ADDRESS.ZIP' => ' - ',
498
+ 'ADDRESS.CITY' => ' - ',
499
+ 'ADDRESS.COUNTRY' => 'DE',
500
+ 'CONTACT.EMAIL' => 'dummy@heidelpay.de',
501
+ 'CONTACT.IP' => (filter_var(
502
+ trim(Mage::app()->getRequest()->getClientIp()),
503
+ FILTER_VALIDATE_IP
504
+ )) ? trim(Mage::app()->getRequest()->getClientIp()) : '127.0.0.1'
505
+ );
506
+
507
+ $basketData = array(
508
+ 'PRESENTATION.AMOUNT' => Mage::helper('hcd/payment')->format($quote->getGrandTotal()),
509
+ 'PRESENTATION.CURRENCY' => $quote->getGlobalCurrencyCode(),
510
+ 'IDENTIFICATION.TRANSACTIONID' => $mageBasketId,
511
+ 'BASKET.ID' => (array_key_exists('basketId', $result)) ? $result['basketId'] : ''
512
+ );
513
+
514
+ $params = Mage::helper('hcd/payment')->preparePostData(
515
+ $config, $frontend, $user, $basketData,
516
+ $criterion = array()
517
+ );
518
+
519
+
520
+ $this->log("doRequest url : " . $config['URL'], 'DEBUG');
521
+ $this->log("doRequest params : " . json_encode($params), 'DEBUG');
522
+ $data = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
523
+ $this->log("doRequest response : " . json_encode($data), 'DEBUG');
524
+
525
+
526
+ if ($data['POST_VALIDATION'] == 'ACK' and $data['PROCESSING_RESULT'] == 'ACK') {
527
+ /** Redirect on Success */
528
+ $this->_redirectUrl(trim($data['FRONTEND_REDIRECT_URL']));
529
+ return;
530
+ } else {
531
+ /** Error Case */
532
+ $this->log('Wallet Redirect for ' . $code . ' fail, because of : ' . $data['PROCESSING_RETURN'], 'ERROR');
533
+ $message = $this->_getHelper()
534
+ ->__('An unexpected error occurred. Please contact us to get further information.');
535
+ Mage::getSingleton('core/session')->addError($message);
536
+ $this->_redirect('checkout/cart', array('_secure' => true));
537
+ return;
538
+ }
539
+ }
540
+
541
+ /**
542
+ * Controller for push notification
543
+ */
544
+ public function pushAction()
545
+ {
546
+ $rawPost = false;
547
+ $lastdata = null;
548
+ $request = Mage::app()->getRequest();
549
+ $rawPost = $request->getRawBody();
550
+
551
+ if ($rawPost === false) {
552
+ $this->_redirect('', array('_secure' => true));
553
+ }
554
+
555
+ /** Hack to remove a structure problem in criterion node */
556
+ $rawPost = preg_replace('/<Criterion(\s+)name="(.+?)">(.+?)<\/Criterion>/', '<$2>$3</$2>', $rawPost);
557
+
558
+ $xml = simplexml_load_string($rawPost);
559
+
560
+ $this->log('XML Object from Push : ' . $rawPost);
561
+
562
+ // @codingStandardsIgnoreStart simplexml notation
563
+ list($type, $methode) = Mage::helper('hcd/payment')
564
+ ->splitPaymentCode((string)$xml->Transaction->Payment['code']);
565
+
566
+ if ($methode == 'RG') {
567
+ return;
568
+ }
569
+
570
+ $hash = (string)$xml->Transaction->Analysis->SECRET;
571
+ $orderID = (string)$xml->Transaction->Identification->TransactionID;
572
+ // @codingStandardsIgnoreEnd
573
+
574
+ if (Mage::getModel('hcd/resource_encryption')->validateHash($orderID, $hash) === false) {
575
+ $this->log(
576
+ "Get response form server " . Mage::app()->getRequest()->getServer('REMOTE_ADDR')
577
+ . " with an invalid hash. This could be some kind of manipulation.",
578
+ 'WARN'
579
+ );
580
+ $this->_redirect('', array('_forced_secure' => true, '_store_to_url' => true, '_nosid' => true));
581
+ return;
582
+ }
583
+
584
+ // @codingStandardsIgnoreStart simplexml notation
585
+ $xmlData = array(
586
+ 'PAYMENT_CODE' => (string)$xml->Transaction->Payment['code'],
587
+ 'IDENTIFICATION_TRANSACTIONID' => (string)$orderID,
588
+ 'IDENTIFICATION_UNIQUEID' => (string)$xml->Transaction->Identification->UniqueID,
589
+ 'PROCESSING_RESULT' => (string)$xml->Transaction->Processing->Result,
590
+ 'IDENTIFICATION_SHORTID' => (string)$xml->Transaction->Identification->ShortID,
591
+ 'PROCESSING_STATUS_CODE' => (string)$xml->Transaction->Processing->Status['code'],
592
+ 'PROCESSING_RETURN' => (string)$xml->Transaction->Processing->Return,
593
+ 'PROCESSING_RETURN_CODE' => (string)$xml->Transaction->Processing->Return['code'],
594
+ 'PRESENTATION_AMOUNT' => (string)$xml->Transaction->Payment->Presentation->Amount,
595
+ 'PRESENTATION_CURRENCY' => (string)$xml->Transaction->Payment->Presentation->Currency,
596
+ 'IDENTIFICATION_REFERENCEID' => (string)$xml->Transaction->Identification->ReferenceID,
597
+ 'CRITERION_STOREID' => (int)$xml->Transaction->Analysis->STOREID,
598
+ 'ACCOUNT_BRAND' => false,
599
+ 'CRITERION_LANGUAGE' => strtoupper((string)$xml->Transaction->Analysis->LANGUAGE)
600
+ );
601
+ // @codingStandardsIgnoreEnd
602
+
603
+ $order = $this->getOrder();
604
+ $order->loadByIncrementId($orderID);
605
+ $paymentCode = $order->getPayment()->getMethodInstance()->getCode();
606
+
607
+ switch ($paymentCode) {
608
+ case 'hcddd':
609
+ // @codingStandardsIgnoreStart simplexml notation
610
+ $xmlData['CLEARING_AMOUNT'] = (string)$xml->Transaction->Payment->Clearing->Amount;
611
+ $xmlData['CLEARING_CURRENCY'] = (string)$xml->Transaction->Payment->Clearing->Currency;
612
+ $xmlData['ACCOUNT_IBAN'] = (string)$xml->Transaction->Account->Iban;
613
+ $xmlData['ACCOUNT_BIC'] = (string)$xml->Transaction->Account->Bic;
614
+ $xmlData['ACCOUNT_IDENTIFICATION'] = (string)$xml->Transaction->Account->Identification;
615
+ $xmlData['IDENTIFICATION_CREDITOR_ID'] = (string)$xml->Transaction->Identification->CreditorID;
616
+ // @codingStandardsIgnoreEnd
617
+ break;
618
+ case 'hcdbs':
619
+ if ($methode == 'FI') {
620
+ // @codingStandardsIgnoreStart simplexml notation
621
+ $xmlData['CRITERION_BILLSAFE_LEGALNOTE'] = (string)$xml->Transaction->Analysis->BILLSAFE_LEGALNOTE;
622
+ $xmlData['CRITERION_BILLSAFE_AMOUNT'] = (string)$xml->Transaction->Analysis->BILLSAFE_AMOUNT;
623
+ $xmlData['CRITERION_BILLSAFE_CURRENCY'] = (string)$xml->Transaction->Analysis->BILLSAFE_CURRENCY;
624
+ $xmlData['CRITERION_BILLSAFE_RECIPIENT'] = (string)$xml->Transaction->Analysis->BILLSAFE_RECIPIENT;
625
+ $xmlData['CRITERION_BILLSAFE_IBAN'] = (string)$xml->Transaction->Analysis->BILLSAFE_IBAN;
626
+ $xmlData['CRITERION_BILLSAFE_BIC'] = (string)$xml->Transaction->Analysis->BILLSAFE_BIC;
627
+ $xmlData['CRITERION_BILLSAFE_REFERENCE'] = (string)$xml->Transaction->Analysis->BILLSAFE_REFERENCE;
628
+ $xmlData['CRITERION_BILLSAFE_PERIOD'] = (string)$xml->Transaction->Analysis->BILLSAFE_PERIOD;
629
+ $xmlData['ACCOUNT_BRAND'] = 'BILLSAFE';
630
+ // @codingStandardsIgnoreEnd
631
+ }
632
+ break;
633
+ }
634
+
635
+ // @codingStandardsIgnoreLine simplexml notation
636
+ if (!empty($xml->Transaction->Identification->UniqueID)) {
637
+ $lastdata = Mage::getModel('hcd/transaction')
638
+ ->loadLastTransactionDataByUniqeId($xmlData['IDENTIFICATION_UNIQUEID']);
639
+ }
640
+
641
+ if ($lastdata === false) {
642
+ Mage::getModel('hcd/transaction')->saveTransactionData($xmlData, 'push');
643
+ }
644
+
645
+
646
+ $this->log('PaymentCode ' . $paymentCode);
647
+
648
+ $this->log($type . " " . $methode);
649
+
650
+ if ($methode == 'CB' or
651
+ $methode == 'RC' or
652
+ $methode == 'CP' or
653
+ $methode == 'DB' or
654
+ ($methode == 'FI' and $paymentCode == 'hcdbs')
655
+ ) {
656
+ /** @var $orderStateHelper HeidelpayCD_Edition_Helper_OrderState */
657
+ $orderStateHelper = Mage::helper('hcd/orderState');
658
+ $orderStateHelper->mapStatus(
659
+ $xmlData,
660
+ $order
661
+ );
662
+ }
663
+ }
664
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/HeidelpayCD/Edition/controllers/ResponseController.php ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Index controller
5
+ *
6
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
7
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
8
+ *
9
+ * @link https://dev.heidelpay.de/magento
10
+ *
11
+ * @author Jens Richter
12
+ *
13
+ * @package Heidelpay
14
+ * @subpackage Magento
15
+ * @category Magento
16
+ */
17
+ // @codingStandardsIgnoreLine
18
+ class HeidelpayCD_Edition_ResponseController extends Mage_Core_Controller_Front_Action
19
+ {
20
+ protected $_sendNewOrderEmail = true;
21
+ protected $_invoiceOrderEmail = true;
22
+ protected $_order = null;
23
+ protected $_paymentInst = null;
24
+ protected $_debug = true;
25
+
26
+ protected function _getHelper()
27
+ {
28
+ return Mage::helper('hcd');
29
+ }
30
+
31
+ protected function log($message, $level = "DEBUG", $file = false)
32
+ {
33
+ $callers = debug_backtrace();
34
+ return Mage::helper('hcd/payment')->realLog($callers[1]['function'] . ' ' . $message, $level, $file);
35
+ }
36
+
37
+ protected function _expireAjax()
38
+ {
39
+ if (!$this->getCheckout()->getQuote()->hasItems()) {
40
+ $this->getResponse()->setHeader('HTTP/1.1', '403 Session Expired');
41
+ return false;
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Get order model
47
+ *
48
+ * @return Mage_Sales_Model_Order
49
+ */
50
+ public function getOrder()
51
+ {
52
+ return Mage::getModel('sales/order');
53
+ }
54
+
55
+ /**
56
+ * Get checkout session namespace
57
+ *
58
+ * @return Mage_Checkout_Model_Session
59
+ */
60
+ public function getCheckout()
61
+ {
62
+ return Mage::getSingleton('checkout/session');
63
+ }
64
+
65
+ /**
66
+ * Get current quote
67
+ *
68
+ * @return Mage_Sales_Model_Quote
69
+ */
70
+ public function getQuote()
71
+ {
72
+ return $this->getCheckout()->getQuote();
73
+ }
74
+
75
+ /**
76
+ * Get hp session namespace
77
+ *
78
+ * @return Mage_Core_Model_Abstract
79
+ */
80
+ public function getSession()
81
+ {
82
+ return Mage::getSingleton('core/session');
83
+ }
84
+
85
+ /**
86
+ * @return Mage_Checkout_Model_Session
87
+ */
88
+ protected function _getCheckout()
89
+ {
90
+ return Mage::getSingleton('checkout/session');
91
+ }
92
+
93
+ public function getOnepage()
94
+ {
95
+ return Mage::getSingleton('checkout/type_onepage');
96
+ }
97
+
98
+ public function getStore()
99
+ {
100
+ return Mage::app()->getStore()->getId();
101
+ }
102
+
103
+ public function indexAction()
104
+ {
105
+ $response = Mage::app()->getRequest();
106
+ $response->setParamSources(array('_POST'));
107
+ $data = array();
108
+
109
+ $this->log('ResponseController');
110
+
111
+ $securityHash = $response->getPost('CRITERION_SECRET');
112
+
113
+ $transactionId = $response->getPOST('IDENTIFICATION_TRANSACTIONID');
114
+ $data['IDENTIFICATION_TRANSACTIONID'] =
115
+ (!empty($transactionId))
116
+ ? $response->getPOST('IDENTIFICATION_TRANSACTIONID')
117
+ : $response->getPOST('IDENTIFICATION_SHOPPERID');
118
+ /*
119
+ * validate Hash to prevent manipulation
120
+ */
121
+ if (Mage::getModel('hcd/resource_encryption')
122
+ ->validateHash(
123
+ $data['IDENTIFICATION_TRANSACTIONID'],
124
+ $securityHash
125
+ ) === false
126
+ ) {
127
+ // @codingStandardsIgnoreLine should be refactored - issue #5
128
+ print Mage::getUrl(
129
+ 'hcd/index/error', array(
130
+ '_forced_secure' => true,
131
+ '_store_to_url' => true,
132
+ '_nosid' => true
133
+ )
134
+ );
135
+ $this->log(
136
+ "Get response form server "
137
+ . $response->getServer('REMOTE_ADDR')
138
+ . " with an invalid hash. This could be some kind of manipulation.",
139
+ 'WARN'
140
+ );
141
+ return;
142
+ }
143
+
144
+ $data= $response->getParams();
145
+
146
+
147
+ $paymentCode = Mage::helper('hcd/payment')->splitPaymentCode($data['PAYMENT_CODE']);
148
+
149
+ $this->log("Post params: " . json_encode($data));
150
+
151
+ if ($paymentCode[1] == 'RG') {
152
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
153
+ $message = Mage::helper('hcd/payment')->handleError(
154
+ $data['PROCESSING_RETURN'],
155
+ $data['PROCESSING_RETURN_CODE']
156
+ );
157
+ $checkout = $this->getCheckout()->addError($message);
158
+ $url = Mage::getUrl(
159
+ 'hcd/index/error', array(
160
+ '_forced_secure' => true,
161
+ '_store_to_url' => true,
162
+ '_nosid' => true,
163
+ 'HPError' => $data['PROCESSING_RETURN_CODE']
164
+ )
165
+ );
166
+ } else {
167
+ // save cc and dc registration data
168
+ $this->saveCustomerRegistration($data, $paymentCode);
169
+
170
+ $url = Mage::getUrl('hcd/', array('_secure' => true));
171
+ }
172
+ } elseif ($paymentCode[1] == 'IN' and $response->getPost('WALLET_DIRECT_PAYMENT') == 'false') {
173
+ // Back to checkout after wallet init
174
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
175
+ $this->log(
176
+ 'Wallet for basketId '
177
+ . $data['IDENTIFICATION_TRANSACTIONID']
178
+ . ' failed because of '
179
+ . $data['PROCESSING_RETURN'],
180
+ 'NOTICE'
181
+ );
182
+ $url = Mage::getUrl('checkout/cart', array('_secure' => true));
183
+ } else {
184
+ $url = Mage::getUrl('hcd/checkout/', array('_secure' => true, '_wallet' => 'hcdmpa'));
185
+ }
186
+
187
+ Mage::getModel('hcd/transaction')->saveTransactionData($data);
188
+ } else {
189
+ /* load order */
190
+ $order = $this->getOrder();
191
+ $order->loadByIncrementId($data['IDENTIFICATION_TRANSACTIONID']);
192
+ if ($order->getPayment() !== false) {
193
+ $payment = $order->getPayment()->getMethodInstance();
194
+ }
195
+
196
+ $this->log('UniqeID: ' . $data['IDENTIFICATION_UNIQUEID']);
197
+
198
+
199
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
200
+ if (isset($data['FRONTEND_REQUEST_CANCELLED'])) {
201
+ $url = $data['FRONTEND_FAILURE_URL'];
202
+ } else {
203
+ $url = $data['FRONTEND_FAILURE_URL'];
204
+ }
205
+ } elseif (($paymentCode[1] == 'CP' or
206
+ $paymentCode[1] == 'DB' or
207
+ $paymentCode[1] == 'FI' or
208
+ $paymentCode[1] == 'RC')
209
+ and ($data['PROCESSING_RESULT'] == 'ACK' and $data['PROCESSING_STATUS_CODE'] != 80)
210
+ ) {
211
+ $url = $data['FRONTEND_SUCCESS_URL'];
212
+ } else {
213
+ $url = $data['FRONTEND_SUCCESS_URL'];
214
+ }
215
+
216
+ Mage::getModel('hcd/transaction')->saveTransactionData($data);
217
+ }
218
+
219
+ $this->log('Url: ' . $url);
220
+
221
+ // @codingStandardsIgnoreLine should be refactored - issue #5
222
+ print $url;
223
+ }
224
+
225
+ /**
226
+ * Save customer registration
227
+ *
228
+ * @param $data HeidelpayCD_Edition_Model_Transaction
229
+ * @param $paymentCode array
230
+ *
231
+ * @return HeidelpayCD_Edition_Model_Customer
232
+ */
233
+ protected function saveCustomerRegistration($data, $paymentCode)
234
+ {
235
+ /** @var $customerData HeidelpayCD_Edition_Model_Customer */
236
+ $customerData = Mage::getModel('hcd/customer');
237
+ $currentPayment = 'hcd' . strtolower($paymentCode[0]);
238
+ $storeId = ($data['CRITERION_GUEST'] == 'true')
239
+ ? 0 : trim($data['CRITERION_STOREID']);
240
+ $registrationData = Mage::getModel('hcd/customer')
241
+ ->getCollection()
242
+ ->addFieldToFilter('Customerid', trim($data['IDENTIFICATION_SHOPPERID']))
243
+ ->addFieldToFilter('Storeid', $storeId)
244
+ ->addFieldToFilter('Paymentmethode', trim($currentPayment));
245
+ $registrationData->load();
246
+ $returnData = $registrationData->getData();
247
+ if (!empty($returnData[0]['id'])) {
248
+ $customerData->setId((int)$returnData[0]['id']);
249
+ }
250
+
251
+ $customerData->setPaymentmethode($currentPayment);
252
+ $customerData->setUniqeid($data['IDENTIFICATION_UNIQUEID']);
253
+ $customerData->setCustomerid($data['IDENTIFICATION_SHOPPERID']);
254
+ $customerData->setStoreid($storeId);
255
+ $customerData->setPaymentData(
256
+ Mage::getModel('hcd/resource_encryption')
257
+ ->encrypt(
258
+ json_encode(
259
+ array(
260
+ 'ACCOUNT.REGISTRATION' => $data['IDENTIFICATION_UNIQUEID'],
261
+ 'SHIPPPING_HASH' => $data['CRITERION_SHIPPPING_HASH'],
262
+ 'ACCOUNT_BRAND' => $data['ACCOUNT_BRAND'],
263
+ 'ACCOUNT_NUMBER' => $data['ACCOUNT_NUMBER'],
264
+ 'ACCOUNT_HOLDER' => $data['ACCOUNT_HOLDER'],
265
+ 'ACCOUNT_EXPIRY_MONTH' => $data['ACCOUNT_EXPIRY_MONTH'],
266
+ 'ACCOUNT_EXPIRY_YEAR' => $data['ACCOUNT_EXPIRY_YEAR']
267
+ )
268
+ )
269
+ )
270
+ );
271
+
272
+ return $customerData->save();
273
+ }
274
+ }
app/code/community/HeidelpayCD/Edition/etc/config.xml CHANGED
@@ -1,68 +1,61 @@
1
  <?xml version="1.0"?>
2
  <config>
3
- <modules>
4
- <HeidelpayCD_Edition>
5
- <version>16.6.22</version>
6
- </HeidelpayCD_Edition>
7
- </modules>
8
- <global>
9
- <helpers>
10
- <hcd>
11
- <class>HeidelpayCD_Edition_Helper</class>
12
- </hcd>
13
- </helpers>
14
- <models>
15
- <hcd>
16
  <class>HeidelpayCD_Edition_Model</class>
17
- <resourceModel>hcd_resource</resourceModel>
18
- </hcd>
19
- <hcd_resource>
20
  <class>HeidelpayCD_Edition_Model_Mysql4</class>
21
  <entities>
22
  <transaction>
23
  <table>heidelpay_transaction</table>
24
  </transaction>
25
- <customer>
26
  <table>heidelpay_customer</table>
27
  </customer>
28
  </entities>
29
- </hcd_resource>
30
- <!--
31
- <sales>
32
- <rewrite>
33
- <order_pdf_invoice>HeidelpayCD_Edition_Model_Order_Pdf_Invoice</order_pdf_invoice>
34
- </rewrite>
35
- </sales>
36
- -->
37
- </models>
38
- <blocks>
39
- <hcd>
40
- <class>HeidelpayCD_Edition_Block</class>
41
- </hcd>
42
- </blocks>
43
- <resources>
44
  <hcd_setup>
45
  <setup>
46
  <module>HeidelpayCD_Edition</module>
47
  </setup>
48
- </hcd_setup>
49
- <hcd_write>
50
- <connection>
51
- <use>core_write</use>
52
- </connection>
53
- </hcd_write>
54
- <hcd_read>
55
- <connection>
56
- <use>core_read</use>
57
- </connection>
58
- </hcd_read>
59
  </resources>
60
- <payment>
61
  <groups>
62
  <hcd>Heidelpay CD-Edition</hcd>
63
  </groups>
64
  </payment>
65
- <events>
66
  <checkout_onepage_controller_success_action>
67
  <observers>
68
  <controller_action_before>
@@ -71,314 +64,307 @@
71
  </controller_action_before>
72
  </observers>
73
  </checkout_onepage_controller_success_action>
74
- <controller_action_predispatch_checkout>
75
- <observers>
76
  <controller_action_before>
77
  <class>hcd/observer</class>
78
  <method>handleWalletDataDuringCheckout</method>
79
  </controller_action_before>
80
  </observers>
81
- </controller_action_predispatch_checkout>
82
- <sales_order_shipment_save_before>
83
- <observers>
84
- <reportShippingToHeidelpay>
85
- <class>hcd/observer</class>
86
- <method>reportShippingToHeidelpay</method>
87
- </reportShippingToHeidelpay>
88
- </observers>
89
- </sales_order_shipment_save_before>
90
- <!--
91
- <sales_order_invoice_save_after>
92
- <observers>
93
- <saveInvoice>
94
- <class>hcd/observer</class>
95
- <method>saveInvoice</method>
96
- </saveInvoice>
97
- </observers>
98
- </sales_order_invoice_save_after>
99
- -->
100
  </events>
101
- <template>
102
- <email>
103
- <hcd_payment_info>
104
- <label>Heidelpay payment informations</label>
105
- <file>sales/hcd_payment_info.html</file>
106
- <type>html</type>
107
- </hcd_payment_info>
108
- </email>
109
- </template>
110
- </global>
111
- <frontend>
112
- <secure_url>
113
- <hcd_payment>hcd/</hcd_payment>
114
- </secure_url>
115
- <routers>
116
- <hcd>
117
- <use>standard</use>
118
- <args>
119
- <module>HeidelpayCD_Edition</module>
120
- <frontName>hcd</frontName>
121
- </args>
122
- </hcd>
123
- </routers>
124
- <translate>
125
- <modules>
126
- <HeidelpayCD_Edition>
127
- <files>
128
- <default>HeidelpayCD_Edition.csv</default>
129
- </files>
130
- </HeidelpayCD_Edition>
131
- </modules>
132
- </translate>
133
- <layout>
134
- <updates>
135
- <hcd>
136
- <file>hcd.xml</file>
137
- </hcd>
138
- </updates>
139
- </layout>
140
- </frontend>
141
- <adminhtml>
142
- <translate>
143
- <modules>
144
- <HeidelpayCD_Edition>
145
- <files>
146
- <default>HeidelpayCD_Edition.csv</default>
147
- </files>
148
- </HeidelpayCD_Edition>
149
- </modules>
150
- </translate>
151
- <acl>
152
- <resources>
153
- <admin>
154
- <children>
155
- <system>
156
- <children>
157
- <config>
158
- <children>
159
- <hcd>
160
- <title>HeidelpayCD Edition</title>
161
- </hcd>
162
- </children>
163
- </config>
164
- </children>
165
- </system>
166
- </children>
167
- </admin>
168
- </resources>
169
- </acl>
170
- </adminhtml>
171
- <default>
172
- <hcd>
173
- <settings>
174
- <transactionmode>1</transactionmode>
175
- <security_sender>31HA07BC8142C5A171745D00AD63D182</security_sender>
176
- <user_id>31ha07bc8142c5a171744e5aef11ffd3</user_id>
177
- <user_pwd>93167DE7</user_pwd>
178
- <log>0</log>
179
- <invoicing>0</invoicing>
180
- <returnurl>onepage</returnurl>
181
- </settings>
182
- </hcd>
183
- <payment>
184
- <hcdcc>
185
- <group>hcd</group>
186
- <title>Credit Card</title>
187
- <active>0</active>
188
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
189
- <bookingmode>DB</bookingmode>
190
- <invioce>1</invioce>
191
- <capture_on_delivery>0</capture_on_delivery>
192
- <model>hcd/payment_hcdcc</model>
193
- <sort_order>1</sort_order>
194
- <min_amount>0</min_amount>
195
- <max_amount>0</max_amount>
196
- <allowspecific>0</allowspecific>
197
- </hcdcc>
198
- <hcddc>
199
- <group>hcd</group>
200
- <title>Debit Card</title>
201
- <active>0</active>
202
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
203
- <bookingmode>DB</bookingmode>
204
- <invioce>1</invioce>
205
- <capture_on_delivery>0</capture_on_delivery>
206
- <model>hcd/payment_hcddc</model>
207
- <sort_order>1</sort_order>
208
- <min_amount>0</min_amount>
209
- <max_amount>0</max_amount>
210
- <allowspecific>0</allowspecific>
211
- </hcddc>
212
- <hcddd>
213
- <group>hcd</group>
214
- <title>Direct Debit - Lastschrift</title>
215
- <active>0</active>
216
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
217
- <bookingmode>DB</bookingmode>
218
- <insurence>0</insurence>
219
- <invioce>1</invioce>
220
- <capture_on_delivery>0</capture_on_delivery>
221
- <model>hcd/payment_hcddd</model>
222
- <sort_order>1</sort_order>
223
- <min_amount>0</min_amount>
224
- <max_amount>0</max_amount>
225
- <allowspecific>0</allowspecific>
226
- </hcddd>
227
- <hcdsu>
228
- <group>hcd</group>
229
- <title>SOFORT Überweisung</title>
230
- <active>0</active>
231
- <channel>31HA07BC8142C5A171749CDAA43365D2</channel>
232
- <invioce>1</invioce>
233
- <model>hcd/payment_hcdsu</model>
234
- <sort_order>1</sort_order>
235
- <min_amount>0</min_amount>
236
- <max_amount>0</max_amount>
237
- <allowspecific>1</allowspecific>
238
- <specificcountry>BE,DE,IT,NL,AT,SI,ES</specificcountry>
239
- </hcdsu>
240
- <hcdgp>
241
- <group>hcd</group>
242
- <title>Giropay</title>
243
- <active>0</active>
244
- <channel>31HA07BC8142C5A171740166AF277E03</channel>
245
- <invioce>1</invioce>
246
- <model>hcd/payment_hcdgp</model>
247
- <sort_order>1</sort_order>
248
- <min_amount>0</min_amount>
249
- <max_amount>0</max_amount>
250
- <allowspecific>0</allowspecific>
251
- </hcdgp>
252
- <hcdbs>
253
- <group>hcd</group>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  <title>Kauf auf Rechnung</title>
255
  <active>0</active>
256
  <channel>31HA07BC8142EE6D02715F4CA97DDD8B</channel>
257
  <model>hcd/payment_hcdbs</model>
258
- <invioce>1</invioce>
259
- <sort_order>1</sort_order>
260
  <min_amount>0</min_amount>
261
  <max_amount>0</max_amount>
262
  <allowspecific>1</allowspecific>
263
- <specificcountry>DE</specificcountry>
264
- </hcdbs>
265
- <hcdmk>
266
- <group>hcd</group>
267
- <title>MangirKart</title>
268
  <active>0</active>
269
- <channel>31HA07BC8142EE6D0271011E4508C3F2</channel>
270
- <invioce>1</invioce>
271
- <model>hcd/payment_hcdmk</model>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  <sort_order>1</sort_order>
273
  <min_amount>10</min_amount>
274
  <max_amount>0</max_amount>
 
 
 
 
 
 
 
 
 
 
 
 
275
  <allowspecific>1</allowspecific>
276
- <specificcountry>TR</specificcountry>
277
- </hcdmk>
278
- <hcdpal>
279
- <group>hcd</group>
280
- <title>Pay Pal</title>
281
- <active>0</active>
282
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
283
- <bookingmode>DB</bookingmode>
284
- <invioce>1</invioce>
285
- <capture_on_delivery>0</capture_on_delivery>
286
- <model>hcd/payment_hcdpal</model>
287
- <payment_action>Authorization</payment_action>
288
- <sort_order>1</sort_order>
289
- <min_amount>0</min_amount>
290
- <max_amount>0</max_amount>
291
- <allowspecific>0</allowspecific>
292
- </hcdpal>
293
- <hcdpp>
294
- <group>hcd</group>
295
- <title>Prepayment</title>
296
- <active>0</active>
297
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
298
- <invioce>1</invioce>
299
- <model>hcd/payment_hcdpp</model>
300
- <sort_order>1</sort_order>
301
- <min_amount>0</min_amount>
302
- <max_amount>0</max_amount>
303
- <allowspecific>0</allowspecific>
304
- </hcdpp>
305
- <hcdiv>
306
- <group>hcd</group>
307
- <title>Invoice</title>
308
- <active>0</active>
309
- <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
310
- <invioce>0</invioce>
311
- <capture_on_delivery>0</capture_on_delivery>
312
- <model>hcd/payment_hcdiv</model>
313
- <sort_order>1</sort_order>
314
- <min_amount>0</min_amount>
315
- <max_amount>0</max_amount>
316
- <allowspecific>0</allowspecific>
317
- </hcdiv>
318
- <hcdpf>
319
- <group>hcd</group>
320
- <title>Postfinance</title>
321
- <active>0</active>
322
- <channel>31HA07BC811E8AEF9AB2733D80C21DA8</channel>
323
- <invioce>1</invioce>
324
- <model>hcd/payment_hcdpf</model>
325
- <sort_order>1</sort_order>
326
- <min_amount>0</min_amount>
327
- <max_amount>0</max_amount>
328
- <allowspecific>1</allowspecific>
329
- <specificcountry>CH</specificcountry>
330
- </hcdpf>
331
- <hcdeps>
332
- <group>hcd</group>
333
- <title>EPS</title>
334
- <active>0</active>
335
- <channel></channel>
336
- <invioce>1</invioce>
337
- <model>hcd/payment_hcdeps</model>
338
- <sort_order>1</sort_order>
339
- <min_amount>0</min_amount>
340
- <max_amount>0</max_amount>
341
- <allowspecific>1</allowspecific>
342
- <specificcountry>AT</specificcountry>
343
- </hcdeps>
344
- <hcdide>
345
- <group>hcd</group>
346
- <title>Ideal</title>
347
- <active>0</active>
348
- <channel>31HA07BC8142C5A171744B56E61281E5</channel>
349
- <invioce>1</invioce>
350
- <model>hcd/payment_hcdide</model>
351
- <sort_order>1</sort_order>
352
- <min_amount>0</min_amount>
353
- <max_amount>0</max_amount>
354
- <allowspecific>1</allowspecific>
355
- <specificcountry>NL</specificcountry>
356
- </hcdide>
357
- <hcdyt>
358
- <group>hcd</group>
359
- <title>Yapital</title>
360
- <active>0</active>
361
- <channel>31HA07BC81227C932DE1270DED97C5ED</channel>
362
- <invioce>1</invioce>
363
- <model>hcd/payment_hcdyt</model>
364
- <sort_order>1</sort_order>
365
- <min_amount>0</min_amount>
366
- <max_amount>0</max_amount>
367
- <allowspecific>0</allowspecific>
368
- </hcdyt>
369
- <hcdmpa>
370
- <group>hcd</group>
371
- <title>MasterPass</title>
372
- <active>0</active>
373
- <channel>31HA07BC814948E72EF669CA3BB1431F</channel>
374
- <invioce>1</invioce>
375
- <capture_on_delivery>0</capture_on_delivery>
376
- <model>hcd/payment_hcdmpa</model>
377
- <sort_order>1</sort_order>
378
- <min_amount>0</min_amount>
379
- <max_amount>0</max_amount>
380
- <allowspecific>0</allowspecific>
381
- </hcdmpa>
382
- </payment>
383
- </default>
384
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
+ <modules>
4
+ <HeidelpayCD_Edition>
5
+ <version>17.3.30</version>
6
+ </HeidelpayCD_Edition>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <hcd>
11
+ <class>HeidelpayCD_Edition_Helper</class>
12
+ </hcd>
13
+ </helpers>
14
+ <models>
15
+ <hcd>
16
  <class>HeidelpayCD_Edition_Model</class>
17
+ <resourceModel>hcd_resource</resourceModel>
18
+ </hcd>
19
+ <hcd_resource>
20
  <class>HeidelpayCD_Edition_Model_Mysql4</class>
21
  <entities>
22
  <transaction>
23
  <table>heidelpay_transaction</table>
24
  </transaction>
25
+ <customer>
26
  <table>heidelpay_customer</table>
27
  </customer>
28
  </entities>
29
+ </hcd_resource>
30
+ </models>
31
+ <blocks>
32
+ <hcd>
33
+ <class>HeidelpayCD_Edition_Block</class>
34
+ </hcd>
35
+ </blocks>
36
+ <resources>
 
 
 
 
 
 
 
37
  <hcd_setup>
38
  <setup>
39
  <module>HeidelpayCD_Edition</module>
40
  </setup>
41
+ </hcd_setup>
42
+ <hcd_write>
43
+ <connection>
44
+ <use>core_write</use>
45
+ </connection>
46
+ </hcd_write>
47
+ <hcd_read>
48
+ <connection>
49
+ <use>core_read</use>
50
+ </connection>
51
+ </hcd_read>
52
  </resources>
53
+ <payment>
54
  <groups>
55
  <hcd>Heidelpay CD-Edition</hcd>
56
  </groups>
57
  </payment>
58
+ <events>
59
  <checkout_onepage_controller_success_action>
60
  <observers>
61
  <controller_action_before>
64
  </controller_action_before>
65
  </observers>
66
  </checkout_onepage_controller_success_action>
67
+ <controller_action_predispatch_checkout>
68
+ <observers>
69
  <controller_action_before>
70
  <class>hcd/observer</class>
71
  <method>handleWalletDataDuringCheckout</method>
72
  </controller_action_before>
73
  </observers>
74
+ </controller_action_predispatch_checkout>
75
+ <sales_order_shipment_save_before>
76
+ <observers>
77
+ <reportShippingToHeidelpay>
78
+ <class>hcd/observer</class>
79
+ <method>reportShippingToHeidelpay</method>
80
+ </reportShippingToHeidelpay>
81
+ </observers>
82
+ </sales_order_shipment_save_before>
 
 
 
 
 
 
 
 
 
 
83
  </events>
84
+ <template>
85
+ <email>
86
+ <hcd_payment_info>
87
+ <label>Heidelpay payment informations</label>
88
+ <file>sales/hcd_payment_info.html</file>
89
+ <type>html</type>
90
+ </hcd_payment_info>
91
+ </email>
92
+ </template>
93
+ </global>
94
+ <frontend>
95
+ <secure_url>
96
+ <hcd_payment>hcd/</hcd_payment>
97
+ </secure_url>
98
+ <routers>
99
+ <hcd>
100
+ <use>standard</use>
101
+ <args>
102
+ <module>HeidelpayCD_Edition</module>
103
+ <frontName>hcd</frontName>
104
+ </args>
105
+ </hcd>
106
+ </routers>
107
+ <translate>
108
+ <modules>
109
+ <HeidelpayCD_Edition>
110
+ <files>
111
+ <default>HeidelpayCD_Edition.csv</default>
112
+ </files>
113
+ </HeidelpayCD_Edition>
114
+ </modules>
115
+ </translate>
116
+ <layout>
117
+ <updates>
118
+ <hcd>
119
+ <file>hcd.xml</file>
120
+ </hcd>
121
+ </updates>
122
+ </layout>
123
+ </frontend>
124
+ <adminhtml>
125
+ <translate>
126
+ <modules>
127
+ <HeidelpayCD_Edition>
128
+ <files>
129
+ <default>HeidelpayCD_Edition.csv</default>
130
+ </files>
131
+ </HeidelpayCD_Edition>
132
+ </modules>
133
+ </translate>
134
+ <acl>
135
+ <resources>
136
+ <admin>
137
+ <children>
138
+ <system>
139
+ <children>
140
+ <config>
141
+ <children>
142
+ <hcd>
143
+ <title>HeidelpayCD Edition</title>
144
+ </hcd>
145
+ </children>
146
+ </config>
147
+ </children>
148
+ </system>
149
+ </children>
150
+ </admin>
151
+ </resources>
152
+ </acl>
153
+ </adminhtml>
154
+ <default>
155
+ <hcd>
156
+ <settings>
157
+ <transactionmode>1</transactionmode>
158
+ <security_sender>31HA07BC8142C5A171745D00AD63D182</security_sender>
159
+ <user_id>31ha07bc8142c5a171744e5aef11ffd3</user_id>
160
+ <user_pwd>93167DE7</user_pwd>
161
+ <log>0</log>
162
+ <invoicing>0</invoicing>
163
+ <returnurl>onepage</returnurl>
164
+ </settings>
165
+ </hcd>
166
+ <payment>
167
+ <hcdcc>
168
+ <group>hcd</group>
169
+ <title>Credit Card</title>
170
+ <active>0</active>
171
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
172
+ <bookingmode>DB</bookingmode>
173
+ <invioce>1</invioce>
174
+ <capture_on_delivery>0</capture_on_delivery>
175
+ <model>hcd/payment_hcdcc</model>
176
+ <sort_order>1</sort_order>
177
+ <min_amount>0</min_amount>
178
+ <max_amount>0</max_amount>
179
+ <allowspecific>0</allowspecific>
180
+ </hcdcc>
181
+ <hcddc>
182
+ <group>hcd</group>
183
+ <title>Debit Card</title>
184
+ <active>0</active>
185
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
186
+ <bookingmode>DB</bookingmode>
187
+ <invioce>1</invioce>
188
+ <capture_on_delivery>0</capture_on_delivery>
189
+ <model>hcd/payment_hcddc</model>
190
+ <sort_order>1</sort_order>
191
+ <min_amount>0</min_amount>
192
+ <max_amount>0</max_amount>
193
+ <allowspecific>0</allowspecific>
194
+ </hcddc>
195
+ <hcddd>
196
+ <group>hcd</group>
197
+ <title>Direct Debit - Lastschrift</title>
198
+ <active>0</active>
199
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
200
+ <bookingmode>DB</bookingmode>
201
+ <insurence>0</insurence>
202
+ <invioce>1</invioce>
203
+ <capture_on_delivery>0</capture_on_delivery>
204
+ <model>hcd/payment_hcddd</model>
205
+ <sort_order>1</sort_order>
206
+ <min_amount>0</min_amount>
207
+ <max_amount>0</max_amount>
208
+ <allowspecific>0</allowspecific>
209
+ </hcddd>
210
+ <hcdddsec>
211
+ <group>hcd</group>
212
+ <title>Direct debit secured</title>
213
+ <active>0</active>
214
+ <channel>31HA07BC81856CAD6D8E0B3A3100FBA3</channel>
215
+ <bookingmode>DB</bookingmode>
216
+ <insurence>0</insurence>
217
+ <invioce>1</invioce>
218
+ <capture_on_delivery>0</capture_on_delivery>
219
+ <model>hcd/payment_hcdDirectDebitSecured</model>
220
+ <sort_order>1</sort_order>
221
+ <min_amount>10</min_amount>
222
+ <max_amount>0</max_amount>
223
+ <allowspecific>0</allowspecific>
224
+ </hcdddsec>
225
+ <hcdsu>
226
+ <group>hcd</group>
227
+ <title>SOFORT Überweisung</title>
228
+ <active>0</active>
229
+ <channel>31HA07BC8142C5A171749CDAA43365D2</channel>
230
+ <invioce>1</invioce>
231
+ <model>hcd/payment_hcdsu</model>
232
+ <sort_order>1</sort_order>
233
+ <min_amount>0</min_amount>
234
+ <max_amount>0</max_amount>
235
+ <allowspecific>1</allowspecific>
236
+ <specificcountry>BE,DE,IT,NL,AT,SI,ES</specificcountry>
237
+ </hcdsu>
238
+ <hcdgp>
239
+ <group>hcd</group>
240
+ <title>Giropay</title>
241
+ <active>0</active>
242
+ <channel>31HA07BC8142C5A171740166AF277E03</channel>
243
+ <invioce>1</invioce>
244
+ <model>hcd/payment_hcdgp</model>
245
+ <sort_order>1</sort_order>
246
+ <min_amount>0</min_amount>
247
+ <max_amount>0</max_amount>
248
+ <allowspecific>0</allowspecific>
249
+ </hcdgp>
250
+ <hcdbs>
251
+ <group>hcd</group>
252
  <title>Kauf auf Rechnung</title>
253
  <active>0</active>
254
  <channel>31HA07BC8142EE6D02715F4CA97DDD8B</channel>
255
  <model>hcd/payment_hcdbs</model>
256
+ <invioce>1</invioce>
257
+ <sort_order>1</sort_order>
258
  <min_amount>0</min_amount>
259
  <max_amount>0</max_amount>
260
  <allowspecific>1</allowspecific>
261
+ <specificcountry>DE</specificcountry>
262
+ </hcdbs>
263
+ <hcdpal>
264
+ <group>hcd</group>
265
+ <title>Pay Pal</title>
266
  <active>0</active>
267
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
268
+ <bookingmode>DB</bookingmode>
269
+ <invioce>1</invioce>
270
+ <capture_on_delivery>0</capture_on_delivery>
271
+ <model>hcd/payment_hcdpal</model>
272
+ <payment_action>Authorization</payment_action>
273
+ <sort_order>1</sort_order>
274
+ <min_amount>0</min_amount>
275
+ <max_amount>0</max_amount>
276
+ <allowspecific>0</allowspecific>
277
+ </hcdpal>
278
+ <hcdpp>
279
+ <group>hcd</group>
280
+ <title>Prepayment</title>
281
+ <active>0</active>
282
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
283
+ <invioce>1</invioce>
284
+ <model>hcd/payment_hcdpp</model>
285
+ <sort_order>1</sort_order>
286
+ <min_amount>0</min_amount>
287
+ <max_amount>0</max_amount>
288
+ <allowspecific>0</allowspecific>
289
+ </hcdpp>
290
+ <hcdiv>
291
+ <group>hcd</group>
292
+ <title>Invoice</title>
293
+ <active>0</active>
294
+ <channel>31HA07BC8142C5A171749A60D979B6E4</channel>
295
+ <invioce>0</invioce>
296
+ <capture_on_delivery>0</capture_on_delivery>
297
+ <model>hcd/payment_hcdiv</model>
298
+ <sort_order>1</sort_order>
299
+ <min_amount>0</min_amount>
300
+ <max_amount>0</max_amount>
301
+ <allowspecific>0</allowspecific>
302
+ </hcdiv>
303
+ <hcdivsec>
304
+ <group>hcd</group>
305
+ <title>Invoice secured</title>
306
+ <active>0</active>
307
+ <channel>31HA07BC81856CAD6D8E05CDDE7E2AC8</channel>
308
+ <invioce>0</invioce>
309
+ <capture_on_delivery>0</capture_on_delivery>
310
+ <model>hcd/payment_hcdInvoiceSecured</model>
311
  <sort_order>1</sort_order>
312
  <min_amount>10</min_amount>
313
  <max_amount>0</max_amount>
314
+ <allowspecific>0</allowspecific>
315
+ </hcdivsec>
316
+ <hcdpf>
317
+ <group>hcd</group>
318
+ <title>Postfinance</title>
319
+ <active>0</active>
320
+ <channel>31HA07BC811E8AEF9AB2733D80C21DA8</channel>
321
+ <invioce>1</invioce>
322
+ <model>hcd/payment_hcdpf</model>
323
+ <sort_order>1</sort_order>
324
+ <min_amount>0</min_amount>
325
+ <max_amount>0</max_amount>
326
  <allowspecific>1</allowspecific>
327
+ <specificcountry>CH</specificcountry>
328
+ </hcdpf>
329
+ <hcdeps>
330
+ <group>hcd</group>
331
+ <title>EPS</title>
332
+ <active>0</active>
333
+ <channel></channel>
334
+ <invioce>1</invioce>
335
+ <model>hcd/payment_hcdeps</model>
336
+ <sort_order>1</sort_order>
337
+ <min_amount>0</min_amount>
338
+ <max_amount>0</max_amount>
339
+ <allowspecific>1</allowspecific>
340
+ <specificcountry>AT</specificcountry>
341
+ </hcdeps>
342
+ <hcdide>
343
+ <group>hcd</group>
344
+ <title>Ideal</title>
345
+ <active>0</active>
346
+ <channel>31HA07BC8142C5A171744B56E61281E5</channel>
347
+ <invioce>1</invioce>
348
+ <model>hcd/payment_hcdide</model>
349
+ <sort_order>1</sort_order>
350
+ <min_amount>0</min_amount>
351
+ <max_amount>0</max_amount>
352
+ <allowspecific>1</allowspecific>
353
+ <specificcountry>NL</specificcountry>
354
+ </hcdide>
355
+ <hcdmpa>
356
+ <group>hcd</group>
357
+ <title>MasterPass</title>
358
+ <active>0</active>
359
+ <channel>31HA07BC814948E72EF669CA3BB1431F</channel>
360
+ <invioce>1</invioce>
361
+ <capture_on_delivery>0</capture_on_delivery>
362
+ <model>hcd/payment_hcdmpa</model>
363
+ <sort_order>1</sort_order>
364
+ <min_amount>0</min_amount>
365
+ <max_amount>0</max_amount>
366
+ <allowspecific>0</allowspecific>
367
+ </hcdmpa>
368
+ </payment>
369
+ </default>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  </config>
app/code/community/HeidelpayCD/Edition/etc/system.xml CHANGED
@@ -1,24 +1,25 @@
1
  <?xml version="1.0"?>
2
  <config>
3
- <sections>
4
- <!--{{{ Global Settings-->
5
- <hcd translate="label" module="hcd">
6
- <label><![CDATA[<img alt="Heidelpay" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==" /> Heidelpay CD-Edition ]]></label>
7
- <tab>sales</tab>
8
- <frontend_type>text</frontend_type>
9
- <sort_order>405</sort_order>
10
- <show_in_default>1</show_in_default>
11
- <show_in_website>1</show_in_website>
12
- <show_in_store>1</show_in_store>
13
- <groups>
14
- <about_us>
15
- <label>about Heidelpay</label>
 
16
  <frontend_type>text</frontend_type>
17
  <sort_order>1</sort_order>
18
  <show_in_default>1</show_in_default>
19
  <show_in_website>1</show_in_website>
20
  <show_in_store>1</show_in_store>
21
- <comment><![CDATA[<br />
22
  <div class="box">
23
  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAAA7BAMAAAAEMPCJAAAAAXNSR0IArs4c6QAAABhQTFRFPT09u7u7////k5OTDw8Pa2tr2dnZ7u7uGx/afwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kKFggjGov/KAYAAAJ5SURBVEjH7dW7l6IwFAfgOKK247s1l0PS+rYNy2NbRVxbZUZtncyq//7eCD6QeGYo9pwtlgb55TPkARcCuQ6SB7OXXJz++M//Mt/l4sz+N/npJHV83SWEzHdpzutT1xXz9iNnXZcsBgvDnd1zGrqktCCYyhRnoddSybFuFG6cGl4Lb8e3TbcoE67OPCxeBkjDwoVToxgl6ee5F8XV+dW5Tgdv1E/48C79MJYxdwBM75bjlZBnfvCiu/QgogtX/d0dq4ri3Einw3LCzYc9YUQi3zsPeyRkzIe1h01avSAPH9NG5czZQze4UA6zaSalzpl3gswz0Nja79k0XCveiDINVrkQZtPfBcWLmRyYQ5xsSj3kopJtgND9mQ25gdwNNLyhTYeKR5qGvVvTpO+KS02DJXRpB7mnyfG50aXWM071ncSPmIbr0/x8rGvgv7RpkKtGqk/ZKB3El6z8jE/TQXxJ7S85m+Tilp2v93Yu/s2xv2FZpIsJ8Daw0WQKvDlTPFq3cKWr7dMRbh8T5AQLypBgWfChgUUY9sLoU5vNZ80AXnujgSWBL688rFkVLAargPrck/goTiNqU5tj1Rzg5rIi7QPt342d+lblRH3qm/jGEe5wWcLecaMOn8gG2LUZ3XHmd4Rr2PivF4AudQ0hkOP9zTq+U3XowQZSvXcK1eou5lPqVKvbFD/IXpqj4zUcjK8Gg4WklQzmQw0GzHaQ5szbrSo4VbLbCBhOPp3LVGc4VWCDPqTGjisoIlqGlSgRrOTxQs5HS9jgQuJ85I0fgUf4haslJ9yUtzHwHVsm28TV8G/8ycGWt9/jXJwFubhZ+wafXH8e5Ndcf/wBKDObGG4GKXIAAAAASUVORK5CYII=" alt="Heidelpay" />
24
  <p style="font-size:12px; font-weight: bold;">Heidelberger Payment GmbH - Ihr Full Service Payment Provider - alles aus einer Hand </p>
@@ -30,622 +31,697 @@
30
  <br /><br /><p style="font-size:12px;"> Die Plugin wird bei der Installation mit Testdaten aktiviert.</p>
31
  </div>
32
  ]]>
33
- </comment>
34
- </about_us>
35
- <settings translate="label">
36
- <label>General Settings Heidelpay</label>
37
- <frontend_type>text</frontend_type>
38
- <sort_order>10</sort_order>
39
- <show_in_default>1</show_in_default>
40
- <show_in_website>1</show_in_website>
41
- <show_in_store>1</show_in_store>
42
- <fields>
43
- <transactionmode translate="label">
44
- <label>Use Testsystem</label>
45
- <frontend_type>select</frontend_type>
46
- <source_model>adminhtml/system_config_source_yesno</source_model>
47
- <comment>If is set to yes, transactionis use the sandbox system and the TRANSACTION.MODE=CONNECTOR_TEST, otherwise real payment will be used with mode LIVE. For details see integration basisc documentation.</comment>
48
- <sort_order>5</sort_order>
49
- <show_in_default>1</show_in_default>
50
- <show_in_website>1</show_in_website>
51
- <show_in_store>1</show_in_store>
52
- </transactionmode>
53
- <security_sender translate="label">
54
- <label>Security Sender</label>
55
- <frontend_type>text</frontend_type>
56
- <sort_order>10</sort_order>
57
- <show_in_default>1</show_in_default>
58
- <show_in_website>1</show_in_website>
59
- <show_in_store>1</show_in_store>
60
- </security_sender>
61
- <user_id translate="label">
62
- <label>User Login</label>
63
- <frontend_type>text</frontend_type>
64
- <sort_order>20</sort_order>
65
- <show_in_default>1</show_in_default>
66
- <show_in_website>1</show_in_website>
67
- <show_in_store>1</show_in_store>
68
- </user_id>
69
- <user_pwd translate="label">
70
- <label>User Password</label>
71
- <frontend_type>text</frontend_type>
72
- <sort_order>30</sort_order>
73
- <show_in_default>1</show_in_default>
74
- <show_in_website>1</show_in_website>
75
- <show_in_store>1</show_in_store>
76
- </user_pwd>
77
- <returnurl translate="label">
78
- <label>Return in Errorcase</label>
79
- <frontend_type>select</frontend_type>
80
- <source_model>hcd/system_config_source_returnurl</source_model>
81
- <comment>Please configurate where your costumer should be redirected to in case of an payment error</comment>
82
- <sort_order>50</sort_order>
83
- <show_in_default>1</show_in_default>
84
- <show_in_website>1</show_in_website>
85
- <show_in_store>1</show_in_store>
86
- </returnurl>
87
- <log translate="label">
88
- <label>Debug Log</label>
89
- <frontend_type>select</frontend_type>
90
- <source_model>adminhtml/system_config_source_yesno</source_model>
91
- <comment>If is set to yes, you can controll all neccessary conntetion Data in /var/log/Heidelpay.log</comment>
92
- <sort_order>60</sort_order>
93
- <show_in_default>1</show_in_default>
94
- <show_in_website>1</show_in_website>
95
- <show_in_store>1</show_in_store>
96
- </log>
97
- <invoicing translate="label">
98
- <label>Invoicing over heidelpay</label>
99
- <frontend_type>select</frontend_type>
100
- <source_model>adminhtml/system_config_source_yesno</source_model>
101
- <comment>Invoicing over heidelpay requires an extra contract. For more information, please contact your key account manager.</comment>
102
- <sort_order>70</sort_order>
103
- <show_in_default>1</show_in_default>
104
- <show_in_website>1</show_in_website>
105
- <show_in_store>1</show_in_store>
106
- </invoicing>
107
- </fields>
108
- </settings>
109
- </groups>
110
- </hcd>
111
- </sections>
112
- <sections>
113
- <payment>
114
- <groups id="hcd" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
115
- <hcdcc translate="label">
116
- <label>Heidelpay Credit Card (hcd)</label>
117
- <frontend_type>text</frontend_type>
118
- <sort_order>50</sort_order>
119
- <show_in_default>1</show_in_default>
120
- <show_in_website>1</show_in_website>
121
- <show_in_store>1</show_in_store>
122
- <fields>
123
- <title translate="label">
124
- <label>Title</label>
125
- <frontend_type>text</frontend_type>
126
- <sort_order>10</sort_order>
127
- <show_in_default>1</show_in_default>
128
- <show_in_website>1</show_in_website>
129
- <show_in_store>1</show_in_store>
130
- </title>
131
- <active translate="label">
132
- <label>Enabled</label>
133
- <frontend_type>select</frontend_type>
134
- <source_model>adminhtml/system_config_source_yesno</source_model>
135
- <sort_order>20</sort_order>
136
- <show_in_default>1</show_in_default>
137
- <show_in_website>1</show_in_website>
138
- <show_in_store>1</show_in_store>
139
- </active>
140
- <channel translate="label">
141
- <label>Channel ID</label>
142
- <frontend_type>text</frontend_type>
143
- <sort_order>40</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
- </channel>
148
- <bookingmode translate="label">
149
- <label>Bookingmode</label>
150
- <frontend_type>select</frontend_type>
151
- <source_model>hcd/system_config_source_bookingmode</source_model>
152
- <sort_order>50</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
- </bookingmode>
157
- <recognition translate="label">
158
- <label>Recognition</label>
159
- <frontend_type>select</frontend_type>
160
- <source_model>hcd/system_config_source_recognition</source_model>
161
- <sort_order>60</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
- </recognition>
166
- <invioce translate="label">
167
- <label>Automatically invoiced</label>
168
- <frontend_type>select</frontend_type>
169
- <source_model>adminhtml/system_config_source_yesno</source_model>
170
- <sort_order>70</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
- </invioce>
175
- <!--<capture_on_delivery translate="label">
176
- <label>Automatically capture on delivery</label>
177
- <frontend_type>select</frontend_type>
178
- <source_model>adminhtml/system_config_source_yesno</source_model>
179
- <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
180
- <sort_order>80</sort_order>
181
- <show_in_default>1</show_in_default>
182
- <show_in_website>1</show_in_website>
183
- <show_in_store>1</show_in_store>
184
- </capture_on_delivery>-->
185
- <sort_order translate="label">
186
- <label>Sort order</label>
187
- <frontend_type>text</frontend_type>
188
- <sort_order>110</sort_order>
189
- <show_in_default>1</show_in_default>
190
- <show_in_website>1</show_in_website>
191
- <show_in_store>1</show_in_store>
192
- </sort_order>
193
- <min_amount translate="label">
194
- <label>Minimum Amount (CENT)</label>
195
- <frontend_type>text</frontend_type>
196
- <sort_order>120</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
- </min_amount>
201
- <max_amount translate="label">
202
- <label>Maximum Amount (CENT)</label>
203
- <frontend_type>text</frontend_type>
204
- <sort_order>130</sort_order>
205
- <show_in_default>1</show_in_default>
206
- <show_in_website>1</show_in_website>
207
- <show_in_store>1</show_in_store>
208
- </max_amount>
209
- <allowspecific translate="label">
210
- <label>allow specific countries</label>
211
- <frontend_type>allowspecific</frontend_type>
212
- <sort_order>140</sort_order>
213
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
214
- <show_in_default>1</show_in_default>
215
- <show_in_website>1</show_in_website>
216
- <show_in_store>1</show_in_store>
217
- </allowspecific>
218
- <specificcountry translate="label">
219
- <label>specific countries</label>
220
- <frontend_type>multiselect</frontend_type>
221
- <sort_order>150</sort_order>
222
- <source_model>adminhtml/system_config_source_country</source_model>
223
- <show_in_default>1</show_in_default>
224
- <show_in_website>1</show_in_website>
225
- <show_in_store>1</show_in_store>
226
- </specificcountry>
227
- </fields>
228
- </hcdcc>
229
- <hcddc translate="label">
230
- <label>Heidelpay Debit Card (hcd)</label>
231
- <frontend_type>text</frontend_type>
232
- <sort_order>130</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
- <fields>
237
- <title translate="label">
238
- <label>Title</label>
239
- <frontend_type>text</frontend_type>
240
- <sort_order>10</sort_order>
241
- <show_in_default>1</show_in_default>
242
- <show_in_website>1</show_in_website>
243
- <show_in_store>1</show_in_store>
244
- </title>
245
- <active translate="label">
246
- <label>Enabled</label>
247
- <frontend_type>select</frontend_type>
248
- <source_model>adminhtml/system_config_source_yesno</source_model>
249
- <sort_order>20</sort_order>
250
- <show_in_default>1</show_in_default>
251
- <show_in_website>1</show_in_website>
252
- <show_in_store>1</show_in_store>
253
- </active>
254
- <channel translate="label">
255
- <label>Channel ID</label>
256
- <frontend_type>text</frontend_type>
257
- <sort_order>40</sort_order>
258
- <show_in_default>1</show_in_default>
259
- <show_in_website>1</show_in_website>
260
- <show_in_store>1</show_in_store>
261
- </channel>
262
- <bookingmode translate="label">
263
- <label>Bookinnmode</label>
264
- <frontend_type>select</frontend_type>
265
- <source_model>hcd/system_config_source_bookingmode</source_model>
266
- <sort_order>50</sort_order>
267
- <show_in_default>1</show_in_default>
268
- <show_in_website>1</show_in_website>
269
- <show_in_store>1</show_in_store>
270
- </bookingmode>
271
- <recognition translate="label">
272
- <label>Recognition</label>
273
- <frontend_type>select</frontend_type>
274
- <source_model>hcd/system_config_source_recognition</source_model>
275
- <sort_order>60</sort_order>
276
- <show_in_default>1</show_in_default>
277
- <show_in_website>1</show_in_website>
278
- <show_in_store>1</show_in_store>
279
- </recognition>
280
- <invioce translate="label">
281
- <label>Automatically invoiced</label>
282
- <frontend_type>select</frontend_type>
283
- <source_model>adminhtml/system_config_source_yesno</source_model>
284
- <sort_order>70</sort_order>
285
- <show_in_default>1</show_in_default>
286
- <show_in_website>1</show_in_website>
287
- <show_in_store>1</show_in_store>
288
- </invioce>
289
- <!--<capture_on_delivery translate="label">
290
- <label>Automatically capture on delivery</label>
291
- <frontend_type>select</frontend_type>
292
- <source_model>adminhtml/system_config_source_yesno</source_model>
293
- <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
294
- <sort_order>80</sort_order>
295
- <show_in_default>1</show_in_default>
296
- <show_in_website>1</show_in_website>
297
- <show_in_store>1</show_in_store>
298
- </capture_on_delivery>-->
299
- <sort_order translate="label">
300
- <label>Sort order</label>
301
- <frontend_type>text</frontend_type>
302
- <sort_order>110</sort_order>
303
- <show_in_default>1</show_in_default>
304
- <show_in_website>1</show_in_website>
305
- <show_in_store>1</show_in_store>
306
- </sort_order>
307
- <min_amount translate="label">
308
- <label>Minimum Amount (CENT)</label>
309
- <frontend_type>text</frontend_type>
310
- <sort_order>120</sort_order>
311
- <show_in_default>1</show_in_default>
312
- <show_in_website>1</show_in_website>
313
- <show_in_store>1</show_in_store>
314
- </min_amount>
315
- <max_amount translate="label">
316
- <label>Maximum Amount (CENT)</label>
317
- <frontend_type>text</frontend_type>
318
- <sort_order>130</sort_order>
319
- <show_in_default>1</show_in_default>
320
- <show_in_website>1</show_in_website>
321
- <show_in_store>1</show_in_store>
322
- </max_amount>
323
- <allowspecific translate="label">
324
- <label>allow specific countries</label>
325
- <frontend_type>allowspecific</frontend_type>
326
- <sort_order>140</sort_order>
327
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
328
- <show_in_default>1</show_in_default>
329
- <show_in_website>1</show_in_website>
330
- <show_in_store>1</show_in_store>
331
- </allowspecific>
332
- <specificcountry translate="label">
333
- <label>specific countries</label>
334
- <frontend_type>multiselect</frontend_type>
335
- <sort_order>150</sort_order>
336
- <source_model>adminhtml/system_config_source_country</source_model>
337
- <show_in_default>1</show_in_default>
338
- <show_in_website>1</show_in_website>
339
- <show_in_store>1</show_in_store>
340
- </specificcountry>
341
- </fields>
342
- </hcddc>
343
- <hcddd translate="label">
344
- <label>Heidelpay Direct Debit (hcd)</label>
345
- <frontend_type>text</frontend_type>
346
- <sort_order>60</sort_order>
347
- <show_in_default>1</show_in_default>
348
- <show_in_website>1</show_in_website>
349
- <show_in_store>1</show_in_store>
350
- <fields>
351
- <title translate="label">
352
- <label>Title</label>
353
- <frontend_type>text</frontend_type>
354
- <sort_order>10</sort_order>
355
- <show_in_default>1</show_in_default>
356
- <show_in_website>1</show_in_website>
357
- <show_in_store>1</show_in_store>
358
- </title>
359
- <active translate="label">
360
- <label>Enabled</label>
361
- <frontend_type>select</frontend_type>
362
- <source_model>adminhtml/system_config_source_yesno</source_model>
363
- <sort_order>20</sort_order>
364
- <show_in_default>1</show_in_default>
365
- <show_in_website>1</show_in_website>
366
- <show_in_store>1</show_in_store>
367
- </active>
368
- <channel translate="label">
369
- <label>Channel ID</label>
370
- <frontend_type>text</frontend_type>
371
- <sort_order>40</sort_order>
372
- <show_in_default>1</show_in_default>
373
- <show_in_website>1</show_in_website>
374
- <show_in_store>1</show_in_store>
375
- </channel>
376
- <bookingmode translate="label">
377
- <label>Bookingmode</label>
378
- <frontend_type>select</frontend_type>
379
- <source_model>hcd/system_config_source_bookingmode</source_model>
380
- <sort_order>50</sort_order>
381
- <show_in_default>1</show_in_default>
382
- <show_in_website>1</show_in_website>
383
- <show_in_store>1</show_in_store>
384
- </bookingmode>
385
- <recognition translate="label">
386
- <label>Recognition</label>
387
- <frontend_type>select</frontend_type>
388
- <source_model>hcd/system_config_source_recognition</source_model>
389
- <sort_order>60</sort_order>
390
- <show_in_default>1</show_in_default>
391
- <show_in_website>1</show_in_website>
392
- <show_in_store>1</show_in_store>
393
- </recognition>
394
- <insurence translate="label">
395
- <label>Insurence provider</label>
396
- <frontend_type>select</frontend_type>
397
- <source_model>adminhtml/system_config_source_yesno</source_model>
398
- <comment>direct debit with insurence requires an extra contract. For more information, please contact your key account manager.</comment>
399
- <sort_order>65</sort_order>
400
- <show_in_default>1</show_in_default>
401
- <show_in_website>1</show_in_website>
402
- <show_in_store>1</show_in_store>
403
- </insurence>
404
- <invioce translate="label">
405
- <label>Automatically invoiced</label>
406
- <frontend_type>select</frontend_type>
407
- <source_model>adminhtml/system_config_source_yesno</source_model>
408
- <sort_order>70</sort_order>
409
- <show_in_default>1</show_in_default>
410
- <show_in_website>1</show_in_website>
411
- <show_in_store>1</show_in_store>
412
- </invioce>
413
- <!--<capture_on_delivery translate="label">
414
- <label>Automatically capture on delivery</label>
415
- <frontend_type>select</frontend_type>
416
- <source_model>adminhtml/system_config_source_yesno</source_model>
417
- <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
418
- <sort_order>80</sort_order>
419
- <show_in_default>1</show_in_default>
420
- <show_in_website>1</show_in_website>
421
- <show_in_store>1</show_in_store>
422
- </capture_on_delivery>-->
423
- <sort_order translate="label">
424
- <label>Sort order</label>
425
- <frontend_type>text</frontend_type>
426
- <sort_order>110</sort_order>
427
- <show_in_default>1</show_in_default>
428
- <show_in_website>1</show_in_website>
429
- <show_in_store>1</show_in_store>
430
- </sort_order>
431
- <min_amount translate="label">
432
- <label>Minimum Amount (CENT)</label>
433
- <frontend_type>text</frontend_type>
434
- <sort_order>120</sort_order>
435
- <show_in_default>1</show_in_default>
436
- <show_in_website>1</show_in_website>
437
- <show_in_store>1</show_in_store>
438
- </min_amount>
439
- <max_amount translate="label">
440
- <label>Maximum Amount (CENT)</label>
441
- <frontend_type>text</frontend_type>
442
- <sort_order>130</sort_order>
443
- <show_in_default>1</show_in_default>
444
- <show_in_website>1</show_in_website>
445
- <show_in_store>1</show_in_store>
446
- </max_amount>
447
- <allowspecific translate="label">
448
- <label>allow specific countries</label>
449
- <frontend_type>allowspecific</frontend_type>
450
- <sort_order>140</sort_order>
451
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
452
- <show_in_default>1</show_in_default>
453
- <show_in_website>1</show_in_website>
454
- <show_in_store>1</show_in_store>
455
- </allowspecific>
456
- <specificcountry translate="label">
457
- <label>specific countries</label>
458
- <frontend_type>multiselect</frontend_type>
459
- <sort_order>150</sort_order>
460
- <source_model>adminhtml/system_config_source_country</source_model>
461
- <show_in_default>1</show_in_default>
462
- <show_in_website>1</show_in_website>
463
- <show_in_store>1</show_in_store>
464
- </specificcountry>
465
- </fields>
466
- </hcddd>
467
- <hcdsu translate="label">
468
- <label><![CDATA[Heidelpay SOFORT &Uuml;berweisung (hcd)]]></label>
469
- <frontend_type>text</frontend_type>
470
- <sort_order>80</sort_order>
471
- <show_in_default>1</show_in_default>
472
- <show_in_website>1</show_in_website>
473
- <show_in_store>1</show_in_store>
474
- <fields>
475
- <title translate="label">
476
- <label>Title</label>
477
- <frontend_type>text</frontend_type>
478
- <sort_order>10</sort_order>
479
- <show_in_default>1</show_in_default>
480
- <show_in_website>1</show_in_website>
481
- <show_in_store>1</show_in_store>
482
- </title>
483
- <active translate="label">
484
- <label>Enabled</label>
485
- <frontend_type>select</frontend_type>
486
- <source_model>adminhtml/system_config_source_yesno</source_model>
487
- <sort_order>20</sort_order>
488
- <show_in_default>1</show_in_default>
489
- <show_in_website>1</show_in_website>
490
- <show_in_store>1</show_in_store>
491
- </active>
492
- <channel translate="label">
493
- <label>Channel ID</label>
494
- <frontend_type>text</frontend_type>
495
- <sort_order>40</sort_order>
496
- <show_in_default>1</show_in_default>
497
- <show_in_website>1</show_in_website>
498
- <show_in_store>1</show_in_store>
499
- </channel>
500
- <invioce translate="label">
501
- <label>Automatically invoiced</label>
502
- <frontend_type>select</frontend_type>
503
- <source_model>adminhtml/system_config_source_yesno</source_model>
504
- <sort_order>70</sort_order>
505
- <show_in_default>1</show_in_default>
506
- <show_in_website>1</show_in_website>
507
- <show_in_store>1</show_in_store>
508
- </invioce>
509
- <sort_order translate="label">
510
- <label>Sort order</label>
511
- <frontend_type>text</frontend_type>
512
- <sort_order>110</sort_order>
513
- <show_in_default>1</show_in_default>
514
- <show_in_website>1</show_in_website>
515
- <show_in_store>1</show_in_store>
516
- </sort_order>
517
- <min_amount translate="label">
518
- <label>Minimum Amount (CENT)</label>
519
- <frontend_type>text</frontend_type>
520
- <sort_order>120</sort_order>
521
- <show_in_default>1</show_in_default>
522
- <show_in_website>1</show_in_website>
523
- <show_in_store>1</show_in_store>
524
- </min_amount>
525
- <max_amount translate="label">
526
- <label>Maximum Amount (CENT)</label>
527
- <frontend_type>text</frontend_type>
528
- <sort_order>130</sort_order>
529
- <show_in_default>1</show_in_default>
530
- <show_in_website>1</show_in_website>
531
- <show_in_store>1</show_in_store>
532
- </max_amount>
533
- <allowspecific translate="label">
534
- <label>allow specific countries</label>
535
- <frontend_type>allowspecific</frontend_type>
536
- <sort_order>140</sort_order>
537
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
538
- <show_in_default>1</show_in_default>
539
- <show_in_website>1</show_in_website>
540
- <show_in_store>1</show_in_store>
541
- </allowspecific>
542
- <specificcountry translate="label">
543
- <label>specific countries</label>
544
- <frontend_type>multiselect</frontend_type>
545
- <sort_order>150</sort_order>
546
- <source_model>adminhtml/system_config_source_country</source_model>
547
- <show_in_default>1</show_in_default>
548
- <show_in_website>1</show_in_website>
549
- <show_in_store>1</show_in_store>
550
- </specificcountry>
551
- </fields>
552
- </hcdsu>
553
- <hcdgp translate="label">
554
- <label>Heidelpay Giropay (hcd)</label>
555
- <frontend_type>text</frontend_type>
556
- <sort_order>90</sort_order>
557
- <show_in_default>1</show_in_default>
558
- <show_in_website>1</show_in_website>
559
- <show_in_store>1</show_in_store>
560
- <fields>
561
- <title translate="label">
562
- <label>Title</label>
563
- <frontend_type>text</frontend_type>
564
- <sort_order>10</sort_order>
565
- <show_in_default>1</show_in_default>
566
- <show_in_website>1</show_in_website>
567
- <show_in_store>1</show_in_store>
568
- </title>
569
- <active translate="label">
570
- <label>Enabled</label>
571
- <frontend_type>select</frontend_type>
572
- <source_model>adminhtml/system_config_source_yesno</source_model>
573
- <sort_order>20</sort_order>
574
- <show_in_default>1</show_in_default>
575
- <show_in_website>1</show_in_website>
576
- <show_in_store>1</show_in_store>
577
- </active>
578
- <channel translate="label">
579
- <label>Channel ID</label>
580
- <frontend_type>text</frontend_type>
581
- <sort_order>40</sort_order>
582
- <show_in_default>1</show_in_default>
583
- <show_in_website>1</show_in_website>
584
- <show_in_store>1</show_in_store>
585
- </channel>
586
- <recognition translate="label">
587
- <label>Recognition</label>
588
- <frontend_type>select</frontend_type>
589
- <source_model>hcd/system_config_source_recognition</source_model>
590
- <sort_order>60</sort_order>
591
- <show_in_default>1</show_in_default>
592
- <show_in_website>1</show_in_website>
593
- <show_in_store>1</show_in_store>
594
- </recognition>
595
- <invioce translate="label">
596
- <label>Automatically invoiced</label>
597
- <frontend_type>select</frontend_type>
598
- <source_model>adminhtml/system_config_source_yesno</source_model>
599
- <sort_order>70</sort_order>
600
- <show_in_default>1</show_in_default>
601
- <show_in_website>1</show_in_website>
602
- <show_in_store>1</show_in_store>
603
- </invioce>
604
- <sort_order translate="label">
605
- <label>Sort order</label>
606
- <frontend_type>text</frontend_type>
607
- <sort_order>110</sort_order>
608
- <show_in_default>1</show_in_default>
609
- <show_in_website>1</show_in_website>
610
- <show_in_store>1</show_in_store>
611
- </sort_order>
612
- <min_amount translate="label">
613
- <label>Minimum Amount (CENT)</label>
614
- <frontend_type>text</frontend_type>
615
- <sort_order>120</sort_order>
616
- <show_in_default>1</show_in_default>
617
- <show_in_website>1</show_in_website>
618
- <show_in_store>1</show_in_store>
619
- </min_amount>
620
- <max_amount translate="label">
621
- <label>Maximum Amount (CENT)</label>
622
- <frontend_type>text</frontend_type>
623
- <sort_order>130</sort_order>
624
- <show_in_default>1</show_in_default>
625
- <show_in_website>1</show_in_website>
626
- <show_in_store>1</show_in_store>
627
- </max_amount>
628
- <allowspecific translate="label">
629
- <label>allow specific countries</label>
630
- <frontend_type>allowspecific</frontend_type>
631
- <sort_order>140</sort_order>
632
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
633
- <show_in_default>1</show_in_default>
634
- <show_in_website>1</show_in_website>
635
- <show_in_store>1</show_in_store>
636
- </allowspecific>
637
- <specificcountry translate="label">
638
- <label>specific countries</label>
639
- <frontend_type>multiselect</frontend_type>
640
- <sort_order>150</sort_order>
641
- <source_model>adminhtml/system_config_source_country</source_model>
642
- <show_in_default>1</show_in_default>
643
- <show_in_website>1</show_in_website>
644
- <show_in_store>1</show_in_store>
645
- </specificcountry>
646
- </fields>
647
- </hcdgp>
648
- <hcdbs translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
649
  <label>Heidelpay Billsafe (hcd)</label>
650
  <frontend_type>text</frontend_type>
651
  <sort_order>100</sort_order>
@@ -721,11 +797,641 @@
721
  <show_in_store>1</show_in_store>
722
  </specificcountry>
723
  </fields>
724
- </hcdbs>
725
- <hcdmk translate="label">
726
- <label>Heidelpay MangirKart (hcd)</label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
727
  <frontend_type>text</frontend_type>
728
- <sort_order>170</sort_order>
729
  <show_in_default>1</show_in_default>
730
  <show_in_website>1</show_in_website>
731
  <show_in_store>1</show_in_store>
@@ -755,16 +1461,35 @@
755
  <show_in_website>1</show_in_website>
756
  <show_in_store>1</show_in_store>
757
  </channel>
758
- <invioce translate="label">
759
- <label>Automatically invoiced</label>
760
- <frontend_type>select</frontend_type>
761
- <source_model>adminhtml/system_config_source_yesno</source_model>
762
- <sort_order>70</sort_order>
763
- <show_in_default>1</show_in_default>
764
- <show_in_website>1</show_in_website>
765
- <show_in_store>1</show_in_store>
766
- </invioce>
767
- <sort_order translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
768
  <label>Sort order</label>
769
  <frontend_type>text</frontend_type>
770
  <sort_order>110</sort_order>
@@ -807,747 +1532,8 @@
807
  <show_in_store>1</show_in_store>
808
  </specificcountry>
809
  </fields>
810
- </hcdmk>
811
- <hcdpal translate="label">
812
- <label>Heidelpay Pay Pal (hcd)</label>
813
- <frontend_type>text</frontend_type>
814
- <sort_order>70</sort_order>
815
- <show_in_default>1</show_in_default>
816
- <show_in_website>1</show_in_website>
817
- <show_in_store>1</show_in_store>
818
- <fields>
819
- <title translate="label">
820
- <label>Title</label>
821
- <frontend_type>text</frontend_type>
822
- <sort_order>10</sort_order>
823
- <show_in_default>1</show_in_default>
824
- <show_in_website>1</show_in_website>
825
- <show_in_store>1</show_in_store>
826
- </title>
827
- <active translate="label">
828
- <label>Enabled</label>
829
- <frontend_type>select</frontend_type>
830
- <source_model>adminhtml/system_config_source_yesno</source_model>
831
- <sort_order>20</sort_order>
832
- <show_in_default>1</show_in_default>
833
- <show_in_website>1</show_in_website>
834
- <show_in_store>1</show_in_store>
835
- </active>
836
- <channel translate="label">
837
- <label>Channel ID</label>
838
- <frontend_type>text</frontend_type>
839
- <sort_order>40</sort_order>
840
- <show_in_default>1</show_in_default>
841
- <show_in_website>1</show_in_website>
842
- <show_in_store>1</show_in_store>
843
- </channel>
844
- <bookingmode translate="label">
845
- <label>Bookingmode</label>
846
- <frontend_type>select</frontend_type>
847
- <source_model>hcd/system_config_source_bookingmode</source_model>
848
- <sort_order>50</sort_order>
849
- <show_in_default>1</show_in_default>
850
- <show_in_website>1</show_in_website>
851
- <show_in_store>1</show_in_store>
852
- </bookingmode>
853
- <invioce translate="label">
854
- <label>Automatically invoiced</label>
855
- <frontend_type>select</frontend_type>
856
- <source_model>adminhtml/system_config_source_yesno</source_model>
857
- <sort_order>70</sort_order>
858
- <show_in_default>1</show_in_default>
859
- <show_in_website>1</show_in_website>
860
- <show_in_store>1</show_in_store>
861
- </invioce>
862
- <!--<capture_on_delivery translate="label">
863
- <label>Automatically capture on delivery</label>
864
- <frontend_type>select</frontend_type>
865
- <source_model>adminhtml/system_config_source_yesno</source_model>
866
- <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
867
- <sort_order>80</sort_order>
868
- <show_in_default>1</show_in_default>
869
- <show_in_website>1</show_in_website>
870
- <show_in_store>1</show_in_store>
871
- </capture_on_delivery>-->
872
- <sort_order translate="label">
873
- <label>Sort order</label>
874
- <frontend_type>text</frontend_type>
875
- <sort_order>110</sort_order>
876
- <show_in_default>1</show_in_default>
877
- <show_in_website>1</show_in_website>
878
- <show_in_store>1</show_in_store>
879
- </sort_order>
880
- <min_amount translate="label">
881
- <label>Minimum Amount (CENT)</label>
882
- <frontend_type>text</frontend_type>
883
- <sort_order>120</sort_order>
884
- <show_in_default>1</show_in_default>
885
- <show_in_website>1</show_in_website>
886
- <show_in_store>1</show_in_store>
887
- </min_amount>
888
- <max_amount translate="label">
889
- <label>Maximum Amount (CENT)</label>
890
- <frontend_type>text</frontend_type>
891
- <sort_order>130</sort_order>
892
- <show_in_default>1</show_in_default>
893
- <show_in_website>1</show_in_website>
894
- <show_in_store>1</show_in_store>
895
- </max_amount>
896
- <allowspecific translate="label">
897
- <label>allow specific countries</label>
898
- <frontend_type>allowspecific</frontend_type>
899
- <sort_order>140</sort_order>
900
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
901
- <show_in_default>1</show_in_default>
902
- <show_in_website>1</show_in_website>
903
- <show_in_store>1</show_in_store>
904
- </allowspecific>
905
- <specificcountry translate="label">
906
- <label>specific countries</label>
907
- <frontend_type>multiselect</frontend_type>
908
- <sort_order>150</sort_order>
909
- <source_model>adminhtml/system_config_source_country</source_model>
910
- <show_in_default>1</show_in_default>
911
- <show_in_website>1</show_in_website>
912
- <show_in_store>1</show_in_store>
913
- </specificcountry>
914
- </fields>
915
- </hcdpal>
916
- <!--
917
- <hcdeps translate="label">
918
- <label>Heidelpay EPS (hcd)</label>
919
- <frontend_type>text</frontend_type>
920
- <sort_order>150</sort_order>
921
- <show_in_default>1</show_in_default>
922
- <show_in_website>1</show_in_website>
923
- <show_in_store>1</show_in_store>
924
- <fields>
925
- <title translate="label">
926
- <label>Title</label>
927
- <frontend_type>text</frontend_type>
928
- <sort_order>10</sort_order>
929
- <show_in_default>1</show_in_default>
930
- <show_in_website>1</show_in_website>
931
- <show_in_store>1</show_in_store>
932
- </title>
933
- <active translate="label">
934
- <label>Enabled</label>
935
- <frontend_type>select</frontend_type>
936
- <source_model>adminhtml/system_config_source_yesno</source_model>
937
- <sort_order>20</sort_order>
938
- <show_in_default>1</show_in_default>
939
- <show_in_website>1</show_in_website>
940
- <show_in_store>1</show_in_store>
941
- </active>
942
- <channel translate="label">
943
- <label>Channel ID</label>
944
- <frontend_type>text</frontend_type>
945
- <sort_order>40</sort_order>
946
- <show_in_default>1</show_in_default>
947
- <show_in_website>1</show_in_website>
948
- <show_in_store>1</show_in_store>
949
- </channel>
950
- <invioce translate="label">
951
- <label>Automatically invoiced</label>
952
- <frontend_type>select</frontend_type>
953
- <source_model>adminhtml/system_config_source_yesno</source_model>
954
- <sort_order>70</sort_order>
955
- <show_in_default>1</show_in_default>
956
- <show_in_website>1</show_in_website>
957
- <show_in_store>1</show_in_store>
958
- </invioce>
959
- <sort_order translate="label">
960
- <label>Sort order</label>
961
- <frontend_type>text</frontend_type>
962
- <sort_order>110</sort_order>
963
- <show_in_default>1</show_in_default>
964
- <show_in_website>1</show_in_website>
965
- <show_in_store>1</show_in_store>
966
- </sort_order>
967
- <min_amount translate="label">
968
- <label>Minimum Amount (CENT)</label>
969
- <frontend_type>text</frontend_type>
970
- <sort_order>120</sort_order>
971
- <show_in_default>1</show_in_default>
972
- <show_in_website>1</show_in_website>
973
- <show_in_store>1</show_in_store>
974
- </min_amount>
975
- <max_amount translate="label">
976
- <label>Maximum Amount (CENT)</label>
977
- <frontend_type>text</frontend_type>
978
- <sort_order>130</sort_order>
979
- <show_in_default>1</show_in_default>
980
- <show_in_website>1</show_in_website>
981
- <show_in_store>1</show_in_store>
982
- </max_amount>
983
- <allowspecific translate="label">
984
- <label>allow specific countries</label>
985
- <frontend_type>allowspecific</frontend_type>
986
- <sort_order>140</sort_order>
987
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
988
- <show_in_default>1</show_in_default>
989
- <show_in_website>1</show_in_website>
990
- <show_in_store>1</show_in_store>
991
- </allowspecific>
992
- <specificcountry translate="label">
993
- <label>specific countries</label>
994
- <frontend_type>multiselect</frontend_type>
995
- <sort_order>150</sort_order>
996
- <source_model>adminhtml/system_config_source_country</source_model>
997
- <show_in_default>1</show_in_default>
998
- <show_in_website>1</show_in_website>
999
- <show_in_store>1</show_in_store>
1000
- </specificcountry>
1001
- </fields>
1002
- </hcdeps>
1003
- -->
1004
- <hcdide translate="label">
1005
- <label>Heidelpay iDeal (hcd)</label>
1006
- <frontend_type>text</frontend_type>
1007
- <sort_order>160</sort_order>
1008
- <show_in_default>1</show_in_default>
1009
- <show_in_website>1</show_in_website>
1010
- <show_in_store>1</show_in_store>
1011
- <fields>
1012
- <title translate="label">
1013
- <label>Title</label>
1014
- <frontend_type>text</frontend_type>
1015
- <sort_order>10</sort_order>
1016
- <show_in_default>1</show_in_default>
1017
- <show_in_website>1</show_in_website>
1018
- <show_in_store>1</show_in_store>
1019
- </title>
1020
- <active translate="label">
1021
- <label>Enabled</label>
1022
- <frontend_type>select</frontend_type>
1023
- <source_model>adminhtml/system_config_source_yesno</source_model>
1024
- <sort_order>20</sort_order>
1025
- <show_in_default>1</show_in_default>
1026
- <show_in_website>1</show_in_website>
1027
- <show_in_store>1</show_in_store>
1028
- </active>
1029
- <channel translate="label">
1030
- <label>Channel ID</label>
1031
- <frontend_type>text</frontend_type>
1032
- <sort_order>40</sort_order>
1033
- <show_in_default>1</show_in_default>
1034
- <show_in_website>1</show_in_website>
1035
- <show_in_store>1</show_in_store>
1036
- </channel>
1037
- <invioce translate="label">
1038
- <label>Automatically invoiced</label>
1039
- <frontend_type>select</frontend_type>
1040
- <source_model>adminhtml/system_config_source_yesno</source_model>
1041
- <sort_order>70</sort_order>
1042
- <show_in_default>1</show_in_default>
1043
- <show_in_website>1</show_in_website>
1044
- <show_in_store>1</show_in_store>
1045
- </invioce>
1046
- <sort_order translate="label">
1047
- <label>Sort order</label>
1048
- <frontend_type>text</frontend_type>
1049
- <sort_order>110</sort_order>
1050
- <show_in_default>1</show_in_default>
1051
- <show_in_website>1</show_in_website>
1052
- <show_in_store>1</show_in_store>
1053
- </sort_order>
1054
- <min_amount translate="label">
1055
- <label>Minimum Amount (CENT)</label>
1056
- <frontend_type>text</frontend_type>
1057
- <sort_order>120</sort_order>
1058
- <show_in_default>1</show_in_default>
1059
- <show_in_website>1</show_in_website>
1060
- <show_in_store>1</show_in_store>
1061
- </min_amount>
1062
- <max_amount translate="label">
1063
- <label>Maximum Amount (CENT)</label>
1064
- <frontend_type>text</frontend_type>
1065
- <sort_order>130</sort_order>
1066
- <show_in_default>1</show_in_default>
1067
- <show_in_website>1</show_in_website>
1068
- <show_in_store>1</show_in_store>
1069
- </max_amount>
1070
- <allowspecific translate="label">
1071
- <label>allow specific countries</label>
1072
- <frontend_type>allowspecific</frontend_type>
1073
- <sort_order>140</sort_order>
1074
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1075
- <show_in_default>1</show_in_default>
1076
- <show_in_website>1</show_in_website>
1077
- <show_in_store>1</show_in_store>
1078
- </allowspecific>
1079
- <specificcountry translate="label">
1080
- <label>specific countries</label>
1081
- <frontend_type>multiselect</frontend_type>
1082
- <sort_order>150</sort_order>
1083
- <source_model>adminhtml/system_config_source_country</source_model>
1084
- <show_in_default>1</show_in_default>
1085
- <show_in_website>1</show_in_website>
1086
- <show_in_store>1</show_in_store>
1087
- </specificcountry>
1088
- </fields>
1089
- </hcdide>
1090
- <hcdpp translate="label">
1091
- <label>Heidelpay Prepayment (hcd)</label>
1092
- <frontend_type>text</frontend_type>
1093
- <sort_order>100</sort_order>
1094
- <show_in_default>1</show_in_default>
1095
- <show_in_website>1</show_in_website>
1096
- <show_in_store>1</show_in_store>
1097
- <fields>
1098
- <title translate="label">
1099
- <label>Title</label>
1100
- <frontend_type>text</frontend_type>
1101
- <sort_order>10</sort_order>
1102
- <show_in_default>1</show_in_default>
1103
- <show_in_website>1</show_in_website>
1104
- <show_in_store>1</show_in_store>
1105
- </title>
1106
- <active translate="label">
1107
- <label>Enabled</label>
1108
- <frontend_type>select</frontend_type>
1109
- <source_model>adminhtml/system_config_source_yesno</source_model>
1110
- <sort_order>20</sort_order>
1111
- <show_in_default>1</show_in_default>
1112
- <show_in_website>1</show_in_website>
1113
- <show_in_store>1</show_in_store>
1114
- </active>
1115
- <channel translate="label">
1116
- <label>Channel ID</label>
1117
- <frontend_type>text</frontend_type>
1118
- <sort_order>40</sort_order>
1119
- <show_in_default>1</show_in_default>
1120
- <show_in_website>1</show_in_website>
1121
- <show_in_store>1</show_in_store>
1122
- </channel>
1123
- <invioce translate="label">
1124
- <label>Automatically invoiced</label>
1125
- <frontend_type>select</frontend_type>
1126
- <source_model>adminhtml/system_config_source_yesno</source_model>
1127
- <sort_order>70</sort_order>
1128
- <show_in_default>1</show_in_default>
1129
- <show_in_website>1</show_in_website>
1130
- <show_in_store>1</show_in_store>
1131
- </invioce>
1132
- <sort_order translate="label">
1133
- <label>Sort order</label>
1134
- <frontend_type>text</frontend_type>
1135
- <sort_order>110</sort_order>
1136
- <show_in_default>1</show_in_default>
1137
- <show_in_website>1</show_in_website>
1138
- <show_in_store>1</show_in_store>
1139
- </sort_order>
1140
- <min_amount translate="label">
1141
- <label>Minimum Amount (CENT)</label>
1142
- <frontend_type>text</frontend_type>
1143
- <sort_order>120</sort_order>
1144
- <show_in_default>1</show_in_default>
1145
- <show_in_website>1</show_in_website>
1146
- <show_in_store>1</show_in_store>
1147
- </min_amount>
1148
- <max_amount translate="label">
1149
- <label>Maximum Amount (CENT)</label>
1150
- <frontend_type>text</frontend_type>
1151
- <sort_order>130</sort_order>
1152
- <show_in_default>1</show_in_default>
1153
- <show_in_website>1</show_in_website>
1154
- <show_in_store>1</show_in_store>
1155
- </max_amount>
1156
- <allowspecific translate="label">
1157
- <label>allow specific countries</label>
1158
- <frontend_type>allowspecific</frontend_type>
1159
- <sort_order>140</sort_order>
1160
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1161
- <show_in_default>1</show_in_default>
1162
- <show_in_website>1</show_in_website>
1163
- <show_in_store>1</show_in_store>
1164
- </allowspecific>
1165
- <specificcountry translate="label">
1166
- <label>specific countries</label>
1167
- <frontend_type>multiselect</frontend_type>
1168
- <sort_order>150</sort_order>
1169
- <source_model>adminhtml/system_config_source_country</source_model>
1170
- <show_in_default>1</show_in_default>
1171
- <show_in_website>1</show_in_website>
1172
- <show_in_store>1</show_in_store>
1173
- </specificcountry>
1174
- </fields>
1175
- </hcdpp>
1176
- <hcdiv translate="label">
1177
- <label>Heidelpay Invoice (hcd)</label>
1178
- <frontend_type>text</frontend_type>
1179
- <sort_order>110</sort_order>
1180
- <show_in_default>1</show_in_default>
1181
- <show_in_website>1</show_in_website>
1182
- <show_in_store>1</show_in_store>
1183
- <fields>
1184
- <title translate="label">
1185
- <label>Title</label>
1186
- <frontend_type>text</frontend_type>
1187
- <sort_order>10</sort_order>
1188
- <show_in_default>1</show_in_default>
1189
- <show_in_website>1</show_in_website>
1190
- <show_in_store>1</show_in_store>
1191
- </title>
1192
- <active translate="label">
1193
- <label>Enabled</label>
1194
- <frontend_type>select</frontend_type>
1195
- <source_model>adminhtml/system_config_source_yesno</source_model>
1196
- <sort_order>20</sort_order>
1197
- <show_in_default>1</show_in_default>
1198
- <show_in_website>1</show_in_website>
1199
- <show_in_store>1</show_in_store>
1200
- </active>
1201
- <channel translate="label">
1202
- <label>Channel ID</label>
1203
- <frontend_type>text</frontend_type>
1204
- <sort_order>40</sort_order>
1205
- <show_in_default>1</show_in_default>
1206
- <show_in_website>1</show_in_website>
1207
- <show_in_store>1</show_in_store>
1208
- </channel>
1209
- <invioce translate="label">
1210
- <label>Automatically invoiced</label>
1211
- <frontend_type>select</frontend_type>
1212
- <source_model>adminhtml/system_config_source_yesno</source_model>
1213
- <sort_order>70</sort_order>
1214
- <show_in_default>1</show_in_default>
1215
- <show_in_website>1</show_in_website>
1216
- <show_in_store>1</show_in_store>
1217
- </invioce>
1218
- <capture_on_delivery translate="label">
1219
- <label>Send delivery note to Heidelpay</label>
1220
- <comment>please note that this is only necessary, when you use purchase on account with payment guarantee.</comment>
1221
- <frontend_type>select</frontend_type>
1222
- <source_model>adminhtml/system_config_source_yesno</source_model>
1223
- <sort_order>80</sort_order>
1224
- <show_in_default>1</show_in_default>
1225
- <show_in_website>1</show_in_website>
1226
- <show_in_store>1</show_in_store>
1227
- </capture_on_delivery>
1228
- <sort_order translate="label">
1229
- <label>Sort order</label>
1230
- <frontend_type>text</frontend_type>
1231
- <sort_order>110</sort_order>
1232
- <show_in_default>1</show_in_default>
1233
- <show_in_website>1</show_in_website>
1234
- <show_in_store>1</show_in_store>
1235
- </sort_order>
1236
- <min_amount translate="label">
1237
- <label>Minimum Amount (CENT)</label>
1238
- <frontend_type>text</frontend_type>
1239
- <sort_order>120</sort_order>
1240
- <show_in_default>1</show_in_default>
1241
- <show_in_website>1</show_in_website>
1242
- <show_in_store>1</show_in_store>
1243
- </min_amount>
1244
- <max_amount translate="label">
1245
- <label>Maximum Amount (CENT)</label>
1246
- <frontend_type>text</frontend_type>
1247
- <sort_order>130</sort_order>
1248
- <show_in_default>1</show_in_default>
1249
- <show_in_website>1</show_in_website>
1250
- <show_in_store>1</show_in_store>
1251
- </max_amount>
1252
- <allowspecific translate="label">
1253
- <label>allow specific countries</label>
1254
- <frontend_type>allowspecific</frontend_type>
1255
- <sort_order>140</sort_order>
1256
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1257
- <show_in_default>1</show_in_default>
1258
- <show_in_website>1</show_in_website>
1259
- <show_in_store>1</show_in_store>
1260
- </allowspecific>
1261
- <specificcountry translate="label">
1262
- <label>specific countries</label>
1263
- <frontend_type>multiselect</frontend_type>
1264
- <sort_order>150</sort_order>
1265
- <source_model>adminhtml/system_config_source_country</source_model>
1266
- <show_in_default>1</show_in_default>
1267
- <show_in_website>1</show_in_website>
1268
- <show_in_store>1</show_in_store>
1269
- </specificcountry>
1270
- </fields>
1271
- </hcdiv>
1272
- <hcdpf translate="label">
1273
- <label>Heidelpay Postfinance (hcd)</label>
1274
- <frontend_type>text</frontend_type>
1275
- <sort_order>140</sort_order>
1276
- <show_in_default>1</show_in_default>
1277
- <show_in_website>1</show_in_website>
1278
- <show_in_store>1</show_in_store>
1279
- <fields>
1280
- <title translate="label">
1281
- <label>Title</label>
1282
- <frontend_type>text</frontend_type>
1283
- <sort_order>10</sort_order>
1284
- <show_in_default>1</show_in_default>
1285
- <show_in_website>1</show_in_website>
1286
- <show_in_store>1</show_in_store>
1287
- </title>
1288
- <active translate="label">
1289
- <label>Enabled</label>
1290
- <frontend_type>select</frontend_type>
1291
- <source_model>adminhtml/system_config_source_yesno</source_model>
1292
- <sort_order>20</sort_order>
1293
- <show_in_default>1</show_in_default>
1294
- <show_in_website>1</show_in_website>
1295
- <show_in_store>1</show_in_store>
1296
- </active>
1297
- <channel translate="label">
1298
- <label>Channel ID</label>
1299
- <frontend_type>text</frontend_type>
1300
- <sort_order>40</sort_order>
1301
- <show_in_default>1</show_in_default>
1302
- <show_in_website>1</show_in_website>
1303
- <show_in_store>1</show_in_store>
1304
- </channel>
1305
- <invioce translate="label">
1306
- <label>Automatically invoiced</label>
1307
- <frontend_type>select</frontend_type>
1308
- <source_model>adminhtml/system_config_source_yesno</source_model>
1309
- <sort_order>70</sort_order>
1310
- <show_in_default>1</show_in_default>
1311
- <show_in_website>1</show_in_website>
1312
- <show_in_store>1</show_in_store>
1313
- </invioce>
1314
- <sort_order translate="label">
1315
- <label>Sort order</label>
1316
- <frontend_type>text</frontend_type>
1317
- <sort_order>110</sort_order>
1318
- <show_in_default>1</show_in_default>
1319
- <show_in_website>1</show_in_website>
1320
- <show_in_store>1</show_in_store>
1321
- </sort_order>
1322
- <min_amount translate="label">
1323
- <label>Minimum Amount (CENT)</label>
1324
- <frontend_type>text</frontend_type>
1325
- <sort_order>120</sort_order>
1326
- <show_in_default>1</show_in_default>
1327
- <show_in_website>1</show_in_website>
1328
- <show_in_store>1</show_in_store>
1329
- </min_amount>
1330
- <max_amount translate="label">
1331
- <label>Maximum Amount (CENT)</label>
1332
- <frontend_type>text</frontend_type>
1333
- <sort_order>130</sort_order>
1334
- <show_in_default>1</show_in_default>
1335
- <show_in_website>1</show_in_website>
1336
- <show_in_store>1</show_in_store>
1337
- </max_amount>
1338
- <allowspecific translate="label">
1339
- <label>allow specific countries</label>
1340
- <frontend_type>allowspecific</frontend_type>
1341
- <sort_order>140</sort_order>
1342
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1343
- <show_in_default>1</show_in_default>
1344
- <show_in_website>1</show_in_website>
1345
- <show_in_store>1</show_in_store>
1346
- </allowspecific>
1347
- <specificcountry translate="label">
1348
- <label>specific countries</label>
1349
- <frontend_type>multiselect</frontend_type>
1350
- <sort_order>150</sort_order>
1351
- <source_model>adminhtml/system_config_source_country</source_model>
1352
- <show_in_default>1</show_in_default>
1353
- <show_in_website>1</show_in_website>
1354
- <show_in_store>1</show_in_store>
1355
- </specificcountry>
1356
- </fields>
1357
- </hcdpf>
1358
- <!-- REMOVED
1359
- <hcdyt translate="label">
1360
- <label>Heidelpay Yapital (hcd)</label>
1361
- <frontend_type>text</frontend_type>
1362
- <sort_order>140</sort_order>
1363
- <show_in_default>1</show_in_default>
1364
- <show_in_website>1</show_in_website>
1365
- <show_in_store>1</show_in_store>
1366
- <fields>
1367
- <title translate="label">
1368
- <label>Title</label>
1369
- <frontend_type>text</frontend_type>
1370
- <sort_order>10</sort_order>
1371
- <show_in_default>1</show_in_default>
1372
- <show_in_website>1</show_in_website>
1373
- <show_in_store>1</show_in_store>
1374
- </title>
1375
- <active translate="label">
1376
- <label>Enabled</label>
1377
- <frontend_type>select</frontend_type>
1378
- <source_model>adminhtml/system_config_source_yesno</source_model>
1379
- <sort_order>20</sort_order>
1380
- <show_in_default>1</show_in_default>
1381
- <show_in_website>1</show_in_website>
1382
- <show_in_store>1</show_in_store>
1383
- </active>
1384
- <channel translate="label">
1385
- <label>Channel ID</label>
1386
- <frontend_type>text</frontend_type>
1387
- <sort_order>40</sort_order>
1388
- <show_in_default>1</show_in_default>
1389
- <show_in_website>1</show_in_website>
1390
- <show_in_store>1</show_in_store>
1391
- </channel>
1392
- <invioce translate="label">
1393
- <label>Automatically invoiced</label>
1394
- <frontend_type>select</frontend_type>
1395
- <source_model>adminhtml/system_config_source_yesno</source_model>
1396
- <sort_order>70</sort_order>
1397
- <show_in_default>1</show_in_default>
1398
- <show_in_website>1</show_in_website>
1399
- <show_in_store>1</show_in_store>
1400
- </invioce>
1401
- <sort_order translate="label">
1402
- <label>Sort order</label>
1403
- <frontend_type>text</frontend_type>
1404
- <sort_order>110</sort_order>
1405
- <show_in_default>1</show_in_default>
1406
- <show_in_website>1</show_in_website>
1407
- <show_in_store>1</show_in_store>
1408
- </sort_order>
1409
- <min_amount translate="label">
1410
- <label>Minimum Amount (CENT)</label>
1411
- <frontend_type>text</frontend_type>
1412
- <sort_order>120</sort_order>
1413
- <show_in_default>1</show_in_default>
1414
- <show_in_website>1</show_in_website>
1415
- <show_in_store>1</show_in_store>
1416
- </min_amount>
1417
- <max_amount translate="label">
1418
- <label>Maximum Amount (CENT)</label>
1419
- <frontend_type>text</frontend_type>
1420
- <sort_order>130</sort_order>
1421
- <show_in_default>1</show_in_default>
1422
- <show_in_website>1</show_in_website>
1423
- <show_in_store>1</show_in_store>
1424
- </max_amount>
1425
- <allowspecific translate="label">
1426
- <label>allow specific countries</label>
1427
- <frontend_type>allowspecific</frontend_type>
1428
- <sort_order>140</sort_order>
1429
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1430
- <show_in_default>1</show_in_default>
1431
- <show_in_website>1</show_in_website>
1432
- <show_in_store>1</show_in_store>
1433
- </allowspecific>
1434
- <specificcountry translate="label">
1435
- <label>specific countries</label>
1436
- <frontend_type>multiselect</frontend_type>
1437
- <sort_order>150</sort_order>
1438
- <source_model>adminhtml/system_config_source_country</source_model>
1439
- <show_in_default>1</show_in_default>
1440
- <show_in_website>1</show_in_website>
1441
- <show_in_store>1</show_in_store>
1442
- </specificcountry>
1443
- </fields>
1444
- </hcdyt> -->
1445
- <hcdmpa translate="label">
1446
- <label>Heidelpay MasterPass (hcd)</label>
1447
- <frontend_type>text</frontend_type>
1448
- <sort_order>140</sort_order>
1449
- <show_in_default>1</show_in_default>
1450
- <show_in_website>1</show_in_website>
1451
- <show_in_store>1</show_in_store>
1452
- <fields>
1453
- <title translate="label">
1454
- <label>Title</label>
1455
- <frontend_type>text</frontend_type>
1456
- <sort_order>10</sort_order>
1457
- <show_in_default>1</show_in_default>
1458
- <show_in_website>1</show_in_website>
1459
- <show_in_store>1</show_in_store>
1460
- </title>
1461
- <active translate="label">
1462
- <label>Enabled</label>
1463
- <frontend_type>select</frontend_type>
1464
- <source_model>adminhtml/system_config_source_yesno</source_model>
1465
- <sort_order>20</sort_order>
1466
- <show_in_default>1</show_in_default>
1467
- <show_in_website>1</show_in_website>
1468
- <show_in_store>1</show_in_store>
1469
- </active>
1470
- <channel translate="label">
1471
- <label>Channel ID</label>
1472
- <frontend_type>text</frontend_type>
1473
- <sort_order>40</sort_order>
1474
- <show_in_default>1</show_in_default>
1475
- <show_in_website>1</show_in_website>
1476
- <show_in_store>1</show_in_store>
1477
- </channel>
1478
- <bookingmode translate="label">
1479
- <label>Bookingmode</label>
1480
- <frontend_type>select</frontend_type>
1481
- <source_model>hcd/system_config_source_bookingmode</source_model>
1482
- <sort_order>50</sort_order>
1483
- <show_in_default>1</show_in_default>
1484
- <show_in_website>1</show_in_website>
1485
- <show_in_store>1</show_in_store>
1486
- </bookingmode>
1487
- <invioce translate="label">
1488
- <label>Automatically invoiced</label>
1489
- <frontend_type>select</frontend_type>
1490
- <source_model>adminhtml/system_config_source_yesno</source_model>
1491
- <sort_order>70</sort_order>
1492
- <show_in_default>1</show_in_default>
1493
- <show_in_website>1</show_in_website>
1494
- <show_in_store>1</show_in_store>
1495
- </invioce>
1496
- <!--<capture_on_delivery translate="label">
1497
- <label>Automatically capture on delivery</label>
1498
- <frontend_type>select</frontend_type>
1499
- <source_model>adminhtml/system_config_source_yesno</source_model>
1500
- <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
1501
- <sort_order>80</sort_order>
1502
- <show_in_default>1</show_in_default>
1503
- <show_in_website>1</show_in_website>
1504
- <show_in_store>1</show_in_store>
1505
- </capture_on_delivery>-->
1506
- <sort_order translate="label">
1507
- <label>Sort order</label>
1508
- <frontend_type>text</frontend_type>
1509
- <sort_order>110</sort_order>
1510
- <show_in_default>1</show_in_default>
1511
- <show_in_website>1</show_in_website>
1512
- <show_in_store>1</show_in_store>
1513
- </sort_order>
1514
- <min_amount translate="label">
1515
- <label>Minimum Amount (CENT)</label>
1516
- <frontend_type>text</frontend_type>
1517
- <sort_order>120</sort_order>
1518
- <show_in_default>1</show_in_default>
1519
- <show_in_website>1</show_in_website>
1520
- <show_in_store>1</show_in_store>
1521
- </min_amount>
1522
- <max_amount translate="label">
1523
- <label>Maximum Amount (CENT)</label>
1524
- <frontend_type>text</frontend_type>
1525
- <sort_order>130</sort_order>
1526
- <show_in_default>1</show_in_default>
1527
- <show_in_website>1</show_in_website>
1528
- <show_in_store>1</show_in_store>
1529
- </max_amount>
1530
- <allowspecific translate="label">
1531
- <label>allow specific countries</label>
1532
- <frontend_type>allowspecific</frontend_type>
1533
- <sort_order>140</sort_order>
1534
- <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1535
- <show_in_default>1</show_in_default>
1536
- <show_in_website>1</show_in_website>
1537
- <show_in_store>1</show_in_store>
1538
- </allowspecific>
1539
- <specificcountry translate="label">
1540
- <label>specific countries</label>
1541
- <frontend_type>multiselect</frontend_type>
1542
- <sort_order>150</sort_order>
1543
- <source_model>adminhtml/system_config_source_country</source_model>
1544
- <show_in_default>1</show_in_default>
1545
- <show_in_website>1</show_in_website>
1546
- <show_in_store>1</show_in_store>
1547
- </specificcountry>
1548
- </fields>
1549
- </hcdmpa>
1550
- </groups>
1551
- </payment>
1552
- </sections>
1553
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
+ <sections>
4
+ <!--{{{ Global Settings-->
5
+ <hcd translate="label" module="hcd">
6
+ <label>
7
+ <![CDATA[<img alt="Heidelpay" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==" /> Heidelpay CD-Edition ]]></label>
8
+ <tab>sales</tab>
9
+ <frontend_type>text</frontend_type>
10
+ <sort_order>405</sort_order>
11
+ <show_in_default>1</show_in_default>
12
+ <show_in_website>1</show_in_website>
13
+ <show_in_store>1</show_in_store>
14
+ <groups>
15
+ <about_us>
16
+ <label>about Heidelpay</label>
17
  <frontend_type>text</frontend_type>
18
  <sort_order>1</sort_order>
19
  <show_in_default>1</show_in_default>
20
  <show_in_website>1</show_in_website>
21
  <show_in_store>1</show_in_store>
22
+ <comment><![CDATA[<br />
23
  <div class="box">
24
  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAAA7BAMAAAAEMPCJAAAAAXNSR0IArs4c6QAAABhQTFRFPT09u7u7////k5OTDw8Pa2tr2dnZ7u7uGx/afwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kKFggjGov/KAYAAAJ5SURBVEjH7dW7l6IwFAfgOKK247s1l0PS+rYNy2NbRVxbZUZtncyq//7eCD6QeGYo9pwtlgb55TPkARcCuQ6SB7OXXJz++M//Mt/l4sz+N/npJHV83SWEzHdpzutT1xXz9iNnXZcsBgvDnd1zGrqktCCYyhRnoddSybFuFG6cGl4Lb8e3TbcoE67OPCxeBkjDwoVToxgl6ee5F8XV+dW5Tgdv1E/48C79MJYxdwBM75bjlZBnfvCiu/QgogtX/d0dq4ri3Einw3LCzYc9YUQi3zsPeyRkzIe1h01avSAPH9NG5czZQze4UA6zaSalzpl3gswz0Nja79k0XCveiDINVrkQZtPfBcWLmRyYQ5xsSj3kopJtgND9mQ25gdwNNLyhTYeKR5qGvVvTpO+KS02DJXRpB7mnyfG50aXWM071ncSPmIbr0/x8rGvgv7RpkKtGqk/ZKB3El6z8jE/TQXxJ7S85m+Tilp2v93Yu/s2xv2FZpIsJ8Daw0WQKvDlTPFq3cKWr7dMRbh8T5AQLypBgWfChgUUY9sLoU5vNZ80AXnujgSWBL688rFkVLAargPrck/goTiNqU5tj1Rzg5rIi7QPt342d+lblRH3qm/jGEe5wWcLecaMOn8gG2LUZ3XHmd4Rr2PivF4AudQ0hkOP9zTq+U3XowQZSvXcK1eou5lPqVKvbFD/IXpqj4zUcjK8Gg4WklQzmQw0GzHaQ5szbrSo4VbLbCBhOPp3LVGc4VWCDPqTGjisoIlqGlSgRrOTxQs5HS9jgQuJ85I0fgUf4haslJ9yUtzHwHVsm28TV8G/8ycGWt9/jXJwFubhZ+wafXH8e5Ndcf/wBKDObGG4GKXIAAAAASUVORK5CYII=" alt="Heidelpay" />
25
  <p style="font-size:12px; font-weight: bold;">Heidelberger Payment GmbH - Ihr Full Service Payment Provider - alles aus einer Hand </p>
31
  <br /><br /><p style="font-size:12px;"> Die Plugin wird bei der Installation mit Testdaten aktiviert.</p>
32
  </div>
33
  ]]>
34
+ </comment>
35
+ </about_us>
36
+ <settings translate="label">
37
+ <label>General Settings Heidelpay</label>
38
+ <frontend_type>text</frontend_type>
39
+ <sort_order>10</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ <fields>
44
+ <transactionmode translate="label">
45
+ <label>Use Testsystem</label>
46
+ <frontend_type>select</frontend_type>
47
+ <source_model>adminhtml/system_config_source_yesno</source_model>
48
+ <comment>If is set to yes, transactionis use the sandbox system and the
49
+ TRANSACTION.MODE=CONNECTOR_TEST, otherwise real payment will be used with mode LIVE. For
50
+ details see integration basisc documentation.
51
+ </comment>
52
+ <sort_order>5</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
+ </transactionmode>
57
+ <security_sender translate="label">
58
+ <label>Security Sender</label>
59
+ <frontend_type>text</frontend_type>
60
+ <sort_order>10</sort_order>
61
+ <show_in_default>1</show_in_default>
62
+ <show_in_website>1</show_in_website>
63
+ <show_in_store>1</show_in_store>
64
+ </security_sender>
65
+ <user_id translate="label">
66
+ <label>User Login</label>
67
+ <frontend_type>text</frontend_type>
68
+ <sort_order>20</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </user_id>
73
+ <user_pwd translate="label">
74
+ <label>User Password</label>
75
+ <frontend_type>text</frontend_type>
76
+ <sort_order>30</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </user_pwd>
81
+ <returnurl translate="label">
82
+ <label>Return in Errorcase</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>hcd/system_config_source_returnurl</source_model>
85
+ <comment>Please configurate where your costumer should be redirected to in case of an
86
+ payment error
87
+ </comment>
88
+ <sort_order>50</sort_order>
89
+ <show_in_default>1</show_in_default>
90
+ <show_in_website>1</show_in_website>
91
+ <show_in_store>1</show_in_store>
92
+ </returnurl>
93
+ <log translate="label">
94
+ <label>Debug Log</label>
95
+ <frontend_type>select</frontend_type>
96
+ <source_model>adminhtml/system_config_source_yesno</source_model>
97
+ <comment>If is set to yes, you can controll all neccessary conntetion Data in
98
+ /var/log/Heidelpay.log
99
+ </comment>
100
+ <sort_order>60</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>1</show_in_store>
104
+ </log>
105
+ <invoicing translate="label">
106
+ <label>Invoicing over heidelpay</label>
107
+ <frontend_type>select</frontend_type>
108
+ <source_model>adminhtml/system_config_source_yesno</source_model>
109
+ <comment>Invoicing over heidelpay requires an extra contract. For more information, please
110
+ contact your key account manager.
111
+ </comment>
112
+ <sort_order>70</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
+ </invoicing>
117
+ </fields>
118
+ </settings>
119
+ </groups>
120
+ </hcd>
121
+ </sections>
122
+ <sections>
123
+ <payment>
124
+ <groups id="hcd" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1"
125
+ showInStore="1">
126
+ <hcdcc translate="label">
127
+ <label>Heidelpay Credit Card (hcd)</label>
128
+ <frontend_type>text</frontend_type>
129
+ <sort_order>50</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ <fields>
134
+ <title translate="label">
135
+ <label>Title</label>
136
+ <frontend_type>text</frontend_type>
137
+ <sort_order>10</sort_order>
138
+ <show_in_default>1</show_in_default>
139
+ <show_in_website>1</show_in_website>
140
+ <show_in_store>1</show_in_store>
141
+ </title>
142
+ <active translate="label">
143
+ <label>Enabled</label>
144
+ <frontend_type>select</frontend_type>
145
+ <source_model>adminhtml/system_config_source_yesno</source_model>
146
+ <sort_order>20</sort_order>
147
+ <show_in_default>1</show_in_default>
148
+ <show_in_website>1</show_in_website>
149
+ <show_in_store>1</show_in_store>
150
+ </active>
151
+ <channel translate="label">
152
+ <label>Channel ID</label>
153
+ <frontend_type>text</frontend_type>
154
+ <sort_order>40</sort_order>
155
+ <show_in_default>1</show_in_default>
156
+ <show_in_website>1</show_in_website>
157
+ <show_in_store>1</show_in_store>
158
+ </channel>
159
+ <bookingmode translate="label">
160
+ <label>Bookingmode</label>
161
+ <frontend_type>select</frontend_type>
162
+ <source_model>hcd/system_config_source_bookingmode</source_model>
163
+ <sort_order>50</sort_order>
164
+ <show_in_default>1</show_in_default>
165
+ <show_in_website>1</show_in_website>
166
+ <show_in_store>1</show_in_store>
167
+ </bookingmode>
168
+ <recognition translate="label">
169
+ <label>Recognition</label>
170
+ <frontend_type>select</frontend_type>
171
+ <source_model>hcd/system_config_source_recognition</source_model>
172
+ <sort_order>60</sort_order>
173
+ <show_in_default>1</show_in_default>
174
+ <show_in_website>1</show_in_website>
175
+ <show_in_store>1</show_in_store>
176
+ </recognition>
177
+ <invioce translate="label">
178
+ <label>Automatically invoiced</label>
179
+ <frontend_type>select</frontend_type>
180
+ <source_model>adminhtml/system_config_source_yesno</source_model>
181
+ <sort_order>70</sort_order>
182
+ <show_in_default>1</show_in_default>
183
+ <show_in_website>1</show_in_website>
184
+ <show_in_store>1</show_in_store>
185
+ </invioce>
186
+ <!--<capture_on_delivery translate="label">
187
+ <label>Automatically capture on delivery</label>
188
+ <frontend_type>select</frontend_type>
189
+ <source_model>adminhtml/system_config_source_yesno</source_model>
190
+ <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
191
+ <sort_order>80</sort_order>
192
+ <show_in_default>1</show_in_default>
193
+ <show_in_website>1</show_in_website>
194
+ <show_in_store>1</show_in_store>
195
+ </capture_on_delivery>-->
196
+ <sort_order translate="label">
197
+ <label>Sort order</label>
198
+ <frontend_type>text</frontend_type>
199
+ <sort_order>110</sort_order>
200
+ <show_in_default>1</show_in_default>
201
+ <show_in_website>1</show_in_website>
202
+ <show_in_store>1</show_in_store>
203
+ </sort_order>
204
+ <min_amount translate="label">
205
+ <label>Minimum Amount (CENT)</label>
206
+ <frontend_type>text</frontend_type>
207
+ <sort_order>120</sort_order>
208
+ <show_in_default>1</show_in_default>
209
+ <show_in_website>1</show_in_website>
210
+ <show_in_store>1</show_in_store>
211
+ </min_amount>
212
+ <max_amount translate="label">
213
+ <label>Maximum Amount (CENT)</label>
214
+ <frontend_type>text</frontend_type>
215
+ <sort_order>130</sort_order>
216
+ <show_in_default>1</show_in_default>
217
+ <show_in_website>1</show_in_website>
218
+ <show_in_store>1</show_in_store>
219
+ </max_amount>
220
+ <allowspecific translate="label">
221
+ <label>allow specific countries</label>
222
+ <frontend_type>allowspecific</frontend_type>
223
+ <sort_order>140</sort_order>
224
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
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
+ </allowspecific>
229
+ <specificcountry translate="label">
230
+ <label>specific countries</label>
231
+ <frontend_type>multiselect</frontend_type>
232
+ <sort_order>150</sort_order>
233
+ <source_model>adminhtml/system_config_source_country</source_model>
234
+ <show_in_default>1</show_in_default>
235
+ <show_in_website>1</show_in_website>
236
+ <show_in_store>1</show_in_store>
237
+ </specificcountry>
238
+ </fields>
239
+ </hcdcc>
240
+ <hcddc translate="label">
241
+ <label>Heidelpay Debit Card (hcd)</label>
242
+ <frontend_type>text</frontend_type>
243
+ <sort_order>130</sort_order>
244
+ <show_in_default>1</show_in_default>
245
+ <show_in_website>1</show_in_website>
246
+ <show_in_store>1</show_in_store>
247
+ <fields>
248
+ <title translate="label">
249
+ <label>Title</label>
250
+ <frontend_type>text</frontend_type>
251
+ <sort_order>10</sort_order>
252
+ <show_in_default>1</show_in_default>
253
+ <show_in_website>1</show_in_website>
254
+ <show_in_store>1</show_in_store>
255
+ </title>
256
+ <active translate="label">
257
+ <label>Enabled</label>
258
+ <frontend_type>select</frontend_type>
259
+ <source_model>adminhtml/system_config_source_yesno</source_model>
260
+ <sort_order>20</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>1</show_in_website>
263
+ <show_in_store>1</show_in_store>
264
+ </active>
265
+ <channel translate="label">
266
+ <label>Channel ID</label>
267
+ <frontend_type>text</frontend_type>
268
+ <sort_order>40</sort_order>
269
+ <show_in_default>1</show_in_default>
270
+ <show_in_website>1</show_in_website>
271
+ <show_in_store>1</show_in_store>
272
+ </channel>
273
+ <bookingmode translate="label">
274
+ <label>Bookinnmode</label>
275
+ <frontend_type>select</frontend_type>
276
+ <source_model>hcd/system_config_source_bookingmode</source_model>
277
+ <sort_order>50</sort_order>
278
+ <show_in_default>1</show_in_default>
279
+ <show_in_website>1</show_in_website>
280
+ <show_in_store>1</show_in_store>
281
+ </bookingmode>
282
+ <recognition translate="label">
283
+ <label>Recognition</label>
284
+ <frontend_type>select</frontend_type>
285
+ <source_model>hcd/system_config_source_recognition</source_model>
286
+ <sort_order>60</sort_order>
287
+ <show_in_default>1</show_in_default>
288
+ <show_in_website>1</show_in_website>
289
+ <show_in_store>1</show_in_store>
290
+ </recognition>
291
+ <invioce translate="label">
292
+ <label>Automatically invoiced</label>
293
+ <frontend_type>select</frontend_type>
294
+ <source_model>adminhtml/system_config_source_yesno</source_model>
295
+ <sort_order>70</sort_order>
296
+ <show_in_default>1</show_in_default>
297
+ <show_in_website>1</show_in_website>
298
+ <show_in_store>1</show_in_store>
299
+ </invioce>
300
+ <sort_order translate="label">
301
+ <label>Sort order</label>
302
+ <frontend_type>text</frontend_type>
303
+ <sort_order>110</sort_order>
304
+ <show_in_default>1</show_in_default>
305
+ <show_in_website>1</show_in_website>
306
+ <show_in_store>1</show_in_store>
307
+ </sort_order>
308
+ <min_amount translate="label">
309
+ <label>Minimum Amount (CENT)</label>
310
+ <frontend_type>text</frontend_type>
311
+ <sort_order>120</sort_order>
312
+ <show_in_default>1</show_in_default>
313
+ <show_in_website>1</show_in_website>
314
+ <show_in_store>1</show_in_store>
315
+ </min_amount>
316
+ <max_amount translate="label">
317
+ <label>Maximum Amount (CENT)</label>
318
+ <frontend_type>text</frontend_type>
319
+ <sort_order>130</sort_order>
320
+ <show_in_default>1</show_in_default>
321
+ <show_in_website>1</show_in_website>
322
+ <show_in_store>1</show_in_store>
323
+ </max_amount>
324
+ <allowspecific translate="label">
325
+ <label>allow specific countries</label>
326
+ <frontend_type>allowspecific</frontend_type>
327
+ <sort_order>140</sort_order>
328
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
329
+ <show_in_default>1</show_in_default>
330
+ <show_in_website>1</show_in_website>
331
+ <show_in_store>1</show_in_store>
332
+ </allowspecific>
333
+ <specificcountry translate="label">
334
+ <label>specific countries</label>
335
+ <frontend_type>multiselect</frontend_type>
336
+ <sort_order>150</sort_order>
337
+ <source_model>adminhtml/system_config_source_country</source_model>
338
+ <show_in_default>1</show_in_default>
339
+ <show_in_website>1</show_in_website>
340
+ <show_in_store>1</show_in_store>
341
+ </specificcountry>
342
+ </fields>
343
+ </hcddc>
344
+ <hcddd translate="label">
345
+ <label>Heidelpay Direct Debit (hcd)</label>
346
+ <frontend_type>text</frontend_type>
347
+ <sort_order>60</sort_order>
348
+ <show_in_default>1</show_in_default>
349
+ <show_in_website>1</show_in_website>
350
+ <show_in_store>1</show_in_store>
351
+ <fields>
352
+ <title translate="label">
353
+ <label>Title</label>
354
+ <frontend_type>text</frontend_type>
355
+ <sort_order>10</sort_order>
356
+ <show_in_default>1</show_in_default>
357
+ <show_in_website>1</show_in_website>
358
+ <show_in_store>1</show_in_store>
359
+ </title>
360
+ <active translate="label">
361
+ <label>Enabled</label>
362
+ <frontend_type>select</frontend_type>
363
+ <source_model>adminhtml/system_config_source_yesno</source_model>
364
+ <sort_order>20</sort_order>
365
+ <show_in_default>1</show_in_default>
366
+ <show_in_website>1</show_in_website>
367
+ <show_in_store>1</show_in_store>
368
+ </active>
369
+ <channel translate="label">
370
+ <label>Channel ID</label>
371
+ <frontend_type>text</frontend_type>
372
+ <sort_order>40</sort_order>
373
+ <show_in_default>1</show_in_default>
374
+ <show_in_website>1</show_in_website>
375
+ <show_in_store>1</show_in_store>
376
+ </channel>
377
+ <bookingmode translate="label">
378
+ <label>Bookingmode</label>
379
+ <frontend_type>select</frontend_type>
380
+ <source_model>hcd/system_config_source_bookingmode</source_model>
381
+ <sort_order>50</sort_order>
382
+ <show_in_default>1</show_in_default>
383
+ <show_in_website>1</show_in_website>
384
+ <show_in_store>1</show_in_store>
385
+ </bookingmode>
386
+ <recognition translate="label">
387
+ <label>Recognition</label>
388
+ <frontend_type>select</frontend_type>
389
+ <source_model>hcd/system_config_source_recognition</source_model>
390
+ <sort_order>60</sort_order>
391
+ <show_in_default>1</show_in_default>
392
+ <show_in_website>1</show_in_website>
393
+ <show_in_store>1</show_in_store>
394
+ </recognition>
395
+ <invioce translate="label">
396
+ <label>Automatically invoiced</label>
397
+ <frontend_type>select</frontend_type>
398
+ <source_model>adminhtml/system_config_source_yesno</source_model>
399
+ <sort_order>70</sort_order>
400
+ <show_in_default>1</show_in_default>
401
+ <show_in_website>1</show_in_website>
402
+ <show_in_store>1</show_in_store>
403
+ </invioce>
404
+ <sort_order translate="label">
405
+ <label>Sort order</label>
406
+ <frontend_type>text</frontend_type>
407
+ <sort_order>110</sort_order>
408
+ <show_in_default>1</show_in_default>
409
+ <show_in_website>1</show_in_website>
410
+ <show_in_store>1</show_in_store>
411
+ </sort_order>
412
+ <min_amount translate="label">
413
+ <label>Minimum Amount (CENT)</label>
414
+ <frontend_type>text</frontend_type>
415
+ <sort_order>120</sort_order>
416
+ <show_in_default>1</show_in_default>
417
+ <show_in_website>1</show_in_website>
418
+ <show_in_store>1</show_in_store>
419
+ </min_amount>
420
+ <max_amount translate="label">
421
+ <label>Maximum Amount (CENT)</label>
422
+ <frontend_type>text</frontend_type>
423
+ <sort_order>130</sort_order>
424
+ <show_in_default>1</show_in_default>
425
+ <show_in_website>1</show_in_website>
426
+ <show_in_store>1</show_in_store>
427
+ </max_amount>
428
+ <allowspecific translate="label">
429
+ <label>allow specific countries</label>
430
+ <frontend_type>allowspecific</frontend_type>
431
+ <sort_order>140</sort_order>
432
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
433
+ <show_in_default>1</show_in_default>
434
+ <show_in_website>1</show_in_website>
435
+ <show_in_store>1</show_in_store>
436
+ </allowspecific>
437
+ <specificcountry translate="label">
438
+ <label>specific countries</label>
439
+ <frontend_type>multiselect</frontend_type>
440
+ <sort_order>150</sort_order>
441
+ <source_model>adminhtml/system_config_source_country</source_model>
442
+ <show_in_default>1</show_in_default>
443
+ <show_in_website>1</show_in_website>
444
+ <show_in_store>1</show_in_store>
445
+ </specificcountry>
446
+ </fields>
447
+ </hcddd>
448
+ <hcdddsec translate="label">
449
+ <label>Heidelpay direct debit secured(hcd)</label>
450
+ <frontend_type>text</frontend_type>
451
+ <sort_order>65</sort_order>
452
+ <show_in_default>1</show_in_default>
453
+ <show_in_website>1</show_in_website>
454
+ <show_in_store>1</show_in_store>
455
+ <fields>
456
+ <title translate="label">
457
+ <label>Title</label>
458
+ <frontend_type>text</frontend_type>
459
+ <sort_order>10</sort_order>
460
+ <show_in_default>1</show_in_default>
461
+ <show_in_website>1</show_in_website>
462
+ <show_in_store>1</show_in_store>
463
+ </title>
464
+ <active translate="label">
465
+ <label>Enabled</label>
466
+ <frontend_type>select</frontend_type>
467
+ <source_model>adminhtml/system_config_source_yesno</source_model>
468
+ <sort_order>20</sort_order>
469
+ <show_in_default>1</show_in_default>
470
+ <show_in_website>1</show_in_website>
471
+ <show_in_store>1</show_in_store>
472
+ </active>
473
+ <channel translate="label">
474
+ <label>Channel ID</label>
475
+ <frontend_type>text</frontend_type>
476
+ <sort_order>40</sort_order>
477
+ <show_in_default>1</show_in_default>
478
+ <show_in_website>1</show_in_website>
479
+ <show_in_store>1</show_in_store>
480
+ </channel>
481
+ <recognition translate="label">
482
+ <label>Recognition</label>
483
+ <frontend_type>select</frontend_type>
484
+ <source_model>hcd/system_config_source_recognition</source_model>
485
+ <sort_order>60</sort_order>
486
+ <show_in_default>1</show_in_default>
487
+ <show_in_website>1</show_in_website>
488
+ <show_in_store>1</show_in_store>
489
+ </recognition>
490
+ <invioce translate="label">
491
+ <label>Automatically invoiced</label>
492
+ <frontend_type>select</frontend_type>
493
+ <source_model>adminhtml/system_config_source_yesno</source_model>
494
+ <sort_order>70</sort_order>
495
+ <show_in_default>1</show_in_default>
496
+ <show_in_website>1</show_in_website>
497
+ <show_in_store>1</show_in_store>
498
+ </invioce>
499
+ <sort_order translate="label">
500
+ <label>Sort order</label>
501
+ <frontend_type>text</frontend_type>
502
+ <sort_order>110</sort_order>
503
+ <show_in_default>1</show_in_default>
504
+ <show_in_website>1</show_in_website>
505
+ <show_in_store>1</show_in_store>
506
+ </sort_order>
507
+ <min_amount translate="label">
508
+ <label>Minimum Amount (CENT)</label>
509
+ <frontend_type>text</frontend_type>
510
+ <sort_order>120</sort_order>
511
+ <show_in_default>1</show_in_default>
512
+ <show_in_website>1</show_in_website>
513
+ <show_in_store>1</show_in_store>
514
+ </min_amount>
515
+ <max_amount translate="label">
516
+ <label>Maximum Amount (CENT)</label>
517
+ <frontend_type>text</frontend_type>
518
+ <sort_order>130</sort_order>
519
+ <show_in_default>1</show_in_default>
520
+ <show_in_website>1</show_in_website>
521
+ <show_in_store>1</show_in_store>
522
+ </max_amount>
523
+ <allowspecific translate="label">
524
+ <label>allow specific countries</label>
525
+ <frontend_type>allowspecific</frontend_type>
526
+ <sort_order>140</sort_order>
527
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
528
+ <show_in_default>1</show_in_default>
529
+ <show_in_website>1</show_in_website>
530
+ <show_in_store>1</show_in_store>
531
+ </allowspecific>
532
+ <specificcountry translate="label">
533
+ <label>specific countries</label>
534
+ <frontend_type>multiselect</frontend_type>
535
+ <sort_order>150</sort_order>
536
+ <source_model>adminhtml/system_config_source_country</source_model>
537
+ <show_in_default>1</show_in_default>
538
+ <show_in_website>1</show_in_website>
539
+ <show_in_store>1</show_in_store>
540
+ </specificcountry>
541
+ </fields>
542
+ </hcdddsec>
543
+ <hcdsu translate="label">
544
+ <label><![CDATA[Heidelpay SOFORT &Uuml;berweisung (hcd)]]></label>
545
+ <frontend_type>text</frontend_type>
546
+ <sort_order>80</sort_order>
547
+ <show_in_default>1</show_in_default>
548
+ <show_in_website>1</show_in_website>
549
+ <show_in_store>1</show_in_store>
550
+ <fields>
551
+ <title translate="label">
552
+ <label>Title</label>
553
+ <frontend_type>text</frontend_type>
554
+ <sort_order>10</sort_order>
555
+ <show_in_default>1</show_in_default>
556
+ <show_in_website>1</show_in_website>
557
+ <show_in_store>1</show_in_store>
558
+ </title>
559
+ <active translate="label">
560
+ <label>Enabled</label>
561
+ <frontend_type>select</frontend_type>
562
+ <source_model>adminhtml/system_config_source_yesno</source_model>
563
+ <sort_order>20</sort_order>
564
+ <show_in_default>1</show_in_default>
565
+ <show_in_website>1</show_in_website>
566
+ <show_in_store>1</show_in_store>
567
+ </active>
568
+ <channel translate="label">
569
+ <label>Channel ID</label>
570
+ <frontend_type>text</frontend_type>
571
+ <sort_order>40</sort_order>
572
+ <show_in_default>1</show_in_default>
573
+ <show_in_website>1</show_in_website>
574
+ <show_in_store>1</show_in_store>
575
+ </channel>
576
+ <invioce translate="label">
577
+ <label>Automatically invoiced</label>
578
+ <frontend_type>select</frontend_type>
579
+ <source_model>adminhtml/system_config_source_yesno</source_model>
580
+ <sort_order>70</sort_order>
581
+ <show_in_default>1</show_in_default>
582
+ <show_in_website>1</show_in_website>
583
+ <show_in_store>1</show_in_store>
584
+ </invioce>
585
+ <sort_order translate="label">
586
+ <label>Sort order</label>
587
+ <frontend_type>text</frontend_type>
588
+ <sort_order>110</sort_order>
589
+ <show_in_default>1</show_in_default>
590
+ <show_in_website>1</show_in_website>
591
+ <show_in_store>1</show_in_store>
592
+ </sort_order>
593
+ <min_amount translate="label">
594
+ <label>Minimum Amount (CENT)</label>
595
+ <frontend_type>text</frontend_type>
596
+ <sort_order>120</sort_order>
597
+ <show_in_default>1</show_in_default>
598
+ <show_in_website>1</show_in_website>
599
+ <show_in_store>1</show_in_store>
600
+ </min_amount>
601
+ <max_amount translate="label">
602
+ <label>Maximum Amount (CENT)</label>
603
+ <frontend_type>text</frontend_type>
604
+ <sort_order>130</sort_order>
605
+ <show_in_default>1</show_in_default>
606
+ <show_in_website>1</show_in_website>
607
+ <show_in_store>1</show_in_store>
608
+ </max_amount>
609
+ <allowspecific translate="label">
610
+ <label>allow specific countries</label>
611
+ <frontend_type>allowspecific</frontend_type>
612
+ <sort_order>140</sort_order>
613
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
614
+ <show_in_default>1</show_in_default>
615
+ <show_in_website>1</show_in_website>
616
+ <show_in_store>1</show_in_store>
617
+ </allowspecific>
618
+ <specificcountry translate="label">
619
+ <label>specific countries</label>
620
+ <frontend_type>multiselect</frontend_type>
621
+ <sort_order>150</sort_order>
622
+ <source_model>adminhtml/system_config_source_country</source_model>
623
+ <show_in_default>1</show_in_default>
624
+ <show_in_website>1</show_in_website>
625
+ <show_in_store>1</show_in_store>
626
+ </specificcountry>
627
+ </fields>
628
+ </hcdsu>
629
+ <hcdgp translate="label">
630
+ <label>Heidelpay Giropay (hcd)</label>
631
+ <frontend_type>text</frontend_type>
632
+ <sort_order>90</sort_order>
633
+ <show_in_default>1</show_in_default>
634
+ <show_in_website>1</show_in_website>
635
+ <show_in_store>1</show_in_store>
636
+ <fields>
637
+ <title translate="label">
638
+ <label>Title</label>
639
+ <frontend_type>text</frontend_type>
640
+ <sort_order>10</sort_order>
641
+ <show_in_default>1</show_in_default>
642
+ <show_in_website>1</show_in_website>
643
+ <show_in_store>1</show_in_store>
644
+ </title>
645
+ <active translate="label">
646
+ <label>Enabled</label>
647
+ <frontend_type>select</frontend_type>
648
+ <source_model>adminhtml/system_config_source_yesno</source_model>
649
+ <sort_order>20</sort_order>
650
+ <show_in_default>1</show_in_default>
651
+ <show_in_website>1</show_in_website>
652
+ <show_in_store>1</show_in_store>
653
+ </active>
654
+ <channel translate="label">
655
+ <label>Channel ID</label>
656
+ <frontend_type>text</frontend_type>
657
+ <sort_order>40</sort_order>
658
+ <show_in_default>1</show_in_default>
659
+ <show_in_website>1</show_in_website>
660
+ <show_in_store>1</show_in_store>
661
+ </channel>
662
+ <recognition translate="label">
663
+ <label>Recognition</label>
664
+ <frontend_type>select</frontend_type>
665
+ <source_model>hcd/system_config_source_recognition</source_model>
666
+ <sort_order>60</sort_order>
667
+ <show_in_default>1</show_in_default>
668
+ <show_in_website>1</show_in_website>
669
+ <show_in_store>1</show_in_store>
670
+ </recognition>
671
+ <invioce translate="label">
672
+ <label>Automatically invoiced</label>
673
+ <frontend_type>select</frontend_type>
674
+ <source_model>adminhtml/system_config_source_yesno</source_model>
675
+ <sort_order>70</sort_order>
676
+ <show_in_default>1</show_in_default>
677
+ <show_in_website>1</show_in_website>
678
+ <show_in_store>1</show_in_store>
679
+ </invioce>
680
+ <sort_order translate="label">
681
+ <label>Sort order</label>
682
+ <frontend_type>text</frontend_type>
683
+ <sort_order>110</sort_order>
684
+ <show_in_default>1</show_in_default>
685
+ <show_in_website>1</show_in_website>
686
+ <show_in_store>1</show_in_store>
687
+ </sort_order>
688
+ <min_amount translate="label">
689
+ <label>Minimum Amount (CENT)</label>
690
+ <frontend_type>text</frontend_type>
691
+ <sort_order>120</sort_order>
692
+ <show_in_default>1</show_in_default>
693
+ <show_in_website>1</show_in_website>
694
+ <show_in_store>1</show_in_store>
695
+ </min_amount>
696
+ <max_amount translate="label">
697
+ <label>Maximum Amount (CENT)</label>
698
+ <frontend_type>text</frontend_type>
699
+ <sort_order>130</sort_order>
700
+ <show_in_default>1</show_in_default>
701
+ <show_in_website>1</show_in_website>
702
+ <show_in_store>1</show_in_store>
703
+ </max_amount>
704
+ <allowspecific translate="label">
705
+ <label>allow specific countries</label>
706
+ <frontend_type>allowspecific</frontend_type>
707
+ <sort_order>140</sort_order>
708
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
709
+ <show_in_default>1</show_in_default>
710
+ <show_in_website>1</show_in_website>
711
+ <show_in_store>1</show_in_store>
712
+ </allowspecific>
713
+ <specificcountry translate="label">
714
+ <label>specific countries</label>
715
+ <frontend_type>multiselect</frontend_type>
716
+ <sort_order>150</sort_order>
717
+ <source_model>adminhtml/system_config_source_country</source_model>
718
+ <show_in_default>1</show_in_default>
719
+ <show_in_website>1</show_in_website>
720
+ <show_in_store>1</show_in_store>
721
+ </specificcountry>
722
+ </fields>
723
+ </hcdgp>
724
+ <hcdbs translate="label">
725
  <label>Heidelpay Billsafe (hcd)</label>
726
  <frontend_type>text</frontend_type>
727
  <sort_order>100</sort_order>
797
  <show_in_store>1</show_in_store>
798
  </specificcountry>
799
  </fields>
800
+ </hcdbs>
801
+ <hcdpal translate="label">
802
+ <label>Heidelpay Pay Pal (hcd)</label>
803
+ <frontend_type>text</frontend_type>
804
+ <sort_order>70</sort_order>
805
+ <show_in_default>1</show_in_default>
806
+ <show_in_website>1</show_in_website>
807
+ <show_in_store>1</show_in_store>
808
+ <fields>
809
+ <title translate="label">
810
+ <label>Title</label>
811
+ <frontend_type>text</frontend_type>
812
+ <sort_order>10</sort_order>
813
+ <show_in_default>1</show_in_default>
814
+ <show_in_website>1</show_in_website>
815
+ <show_in_store>1</show_in_store>
816
+ </title>
817
+ <active translate="label">
818
+ <label>Enabled</label>
819
+ <frontend_type>select</frontend_type>
820
+ <source_model>adminhtml/system_config_source_yesno</source_model>
821
+ <sort_order>20</sort_order>
822
+ <show_in_default>1</show_in_default>
823
+ <show_in_website>1</show_in_website>
824
+ <show_in_store>1</show_in_store>
825
+ </active>
826
+ <channel translate="label">
827
+ <label>Channel ID</label>
828
+ <frontend_type>text</frontend_type>
829
+ <sort_order>40</sort_order>
830
+ <show_in_default>1</show_in_default>
831
+ <show_in_website>1</show_in_website>
832
+ <show_in_store>1</show_in_store>
833
+ </channel>
834
+ <bookingmode translate="label">
835
+ <label>Bookingmode</label>
836
+ <frontend_type>select</frontend_type>
837
+ <source_model>hcd/system_config_source_bookingmode</source_model>
838
+ <sort_order>50</sort_order>
839
+ <show_in_default>1</show_in_default>
840
+ <show_in_website>1</show_in_website>
841
+ <show_in_store>1</show_in_store>
842
+ </bookingmode>
843
+ <invioce translate="label">
844
+ <label>Automatically invoiced</label>
845
+ <frontend_type>select</frontend_type>
846
+ <source_model>adminhtml/system_config_source_yesno</source_model>
847
+ <sort_order>70</sort_order>
848
+ <show_in_default>1</show_in_default>
849
+ <show_in_website>1</show_in_website>
850
+ <show_in_store>1</show_in_store>
851
+ </invioce>
852
+ <!--<capture_on_delivery translate="label">
853
+ <label>Automatically capture on delivery</label>
854
+ <frontend_type>select</frontend_type>
855
+ <source_model>adminhtml/system_config_source_yesno</source_model>
856
+ <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
857
+ <sort_order>80</sort_order>
858
+ <show_in_default>1</show_in_default>
859
+ <show_in_website>1</show_in_website>
860
+ <show_in_store>1</show_in_store>
861
+ </capture_on_delivery>-->
862
+ <sort_order translate="label">
863
+ <label>Sort order</label>
864
+ <frontend_type>text</frontend_type>
865
+ <sort_order>110</sort_order>
866
+ <show_in_default>1</show_in_default>
867
+ <show_in_website>1</show_in_website>
868
+ <show_in_store>1</show_in_store>
869
+ </sort_order>
870
+ <min_amount translate="label">
871
+ <label>Minimum Amount (CENT)</label>
872
+ <frontend_type>text</frontend_type>
873
+ <sort_order>120</sort_order>
874
+ <show_in_default>1</show_in_default>
875
+ <show_in_website>1</show_in_website>
876
+ <show_in_store>1</show_in_store>
877
+ </min_amount>
878
+ <max_amount translate="label">
879
+ <label>Maximum Amount (CENT)</label>
880
+ <frontend_type>text</frontend_type>
881
+ <sort_order>130</sort_order>
882
+ <show_in_default>1</show_in_default>
883
+ <show_in_website>1</show_in_website>
884
+ <show_in_store>1</show_in_store>
885
+ </max_amount>
886
+ <allowspecific translate="label">
887
+ <label>allow specific countries</label>
888
+ <frontend_type>allowspecific</frontend_type>
889
+ <sort_order>140</sort_order>
890
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
891
+ <show_in_default>1</show_in_default>
892
+ <show_in_website>1</show_in_website>
893
+ <show_in_store>1</show_in_store>
894
+ </allowspecific>
895
+ <specificcountry translate="label">
896
+ <label>specific countries</label>
897
+ <frontend_type>multiselect</frontend_type>
898
+ <sort_order>150</sort_order>
899
+ <source_model>adminhtml/system_config_source_country</source_model>
900
+ <show_in_default>1</show_in_default>
901
+ <show_in_website>1</show_in_website>
902
+ <show_in_store>1</show_in_store>
903
+ </specificcountry>
904
+ </fields>
905
+ </hcdpal>
906
+ <hcdeps translate="label">
907
+ <label>Heidelpay EPS (hcd)</label>
908
+ <frontend_type>text</frontend_type>
909
+ <sort_order>150</sort_order>
910
+ <show_in_default>1</show_in_default>
911
+ <show_in_website>1</show_in_website>
912
+ <show_in_store>1</show_in_store>
913
+ <fields>
914
+ <title translate="label">
915
+ <label>Title</label>
916
+ <frontend_type>text</frontend_type>
917
+ <sort_order>10</sort_order>
918
+ <show_in_default>1</show_in_default>
919
+ <show_in_website>1</show_in_website>
920
+ <show_in_store>1</show_in_store>
921
+ </title>
922
+ <active translate="label">
923
+ <label>Enabled</label>
924
+ <frontend_type>select</frontend_type>
925
+ <source_model>adminhtml/system_config_source_yesno</source_model>
926
+ <sort_order>20</sort_order>
927
+ <show_in_default>1</show_in_default>
928
+ <show_in_website>1</show_in_website>
929
+ <show_in_store>1</show_in_store>
930
+ </active>
931
+ <channel translate="label">
932
+ <label>Channel ID</label>
933
+ <frontend_type>text</frontend_type>
934
+ <sort_order>40</sort_order>
935
+ <show_in_default>1</show_in_default>
936
+ <show_in_website>1</show_in_website>
937
+ <show_in_store>1</show_in_store>
938
+ </channel>
939
+ <invioce translate="label">
940
+ <label>Automatically invoiced</label>
941
+ <frontend_type>select</frontend_type>
942
+ <source_model>adminhtml/system_config_source_yesno</source_model>
943
+ <sort_order>70</sort_order>
944
+ <show_in_default>1</show_in_default>
945
+ <show_in_website>1</show_in_website>
946
+ <show_in_store>1</show_in_store>
947
+ </invioce>
948
+ <sort_order translate="label">
949
+ <label>Sort order</label>
950
+ <frontend_type>text</frontend_type>
951
+ <sort_order>110</sort_order>
952
+ <show_in_default>1</show_in_default>
953
+ <show_in_website>1</show_in_website>
954
+ <show_in_store>1</show_in_store>
955
+ </sort_order>
956
+ <min_amount translate="label">
957
+ <label>Minimum Amount (CENT)</label>
958
+ <frontend_type>text</frontend_type>
959
+ <sort_order>120</sort_order>
960
+ <show_in_default>1</show_in_default>
961
+ <show_in_website>1</show_in_website>
962
+ <show_in_store>1</show_in_store>
963
+ </min_amount>
964
+ <max_amount translate="label">
965
+ <label>Maximum Amount (CENT)</label>
966
+ <frontend_type>text</frontend_type>
967
+ <sort_order>130</sort_order>
968
+ <show_in_default>1</show_in_default>
969
+ <show_in_website>1</show_in_website>
970
+ <show_in_store>1</show_in_store>
971
+ </max_amount>
972
+ <allowspecific translate="label">
973
+ <label>allow specific countries</label>
974
+ <frontend_type>allowspecific</frontend_type>
975
+ <sort_order>140</sort_order>
976
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
977
+ <show_in_default>1</show_in_default>
978
+ <show_in_website>1</show_in_website>
979
+ <show_in_store>1</show_in_store>
980
+ </allowspecific>
981
+ <specificcountry translate="label">
982
+ <label>specific countries</label>
983
+ <frontend_type>multiselect</frontend_type>
984
+ <sort_order>150</sort_order>
985
+ <source_model>adminhtml/system_config_source_country</source_model>
986
+ <show_in_default>1</show_in_default>
987
+ <show_in_website>1</show_in_website>
988
+ <show_in_store>1</show_in_store>
989
+ </specificcountry>
990
+ </fields>
991
+ </hcdeps>
992
+ <hcdide translate="label">
993
+ <label>Heidelpay iDeal (hcd)</label>
994
+ <frontend_type>text</frontend_type>
995
+ <sort_order>160</sort_order>
996
+ <show_in_default>1</show_in_default>
997
+ <show_in_website>1</show_in_website>
998
+ <show_in_store>1</show_in_store>
999
+ <fields>
1000
+ <title translate="label">
1001
+ <label>Title</label>
1002
+ <frontend_type>text</frontend_type>
1003
+ <sort_order>10</sort_order>
1004
+ <show_in_default>1</show_in_default>
1005
+ <show_in_website>1</show_in_website>
1006
+ <show_in_store>1</show_in_store>
1007
+ </title>
1008
+ <active translate="label">
1009
+ <label>Enabled</label>
1010
+ <frontend_type>select</frontend_type>
1011
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1012
+ <sort_order>20</sort_order>
1013
+ <show_in_default>1</show_in_default>
1014
+ <show_in_website>1</show_in_website>
1015
+ <show_in_store>1</show_in_store>
1016
+ </active>
1017
+ <channel translate="label">
1018
+ <label>Channel ID</label>
1019
+ <frontend_type>text</frontend_type>
1020
+ <sort_order>40</sort_order>
1021
+ <show_in_default>1</show_in_default>
1022
+ <show_in_website>1</show_in_website>
1023
+ <show_in_store>1</show_in_store>
1024
+ </channel>
1025
+ <invioce translate="label">
1026
+ <label>Automatically invoiced</label>
1027
+ <frontend_type>select</frontend_type>
1028
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1029
+ <sort_order>70</sort_order>
1030
+ <show_in_default>1</show_in_default>
1031
+ <show_in_website>1</show_in_website>
1032
+ <show_in_store>1</show_in_store>
1033
+ </invioce>
1034
+ <sort_order translate="label">
1035
+ <label>Sort order</label>
1036
+ <frontend_type>text</frontend_type>
1037
+ <sort_order>110</sort_order>
1038
+ <show_in_default>1</show_in_default>
1039
+ <show_in_website>1</show_in_website>
1040
+ <show_in_store>1</show_in_store>
1041
+ </sort_order>
1042
+ <min_amount translate="label">
1043
+ <label>Minimum Amount (CENT)</label>
1044
+ <frontend_type>text</frontend_type>
1045
+ <sort_order>120</sort_order>
1046
+ <show_in_default>1</show_in_default>
1047
+ <show_in_website>1</show_in_website>
1048
+ <show_in_store>1</show_in_store>
1049
+ </min_amount>
1050
+ <max_amount translate="label">
1051
+ <label>Maximum Amount (CENT)</label>
1052
+ <frontend_type>text</frontend_type>
1053
+ <sort_order>130</sort_order>
1054
+ <show_in_default>1</show_in_default>
1055
+ <show_in_website>1</show_in_website>
1056
+ <show_in_store>1</show_in_store>
1057
+ </max_amount>
1058
+ <allowspecific translate="label">
1059
+ <label>allow specific countries</label>
1060
+ <frontend_type>allowspecific</frontend_type>
1061
+ <sort_order>140</sort_order>
1062
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1063
+ <show_in_default>1</show_in_default>
1064
+ <show_in_website>1</show_in_website>
1065
+ <show_in_store>1</show_in_store>
1066
+ </allowspecific>
1067
+ <specificcountry translate="label">
1068
+ <label>specific countries</label>
1069
+ <frontend_type>multiselect</frontend_type>
1070
+ <sort_order>150</sort_order>
1071
+ <source_model>adminhtml/system_config_source_country</source_model>
1072
+ <show_in_default>1</show_in_default>
1073
+ <show_in_website>1</show_in_website>
1074
+ <show_in_store>1</show_in_store>
1075
+ </specificcountry>
1076
+ </fields>
1077
+ </hcdide>
1078
+ <hcdpp translate="label">
1079
+ <label>Heidelpay Prepayment (hcd)</label>
1080
+ <frontend_type>text</frontend_type>
1081
+ <sort_order>100</sort_order>
1082
+ <show_in_default>1</show_in_default>
1083
+ <show_in_website>1</show_in_website>
1084
+ <show_in_store>1</show_in_store>
1085
+ <fields>
1086
+ <title translate="label">
1087
+ <label>Title</label>
1088
+ <frontend_type>text</frontend_type>
1089
+ <sort_order>10</sort_order>
1090
+ <show_in_default>1</show_in_default>
1091
+ <show_in_website>1</show_in_website>
1092
+ <show_in_store>1</show_in_store>
1093
+ </title>
1094
+ <active translate="label">
1095
+ <label>Enabled</label>
1096
+ <frontend_type>select</frontend_type>
1097
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1098
+ <sort_order>20</sort_order>
1099
+ <show_in_default>1</show_in_default>
1100
+ <show_in_website>1</show_in_website>
1101
+ <show_in_store>1</show_in_store>
1102
+ </active>
1103
+ <channel translate="label">
1104
+ <label>Channel ID</label>
1105
+ <frontend_type>text</frontend_type>
1106
+ <sort_order>40</sort_order>
1107
+ <show_in_default>1</show_in_default>
1108
+ <show_in_website>1</show_in_website>
1109
+ <show_in_store>1</show_in_store>
1110
+ </channel>
1111
+ <invioce translate="label">
1112
+ <label>Automatically invoiced</label>
1113
+ <frontend_type>select</frontend_type>
1114
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1115
+ <sort_order>70</sort_order>
1116
+ <show_in_default>1</show_in_default>
1117
+ <show_in_website>1</show_in_website>
1118
+ <show_in_store>1</show_in_store>
1119
+ </invioce>
1120
+ <sort_order translate="label">
1121
+ <label>Sort order</label>
1122
+ <frontend_type>text</frontend_type>
1123
+ <sort_order>110</sort_order>
1124
+ <show_in_default>1</show_in_default>
1125
+ <show_in_website>1</show_in_website>
1126
+ <show_in_store>1</show_in_store>
1127
+ </sort_order>
1128
+ <min_amount translate="label">
1129
+ <label>Minimum Amount (CENT)</label>
1130
+ <frontend_type>text</frontend_type>
1131
+ <sort_order>120</sort_order>
1132
+ <show_in_default>1</show_in_default>
1133
+ <show_in_website>1</show_in_website>
1134
+ <show_in_store>1</show_in_store>
1135
+ </min_amount>
1136
+ <max_amount translate="label">
1137
+ <label>Maximum Amount (CENT)</label>
1138
+ <frontend_type>text</frontend_type>
1139
+ <sort_order>130</sort_order>
1140
+ <show_in_default>1</show_in_default>
1141
+ <show_in_website>1</show_in_website>
1142
+ <show_in_store>1</show_in_store>
1143
+ </max_amount>
1144
+ <allowspecific translate="label">
1145
+ <label>allow specific countries</label>
1146
+ <frontend_type>allowspecific</frontend_type>
1147
+ <sort_order>140</sort_order>
1148
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1149
+ <show_in_default>1</show_in_default>
1150
+ <show_in_website>1</show_in_website>
1151
+ <show_in_store>1</show_in_store>
1152
+ </allowspecific>
1153
+ <specificcountry translate="label">
1154
+ <label>specific countries</label>
1155
+ <frontend_type>multiselect</frontend_type>
1156
+ <sort_order>150</sort_order>
1157
+ <source_model>adminhtml/system_config_source_country</source_model>
1158
+ <show_in_default>1</show_in_default>
1159
+ <show_in_website>1</show_in_website>
1160
+ <show_in_store>1</show_in_store>
1161
+ </specificcountry>
1162
+ </fields>
1163
+ </hcdpp>
1164
+ <hcdiv translate="label">
1165
+ <label>Heidelpay Invoice (hcd)</label>
1166
+ <frontend_type>text</frontend_type>
1167
+ <sort_order>110</sort_order>
1168
+ <show_in_default>1</show_in_default>
1169
+ <show_in_website>1</show_in_website>
1170
+ <show_in_store>1</show_in_store>
1171
+ <fields>
1172
+ <title translate="label">
1173
+ <label>Title</label>
1174
+ <frontend_type>text</frontend_type>
1175
+ <sort_order>10</sort_order>
1176
+ <show_in_default>1</show_in_default>
1177
+ <show_in_website>1</show_in_website>
1178
+ <show_in_store>1</show_in_store>
1179
+ </title>
1180
+ <active translate="label">
1181
+ <label>Enabled</label>
1182
+ <frontend_type>select</frontend_type>
1183
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1184
+ <sort_order>20</sort_order>
1185
+ <show_in_default>1</show_in_default>
1186
+ <show_in_website>1</show_in_website>
1187
+ <show_in_store>1</show_in_store>
1188
+ </active>
1189
+ <channel translate="label">
1190
+ <label>Channel ID</label>
1191
+ <frontend_type>text</frontend_type>
1192
+ <sort_order>40</sort_order>
1193
+ <show_in_default>1</show_in_default>
1194
+ <show_in_website>1</show_in_website>
1195
+ <show_in_store>1</show_in_store>
1196
+ </channel>
1197
+ <invioce translate="label">
1198
+ <label>Automatically invoiced</label>
1199
+ <frontend_type>select</frontend_type>
1200
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1201
+ <sort_order>70</sort_order>
1202
+ <show_in_default>1</show_in_default>
1203
+ <show_in_website>1</show_in_website>
1204
+ <show_in_store>1</show_in_store>
1205
+ </invioce>
1206
+ <sort_order translate="label">
1207
+ <label>Sort order</label>
1208
+ <frontend_type>text</frontend_type>
1209
+ <sort_order>110</sort_order>
1210
+ <show_in_default>1</show_in_default>
1211
+ <show_in_website>1</show_in_website>
1212
+ <show_in_store>1</show_in_store>
1213
+ </sort_order>
1214
+ <min_amount translate="label">
1215
+ <label>Minimum Amount (CENT)</label>
1216
+ <frontend_type>text</frontend_type>
1217
+ <sort_order>120</sort_order>
1218
+ <show_in_default>1</show_in_default>
1219
+ <show_in_website>1</show_in_website>
1220
+ <show_in_store>1</show_in_store>
1221
+ </min_amount>
1222
+ <max_amount translate="label">
1223
+ <label>Maximum Amount (CENT)</label>
1224
+ <frontend_type>text</frontend_type>
1225
+ <sort_order>130</sort_order>
1226
+ <show_in_default>1</show_in_default>
1227
+ <show_in_website>1</show_in_website>
1228
+ <show_in_store>1</show_in_store>
1229
+ </max_amount>
1230
+ <allowspecific translate="label">
1231
+ <label>allow specific countries</label>
1232
+ <frontend_type>allowspecific</frontend_type>
1233
+ <sort_order>140</sort_order>
1234
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1235
+ <show_in_default>1</show_in_default>
1236
+ <show_in_website>1</show_in_website>
1237
+ <show_in_store>1</show_in_store>
1238
+ </allowspecific>
1239
+ <specificcountry translate="label">
1240
+ <label>specific countries</label>
1241
+ <frontend_type>multiselect</frontend_type>
1242
+ <sort_order>150</sort_order>
1243
+ <source_model>adminhtml/system_config_source_country</source_model>
1244
+ <show_in_default>1</show_in_default>
1245
+ <show_in_website>1</show_in_website>
1246
+ <show_in_store>1</show_in_store>
1247
+ </specificcountry>
1248
+ </fields>
1249
+ </hcdiv>
1250
+ <hcdivsec translate="label">
1251
+ <label>Heidelpay invoice secured(hcd)</label>
1252
+ <frontend_type>text</frontend_type>
1253
+ <sort_order>115</sort_order>
1254
+ <show_in_default>1</show_in_default>
1255
+ <show_in_website>1</show_in_website>
1256
+ <show_in_store>1</show_in_store>
1257
+ <fields>
1258
+ <title translate="label">
1259
+ <label>Title</label>
1260
+ <frontend_type>text</frontend_type>
1261
+ <sort_order>10</sort_order>
1262
+ <show_in_default>1</show_in_default>
1263
+ <show_in_website>1</show_in_website>
1264
+ <show_in_store>1</show_in_store>
1265
+ </title>
1266
+ <active translate="label">
1267
+ <label>Enabled</label>
1268
+ <frontend_type>select</frontend_type>
1269
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1270
+ <sort_order>20</sort_order>
1271
+ <show_in_default>1</show_in_default>
1272
+ <show_in_website>1</show_in_website>
1273
+ <show_in_store>1</show_in_store>
1274
+ </active>
1275
+ <channel translate="label">
1276
+ <label>Channel ID</label>
1277
+ <frontend_type>text</frontend_type>
1278
+ <sort_order>40</sort_order>
1279
+ <show_in_default>1</show_in_default>
1280
+ <show_in_website>1</show_in_website>
1281
+ <show_in_store>1</show_in_store>
1282
+ </channel>
1283
+ <recognition translate="label">
1284
+ <label>Recognition</label>
1285
+ <frontend_type>select</frontend_type>
1286
+ <source_model>hcd/system_config_source_recognition</source_model>
1287
+ <sort_order>60</sort_order>
1288
+ <show_in_default>1</show_in_default>
1289
+ <show_in_website>1</show_in_website>
1290
+ <show_in_store>1</show_in_store>
1291
+ </recognition>
1292
+ <invioce translate="label">
1293
+ <label>Automatically invoiced</label>
1294
+ <frontend_type>select</frontend_type>
1295
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1296
+ <sort_order>70</sort_order>
1297
+ <show_in_default>1</show_in_default>
1298
+ <show_in_website>1</show_in_website>
1299
+ <show_in_store>1</show_in_store>
1300
+ </invioce>
1301
+ <sort_order translate="label">
1302
+ <label>Sort order</label>
1303
+ <frontend_type>text</frontend_type>
1304
+ <sort_order>110</sort_order>
1305
+ <show_in_default>1</show_in_default>
1306
+ <show_in_website>1</show_in_website>
1307
+ <show_in_store>1</show_in_store>
1308
+ </sort_order>
1309
+ <min_amount translate="label">
1310
+ <label>Minimum Amount (CENT)</label>
1311
+ <frontend_type>text</frontend_type>
1312
+ <sort_order>120</sort_order>
1313
+ <show_in_default>1</show_in_default>
1314
+ <show_in_website>1</show_in_website>
1315
+ <show_in_store>1</show_in_store>
1316
+ </min_amount>
1317
+ <max_amount translate="label">
1318
+ <label>Maximum Amount (CENT)</label>
1319
+ <frontend_type>text</frontend_type>
1320
+ <sort_order>130</sort_order>
1321
+ <show_in_default>1</show_in_default>
1322
+ <show_in_website>1</show_in_website>
1323
+ <show_in_store>1</show_in_store>
1324
+ </max_amount>
1325
+ <allowspecific translate="label">
1326
+ <label>allow specific countries</label>
1327
+ <frontend_type>allowspecific</frontend_type>
1328
+ <sort_order>140</sort_order>
1329
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1330
+ <show_in_default>1</show_in_default>
1331
+ <show_in_website>1</show_in_website>
1332
+ <show_in_store>1</show_in_store>
1333
+ </allowspecific>
1334
+ <specificcountry translate="label">
1335
+ <label>specific countries</label>
1336
+ <frontend_type>multiselect</frontend_type>
1337
+ <sort_order>150</sort_order>
1338
+ <source_model>adminhtml/system_config_source_country</source_model>
1339
+ <show_in_default>1</show_in_default>
1340
+ <show_in_website>1</show_in_website>
1341
+ <show_in_store>1</show_in_store>
1342
+ </specificcountry>
1343
+ </fields>
1344
+ </hcdivsec>
1345
+ <hcdpf translate="label">
1346
+ <label>Heidelpay Postfinance (hcd)</label>
1347
+ <frontend_type>text</frontend_type>
1348
+ <sort_order>140</sort_order>
1349
+ <show_in_default>1</show_in_default>
1350
+ <show_in_website>1</show_in_website>
1351
+ <show_in_store>1</show_in_store>
1352
+ <fields>
1353
+ <title translate="label">
1354
+ <label>Title</label>
1355
+ <frontend_type>text</frontend_type>
1356
+ <sort_order>10</sort_order>
1357
+ <show_in_default>1</show_in_default>
1358
+ <show_in_website>1</show_in_website>
1359
+ <show_in_store>1</show_in_store>
1360
+ </title>
1361
+ <active translate="label">
1362
+ <label>Enabled</label>
1363
+ <frontend_type>select</frontend_type>
1364
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1365
+ <sort_order>20</sort_order>
1366
+ <show_in_default>1</show_in_default>
1367
+ <show_in_website>1</show_in_website>
1368
+ <show_in_store>1</show_in_store>
1369
+ </active>
1370
+ <channel translate="label">
1371
+ <label>Channel ID</label>
1372
+ <frontend_type>text</frontend_type>
1373
+ <sort_order>40</sort_order>
1374
+ <show_in_default>1</show_in_default>
1375
+ <show_in_website>1</show_in_website>
1376
+ <show_in_store>1</show_in_store>
1377
+ </channel>
1378
+ <invioce translate="label">
1379
+ <label>Automatically invoiced</label>
1380
+ <frontend_type>select</frontend_type>
1381
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1382
+ <sort_order>70</sort_order>
1383
+ <show_in_default>1</show_in_default>
1384
+ <show_in_website>1</show_in_website>
1385
+ <show_in_store>1</show_in_store>
1386
+ </invioce>
1387
+ <sort_order translate="label">
1388
+ <label>Sort order</label>
1389
+ <frontend_type>text</frontend_type>
1390
+ <sort_order>110</sort_order>
1391
+ <show_in_default>1</show_in_default>
1392
+ <show_in_website>1</show_in_website>
1393
+ <show_in_store>1</show_in_store>
1394
+ </sort_order>
1395
+ <min_amount translate="label">
1396
+ <label>Minimum Amount (CENT)</label>
1397
+ <frontend_type>text</frontend_type>
1398
+ <sort_order>120</sort_order>
1399
+ <show_in_default>1</show_in_default>
1400
+ <show_in_website>1</show_in_website>
1401
+ <show_in_store>1</show_in_store>
1402
+ </min_amount>
1403
+ <max_amount translate="label">
1404
+ <label>Maximum Amount (CENT)</label>
1405
+ <frontend_type>text</frontend_type>
1406
+ <sort_order>130</sort_order>
1407
+ <show_in_default>1</show_in_default>
1408
+ <show_in_website>1</show_in_website>
1409
+ <show_in_store>1</show_in_store>
1410
+ </max_amount>
1411
+ <allowspecific translate="label">
1412
+ <label>allow specific countries</label>
1413
+ <frontend_type>allowspecific</frontend_type>
1414
+ <sort_order>140</sort_order>
1415
+ <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
1416
+ <show_in_default>1</show_in_default>
1417
+ <show_in_website>1</show_in_website>
1418
+ <show_in_store>1</show_in_store>
1419
+ </allowspecific>
1420
+ <specificcountry translate="label">
1421
+ <label>specific countries</label>
1422
+ <frontend_type>multiselect</frontend_type>
1423
+ <sort_order>150</sort_order>
1424
+ <source_model>adminhtml/system_config_source_country</source_model>
1425
+ <show_in_default>1</show_in_default>
1426
+ <show_in_website>1</show_in_website>
1427
+ <show_in_store>1</show_in_store>
1428
+ </specificcountry>
1429
+ </fields>
1430
+ </hcdpf>
1431
+ <hcdmpa translate="label">
1432
+ <label>Heidelpay MasterPass (hcd)</label>
1433
  <frontend_type>text</frontend_type>
1434
+ <sort_order>140</sort_order>
1435
  <show_in_default>1</show_in_default>
1436
  <show_in_website>1</show_in_website>
1437
  <show_in_store>1</show_in_store>
1461
  <show_in_website>1</show_in_website>
1462
  <show_in_store>1</show_in_store>
1463
  </channel>
1464
+ <bookingmode translate="label">
1465
+ <label>Bookingmode</label>
1466
+ <frontend_type>select</frontend_type>
1467
+ <source_model>hcd/system_config_source_bookingmode</source_model>
1468
+ <sort_order>50</sort_order>
1469
+ <show_in_default>1</show_in_default>
1470
+ <show_in_website>1</show_in_website>
1471
+ <show_in_store>1</show_in_store>
1472
+ </bookingmode>
1473
+ <invioce translate="label">
1474
+ <label>Automatically invoiced</label>
1475
+ <frontend_type>select</frontend_type>
1476
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1477
+ <sort_order>70</sort_order>
1478
+ <show_in_default>1</show_in_default>
1479
+ <show_in_website>1</show_in_website>
1480
+ <show_in_store>1</show_in_store>
1481
+ </invioce>
1482
+ <!--<capture_on_delivery translate="label">
1483
+ <label>Automatically capture on delivery</label>
1484
+ <frontend_type>select</frontend_type>
1485
+ <source_model>adminhtml/system_config_source_yesno</source_model>
1486
+ <comment>please note that capture on delivery is only possible, when you set bookingmode to preauthorisation</comment>
1487
+ <sort_order>80</sort_order>
1488
+ <show_in_default>1</show_in_default>
1489
+ <show_in_website>1</show_in_website>
1490
+ <show_in_store>1</show_in_store>
1491
+ </capture_on_delivery>-->
1492
+ <sort_order translate="label">
1493
  <label>Sort order</label>
1494
  <frontend_type>text</frontend_type>
1495
  <sort_order>110</sort_order>
1532
  <show_in_store>1</show_in_store>
1533
  </specificcountry>
1534
  </fields>
1535
+ </hcdmpa>
1536
+ </groups>
1537
+ </payment>
1538
+ </sections>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1539
  </config>
app/code/community/HeidelpayCD/Edition/sql/hcd_setup/install-15.1.30.php CHANGED
@@ -1,170 +1,188 @@
1
- <?php
2
- /**
3
- * @category Heidelpay
4
- * @package Heidelpay CD-Editon
5
- * @author Jens Richter
6
- * @copyright Copyright (c) 2014 Heidelberger Payment GmbH
7
- */
8
-
9
- $installer = $this;
10
- $installer->startSetup();
11
-
12
-
13
-
14
-
15
-
16
- /**
17
- * create transactions table
18
- */
19
- $tablerealname = 'hcd/transaction';
20
- $tablename = $installer->getTable($tablerealname);
21
- if ($installer->getConnection()->isTableExists($tablename) != true) {
22
-
23
- $table = $installer->getConnection()
24
- ->newTable($tablename)
25
- ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL,
26
- array(
27
- 'unsigned' => true,
28
- 'nullable' => false,
29
- 'primary' => true,
30
- 'identity' => true,
31
- 'auto_increment' => true
32
- )
33
- )
34
- ->addColumn('payment_methode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 2,
35
- array(
36
- 'nullable' => false)
37
- )
38
- ->addColumn('payment_type', Varien_Db_Ddl_Table::TYPE_VARCHAR, 2,
39
- array(
40
- 'nullable' => false
41
- )
42
- )
43
- ->addColumn('transactionid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50,
44
- array(
45
- 'nullable' => false,
46
- 'COMMENT' => "normaly the order or basketId"
47
- )
48
- )
49
- ->addColumn('uniqeid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 32,
50
- array(
51
- 'nullable' => false,
52
- 'COMMENT' => "heidelpay uniqe identification number"
53
- )
54
- )
55
- ->addColumn('shortid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 14,
56
- array(
57
- 'nullable' => false,
58
- 'COMMENT' => "heidelpay sort identification number"
59
- )
60
- )
61
- ->addColumn('result', Varien_Db_Ddl_Table::TYPE_VARCHAR, 3,
62
- array(
63
- 'nullable' => false,
64
- 'COMMENT' => "heidelpay processing result"
65
- )
66
- )
67
- ->addColumn('statuscode', Varien_Db_Ddl_Table::TYPE_SMALLINT, NULL,
68
- array(
69
- 'unsigned' => true,
70
- 'nullable' => false,
71
- 'COMMENT' => "heidelpay processing status code"
72
- )
73
- )
74
- ->addColumn('return', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100,
75
- array(
76
- 'nullable' => false,
77
- 'COMMENT' => "heidelpay processing return message"
78
- )
79
- )
80
- ->addColumn('returncode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 12,
81
- array(
82
- 'nullable' => false,
83
- 'COMMENT' => "heidelpay processing return code"
84
- )
85
- )
86
- ->addColumn('jsonresponse', Varien_Db_Ddl_Table::TYPE_BLOB, NULL,
87
- array(
88
- 'nullable' => false,
89
- 'COMMENT' => "heidelpay response as json"
90
- )
91
- )
92
- ->addColumn('datetime', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, NULL,
93
- array(
94
- 'nullable' => false,
95
- 'COMMENT' => "create date"
96
- )
97
- )
98
- ->addColumn('source', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100,
99
- array(
100
- 'nullable' => false,
101
- 'COMMENT' => "heidelpay processing return message"
102
- )
103
- )
104
- ->addIndex($installer->getIdxName($tablerealname, array('uniqeid')), array('uniqeid'))
105
- ->addIndex($installer->getIdxName($tablerealname, array('transactionid')), array('transactionid'))
106
- ->addIndex($installer->getIdxName($tablerealname, array('returncode')), array('returncode'))
107
- ->addIndex($installer->getIdxName($tablerealname, array('source')), array('source'))
108
- ;
109
- $installer->getConnection()->createTable($table);
110
- }
111
-
112
- /**
113
- * create customer data table
114
- */
115
- $tablerealname = 'hcd/customer';
116
- $tablename = $installer->getTable($tablerealname);
117
- if ($installer->getConnection()->isTableExists($tablename) != true) {
118
-
119
- $table = $installer->getConnection()
120
- ->newTable($tablename)
121
- ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL,
122
- array(
123
- 'unsigned' => true,
124
- 'nullable' => false,
125
- 'primary' => true,
126
- 'identity' => true,
127
- 'auto_increment' => true
128
- )
129
- )
130
- ->addColumn('paymentmethode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 10,
131
- array(
132
- 'nullable' => false)
133
- )
134
- ->addColumn('uniqeid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50,
135
- array(
136
- 'nullable' => false,
137
- 'COMMENT' => "Heidelpay transaction identifier"
138
- )
139
- )
140
- ->addColumn('customerid', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL,
141
- array(
142
- 'unsigned' => true,
143
- 'nullable' => false,
144
- 'COMMENT' => "magento customer id"
145
- )
146
- )
147
- ->addColumn('storeid', Varien_Db_Ddl_Table::TYPE_INTEGER, NULL,
148
- array(
149
- 'unsigned' => true,
150
- 'nullable' => false,
151
- 'COMMENT' => "magento store id"
152
- )
153
- )
154
- ->addColumn('payment_data', Varien_Db_Ddl_Table::TYPE_BLOB, NULL,
155
- array(
156
- 'nullable' => false,
157
- 'COMMENT' => "custumer payment data"
158
- )
159
- )
160
- ->addIndex($installer->getIdxName($tablerealname, array('uniqeid')), array('uniqeid'))
161
- ->addIndex($installer->getIdxName($tablerealname, array('customerid')), array('customerid'))
162
- ->addIndex($installer->getIdxName($tablerealname, array('storeid')), array('storeid'))
163
- ->addIndex($installer->getIdxName($tablerealname, array('paymentmethode')), array('paymentmethode'))
164
- ;
165
- $installer->getConnection()->createTable($table);
166
- }
167
-
168
-
169
-
170
- $installer->endSetup();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * install method
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $installer = $this;
17
+ $installer->startSetup();
18
+
19
+ /**
20
+ * create transactions table
21
+ */
22
+ $tablerealname = 'hcd/transaction';
23
+ $tablename = $installer->getTable($tablerealname);
24
+ if ($installer->getConnection()->isTableExists($tablename) != true) {
25
+ $table = $installer->getConnection()
26
+ ->newTable($tablename)
27
+ ->addColumn(
28
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
29
+ array(
30
+ 'unsigned' => true,
31
+ 'nullable' => false,
32
+ 'primary' => true,
33
+ 'identity' => true,
34
+ 'auto_increment' => true
35
+ )
36
+ )
37
+ ->addColumn(
38
+ 'payment_methode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 2,
39
+ array(
40
+ 'nullable' => false)
41
+ )
42
+ ->addColumn(
43
+ 'payment_type', Varien_Db_Ddl_Table::TYPE_VARCHAR, 2,
44
+ array(
45
+ 'nullable' => false
46
+ )
47
+ )
48
+ ->addColumn(
49
+ 'transactionid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50,
50
+ array(
51
+ 'nullable' => false,
52
+ 'COMMENT' => "normaly the order or basketId"
53
+ )
54
+ )
55
+ ->addColumn(
56
+ 'uniqeid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 32,
57
+ array(
58
+ 'nullable' => false,
59
+ 'COMMENT' => "heidelpay uniqe identification number"
60
+ )
61
+ )
62
+ ->addColumn(
63
+ 'shortid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 14,
64
+ array(
65
+ 'nullable' => false,
66
+ 'COMMENT' => "heidelpay sort identification number"
67
+ )
68
+ )
69
+ ->addColumn(
70
+ 'result', Varien_Db_Ddl_Table::TYPE_VARCHAR, 3,
71
+ array(
72
+ 'nullable' => false,
73
+ 'COMMENT' => "heidelpay processing result"
74
+ )
75
+ )
76
+ ->addColumn(
77
+ 'statuscode', Varien_Db_Ddl_Table::TYPE_SMALLINT, null,
78
+ array(
79
+ 'unsigned' => true,
80
+ 'nullable' => false,
81
+ 'COMMENT' => "heidelpay processing status code"
82
+ )
83
+ )
84
+ ->addColumn(
85
+ 'return', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100,
86
+ array(
87
+ 'nullable' => false,
88
+ 'COMMENT' => "heidelpay processing return message"
89
+ )
90
+ )
91
+ ->addColumn(
92
+ 'returncode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 12,
93
+ array(
94
+ 'nullable' => false,
95
+ 'COMMENT' => "heidelpay processing return code"
96
+ )
97
+ )
98
+ ->addColumn(
99
+ 'jsonresponse', Varien_Db_Ddl_Table::TYPE_BLOB, null,
100
+ array(
101
+ 'nullable' => false,
102
+ 'COMMENT' => "heidelpay response as json"
103
+ )
104
+ )
105
+ ->addColumn(
106
+ 'datetime', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null,
107
+ array(
108
+ 'nullable' => false,
109
+ 'COMMENT' => "create date"
110
+ )
111
+ )
112
+ ->addColumn(
113
+ 'source', Varien_Db_Ddl_Table::TYPE_VARCHAR, 100,
114
+ array(
115
+ 'nullable' => false,
116
+ 'COMMENT' => "heidelpay processing return message"
117
+ )
118
+ )
119
+ ->addIndex($installer->getIdxName($tablerealname, array('uniqeid')), array('uniqeid'))
120
+ ->addIndex($installer->getIdxName($tablerealname, array('transactionid')), array('transactionid'))
121
+ ->addIndex($installer->getIdxName($tablerealname, array('returncode')), array('returncode'))
122
+ ->addIndex($installer->getIdxName($tablerealname, array('source')), array('source'));
123
+ $installer->getConnection()->createTable($table);
124
+ }
125
+
126
+ /**
127
+ * create customer data table
128
+ */
129
+ $tablerealname = 'hcd/customer';
130
+ $tablename = $installer->getTable($tablerealname);
131
+ if ($installer->getConnection()->isTableExists($tablename) != true) {
132
+ $table = $installer->getConnection()
133
+ ->newTable($tablename)
134
+ ->addColumn(
135
+ 'id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
136
+ array(
137
+ 'unsigned' => true,
138
+ 'nullable' => false,
139
+ 'primary' => true,
140
+ 'identity' => true,
141
+ 'auto_increment' => true
142
+ )
143
+ )
144
+ ->addColumn(
145
+ 'paymentmethode', Varien_Db_Ddl_Table::TYPE_VARCHAR, 10,
146
+ array(
147
+ 'nullable' => false)
148
+ )
149
+ ->addColumn(
150
+ 'uniqeid', Varien_Db_Ddl_Table::TYPE_VARCHAR, 50,
151
+ array(
152
+ 'nullable' => false,
153
+ 'COMMENT' => "Heidelpay transaction identifier"
154
+ )
155
+ )
156
+ ->addColumn(
157
+ 'customerid', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
158
+ array(
159
+ 'unsigned' => true,
160
+ 'nullable' => false,
161
+ 'COMMENT' => "magento customer id"
162
+ )
163
+ )
164
+ ->addColumn(
165
+ 'storeid', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
166
+ array(
167
+ 'unsigned' => true,
168
+ 'nullable' => false,
169
+ 'COMMENT' => "magento store id"
170
+ )
171
+ )
172
+ ->addColumn(
173
+ 'payment_data', Varien_Db_Ddl_Table::TYPE_BLOB, null,
174
+ array(
175
+ 'nullable' => false,
176
+ 'COMMENT' => "custumer payment data"
177
+ )
178
+ )
179
+ ->addIndex($installer->getIdxName($tablerealname, array('uniqeid')), array('uniqeid'))
180
+ ->addIndex($installer->getIdxName($tablerealname, array('customerid')), array('customerid'))
181
+ ->addIndex($installer->getIdxName($tablerealname, array('storeid')), array('storeid'))
182
+ ->addIndex($installer->getIdxName($tablerealname, array('paymentmethode')), array('paymentmethode'));
183
+ $installer->getConnection()->createTable($table);
184
+ }
185
+
186
+
187
+
188
+ $installer->endSetup();
app/design/adminhtml/base/default/template/hcd/info/pdf/directdebit.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extend pdf template and add invoice information
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $data = array(
17
+ 'IDENTIFICATION_SHORTID' => '',
18
+ 'CONNECTOR_ACCOUNT_HOLDER' => '',
19
+ 'CONNECTOR_ACCOUNT_IBAN' => '',
20
+ 'CONNECTOR_ACCOUNT_BIC' => ''
21
+
22
+ );
23
+
24
+ $transactionId = ($this->getMethod()
25
+ ->getInfoInstance()
26
+ ->getLastTransId() === false) ? false : $this->getMethod()->getInfoInstance()->getLastTransId();
27
+
28
+ if ($transactionId !== False)
29
+ $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByUniqeId((string)$transactionId);
30
+
31
+ // title of the payment method
32
+ echo $this->escapeHtml($this->getMethod()->getTitle()); ?>
33
+ {{pdf_row_separator}}
34
+
35
+ {{pdf_row_separator}}
36
+ <?php echo $this->escapeHtml($this->__('The booking contains:')); ?>
37
+ {{pdf_row_separator}}
38
+ <?php echo $this->escapeHtml($this->__('mandate reference ID') . " : " . $data['ACCOUNT_IDENTIFICATION']) ?>
39
+ {{pdf_row_separator}}
40
+ <?php echo $this->escapeHtml($this->__('creditor identifier') . " : " . $data['IDENTIFICATION_CREDITOR_ID']) ?>
app/design/adminhtml/base/default/template/hcd/info/pdf/invoice.phtml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extend pdf template and add invoice information
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $data = array(
17
+ 'IDENTIFICATION_SHORTID' => '',
18
+ 'CONNECTOR_ACCOUNT_HOLDER' => '',
19
+ 'CONNECTOR_ACCOUNT_IBAN' => '',
20
+ 'CONNECTOR_ACCOUNT_BIC' => ''
21
+
22
+ );
23
+
24
+ $transactionId = ($this->getMethod()
25
+ ->getInfoInstance()
26
+ ->getLastTransId() === false) ? false : $this->getMethod()->getInfoInstance()->getLastTransId();
27
+
28
+ if ($transactionId !== False)
29
+ $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByUniqeId((string)$transactionId);
30
+
31
+ // title of the payment method
32
+ echo $this->escapeHtml($this->getMethod()->getTitle()); ?>
33
+ {{pdf_row_separator}}
34
+ <?php echo $this->escapeHtml($this->__('Holder') . " : " . $data['CONNECTOR_ACCOUNT_HOLDER']) ?>
35
+ {{pdf_row_separator}}
36
+ <?php echo $this->escapeHtml($this->__('IBAN') . " : " . $data['CONNECTOR_ACCOUNT_IBAN']) ?>
37
+ {{pdf_row_separator}}
38
+ <?php echo $this->escapeHtml($this->__('BIC') . " : " . $data['CONNECTOR_ACCOUNT_BIC']) ?>
39
+ {{pdf_row_separator}}
40
+ <?php echo $this->escapeHtml($this->__('Identification'). " : " . $data['IDENTIFICATION_SHORTID']) ?>
41
+
app/design/adminhtml/base/default/template/hcd/info/pdf/prepayment.phtml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Extend pdf template and add prepayment information
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $data = array(
17
+ 'IDENTIFICATION_SHORTID' => '',
18
+ 'CONNECTOR_ACCOUNT_HOLDER' => '',
19
+ 'CONNECTOR_ACCOUNT_IBAN' => '',
20
+ 'CONNECTOR_ACCOUNT_BIC' => ''
21
+
22
+ );
23
+
24
+ $transactionId = ($this->getMethod()
25
+ ->getInfoInstance()
26
+ ->getLastTransId() === false) ? false : $this->getMethod()->getInfoInstance()->getLastTransId();
27
+
28
+ if ($transactionId !== False)
29
+ $data = Mage::getModel('hcd/transaction')->loadLastTransactionDataByUniqeId((string)$transactionId);
30
+
31
+ // title of the payment method
32
+ echo $this->escapeHtml($this->getMethod()->getTitle()); ?>
33
+ {{pdf_row_separator}}
34
+ <?php echo $this->escapeHtml($this->__('Holder') . " : " . $data['CONNECTOR_ACCOUNT_HOLDER']) ?>
35
+ {{pdf_row_separator}}
36
+ <?php echo $this->escapeHtml($this->__('IBAN') . " : " . $data['CONNECTOR_ACCOUNT_IBAN']) ?>
37
+ {{pdf_row_separator}}
38
+ <?php echo $this->escapeHtml($this->__('BIC') . " : " . $data['CONNECTOR_ACCOUNT_BIC']) ?>
39
+ {{pdf_row_separator}}
40
+ <?php echo $this->escapeHtml($this->__('Identification'). " : " . $data['IDENTIFICATION_SHORTID']) ?>
app/design/adminhtml/default/default/template/hcd/Info/masterpass.phtml CHANGED
@@ -1,22 +1,22 @@
1
- <button type="button" title="MasterPass"
2
- class="btn-hcdmpa-info"
3
- onclick="window.open('https://www.mastercard.com/mc_us/wallet/learnmore/<?php
4
- $lang = Mage::app()->getLocale()->getLocaleCode();
5
- switch ($lang) {
6
- case 'de_DE':
7
- case 'de_AT':
8
- case 'de_CH':
9
- echo 'de/DE';
10
- break;
11
- case 'fr_FR':
12
- echo 'fr/FR';
13
- break;
14
- case 'en_GB':
15
- case 'en_US':
16
- default:
17
- echo 'en/US';
18
- break;
19
- }?>')"
20
- style="background: url('<?php echo Mage::getDesign()->getSkinUrl('images/hcd/'); ?>masterpass_100_28.jpg'
21
- ) 0 0 no-repeat; height: 28px; width: 100px;"
22
- ></button>
1
+ <button type="button" title="MasterPass"
2
+ class="btn-hcdmpa-info"
3
+ onclick="window.open('https://www.mastercard.com/mc_us/wallet/learnmore/<?php
4
+ $lang = Mage::app()->getLocale()->getLocaleCode();
5
+ switch ($lang) {
6
+ case 'de_DE':
7
+ case 'de_AT':
8
+ case 'de_CH':
9
+ echo 'de/DE';
10
+ break;
11
+ case 'fr_FR':
12
+ echo 'fr/FR';
13
+ break;
14
+ case 'en_GB':
15
+ case 'en_US':
16
+ default:
17
+ echo 'en/US';
18
+ break;
19
+ }?>')"
20
+ style="background: url('<?php echo Mage::getDesign()->getSkinUrl('images/hcd/'); ?>masterpass_100_28.jpg'
21
+ ) 0 0 no-repeat; height: 28px; width: 100px;"
22
+ ></button>
app/design/adminhtml/default/default/template/hcd/Info/pdf/invoice.phtml CHANGED
File without changes
app/design/frontend/base/default/layout/hcd.xml CHANGED
@@ -1,108 +1,157 @@
1
  <?xml version="1.0"?>
2
  <layout>
3
- <checkout_onepage_index>
4
  <reference name="head">
5
- <action method="addCss"><name>css/heidelpaycd.css</name></action>
6
- <action method="addJS"><name>hcd/heidelpaycd.js</name></action>
 
 
 
 
7
  </reference>
8
- </checkout_onepage_index>
9
- <checkout_onepage_success>
10
- <reference name="head">
11
- <action method="addCss"><name>css/heidelpaycd.css</name></action>
 
 
12
  </reference>
13
- <reference name="content">
14
- <block type="hcd/success" name="hcd_success" template="hcd/success.phtml" after="checkout.success" />
15
  </reference>
16
  </checkout_onepage_success>
17
  <hcd_index_index>
18
- <remove name="right"/>
19
  <remove name="left"/>
20
 
21
- <reference name="content">
22
- <block type="hcd/index" name="hcd_index" template="hcd/index.phtml"/>
23
  </reference>
24
  <reference name="head">
25
- <action method="addCss"><name>css/heidelpaycd.css</name></action>
26
- <action method="addJS"><name>hcd/heidelpaypci3.js</name></action>
 
 
 
 
27
  </reference>
28
-
29
  </hcd_index_index>
30
-
31
- <checkout_cart_index>
32
- <reference name="head">
33
- <action method="addJS"><name>hcd/heidelpaycd.js</name></action>
34
  </reference>
35
- <reference name="checkout.cart.top_methods">
36
- <block type="hcd/abstract" name="hcdmpa.checkout.button.top"
37
- before="-" template="hcd/button.phtml">
38
- </block>
39
- </reference>
40
-
41
- <reference name="checkout.cart.methods">
42
- <block type="hcd/abstract" name="hcdmpa.checkout.button"
43
- after="checkout.cart.methods.onepage" template="hcd/button.phtml">
44
- </block>
45
- </reference>
46
-
47
- <update handle="SHORTCUT_popup" />
48
- </checkout_cart_index>
49
-
50
- <hcd_checkout_index translate="label">
 
 
 
 
 
 
 
 
51
  <!--Wallet_Checkout -->
52
  <remove name="left"/>
53
  <reference name="root">
54
- <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
 
 
55
  </reference>
56
- <reference name="head">
57
- <action method="addCss"><name>css/heidelpaycd.css</name></action>
 
 
58
  </reference>
59
  <reference name="right">
60
  <action method="unsetChildren"></action>
61
  <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
62
  <label>Checkout Progress Wrapper</label>
63
- <action method="setElementId"><value>checkout-progress-wrapper</value></action>
64
- <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="hcd/onepage/progress.phtml">
65
- <block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block>
66
- <block type="checkout/onepage_progress" name="shipping.progress" template="hcd/onepage/progress/shipping.phtml"></block>
67
- <block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block>
68
- <block type="checkout/onepage_progress" name="payment.progress" template="hcd/onepage/progress/payment.phtml"></block>
 
 
 
 
 
 
 
69
  </block>
70
  </block>
71
  </reference>
72
  <reference name="content">
73
  <block type="hcd/onepage" name="checkout.onepage" template="hcd/onepage.phtml">
74
- <block type="hcd/onepage_billing" name="checkout.onepage.billing" as="billing" template="hcd/onepage/billing.phtml"/>
75
- <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="hcd/onepage/shipping_method.phtml">
76
- <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/>
77
- <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/>
 
 
 
 
 
 
78
  </block>
79
- <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="hcd/onepage/payment.phtml">
80
- <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/info.phtml">
81
- <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
 
 
 
 
 
82
  </block>
83
  </block>
84
- <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"/>
 
85
  </block>
86
  </reference>
87
  </hcd_checkout_index>
88
-
89
- <hcd_checkout_paymentmethod>
90
  <remove name="right"/>
91
  <remove name="left"/>
92
 
93
- <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="hcd/onepage/payment/methods.phtml">
94
- <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
 
 
 
 
95
  </block>
96
  </hcd_checkout_paymentmethod>
97
-
98
- <!-- Individual blocks for Progress steps begins -->
99
  <hcd_checkout_progress_billing>
100
  <!-- Mage_Checkout -->
101
  <remove name="right"/>
102
  <remove name="left"/>
103
 
104
- <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/billing.phtml">
105
- <action method="setInfoTemplate"><method></method><template></template></action>
 
 
 
 
106
  </block>
107
  </hcd_checkout_progress_billing>
108
 
@@ -112,8 +161,12 @@
112
  <remove name="right"/>
113
  <remove name="left"/>
114
 
115
- <block type="checkout/onepage_progress" name="root" output="toHtml" template="hcd/onepage/progress/shipping.phtml">
116
- <action method="setInfoTemplate"><method></method><template></template></action>
 
 
 
 
117
  </block>
118
  </hcd_checkout_progress_shipping>
119
 
@@ -123,22 +176,33 @@
123
  <remove name="right"/>
124
  <remove name="left"/>
125
 
126
- <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress/shipping_method.phtml">
127
- <action method="setInfoTemplate"><method></method><template></template></action>
 
 
 
 
128
  </block>
129
  </hcd_checkout_progress_shipping_method>
130
 
131
  <hcd_checkout_progress_payment>
132
- <!-- Mage_Checkout -->
133
- <remove name="right"/>
134
- <remove name="left"/>
135
 
136
- <block type="checkout/onepage_progress" name="root" output="toHtml" template="hcd/onepage/progress/payment.phtml">
137
- <block type="checkout/onepage_payment_info" name="payment_info">
138
- <action method="setInfoTemplate"><method></method><template></template></action>
 
 
 
 
 
 
 
 
 
139
  </block>
140
- <action method="setInfoTemplate"><method></method><template></template></action>
141
- </block>
142
  </hcd_checkout_progress_payment>
143
-
144
  </layout>
1
  <?xml version="1.0"?>
2
  <layout>
3
+ <checkout_onepage_index>
4
  <reference name="head">
5
+ <action method="addCss">
6
+ <name>css/heidelpaycd.css</name>
7
+ </action>
8
+ <action method="addJS">
9
+ <name>hcd/heidelpaycd.js</name>
10
+ </action>
11
  </reference>
12
+ </checkout_onepage_index>
13
+ <checkout_onepage_success>
14
+ <reference name="head">
15
+ <action method="addCss">
16
+ <name>css/heidelpaycd.css</name>
17
+ </action>
18
  </reference>
19
+ <reference name="content">
20
+ <block type="hcd/success" name="hcd_success" template="hcd/success.phtml" after="checkout.success"/>
21
  </reference>
22
  </checkout_onepage_success>
23
  <hcd_index_index>
24
+ <remove name="right"/>
25
  <remove name="left"/>
26
 
27
+ <reference name="content">
28
+ <block type="hcd/index" name="hcd_index" template="hcd/index.phtml"/>
29
  </reference>
30
  <reference name="head">
31
+ <action method="addCss">
32
+ <name>css/heidelpaycd.css</name>
33
+ </action>
34
+ <action method="addJS">
35
+ <name>hcd/heidelpaypci3.js</name>
36
+ </action>
37
  </reference>
38
+
39
  </hcd_index_index>
40
+
41
+ <hcd_response_index>
42
+ <reference name="root">
43
+ <block type="hcd/response" name="hcd_response" template="hcd/response.phtml"/>
44
  </reference>
45
+ </hcd_response_index>
46
+
47
+ <checkout_cart_index>
48
+ <reference name="head">
49
+ <action method="addJS">
50
+ <name>hcd/heidelpaycd.js</name>
51
+ </action>
52
+ </reference>
53
+ <reference name="checkout.cart.top_methods">
54
+ <block type="hcd/abstract" name="hcdmpa.checkout.button.top"
55
+ before="-" template="hcd/button.phtml">
56
+ </block>
57
+ </reference>
58
+
59
+ <reference name="checkout.cart.methods">
60
+ <block type="hcd/abstract" name="hcdmpa.checkout.button"
61
+ after="checkout.cart.methods.onepage" template="hcd/button.phtml">
62
+ </block>
63
+ </reference>
64
+
65
+ <update handle="SHORTCUT_popup"/>
66
+ </checkout_cart_index>
67
+
68
+ <hcd_checkout_index translate="label">
69
  <!--Wallet_Checkout -->
70
  <remove name="left"/>
71
  <reference name="root">
72
+ <action method="setTemplate">
73
+ <template>page/2columns-right.phtml</template>
74
+ </action>
75
  </reference>
76
+ <reference name="head">
77
+ <action method="addCss">
78
+ <name>css/heidelpaycd.css</name>
79
+ </action>
80
  </reference>
81
  <reference name="right">
82
  <action method="unsetChildren"></action>
83
  <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
84
  <label>Checkout Progress Wrapper</label>
85
+ <action method="setElementId">
86
+ <value>checkout-progress-wrapper</value>
87
+ </action>
88
+ <block type="checkout/onepage_progress" name="checkout.progress" before="-"
89
+ template="hcd/onepage/progress.phtml">
90
+ <block type="checkout/onepage_progress" name="billing.progress"
91
+ template="checkout/onepage/progress/billing.phtml"></block>
92
+ <block type="checkout/onepage_progress" name="shipping.progress"
93
+ template="hcd/onepage/progress/shipping.phtml"></block>
94
+ <block type="checkout/onepage_progress" name="shippingmethod.progress"
95
+ template="checkout/onepage/progress/shipping_method.phtml"></block>
96
+ <block type="checkout/onepage_progress" name="payment.progress"
97
+ template="hcd/onepage/progress/payment.phtml"></block>
98
  </block>
99
  </block>
100
  </reference>
101
  <reference name="content">
102
  <block type="hcd/onepage" name="checkout.onepage" template="hcd/onepage.phtml">
103
+ <block type="hcd/onepage_billing" name="checkout.onepage.billing" as="billing"
104
+ template="hcd/onepage/billing.phtml"/>
105
+ <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method"
106
+ as="shipping_method" template="hcd/onepage/shipping_method.phtml">
107
+ <block type="checkout/onepage_shipping_method_available"
108
+ name="checkout.onepage.shipping_method.available" as="available"
109
+ template="checkout/onepage/shipping_method/available.phtml"/>
110
+ <block type="checkout/onepage_shipping_method_additional"
111
+ name="checkout.onepage.shipping_method.additional" as="additional"
112
+ template="checkout/onepage/shipping_method/additional.phtml"/>
113
  </block>
114
+ <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment"
115
+ template="hcd/onepage/payment.phtml">
116
+ <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods"
117
+ template="checkout/onepage/payment/info.phtml">
118
+ <action method="setMethodFormTemplate">
119
+ <method>purchaseorder</method>
120
+ <template>payment/form/purchaseorder.phtml</template>
121
+ </action>
122
  </block>
123
  </block>
124
+ <block type="checkout/onepage_review" name="checkout.onepage.review" as="review"
125
+ template="checkout/onepage/review.phtml"/>
126
  </block>
127
  </reference>
128
  </hcd_checkout_index>
129
+
130
+ <hcd_checkout_paymentmethod>
131
  <remove name="right"/>
132
  <remove name="left"/>
133
 
134
+ <block type="checkout/onepage_payment_methods" name="root" output="toHtml"
135
+ template="hcd/onepage/payment/methods.phtml">
136
+ <action method="setMethodFormTemplate">
137
+ <method>purchaseorder</method>
138
+ <template>payment/form/purchaseorder.phtml</template>
139
+ </action>
140
  </block>
141
  </hcd_checkout_paymentmethod>
142
+
143
+ <!-- Individual blocks for Progress steps begins -->
144
  <hcd_checkout_progress_billing>
145
  <!-- Mage_Checkout -->
146
  <remove name="right"/>
147
  <remove name="left"/>
148
 
149
+ <block type="checkout/onepage_progress" name="root" output="toHtml"
150
+ template="checkout/onepage/progress/billing.phtml">
151
+ <action method="setInfoTemplate">
152
+ <method></method>
153
+ <template></template>
154
+ </action>
155
  </block>
156
  </hcd_checkout_progress_billing>
157
 
161
  <remove name="right"/>
162
  <remove name="left"/>
163
 
164
+ <block type="checkout/onepage_progress" name="root" output="toHtml"
165
+ template="hcd/onepage/progress/shipping.phtml">
166
+ <action method="setInfoTemplate">
167
+ <method></method>
168
+ <template></template>
169
+ </action>
170
  </block>
171
  </hcd_checkout_progress_shipping>
172
 
176
  <remove name="right"/>
177
  <remove name="left"/>
178
 
179
+ <block type="checkout/onepage_progress" name="root" output="toHtml"
180
+ template="checkout/onepage/progress/shipping_method.phtml">
181
+ <action method="setInfoTemplate">
182
+ <method></method>
183
+ <template></template>
184
+ </action>
185
  </block>
186
  </hcd_checkout_progress_shipping_method>
187
 
188
  <hcd_checkout_progress_payment>
189
+ <!-- Mage_Checkout -->
190
+ <remove name="right"/>
191
+ <remove name="left"/>
192
 
193
+ <block type="checkout/onepage_progress" name="root" output="toHtml"
194
+ template="hcd/onepage/progress/payment.phtml">
195
+ <block type="checkout/onepage_payment_info" name="payment_info">
196
+ <action method="setInfoTemplate">
197
+ <method></method>
198
+ <template></template>
199
+ </action>
200
+ </block>
201
+ <action method="setInfoTemplate">
202
+ <method></method>
203
+ <template></template>
204
+ </action>
205
  </block>
 
 
206
  </hcd_checkout_progress_payment>
207
+
208
  </layout>
app/design/frontend/base/default/template/hcd/Info/debit.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/Info/masterpass.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/Info/pdf/invoice.phtml DELETED
@@ -1,6 +0,0 @@
1
- <div >
2
- Konto: Test123
3
- IBAN: DEPASOFSAPFPEWjsfkds
4
- BIC: sporfkposf
5
- Verw: kacdas�d�awdewq
6
- </div>
 
 
 
 
 
 
app/design/frontend/base/default/template/hcd/button.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/form/creditcard.phtml CHANGED
@@ -1,58 +1,96 @@
1
- <?php
2
- $data = array();
3
- $userData = array();
4
- $payment = '';
5
-
6
- $_code=$this->getMethodCode();
7
- $payment = $this->getMethod() ;
8
-
9
- $path = "payment/".$_code."/";
10
- $storeId = Mage::app()->getStore()->getId();
11
- $recognation = Mage::getStoreConfig($path.'recognition', $storeId);
12
- ?>
13
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
14
-
15
- <?php
16
- $cId = $this->getMethod()->getCustomerId();
17
-
18
- if ( $recognation == 1 and $cId != 0 ) { // only if shipping address is unchanged
19
- $hash = $this->getMethod()->getShippingHash();
20
- $userData = $this->getMethod()->getCustomerData();
21
- if (isset($userData['payment_data'])) {
22
- if ( $userData['payment_data']['SHIPPPING_HASH'] != $hash)
23
- $userData = array();
24
- }
25
- } elseif ($recognation == 2 and $cId != 0 ) // allways
26
- $userData = $this->getMethod()->getCustomerData();
27
-
28
-
29
- if ($recognation != 0) { $data = $payment->getHeidelpayUrl(true);
30
- if ($data['PROCESSING_RESULT'] == 'NOK') $userData = array();
31
- }
32
-
33
- ?>
34
- <label class="hcd-singleline-label" <?php echo (isset($userData['payment_data'])) ? '': 'style="display: none"'; ?>><?php if (isset($userData['payment_data'])) echo str_replace('%CARD%',$userData['payment_data']['ACCOUNT_NUMBER'],$this->__('You have used the card %CARD% befor, would you like to use this again?')) ?></label>
35
- <div class="input-box" <?php echo (isset($userData['payment_data'])) ? '': 'style="display: none"'; ?>>
36
- <input type="radio" onClick="Heidelpay.toggle.getInstance().hpform('<?php echo $_code ?>','false')" class="radio hcd-use_again" id="<?php echo $_code ?>_use_again" name="<?php echo $_code ?>_use_again" value="0" <?php echo (isset($userData['payment_data']) or $recognation == 0) ? 'checked' : ''; ?>><?php echo $this->__('Yes') ?>
37
- <input type="radio" onClick="Heidelpay.toggle.getInstance().hpform('<?php echo $_code ?>','true')" class="radio hcd-use_again" id="<?php echo $_code ?>_use_again" name="<?php echo $_code ?>_use_again" value="1" <?php echo (empty($userData['payment_data']) and $recognation > 0) ? 'checked' : ''; ?>><?php echo $this->__('No') ?>
38
- </div>
39
-
40
- <?php
41
- if ($recognation != 0 and $data['PROCESSING_RESULT'] == 'NOK') {
42
- echo '<div class="hcd-payment-desc hcd-payment-error">'.Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN']).'</div>';
43
- } else {
44
-
45
- if ($recognation != 0) {
46
-
47
- ?>
48
- <div id="<?php echo $_code ?>_hpform" <?php echo (isset($userData['payment_data']['ACCOUNT_NUMBER'])) ? 'style="display: none"': ''; ?>>
49
-
50
- <iframe id="<?php echo $_code ?>_payment_frame" class="<?php echo $_code ?>_payment_frame" src="<?php echo trim($data['FRONTEND_PAYMENT_FRAME_URL']) ?>"></iframe>
51
- </div>
52
-
53
- <?php } ?>
54
- <div class="hcd-payment-desc">
55
- <?php echo $this->__('Desc'.$_code);?>
56
- </div>
57
- <?php } ?>
58
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Credit card form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $data = array();
17
+ $userData = array();
18
+ $payment = '';
19
+
20
+ $code = $this->getMethodCode();
21
+ $payment = $this->getMethod();
22
+
23
+ $path = "payment/" . $code . "/";
24
+ $storeId = Mage::app()->getStore()->getId();
25
+ $recognition = Mage::getStoreConfig($path . 'recognition', $storeId);
26
+ ?>
27
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
28
+
29
+ <?php
30
+ $cId = $this->getMethod()->getCustomerId();
31
+
32
+ if ($recognition == 1 and $cId != 0) { // only if shipping address is unchanged
33
+ $hash = $this->getMethod()->getShippingHash();
34
+ $userData = $this->getMethod()->getCustomerData();
35
+ if (isset($userData['payment_data'])) {
36
+ if ($userData['payment_data']['SHIPPPING_HASH'] != $hash) {
37
+ $userData = array();
38
+ }
39
+ }
40
+ } elseif ($recognition == 2 and $cId != 0) { // allways
41
+ $userData = $this->getMethod()->getCustomerData();
42
+ }
43
+
44
+ if ($recognition != 0) {
45
+ $data = $payment->getHeidelpayUrl(true);
46
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
47
+ $userData = array();
48
+ }
49
+ }
50
+
51
+ ?>
52
+ <label class="hcd-singleline-label" <?php echo (isset($userData['payment_data'])) ? '' : 'style="display: none"';?>>
53
+ <?php if (isset($userData['payment_data']))
54
+ echo $this->htmlEscape(
55
+ str_replace(
56
+ '%CARD%', $userData['payment_data']['ACCOUNT_NUMBER'],
57
+ // @codingStandardsIgnoreLine
58
+ $this->__('You have used the card %CARD% befor, would you like to use this again?')
59
+ )
60
+ ) ?></label>
61
+ <div class="input-box" <?php echo (isset($userData['payment_data'])) ? '' : 'style="display: none"'; ?>>
62
+ <input type="radio"
63
+ onClick="Heidelpay.toggle.getInstance().hpform('<?php echo $this->htmlEscape($code) ?>','false')"
64
+ class="radio hcd-use_again" id="<?php echo $this->htmlEscape($code) ?>_use_again"
65
+ name="<?php echo $this->htmlEscape($code) ?>_use_again" value="0"
66
+ <?php echo (isset($userData['payment_data']) or $recognition == 0) ? 'checked' : ''; ?>>
67
+ <?php echo $this->htmlEscape($this->__('Yes')) ?>
68
+ <input type="radio"
69
+ onClick="Heidelpay.toggle.getInstance().hpform('<?php echo $this->htmlEscape($code) ?>','true')"
70
+ class="radio hcd-use_again" id="<?php echo $this->htmlEscape($code) ?>_use_again"
71
+ name="<?php echo $this->htmlEscape($code) ?>_use_again"
72
+ value="1" <?php echo (empty($userData['payment_data']) and $recognition > 0) ? 'checked' : ''; ?>>
73
+ <?php echo $this->htmlEscape($this->__('No')) ?>
74
+ </div>
75
+
76
+ <?php
77
+ if ($recognition != 0 and $data['PROCESSING_RESULT'] == 'NOK') {
78
+ echo '<div class="hcd-payment-desc hcd-payment-error">'
79
+ . $this->htmlEscape(Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN'])) . '</div>';
80
+ } else {
81
+ if ($recognition != 0) {
82
+ ?>
83
+ <div id="<?php echo $this->htmlEscape($code) ?>_hpform"
84
+ <?php echo (isset($userData['payment_data']['ACCOUNT_NUMBER'])) ? 'style="display: none"' : ''; ?>>
85
+
86
+ <iframe id="<?php echo $this->htmlEscape($code) ?>_payment_frame"
87
+ class="<?php echo $this->htmlEscape($code) ?>_payment_frame"
88
+ src="<?php echo $this->htmlEscape(trim($data['FRONTEND_PAYMENT_FRAME_URL'])) ?>"></iframe>
89
+ </div>
90
+
91
+ <?php } ?>
92
+ <div class="hcd-payment-desc">
93
+ <?php echo $this->htmlEscape($this->__('Desc' . $code)); ?>
94
+ </div>
95
+ <?php } ?>
96
+ </div>
app/design/frontend/base/default/template/hcd/form/debit.phtml CHANGED
@@ -1,140 +1,73 @@
1
- <?php
2
-
3
- $_code = $this->getMethodCode ();
4
-
5
- $path = "payment/" . $_code . "/";
6
- $storeId = Mage::app ()->getStore ()->getId ();
7
- $recognation = Mage::getStoreConfig ( $path . 'recognition', $storeId );
8
- $insurence = Mage::getStoreConfig ( $path . 'insurence', $storeId );
9
- /*
10
- * Look for customer recognation
11
- */
12
-
13
- $hash = $this->getMethod ()->getShippingHash ();
14
- $userData = array ();
15
-
16
- $cId = $this->getMethod ()->getCustomerId ();
17
-
18
- if ($recognation == 1 and $cId != 0) { // only if shipping address is unchanged
19
- $hash = $this->getMethod ()->getShippingHash ();
20
- $userData = $this->getMethod ()->getCustomerData ();
21
- if (array_key_exists ( 'payment_data', $userData )) {
22
- if ($userData ['payment_data'] ['SHIPPPING_HASH'] != $hash)
23
- $userData = array ();
24
- }
25
- } elseif ($recognation == 2 and $cId != 0) // allways
26
- $userData = $this->getMethod ()->getCustomerData ();
27
-
28
-
29
-
30
- ?>
31
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
32
- <?php
33
- // direct debit with insurence
34
- if ($insurence > 0) {?>
35
- <div class="input-box">
36
- <label for="<?php echo $_code ?>_salut"
37
- class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Salutation') ?></label>
38
 
39
- <select title="<?php echo $this->__('Salutation') ?>"
40
- name="payment[<?php echo $_code ?>_salut]" style="width: 50px">
41
- <?php
42
- $salutation = 'mr' ;
43
- if (array_key_exists('NAME.SALUTATION', $userData ['payment_data']))
44
- $salutation = $userData ['payment_data']['NAME.SALUTATION'] ; ?>
45
- <option value="mr" ><?php echo $this->__('mr') ?></option>
46
- <option value="ms" <?php if ($salutation == 'ms' ) echo 'selected="selected"'; ?>><?php echo $this->__('ms') ?></option>
47
- </select>
48
- </div>
49
- <?php };
50
- // END direct debit with insurence ?>
51
- <div class="input-box">
52
- <label for="<?php echo $_code ?>_holder"
53
- class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Owner') ?></label>
54
 
55
- <input type="text" title="<?php echo $this->__('Owner:') ?>"
56
- class="input-text required-entry" id="<?php echo $_code ?>_holder"
57
- name="payment[<?php echo $_code ?>_holder]"
58
- value="<?php echo $this->htmlEscape((isset( $userData['payment_data']['ACCOUNT.HOLDER'])) ? $userData['payment_data']['ACCOUNT.HOLDER'] :$this->getMethod()->getCustomerName()) ?>" />
59
- </div>
60
 
61
- <?php
62
- // direct debit with insurence
63
- if ($insurence > 0) {
64
- $dobyear = $dobmounth = $dobday = 0;
65
- if (array_key_exists('NAME.BIRTHDATE', $userData ['payment_data']))
66
- list($dobyear, $dobmounth, $dobday) = preg_split('/-/', $userData ['payment_data']['NAME.BIRTHDATE']) ;
67
-
68
- ?>
69
- <div class="input-box">
70
- <label for="<?php echo $_code ?>_dob" class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Date of birth') ?></label>
71
- <select title="<?php echo $this->__('DOBDay') ?>"
72
- name="payment[<?php echo $_code ?>_dobday]" style="width: 50px">
73
- <?php
74
- $i = 0;
75
- for($i = 1; $i <= 31; $i ++) {
76
- $v = sprintf("%02d",$i);
77
- $selected = ($dobday === $v) ? 'selected="selected"' : '';
78
- echo '<option value="'.$v.'" '.$selected.'>'.$v.'</option>';
79
- }
80
- ?>
81
- </select>
82
- <select title="<?php echo $this->__('DOBMonth') ?>"
83
- name="payment[<?php echo $_code ?>_dobmonth]" style="width: 50px">
84
- <?php
85
- $i = 0;
86
- for($i = 1; $i <= 12; $i ++) {
87
- $v = sprintf("%02d",$i);
88
- $selected = ($dobmounth == $v) ? 'selected="selected"' : '';
89
- echo '<option value="'.$v.'" '.$selected.'>'.$v.'</option>';
90
- }
91
- ?>
92
- </select>
93
- <select title="<?php echo $this->__('DOBYear') ?>" name="payment[<?php echo $_code ?>_dobyear]" style="width: 75px">
94
- <?php
95
- $i = 0;
96
- for($i = 17; $i <= 80; $i ++) {
97
- $year = date ( 'Y', strtotime ( "last day of -$i year" ) );
98
- $selected = ($dobyear === $year) ? 'selected="selected"' : '';
99
- echo '<option value="'.$year.'" '.$selected.'>'.$year.'</option>';
100
- }
101
- ?>
102
- </select>
103
- </div>
104
- <?php };
105
- // End direct debit with insurence ?>
106
- <?php
107
- if (isset ( $userData ['payment_data'] ['ACCOUNT.IBAN'] )) {
108
- if (preg_match ( '/^(D|d)(E|e)/', $userData ['payment_data'] ['ACCOUNT.IBAN'] )) {
109
- $display = 'style="display: none;"';
110
- } else {
111
- $display = '';
112
- }
113
- }
114
- ?>
115
- <div class="input-box">
116
- <label for="<?php echo $_code ?>_iban"
117
- class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Account number or iban') ?></label>
118
-
119
- <input onkeyup="Heidelpay.checkIban.getInstance().check(this);"
120
- type="text" title="<?php echo $this->__('Account number or iban') ?>"
121
- class="input-text required-entry validate-alphanum"
122
- id="<?php echo $_code ?>_iban"
123
- name="payment[<?php echo $_code ?>_iban]"
124
- value="<?php if (isset($userData['payment_data']['ACCOUNT.IBAN'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.IBAN']) ; if (isset($userData['payment_data']['ACCOUNT.NUMBER'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.NUMBER']) ; ?>"
125
- size="25">
126
- </div>
127
- <div class="input-box" <?php print $display; ?>>
128
- <label for="<?php echo $_code ?>_bic"
129
- class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Bank code or bic') ?></label>
130
- <input type="text" title="<?php echo $this->__('Bank code or bic:') ?>"
131
- class="input-text required-entry validate-alphanum"
132
- id="<?php echo $_code ?>_bic" name="payment[<?php echo $_code ?>_bic]"
133
- value="<?php if (isset($userData['payment_data']['ACCOUNT.BIC'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.BIC']) ; if (isset($userData['payment_data']['ACCOUNT.BANK'])) echo $this->htmlEscape($userData['payment_data']['ACCOUNT.BANK']) ; ?>"
134
- size="25" />
135
- </div>
136
- <div class="hcd-payment-desc">
137
- <?php echo $this->__('Desc'.$_code);?>
138
  </div>
 
 
 
139
 
140
- </div>
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Direct debit form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $code = $this->getMethodCode();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ $path = "payment/" . $code . "/";
19
+ $storeId = Mage::app()->getStore()->getId();
20
+ $recognition = Mage::getStoreConfig($path . 'recognition', $storeId);
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
+ /*
23
+ * Look for customer recognition
24
+ */
 
 
25
 
26
+ $hash = $this->getMethod()->getShippingHash();
27
+ $userData = array ();
28
+
29
+ $cId = $this->getMethod()->getCustomerId();
30
+
31
+ if ($recognition == 1 and $cId != 0) { // only if shipping address is unchanged
32
+ $hash = $this->getMethod()->getShippingHash();
33
+ $userData = $this->getMethod()->getCustomerData();
34
+ if ($userData !== false and array_key_exists('payment_data', $userData)) {
35
+ if ($userData ['payment_data'] ['SHIPPPING_HASH'] != $hash)
36
+ $userData = array ();
37
+ }
38
+ } elseif ($recognition == 2 and $cId != 0) // allways
39
+ $userData = $this->getMethod()->getCustomerData();
40
+
41
+
42
+
43
+ ?>
44
+ <div class="form-list hcd-payment-info"
45
+ id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
46
+ <div class="input-box">
47
+ <label for="<?php echo $this->htmlEscape($code) ?>_holder"
48
+ class="required hcd-singleline-label"><em>*</em>
49
+ <?php echo $this->htmlEscape($this->__('Owner')) ?></label>
50
+
51
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('Owner:')) ?>"
52
+ class="input-text required-entry" id="<?php echo $this->htmlEscape($code); ?>_holder"
53
+ name="payment[<?php echo $this->htmlEscape($code) ?>_holder]"
54
+ value="<?php echo $this->htmlEscape(
55
+ (isset($userData['payment_data']['ACCOUNT.HOLDER']))
56
+ ? $userData['payment_data']['ACCOUNT.HOLDER'] :$this->getMethod()->getCustomerName()
57
+ ) ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  </div>
59
+ <div class="input-box">
60
+ <label for="<?php echo $this->htmlEscape($code) ?>_iban"
61
+ class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('IBAN')) ?></label>
62
 
63
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('IBAN')) ?>"
64
+ class="input-text required-entry validate-alphanum" id="<?php echo $this->htmlEscape($code) ?>_iban"
65
+ name="payment[<?php echo $this->htmlEscape($code) ?>_iban]"
66
+ value="<?php if (isset($userData['payment_data']['ACCOUNT.IBAN']))
67
+ echo $this->htmlEscape($userData['payment_data']['ACCOUNT.IBAN']);?>"
68
+ size="25">
69
+ </div>
70
+ <div class="hcd-payment-desc">
71
+ <?php echo $this->htmlEscape($this->__('Desc'.$code));?>
72
+ </div>
73
+ </div>
app/design/frontend/base/default/template/hcd/form/desconly.phtml CHANGED
@@ -1,6 +1,22 @@
1
- <?php $_code=$this->getMethodCode() ?>
2
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
3
- <div class="hcd-payment-desc">
4
- <?php echo $this->__('Desc'.$_code); ?>
5
- </div>
6
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Description only form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $code=$this->getMethodCode()
17
+ ?>
18
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
19
+ <div class="hcd-payment-desc">
20
+ <?php echo $this->htmlEscape($this->__('Desc'.$code)); ?>
21
+ </div>
22
+ </div>
app/design/frontend/base/default/template/hcd/form/direct-debit-secured.phtml ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Direct debit secured form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $code = $this->getMethodCode();
17
+ $dobyear = null;
18
+ $dobmounth = null;
19
+ $dobday = null;
20
+
21
+
22
+ $path = "payment/" . $code . "/";
23
+ $storeId = Mage::app()->getStore()->getId();
24
+ $recognition = Mage::getStoreConfig($path . 'recognition', $storeId);
25
+
26
+ $hash = $this->getMethod()->getShippingHash();
27
+ $userData = array();
28
+
29
+ $cId = $this->getMethod()->getCustomerId();
30
+
31
+ if ($recognition == 1 and $cId != 0) { // only if shipping address is unchanged
32
+ $hash = $this->getMethod()->getShippingHash();
33
+ $userData = $this->getMethod()->getCustomerData();
34
+ if ($userData !== false and array_key_exists('payment_data', $userData)) {
35
+ if ($userData ['payment_data'] ['SHIPPPING_HASH'] != $hash) {
36
+ $userData = array();
37
+ }
38
+ }
39
+ } elseif ($recognition == 2 and $cId != 0) {
40
+ $userData = $this->getMethod()->getCustomerData();
41
+ }
42
+
43
+ if (array_key_exists('payment_data', $userData) &&
44
+ array_key_exists('NAME.BIRTHDATE', $userData['payment_data'])
45
+ ) {
46
+ list($dobyear, $dobmounth, $dobday) = explode('-', $userData['payment_data']['NAME.BIRTHDATE']);
47
+ }
48
+
49
+
50
+ ?>
51
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
52
+ <div class="input-box">
53
+ <label for="<?php echo $this->htmlEscape($code) ?>_salutation"
54
+ class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('salutation')) ?>
55
+ </label>
56
+ <select title="<?php echo $this->htmlEscape($this->__('salutation')) ?>"
57
+ name="payment[<?php echo $this->htmlEscape($code) ?>_salutation]">
58
+ <option value="MR"><?php echo $this->htmlEscape($this->__('mr')) ?></option>
59
+ <option value="MRS" <?php if (array_key_exists('payment_data', $userData) and
60
+ array_key_exists('NAME.SALUTATION', $userData['payment_data']) and
61
+ $userData['payment_data']['NAME.SALUTATION'] == 'MRS'
62
+ ) echo 'selected="selected"' ?>>
63
+ <?php echo $this->htmlEscape($this->__('mrs')) ?>
64
+ </option>
65
+ </select>
66
+ </div>
67
+ <div class="input-box">
68
+ <label for="<?php echo $this->htmlEscape($code) ?>_holder"
69
+ class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('Owner')) ?>
70
+ </label>
71
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('Owner:')) ?>"
72
+ class="input-text required-entry" id="<?php echo $this->htmlEscape($code) ?>_holder"
73
+ name="payment[<?php echo $this->htmlEscape($code) ?>_holder]"
74
+ value="<?php
75
+ echo $this->htmlEscape(
76
+ (isset($userData['payment_data']['ACCOUNT.HOLDER']))
77
+ ? $userData['payment_data']['ACCOUNT.HOLDER'] : $this->getMethod()->getCustomerName()
78
+ ) ?>"/>
79
+ </div>
80
+ <div class="input-box">
81
+ <label for="<?php echo $this->htmlEscape($code) ?>_iban"
82
+ class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('IBAN')) ?>
83
+ </label>
84
+
85
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('IBAN')) ?>"
86
+ class="input-text required-entry validate-alphanum"
87
+ id="<?php echo $this->htmlEscape($code) ?>_iban"
88
+ name="payment[<?php echo $this->htmlEscape($code) ?>_iban]"
89
+ value="<?php if (isset($userData['payment_data']['ACCOUNT.IBAN'])) {
90
+ echo $this->htmlEscape($userData['payment_data']['ACCOUNT.IBAN']);
91
+ } ?>"
92
+ size="25">
93
+ </div>
94
+ <div class="input-box">
95
+ <label for="<?php echo $this->htmlEscape($code) ?>_dob"
96
+ class="required hcd-singleline-label"><em>*</em>
97
+ <?php echo $this->htmlEscape($this->__('Date of birth')) ?></label>
98
+ <select title="<?php echo $this->htmlEscape($this->__('day')) ?>"
99
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobday]">
100
+ <option><?php echo $this->htmlEscape($this->__('day')); ?></option>
101
+ <?php
102
+ $i = 0;
103
+ for ($i = 1; $i <= 31; $i++) {
104
+ $v = sprintf("%02d", $i);
105
+ $selected = ($dobday === $v) ? 'selected="selected"' : '';
106
+ echo '<option value="' . $this->htmlEscape($v) . '" ' . $this->htmlEscape($selected)
107
+ . '>' . $this->htmlEscape($v) . '</option>';
108
+ }
109
+ ?>
110
+ </select>
111
+ </div>
112
+ <div class="input-box">
113
+ <select title="<?php echo $this->htmlEscape($this->__('month')) ?>"
114
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobmonth]">
115
+ <option><?php echo $this->htmlEscape($this->__('month')); ?></option>
116
+ <?php
117
+ $i = 0;
118
+ for ($i = 1; $i <= 12; $i++) {
119
+ $v = sprintf("%02d", $i);
120
+ $selected = ($dobmounth == $v) ? 'selected="selected"' : '';
121
+ echo '<option value="' . $this->htmlEscape($v) . '" ' . $this->htmlEscape($selected) . '>' .
122
+ $this->htmlEscape($v) . '</option>';
123
+ }
124
+ ?>
125
+ </select>
126
+ </div>
127
+ <div class="input-box">
128
+ <select title="<?php echo $this->htmlEscape($this->__('year')) ?>"
129
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobyear]">
130
+ <option><?php echo $this->htmlEscape($this->__('year')); ?></option>
131
+ <?php
132
+ $i = 0;
133
+ for ($i = 17; $i <= 80; $i++) {
134
+ // @codingStandardsIgnoreLine should be refactored - issue #2
135
+ $year = date('Y', strtotime("last day of -$i year"));
136
+ $selected = ($dobyear === $year) ? 'selected="selected"' : '';
137
+ echo '<option value="' . $this->htmlEscape($year) . '" ' .
138
+ $this->htmlEscape($selected) . '>' . $this->htmlEscape($year) . '</option>';
139
+ }
140
+ ?>
141
+ </select>
142
+ </div>
143
+ <div class="hcd-payment-desc">
144
+ <?php echo $this->htmlEscape($this->__('Desc' . $code)); ?>
145
+ </div>
146
+
147
+ </div>
app/design/frontend/base/default/template/hcd/form/eps.phtml CHANGED
@@ -1,38 +1,60 @@
1
- <?php
2
- $payment = '';
3
-
4
- $_code=$this->getMethodCode();
5
- $payment = $this->getMethod() ;
6
-
7
- $data = $payment->getHeidelpayUrl(true);
8
- if ($data['PROCESSING_RESULT'] == 'NOK') $userData = array();
9
-
10
- ?>
11
-
12
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
13
- <?php //echo '<pre>Data'.print_r($data,1).'</pre>';
14
- if ($data['PROCESSING_RESULT'] == 'NOK') {
15
- echo '<div class="hcd-payment-desc hcd-payment-error">'.Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN']).'</div>';
16
- } else {
17
-
18
- ?>
19
- <label class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Bank') ?></label>
20
- <div class="input-box">
21
- <select class="input-text required-entry" name="payment[<?php echo $_code ?>_bank]">
22
- <?php
23
- foreach (json_decode($data['CONFIG_BRANDS'], true) AS $value => $brand) {
24
- echo '<option value='.$value.' >'.$brand.'</option>' ;
25
- }
26
- ?>
27
- </select>
28
- </div>
29
- <div class="input-box">
30
- <label for="<?php echo $_code ?>_holder" class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Owner') ?></label>
31
-
32
- <input type="text" title="<?php echo $this->__('Owner:') ?>" class="input-text required-entry" id="<?php echo $_code ?>_holder" name="payment[<?php echo $_code ?>_holder]" value="<?php echo $this->htmlEscape($this->getMethod()->getCustomerName()) ?>" />
33
- </div>
34
- <div class="hcd-payment-desc">
35
- <?php echo $this->__('Desc'.$_code);?>
36
- </div>
37
- <?php } ?>
38
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * EPS form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $payment = '';
17
+
18
+ $code = $this->getMethodCode();
19
+ $payment = $this->getMethod();
20
+
21
+ $data = $payment->getHeidelpayUrl(true);
22
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
23
+ $userData = array();
24
+ }
25
+
26
+ ?>
27
+
28
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
29
+ <?php
30
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
31
+ echo '<div class="hcd-payment-desc hcd-payment-error">' .
32
+ $this->htmlEscape(Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN']))
33
+ . '</div>';
34
+ } else {
35
+ ?>
36
+ <label class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('Bank')) ?>
37
+ </label>
38
+ <div class="input-box">
39
+ <select class="input-text required-entry" name="payment[<?php echo $this->htmlEscape($code) ?>_bank]">
40
+ <?php
41
+ foreach (json_decode($data['CONFIG_BRANDS'], true) AS $value => $brand) {
42
+ echo '<option value=' . $this->htmlEscape($value) . ' >' . $this->htmlEscape($brand) . '</option>';
43
+ }
44
+ ?>
45
+ </select>
46
+ </div>
47
+ <div class="input-box">
48
+ <label for="<?php echo $this->htmlEscape($code) ?>_holder" class="required hcd-singleline-label">
49
+ <em>*</em><?php echo $this->htmlEscape($this->__('Owner')) ?></label>
50
+
51
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('Owner:')) ?>"
52
+ class="input-text required-entry" id="<?php echo $this->htmlEscape($code) ?>_holder"
53
+ name="payment[<?php echo $this->htmlEscape($code) ?>_holder]"
54
+ value="<?php echo $this->htmlEscape($this->getMethod()->getCustomerName()) ?>"/>
55
+ </div>
56
+ <div class="hcd-payment-desc">
57
+ <?php echo $this->htmlEscape($this->__('Desc' . $code)); ?>
58
+ </div>
59
+ <?php } ?>
60
+ </div>
app/design/frontend/base/default/template/hcd/form/giropay.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/form/ideal.phtml CHANGED
@@ -1,38 +1,60 @@
1
- <?php
2
- $payment = '';
3
-
4
- $_code=$this->getMethodCode();
5
- $payment = $this->getMethod() ;
6
-
7
- $data = $payment->getHeidelpayUrl(true);
8
- if ($data['PROCESSING_RESULT'] == 'NOK') $userData = array();
9
-
10
- ?>
11
-
12
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
13
- <?php //echo '<pre>Data'.print_r($data,1).'</pre>';
14
- if ($data['PROCESSING_RESULT'] == 'NOK') {
15
- echo '<div class="hcd-payment-desc hcd-payment-error">'.Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN']).'</div>';
16
- } else {
17
-
18
- ?>
19
- <label class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Bank') ?></label>
20
- <div class="input-box">
21
- <select class="input-text required-entry" name="payment[<?php echo $_code ?>_bank]">
22
- <?php
23
- foreach (json_decode($data['CONFIG_BRANDS'], true) AS $value => $brand) {
24
- echo '<option value='.$value.' >'.$brand.'</option>' ;
25
- }
26
- ?>
27
- </select>
28
- </div>
29
- <div class="input-box">
30
- <label for="<?php echo $_code ?>_holder" class="required hcd-singleline-label"><em>*</em><?php echo $this->__('Owner') ?></label>
31
-
32
- <input type="text" title="<?php echo $this->__('Owner:') ?>" class="input-text required-entry" id="<?php echo $_code ?>_holder" name="payment[<?php echo $_code ?>_holder]" value="<?php echo $this->htmlEscape($this->getMethod()->getCustomerName()) ?>" />
33
- </div>
34
- <div class="hcd-payment-desc">
35
- <?php echo $this->__('Desc'.$_code);?>
36
- </div>
37
- <?php } ?>
38
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Ideal form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $payment = '';
17
+
18
+ $code = $this->getMethodCode();
19
+ $payment = $this->getMethod();
20
+
21
+ $data = $payment->getHeidelpayUrl(true);
22
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
23
+ $userData = array();
24
+ }
25
+
26
+ ?>
27
+
28
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
29
+ <?php
30
+ if ($data['PROCESSING_RESULT'] == 'NOK') {
31
+ echo '<div class="hcd-payment-desc hcd-payment-error">' .
32
+ $this->htmlEscape(Mage::helper('hcd/payment')->handleError($data['PROCESSING_RETURN']))
33
+ . '</div>';
34
+ } else {
35
+ ?>
36
+ <label class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('Bank')) ?>
37
+ </label>
38
+ <div class="input-box">
39
+ <select class="input-text required-entry" name="payment[<?php echo $this->htmlEscape($code) ?>_bank]">
40
+ <?php
41
+ foreach (json_decode($data['CONFIG_BRANDS'], true) AS $value => $brand) {
42
+ echo '<option value=' . $this->htmlEscape($value) . ' >' . $this->htmlEscape($brand) . '</option>';
43
+ }
44
+ ?>
45
+ </select>
46
+ </div>
47
+ <div class="input-box">
48
+ <label for="<?php echo $this->htmlEscape($code) ?>_holder" class="required hcd-singleline-label">
49
+ <em>*</em><?php echo $this->htmlEscape($this->__('Owner')) ?></label>
50
+
51
+ <input type="text" title="<?php echo $this->htmlEscape($this->__('Owner:')) ?>"
52
+ class="input-text required-entry" id="<?php echo $this->htmlEscape($code) ?>_holder"
53
+ name="payment[<?php echo $this->htmlEscape($code) ?>_holder]"
54
+ value="<?php echo $this->htmlEscape($this->getMethod()->getCustomerName()) ?>"/>
55
+ </div>
56
+ <div class="hcd-payment-desc">
57
+ <?php echo $this->htmlEscape($this->__('Desc' . $code)); ?>
58
+ </div>
59
+ <?php } ?>
60
+ </div>
app/design/frontend/base/default/template/hcd/form/invoice-secured.phtml ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Invoice secured form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $code = $this->getMethodCode();
17
+ $dobyear = null;
18
+ $dobmounth = null;
19
+ $dobday = null;
20
+
21
+ $path = "payment/" . $code . "/";
22
+ $storeId = Mage::app()->getStore()->getId();
23
+ $recognition = Mage::getStoreConfig($path . 'recognition', $storeId);
24
+
25
+ $hash = $this->getMethod()->getShippingHash();
26
+ $userData = array();
27
+
28
+ $cId = $this->getMethod()->getCustomerId();
29
+
30
+ if ($recognition == 1 and $cId != 0) {
31
+ // only if shipping address is unchanged
32
+ $hash = $this->getMethod()->getShippingHash();
33
+ $userData = $this->getMethod()->getCustomerData();
34
+ if ($userData !== false and array_key_exists('payment_data', $userData)) {
35
+ if ($userData ['payment_data'] ['SHIPPPING_HASH'] != $hash) {
36
+ $userData = array();
37
+ }
38
+ }
39
+ } elseif ($recognition == 2 and $cId != 0) {
40
+ $userData = $this->getMethod()->getCustomerData();
41
+ }
42
+
43
+ if (array_key_exists('payment_data', $userData) &&
44
+ array_key_exists('NAME.BIRTHDATE', $userData['payment_data'])
45
+ ) {
46
+ list($dobyear, $dobmounth, $dobday) = explode('-', $userData['payment_data']['NAME.BIRTHDATE']);
47
+ }
48
+
49
+ ?>
50
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
51
+ <div class="input-box">
52
+ <label for="<?php echo $this->htmlEscape($code) ?>_salutation"
53
+ class="required hcd-singleline-label"><em>*</em><?php echo $this->htmlEscape($this->__('salutation')) ?>
54
+ </label>
55
+ <select title="<?php echo $this->htmlEscape($this->__('salutation')) ?>"
56
+ name="payment[<?php echo $this->htmlEscape($code) ?>_salutation]">
57
+ <option value="MR"><?php echo $this->htmlEscape($this->__('mr')) ?></option>
58
+ <option value="MRS" <?php if (array_key_exists('payment_data', $userData) and
59
+ array_key_exists('NAME.SALUTATION', $userData['payment_data']) and
60
+ $userData['payment_data']['NAME.SALUTATION'] == 'MRS'
61
+ ) echo 'selected="selected"' ?>>
62
+ <?php echo $this->htmlEscape($this->__('mrs')) ?>
63
+ </option>
64
+ </select>
65
+ </div>
66
+ <div class="input-box">
67
+ <label for="<?php echo $this->htmlEscape($code) ?>_dob"
68
+ class="required hcd-singleline-label"><em>*</em>
69
+ <?php echo $this->htmlEscape($this->__('Date of birth')) ?></label>
70
+ <select title="<?php echo $this->htmlEscape($this->__('day')) ?>"
71
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobday]">
72
+ <option><?php echo $this->htmlEscape($this->__('day')); ?></option>
73
+ <?php
74
+ $i = 0;
75
+ for ($i = 1; $i <= 31; $i++) {
76
+ $v = sprintf("%02d", $i);
77
+ $selected = ($dobday === $v) ? 'selected="selected"' : '';
78
+ echo '<option value="' . $this->htmlEscape($v) . '" ' . $this->htmlEscape($selected)
79
+ . '>' . $this->htmlEscape($v) . '</option>';
80
+ }
81
+ ?>
82
+ </select>
83
+ </div>
84
+ <div class="input-box">
85
+ <select title="<?php echo $this->htmlEscape($this->__('month')) ?>"
86
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobmonth]">
87
+ <option><?php echo $this->htmlEscape($this->__('month')); ?></option>
88
+ <?php
89
+ $i = 0;
90
+ for ($i = 1; $i <= 12; $i++) {
91
+ $v = sprintf("%02d", $i);
92
+ $selected = ($dobmounth == $v) ? 'selected="selected"' : '';
93
+ echo '<option value="' . $this->htmlEscape($v) . '" ' . $this->htmlEscape($selected) . '>' .
94
+ $this->htmlEscape($v) . '</option>';
95
+ }
96
+ ?>
97
+ </select>
98
+ </div>
99
+ <div class="input-box">
100
+ <select title="<?php echo $this->htmlEscape($this->__('year')) ?>"
101
+ name="payment[<?php echo $this->htmlEscape($code) ?>_dobyear]">
102
+ <option><?php echo $this->htmlEscape($this->__('year')); ?></option>
103
+ <?php
104
+ $i = 0;
105
+ for ($i = 17; $i <= 80; $i++) {
106
+ // @codingStandardsIgnoreLine should be refactored - issue #2
107
+ $year = date('Y', strtotime("last day of -$i year"));
108
+ $selected = ($dobyear === $year) ? 'selected="selected"' : '';
109
+ echo '<option value="' . $this->htmlEscape($year) . '" ' .
110
+ $this->htmlEscape($selected) . '>' . $this->htmlEscape($year) . '</option>';
111
+ }
112
+ ?>
113
+ </select>
114
+ </div>
115
+ <div class="hcd-payment-desc">
116
+ <?php echo $this->htmlEscape($this->__('Desc' . $code)); ?>
117
+ </div>
118
+ </div>
app/design/frontend/base/default/template/hcd/form/masterpass.phtml CHANGED
@@ -1,42 +1,56 @@
1
- <?php
2
- $data = array();
3
- $userData = array();
4
- $payment = '';
5
-
6
- $_code=$this->getMethodCode();
7
-
8
- ?>
9
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
10
- <div class="hcd-payment-desc" style="border-left: 0px;">
11
- <button type="button" title="MasterPass"
12
- class="btn-hcdmpa-payment-data"
13
- onclick="window.open('https://www.mastercard.com/mc_us/wallet/learnmore/<?php
14
- $lang = Mage::app()->getLocale()->getLocaleCode();
15
- switch ($lang) {
16
- case 'de_DE':
17
- case 'de_AT':
18
- case 'de_CH':
19
- echo 'de/DE';
20
- break;
21
- case 'fr_FR':
22
- echo 'fr/FR';
23
- break;
24
- case 'en_GB':
25
- default:
26
- echo 'en/US';
27
- break;
28
- }?>')"
29
- ></button>
30
- <div class="hcd-masterpass-payment-data">
31
- <?php
32
- $mpadata = $this->getMethod()->getPaymentData();
33
- if (!empty($mpadata)) {
34
- echo $mpadata ;
35
- } else {
36
- echo '<p>'.$this->__('Deschcdmpa').'</p>';
37
- } ?>
38
- </div>
39
-
40
-
41
- </div>
42
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Masterpass form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $data = array();
17
+ $userData = array();
18
+ $payment = '';
19
+
20
+ $code=$this->getMethodCode();
21
+
22
+ ?>
23
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
24
+ <div class="hcd-payment-desc" style="border-left: 0px;">
25
+ <button type="button" title="MasterPass"
26
+ class="btn-hcdmpa-payment-data"
27
+ onclick="window.open('https://www.mastercard.com/mc_us/wallet/learnmore/<?php
28
+ $lang = Mage::app()->getLocale()->getLocaleCode();
29
+ switch ($lang) {
30
+ case 'de_DE':
31
+ case 'de_AT':
32
+ case 'de_CH':
33
+ echo 'de/DE';
34
+ break;
35
+ case 'fr_FR':
36
+ echo 'fr/FR';
37
+ break;
38
+ case 'en_GB':
39
+ default:
40
+ echo 'en/US';
41
+ break;
42
+ }?>')"
43
+ ></button>
44
+ <div class="hcd-masterpass-payment-data">
45
+ <?php
46
+ $mpadata = $this->getMethod()->getPaymentData();
47
+ if (!empty($mpadata)) {
48
+ echo $this->htmlEscape($mpadata);
49
+ } else {
50
+ echo '<p>'.$this->htmlEscape($this->__('Deschcdmpa')).'</p>';
51
+ } ?>
52
+ </div>
53
+
54
+
55
+ </div>
56
+ </div>
app/design/frontend/base/default/template/hcd/form/postfinance.phtml CHANGED
@@ -1,17 +1,40 @@
1
- <?php $_code=$this->getMethodCode() ?>
2
- <div class="form-list hcd-payment-info" id="payment_form_<?php echo $_code ?>" style="display: none;">
3
- <div class="input-box">
4
- <input id="<?php echo $_code ?>_pf" class="radio" name="payment[<?php echo $_code ?>_pf]" value="PFEFINANCE" autocomplete="off" type="radio"></input>
5
- <label class="hco-inline-label">Post Finance E-Finance</label>
6
- </div>
7
- <div class="input-box">
8
- <input id="<?php echo $_code ?>_pf" class="radio" name="payment[<?php echo $_code ?>_pf]" value="PFCARD" autocomplete="off" type="radio"></input>
9
- <label class="hco-inline-label">Post Finance Card</label>
10
- <br style="clean:both;">
11
- </div>
12
- <div>
13
- <div class="hcd-payment-desc">
14
- <?php echo $this->__('Deschcdpf');?>
15
- </div>
16
-
17
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Postfinance form template
4
+ *
5
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
7
+ *
8
+ * @link https://dev.heidelpay.de/magento
9
+ *
10
+ * @author Jens Richter
11
+ *
12
+ * @package Heidelpay
13
+ * @subpackage Magento
14
+ * @category Magento
15
+ */
16
+ $code=$this->getMethodCode();
17
+ ?>
18
+ <div class="form-list hcd-payment-info" id="payment_form_<?php echo $this->htmlEscape($code) ?>" style="display: none;">
19
+ <div class="input-box">
20
+ <input id="<?php echo $this->htmlEscape($code) ?>_pf" class="radio"
21
+ name="payment[<?php echo $this->htmlEscape($code) ?>_pf]"
22
+ value="PFEFINANCE" autocomplete="off" type="radio">
23
+
24
+ </input>
25
+ <label class="hco-inline-label">Post Finance E-Finance</label>
26
+ </div>
27
+ <div class="input-box">
28
+ <input id="<?php echo $this->htmlEscape($code) ?>_pf" class="radio"
29
+ name="payment[<?php echo $this->htmlEscape($code) ?>_pf]"
30
+ value="PFCARD" autocomplete="off" type="radio">
31
+ </input>
32
+ <label class="hco-inline-label">Post Finance Card</label>
33
+ <br style="clean:both;">
34
+ </div>
35
+ <div>
36
+ <div class="hcd-payment-desc">
37
+ <?php echo $this->htmlEscape($this->__('Deschcdpf'));?>
38
+ </div>
39
+
40
+ </div>
app/design/frontend/base/default/template/hcd/index.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/mail/hcd_payment_info.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/billing.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/payment.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/payment/methods.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/progress.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/progress/payment.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/progress/shipping.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/onepage/shipping_method.phtml CHANGED
File without changes
app/design/frontend/base/default/template/hcd/response.phtml ADDED
File without changes
app/design/frontend/base/default/template/hcd/success.phtml CHANGED
File without changes
app/etc/modules/HeidelpayCD_Edition.xml CHANGED
@@ -1,14 +1,14 @@
1
  <?xml version="1.0"?>
2
  <config>
3
- <modules>
4
- <HeidelpayCD_Edition>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- <depends>
8
- <Mage_Payment />
9
- <Mage_Sales />
10
- <Mage_Core />
11
- </depends>
12
- </HeidelpayCD_Edition>
13
- </modules>
14
  </config>
1
  <?xml version="1.0"?>
2
  <config>
3
+ <modules>
4
+ <HeidelpayCD_Edition>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Payment/>
9
+ <Mage_Sales/>
10
+ <Mage_Core/>
11
+ </depends>
12
+ </HeidelpayCD_Edition>
13
+ </modules>
14
  </config>
app/locale/de_DE/HeidelpayCD_Edition.csv CHANGED
@@ -4,11 +4,12 @@
4
  "Card number","Kartennr."
5
  "Card holder","Karteninhaber"
6
  "Card expiry","Ablaufdatum"
 
7
  "month","Monat"
8
  "year","Jahr"
9
  "Verification number","Pr&uuml;fnummer"
10
  "pay now","Jetzt Bezahlen"
11
- "payment informations","Zahlungsinformationen - "
12
  "Automatically invoiced by Heidelpay.","Automatische Rechnungserstellung durch Heidelpay."
13
  "Automatically invoiced","Automatische Rechnungserstellung und Versand"
14
  "Bookingmode","Buchungsmodus"
@@ -23,18 +24,16 @@
23
  "only if shippping adress is unchanged","nur bei gleichbleibender Lieferaddresse"
24
  "Prepayment Info Text","Bitte &uuml;berweisen Sie uns den Betrag von <strong>{AMOUNT} {CURRENCY}</strong> auf folgendes Konto:<br/><br/>
25
  Kontoinhaber: {CONNECTOR_ACCOUNT_HOLDER}<br/>
26
- IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/>
27
- BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
28
  <i>Geben Sie als Verwendungszweck bitte ausschlie&szlig;lich diese Identifikationsnummer an:</i><br/>
29
  <strong>{IDENTIFICATION_SHORTID}</strong>"
30
  "Direct Debit Info Text","Der Betrag von <strong>{AMOUNT} {CURRENCY}</strong> wird in den n&auml;chsten Tagen von folgendem Konto abgebucht:<br /><br />
31
- IBAN: {Iban}<br />
32
- BIC: {Bic}<br /><br />
33
  <i>Die Abbuchung enth&auml;lt die Mandatsreferenz-ID: {Ident}<br />
34
  und die Gl&auml;ubiger ID: {CreditorId}</i><br />
35
  <br />
36
  Bitte sorgen Sie f&uuml;r ausreichende Deckung auf dem entsprechenden Konto."
37
- "Invoice Info Text","Bitte &uuml;berweisen Sie uns den Betrag von <strong>{AMOUNT} {CURRENCY}</strong> auf folgendes Konto:<br/><br/>
38
  Kontoinhaber: {CONNECTOR_ACCOUNT_HOLDER}<br/>
39
  IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/>
40
  BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
@@ -60,7 +59,6 @@
60
  "iDeal","iDeal"
61
  "Prepayment","Vorkasse"
62
  "Invoice","Rechnung"
63
- "Mangirkart","MangirKart"
64
  "BillSafe","Kauf auf Rechnung"
65
  "MasterPass","MasterPass"
66
  "MASTER","MasterCard"
@@ -81,11 +79,10 @@
81
  "Deschcdpp","Sicher zahlen mit Vorkasse"
82
  "Deschcdpf","Sicher zahlen mit Postfinance"
83
  "Deschcdsu","Sicher zahlen mit Sofort&uuml;berweisung"
84
- "Deschcdiv","Sicher zahlen mit Rechnung"
85
- "Deschcdmk","Sicher zahlen mit MangirKart"
86
- "Deschcdbs","Kaufen Sie jetzt auf Rechnung und begutachten Sie Ihre Eink&auml;ufe in Ruhe bevor Sie bezahlen. <br/><a title='Ihre Vorteile' href='http://www.billsafe.de/special/payment-info' target='_blank'><img src='https://images.billsafe.de/image/image/id/191997712fbe' style='border:0'/></a>"
87
- "Deschcdyt","Sicher zahlen mit Yapital"
88
  "Deschcdmpa","MasterPass ist eine digitale Bezahll&ouml;sung f&uuml;r den Einkauf im Internet von MasterCard, die von Banken und MasterCard direkt bereitgestellt wird. Ihre Kartendaten und Lieferadressen werden an einem gesch&uuml;tzten Ort aufbewahrt. Nachdem Sie sich registriert haben, k&ouml;nnen Sie mit wenigen Klicks sicher online einkaufen."
 
 
89
 
90
  "Return in Errorcase","R&uuml;ckleitung bei Bezahlfehler"
91
  "Please configurate where your costumer should be redirected to in case of an payment error","Hier k&ouml;nnen Sie einstellen, wo der Kunde in Fehlerfall hingeleitet werden soll."
@@ -108,12 +105,13 @@
108
 
109
  "Heidelpay Credit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Kreditkarte"
110
  "Heidelpay Direct Debit (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Lastschrift"
 
111
  "Heidelpay Debit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Debitkarte"
112
  "Heidelpay SOFORT &Uuml;berweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT &Uuml;berweisung"
113
  "Heidelpay Giropay (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Giropay"
114
- "Heidelpay MangirKart (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition MangirKart"
115
  "Heidelpay Postfinance (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Postfinance"
116
  "Heidelpay Invoice (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Rechnung"
 
117
  "Heidelpay Pay Pal (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition PayPal"
118
  "Heidelpay Prepayment (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Vorkasse"
119
  "Heidelpay Billsafe (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition BillSafe"
@@ -154,10 +152,8 @@
154
  "Account no. & Bank no.","Kontonummer & Bankleitzahl"
155
  "IBAN & BIC","IBAN & BIC"
156
 
157
- "Insurence provider","Versicherer"
158
- "direct debit with insurence requires an extra contract. For more information, please contact your key account manager.","F&uuml;r Lastschrift mit Versicherung ben&ouml;tigen Sie einen extra Vertrag. Bitte kontakieren Sie Ihren Key Account Ansprechpartner."
159
- "Salutation","Anrede"
160
- "ms","Frau"
161
  "mr","Herr"
162
  "Date of birth","Geburtsdatum"
163
 
@@ -187,5 +183,6 @@
187
  "HPError-800.100.171","Bitte w&auml;hlen Sie eine andere Zahlart"
188
  "HPError-800.300.101","Bitte w&auml;hlen Sie eine andere Zahlart"
189
 
190
-
191
-
 
4
  "Card number","Kartennr."
5
  "Card holder","Karteninhaber"
6
  "Card expiry","Ablaufdatum"
7
+ "day","Tag"
8
  "month","Monat"
9
  "year","Jahr"
10
  "Verification number","Pr&uuml;fnummer"
11
  "pay now","Jetzt Bezahlen"
12
+ "payment information","Zahlungsinformationen"
13
  "Automatically invoiced by Heidelpay.","Automatische Rechnungserstellung durch Heidelpay."
14
  "Automatically invoiced","Automatische Rechnungserstellung und Versand"
15
  "Bookingmode","Buchungsmodus"
24
  "only if shippping adress is unchanged","nur bei gleichbleibender Lieferaddresse"
25
  "Prepayment Info Text","Bitte &uuml;berweisen Sie uns den Betrag von <strong>{AMOUNT} {CURRENCY}</strong> auf folgendes Konto:<br/><br/>
26
  Kontoinhaber: {CONNECTOR_ACCOUNT_HOLDER}<br/>
27
+ IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/><br/>
 
28
  <i>Geben Sie als Verwendungszweck bitte ausschlie&szlig;lich diese Identifikationsnummer an:</i><br/>
29
  <strong>{IDENTIFICATION_SHORTID}</strong>"
30
  "Direct Debit Info Text","Der Betrag von <strong>{AMOUNT} {CURRENCY}</strong> wird in den n&auml;chsten Tagen von folgendem Konto abgebucht:<br /><br />
31
+ IBAN: {Iban}<br /><br/>
 
32
  <i>Die Abbuchung enth&auml;lt die Mandatsreferenz-ID: {Ident}<br />
33
  und die Gl&auml;ubiger ID: {CreditorId}</i><br />
34
  <br />
35
  Bitte sorgen Sie f&uuml;r ausreichende Deckung auf dem entsprechenden Konto."
36
+ "Invoice Info Text","Bitte &uuml;berweisen Sie uns den Betrag von <strong>{AMOUNT} {CURRENCY}</strong> nach erhalt der Ware auf folgendes Konto:<br/><br/>
37
  Kontoinhaber: {CONNECTOR_ACCOUNT_HOLDER}<br/>
38
  IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/>
39
  BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
59
  "iDeal","iDeal"
60
  "Prepayment","Vorkasse"
61
  "Invoice","Rechnung"
 
62
  "BillSafe","Kauf auf Rechnung"
63
  "MasterPass","MasterPass"
64
  "MASTER","MasterCard"
79
  "Deschcdpp","Sicher zahlen mit Vorkasse"
80
  "Deschcdpf","Sicher zahlen mit Postfinance"
81
  "Deschcdsu","Sicher zahlen mit Sofort&uuml;berweisung"
82
+ "Deschcdiv","Sicher bezahlen per Rechnungskauf"
 
 
 
83
  "Deschcdmpa","MasterPass ist eine digitale Bezahll&ouml;sung f&uuml;r den Einkauf im Internet von MasterCard, die von Banken und MasterCard direkt bereitgestellt wird. Ihre Kartendaten und Lieferadressen werden an einem gesch&uuml;tzten Ort aufbewahrt. Nachdem Sie sich registriert haben, k&ouml;nnen Sie mit wenigen Klicks sicher online einkaufen."
84
+ "Deschcdddsec","Sicher zahlen mit Lastschrift"
85
+ "Deschcdivsec","Sicher bezahlen per Rechnungskauf"
86
 
87
  "Return in Errorcase","R&uuml;ckleitung bei Bezahlfehler"
88
  "Please configurate where your costumer should be redirected to in case of an payment error","Hier k&ouml;nnen Sie einstellen, wo der Kunde in Fehlerfall hingeleitet werden soll."
105
 
106
  "Heidelpay Credit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Kreditkarte"
107
  "Heidelpay Direct Debit (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Lastschrift"
108
+ "Heidelpay direct debit secured(hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition gesicherte SEPA Lastschrift (b2c)"
109
  "Heidelpay Debit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Debitkarte"
110
  "Heidelpay SOFORT &Uuml;berweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT &Uuml;berweisung"
111
  "Heidelpay Giropay (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Giropay"
 
112
  "Heidelpay Postfinance (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Postfinance"
113
  "Heidelpay Invoice (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Rechnung"
114
+ "Heidelpay invoice secured(hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition gesicherte Rechnung (b2c)"
115
  "Heidelpay Pay Pal (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition PayPal"
116
  "Heidelpay Prepayment (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Vorkasse"
117
  "Heidelpay Billsafe (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition BillSafe"
152
  "Account no. & Bank no.","Kontonummer & Bankleitzahl"
153
  "IBAN & BIC","IBAN & BIC"
154
 
155
+ "salutation","Anrede"
156
+ "mrs","Frau"
 
 
157
  "mr","Herr"
158
  "Date of birth","Geburtsdatum"
159
 
183
  "HPError-800.100.171","Bitte w&auml;hlen Sie eine andere Zahlart"
184
  "HPError-800.300.101","Bitte w&auml;hlen Sie eine andere Zahlart"
185
 
186
+ "The booking contains:","Die Abbuchung enthält:"
187
+ "mandate reference ID","Mandatsreferenz-ID"
188
+ "creditor identifier","Gläubiger ID"
app/locale/en_US/HeidelpayCD_Edition.csv CHANGED
@@ -4,11 +4,12 @@
4
  "Card number","Card Number"
5
  "Card holder","Card Holder"
6
  "Card expiry","Expiry Date"
 
7
  "month","month"
8
  "year","year"
9
  "Verification number","Verification Number"
10
  "pay now","Pay now"
11
- "payment informations","payment informations -"
12
  "Automatically invoiced by Heidelpay.","Automatically invoiced by Heidelpay."
13
  "Automatically invoiced","Automatically invoiced"
14
  "Bookingmode","Bookingmode"
@@ -24,21 +25,19 @@
24
  "only if shippping adress is unchanged","only if shippping adress is unchanged"
25
  "Prepayment Info Text","Please transfer the amount of <strong>{AMOUNT} {CURRENCY}</strong> to the following account<br /><br />
26
  Holder: {CONNECTOR_ACCOUNT_HOLDER}<br/>
27
- IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/>
28
- BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
29
  <i>Please use only this identification number as the descriptor :</i><br/>
30
  <strong>{IDENTIFICATION_SHORTID}</strong>"
31
  "Direct Debit Info Text","The amount of <strong>{AMOUNT} {CURRENCY}</strong> will be debited from this account within the next days:<br /><br />
32
- IBAN: {Iban}<br />
33
- BIC: {Bic}<br /><br />
34
  <i>The booking contains the mandate reference ID: {Ident}<br >
35
  and the creditor identifier: {CreditorId}</i><br />
36
  <br />
37
  Please ensure that there will be sufficient funds on the corresponding account."
38
  "An unexpected error occurred. Please contact us to get further information.","An unexpected error occurred. Please contact us to get further information."
39
- "Invoice Info Text","Please transfer the amount of <strong>{AMOUNT} {CURRENCY}</strong> to the following account<br /><br />
40
  Holder: {CONNECTOR_ACCOUNT_HOLDER}<br/>
41
- IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/>
42
  BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
43
  <i>Please use only this identification number as the descriptor :</i><br/>
44
  <strong>{IDENTIFICATION_SHORTID}</strong>"
@@ -70,21 +69,21 @@
70
  "DISCOVER","Discover"
71
  "DINERS","Diners Club"
72
 
73
- "Deschcdcc","Pay safe and secure with Creditcard<br>"
74
- "Deschcddc","Pay safe and secure with Debitcard<br>"
75
- "Deschcddd","Pay safe and secure with Direct Debit"
76
  "Deschcdeps","Pay safe and secure with EPS"
77
  "Deschcdgp","Pay safe and secure with Giropay"
78
  "Deschcdide","Pay safe and secure with iDeal"
79
  "Deschcdpal","Pay safe and secure with PayPal"
80
  "Deschcdpp","Pay safe and secure with Prepayment"
81
  "Deschcdpf","Pay safe and secure with Postfinace"
82
- "Deschcdsu","Pay safe and secure with Sofort&Uuml;berweisung"
83
- "Deschcdiv","Pay comfortable with Invoice"
84
- "Deschcdmk","Pay comfortable with MangirKart"
85
  "Deschcdbs","Buy with invoice and check your order calmly before payment.<br/>"
86
- "Deschcdyt","Pay comfortable with Yapital"
87
  "Deschcdmpa","The MasterPass by MasterCard&copy; digital wallet makes online shopping safe and easy by storing all your payment and shipping information in one convenient and secure place. And it&apos;s free. With MasterPass, you simply shop, and check out faster."
 
 
88
 
89
  "Return in Errorcase","Return in Errorcase"
90
  "Please configurate where your costumer should be redirected to in case of an payment error","Please configurate where your costumer should be redirected to in case of an payment error"
@@ -107,12 +106,13 @@
107
 
108
  "Heidelpay Credit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Credit Card"
109
  "Heidelpay Direct Debit (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Direct Debit"
 
110
  "Heidelpay Debit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Debit Card"
111
  "Heidelpay SOFORT &Uuml;berweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT &Uuml;berweisung"
112
  "Heidelpay Giropay (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Giropay"
113
- "Heidelpay MangirKart (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition MangirKart"
114
  "Heidelpay Postfinance (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Postfinance"
115
  "Heidelpay Invoice (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Invoice"
 
116
  "Heidelpay Pay Pal (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition PayPal"
117
  "Heidelpay Prepayment (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Prepayment"
118
  "Heidelpay Billsafe (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition BillSafe"
@@ -151,10 +151,8 @@
151
  und NICHTS ANDERES an."
152
  "HP_LEGALNOTE_BILLSAFE","Bitte überweisen Sie den ausstehenden Betrag {DAYS} Tage nach dem Sie über den Versand informiert wurden."
153
 
154
- "Insurence provider","Insurence provider"
155
- "direct debit with insurence requires an extra contract. For more information, please contact your key account manager.","direct debit with insurence requires an extra contract. For more information, please contact your key account manager."
156
- "Salutation","Salutation"
157
- "ms","Ms"
158
  "mr","Mr"
159
  "Date of birth","Date of birth"
160
 
@@ -190,4 +188,8 @@
190
  "HPError-800.100.160","Please choose another payment method"
191
  "HPError-800.100.168","Please choose another payment method"
192
  "HPError-800.100.171","Please choose another payment method"
193
- "HPError-800.300.101","Please choose another payment method"
 
 
 
 
4
  "Card number","Card Number"
5
  "Card holder","Card Holder"
6
  "Card expiry","Expiry Date"
7
+ "day","day"
8
  "month","month"
9
  "year","year"
10
  "Verification number","Verification Number"
11
  "pay now","Pay now"
12
+ "payment information","payment information"
13
  "Automatically invoiced by Heidelpay.","Automatically invoiced by Heidelpay."
14
  "Automatically invoiced","Automatically invoiced"
15
  "Bookingmode","Bookingmode"
25
  "only if shippping adress is unchanged","only if shippping adress is unchanged"
26
  "Prepayment Info Text","Please transfer the amount of <strong>{AMOUNT} {CURRENCY}</strong> to the following account<br /><br />
27
  Holder: {CONNECTOR_ACCOUNT_HOLDER}<br/>
28
+ IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/><br/>
 
29
  <i>Please use only this identification number as the descriptor :</i><br/>
30
  <strong>{IDENTIFICATION_SHORTID}</strong>"
31
  "Direct Debit Info Text","The amount of <strong>{AMOUNT} {CURRENCY}</strong> will be debited from this account within the next days:<br /><br />
32
+ IBAN: {Iban}<br /><br/>
 
33
  <i>The booking contains the mandate reference ID: {Ident}<br >
34
  and the creditor identifier: {CreditorId}</i><br />
35
  <br />
36
  Please ensure that there will be sufficient funds on the corresponding account."
37
  "An unexpected error occurred. Please contact us to get further information.","An unexpected error occurred. Please contact us to get further information."
38
+ "Invoice Info Text","Please transfer the amount of <strong>{AMOUNT} {CURRENCY}</strong>after receiving your order to the following account<br /><br />
39
  Holder: {CONNECTOR_ACCOUNT_HOLDER}<br/>
40
+ IBAN: {CONNECTOR_ACCOUNT_IBAN}<br/><br/>
41
  BIC: {CONNECTOR_ACCOUNT_BIC}<br/><br/>
42
  <i>Please use only this identification number as the descriptor :</i><br/>
43
  <strong>{IDENTIFICATION_SHORTID}</strong>"
69
  "DISCOVER","Discover"
70
  "DINERS","Diners Club"
71
 
72
+ "Deschcdcc","Pay safe and secure with credit card<br>"
73
+ "Deschcddc","Pay safe and secure with debit card<br>"
74
+ "Deschcddd","Pay safe and secure with direct debit"
75
  "Deschcdeps","Pay safe and secure with EPS"
76
  "Deschcdgp","Pay safe and secure with Giropay"
77
  "Deschcdide","Pay safe and secure with iDeal"
78
  "Deschcdpal","Pay safe and secure with PayPal"
79
  "Deschcdpp","Pay safe and secure with Prepayment"
80
  "Deschcdpf","Pay safe and secure with Postfinace"
81
+ "Deschcdsu","Pay safe and secure with Sofort"
82
+ "Deschcdiv","Pay comfortable with invoice"
 
83
  "Deschcdbs","Buy with invoice and check your order calmly before payment.<br/>"
 
84
  "Deschcdmpa","The MasterPass by MasterCard&copy; digital wallet makes online shopping safe and easy by storing all your payment and shipping information in one convenient and secure place. And it&apos;s free. With MasterPass, you simply shop, and check out faster."
85
+ "Deschcdddsec","Pay safe and secure with direct debit"
86
+ "Deschcdivsec","Pay comfortable with invoice"
87
 
88
  "Return in Errorcase","Return in Errorcase"
89
  "Please configurate where your costumer should be redirected to in case of an payment error","Please configurate where your costumer should be redirected to in case of an payment error"
106
 
107
  "Heidelpay Credit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Credit Card"
108
  "Heidelpay Direct Debit (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Direct Debit"
109
+ "Heidelpay direct debit secured(hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SEPA direct debit secured (b2c)"
110
  "Heidelpay Debit Card (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Debit Card"
111
  "Heidelpay SOFORT &Uuml;berweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT &Uuml;berweisung"
112
  "Heidelpay Giropay (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Giropay"
 
113
  "Heidelpay Postfinance (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Postfinance"
114
  "Heidelpay Invoice (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Invoice"
115
+ "Heidelpay invoice secured(hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition invoice secured (b2c)"
116
  "Heidelpay Pay Pal (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition PayPal"
117
  "Heidelpay Prepayment (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition Prepayment"
118
  "Heidelpay Billsafe (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition BillSafe"
151
  und NICHTS ANDERES an."
152
  "HP_LEGALNOTE_BILLSAFE","Bitte überweisen Sie den ausstehenden Betrag {DAYS} Tage nach dem Sie über den Versand informiert wurden."
153
 
154
+ "salutation","Salutation"
155
+ "mrs","Mrs"
 
 
156
  "mr","Mr"
157
  "Date of birth","Date of birth"
158
 
188
  "HPError-800.100.160","Please choose another payment method"
189
  "HPError-800.100.168","Please choose another payment method"
190
  "HPError-800.100.171","Please choose another payment method"
191
+ "HPError-800.300.101","Please choose another payment method"
192
+
193
+ "The booking contains:","The booking contains:"
194
+ "mandate reference ID","mandate reference ID"
195
+ "creditor identifier","creditor identifier"
js/hcd/heidelpaycd.js CHANGED
@@ -1,138 +1,156 @@
1
- /*
2
- Released under the GNU General Public License (Version 2)
3
- [http://www.gnu.org/licenses/gpl-2.0.html]
4
- */
 
 
 
 
 
 
 
 
 
 
5
 
6
  //<![CDATA[
7
  var Heidelpay = {};
8
  console.log('Heidelpay CD-Edition');
9
 
10
- Heidelpay.Registration = Class.create({
11
-
12
- initialize: function() {
13
- this.once = 1;
14
- document.observe('dom:loaded', this.register.bind(this));
15
- Ajax.Responders.register(this);
16
- },
17
- register: function () {
18
-
19
- if (checkout.currentStep == 'payment') {
20
- Heidelpay.toggle.getInstance().resetOnce();
21
- }
22
-
23
-
24
- if (!window.review || review.overriddenOnSave || review.overriddenOnComplete) {
25
- return this;
26
- }
27
-
28
-
29
- var actPayment = $$('input:checked[type=radio][name=\'payment[method]\']')[0].id.replace(/p_method_/,"");
30
-
31
- if ( actPayment == 'hcdcc' || actPayment == 'hcddc' ) {
32
- var newreg = $$('input:checked[type=radio][name=\''+actPayment+'_use_again\']')[0].value ;
33
- if ( Heidelpay.toggle.getInstance().getOnce() == 0) {
34
- var newreg = $$('input:checked[type=radio][name=\''+actPayment+'_use_again\']')[0].value ;
35
- if ( newreg == 1 && checkout.currentStep == 'review') {
36
- var url = $(actPayment+'_payment_frame').readAttribute('src');
37
- var arr = url.split("/");
38
- var targetOrigin = arr[0] + "//" + arr[2];
39
- var paymentFrameIframe = $(actPayment+'_payment_frame');
40
- var data = {};
41
- checkout.setLoadWaiting('review');
42
- paymentFrameIframe.contentWindow.postMessage(JSON.stringify(data), targetOrigin);
43
-
44
- if (window.addEventListener){ // W3C DOM
45
- window.addEventListener('message', receiveMessage);
46
- }else if (window.attachEvent) { // IE DOM
47
- window.attachEvent('onmessage', receiveMessage);
48
- }
49
- Heidelpay.toggle.getInstance().setOnce();
50
- }
51
-
52
- }
53
- }
54
-
55
- },
56
- onComplete: function () {
57
- this.register.defer();
58
- },
59
-
60
- });
 
 
61
 
62
  new Heidelpay.Registration();
63
 
64
- Heidelpay.toggle = Class.create({
65
- initialize: function() {
66
- this.once = 0;
67
- },
68
- getOnce: function() {
69
- return this.once ;
70
- },
71
- setOnce: function() {
72
- this.once++
73
- },
74
- resetOnce: function() {
75
- this.once = 0;
76
- },
77
-
78
- hpform: function ( actPayment, change ) {
79
- var replace = '';
80
- $(actPayment + "_hpform").toggle() ;
81
- },
82
- button: function (url) {
83
- $$('.btn-hcdmpa').each(Element.toggle);
84
- $$(".btn-checkout").each(Element.toggle);
85
- $$(".masterpass-please-wait").each(Element.toggle);
86
-
87
- window.location.href = url ;
88
- }
89
- });
 
 
90
 
91
  Heidelpay.toggle.getInstance = function () {
92
- if (!this.instance) {
93
- this.instance = new this();
94
- }
95
- return this.instance;
 
96
  };
97
 
98
- Heidelpay.checkIban = Class.create({
99
- check: function(elem){
100
- var value = $(elem).getValue();
101
- var iban_id = $(elem).identify();
102
- var prefix = iban_id.split('_',1);
103
- var bic_id = prefix[0] + '_bic';
104
-
105
- if($(bic_id) != undefined){
106
-
107
- if(value.match(/^[A-Za-z]{2}/)){
108
- $(bic_id).up().hide();
109
- $(bic_id).disable();
110
- }else{
111
- $(bic_id).up().show();
112
- $(bic_id).enable();
113
- }
114
- }
115
- }
116
- });
117
-
118
- Heidelpay.checkIban.getInstance = function(){
119
- if(!this.instance){
120
- this.instance = new this();
121
- }
122
- return this.instance;
 
 
123
  }
124
 
125
- function receiveMessage(e) {
126
-
127
- var recMsg = JSON.parse(e.data);
128
- //console.log(e.data);
129
- if (recMsg["POST.VALIDATION"] == "NOK" || recMsg["PROCESSING.RESULT"] == 'NOK') {
130
- checkout.setLoadWaiting(false);
131
- checkout.back();
132
- Heidelpay.toggle.getInstance().resetOnce();
133
- } else {
134
- checkout.setLoadWaiting(false);
135
- }
 
136
 
137
  }
138
  //]]>
1
+ /**
2
+ * heidelpay checkout javascript
3
+ *
4
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
5
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
6
+ *
7
+ * @link https://dev.heidelpay.de/magento
8
+ *
9
+ * @author Jens Richter
10
+ *
11
+ * @package Heidelpay
12
+ * @subpackage Magento
13
+ * @category Magento
14
+ */
15
 
16
  //<![CDATA[
17
  var Heidelpay = {};
18
  console.log('Heidelpay CD-Edition');
19
 
20
+ Heidelpay.Registration = Class.create(
21
+ {
22
+
23
+ initialize: function () {
24
+ this.once = 1;
25
+ document.observe('dom:loaded', this.register.bind(this));
26
+ Ajax.Responders.register(this);
27
+ },
28
+ register: function () {
29
+
30
+ if (checkout.currentStep == 'payment') {
31
+ Heidelpay.toggle.getInstance().resetOnce();
32
+ }
33
+
34
+
35
+ if (!window.review || review.overriddenOnSave || review.overriddenOnComplete) {
36
+ return this;
37
+ }
38
+
39
+
40
+ var actPayment = $$('input:checked[type=radio][name=\'payment[method]\']')[0].id.replace(/p_method_/,"");
41
+
42
+ if (actPayment == 'hcdcc' || actPayment == 'hcddc') {
43
+ var newreg = $$('input:checked[type=radio][name=\''+actPayment+'_use_again\']')[0].value ;
44
+ if (Heidelpay.toggle.getInstance().getOnce() == 0) {
45
+ var newreg = $$('input:checked[type=radio][name=\''+actPayment+'_use_again\']')[0].value ;
46
+ if (newreg == 1 && checkout.currentStep == 'review') {
47
+ var url = $(actPayment+'_payment_frame').readAttribute('src');
48
+ var arr = url.split("/");
49
+ var targetOrigin = arr[0] + "//" + arr[2];
50
+ var paymentFrameIframe = $(actPayment+'_payment_frame');
51
+ var data = {};
52
+ checkout.setLoadWaiting('review');
53
+ paymentFrameIframe.contentWindow.postMessage(JSON.stringify(data), targetOrigin);
54
+
55
+ if (window.addEventListener){ // W3C DOM
56
+ window.addEventListener('message', receiveMessage);
57
+ }else if (window.attachEvent) { // IE DOM
58
+ window.attachEvent('onmessage', receiveMessage);
59
+ }
60
+
61
+ Heidelpay.toggle.getInstance().setOnce();
62
+ }
63
+ }
64
+ }
65
+
66
+ },
67
+ onComplete: function () {
68
+ this.register.defer();
69
+ },
70
+
71
+ }
72
+ );
73
 
74
  new Heidelpay.Registration();
75
 
76
+ Heidelpay.toggle = Class.create(
77
+ {
78
+ initialize: function () {
79
+ this.once = 0;
80
+ },
81
+ getOnce: function () {
82
+ return this.once ;
83
+ },
84
+ setOnce: function () {
85
+ this.once++
86
+ },
87
+ resetOnce: function () {
88
+ this.once = 0;
89
+ },
90
+
91
+ hpform: function ( actPayment, change ) {
92
+ var replace = '';
93
+ $(actPayment + "_hpform").toggle();
94
+ },
95
+ button: function (url) {
96
+ $$('.btn-hcdmpa').each(Element.toggle);
97
+ $$(".btn-checkout").each(Element.toggle);
98
+ $$(".masterpass-please-wait").each(Element.toggle);
99
+
100
+ window.location.href = url ;
101
+ }
102
+ }
103
+ );
104
 
105
  Heidelpay.toggle.getInstance = function () {
106
+ if (!this.instance) {
107
+ this.instance = new this();
108
+ }
109
+
110
+ return this.instance;
111
  };
112
 
113
+ Heidelpay.checkIban = Class.create(
114
+ {
115
+ check: function (elem) {
116
+ var value = $(elem).getValue();
117
+ var iban_id = $(elem).identify();
118
+ var prefix = iban_id.split('_',1);
119
+ var bic_id = prefix[0] + '_bic';
120
+
121
+ if($(bic_id) != undefined){
122
+ if(value.match(/^[A-Za-z]{2}/)){
123
+ $(bic_id).up().hide();
124
+ $(bic_id).disable();
125
+ }else{
126
+ $(bic_id).up().show();
127
+ $(bic_id).enable();
128
+ }
129
+ }
130
+ }
131
+ }
132
+ );
133
+
134
+ Heidelpay.checkIban.getInstance = function () {
135
+ if(!this.instance){
136
+ this.instance = new this();
137
+ }
138
+
139
+ return this.instance;
140
  }
141
 
142
+ function receiveMessage(e)
143
+ {
144
+
145
+ var recMsg = JSON.parse(e.data);
146
+ //console.log(e.data);
147
+ if (recMsg["POST.VALIDATION"] == "NOK" || recMsg["PROCESSING.RESULT"] == 'NOK') {
148
+ checkout.setLoadWaiting(false);
149
+ checkout.back();
150
+ Heidelpay.toggle.getInstance().resetOnce();
151
+ } else {
152
+ checkout.setLoadWaiting(false);
153
+ }
154
 
155
  }
156
  //]]>
js/hcd/heidelpaypci3.js CHANGED
@@ -1,81 +1,101 @@
1
- document.observe('dom:loaded', function(){
2
- // Get the target origin from the FRONTEND.PAYMENT_FRAME_URL parameter
3
- var targetOrigin = getDomainFromUrl($('paymentFrame').readAttribute('src'));
4
-
5
- // ### Sending postMessages ###
6
-
7
-
8
-
9
- var paymentFrameForm = $('hcdForm');
10
- var paymentFrameIframe = $('paymentFrame');
11
-
12
- // Add an event listener that will execute the sendMessage() function
13
- // when the send button is clicked.
14
- if (paymentFrameForm.addEventListener){ // W3C DOM
15
- paymentFrameForm.addEventListener('submit', sendMessage);
16
- }else if (paymentFrameForm.attachEvent) { // IE DOM
17
- paymentFrameForm.attachEvent('onsubmit', sendMessage);
18
- }
19
-
20
- // A function to handle sending messages.
21
- function sendMessage(e) {
22
- // Prevent any default browser behaviour.
23
- $('button_hcd').toggle();
24
- $('heidelpay-please-wait').toggle();
25
-
26
- if(e.preventDefault) {
27
- e.preventDefault();
28
- } else {
29
- e.returnValue = false;
30
- }
31
-
32
- // save the form data in an object
33
- var data = {};
34
-
35
- /*
36
- for (var i = 0, len = paymentFrameForm.length; i < len; ++i) {
37
- var input = paymentFrameForm[i];
38
- if (input.name) {
39
- data[input.name] = input.value;
40
- }
41
- }
42
- */
43
-
44
- // Send a json message with the form data to the iFrame receiver window.
45
- paymentFrameIframe.contentWindow.postMessage(JSON.stringify(data), targetOrigin);
46
- }
47
-
48
- // ### Utils ###
49
-
50
- // extract protocol, domain and port from url
51
- function getDomainFromUrl(url) {
52
- var arr = url.split("/");
53
- return arr[0] + "//" + arr[2];
54
- }
55
-
56
-
57
- // Setup an event listener that calls receiveMessage() when the window
58
- // receives a new MessageEvent.
59
- if (window.addEventListener){ // W3C DOM
60
- window.addEventListener('message', receiveMessage);
61
- }else if (window.attachEvent) { // IE DOM
62
- window.attachEvent('onmessage', receiveMessage);
63
- }
64
-
65
- // ### Receiving postMessages ###
66
-
67
- function receiveMessage(e) {
68
-
69
- // Check to make sure that this message came from the correct domain.
70
- if (e.origin !== targetOrigin){
71
- return;
72
- }
73
- var recMsg = JSON.parse(e.data);
74
- if (recMsg["POST.VALIDATION"] == "NOK") {
75
- $('button_hcd').toggle();
76
- $('heidelpay-please-wait').toggle();
77
- }
78
-
79
- }
80
-
81
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * heidelpay payment frame javascript
3
+ *
4
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
5
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
6
+ *
7
+ * @link https://dev.heidelpay.de/magento
8
+ *
9
+ * @author Jens Richter
10
+ *
11
+ * @package Heidelpay
12
+ * @subpackage Magento
13
+ * @category Magento
14
+ */
15
+
16
+ document.observe(
17
+ 'dom:loaded', function () {
18
+ // Get the target origin from the FRONTEND.PAYMENT_FRAME_URL parameter
19
+ var targetOrigin = getDomainFromUrl($('paymentFrame').readAttribute('src'));
20
+
21
+ // ### Sending postMessages ###
22
+
23
+
24
+ var paymentFrameForm = $('hcdForm');
25
+ var paymentFrameIframe = $('paymentFrame');
26
+
27
+ // Add an event listener that will execute the sendMessage() function
28
+ // when the send button is clicked.
29
+ if (paymentFrameForm.addEventListener) { // W3C DOM
30
+ paymentFrameForm.addEventListener('submit', sendMessage);
31
+ } else if (paymentFrameForm.attachEvent) { // IE DOM
32
+ paymentFrameForm.attachEvent('onsubmit', sendMessage);
33
+ }
34
+
35
+ // A function to handle sending messages.
36
+ function sendMessage(e)
37
+ {
38
+ // Prevent any default browser behaviour.
39
+ $('button_hcd').toggle();
40
+ $('heidelpay-please-wait').toggle();
41
+
42
+ if (e.preventDefault) {
43
+ e.preventDefault();
44
+ } else {
45
+ e.returnValue = false;
46
+ }
47
+
48
+ // save the form data in an object
49
+ var data = {};
50
+
51
+ /*
52
+ for (var i = 0, len = paymentFrameForm.length; i < len; ++i) {
53
+ var input = paymentFrameForm[i];
54
+ if (input.name) {
55
+ data[input.name] = input.value;
56
+ }
57
+ }
58
+ */
59
+
60
+ // Send a json message with the form data to the iFrame receiver window.
61
+ paymentFrameIframe.contentWindow.postMessage(JSON.stringify(data), targetOrigin);
62
+ }
63
+
64
+ // ### Utils ###
65
+
66
+ // extract protocol, domain and port from url
67
+ function getDomainFromUrl(url)
68
+ {
69
+ var arr = url.split("/");
70
+ return arr[0] + "//" + arr[2];
71
+ }
72
+
73
+
74
+ // Setup an event listener that calls receiveMessage() when the window
75
+ // receives a new MessageEvent.
76
+ if (window.addEventListener) { // W3C DOM
77
+ window.addEventListener('message', receiveMessage);
78
+ } else if (window.attachEvent) { // IE DOM
79
+ window.attachEvent('onmessage', receiveMessage);
80
+ }
81
+
82
+ // ### Receiving postMessages ###
83
+
84
+ function receiveMessage(e)
85
+ {
86
+
87
+ // Check to make sure that this message came from the correct domain.
88
+ if (e.origin !== targetOrigin) {
89
+ return;
90
+ }
91
+
92
+ var recMsg = JSON.parse(e.data);
93
+ if (recMsg["POST.VALIDATION"] == "NOK") {
94
+ $('button_hcd').toggle();
95
+ $('heidelpay-please-wait').toggle();
96
+ }
97
+
98
+ }
99
+
100
+ }
101
+ );
js/hcd/opcheckout.js CHANGED
@@ -1,962 +1,1043 @@
1
- /**
2
- * Magento
3
- *
4
- * NOTICE OF LICENSE
5
- *
6
- * This source file is subject to the Academic Free License (AFL 3.0)
7
- * that is bundled with this package in the file LICENSE_AFL.txt.
8
- * It is also available through the world-wide-web at this URL:
9
- * http://opensource.org/licenses/afl-3.0.php
10
- * If you did not receive a copy of the license and are unable to
11
- * obtain it through the world-wide-web, please send an email
12
- * to license@magento.com so we can send you a copy immediately.
13
- *
14
- * DISCLAIMER
15
- *
16
- * Do not edit or add to this file if you wish to upgrade Magento to newer
17
- * versions in the future. If you wish to customize Magento for your
18
- * needs please refer to http://www.magento.com for more information.
19
- *
20
- * @category design
21
- * @package base_default
22
- * @copyright Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
23
- * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
24
- */
25
- var Checkout = Class.create();
26
- Checkout.prototype = {
27
- initialize: function(accordion, urls){
28
- this.accordion = accordion;
29
- this.progressUrl = urls.progress;
30
- this.reviewUrl = urls.review;
31
- this.saveMethodUrl = urls.saveMethod;
32
- this.failureUrl = urls.failure;
33
- this.billingForm = false;
34
- this.shippingForm= false;
35
- this.syncBillingShipping = false;
36
- this.method = '';
37
- this.payment = '';
38
- this.loadWaiting = false;
39
- this.steps = ['login', 'billing', 'shipping', 'shipping_method', 'payment', 'review'];
40
- //We use billing as beginning step since progress bar tracks from billing
41
- this.currentStep = 'billing';
42
-
43
- this.accordion.sections.each(function(section) {
44
- Event.observe($(section).down('.step-title'), 'click', this._onSectionClick.bindAsEventListener(this));
45
- }.bind(this));
46
-
47
- this.accordion.disallowAccessToNextSections = true;
48
- },
49
-
50
- /**
51
- * Section header click handler
52
- *
53
- * @param event
54
- */
55
- _onSectionClick: function(event) {
56
- var section = $(Event.element(event).up().up());
57
- if (section.hasClassName('allow')) {
58
- Event.stop(event);
59
- this.gotoSection(section.readAttribute('id').replace('opc-', ''), false);
60
- return false;
61
- }
62
- },
63
-
64
- ajaxFailure: function(){
65
- location.href = this.failureUrl;
66
- },
67
-
68
- reloadProgressBlock: function(toStep) {
69
- this.reloadStep(toStep);
70
- if (this.syncBillingShipping) {
71
- this.syncBillingShipping = false;
72
- this.reloadStep('shipping');
73
- }
74
- },
75
-
76
- reloadStep: function(prevStep) {
77
- var updater = new Ajax.Updater(prevStep + '-progress-opcheckout', this.progressUrl, {
78
- method:'get',
79
- onFailure:this.ajaxFailure.bind(this),
80
- onComplete: function(){
81
- this.checkout.resetPreviousSteps();
82
- },
83
- parameters:prevStep ? { prevStep:prevStep } : null
84
- });
85
- },
86
-
87
- reloadReviewBlock: function(){
88
- var updater = new Ajax.Updater('checkout-review-load', this.reviewUrl, {method: 'get', onFailure: this.ajaxFailure.bind(this)});
89
- },
90
-
91
- _disableEnableAll: function(element, isDisabled) {
92
- var descendants = element.descendants();
93
- for (var k in descendants) {
94
- descendants[k].disabled = isDisabled;
95
- }
96
- element.disabled = isDisabled;
97
- },
98
-
99
- setLoadWaiting: function(step, keepDisabled) {
100
- if (step) {
101
- if (this.loadWaiting) {
102
- this.setLoadWaiting(false);
103
- }
104
- var container = $(step+'-buttons-container');
105
- container.addClassName('disabled');
106
- container.setStyle({opacity:.5});
107
- this._disableEnableAll(container, true);
108
- Element.show(step+'-please-wait');
109
- } else {
110
- if (this.loadWaiting) {
111
- var container = $(this.loadWaiting+'-buttons-container');
112
- var isDisabled = (keepDisabled ? true : false);
113
- if (!isDisabled) {
114
- container.removeClassName('disabled');
115
- container.setStyle({opacity:1});
116
- }
117
- this._disableEnableAll(container, isDisabled);
118
- Element.hide(this.loadWaiting+'-please-wait');
119
- }
120
- }
121
- this.loadWaiting = step;
122
- },
123
-
124
- gotoSection: function (section, reloadProgressBlock) {
125
-
126
- if (reloadProgressBlock) {
127
- this.reloadProgressBlock(this.currentStep);
128
- }
129
- this.currentStep = section;
130
- var sectionElement = $('opc-' + section);
131
- sectionElement.addClassName('allow');
132
- this.accordion.openSection('opc-' + section);
133
- if(!reloadProgressBlock) {
134
- this.resetPreviousSteps();
135
- }
136
- },
137
-
138
- resetPreviousSteps: function () {
139
- var stepIndex = this.steps.indexOf(this.currentStep);
140
-
141
- //Clear other steps if already populated through javascript
142
- for (var i = stepIndex; i < this.steps.length; i++) {
143
- var nextStep = this.steps[i];
144
- var progressDiv = nextStep + '-progress-opcheckout';
145
- if ($(progressDiv)) {
146
- //Remove the link
147
- $(progressDiv).select('.changelink').each(function (item) {
148
- item.remove();
149
- });
150
- $(progressDiv).select('dt').each(function (item) {
151
- item.removeClassName('complete');
152
- });
153
- //Remove the content
154
- $(progressDiv).select('dd.complete').each(function (item) {
155
- item.remove();
156
- });
157
- }
158
- }
159
- },
160
-
161
- changeSection: function (section) {
162
- var changeStep = section.replace('opc-', '');
163
- this.gotoSection(changeStep, false);
164
- },
165
-
166
- setMethod: function(){
167
- if ($('login:guest') && $('login:guest').checked) {
168
- this.method = 'guest';
169
- var request = new Ajax.Request(
170
- this.saveMethodUrl,
171
- {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'guest'}}
172
- );
173
- Element.hide('register-customer-password');
174
- this.gotoSection('billing', true);
175
- }
176
- else if($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
177
- this.method = 'register';
178
- var request = new Ajax.Request(
179
- this.saveMethodUrl,
180
- {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method:'register'}}
181
- );
182
- Element.show('register-customer-password');
183
- this.gotoSection('billing', true);
184
- }
185
- else{
186
- alert(Translator.translate('Please choose to register or to checkout as a guest').stripTags());
187
- return false;
188
- }
189
- document.body.fire('login:setMethod', {method : this.method});
190
- },
191
-
192
- setBilling: function() {
193
- if (($('billing:use_for_shipping_yes')) && ($('billing:use_for_shipping_yes').checked)) {
194
- shipping.syncWithBilling();
195
- $('opc-shipping').addClassName('allow');
196
- this.gotoSection('shipping_method', true);
197
- } else if (($('billing:use_for_shipping_no')) && ($('billing:use_for_shipping_no').checked)) {
198
- $('shipping:same_as_billing').checked = false;
199
- this.gotoSection('shipping', true);
200
- } else {
201
- $('shipping:same_as_billing').checked = true;
202
- this.gotoSection('shipping', true);
203
- }
204
-
205
- // this refreshes the checkout progress column
206
-
207
- // if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked){
208
- // shipping.syncWithBilling();
209
- // //this.setShipping();
210
- // //shipping.save();
211
- // $('opc-shipping').addClassName('allow');
212
- // this.gotoSection('shipping_method');
213
- // } else {
214
- // $('shipping:same_as_billing').checked = false;
215
- // this.gotoSection('shipping');
216
- // }
217
- // this.reloadProgressBlock();
218
- // //this.accordion.openNextSection(true);
219
- },
220
-
221
- setShipping: function() {
222
- //this.nextStep();
223
- this.gotoSection('shipping_method', true);
224
- //this.accordion.openNextSection(true);
225
- },
226
-
227
- setShippingMethod: function() {
228
- //this.nextStep();
229
- this.gotoSection('payment', true);
230
- //this.accordion.openNextSection(true);
231
- },
232
-
233
- setPayment: function() {
234
- //this.nextStep();
235
- this.gotoSection('review', true);
236
- //this.accordion.openNextSection(true);
237
- },
238
-
239
- setReview: function() {
240
- this.reloadProgressBlock();
241
- //this.nextStep();
242
- //this.accordion.openNextSection(true);
243
- },
244
-
245
- back: function(){
246
- if (this.loadWaiting) return;
247
- //Navigate back to the previous available step
248
- var stepIndex = this.steps.indexOf(this.currentStep);
249
- var section = this.steps[--stepIndex];
250
- var sectionElement = $('opc-' + section);
251
-
252
- //Traverse back to find the available section. Ex Virtual product does not have shipping section
253
- while (sectionElement === null && stepIndex > 0) {
254
- --stepIndex;
255
- section = this.steps[stepIndex];
256
- sectionElement = $('opc-' + section);
257
- }
258
- this.changeSection('opc-' + section);
259
- },
260
-
261
- setStepResponse: function(response){
262
- if (response.update_section) {
263
- $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
264
- }
265
- if (response.allow_sections) {
266
- response.allow_sections.each(function(e){
267
- $('opc-'+e).addClassName('allow');
268
- });
269
- }
270
-
271
- if(response.duplicateBillingInfo)
272
- {
273
- this.syncBillingShipping = true;
274
- shipping.setSameAsBilling(true);
275
- }
276
-
277
- if (response.goto_section) {
278
- this.gotoSection(response.goto_section, true);
279
- return true;
280
- }
281
- if (response.redirect) {
282
- location.href = response.redirect;
283
- return true;
284
- }
285
- return false;
286
- }
287
- }
288
-
289
- // billing
290
- var Billing = Class.create();
291
- Billing.prototype = {
292
- initialize: function(form, addressUrl, saveUrl){
293
- this.form = form;
294
- if ($(this.form)) {
295
- $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
296
- }
297
- this.addressUrl = addressUrl;
298
- this.saveUrl = saveUrl;
299
- this.onAddressLoad = this.fillForm.bindAsEventListener(this);
300
- this.onSave = this.nextStep.bindAsEventListener(this);
301
- this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
302
- },
303
-
304
- setAddress: function(addressId){
305
- if (addressId) {
306
- request = new Ajax.Request(
307
- this.addressUrl+addressId,
308
- {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)}
309
- );
310
- }
311
- else {
312
- this.fillForm(false);
313
- }
314
- },
315
-
316
- newAddress: function(isNew){
317
- if (isNew) {
318
- this.resetSelectedAddress();
319
- Element.show('billing-new-address-form');
320
- } else {
321
- Element.hide('billing-new-address-form');
322
- }
323
- },
324
-
325
- resetSelectedAddress: function(){
326
- var selectElement = $('billing-address-select')
327
- if (selectElement) {
328
- selectElement.value='';
329
- }
330
- },
331
-
332
- fillForm: function(transport){
333
- var elementValues = {};
334
- if (transport && transport.responseText){
335
- try{
336
- elementValues = eval('(' + transport.responseText + ')');
337
- }
338
- catch (e) {
339
- elementValues = {};
340
- }
341
- }
342
- else{
343
- this.resetSelectedAddress();
344
- }
345
- arrElements = Form.getElements(this.form);
346
- for (var elemIndex in arrElements) {
347
- if (arrElements[elemIndex].id) {
348
- var fieldName = arrElements[elemIndex].id.replace(/^billing:/, '');
349
- arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : '';
350
- if (fieldName == 'country_id' && billingForm){
351
- billingForm.elementChildLoad(arrElements[elemIndex]);
352
- }
353
- }
354
- }
355
- },
356
-
357
- setUseForShipping: function(flag) {
358
- $('shipping:same_as_billing').checked = flag;
359
- },
360
-
361
- save: function(){
362
- if (checkout.loadWaiting!=false) return;
363
-
364
- var validator = new Validation(this.form);
365
- if (validator.validate()) {
366
- checkout.setLoadWaiting('billing');
367
-
368
- // if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked) {
369
- // $('billing:use_for_shipping').value=1;
370
- // }
371
-
372
- var request = new Ajax.Request(
373
- this.saveUrl,
374
- {
375
- method: 'post',
376
- onComplete: this.onComplete,
377
- onSuccess: this.onSave,
378
- onFailure: checkout.ajaxFailure.bind(checkout),
379
- parameters: Form.serialize(this.form)
380
- }
381
- );
382
- }
383
- },
384
-
385
- resetLoadWaiting: function(transport){
386
- checkout.setLoadWaiting(false);
387
- document.body.fire('billing-request:completed', {transport: transport});
388
- },
389
-
390
- /**
391
- This method recieves the AJAX response on success.
392
- There are 3 options: error, redirect or html with shipping options.
393
- */
394
- nextStep: function(transport){
395
- if (transport && transport.responseText){
396
- try{
397
- response = eval('(' + transport.responseText + ')');
398
- }
399
- catch (e) {
400
- response = {};
401
- }
402
- }
403
-
404
- if (response.error){
405
- if ((typeof response.message) == 'string') {
406
- alert(response.message);
407
- } else {
408
- if (window.billingRegionUpdater) {
409
- billingRegionUpdater.update();
410
- }
411
-
412
- alert(response.message.join("\n"));
413
- }
414
-
415
- return false;
416
- }
417
-
418
- checkout.setStepResponse(response);
419
- payment.initWhatIsCvvListeners();
420
- // DELETE
421
- //alert('error: ' + response.error + ' / redirect: ' + response.redirect + ' / shipping_methods_html: ' + response.shipping_methods_html);
422
- // This moves the accordion panels of one page checkout and updates the checkout progress
423
- //checkout.setBilling();
424
- }
425
- }
426
-
427
- // shipping
428
- var Shipping = Class.create();
429
- Shipping.prototype = {
430
- initialize: function(form, addressUrl, saveUrl, methodsUrl){
431
- this.form = form;
432
- if ($(this.form)) {
433
- $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
434
- }
435
- this.addressUrl = addressUrl;
436
- this.saveUrl = saveUrl;
437
- this.methodsUrl = methodsUrl;
438
- this.onAddressLoad = this.fillForm.bindAsEventListener(this);
439
- this.onSave = this.nextStep.bindAsEventListener(this);
440
- this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
441
- },
442
-
443
- setAddress: function(addressId){
444
- if (addressId) {
445
- request = new Ajax.Request(
446
- this.addressUrl+addressId,
447
- {method:'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)}
448
- );
449
- }
450
- else {
451
- this.fillForm(false);
452
- }
453
- },
454
-
455
- newAddress: function(isNew){
456
- if (isNew) {
457
- this.resetSelectedAddress();
458
- Element.show('shipping-new-address-form');
459
- } else {
460
- Element.hide('shipping-new-address-form');
461
- }
462
- shipping.setSameAsBilling(false);
463
- },
464
-
465
- resetSelectedAddress: function(){
466
- var selectElement = $('shipping-address-select')
467
- if (selectElement) {
468
- selectElement.value='';
469
- }
470
- },
471
-
472
- fillForm: function(transport){
473
- var elementValues = {};
474
- if (transport && transport.responseText){
475
- try{
476
- elementValues = eval('(' + transport.responseText + ')');
477
- }
478
- catch (e) {
479
- elementValues = {};
480
- }
481
- }
482
- else{
483
- this.resetSelectedAddress();
484
- }
485
- arrElements = Form.getElements(this.form);
486
- for (var elemIndex in arrElements) {
487
- if (arrElements[elemIndex].id) {
488
- var fieldName = arrElements[elemIndex].id.replace(/^shipping:/, '');
489
- arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : '';
490
- if (fieldName == 'country_id' && shippingForm){
491
- shippingForm.elementChildLoad(arrElements[elemIndex]);
492
- }
493
- }
494
- }
495
- },
496
-
497
- setSameAsBilling: function(flag) {
498
- $('shipping:same_as_billing').checked = flag;
499
- // #5599. Also it hangs up, if the flag is not false
500
- // $('billing:use_for_shipping_yes').checked = flag;
501
- if (flag) {
502
- this.syncWithBilling();
503
- }
504
- },
505
-
506
- syncWithBilling: function () {
507
- $('billing-address-select') && this.newAddress(!$('billing-address-select').value);
508
- $('shipping:same_as_billing').checked = true;
509
- if (!$('billing-address-select') || !$('billing-address-select').value) {
510
- arrElements = Form.getElements(this.form);
511
- for (var elemIndex in arrElements) {
512
- if (arrElements[elemIndex].id) {
513
- var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:'));
514
- if (sourceField){
515
- arrElements[elemIndex].value = sourceField.value;
516
- }
517
- }
518
- }
519
- //$('shipping:country_id').value = $('billing:country_id').value;
520
- shippingRegionUpdater.update();
521
- $('shipping:region_id').value = $('billing:region_id').value;
522
- $('shipping:region').value = $('billing:region').value;
523
- //shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this));
524
- } else {
525
- $('shipping-address-select').value = $('billing-address-select').value;
526
- }
527
- },
528
-
529
- setRegionValue: function(){
530
- $('shipping:region').value = $('billing:region').value;
531
- },
532
-
533
- save: function(){
534
- if (checkout.loadWaiting!=false) return;
535
- var validator = new Validation(this.form);
536
- if (validator.validate()) {
537
- checkout.setLoadWaiting('shipping');
538
- var request = new Ajax.Request(
539
- this.saveUrl,
540
- {
541
- method:'post',
542
- onComplete: this.onComplete,
543
- onSuccess: this.onSave,
544
- onFailure: checkout.ajaxFailure.bind(checkout),
545
- parameters: Form.serialize(this.form)
546
- }
547
- );
548
- }
549
- },
550
-
551
- resetLoadWaiting: function(transport){
552
- checkout.setLoadWaiting(false);
553
- },
554
-
555
- nextStep: function(transport){
556
- if (transport && transport.responseText){
557
- try{
558
- response = eval('(' + transport.responseText + ')');
559
- }
560
- catch (e) {
561
- response = {};
562
- }
563
- }
564
- if (response.error){
565
- if ((typeof response.message) == 'string') {
566
- alert(response.message);
567
- } else {
568
- if (window.shippingRegionUpdater) {
569
- shippingRegionUpdater.update();
570
- }
571
- alert(response.message.join("\n"));
572
- }
573
-
574
- return false;
575
- }
576
-
577
- checkout.setStepResponse(response);
578
-
579
- /*
580
- var updater = new Ajax.Updater(
581
- 'checkout-shipping-method-load',
582
- this.methodsUrl,
583
- {method:'get', onSuccess: checkout.setShipping.bind(checkout)}
584
- );
585
- */
586
- //checkout.setShipping();
587
- }
588
- }
589
-
590
- // shipping method
591
- var ShippingMethod = Class.create();
592
- ShippingMethod.prototype = {
593
- initialize: function(form, saveUrl){
594
- this.form = form;
595
- if ($(this.form)) {
596
- $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
597
- }
598
- this.saveUrl = saveUrl;
599
- this.validator = new Validation(this.form);
600
- this.onSave = this.nextStep.bindAsEventListener(this);
601
- this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
602
- },
603
-
604
- validate: function() {
605
- var methods = document.getElementsByName('shipping_method');
606
- if (methods.length==0) {
607
- alert(Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.').stripTags());
608
- return false;
609
- }
610
-
611
- if(!this.validator.validate()) {
612
- return false;
613
- }
614
-
615
- for (var i=0; i<methods.length; i++) {
616
- if (methods[i].checked) {
617
- return true;
618
- }
619
- }
620
- alert(Translator.translate('Please specify shipping method.').stripTags());
621
- return false;
622
- },
623
-
624
- save: function(){
625
-
626
- if (checkout.loadWaiting!=false) return;
627
- if (this.validate()) {
628
- checkout.setLoadWaiting('shipping-method');
629
- var request = new Ajax.Request(
630
- this.saveUrl,
631
- {
632
- method:'post',
633
- onComplete: this.onComplete,
634
- onSuccess: this.onSave,
635
- onFailure: checkout.ajaxFailure.bind(checkout),
636
- parameters: Form.serialize(this.form)
637
- }
638
- );
639
- }
640
- },
641
-
642
- resetLoadWaiting: function(transport){
643
- checkout.setLoadWaiting(false);
644
- },
645
-
646
- nextStep: function(transport){
647
- if (transport && transport.responseText){
648
- try{
649
- response = eval('(' + transport.responseText + ')');
650
- }
651
- catch (e) {
652
- response = {};
653
- }
654
- }
655
-
656
- if (response.error) {
657
- alert(response.message);
658
- return false;
659
- }
660
-
661
- if (response.update_section) {
662
- $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
663
- }
664
-
665
- payment.initWhatIsCvvListeners();
666
-
667
- if (response.goto_section) {
668
- checkout.gotoSection(response.goto_section, true);
669
- checkout.reloadProgressBlock();
670
- return;
671
- }
672
-
673
- if (response.payment_methods_html) {
674
- $('checkout-payment-method-load').update(response.payment_methods_html);
675
- }
676
-
677
- checkout.setShippingMethod();
678
- }
679
- }
680
-
681
-
682
- // payment
683
- var Payment = Class.create();
684
- Payment.prototype = {
685
- beforeInitFunc:$H({}),
686
- afterInitFunc:$H({}),
687
- beforeValidateFunc:$H({}),
688
- afterValidateFunc:$H({}),
689
- initialize: function(form, saveUrl){
690
- this.form = form;
691
- this.saveUrl = saveUrl;
692
- this.onSave = this.nextStep.bindAsEventListener(this);
693
- this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
694
- },
695
-
696
- addBeforeInitFunction : function(code, func) {
697
- this.beforeInitFunc.set(code, func);
698
- },
699
-
700
- beforeInit : function() {
701
- (this.beforeInitFunc).each(function(init){
702
- (init.value)();;
703
- });
704
- },
705
-
706
- init : function () {
707
- this.beforeInit();
708
- var elements = Form.getElements(this.form);
709
- if ($(this.form)) {
710
- $(this.form).observe('submit', function(event){this.save();Event.stop(event);}.bind(this));
711
- }
712
- var method = null;
713
- for (var i=0; i<elements.length; i++) {
714
- if (elements[i].name=='payment[method]') {
715
- if (elements[i].checked) {
716
- method = elements[i].value;
717
- }
718
- } else {
719
- elements[i].disabled = true;
720
- }
721
- elements[i].setAttribute('autocomplete','off');
722
- }
723
- if (method) this.switchMethod(method);
724
- this.afterInit();
725
- },
726
-
727
- addAfterInitFunction : function(code, func) {
728
- this.afterInitFunc.set(code, func);
729
- },
730
-
731
- afterInit : function() {
732
- (this.afterInitFunc).each(function(init){
733
- (init.value)();
734
- });
735
- },
736
-
737
- switchMethod: function(method){
738
- if (this.currentMethod && $('payment_form_'+this.currentMethod)) {
739
- this.changeVisible(this.currentMethod, true);
740
- $('payment_form_'+this.currentMethod).fire('payment-method:switched-off', {method_code : this.currentMethod});
741
- }
742
- if ($('payment_form_'+method)){
743
- this.changeVisible(method, false);
744
- $('payment_form_'+method).fire('payment-method:switched', {method_code : method});
745
- } else {
746
- //Event fix for payment methods without form like "Check / Money order"
747
- document.body.fire('payment-method:switched', {method_code : method});
748
- }
749
- if (method) {
750
- this.lastUsedMethod = method;
751
- }
752
- this.currentMethod = method;
753
- },
754
-
755
- changeVisible: function(method, mode) {
756
- var block = 'payment_form_' + method;
757
- [block + '_before', block, block + '_after'].each(function(el) {
758
- element = $(el);
759
- if (element) {
760
- element.style.display = (mode) ? 'none' : '';
761
- element.select('input', 'select', 'textarea', 'button').each(function(field) {
762
- field.disabled = mode;
763
- });
764
- }
765
- });
766
- },
767
-
768
- addBeforeValidateFunction : function(code, func) {
769
- this.beforeValidateFunc.set(code, func);
770
- },
771
-
772
- beforeValidate : function() {
773
- var validateResult = true;
774
- var hasValidation = false;
775
- (this.beforeValidateFunc).each(function(validate){
776
- hasValidation = true;
777
- if ((validate.value)() == false) {
778
- validateResult = false;
779
- }
780
- }.bind(this));
781
- if (!hasValidation) {
782
- validateResult = false;
783
- }
784
- return validateResult;
785
- },
786
-
787
- validate: function() {
788
- var result = this.beforeValidate();
789
- if (result) {
790
- return true;
791
- }
792
- var methods = document.getElementsByName('payment[method]');
793
- if (methods.length==0) {
794
- alert(Translator.translate('Your order cannot be completed at this time as there is no payment methods available for it.').stripTags());
795
- return false;
796
- }
797
- for (var i=0; i<methods.length; i++) {
798
- if (methods[i].checked) {
799
- return true;
800
- }
801
- }
802
- result = this.afterValidate();
803
- if (result) {
804
- return true;
805
- }
806
- alert(Translator.translate('Please specify payment method.').stripTags());
807
- return false;
808
- },
809
-
810
- addAfterValidateFunction : function(code, func) {
811
- this.afterValidateFunc.set(code, func);
812
- },
813
-
814
- afterValidate : function() {
815
- var validateResult = true;
816
- var hasValidation = false;
817
- (this.afterValidateFunc).each(function(validate){
818
- hasValidation = true;
819
- if ((validate.value)() == false) {
820
- validateResult = false;
821
- }
822
- }.bind(this));
823
- if (!hasValidation) {
824
- validateResult = false;
825
- }
826
- return validateResult;
827
- },
828
-
829
- save: function(){
830
- if (checkout.loadWaiting!=false) return;
831
- var validator = new Validation(this.form);
832
- if (this.validate() && validator.validate()) {
833
- checkout.setLoadWaiting('payment');
834
- var request = new Ajax.Request(
835
- this.saveUrl,
836
- {
837
- method:'post',
838
- onComplete: this.onComplete,
839
- onSuccess: this.onSave,
840
- onFailure: checkout.ajaxFailure.bind(checkout),
841
- parameters: Form.serialize(this.form)
842
- }
843
- );
844
- }
845
- },
846
-
847
- resetLoadWaiting: function(){
848
- checkout.setLoadWaiting(false);
849
- },
850
-
851
- nextStep: function(transport){
852
- if (transport && transport.responseText){
853
- try{
854
- response = eval('(' + transport.responseText + ')');
855
- }
856
- catch (e) {
857
- response = {};
858
- }
859
- }
860
- /*
861
- * if there is an error in payment, need to show error message
862
- */
863
- if (response.error) {
864
- if (response.fields) {
865
- var fields = response.fields.split(',');
866
- for (var i=0;i<fields.length;i++) {
867
- var field = null;
868
- if (field = $(fields[i])) {
869
- Validation.ajaxError(field, response.error);
870
- }
871
- }
872
- return;
873
- }
874
- alert(response.error);
875
- return;
876
- }
877
-
878
- checkout.setStepResponse(response);
879
-
880
- //checkout.setPayment();
881
- },
882
-
883
- initWhatIsCvvListeners: function(){
884
- $$('.cvv-what-is-this').each(function(element){
885
- Event.observe(element, 'click', toggleToolTip);
886
- });
887
- }
888
- }
889
-
890
- var Review = Class.create();
891
- Review.prototype = {
892
- initialize: function(saveUrl, successUrl, agreementsForm){
893
- this.saveUrl = saveUrl;
894
- this.successUrl = successUrl;
895
- this.agreementsForm = agreementsForm;
896
- this.onSave = this.nextStep.bindAsEventListener(this);
897
- this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
898
- },
899
-
900
- save: function(){
901
- if (checkout.loadWaiting!=false) return;
902
- checkout.setLoadWaiting('review');
903
- var params = Form.serialize(payment.form);
904
- if (this.agreementsForm) {
905
- params += '&'+Form.serialize(this.agreementsForm);
906
- }
907
- params.save = true;
908
- var request = new Ajax.Request(
909
- this.saveUrl,
910
- {
911
- method:'post',
912
- parameters:params,
913
- onComplete: this.onComplete,
914
- onSuccess: this.onSave,
915
- onFailure: checkout.ajaxFailure.bind(checkout)
916
- }
917
- );
918
- },
919
-
920
- resetLoadWaiting: function(transport){
921
- checkout.setLoadWaiting(false, this.isSuccess);
922
- },
923
-
924
- nextStep: function(transport){
925
- if (transport && transport.responseText) {
926
- try{
927
- response = eval('(' + transport.responseText + ')');
928
- }
929
- catch (e) {
930
- response = {};
931
- }
932
- if (response.redirect) {
933
- this.isSuccess = true;
934
- location.href = response.redirect;
935
- return;
936
- }
937
- if (response.success) {
938
- this.isSuccess = true;
939
- window.location=this.successUrl;
940
- }
941
- else{
942
- var msg = response.error_messages;
943
- if (typeof(msg)=='object') {
944
- msg = msg.join("\n");
945
- }
946
- if (msg) {
947
- alert(msg);
948
- }
949
- }
950
-
951
- if (response.update_section) {
952
- $('checkout-'+response.update_section.name+'-load').update(response.update_section.html);
953
- }
954
-
955
- if (response.goto_section) {
956
- checkout.gotoSection(response.goto_section, true);
957
- }
958
- }
959
- },
960
-
961
- isSuccess: false
962
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Opcheckout replacement for masterpass checkout
3
+ *
4
+ * @license Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
5
+ * @copyright Copyright © 2016-present Heidelberger Payment GmbH. All rights reserved.
6
+ *
7
+ * @link https://dev.heidelpay.de/magento
8
+ *
9
+ * @author Jens Richter
10
+ *
11
+ * @package Heidelpay
12
+ * @subpackage Magento
13
+ * @category Magento
14
+ */
15
+ var Checkout = Class.create();
16
+ Checkout.prototype = {
17
+ initialize: function (accordion, urls) {
18
+ this.accordion = accordion;
19
+ this.progressUrl = urls.progress;
20
+ this.reviewUrl = urls.review;
21
+ this.saveMethodUrl = urls.saveMethod;
22
+ this.failureUrl = urls.failure;
23
+ this.billingForm = false;
24
+ this.shippingForm = false;
25
+ this.syncBillingShipping = false;
26
+ this.method = '';
27
+ this.payment = '';
28
+ this.loadWaiting = false;
29
+ this.steps = ['login', 'billing', 'shipping', 'shipping_method', 'payment', 'review'];
30
+ //We use billing as beginning step since progress bar tracks from billing
31
+ this.currentStep = 'billing';
32
+
33
+ this.accordion.sections.each(
34
+ function (section) {
35
+ Event.observe($(section).down('.step-title'), 'click', this._onSectionClick.bindAsEventListener(this));
36
+ }.bind(this)
37
+ );
38
+
39
+ this.accordion.disallowAccessToNextSections = true;
40
+ },
41
+
42
+ /**
43
+ * Section header click handler
44
+ *
45
+ * @param event
46
+ */
47
+ _onSectionClick: function (event) {
48
+ var section = $(Event.element(event).up().up());
49
+ if (section.hasClassName('allow')) {
50
+ Event.stop(event);
51
+ this.gotoSection(section.readAttribute('id').replace('opc-', ''), false);
52
+ return false;
53
+ }
54
+ },
55
+
56
+ ajaxFailure: function () {
57
+ location.href = this.failureUrl;
58
+ },
59
+
60
+ reloadProgressBlock: function (toStep) {
61
+ this.reloadStep(toStep);
62
+ if (this.syncBillingShipping) {
63
+ this.syncBillingShipping = false;
64
+ this.reloadStep('shipping');
65
+ }
66
+ },
67
+
68
+ reloadStep: function (prevStep) {
69
+ var updater = new Ajax.Updater(
70
+ prevStep + '-progress-opcheckout', this.progressUrl, {
71
+ method: 'get',
72
+ onFailure: this.ajaxFailure.bind(this),
73
+ onComplete: function () {
74
+ this.checkout.resetPreviousSteps();
75
+ },
76
+ parameters: prevStep ? {prevStep: prevStep} : null
77
+ }
78
+ );
79
+ },
80
+
81
+ reloadReviewBlock: function () {
82
+ var updater = new Ajax.Updater(
83
+ 'checkout-review-load', this.reviewUrl, {
84
+ method: 'get',
85
+ onFailure: this.ajaxFailure.bind(this)
86
+ }
87
+ );
88
+ },
89
+
90
+ _disableEnableAll: function (element, isDisabled) {
91
+ var descendants = element.descendants();
92
+ for (var k in descendants) {
93
+ descendants[k].disabled = isDisabled;
94
+ }
95
+
96
+ element.disabled = isDisabled;
97
+ },
98
+
99
+ setLoadWaiting: function (step, keepDisabled) {
100
+ if (step) {
101
+ if (this.loadWaiting) {
102
+ this.setLoadWaiting(false);
103
+ }
104
+
105
+ var container = $(step + '-buttons-container');
106
+ container.addClassName('disabled');
107
+ container.setStyle({opacity: .5});
108
+ this._disableEnableAll(container, true);
109
+ Element.show(step + '-please-wait');
110
+ } else {
111
+ if (this.loadWaiting) {
112
+ var container = $(this.loadWaiting + '-buttons-container');
113
+ var isDisabled = (keepDisabled ? true : false);
114
+ if (!isDisabled) {
115
+ container.removeClassName('disabled');
116
+ container.setStyle({opacity: 1});
117
+ }
118
+
119
+ this._disableEnableAll(container, isDisabled);
120
+ Element.hide(this.loadWaiting + '-please-wait');
121
+ }
122
+ }
123
+
124
+ this.loadWaiting = step;
125
+ },
126
+
127
+ gotoSection: function (section, reloadProgressBlock) {
128
+
129
+ if (reloadProgressBlock) {
130
+ this.reloadProgressBlock(this.currentStep);
131
+ }
132
+
133
+ this.currentStep = section;
134
+ var sectionElement = $('opc-' + section);
135
+ sectionElement.addClassName('allow');
136
+ this.accordion.openSection('opc-' + section);
137
+ if (!reloadProgressBlock) {
138
+ this.resetPreviousSteps();
139
+ }
140
+ },
141
+
142
+ resetPreviousSteps: function () {
143
+ var stepIndex = this.steps.indexOf(this.currentStep);
144
+
145
+ //Clear other steps if already populated through javascript
146
+ for (var i = stepIndex; i < this.steps.length; i++) {
147
+ var nextStep = this.steps[i];
148
+ var progressDiv = nextStep + '-progress-opcheckout';
149
+ if ($(progressDiv)) {
150
+ //Remove the link
151
+ $(progressDiv).select('.changelink').each(
152
+ function (item) {
153
+ item.remove();
154
+ }
155
+ );
156
+ $(progressDiv).select('dt').each(
157
+ function (item) {
158
+ item.removeClassName('complete');
159
+ }
160
+ );
161
+ //Remove the content
162
+ $(progressDiv).select('dd.complete').each(
163
+ function (item) {
164
+ item.remove();
165
+ }
166
+ );
167
+ }
168
+ }
169
+ },
170
+
171
+ changeSection: function (section) {
172
+ var changeStep = section.replace('opc-', '');
173
+ this.gotoSection(changeStep, false);
174
+ },
175
+
176
+ setMethod: function () {
177
+ if ($('login:guest') && $('login:guest').checked) {
178
+ this.method = 'guest';
179
+ var request = new Ajax.Request(
180
+ this.saveMethodUrl,
181
+ {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method: 'guest'}}
182
+ );
183
+ Element.hide('register-customer-password');
184
+ this.gotoSection('billing', true);
185
+ }
186
+ else if ($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
187
+ this.method = 'register';
188
+ var request = new Ajax.Request(
189
+ this.saveMethodUrl,
190
+ {method: 'post', onFailure: this.ajaxFailure.bind(this), parameters: {method: 'register'}}
191
+ );
192
+ Element.show('register-customer-password');
193
+ this.gotoSection('billing', true);
194
+ }
195
+ else {
196
+ alert(Translator.translate('Please choose to register or to checkout as a guest').stripTags());
197
+ return false;
198
+ }
199
+
200
+ document.body.fire('login:setMethod', {method: this.method});
201
+ },
202
+
203
+ setBilling: function () {
204
+ if (($('billing:use_for_shipping_yes')) && ($('billing:use_for_shipping_yes').checked)) {
205
+ shipping.syncWithBilling();
206
+ $('opc-shipping').addClassName('allow');
207
+ this.gotoSection('shipping_method', true);
208
+ } else if (($('billing:use_for_shipping_no')) && ($('billing:use_for_shipping_no').checked)) {
209
+ $('shipping:same_as_billing').checked = false;
210
+ this.gotoSection('shipping', true);
211
+ } else {
212
+ $('shipping:same_as_billing').checked = true;
213
+ this.gotoSection('shipping', true);
214
+ }
215
+
216
+ // this refreshes the checkout progress column
217
+
218
+ // if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked){
219
+ // shipping.syncWithBilling();
220
+ // //this.setShipping();
221
+ // //shipping.save();
222
+ // $('opc-shipping').addClassName('allow');
223
+ // this.gotoSection('shipping_method');
224
+ // } else {
225
+ // $('shipping:same_as_billing').checked = false;
226
+ // this.gotoSection('shipping');
227
+ // }
228
+ // this.reloadProgressBlock();
229
+ // //this.accordion.openNextSection(true);
230
+ },
231
+
232
+ setShipping: function () {
233
+ //this.nextStep();
234
+ this.gotoSection('shipping_method', true);
235
+ //this.accordion.openNextSection(true);
236
+ },
237
+
238
+ setShippingMethod: function () {
239
+ //this.nextStep();
240
+ this.gotoSection('payment', true);
241
+ //this.accordion.openNextSection(true);
242
+ },
243
+
244
+ setPayment: function () {
245
+ //this.nextStep();
246
+ this.gotoSection('review', true);
247
+ //this.accordion.openNextSection(true);
248
+ },
249
+
250
+ setReview: function () {
251
+ this.reloadProgressBlock();
252
+ //this.nextStep();
253
+ //this.accordion.openNextSection(true);
254
+ },
255
+
256
+ back: function () {
257
+ if (this.loadWaiting) return;
258
+ //Navigate back to the previous available step
259
+ var stepIndex = this.steps.indexOf(this.currentStep);
260
+ var section = this.steps[--stepIndex];
261
+ var sectionElement = $('opc-' + section);
262
+
263
+ //Traverse back to find the available section. Ex Virtual product does not have shipping section
264
+ while (sectionElement === null && stepIndex > 0) {
265
+ --stepIndex;
266
+ section = this.steps[stepIndex];
267
+ sectionElement = $('opc-' + section);
268
+ }
269
+
270
+ this.changeSection('opc-' + section);
271
+ },
272
+
273
+ setStepResponse: function (response) {
274
+ if (response.update_section) {
275
+ $('checkout-' + response.update_section.name + '-load').update(response.update_section.html);
276
+ }
277
+
278
+ if (response.allow_sections) {
279
+ response.allow_sections.each(
280
+ function (e) {
281
+ $('opc-' + e).addClassName('allow');
282
+ }
283
+ );
284
+ }
285
+
286
+ if (response.duplicateBillingInfo) {
287
+ this.syncBillingShipping = true;
288
+ shipping.setSameAsBilling(true);
289
+ }
290
+
291
+ if (response.goto_section) {
292
+ this.gotoSection(response.goto_section, true);
293
+ return true;
294
+ }
295
+
296
+ if (response.redirect) {
297
+ location.href = response.redirect;
298
+ return true;
299
+ }
300
+
301
+ return false;
302
+ }
303
+ }
304
+
305
+ // billing
306
+ var Billing = Class.create();
307
+ Billing.prototype = {
308
+ initialize: function (form, addressUrl, saveUrl) {
309
+ this.form = form;
310
+ if ($(this.form)) {
311
+ $(this.form).observe(
312
+ 'submit', function (event) {
313
+ this.save();
314
+ Event.stop(event);
315
+ }.bind(this)
316
+ );
317
+ }
318
+
319
+ this.addressUrl = addressUrl;
320
+ this.saveUrl = saveUrl;
321
+ this.onAddressLoad = this.fillForm.bindAsEventListener(this);
322
+ this.onSave = this.nextStep.bindAsEventListener(this);
323
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
324
+ },
325
+
326
+ setAddress: function (addressId) {
327
+ if (addressId) {
328
+ request = new Ajax.Request(
329
+ this.addressUrl + addressId,
330
+ {method: 'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)}
331
+ );
332
+ }
333
+ else {
334
+ this.fillForm(false);
335
+ }
336
+ },
337
+
338
+ newAddress: function (isNew) {
339
+ if (isNew) {
340
+ this.resetSelectedAddress();
341
+ Element.show('billing-new-address-form');
342
+ } else {
343
+ Element.hide('billing-new-address-form');
344
+ }
345
+ },
346
+
347
+ resetSelectedAddress: function () {
348
+ var selectElement = $('billing-address-select')
349
+ if (selectElement) {
350
+ selectElement.value = '';
351
+ }
352
+ },
353
+
354
+ fillForm: function (transport) {
355
+ var elementValues = {};
356
+ if (transport && transport.responseText) {
357
+ try {
358
+ elementValues = eval('(' + transport.responseText + ')');
359
+ }
360
+ catch (e) {
361
+ elementValues = {};
362
+ }
363
+ }
364
+ else {
365
+ this.resetSelectedAddress();
366
+ }
367
+
368
+ arrElements = Form.getElements(this.form);
369
+ for (var elemIndex in arrElements) {
370
+ if (arrElements[elemIndex].id) {
371
+ var fieldName = arrElements[elemIndex].id.replace(/^billing:/, '');
372
+ arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : '';
373
+ if (fieldName == 'country_id' && billingForm) {
374
+ billingForm.elementChildLoad(arrElements[elemIndex]);
375
+ }
376
+ }
377
+ }
378
+ },
379
+
380
+ setUseForShipping: function (flag) {
381
+ $('shipping:same_as_billing').checked = flag;
382
+ },
383
+
384
+ save: function () {
385
+ if (checkout.loadWaiting != false) return;
386
+
387
+ var validator = new Validation(this.form);
388
+ if (validator.validate()) {
389
+ checkout.setLoadWaiting('billing');
390
+
391
+ // if ($('billing:use_for_shipping') && $('billing:use_for_shipping').checked) {
392
+ // $('billing:use_for_shipping').value=1;
393
+ // }
394
+
395
+ var request = new Ajax.Request(
396
+ this.saveUrl,
397
+ {
398
+ method: 'post',
399
+ onComplete: this.onComplete,
400
+ onSuccess: this.onSave,
401
+ onFailure: checkout.ajaxFailure.bind(checkout),
402
+ parameters: Form.serialize(this.form)
403
+ }
404
+ );
405
+ }
406
+ },
407
+
408
+ resetLoadWaiting: function (transport) {
409
+ checkout.setLoadWaiting(false);
410
+ document.body.fire('billing-request:completed', {transport: transport});
411
+ },
412
+
413
+ /**
414
+ This method recieves the AJAX response on success.
415
+ There are 3 options: error, redirect or html with shipping options.
416
+ */
417
+ nextStep: function (transport) {
418
+ if (transport && transport.responseText) {
419
+ try {
420
+ response = eval('(' + transport.responseText + ')');
421
+ }
422
+ catch (e) {
423
+ response = {};
424
+ }
425
+ }
426
+
427
+ if (response.error) {
428
+ if ((typeof response.message) == 'string') {
429
+ alert(response.message);
430
+ } else {
431
+ if (window.billingRegionUpdater) {
432
+ billingRegionUpdater.update();
433
+ }
434
+
435
+ alert(response.message.join("\n"));
436
+ }
437
+
438
+ return false;
439
+ }
440
+
441
+ checkout.setStepResponse(response);
442
+ payment.initWhatIsCvvListeners();
443
+ // DELETE
444
+ //alert('error: ' + response.error + ' / redirect: ' + response.redirect + ' / shipping_methods_html: ' + response.shipping_methods_html);
445
+ // This moves the accordion panels of one page checkout and updates the checkout progress
446
+ //checkout.setBilling();
447
+ }
448
+ }
449
+
450
+ // shipping
451
+ var Shipping = Class.create();
452
+ Shipping.prototype = {
453
+ initialize: function (form, addressUrl, saveUrl, methodsUrl) {
454
+ this.form = form;
455
+ if ($(this.form)) {
456
+ $(this.form).observe(
457
+ 'submit', function (event) {
458
+ this.save();
459
+ Event.stop(event);
460
+ }.bind(this)
461
+ );
462
+ }
463
+
464
+ this.addressUrl = addressUrl;
465
+ this.saveUrl = saveUrl;
466
+ this.methodsUrl = methodsUrl;
467
+ this.onAddressLoad = this.fillForm.bindAsEventListener(this);
468
+ this.onSave = this.nextStep.bindAsEventListener(this);
469
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
470
+ },
471
+
472
+ setAddress: function (addressId) {
473
+ if (addressId) {
474
+ request = new Ajax.Request(
475
+ this.addressUrl + addressId,
476
+ {method: 'get', onSuccess: this.onAddressLoad, onFailure: checkout.ajaxFailure.bind(checkout)}
477
+ );
478
+ }
479
+ else {
480
+ this.fillForm(false);
481
+ }
482
+ },
483
+
484
+ newAddress: function (isNew) {
485
+ if (isNew) {
486
+ this.resetSelectedAddress();
487
+ Element.show('shipping-new-address-form');
488
+ } else {
489
+ Element.hide('shipping-new-address-form');
490
+ }
491
+
492
+ shipping.setSameAsBilling(false);
493
+ },
494
+
495
+ resetSelectedAddress: function () {
496
+ var selectElement = $('shipping-address-select')
497
+ if (selectElement) {
498
+ selectElement.value = '';
499
+ }
500
+ },
501
+
502
+ fillForm: function (transport) {
503
+ var elementValues = {};
504
+ if (transport && transport.responseText) {
505
+ try {
506
+ elementValues = eval('(' + transport.responseText + ')');
507
+ }
508
+ catch (e) {
509
+ elementValues = {};
510
+ }
511
+ }
512
+ else {
513
+ this.resetSelectedAddress();
514
+ }
515
+
516
+ arrElements = Form.getElements(this.form);
517
+ for (var elemIndex in arrElements) {
518
+ if (arrElements[elemIndex].id) {
519
+ var fieldName = arrElements[elemIndex].id.replace(/^shipping:/, '');
520
+ arrElements[elemIndex].value = elementValues[fieldName] ? elementValues[fieldName] : '';
521
+ if (fieldName == 'country_id' && shippingForm) {
522
+ shippingForm.elementChildLoad(arrElements[elemIndex]);
523
+ }
524
+ }
525
+ }
526
+ },
527
+
528
+ setSameAsBilling: function (flag) {
529
+ $('shipping:same_as_billing').checked = flag;
530
+ // #5599. Also it hangs up, if the flag is not false
531
+ // $('billing:use_for_shipping_yes').checked = flag;
532
+ if (flag) {
533
+ this.syncWithBilling();
534
+ }
535
+ },
536
+
537
+ syncWithBilling: function () {
538
+ $('billing-address-select') && this.newAddress(!$('billing-address-select').value);
539
+ $('shipping:same_as_billing').checked = true;
540
+ if (!$('billing-address-select') || !$('billing-address-select').value) {
541
+ arrElements = Form.getElements(this.form);
542
+ for (var elemIndex in arrElements) {
543
+ if (arrElements[elemIndex].id) {
544
+ var sourceField = $(arrElements[elemIndex].id.replace(/^shipping:/, 'billing:'));
545
+ if (sourceField) {
546
+ arrElements[elemIndex].value = sourceField.value;
547
+ }
548
+ }
549
+ }
550
+
551
+ //$('shipping:country_id').value = $('billing:country_id').value;
552
+ shippingRegionUpdater.update();
553
+ $('shipping:region_id').value = $('billing:region_id').value;
554
+ $('shipping:region').value = $('billing:region').value;
555
+ //shippingForm.elementChildLoad($('shipping:country_id'), this.setRegionValue.bind(this));
556
+ } else {
557
+ $('shipping-address-select').value = $('billing-address-select').value;
558
+ }
559
+ },
560
+
561
+ setRegionValue: function () {
562
+ $('shipping:region').value = $('billing:region').value;
563
+ },
564
+
565
+ save: function () {
566
+ if (checkout.loadWaiting != false) return;
567
+ var validator = new Validation(this.form);
568
+ if (validator.validate()) {
569
+ checkout.setLoadWaiting('shipping');
570
+ var request = new Ajax.Request(
571
+ this.saveUrl,
572
+ {
573
+ method: 'post',
574
+ onComplete: this.onComplete,
575
+ onSuccess: this.onSave,
576
+ onFailure: checkout.ajaxFailure.bind(checkout),
577
+ parameters: Form.serialize(this.form)
578
+ }
579
+ );
580
+ }
581
+ },
582
+
583
+ resetLoadWaiting: function (transport) {
584
+ checkout.setLoadWaiting(false);
585
+ },
586
+
587
+ nextStep: function (transport) {
588
+ if (transport && transport.responseText) {
589
+ try {
590
+ response = eval('(' + transport.responseText + ')');
591
+ }
592
+ catch (e) {
593
+ response = {};
594
+ }
595
+ }
596
+
597
+ if (response.error) {
598
+ if ((typeof response.message) == 'string') {
599
+ alert(response.message);
600
+ } else {
601
+ if (window.shippingRegionUpdater) {
602
+ shippingRegionUpdater.update();
603
+ }
604
+
605
+ alert(response.message.join("\n"));
606
+ }
607
+
608
+ return false;
609
+ }
610
+
611
+ checkout.setStepResponse(response);
612
+
613
+ /*
614
+ var updater = new Ajax.Updater(
615
+ 'checkout-shipping-method-load',
616
+ this.methodsUrl,
617
+ {method:'get', onSuccess: checkout.setShipping.bind(checkout)}
618
+ );
619
+ */
620
+ //checkout.setShipping();
621
+ }
622
+ }
623
+
624
+ // shipping method
625
+ var ShippingMethod = Class.create();
626
+ ShippingMethod.prototype = {
627
+ initialize: function (form, saveUrl) {
628
+ this.form = form;
629
+ if ($(this.form)) {
630
+ $(this.form).observe(
631
+ 'submit', function (event) {
632
+ this.save();
633
+ Event.stop(event);
634
+ }.bind(this)
635
+ );
636
+ }
637
+
638
+ this.saveUrl = saveUrl;
639
+ this.validator = new Validation(this.form);
640
+ this.onSave = this.nextStep.bindAsEventListener(this);
641
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
642
+ },
643
+
644
+ validate: function () {
645
+ var methods = document.getElementsByName('shipping_method');
646
+ if (methods.length == 0) {
647
+ alert(Translator.translate('Your order cannot be completed at this time as there is no shipping methods available for it. Please make necessary changes in your shipping address.').stripTags());
648
+ return false;
649
+ }
650
+
651
+ if (!this.validator.validate()) {
652
+ return false;
653
+ }
654
+
655
+ for (var i = 0; i < methods.length; i++) {
656
+ if (methods[i].checked) {
657
+ return true;
658
+ }
659
+ }
660
+
661
+ alert(Translator.translate('Please specify shipping method.').stripTags());
662
+ return false;
663
+ },
664
+
665
+ save: function () {
666
+
667
+ if (checkout.loadWaiting != false) return;
668
+ if (this.validate()) {
669
+ checkout.setLoadWaiting('shipping-method');
670
+ var request = new Ajax.Request(
671
+ this.saveUrl,
672
+ {
673
+ method: 'post',
674
+ onComplete: this.onComplete,
675
+ onSuccess: this.onSave,
676
+ onFailure: checkout.ajaxFailure.bind(checkout),
677
+ parameters: Form.serialize(this.form)
678
+ }
679
+ );
680
+ }
681
+ },
682
+
683
+ resetLoadWaiting: function (transport) {
684
+ checkout.setLoadWaiting(false);
685
+ },
686
+
687
+ nextStep: function (transport) {
688
+ if (transport && transport.responseText) {
689
+ try {
690
+ response = eval('(' + transport.responseText + ')');
691
+ }
692
+ catch (e) {
693
+ response = {};
694
+ }
695
+ }
696
+
697
+ if (response.error) {
698
+ alert(response.message);
699
+ return false;
700
+ }
701
+
702
+ if (response.update_section) {
703
+ $('checkout-' + response.update_section.name + '-load').update(response.update_section.html);
704
+ }
705
+
706
+ payment.initWhatIsCvvListeners();
707
+
708
+ if (response.goto_section) {
709
+ checkout.gotoSection(response.goto_section, true);
710
+ checkout.reloadProgressBlock();
711
+ return;
712
+ }
713
+
714
+ if (response.payment_methods_html) {
715
+ $('checkout-payment-method-load').update(response.payment_methods_html);
716
+ }
717
+
718
+ checkout.setShippingMethod();
719
+ }
720
+ }
721
+
722
+
723
+ // payment
724
+ var Payment = Class.create();
725
+ Payment.prototype = {
726
+ beforeInitFunc: $H({}),
727
+ afterInitFunc: $H({}),
728
+ beforeValidateFunc: $H({}),
729
+ afterValidateFunc: $H({}),
730
+ initialize: function (form, saveUrl) {
731
+ this.form = form;
732
+ this.saveUrl = saveUrl;
733
+ this.onSave = this.nextStep.bindAsEventListener(this);
734
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
735
+ },
736
+
737
+ addBeforeInitFunction: function (code, func) {
738
+ this.beforeInitFunc.set(code, func);
739
+ },
740
+
741
+ beforeInit: function () {
742
+ (this.beforeInitFunc).each(
743
+ function (init) {
744
+ (init.value)();
745
+ ;
746
+ }
747
+ );
748
+ },
749
+
750
+ init: function () {
751
+ this.beforeInit();
752
+ var elements = Form.getElements(this.form);
753
+ if ($(this.form)) {
754
+ $(this.form).observe(
755
+ 'submit', function (event) {
756
+ this.save();
757
+ Event.stop(event);
758
+ }.bind(this)
759
+ );
760
+ }
761
+
762
+ var method = null;
763
+ for (var i = 0; i < elements.length; i++) {
764
+ if (elements[i].name == 'payment[method]') {
765
+ if (elements[i].checked) {
766
+ method = elements[i].value;
767
+ }
768
+ } else {
769
+ elements[i].disabled = true;
770
+ }
771
+
772
+ elements[i].setAttribute('autocomplete', 'off');
773
+ }
774
+
775
+ if (method) this.switchMethod(method);
776
+ this.afterInit();
777
+ },
778
+
779
+ addAfterInitFunction: function (code, func) {
780
+ this.afterInitFunc.set(code, func);
781
+ },
782
+
783
+ afterInit: function () {
784
+ (this.afterInitFunc).each(
785
+ function (init) {
786
+ (init.value)();
787
+ }
788
+ );
789
+ },
790
+
791
+ switchMethod: function (method) {
792
+ if (this.currentMethod && $('payment_form_' + this.currentMethod)) {
793
+ this.changeVisible(this.currentMethod, true);
794
+ $('payment_form_' + this.currentMethod).fire('payment-method:switched-off', {method_code: this.currentMethod});
795
+ }
796
+
797
+ if ($('payment_form_' + method)) {
798
+ this.changeVisible(method, false);
799
+ $('payment_form_' + method).fire('payment-method:switched', {method_code: method});
800
+ } else {
801
+ //Event fix for payment methods without form like "Check / Money order"
802
+ document.body.fire('payment-method:switched', {method_code: method});
803
+ }
804
+
805
+ if (method) {
806
+ this.lastUsedMethod = method;
807
+ }
808
+
809
+ this.currentMethod = method;
810
+ },
811
+
812
+ changeVisible: function (method, mode) {
813
+ var block = 'payment_form_' + method;
814
+ [block + '_before', block, block + '_after'].each(
815
+ function (el) {
816
+ element = $(el);
817
+ if (element) {
818
+ element.style.display = (mode) ? 'none' : '';
819
+ element.select('input', 'select', 'textarea', 'button').each(
820
+ function (field) {
821
+ field.disabled = mode;
822
+ }
823
+ );
824
+ }
825
+ }
826
+ );
827
+ },
828
+
829
+ addBeforeValidateFunction: function (code, func) {
830
+ this.beforeValidateFunc.set(code, func);
831
+ },
832
+
833
+ beforeValidate: function () {
834
+ var validateResult = true;
835
+ var hasValidation = false;
836
+ (this.beforeValidateFunc).each(
837
+ function (validate) {
838
+ hasValidation = true;
839
+ if ((validate.value)() == false) {
840
+ validateResult = false;
841
+ }
842
+ }.bind(this)
843
+ );
844
+ if (!hasValidation) {
845
+ validateResult = false;
846
+ }
847
+
848
+ return validateResult;
849
+ },
850
+
851
+ validate: function () {
852
+ var result = this.beforeValidate();
853
+ if (result) {
854
+ return true;
855
+ }
856
+
857
+ var methods = document.getElementsByName('payment[method]');
858
+ if (methods.length == 0) {
859
+ alert(Translator.translate('Your order cannot be completed at this time as there is no payment methods available for it.').stripTags());
860
+ return false;
861
+ }
862
+
863
+ for (var i = 0; i < methods.length; i++) {
864
+ if (methods[i].checked) {
865
+ return true;
866
+ }
867
+ }
868
+
869
+ result = this.afterValidate();
870
+ if (result) {
871
+ return true;
872
+ }
873
+
874
+ alert(Translator.translate('Please specify payment method.').stripTags());
875
+ return false;
876
+ },
877
+
878
+ addAfterValidateFunction: function (code, func) {
879
+ this.afterValidateFunc.set(code, func);
880
+ },
881
+
882
+ afterValidate: function () {
883
+ var validateResult = true;
884
+ var hasValidation = false;
885
+ (this.afterValidateFunc).each(
886
+ function (validate) {
887
+ hasValidation = true;
888
+ if ((validate.value)() == false) {
889
+ validateResult = false;
890
+ }
891
+ }.bind(this)
892
+ );
893
+ if (!hasValidation) {
894
+ validateResult = false;
895
+ }
896
+
897
+ return validateResult;
898
+ },
899
+
900
+ save: function () {
901
+ if (checkout.loadWaiting != false) return;
902
+ var validator = new Validation(this.form);
903
+ if (this.validate() && validator.validate()) {
904
+ checkout.setLoadWaiting('payment');
905
+ var request = new Ajax.Request(
906
+ this.saveUrl,
907
+ {
908
+ method: 'post',
909
+ onComplete: this.onComplete,
910
+ onSuccess: this.onSave,
911
+ onFailure: checkout.ajaxFailure.bind(checkout),
912
+ parameters: Form.serialize(this.form)
913
+ }
914
+ );
915
+ }
916
+ },
917
+
918
+ resetLoadWaiting: function () {
919
+ checkout.setLoadWaiting(false);
920
+ },
921
+
922
+ nextStep: function (transport) {
923
+ if (transport && transport.responseText) {
924
+ try {
925
+ response = eval('(' + transport.responseText + ')');
926
+ }
927
+ catch (e) {
928
+ response = {};
929
+ }
930
+ }
931
+
932
+ /*
933
+ * if there is an error in payment, need to show error message
934
+ */
935
+ if (response.error) {
936
+ if (response.fields) {
937
+ var fields = response.fields.split(',');
938
+ for (var i = 0; i < fields.length; i++) {
939
+ var field = null;
940
+ if (field = $(fields[i])) {
941
+ Validation.ajaxError(field, response.error);
942
+ }
943
+ }
944
+
945
+ return;
946
+ }
947
+
948
+ alert(response.error);
949
+ return;
950
+ }
951
+
952
+ checkout.setStepResponse(response);
953
+
954
+ //checkout.setPayment();
955
+ },
956
+
957
+ initWhatIsCvvListeners: function () {
958
+ $$('.cvv-what-is-this').each(
959
+ function (element) {
960
+ Event.observe(element, 'click', toggleToolTip);
961
+ }
962
+ );
963
+ }
964
+ }
965
+
966
+ var Review = Class.create();
967
+ Review.prototype = {
968
+ initialize: function (saveUrl, successUrl, agreementsForm) {
969
+ this.saveUrl = saveUrl;
970
+ this.successUrl = successUrl;
971
+ this.agreementsForm = agreementsForm;
972
+ this.onSave = this.nextStep.bindAsEventListener(this);
973
+ this.onComplete = this.resetLoadWaiting.bindAsEventListener(this);
974
+ },
975
+
976
+ save: function () {
977
+ if (checkout.loadWaiting != false) return;
978
+ checkout.setLoadWaiting('review');
979
+ var params = Form.serialize(payment.form);
980
+ if (this.agreementsForm) {
981
+ params += '&' + Form.serialize(this.agreementsForm);
982
+ }
983
+
984
+ params.save = true;
985
+ var request = new Ajax.Request(
986
+ this.saveUrl,
987
+ {
988
+ method: 'post',
989
+ parameters: params,
990
+ onComplete: this.onComplete,
991
+ onSuccess: this.onSave,
992
+ onFailure: checkout.ajaxFailure.bind(checkout)
993
+ }
994
+ );
995
+ },
996
+
997
+ resetLoadWaiting: function (transport) {
998
+ checkout.setLoadWaiting(false, this.isSuccess);
999
+ },
1000
+
1001
+ nextStep: function (transport) {
1002
+ if (transport && transport.responseText) {
1003
+ try {
1004
+ response = eval('(' + transport.responseText + ')');
1005
+ }
1006
+ catch (e) {
1007
+ response = {};
1008
+ }
1009
+
1010
+ if (response.redirect) {
1011
+ this.isSuccess = true;
1012
+ location.href = response.redirect;
1013
+ return;
1014
+ }
1015
+
1016
+ if (response.success) {
1017
+ this.isSuccess = true;
1018
+ window.location = this.successUrl;
1019
+ }
1020
+ else {
1021
+ var msg = response.error_messages;
1022
+ if (typeof(msg) == 'object') {
1023
+ msg = msg.join("\n");
1024
+ }
1025
+
1026
+ if (msg) {
1027
+ alert(msg);
1028
+ }
1029
+ }
1030
+
1031
+ if (response.update_section) {
1032
+ $('checkout-' + response.update_section.name + '-load').update(response.update_section.html);
1033
+ }
1034
+
1035
+ if (response.goto_section) {
1036
+ checkout.gotoSection(response.goto_section, true);
1037
+ }
1038
+ }
1039
+ },
1040
+
1041
+ isSuccess: false
1042
+ }
1043
+
package.xml CHANGED
@@ -1,9 +1,9 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HeidelpayCDEdition</name>
4
- <version>16.6.22</version>
5
  <stability>stable</stability>
6
- <license>GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Heidelpay CD-Edition Payment Plugin</summary>
@@ -23,9 +23,6 @@ List of payment methods and services:&lt;br /&gt;&#xD;
23
  &#x2022; Purchase on account (as well secured available if requested)&lt;br /&gt;&#xD;
24
  &#x2022; Installment payment / financing&lt;br /&gt;&#xD;
25
  &#x2022; sofort&#xFC;berweisung.de, giropay, iDeal, EPS, u.a.&lt;br /&gt;&#xD;
26
- &#x2022; Barpay&lt;br /&gt;&#xD;
27
- &#x2022; BillSAFE&lt;br /&gt;&#xD;
28
- &#x2022; MangirKart (TR)&lt;br /&gt;&#xD;
29
  &#x2022; Paypal&lt;br /&gt;&#xD;
30
  &#x2022; BaFin-licensed partner for Third-Party-Payment&lt;br /&gt;&#xD;
31
  &#x2022; Payment Management functions: subscription processing, costumer care systems, debtor management, various payment industry sulotions (i.e. Dating, Travel, apparel)&#xD;
@@ -39,13 +36,15 @@ Telefon: +49 (0) 6221 / 65 170-20&lt;br /&gt;&#xD;
39
  E-Mail: sales@heidelpay.de&lt;br /&gt;&#xD;
40
  Internet: www.heidelpay.de&lt;br /&gt;&#xD;
41
  </description>
42
- <notes>- add direct debit with incurence&#xD;
43
- - remove bic in case of sepa direct debit&#xD;
 
 
44
  </notes>
45
  <authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
46
- <date>2016-06-22</date>
47
- <time>07:39:05</time>
48
- <contents><target name="magecommunity"><dir name="HeidelpayCD"><dir name="Edition"><dir name="Block"><file name="Abstract.php" hash="e589f421bf86a643921b11d75fcbb8fb"/><file name="Button.php" hash="64dfc3786020559d2c8e2377d5c8281f"/><dir name="Form"><file name="Creditcard.php" hash="eca2833e42df4e57485afb8aeb0d6a0f"/><file name="Debit.php" hash="fb2ecd8695d813e34e4ab6b6501d359e"/><file name="Desconly.php" hash="912dd8ab02ccc24b7121d6f05255c15d"/><file name="Eps.php" hash="8698a923d04580654cacecfff64268c8"/><file name="Giropay.php" hash="aba0b69429706944ae1ac4466ab9ce3b"/><file name="Ideal.php" hash="a31bd92c30af0718e6f4347f14eba963"/><file name="Masterpass.php" hash="7fb40e7effa042586ae5ac057f12e1a9"/><file name="Postfinance.php" hash="b3a91389b3fb235eb113a919161d2476"/></dir><file name="Index.php" hash="e13d55a3c5aa1ed0ab680ae378131eee"/><dir name="Info"><file name="Debit.php" hash="888f8a1c1aaaf6974131970969caa5f2"/><file name="Invoice.php" hash="067560318d472eae2af3669ed05a7220"/><file name="Masterpass.php" hash="562c524745e0b89ea600435e38e6ce09"/></dir><dir name="Onepage"><file name="Billing.php" hash="fa35f5b8eda774a881999ebcc53ac52a"/><file name="Progress.php" hash="a717a71fd538c8fc5aa2b90de717e9ca"/><file name="Shipping.php" hash="99151e8d86b19160b633a91f0939aad6"/></dir><file name="Onepage.php" hash="51630e0804b42fead2cda80e013d5dbf"/><file name="Success.php" hash="97b586c0d2c5b16c53608b3e41f35b79"/></dir><dir name="Helper"><file name="Data.php" hash="f48ce588d187b2b890a48b8b044830c8"/><file name="Payment.php" hash="3e108eaa29df85448deb945453a27907"/></dir><dir name="Model"><file name="Customer.php" hash="4e65287a3d6a171444614ed580635147"/><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="9fa63b33278570af246ca8cb1cfc706e"/></dir><file name="Customer.php" hash="952d0c21f063e34b0c767968c85184d7"/><dir name="Transaction"><file name="Collection.php" hash="0b4038e511cc4d5024cafdaee9ec84e4"/></dir><file name="Transaction.php" hash="d3c544e838b9b8f39efaad4caa5d83c2"/></dir><file name="Observer.php" hash="477274c1102b35e4f73aec430e0099a9"/><dir name="Order"><dir name="Pdf"><file name="Invoice.php" hash="f8222c1be3bfa9d20d52c33cfccf9a67"/></dir></dir><dir name="Payment"><file name="Abstract.php" hash="db067886c1f94732495c9dca63b48bed"/><file name="Hcdbs.php" hash="90639d3a5099fb432750655de7d5a51a"/><file name="Hcdcc.php" hash="7ef1159ce558a399c9e12f6eebd3885f"/><file name="Hcddc.php" hash="6db05d99cd374e873866522a07a82b6a"/><file name="Hcddd.php" hash="d2f7c2709255455ded038e3e6d6d857d"/><file name="Hcdeps.php" hash="6caef61817c39c62176d0213ae309e56"/><file name="Hcdgp.php" hash="3fb1d66a07d70d744de2539758ab5197"/><file name="Hcdide.php" hash="260bbb90e918f884045a459ad346af30"/><file name="Hcdiv.php" hash="f74c4423e3694fa28bf8bc93809b9e84"/><file name="Hcdmk.php" hash="c5c618e46541ba6f23f338a2b6fbe6c5"/><file name="Hcdmpa.php" hash="5b82deca77df55c01d8198c8ed079280"/><file name="Hcdpal.php" hash="eab547d1d8f3d56203b66a6e165bb767"/><file name="Hcdpf.php" hash="c06b78f4e07001b8e838b88037ee0e63"/><file name="Hcdpp.php" hash="0dda37098aceb80ed6f0e774550ac2c9"/><file name="Hcdsu.php" hash="41b884aff43ada409a9d16e7a0f29b97"/><file name="Hcdyt.php" hash="3b378f1f52419788cc8b6aaa7fefde1b"/></dir><dir name="Resource"><file name="Encryption.php" hash="edbc116ce3c9dc815a658beb4ac7705a"/><file name="Setup.php" hash="74d6669d6d2273dd241a5064c85c1e78"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Bookingmode.php" hash="a83d2adbb54a69c0afd7ef87857672ee"/><file name="Recognition.php" hash="bec39a1786cca41140c590b86b864850"/><file name="Returnurl.php" hash="626518f91f8b0632211ac85fb658fdd7"/></dir></dir></dir><file name="Transaction.php" hash="7f29642f5699664c3b702410d0445853"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="82492b85dab9bbc31e8ff61f75b49264"/><file name="IndexController.php" hash="109a9009a41aa9ea28ef17012dc2a5b8"/><file name=".IndexController.php.swp" hash="088d8992d2e232fa2a13e17f3c785c96"/></dir><dir name="etc"><file name="config.xml" hash="4060a102f790180f5f2405e868fc7a6a"/><file name="system.xml" hash="4e6f0c20887da35b50622be1917920be"/></dir><dir name="sql"><dir name="hcd_setup"><file name="install-15.1.30.php" hash="855a7ef4800bdc2369d8146306365e64"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hcd.xml" hash="3145bd1d4a3dc99dae5b379bb81513fa"/></dir><dir name="template"><dir name="hcd"><dir name="Info"><file name="debit.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><file name="masterpass.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><dir name="pdf"><file name="invoice.phtml" hash="2202fbc5d3f77c9056b362dd96d78f4b"/></dir></dir><file name="button.phtml" hash="66ff2e82c4db439d3c616c455e8654f8"/><dir name="form"><file name="creditcard.phtml" hash="ee6297fd90757f2d5bbabf9cac866b72"/><file name="debit.phtml" hash="cb56ab2d8a54a37cbc63c25c82fdcc88"/><file name="desconly.phtml" hash="0df2f305be1337de2db69ecb93ce48b7"/><file name="eps.phtml" hash="23895dad6e135ca58473a181bf2f7388"/><file name="giropay.phtml" hash="ebcb9379429b3d47263ee97243688f3c"/><file name="ideal.phtml" hash="23895dad6e135ca58473a181bf2f7388"/><file name="masterpass.phtml" hash="d86140758d30b72389b0bc19677911ef"/><file name="postfinance.phtml" hash="0db7c2d0404efa2feb98748204bf72d4"/></dir><file name="index.phtml" hash="d76db58b6fba89c113144b5e5065539a"/><dir name="mail"><file name="hcd_payment_info.phtml" hash="1ec6d33fbb5bc8391a8295be1ffa5b38"/></dir><dir name="onepage"><file name="billing.phtml" hash="14b57c38161e6749fbc37813337c2379"/><dir name="payment"><file name="methods.phtml" hash="0e2f9e12e7dfc1070404af7dfdd7b024"/></dir><file name="payment.phtml" hash="6d452186f51dc088c5007c16ddd1cf08"/><dir name="progress"><file name="payment.phtml" hash="440f57443141d1280cf18c798cc8af10"/><file name="shipping.phtml" hash="c659abf65a13a4f1fadcec6221afd1a1"/></dir><file name="progress.phtml" hash="9527eb86ec29030f4b111455d3122388"/><file name="shipping_method.phtml" hash="79f1cc31d10a35df619b15db481e9543"/></dir><file name="onepage.phtml" hash="df4e2760e3804f7a2ff51d4b4cf74538"/><file name="success.phtml" hash="9cac258cb96b057b3de00ab971bf7855"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="hcd"><dir name="Info"><file name="masterpass.phtml" hash="4d8eed392d77abb15418562f25de9611"/><dir name="pdf"><file name="invoice.phtml" hash="c87bc83feeac048800f923a9bff2ca8d"/></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HeidelpayCD_Edition.xml" hash="277ef825780ed2df1f5de2cf949f842b"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="HeidelpayCD_Edition.csv" hash="3ad3d7cd0d0f4fea0f2c77cb6ba9fe8e"/></dir><dir name="en_US"><file name="HeidelpayCD_Edition.csv" hash="224ef9894000367bc92c088fa21e0a41"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="loading.gif" hash="29868a3a7094b078733caba6b192b080"/><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/><file name="masterpass_240_66.jpg" hash="7ad0078b8a27914aceb590c4100f3aa8"/></dir></dir><dir name="css"><file name="heidelpaycd.css" hash="4ec8028660fab013077cd8119396455a"/><file name="hcdcc_payment_frame.css" hash=""/><file name="hcddc_payment_frame.css" hash=""/></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="hcd"><file name="heidelpaycd.js" hash="9c3d7b865452ba0ecceb0f2f89e9172f"/><file name="heidelpaypci3.js" hash="52a3a134e9645b59a03580966f591b61"/><file name="opcheckout.js" hash="0b23200ff0fcb85f9ebbbd74fca04064"/></dir></dir></target></contents>
49
  <compatible/>
50
- <dependencies><required><php><min>5.0.0</min><max>5.9.99</max></php></required></dependencies>
51
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>HeidelpayCDEdition</name>
4
+ <version>17.3.30</version>
5
  <stability>stable</stability>
6
+ <license uri="https://github.com/heidelpay/magento-cd-edition/blob/master/LICENSE.txt">See License.txt</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Heidelpay CD-Edition Payment Plugin</summary>
23
  &#x2022; Purchase on account (as well secured available if requested)&lt;br /&gt;&#xD;
24
  &#x2022; Installment payment / financing&lt;br /&gt;&#xD;
25
  &#x2022; sofort&#xFC;berweisung.de, giropay, iDeal, EPS, u.a.&lt;br /&gt;&#xD;
 
 
 
26
  &#x2022; Paypal&lt;br /&gt;&#xD;
27
  &#x2022; BaFin-licensed partner for Third-Party-Payment&lt;br /&gt;&#xD;
28
  &#x2022; Payment Management functions: subscription processing, costumer care systems, debtor management, various payment industry sulotions (i.e. Dating, Travel, apparel)&#xD;
36
  E-Mail: sales@heidelpay.de&lt;br /&gt;&#xD;
37
  Internet: www.heidelpay.de&lt;br /&gt;&#xD;
38
  </description>
39
+ <notes>- new payment method invoice secured&#xD;
40
+ - new payment method direct debit secured&#xD;
41
+ &#xD;
42
+ See CHANGELOG.md for the full list of changes.&#xD;
43
  </notes>
44
  <authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
45
+ <date>2017-03-30</date>
46
+ <time>09:31:16</time>
47
+ <contents><target name="magecommunity"><dir name="HeidelpayCD"><dir name="Edition"><dir name="Block"><file name="Abstract.php" hash="2b057d05c400cdd17b295862d6a23fdf"/><file name="Button.php" hash="92d233b5f867604a69012c8a02b40977"/><dir name="Form"><file name="Creditcard.php" hash="717c40fd8e4e16681303c5e4c1d95fe8"/><file name="Debit.php" hash="4475b024c855e37edd0ba02042753a1b"/><file name="Desconly.php" hash="3c07575a005918639578457aa984151b"/><file name="DirectDebitSecured.php" hash="35ded7efeb03b9d28ecf469d6fb59449"/><file name="Eps.php" hash="6520615f6e4a455d11021950605e2514"/><file name="Giropay.php" hash="aba0b69429706944ae1ac4466ab9ce3b"/><file name="Ideal.php" hash="3b5d6f7b27d7d03dcfd7603a83d352f7"/><file name="InvoiceSecured.php" hash="44f160fe3169986776bf69939e6b0e48"/><file name="Masterpass.php" hash="a81a3143ebcbfa72df716973c1c55318"/><file name="Postfinance.php" hash="b2f477144d0ec9df31eea1c6119e54a3"/></dir><file name="Index.php" hash="a690c390d4f939c3619fc87bb3c3c10c"/><dir name="Info"><file name="Debit.php" hash="888f8a1c1aaaf6974131970969caa5f2"/><file name="DirectDebit.php" hash="c9f2ba7e9f37616969fe9b217a999d50"/><file name="Invoice.php" hash="b2f4dbf7905a1e94341217b8a2a3819a"/><file name="Masterpass.php" hash="7e928254dc3d3818d3c6ddf83eb84ac3"/><file name="Prepayment.php" hash="306443d84137b409ad73b4ab78aa8e72"/></dir><dir name="Onepage"><file name="Billing.php" hash="ea5c6dc3c609cfd1452cd132e626e25f"/><file name="Progress.php" hash="b9f1a33cee97615fcc2888c89f26a902"/><file name="Shipping.php" hash="6ba425f5b94cd41003dc4f4c82fddbc2"/></dir><file name="Onepage.php" hash="3e8ee081267736f4493a22f5693587c4"/><file name="Response.php" hash="b905f0b138e2107d5922277ac9f173cb"/><file name="Success.php" hash="43dc95a2e2387dba8c7da33f372c9e94"/></dir><dir name="Helper"><file name="AbstractHelper.php" hash="d03018c5377104b444910b09c13eea3b"/><file name="BasketApi.php" hash="17fb81c28b632e2d582044cc205a330f"/><file name="Data.php" hash="6e2b23004df9a9c03fde3c61f3150747"/><file name="OrderState.php" hash="464e6f8b451dc5397714d9cb86c2a081"/><file name="Payment.php" hash="99b00ac0f9abb9a29fc1764ee3afeead"/><file name="Validator.php" hash="15d69234ea566db7bb481183cb59767b"/></dir><dir name="Model"><file name="Customer.php" hash="bd32084ebca847bcd60c95f08b2da080"/><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="f8634f728d32e6c40c3f20ec92d279bd"/></dir><file name="Customer.php" hash="a3e2126379f1f7731e1f7216559b8b4b"/><dir name="Transaction"><file name="Collection.php" hash="7495874d2d1b27adef970410db28bf4f"/></dir><file name="Transaction.php" hash="9b50bcbe6f5092242d07d7f46a4d925c"/></dir><file name="Observer.php" hash="7f8b8015e463e2c4151ac33e0f2564a3"/><dir name="Order"><dir name="Pdf"><file name="Invoice.php" hash="c4281e931bbba4f6e5ee1b061e40960d"/></dir></dir><dir name="Payment"><file name="Abstract.php" hash="e911d1d3b044c8b45e2e4bf72cf0c187"/><file name="AbstractSecuredPaymentMethods.php" hash="e34c39c5a4a3a9742577f013bcc93423"/><file name="HcdDirectDebitSecured.php" hash="4daf0606b1b09447cbe1476d6fdbe6bc"/><file name="HcdInvoiceSecured.php" hash="2a843e04dd3640a6053f5d49ccdc2c84"/><file name="Hcdbs.php" hash="e761054021d2ee5d2b233f2a9e9ef0cb"/><file name="Hcdcc.php" hash="04be67f03f66fbaf7f7615796cef4eaa"/><file name="Hcddc.php" hash="d7953e4c7bb237adebdff7547ade01af"/><file name="Hcddd.php" hash="3f88025d17daad6441c1f2f4493cb957"/><file name="Hcdeps.php" hash="724af12f038ea2e8ab4545da28529bea"/><file name="Hcdgp.php" hash="c25899b07d407357b255166521be8e5b"/><file name="Hcdide.php" hash="011a116ecca0339c405aae2566f0e16b"/><file name="Hcdiv.php" hash="cb240c3c53e3797a6998262324c9c248"/><file name="Hcdmk.php" hash="75572cce005f2ecd33c7d552724796dc"/><file name="Hcdmpa.php" hash="05319d69791165c0393ecd9b5fe5459b"/><file name="Hcdpal.php" hash="ddedb86eaec7a66d97721cf080baabaf"/><file name="Hcdpf.php" hash="520f55eac6499bb061b9e79c25bf028b"/><file name="Hcdpp.php" hash="f928d16a2f5b7094d066f412dcd1949a"/><file name="Hcdsu.php" hash="357857ca8f073b69d8321d3bfc7fdd1a"/><file name="Hcdyt.php" hash="de6e549fce6daca70dad9233be9ceb27"/></dir><dir name="Resource"><file name="Encryption.php" hash="d3e12608684d89f39b378114602dacaf"/><file name="Setup.php" hash="33dd67ce8aee90fffdf3de62c850d3ee"/></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Bookingmode.php" hash="9133af26f8df450cbfd9ff5ed116adf1"/><file name="Recognition.php" hash="007b73ca273fe1a93ec09c6bd1bc7cab"/><file name="Returnurl.php" hash="df8357de873019dbbdef935d2ad73978"/></dir></dir></dir><file name="Transaction.php" hash="638481f33d2a6333d20ad351df680eda"/></dir><dir name="controllers"><file name="CheckoutController.php" hash="fb665e715c857c606484379691c87b24"/><file name="IndexController.php" hash="478fa789a61c15f5bcd8f154575e8238"/><file name="ResponseController.php" hash="d3cf44d607571a20b2fa1e9ec0339669"/></dir><dir name="etc"><file name="config.xml" hash="6218500c4772ec183639e007b3572aeb"/><file name="system.xml" hash="9da4da78db3bb50e50dbf9b04a7819bd"/></dir><dir name="sql"><dir name="hcd_setup"><file name="install-15.1.30.php" hash="139e3c9e316dad5329d40de3e3cd43a2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="hcd.xml" hash="b1d22100ced439a653421eb15a7be538"/></dir><dir name="template"><dir name="hcd"><dir name="Info"><file name="debit.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><file name="masterpass.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/></dir><file name="button.phtml" hash="66ff2e82c4db439d3c616c455e8654f8"/><dir name="form"><file name="creditcard.phtml" hash="46cbc9443f1a1b92d8cee22afca17569"/><file name="debit.phtml" hash="d6b6912c94a2eab14fc82032049860d7"/><file name="desconly.phtml" hash="c96412bdf87c99c648c285d7669146a5"/><file name="direct-debit-secured.phtml" hash="37011aa236244920022c6dcef9e9e642"/><file name="eps.phtml" hash="b42c8ea8c536c6251487338503b4292b"/><file name="giropay.phtml" hash="ebcb9379429b3d47263ee97243688f3c"/><file name="ideal.phtml" hash="20292c1b434d94255368a664c6bcfff9"/><file name="invoice-secured.phtml" hash="f14777bb5b8e744fa2117b067a9e26d1"/><file name="masterpass.phtml" hash="2a4c0b9d1d8d0b9f797094e99e7c46b0"/><file name="postfinance.phtml" hash="9f537b0b203b75651609136fc98ea183"/></dir><file name="index.phtml" hash="d76db58b6fba89c113144b5e5065539a"/><dir name="mail"><file name="hcd_payment_info.phtml" hash="1ec6d33fbb5bc8391a8295be1ffa5b38"/></dir><dir name="onepage"><file name="billing.phtml" hash="14b57c38161e6749fbc37813337c2379"/><dir name="payment"><file name="methods.phtml" hash="0e2f9e12e7dfc1070404af7dfdd7b024"/></dir><file name="payment.phtml" hash="6d452186f51dc088c5007c16ddd1cf08"/><dir name="progress"><file name="payment.phtml" hash="440f57443141d1280cf18c798cc8af10"/><file name="shipping.phtml" hash="c659abf65a13a4f1fadcec6221afd1a1"/></dir><file name="progress.phtml" hash="9527eb86ec29030f4b111455d3122388"/><file name="shipping_method.phtml" hash="79f1cc31d10a35df619b15db481e9543"/></dir><file name="onepage.phtml" hash="df4e2760e3804f7a2ff51d4b4cf74538"/><file name="response.phtml" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="success.phtml" hash="9cac258cb96b057b3de00ab971bf7855"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="hcd"><dir name="Info"><file name="masterpass.phtml" hash="53c30caa1d8838256686aaeef48f42eb"/><dir name="pdf"><file name="invoice.phtml" hash="c87bc83feeac048800f923a9bff2ca8d"/></dir></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="hcd"><dir><dir name="info"><dir name="pdf"><file name="directdebit.phtml" hash="58b78aba68ac0ccb2dd5ce6a55d62d5c"/><file name="invoice.phtml" hash="8f9cd8f1f71b2669c5a3ee266a7d7bfe"/><file name="prepayment.phtml" hash="96382d5d69ef69414f49efb4176f8e23"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="HeidelpayCD_Edition.xml" hash="268d503b4a88bc5bbd76f47794f78f7e"/></dir></target><target name="magelocale"><dir name="de_DE"><file name="HeidelpayCD_Edition.csv" hash="b1e1f0017484f29a9a1f4d0c3a938833"/></dir><dir name="en_US"><file name="HeidelpayCD_Edition.csv" hash="54bf196d06fc21e43c3039ba012a8cac"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="loading.gif" hash="29868a3a7094b078733caba6b192b080"/><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/><file name="masterpass_240_66.jpg" hash="7ad0078b8a27914aceb590c4100f3aa8"/></dir></dir><dir name="css"><file name="heidelpaycd.css" hash="da93e9bb03447be97c071b5160bdc81f"/><file name="hcdcc_payment_frame.css" hash="b1f9522942c14b15fe8ef81a6d8ac4b2"/><file name="hcddc_payment_frame.css" hash="b1f9522942c14b15fe8ef81a6d8ac4b2"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="images"><dir name="hcd"><file name="masterpass_100_28.jpg" hash="e0907959b1e345de6a3d73f32a5f5369"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="hcd"><file name="heidelpaycd.js" hash="783491bc26c795408de517240eea18a0"/><file name="heidelpaypci3.js" hash="47c0ff6f0160f2dcfacf42e00df0ea7c"/><file name="opcheckout.js" hash="7d2f7f55c3e4d0864958e1bfe05a9e74"/></dir></dir></target></contents>
48
  <compatible/>
49
+ <dependencies><required><php><min>5.6.0</min><max>7.0.99</max></php></required></dependencies>
50
  </package>
skin/adminhtml/base/default/images/hcd/masterpass_100_28.jpg CHANGED
File without changes
skin/frontend/base/default/css/hcdcc_payment_frame.css CHANGED
@@ -1,5 +1,5 @@
1
- body {
2
- color: #636363;
3
- font-size: 13px;
4
- font-family: "Raleway","Helvetica Neue","Verdana,Arial","sans-serif";
5
  }
1
+ body {
2
+ color: #636363;
3
+ font-size: 13px;
4
+ font-family: "Raleway","Helvetica Neue","Verdana,Arial","sans-serif";
5
  }
skin/frontend/base/default/css/hcddc_payment_frame.css CHANGED
@@ -1,5 +1,5 @@
1
- body {
2
- color: #636363;
3
- font-size: 13px;
4
- font-family: "Raleway","Helvetica Neue","Verdana,Arial","sans-serif";
5
  }
1
+ body {
2
+ color: #636363;
3
+ font-size: 13px;
4
+ font-family: "Raleway","Helvetica Neue","Verdana,Arial","sans-serif";
5
  }
skin/frontend/base/default/css/heidelpaycd.css CHANGED
@@ -1,113 +1,110 @@
1
-
2
- .hcd-input-fields-small {
3
- float: left ;
4
- padding-right: 5px ;
5
- }
6
- .hcd-payment-info input {
7
- border-radius: 3px ;
8
- background-color: #F4F4F4 ;
9
- }
10
-
11
- .block-hcd-payment-info {
12
- text-align: left;
13
- margin: auto;
14
- width: 50%;
15
- padding: 20px;
16
- border-left: 2px dashed #CCC;
17
- border-right: 2px dashed #CCC;
18
- }
19
-
20
- .hcd-singleline-label {
21
- display: block ;
22
- }
23
-
24
- .hcd-payment-info {
25
- border: 2px solid #E7E7E7 ;
26
- padding: 10px;
27
- /* border-radius: 8px ; */
28
- }
29
-
30
- .hcd-payment-desc {
31
- border-left: 1px dashed #000;
32
- margin-right: 10px;
33
- margin-top: 10px;
34
- margin-bottom: 10px;
35
- padding: 5px;
36
- font-style: italic;
37
- font-size: 11px;
38
- }
39
-
40
- .hcd-payment-error {
41
- color: #f00;
42
- font-weight:bold
43
-
44
- }
45
-
46
-
47
- .hco-inline-label {
48
- display: inline-block;
49
- }
50
-
51
- .hcd-use_again {
52
- margin-right: 5px;
53
-
54
- }
55
-
56
- button.btn-hcdmpa-payment-data {
57
- border: 0;
58
- height: 46px;
59
- width: 80px;
60
- background: url('https://www.mastercard.com/mc_us/wallet/img/en/FR/mp_acc_046px_gif.gif'
61
- ) 0 0 no-repeat;
62
- padding: 0 0 0 9px;
63
- font: bold 15px/40px Arial, Helvetica, sans-serif;
64
- color: #fff;
65
- cursor: pointer;
66
- position: absolute;
67
- }
68
-
69
-
70
- button.btn-hcdmpa-info {
71
- border: 0;
72
- width: 100px;
73
- height: 28px;
74
- padding: 0 0 0 9px;
75
- font: bold 15px/40px Arial, Helvetica, sans-serif;
76
- color: #fff;
77
- cursor: pointer;
78
- }
79
-
80
-
81
- .hcd-masterpass-payment-data {
82
- margin-left: 85px;
83
- padding-left: 5px;
84
- height: 46px;
85
- }
86
-
87
- .hcd-masterpass-payment-data-info {
88
- margin-top: 5px;
89
- font-size: 12px;
90
- }
91
-
92
- .hcdcc_payment_frame {
93
- border: 0px solid black !important;
94
- width: 200px;
95
- height: 200px;
96
- margin-top: 10px;
97
- }
98
-
99
- .hcddc_payment_frame {
100
- border: 0px solid black !important;
101
- width: 200px;
102
- height: 190px;
103
- margin-top: 10px;
104
- }
105
-
106
- button_hcd {
107
- float: right;
108
- }
109
-
110
- #heidelpay-please-wait img {
111
- display: inline;
112
- width: 25px;
113
- }
1
+
2
+ .hcd-input-fields-small {
3
+ float: left;
4
+ padding-right: 5px;
5
+ }
6
+
7
+ .hcd-payment-info input {
8
+ border-radius: 3px;
9
+ background-color: #F4F4F4;
10
+ }
11
+
12
+ .block-hcd-payment-info {
13
+ text-align: left;
14
+ margin: auto;
15
+ width: 50%;
16
+ padding: 20px;
17
+ border-left: 2px dashed #CCC;
18
+ border-right: 2px dashed #CCC;
19
+ }
20
+
21
+ .hcd-singleline-label {
22
+ display: block;
23
+ }
24
+
25
+ .hcd-payment-info {
26
+ border: 2px solid #E7E7E7;
27
+ padding: 10px;
28
+ }
29
+
30
+ .hcd-payment-desc {
31
+ border-left: 1px dashed #000;
32
+ margin-right: 10px;
33
+ margin-top: 10px;
34
+ margin-bottom: 10px;
35
+ padding: 5px;
36
+ font-style: italic;
37
+ font-size: 11px;
38
+ }
39
+
40
+ .hcd-payment-error {
41
+ color: #f00;
42
+ font-weight: bold
43
+
44
+ }
45
+
46
+ .hco-inline-label {
47
+ display: inline-block;
48
+ }
49
+
50
+ .hcd-use_again {
51
+ margin-right: 5px;
52
+
53
+ }
54
+
55
+ button.btn-hcdmpa-payment-data {
56
+ border: 0;
57
+ height: 46px;
58
+ width: 80px;
59
+ background: url('https://www.mastercard.com/mc_us/wallet/img/en/FR/mp_acc_046px_gif.gif'
60
+ ) 0 0 no-repeat;
61
+ padding: 0 0 0 9px;
62
+ font: bold 15px/40px Arial, Helvetica, sans-serif;
63
+ color: #fff;
64
+ cursor: pointer;
65
+ position: absolute;
66
+ }
67
+
68
+ button.btn-hcdmpa-info {
69
+ border: 0;
70
+ width: 100px;
71
+ height: 28px;
72
+ padding: 0 0 0 9px;
73
+ font: bold 15px/40px Arial, Helvetica, sans-serif;
74
+ color: #fff;
75
+ cursor: pointer;
76
+ }
77
+
78
+ .hcd-masterpass-payment-data {
79
+ margin-left: 85px;
80
+ padding-left: 5px;
81
+ height: 46px;
82
+ }
83
+
84
+ .hcd-masterpass-payment-data-info {
85
+ margin-top: 5px;
86
+ font-size: 12px;
87
+ }
88
+
89
+ .hcdcc_payment_frame {
90
+ border: 0 solid black !important;
91
+ width: 200px;
92
+ height: 200px;
93
+ margin-top: 10px;
94
+ }
95
+
96
+ .hcddc_payment_frame {
97
+ border: 0 solid black !important;
98
+ width: 200px;
99
+ height: 190px;
100
+ margin-top: 10px;
101
+ }
102
+
103
+ .button_hcd {
104
+ float: right;
105
+ }
106
+
107
+ #heidelpay-please-wait img {
108
+ display: inline;
109
+ width: 25px;
110
+ }
 
 
 
skin/frontend/base/default/images/hcd/loading.gif CHANGED
File without changes
skin/frontend/base/default/images/hcd/masterpass_100_28.jpg CHANGED
File without changes
skin/frontend/base/default/images/hcd/masterpass_240_66.jpg CHANGED
File without changes