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
- app/code/community/HeidelpayCD/Edition/Block/Abstract.php +37 -21
- app/code/community/HeidelpayCD/Edition/Block/Button.php +19 -6
- app/code/community/HeidelpayCD/Edition/Block/Form/Creditcard.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/Debit.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/Desconly.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/DirectDebitSecured.php +24 -0
- app/code/community/HeidelpayCD/Edition/Block/Form/Eps.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/Giropay.php +0 -0
- app/code/community/HeidelpayCD/Edition/Block/Form/Ideal.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/InvoiceSecured.php +24 -0
- app/code/community/HeidelpayCD/Edition/Block/Form/Masterpass.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Form/Postfinance.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Index.php +24 -10
- app/code/community/HeidelpayCD/Edition/Block/Info/Debit.php +0 -0
- app/code/community/HeidelpayCD/Edition/Block/Info/DirectDebit.php +24 -0
- app/code/community/HeidelpayCD/Edition/Block/Info/Invoice.php +24 -9
- app/code/community/HeidelpayCD/Edition/Block/Info/Masterpass.php +27 -12
- app/code/community/HeidelpayCD/Edition/Block/Info/Prepayment.php +24 -0
- app/code/community/HeidelpayCD/Edition/Block/Onepage.php +49 -35
- app/code/community/HeidelpayCD/Edition/Block/Onepage/Billing.php +52 -37
- app/code/community/HeidelpayCD/Edition/Block/Onepage/Progress.php +104 -79
- app/code/community/HeidelpayCD/Edition/Block/Onepage/Shipping.php +51 -37
- app/code/community/HeidelpayCD/Edition/Block/Response.php +19 -0
- app/code/community/HeidelpayCD/Edition/Block/Success.php +38 -24
- app/code/community/HeidelpayCD/Edition/Helper/AbstractHelper.php +98 -0
- app/code/community/HeidelpayCD/Edition/Helper/BasketApi.php +136 -0
- app/code/community/HeidelpayCD/Edition/Helper/Data.php +19 -7
- app/code/community/HeidelpayCD/Edition/Helper/OrderState.php +105 -0
- app/code/community/HeidelpayCD/Edition/Helper/Payment.php +309 -551
- app/code/community/HeidelpayCD/Edition/Helper/Validator.php +41 -0
- app/code/community/HeidelpayCD/Edition/Model/Customer.php +24 -12
- app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer.php +23 -9
- app/code/community/HeidelpayCD/Edition/Model/Mysql4/Customer/Collection.php +24 -11
- app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction.php +23 -9
- app/code/community/HeidelpayCD/Edition/Model/Mysql4/Transaction/Collection.php +20 -7
- app/code/community/HeidelpayCD/Edition/Model/Observer.php +196 -122
- app/code/community/HeidelpayCD/Edition/Model/Order/Pdf/Invoice.php +21 -101
- app/code/community/HeidelpayCD/Edition/Model/Payment/Abstract.php +1139 -695
- app/code/community/HeidelpayCD/Edition/Model/Payment/AbstractSecuredPaymentMethods.php +325 -0
- app/code/community/HeidelpayCD/Edition/Model/Payment/HcdDirectDebitSecured.php +105 -0
- app/code/community/HeidelpayCD/Edition/Model/Payment/HcdInvoiceSecured.php +35 -0
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdbs.php +174 -46
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdcc.php +76 -31
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddc.php +67 -32
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcddd.php +79 -113
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdeps.php +55 -45
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdgp.php +22 -82
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdide.php +60 -45
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdiv.php +60 -10
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmk.php +34 -16
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdmpa.php +142 -110
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpal.php +65 -40
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpf.php +56 -35
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdpp.php +183 -28
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdsu.php +33 -14
- app/code/community/HeidelpayCD/Edition/Model/Payment/Hcdyt.php +24 -14
- app/code/community/HeidelpayCD/Edition/Model/Resource/Encryption.php +39 -20
- app/code/community/HeidelpayCD/Edition/Model/Resource/Setup.php +19 -6
- app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Bookingmode.php +31 -12
- app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Recognition.php +32 -15
- app/code/community/HeidelpayCD/Edition/Model/System/Config/Source/Returnurl.php +31 -13
- app/code/community/HeidelpayCD/Edition/Model/Transaction.php +130 -111
- app/code/community/HeidelpayCD/Edition/controllers/.IndexController.php.swp +0 -0
- app/code/community/HeidelpayCD/Edition/controllers/CheckoutController.php +288 -268
- app/code/community/HeidelpayCD/Edition/controllers/IndexController.php +664 -731
- app/code/community/HeidelpayCD/Edition/controllers/ResponseController.php +274 -0
- app/code/community/HeidelpayCD/Edition/etc/config.xml +323 -337
- app/code/community/HeidelpayCD/Edition/etc/system.xml +1373 -1387
- app/code/community/HeidelpayCD/Edition/sql/hcd_setup/install-15.1.30.php +188 -170
- app/design/adminhtml/base/default/template/hcd/info/pdf/directdebit.phtml +40 -0
- app/design/adminhtml/base/default/template/hcd/info/pdf/invoice.phtml +41 -0
- app/design/adminhtml/base/default/template/hcd/info/pdf/prepayment.phtml +40 -0
- app/design/adminhtml/default/default/template/hcd/Info/masterpass.phtml +22 -22
- app/design/adminhtml/default/default/template/hcd/Info/pdf/invoice.phtml +0 -0
- app/design/frontend/base/default/layout/hcd.xml +137 -73
- app/design/frontend/base/default/template/hcd/Info/debit.phtml +0 -0
- app/design/frontend/base/default/template/hcd/Info/masterpass.phtml +0 -0
- app/design/frontend/base/default/template/hcd/Info/pdf/invoice.phtml +0 -6
- app/design/frontend/base/default/template/hcd/button.phtml +0 -0
- app/design/frontend/base/default/template/hcd/form/creditcard.phtml +96 -58
- app/design/frontend/base/default/template/hcd/form/debit.phtml +68 -135
- app/design/frontend/base/default/template/hcd/form/desconly.phtml +22 -6
- app/design/frontend/base/default/template/hcd/form/direct-debit-secured.phtml +147 -0
- app/design/frontend/base/default/template/hcd/form/eps.phtml +60 -38
- app/design/frontend/base/default/template/hcd/form/giropay.phtml +0 -0
- app/design/frontend/base/default/template/hcd/form/ideal.phtml +60 -38
- app/design/frontend/base/default/template/hcd/form/invoice-secured.phtml +118 -0
- app/design/frontend/base/default/template/hcd/form/masterpass.phtml +56 -42
- app/design/frontend/base/default/template/hcd/form/postfinance.phtml +40 -17
- app/design/frontend/base/default/template/hcd/index.phtml +0 -0
- app/design/frontend/base/default/template/hcd/mail/hcd_payment_info.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/billing.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/payment.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/payment/methods.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/progress.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/progress/payment.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/progress/shipping.phtml +0 -0
- app/design/frontend/base/default/template/hcd/onepage/shipping_method.phtml +0 -0
- app/design/frontend/base/default/template/hcd/response.phtml +0 -0
- app/design/frontend/base/default/template/hcd/success.phtml +0 -0
- app/etc/modules/HeidelpayCD_Edition.xml +11 -11
- app/locale/de_DE/HeidelpayCD_Edition.csv +15 -18
- app/locale/en_US/HeidelpayCD_Edition.csv +22 -20
- js/hcd/heidelpaycd.js +139 -121
- js/hcd/heidelpaypci3.js +101 -81
- js/hcd/opcheckout.js +1043 -962
- package.xml +10 -11
- skin/adminhtml/base/default/images/hcd/masterpass_100_28.jpg +0 -0
- skin/frontend/base/default/css/hcdcc_payment_frame.css +4 -4
- skin/frontend/base/default/css/hcddc_payment_frame.css +4 -4
- skin/frontend/base/default/css/heidelpaycd.css +110 -113
- skin/frontend/base/default/images/hcd/loading.gif +0 -0
- skin/frontend/base/default/images/hcd/masterpass_100_28.jpg +0 -0
- 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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
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 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
return $this->
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
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 |
-
|
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 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
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 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
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 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
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 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
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 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
$this->
|
32 |
-
|
33 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
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 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
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 |
-
*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
$
|
206 |
-
$
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
public function
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
$
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
$
|
441 |
-
|
442 |
-
|
443 |
-
$
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
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 |
-
|
4 |
-
|
5 |
-
<version>
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
<class>HeidelpayCD_Edition_Model</class>
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
<class>HeidelpayCD_Edition_Model_Mysql4</class>
|
21 |
<entities>
|
22 |
<transaction>
|
23 |
<table>heidelpay_transaction</table>
|
24 |
</transaction>
|
25 |
-
|
26 |
<table>heidelpay_customer</table>
|
27 |
</customer>
|
28 |
</entities>
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
<
|
34 |
-
|
35 |
-
|
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 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
</resources>
|
60 |
-
|
61 |
<groups>
|
62 |
<hcd>Heidelpay CD-Edition</hcd>
|
63 |
</groups>
|
64 |
</payment>
|
65 |
-
|
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 |
-
|
75 |
-
|
76 |
<controller_action_before>
|
77 |
<class>hcd/observer</class>
|
78 |
<method>handleWalletDataDuringCheckout</method>
|
79 |
</controller_action_before>
|
80 |
</observers>
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
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 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
<title>Kauf auf Rechnung</title>
|
255 |
<active>0</active>
|
256 |
<channel>31HA07BC8142EE6D02715F4CA97DDD8B</channel>
|
257 |
<model>hcd/payment_hcdbs</model>
|
258 |
-
|
259 |
-
|
260 |
<min_amount>0</min_amount>
|
261 |
<max_amount>0</max_amount>
|
262 |
<allowspecific>1</allowspecific>
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
<title>
|
268 |
<active>0</active>
|
269 |
-
<channel>
|
270 |
-
|
271 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
<sort_order>1</sort_order>
|
273 |
<min_amount>10</min_amount>
|
274 |
<max_amount>0</max_amount>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
<allowspecific>1</allowspecific>
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
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 |
-
|
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 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
<
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
<
|
726 |
-
<label>Heidelpay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
727 |
<frontend_type>text</frontend_type>
|
728 |
-
<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 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
</
|
811 |
-
|
812 |
-
|
813 |
-
|
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 Ü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 |
-
*
|
4 |
-
*
|
5 |
-
* @
|
6 |
-
* @copyright
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
'
|
29 |
-
|
30 |
-
'
|
31 |
-
'
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
'
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
'
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
'COMMENT' => "
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
array(
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
'
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
4 |
<reference name="head">
|
5 |
-
<action method="addCss"
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
</reference>
|
8 |
-
</checkout_onepage_index>
|
9 |
-
|
10 |
-
|
11 |
-
<action method="addCss"
|
|
|
|
|
12 |
</reference>
|
13 |
-
|
14 |
-
|
15 |
</reference>
|
16 |
</checkout_onepage_success>
|
17 |
<hcd_index_index>
|
18 |
-
|
19 |
<remove name="left"/>
|
20 |
|
21 |
-
|
22 |
-
|
23 |
</reference>
|
24 |
<reference name="head">
|
25 |
-
<action method="addCss"
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
</reference>
|
28 |
-
|
29 |
</hcd_index_index>
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
</reference>
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
<!--Wallet_Checkout -->
|
52 |
<remove name="left"/>
|
53 |
<reference name="root">
|
54 |
-
<action method="setTemplate"
|
|
|
|
|
55 |
</reference>
|
56 |
-
|
57 |
-
<action method="addCss"
|
|
|
|
|
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"
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
<block type="checkout/onepage_progress" name="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
</block>
|
70 |
</block>
|
71 |
</reference>
|
72 |
<reference name="content">
|
73 |
<block type="hcd/onepage" name="checkout.onepage" template="hcd/onepage.phtml">
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</block>
|
79 |
-
<block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment"
|
80 |
-
|
81 |
-
|
|
|
|
|
|
|
|
|
|
|
82 |
</block>
|
83 |
</block>
|
84 |
-
<block type="checkout/onepage_review" name="checkout.onepage.review" as="review"
|
|
|
85 |
</block>
|
86 |
</reference>
|
87 |
</hcd_checkout_index>
|
88 |
-
|
89 |
-
|
90 |
<remove name="right"/>
|
91 |
<remove name="left"/>
|
92 |
|
93 |
-
<block type="checkout/onepage_payment_methods" name="root" output="toHtml"
|
94 |
-
|
|
|
|
|
|
|
|
|
95 |
</block>
|
96 |
</hcd_checkout_paymentmethod>
|
97 |
-
|
98 |
-
|
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"
|
105 |
-
|
|
|
|
|
|
|
|
|
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"
|
116 |
-
|
|
|
|
|
|
|
|
|
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"
|
127 |
-
|
|
|
|
|
|
|
|
|
128 |
</block>
|
129 |
</hcd_checkout_progress_shipping_method>
|
130 |
|
131 |
<hcd_checkout_progress_payment>
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
<?php
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
*
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
$
|
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 |
-
|
40 |
-
|
41 |
-
|
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 |
-
|
56 |
-
|
57 |
-
|
58 |
-
value="<?php echo $this->htmlEscape((isset( $userData['payment_data']['ACCOUNT.HOLDER'])) ? $userData['payment_data']['ACCOUNT.HOLDER'] :$this->getMethod()->getCustomerName()) ?>" />
|
59 |
-
</div>
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
?>
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
?>
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
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üfnummer"
|
10 |
"pay now","Jetzt Bezahlen"
|
11 |
-
"payment
|
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 ü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ß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ächsten Tagen von folgendem Konto abgebucht:<br /><br />
|
31 |
-
IBAN: {Iban}<br />
|
32 |
-
BIC: {Bic}<br /><br />
|
33 |
<i>Die Abbuchung enthält die Mandatsreferenz-ID: {Ident}<br />
|
34 |
und die Gläubiger ID: {CreditorId}</i><br />
|
35 |
<br />
|
36 |
Bitte sorgen Sie für ausreichende Deckung auf dem entsprechenden Konto."
|
37 |
-
"Invoice Info Text","Bitte ü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überweisung"
|
84 |
-
"Deschcdiv","Sicher
|
85 |
-
"Deschcdmk","Sicher zahlen mit MangirKart"
|
86 |
-
"Deschcdbs","Kaufen Sie jetzt auf Rechnung und begutachten Sie Ihre Einkä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ösung für den Einkauf im Internet von MasterCard, die von Banken und MasterCard direkt bereitgestellt wird. Ihre Kartendaten und Lieferadressen werden an einem geschützten Ort aufbewahrt. Nachdem Sie sich registriert haben, können Sie mit wenigen Klicks sicher online einkaufen."
|
|
|
|
|
89 |
|
90 |
"Return in Errorcase","Rückleitung bei Bezahlfehler"
|
91 |
"Please configurate where your costumer should be redirected to in case of an payment error","Hier kö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 Überweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT Ü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 |
-
"
|
158 |
-
"
|
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ählen Sie eine andere Zahlart"
|
188 |
"HPError-800.300.101","Bitte wä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ü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 ü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ß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ächsten Tagen von folgendem Konto abgebucht:<br /><br />
|
31 |
+
IBAN: {Iban}<br /><br/>
|
|
|
32 |
<i>Die Abbuchung enthält die Mandatsreferenz-ID: {Ident}<br />
|
33 |
und die Gläubiger ID: {CreditorId}</i><br />
|
34 |
<br />
|
35 |
Bitte sorgen Sie für ausreichende Deckung auf dem entsprechenden Konto."
|
36 |
+
"Invoice Info Text","Bitte ü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überweisung"
|
82 |
+
"Deschcdiv","Sicher bezahlen per Rechnungskauf"
|
|
|
|
|
|
|
83 |
"Deschcdmpa","MasterPass ist eine digitale Bezahllösung für den Einkauf im Internet von MasterCard, die von Banken und MasterCard direkt bereitgestellt wird. Ihre Kartendaten und Lieferadressen werden an einem geschützten Ort aufbewahrt. Nachdem Sie sich registriert haben, kö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ückleitung bei Bezahlfehler"
|
88 |
"Please configurate where your costumer should be redirected to in case of an payment error","Hier kö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 Überweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT Ü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ählen Sie eine andere Zahlart"
|
184 |
"HPError-800.300.101","Bitte wä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
|
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
|
74 |
-
"Deschcddc","Pay safe and secure with
|
75 |
-
"Deschcddd","Pay safe and secure with
|
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
|
83 |
-
"Deschcdiv","Pay comfortable with
|
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© digital wallet makes online shopping safe and easy by storing all your payment and shipping information in one convenient and secure place. And it'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 Überweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT Ü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 |
-
"
|
155 |
-
"
|
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© digital wallet makes online shopping safe and easy by storing all your payment and shipping information in one convenient and secure place. And it'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 Überweisung (hcd)","<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAAXNSR0IArs4c6QAAADBQTFRFODg43d3dt7e3KCgoREREU1NTAQEBEhIS////scfeeXl57OzsqKioXV1dk5OTnZ2dfmcBJgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDgsIBJoD8v4AAABKSURBVAjXY5gJBQwzOsCgE53RCmM0AxknQIwGIMOiOyxBA8TgcFson9YCZIRzdHT0JQAZZSA1y4CMIhCjDaQGxOjtxGkFkAFzBgC9LkKOoh4LJgAAAABJRU5ErkJggg==' style='margin-right: 5px'/> Heidelpay CD-Edition SOFORT Ü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 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
//<![CDATA[
|
7 |
var Heidelpay = {};
|
8 |
console.log('Heidelpay CD-Edition');
|
9 |
|
10 |
-
Heidelpay.Registration = Class.create(
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
61 |
|
62 |
new Heidelpay.Registration();
|
63 |
|
64 |
-
Heidelpay.toggle = Class.create(
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
}
|
|
|
|
|
90 |
|
91 |
Heidelpay.toggle.getInstance = function () {
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
|
|
96 |
};
|
97 |
|
98 |
-
Heidelpay.checkIban = Class.create(
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
123 |
}
|
124 |
|
125 |
-
function receiveMessage(e)
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
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 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
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 |
-
*
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*
|
7 |
-
*
|
8 |
-
*
|
9 |
-
*
|
10 |
-
*
|
11 |
-
*
|
12 |
-
*
|
13 |
-
*
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
this.
|
29 |
-
this.
|
30 |
-
|
31 |
-
this.
|
32 |
-
|
33 |
-
this.
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
this.
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
},
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
var
|
93 |
-
|
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 |
-
container
|
106 |
-
container.
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
var
|
113 |
-
|
114 |
-
|
115 |
-
container.
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
//
|
217 |
-
|
218 |
-
//
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
this.
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
this.
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
this.
|
241 |
-
//this.
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
//
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
//
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
}
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
if (
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
else{
|
343 |
-
|
344 |
-
}
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
}
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
},
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
}
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
}
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
return false;
|
609 |
-
}
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
{
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
}
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
if (
|
668 |
-
|
669 |
-
checkout.
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
},
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
},
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
(this.
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
},
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
},
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
if (
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
},
|
899 |
-
|
900 |
-
save: function(){
|
901 |
-
if (checkout.loadWaiting!=false) return;
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
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>
|
5 |
<stability>stable</stability>
|
6 |
-
<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:<br />
|
|
23 |
• Purchase on account (as well secured available if requested)<br />
|
24 |
• Installment payment / financing<br />
|
25 |
• sofortüberweisung.de, giropay, iDeal, EPS, u.a.<br />
|
26 |
-
• Barpay<br />
|
27 |
-
• BillSAFE<br />
|
28 |
-
• MangirKart (TR)<br />
|
29 |
• Paypal<br />
|
30 |
• BaFin-licensed partner for Third-Party-Payment<br />
|
31 |
• Payment Management functions: subscription processing, costumer care systems, debtor management, various payment industry sulotions (i.e. Dating, Travel, apparel)
|
@@ -39,13 +36,15 @@ Telefon: +49 (0) 6221 / 65 170-20<br />
|
|
39 |
E-Mail: sales@heidelpay.de<br />
|
40 |
Internet: www.heidelpay.de<br />
|
41 |
</description>
|
42 |
-
<notes>-
|
43 |
-
-
|
|
|
|
|
44 |
</notes>
|
45 |
<authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
|
46 |
-
<date>
|
47 |
-
<time>
|
48 |
-
<contents><target name="magecommunity"><dir name="HeidelpayCD"><dir name="Edition"><dir name="Block"><file name="Abstract.php" hash="
|
49 |
<compatible/>
|
50 |
-
<dependencies><required><php><min>5.
|
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 |
• Purchase on account (as well secured available if requested)<br />
|
24 |
• Installment payment / financing<br />
|
25 |
• sofortüberweisung.de, giropay, iDeal, EPS, u.a.<br />
|
|
|
|
|
|
|
26 |
• Paypal<br />
|
27 |
• BaFin-licensed partner for Third-Party-Payment<br />
|
28 |
• Payment Management functions: subscription processing, costumer care systems, debtor management, various payment industry sulotions (i.e. Dating, Travel, apparel)
|
36 |
E-Mail: sales@heidelpay.de<br />
|
37 |
Internet: www.heidelpay.de<br />
|
38 |
</description>
|
39 |
+
<notes>- new payment method invoice secured
|
40 |
+
- new payment method direct debit secured
|
41 |
+

|
42 |
+
See CHANGELOG.md for the full list of changes.
|
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 |
-
|
3 |
-
|
4 |
-
|
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 |
-
|
3 |
-
|
4 |
-
|
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 |
-
|
4 |
-
|
5 |
-
}
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
.hcd-payment-desc
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
}
|
39 |
-
|
40 |
-
.hcd-payment-error {
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
}
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
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
|