Version Notes
- Bugfix pending payment transaction has been handled as processed
Download this release
Release Info
Developer | Heidelberger Payment GmbH |
Extension | HeidelpayCDEdition |
Version | 17.6.2 |
Comparing to | |
See all releases |
Code changes from version 17.5.17 to 17.6.2
- app/code/community/HeidelpayCD/Edition/CHANGELOG.md +6 -1
- app/code/community/HeidelpayCD/Edition/Edition/Block/Abstract.php +0 -37
- app/code/community/HeidelpayCD/Edition/Edition/Block/Button.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Creditcard.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Debit.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Desconly.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/DirectDebitSecured.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Eps.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Ideal.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/InvoiceSecured.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Masterpass.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Form/Postfinance.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Index.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Info/DirectDebit.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Info/Invoice.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Info/Masterpass.php +0 -27
- app/code/community/HeidelpayCD/Edition/Edition/Block/Info/Prepayment.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Block/Onepage.php +0 -49
- app/code/community/HeidelpayCD/Edition/Edition/Block/Onepage/Billing.php +0 -52
- app/code/community/HeidelpayCD/Edition/Edition/Block/Onepage/Progress.php +0 -104
- app/code/community/HeidelpayCD/Edition/Edition/Block/Onepage/Shipping.php +0 -51
- app/code/community/HeidelpayCD/Edition/Edition/Block/Response.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Block/Success.php +0 -38
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Abstract.php +0 -37
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Button.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Creditcard.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Debit.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Desconly.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/DirectDebitSecured.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Eps.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Ideal.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/InvoiceSecured.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Masterpass.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Form/Postfinance.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Index.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Info/DirectDebit.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Info/Invoice.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Info/Masterpass.php +0 -27
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Info/Prepayment.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Onepage.php +0 -49
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Onepage/Billing.php +0 -52
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Onepage/Progress.php +0 -104
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Onepage/Shipping.php +0 -51
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Response.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Block/Success.php +0 -38
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/AbstractHelper.php +0 -98
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/BasketApi.php +0 -136
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/Data.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/OrderState.php +0 -105
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/Payment.php +0 -309
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Helper/Validator.php +0 -41
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Customer.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Mysql4/Customer.php +0 -23
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Mysql4/Customer/Collection.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Mysql4/Transaction.php +0 -23
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Mysql4/Transaction/Collection.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Observer.php +0 -196
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Order/Pdf/Invoice.php +0 -21
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Abstract.php +0 -1138
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/AbstractSecuredPaymentMethods.php +0 -325
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/HcdDirectDebitSecured.php +0 -105
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/HcdInvoiceSecured.php +0 -35
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdbs.php +0 -174
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdcc.php +0 -76
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcddc.php +0 -67
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcddd.php +0 -86
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdeps.php +0 -55
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdgp.php +0 -22
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdide.php +0 -60
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdiv.php +0 -60
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdmk.php +0 -34
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdmpa.php +0 -142
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdpal.php +0 -65
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdpf.php +0 -56
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdpp.php +0 -183
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdsu.php +0 -33
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/Hcdyt.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Resource/Encryption.php +0 -39
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Resource/Setup.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/System/Config/Source/Bookingmode.php +0 -31
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/System/Config/Source/Recognition.php +0 -32
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/System/Config/Source/Returnurl.php +0 -31
- app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Transaction.php +0 -130
- app/code/community/HeidelpayCD/Edition/Edition/Edition/controllers/CheckoutController.php +0 -288
- app/code/community/HeidelpayCD/Edition/Edition/Edition/controllers/IndexController.php +0 -664
- app/code/community/HeidelpayCD/Edition/Edition/Edition/controllers/ResponseController.php +0 -274
- app/code/community/HeidelpayCD/Edition/Edition/Edition/etc/config.xml +0 -370
- app/code/community/HeidelpayCD/Edition/Edition/Edition/etc/system.xml +0 -1539
- app/code/community/HeidelpayCD/Edition/Edition/Edition/sql/hcd_setup/install-15.1.30.php +0 -188
- app/code/community/HeidelpayCD/Edition/Edition/Helper/AbstractHelper.php +0 -98
- app/code/community/HeidelpayCD/Edition/Edition/Helper/BasketApi.php +0 -136
- app/code/community/HeidelpayCD/Edition/Edition/Helper/Data.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Helper/OrderState.php +0 -105
- app/code/community/HeidelpayCD/Edition/Edition/Helper/Payment.php +0 -309
- app/code/community/HeidelpayCD/Edition/Edition/Helper/Validator.php +0 -41
- app/code/community/HeidelpayCD/Edition/Edition/Model/Customer.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Model/Mysql4/Customer.php +0 -23
- app/code/community/HeidelpayCD/Edition/Edition/Model/Mysql4/Customer/Collection.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Model/Mysql4/Transaction.php +0 -23
- app/code/community/HeidelpayCD/Edition/Edition/Model/Mysql4/Transaction/Collection.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Model/Observer.php +0 -196
- app/code/community/HeidelpayCD/Edition/Edition/Model/Order/Pdf/Invoice.php +0 -21
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Abstract.php +0 -1138
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/AbstractSecuredPaymentMethods.php +0 -325
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/HcdDirectDebitSecured.php +0 -105
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/HcdInvoiceSecured.php +0 -35
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdbs.php +0 -174
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdcc.php +0 -76
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcddc.php +0 -67
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcddd.php +0 -86
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdeps.php +0 -55
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdgp.php +0 -22
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdide.php +0 -60
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdiv.php +0 -60
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdmk.php +0 -34
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdmpa.php +0 -142
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdpal.php +0 -65
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdpf.php +0 -56
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdpp.php +0 -183
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdsu.php +0 -33
- app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/Hcdyt.php +0 -24
- app/code/community/HeidelpayCD/Edition/Edition/Model/Resource/Encryption.php +0 -39
- app/code/community/HeidelpayCD/Edition/Edition/Model/Resource/Setup.php +0 -19
- app/code/community/HeidelpayCD/Edition/Edition/Model/System/Config/Source/Bookingmode.php +0 -31
- app/code/community/HeidelpayCD/Edition/Edition/Model/System/Config/Source/Recognition.php +0 -32
- app/code/community/HeidelpayCD/Edition/Edition/Model/System/Config/Source/Returnurl.php +0 -31
- app/code/community/HeidelpayCD/Edition/Edition/Model/Transaction.php +0 -130
- app/code/community/HeidelpayCD/Edition/Edition/controllers/CheckoutController.php +0 -288
- app/code/community/HeidelpayCD/Edition/Edition/controllers/IndexController.php +0 -664
- app/code/community/HeidelpayCD/Edition/Edition/controllers/ResponseController.php +0 -274
- app/code/community/HeidelpayCD/Edition/Edition/etc/config.xml +0 -370
- app/code/community/HeidelpayCD/Edition/Edition/etc/system.xml +0 -1539
- app/code/community/HeidelpayCD/Edition/Edition/sql/hcd_setup/install-15.1.30.php +0 -188
- app/code/community/HeidelpayCD/Edition/Helper/OrderState.php +3 -1
- app/code/community/HeidelpayCD/Edition/README.md +9 -7
- app/code/community/HeidelpayCD/Edition/etc/config.xml +1 -1
- package.xml +5 -5
app/code/community/HeidelpayCD/Edition/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
# Release Notes - heidelpay extension for Magento 1
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
## v17.5.17
|
4 |
|
5 |
### Fixed
|
@@ -30,4 +35,4 @@
|
|
30 |
- payment method yapital is not longer available. The model will not be removed because of backwards capability.
|
31 |
- payment method MangirKart is not longer available. The model will not be removed because of backwards capability.
|
32 |
### direct debit
|
33 |
-
- bic is not longer necessary for the 23 SEPA countries
|
1 |
# Release Notes - heidelpay extension for Magento 1
|
2 |
|
3 |
+
## v17.6.2
|
4 |
+
|
5 |
+
### Fixed
|
6 |
+
- pending payment transaction has been handled as processed
|
7 |
+
|
8 |
## v17.5.17
|
9 |
|
10 |
### Fixed
|
35 |
- payment method yapital is not longer available. The model will not be removed because of backwards capability.
|
36 |
- payment method MangirKart is not longer available. The model will not be removed because of backwards capability.
|
37 |
### direct debit
|
38 |
+
- bic is not longer necessary for the 23 SEPA countries
|
app/code/community/HeidelpayCD/Edition/Edition/Block/Abstract.php
DELETED
@@ -1,37 +0,0 @@
|
|
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/Edition/Block/Button.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Block/Form/Creditcard.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Debit.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Desconly.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/DirectDebitSecured.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Eps.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Ideal.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/InvoiceSecured.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Masterpass.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Form/Postfinance.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Index.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Info/DirectDebit.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Info/Invoice.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Info/Masterpass.php
DELETED
@@ -1,27 +0,0 @@
|
|
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/Edition/Block/Info/Prepayment.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Block/Onepage.php
DELETED
@@ -1,49 +0,0 @@
|
|
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/Edition/Block/Onepage/Billing.php
DELETED
@@ -1,52 +0,0 @@
|
|
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/Edition/Block/Onepage/Progress.php
DELETED
@@ -1,104 +0,0 @@
|
|
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/Edition/Block/Onepage/Shipping.php
DELETED
@@ -1,51 +0,0 @@
|
|
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/Edition/Block/Response.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Block/Success.php
DELETED
@@ -1,38 +0,0 @@
|
|
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/Edition/Edition/Block/Abstract.php
DELETED
@@ -1,37 +0,0 @@
|
|
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/Edition/Edition/Block/Button.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Creditcard.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Debit.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Desconly.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/DirectDebitSecured.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Eps.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Ideal.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/InvoiceSecured.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Masterpass.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Form/Postfinance.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Index.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Info/DirectDebit.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Info/Invoice.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Info/Masterpass.php
DELETED
@@ -1,27 +0,0 @@
|
|
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/Edition/Edition/Block/Info/Prepayment.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Block/Onepage.php
DELETED
@@ -1,49 +0,0 @@
|
|
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/Edition/Edition/Block/Onepage/Billing.php
DELETED
@@ -1,52 +0,0 @@
|
|
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/Edition/Edition/Block/Onepage/Progress.php
DELETED
@@ -1,104 +0,0 @@
|
|
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/Edition/Edition/Block/Onepage/Shipping.php
DELETED
@@ -1,51 +0,0 @@
|
|
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/Edition/Edition/Block/Response.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Edition/Block/Success.php
DELETED
@@ -1,38 +0,0 @@
|
|
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/Edition/Edition/Helper/AbstractHelper.php
DELETED
@@ -1,98 +0,0 @@
|
|
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/Edition/Edition/Helper/BasketApi.php
DELETED
@@ -1,136 +0,0 @@
|
|
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/Edition/Edition/Helper/Data.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Edition/Helper/OrderState.php
DELETED
@@ -1,105 +0,0 @@
|
|
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/Edition/Edition/Helper/Payment.php
DELETED
@@ -1,309 +0,0 @@
|
|
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/Edition/Edition/Helper/Validator.php
DELETED
@@ -1,41 +0,0 @@
|
|
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/Edition/Edition/Model/Customer.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Model/Mysql4/Customer.php
DELETED
@@ -1,23 +0,0 @@
|
|
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/Edition/Edition/Model/Mysql4/Customer/Collection.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Model/Mysql4/Transaction.php
DELETED
@@ -1,23 +0,0 @@
|
|
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/Edition/Edition/Model/Mysql4/Transaction/Collection.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Model/Observer.php
DELETED
@@ -1,196 +0,0 @@
|
|
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/Edition/Edition/Model/Order/Pdf/Invoice.php
DELETED
@@ -1,21 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Abstract.php
DELETED
@@ -1,1138 +0,0 @@
|
|
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 |
-
if ($this->canCapture()) {
|
729 |
-
$authorisationModel = Mage::getModel('hcd/transaction');
|
730 |
-
/**
|
731 |
-
* @var $authorisation HeidelpayCD_Edition_Model_Transaction
|
732 |
-
*/
|
733 |
-
$authorisation = $authorisationModel->getOneTransactionByMethode(
|
734 |
-
$order->getRealOrderId(),
|
735 |
-
'PA'
|
736 |
-
);
|
737 |
-
|
738 |
-
|
739 |
-
if ($authorisation === false) {
|
740 |
-
Mage::throwException(Mage::helper('hcd')->__('This Transaction could not be capture online.'));
|
741 |
-
return $this;
|
742 |
-
}
|
743 |
-
|
744 |
-
$config = $this->getMainConfig($this->_code, $authorisation['CRITERION_STOREID']);
|
745 |
-
$config['PAYMENT.TYPE'] = 'CP';
|
746 |
-
|
747 |
-
|
748 |
-
$frontend = $this->getFrontend($order->getRealOrderId(), $authorisation['CRITERION_STOREID']);
|
749 |
-
$frontend['FRONTEND.MODE'] = 'DEFAULT';
|
750 |
-
$frontend['FRONTEND.ENABLED'] = 'false';
|
751 |
-
|
752 |
-
$user = $this->getUser($order, true);
|
753 |
-
$basketdetails = ($this->_code == 'hcdbs') ? true : false; // If billsafe set to fin
|
754 |
-
$basketData = $this->getBasketData($order, $basketdetails, $amount);
|
755 |
-
|
756 |
-
$basketData['IDENTIFICATION.REFERENCEID'] = $authorisation['IDENTIFICATION_UNIQUEID'];
|
757 |
-
Mage::dispatchEvent(
|
758 |
-
'heidelpay_capture_bevor_preparePostData', array(
|
759 |
-
'payment' => $payment,
|
760 |
-
'config' => $config,
|
761 |
-
'frontend' => $frontend,
|
762 |
-
'user' => $user,
|
763 |
-
'basketData' => $basketData,
|
764 |
-
'criterion' => $criterion
|
765 |
-
)
|
766 |
-
);
|
767 |
-
$params = Mage::helper('hcd/payment')->preparePostData(
|
768 |
-
$config, $frontend, $user, $basketData,
|
769 |
-
$criterion
|
770 |
-
);
|
771 |
-
|
772 |
-
|
773 |
-
$this->log("doRequest url : " . $config['URL']);
|
774 |
-
$this->log("doRequest params : " . json_encode($params));
|
775 |
-
|
776 |
-
$src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
|
777 |
-
|
778 |
-
$this->log("doRequest response : " . json_encode($src));
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
if ($src['PROCESSING_RESULT'] == "NOK") {
|
783 |
-
Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
|
784 |
-
return $this;
|
785 |
-
}
|
786 |
-
|
787 |
-
$payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
|
788 |
-
Mage::getModel('hcd/transaction')->saveTransactionData($src);
|
789 |
-
}
|
790 |
-
|
791 |
-
return $this;
|
792 |
-
}
|
793 |
-
|
794 |
-
/**
|
795 |
-
* Calculate weather a order can be captured or not
|
796 |
-
*
|
797 |
-
* @return bool canCapture
|
798 |
-
*/
|
799 |
-
public function canCapture()
|
800 |
-
{
|
801 |
-
//check weather this payment method supports capture
|
802 |
-
|
803 |
-
if ($this->_canCapture === false) {
|
804 |
-
return false;
|
805 |
-
}
|
806 |
-
|
807 |
-
// prevent frontend to capture an amount in case of direct booking with automatical invoice
|
808 |
-
if (Mage::app()->getStore()->getId() != 0) {
|
809 |
-
$this->log('try to capture amount in frontend ... this is not necessary !');
|
810 |
-
return false;
|
811 |
-
}
|
812 |
-
|
813 |
-
// loading order object to check wether this
|
814 |
-
$orderIncrementId = Mage::app()->getRequest()->getParam('order_id');
|
815 |
-
$this->log('$orderIncrementId ' . $orderIncrementId);
|
816 |
-
/**
|
817 |
-
* @var $order Mage_Sales_Model_Order order object
|
818 |
-
*/
|
819 |
-
$order = Mage::getModel('sales/order');
|
820 |
-
$order->loadByAttribute('entity_id', (int)$orderIncrementId);
|
821 |
-
/**
|
822 |
-
* @var $transaction HeidelpayCD_Edition_Model_Transaction
|
823 |
-
*/
|
824 |
-
$transaction = Mage::getModel('hcd/transaction');
|
825 |
-
if ($transaction->getOneTransactionByMethode($order->getRealOrderId(), 'PA') === false) {
|
826 |
-
$this->log('there is no preauthorisation for the order ' . $order->getRealOrderId());
|
827 |
-
return false;
|
828 |
-
}
|
829 |
-
|
830 |
-
return true;
|
831 |
-
}
|
832 |
-
|
833 |
-
/**
|
834 |
-
* Api call for refunding a given invoice
|
835 |
-
*
|
836 |
-
* @param Mage_Sales_Model_Order_Payment $payment current payment object
|
837 |
-
* @param float $amount amount to refund
|
838 |
-
*
|
839 |
-
* @return $this
|
840 |
-
*/
|
841 |
-
public function refund(Varien_Object $payment, $amount)
|
842 |
-
{
|
843 |
-
/** @var $order Mage_Sales_Model_Order */
|
844 |
-
$order = $payment->getOrder();
|
845 |
-
|
846 |
-
/** @var $transaction HeidelpayCD_Edition_Model_Transaction */
|
847 |
-
$transaction = Mage::getModel('hcd/transaction');
|
848 |
-
$captureData = $transaction->loadLastTransactionDataByUniqeId((string)$payment->getRefundTransactionId());
|
849 |
-
|
850 |
-
$config = $this->getMainConfig($this->_code, $captureData['CRITERION_STOREID']);
|
851 |
-
$config['PAYMENT.TYPE'] = 'RF';
|
852 |
-
$frontend = $this->getFrontend($order->getRealOrderId(), $captureData['CRITERION_STOREID']);
|
853 |
-
$frontend['FRONTEND.MODE'] = 'DEFAULT';
|
854 |
-
$frontend['FRONTEND.ENABLED'] = 'false';
|
855 |
-
$user = $this->getUser($order, true);
|
856 |
-
$basketData = $this->getBasketData($order, false, $amount);
|
857 |
-
$basketData['IDENTIFICATION.REFERENCEID'] = (string)$payment->getRefundTransactionId();
|
858 |
-
$params = Mage::helper('hcd/payment')->preparePostData(
|
859 |
-
$config, $frontend, $user, $basketData,
|
860 |
-
$criterion = array()
|
861 |
-
);
|
862 |
-
$this->log("doRequest url : " . $config['URL']);
|
863 |
-
$this->log("doRequest params : " . json_encode($params));
|
864 |
-
|
865 |
-
$src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
|
866 |
-
$this->log("doRequest response : " . json_encode($src));
|
867 |
-
if ($src['PROCESSING_RESULT'] == "NOK") {
|
868 |
-
Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
|
869 |
-
return $this;
|
870 |
-
}
|
871 |
-
|
872 |
-
$payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
|
873 |
-
Mage::getModel('hcd/transaction')->saveTransactionData($src);
|
874 |
-
return $this;
|
875 |
-
}
|
876 |
-
|
877 |
-
/**
|
878 |
-
* Getter for customer given plus family name
|
879 |
-
*
|
880 |
-
* @param $session Mage_Checkout_Model_Session checkout session
|
881 |
-
*
|
882 |
-
* @return string given plus family name
|
883 |
-
*/
|
884 |
-
public function getCustomerName($session = false)
|
885 |
-
{
|
886 |
-
if ($session === true) {
|
887 |
-
$session = $this->getCheckout();
|
888 |
-
return $session->getQuote()->getBillingAddress()->getFirstname() . ' '
|
889 |
-
. $session->getQuote()->getBillingAddress()->getLastname();
|
890 |
-
}
|
891 |
-
|
892 |
-
return $this->getQuote()->getBillingAddress()->getFirstname() . ' '
|
893 |
-
. $this->getQuote()->getBillingAddress()->getLastname();
|
894 |
-
}
|
895 |
-
|
896 |
-
/**
|
897 |
-
* Save additional payment data of the customer to the database
|
898 |
-
*
|
899 |
-
* @param $data array additional payment information of the customer
|
900 |
-
* @param $uniqeID string payment reference of a account registration
|
901 |
-
*/
|
902 |
-
public function saveCustomerData($data, $uniqeID = null)
|
903 |
-
{
|
904 |
-
/** @var $customerData HeidelpayCD_Edition_Model_Customer */
|
905 |
-
$customerData = Mage::getModel('hcd/customer');
|
906 |
-
|
907 |
-
if ($this->getCustomerData() !== false) {
|
908 |
-
$lastdata = $this->getCustomerData();
|
909 |
-
$customerData->load($lastdata['id']);
|
910 |
-
}
|
911 |
-
|
912 |
-
$this->log('StoreID :' . Mage::app()->getStore()->getId());
|
913 |
-
$customerId = $this->getQuote()->getBillingAddress()->getCustomerId();
|
914 |
-
$storeId = Mage::app()->getStore()->getId();
|
915 |
-
if ($customerId == 0) {
|
916 |
-
$visitorData = Mage::getSingleton('core/session')->getVisitorData();
|
917 |
-
$customerId = $visitorData['visitor_id'];
|
918 |
-
$storeId = 0;
|
919 |
-
}
|
920 |
-
|
921 |
-
$customerData->setPaymentmethode($this->_code);
|
922 |
-
$customerData->setUniqeid($uniqeID);
|
923 |
-
$customerData->setCustomerid($customerId);
|
924 |
-
$customerData->setStoreid($storeId);
|
925 |
-
$data['SHIPPPING_HASH'] = $this->getShippingHash();
|
926 |
-
$customerData->setPaymentData(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
|
927 |
-
|
928 |
-
$customerData->save();
|
929 |
-
}
|
930 |
-
|
931 |
-
/**
|
932 |
-
* Generates a customer message for the success page
|
933 |
-
*
|
934 |
-
* Will be used for prepayment and direct debit to show the customer
|
935 |
-
* the billing information
|
936 |
-
*
|
937 |
-
* @param $paymentData transaction details form heidelpay api
|
938 |
-
*
|
939 |
-
* @return bool| string customer message for the success page
|
940 |
-
*/
|
941 |
-
public function showPaymentInfo($paymentData)
|
942 |
-
{
|
943 |
-
/*
|
944 |
-
* This function should not be modified please overwrite this function
|
945 |
-
* in the class of the used payment method !!!
|
946 |
-
*/
|
947 |
-
return false;
|
948 |
-
}
|
949 |
-
|
950 |
-
/**
|
951 |
-
* Handle charge back notices from heidelpay payment
|
952 |
-
*
|
953 |
-
* @param $order Mage_Sales_Model_Order
|
954 |
-
* @param $message string order history message
|
955 |
-
*
|
956 |
-
* @return Mage_Sales_Model_Order
|
957 |
-
*/
|
958 |
-
public function chargeBackTransaction($order, $message="")
|
959 |
-
{
|
960 |
-
// message block for direct debit charge back
|
961 |
-
if ($order->hasInvoices()) {
|
962 |
-
$invIncrementIDs = array();
|
963 |
-
/** @var $invoice Mage_Sales_Model_Order_Invoice */
|
964 |
-
foreach ($order->getInvoiceCollection() as $invoice) {
|
965 |
-
$this->log('Invoice Number ' . (string)$invoice->getIncrementId());
|
966 |
-
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
|
967 |
-
$invoice->setIsPaid(false);
|
968 |
-
// @codingStandardsIgnoreLine use of save in a loop
|
969 |
-
$invoice->save();
|
970 |
-
}
|
971 |
-
|
972 |
-
$order->setIsInProcess(false);
|
973 |
-
$order->setTotalInvoiced(0);
|
974 |
-
$order->setTotalPaid(0);
|
975 |
-
}
|
976 |
-
|
977 |
-
$order->setState(
|
978 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(false),
|
979 |
-
true,
|
980 |
-
$message
|
981 |
-
);
|
982 |
-
|
983 |
-
return $order;
|
984 |
-
}
|
985 |
-
|
986 |
-
/**
|
987 |
-
* Handle transaction with an not ok status
|
988 |
-
*
|
989 |
-
* @param $order Mage_Sales_Model_Order
|
990 |
-
* @param $message string order history message
|
991 |
-
*
|
992 |
-
* @return Mage_Sales_Model_Order
|
993 |
-
*/
|
994 |
-
public function canceledTransaction($order, $message)
|
995 |
-
{
|
996 |
-
if ($order->canCancel()) {
|
997 |
-
$order->cancel();
|
998 |
-
|
999 |
-
$order->setState(
|
1000 |
-
$order->getPayment()->getMethodInstance()->getStatusError(false),
|
1001 |
-
$order->getPayment()->getMethodInstance()->getStatusError(true),
|
1002 |
-
$message
|
1003 |
-
);
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
return $order;
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
/**
|
1010 |
-
* Handle transaction with means processing
|
1011 |
-
*
|
1012 |
-
* @param $order Mage_Sales_Model_Order
|
1013 |
-
* @param $data HeidelpayCD_Edition_Model_Transaction
|
1014 |
-
* @param $message string order history message
|
1015 |
-
*
|
1016 |
-
* @return Mage_Sales_Model_Order
|
1017 |
-
*/
|
1018 |
-
public function processingTransaction($order, $data, $message='')
|
1019 |
-
{
|
1020 |
-
|
1021 |
-
/** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
|
1022 |
-
$paymentHelper = Mage::helper('hcd/payment');
|
1023 |
-
|
1024 |
-
|
1025 |
-
$message = ($message === '') ? 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] : $message;
|
1026 |
-
$totallyPaid = false;
|
1027 |
-
|
1028 |
-
$order->getPayment()
|
1029 |
-
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
|
1030 |
-
->setParentTransactionId($order->getPayment()->getLastTransId())
|
1031 |
-
->setIsTransactionClosed(true);
|
1032 |
-
|
1033 |
-
if ($paymentHelper->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and
|
1034 |
-
$order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']
|
1035 |
-
) {
|
1036 |
-
$order->setState(
|
1037 |
-
$order->getPayment()->getMethodInstance()->getStatusSuccess(false),
|
1038 |
-
$order->getPayment()->getMethodInstance()->getStatusSuccess(true),
|
1039 |
-
$message
|
1040 |
-
);
|
1041 |
-
$totallyPaid = true;
|
1042 |
-
} else {
|
1043 |
-
/*
|
1044 |
-
* in case rc is ack and amount is to low or currency miss match
|
1045 |
-
*/
|
1046 |
-
$order->setState(
|
1047 |
-
$order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
|
1048 |
-
$order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
|
1049 |
-
$message
|
1050 |
-
);
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
$code = $order->getPayment()->getMethodInstance()->getCode();
|
1054 |
-
|
1055 |
-
$path = "payment/" . $code . "/";
|
1056 |
-
$autoInvoice = (Mage::getStoreConfig($path . "invioce", $data['CRITERION_STOREID']) == 1) ? true : false;
|
1057 |
-
|
1058 |
-
$this->log('Auto invoiced :'. (string) $autoInvoice);
|
1059 |
-
|
1060 |
-
if ($order->canInvoice() and ($autoInvoice or $code == 'hcdbs') and $totallyPaid === true) {
|
1061 |
-
$invoice = $order->prepareInvoice();
|
1062 |
-
$invoice->register()->capture();
|
1063 |
-
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
|
1064 |
-
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
|
1065 |
-
$invoice->setIsPaid(true);
|
1066 |
-
$order->setIsInProcess(true);
|
1067 |
-
$order->addStatusHistoryComment(
|
1068 |
-
Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
|
1069 |
-
false
|
1070 |
-
);
|
1071 |
-
$invoice->save();
|
1072 |
-
|
1073 |
-
if ($this->_invoiceOrderEmail) {
|
1074 |
-
if ($code != 'hcdpp' and $code != 'hcdiv') {
|
1075 |
-
$info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
|
1076 |
-
$invoiceMailComment = ($info === false) ? '' : '<h3>'
|
1077 |
-
. $this->_getHelper()->__('Payment Information') . '</h3>' . $info . '<br/>';
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
$invoice->sendEmail(true, $invoiceMailComment); // send invoice mail
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
|
1084 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
1085 |
-
->addObject($invoice)
|
1086 |
-
->addObject($invoice->getOrder());
|
1087 |
-
$transactionSave->save();
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
$order->getPayment()->addTransaction(
|
1091 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
|
1092 |
-
null,
|
1093 |
-
true,
|
1094 |
-
$message
|
1095 |
-
);
|
1096 |
-
|
1097 |
-
$order->setIsInProcess(true);
|
1098 |
-
|
1099 |
-
return $order;
|
1100 |
-
}
|
1101 |
-
|
1102 |
-
/**
|
1103 |
-
* Handle transaction with means pending
|
1104 |
-
*
|
1105 |
-
* @param $order Mage_Sales_Model_Order
|
1106 |
-
* @param $data HeidelpayCD_Edition_Model_Transaction
|
1107 |
-
* @param $message string order history message
|
1108 |
-
*
|
1109 |
-
* @return Mage_Sales_Model_Order
|
1110 |
-
*/
|
1111 |
-
public function pendingTransaction($order, $data, $message='')
|
1112 |
-
{
|
1113 |
-
$message = 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] .' '.$message;
|
1114 |
-
|
1115 |
-
$order->getPayment()->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
|
1116 |
-
|
1117 |
-
$order->getPayment()->setIsTransactionClosed(0);
|
1118 |
-
|
1119 |
-
$order->getPayment()->setTransactionAdditionalInfo(
|
1120 |
-
Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,
|
1121 |
-
null
|
1122 |
-
);
|
1123 |
-
|
1124 |
-
$this->log('Set Transaction to Pending : ');
|
1125 |
-
$order->setState(
|
1126 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(false),
|
1127 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(true),
|
1128 |
-
$message
|
1129 |
-
);
|
1130 |
-
$order->getPayment()->addTransaction(
|
1131 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
|
1132 |
-
null,
|
1133 |
-
true,
|
1134 |
-
$message
|
1135 |
-
);
|
1136 |
-
return $order;
|
1137 |
-
}
|
1138 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/HeidelpayCD/Edition/Edition/Edition/Model/Payment/AbstractSecuredPaymentMethods.php
DELETED
@@ -1,325 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/HcdDirectDebitSecured.php
DELETED
@@ -1,105 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/HcdInvoiceSecured.php
DELETED
@@ -1,35 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdbs.php
DELETED
@@ -1,174 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdcc.php
DELETED
@@ -1,76 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcddc.php
DELETED
@@ -1,67 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcddd.php
DELETED
@@ -1,86 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdeps.php
DELETED
@@ -1,55 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdgp.php
DELETED
@@ -1,22 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdide.php
DELETED
@@ -1,60 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdiv.php
DELETED
@@ -1,60 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdmk.php
DELETED
@@ -1,34 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdmpa.php
DELETED
@@ -1,142 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdpal.php
DELETED
@@ -1,65 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdpf.php
DELETED
@@ -1,56 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdpp.php
DELETED
@@ -1,183 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdsu.php
DELETED
@@ -1,33 +0,0 @@
|
|
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/Edition/Edition/Model/Payment/Hcdyt.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Edition/Model/Resource/Encryption.php
DELETED
@@ -1,39 +0,0 @@
|
|
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/Edition/Edition/Model/Resource/Setup.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Edition/Model/System/Config/Source/Bookingmode.php
DELETED
@@ -1,31 +0,0 @@
|
|
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/Edition/Edition/Model/System/Config/Source/Recognition.php
DELETED
@@ -1,32 +0,0 @@
|
|
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/Edition/Edition/Model/System/Config/Source/Returnurl.php
DELETED
@@ -1,31 +0,0 @@
|
|
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/Edition/Edition/Model/Transaction.php
DELETED
@@ -1,130 +0,0 @@
|
|
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/Edition/Edition/controllers/CheckoutController.php
DELETED
@@ -1,288 +0,0 @@
|
|
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/Edition/Edition/controllers/IndexController.php
DELETED
@@ -1,664 +0,0 @@
|
|
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/Edition/Edition/controllers/ResponseController.php
DELETED
@@ -1,274 +0,0 @@
|
|
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/Edition/Edition/etc/config.xml
DELETED
@@ -1,370 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<HeidelpayCD_Edition>
|
5 |
-
<version>17.5.17</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>
|
62 |
-
<class>hcd/observer</class>
|
63 |
-
<method>removeWalletDataFromCheckout</method>
|
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/Edition/Edition/etc/system.xml
DELETED
@@ -1,1539 +0,0 @@
|
|
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>
|
26 |
-
<p></p> <p style="font-size:12px">Die Heidelberger Payment GmbH kurz: heidelpay bietet als BaFin-zertifizierter Payment Service Provider alles was zum Online-Payment gehört.<br /><br />
|
27 |
-
<a href="http://testshops.heidelpay.de/contactform/?campaign=MagentoWL&shop=Magento" target="_blank" style="font-size: 12px; color: #000; font-weight: bold;">>>> Informationen anfordern <<<</a>
|
28 |
-
<br /></p><p><br /> </p><p style="font-size:12px">Das Leistungsspektrum des PCI DSS zertifizierten Unternehmens reicht von weltweiten e-Payment Lösungen, inklusive eines vollständigen Debitorenmanagement-, Risk- und Fraud- Systems
|
29 |
-
bis hin zu einem breiten Angebot alternativer Bezahlverfahren - schnell, sicher, einfach und umfassend - alles aus einer Hand.</p><br />
|
30 |
-
<a href="http://www.heidelpay.de" target="_blank" style="font-size: 12px; color: #000; font-weight: bold;">www.heidelpay.de</a>
|
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>
|
728 |
-
<show_in_default>1</show_in_default>
|
729 |
-
<show_in_website>1</show_in_website>
|
730 |
-
<show_in_store>1</show_in_store>
|
731 |
-
<fields>
|
732 |
-
<title translate="label">
|
733 |
-
<label>Title</label>
|
734 |
-
<frontend_type>text</frontend_type>
|
735 |
-
<sort_order>10</sort_order>
|
736 |
-
<show_in_default>1</show_in_default>
|
737 |
-
<show_in_website>1</show_in_website>
|
738 |
-
<show_in_store>1</show_in_store>
|
739 |
-
</title>
|
740 |
-
<active translate="label">
|
741 |
-
<label>Enabled</label>
|
742 |
-
<frontend_type>select</frontend_type>
|
743 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
744 |
-
<sort_order>20</sort_order>
|
745 |
-
<show_in_default>1</show_in_default>
|
746 |
-
<show_in_website>1</show_in_website>
|
747 |
-
<show_in_store>1</show_in_store>
|
748 |
-
</active>
|
749 |
-
<channel translate="label">
|
750 |
-
<label>Channel ID</label>
|
751 |
-
<frontend_type>text</frontend_type>
|
752 |
-
<sort_order>40</sort_order>
|
753 |
-
<show_in_default>1</show_in_default>
|
754 |
-
<show_in_website>1</show_in_website>
|
755 |
-
<show_in_store>1</show_in_store>
|
756 |
-
</channel>
|
757 |
-
<sort_order translate="label">
|
758 |
-
<label>Sort order</label>
|
759 |
-
<frontend_type>text</frontend_type>
|
760 |
-
<sort_order>110</sort_order>
|
761 |
-
<show_in_default>1</show_in_default>
|
762 |
-
<show_in_website>1</show_in_website>
|
763 |
-
<show_in_store>1</show_in_store>
|
764 |
-
</sort_order>
|
765 |
-
<min_amount translate="label">
|
766 |
-
<label>Minimum Amount (CENT)</label>
|
767 |
-
<frontend_type>text</frontend_type>
|
768 |
-
<sort_order>120</sort_order>
|
769 |
-
<show_in_default>1</show_in_default>
|
770 |
-
<show_in_website>1</show_in_website>
|
771 |
-
<show_in_store>1</show_in_store>
|
772 |
-
</min_amount>
|
773 |
-
<max_amount translate="label">
|
774 |
-
<label>Maximum Amount (CENT)</label>
|
775 |
-
<frontend_type>text</frontend_type>
|
776 |
-
<sort_order>130</sort_order>
|
777 |
-
<show_in_default>1</show_in_default>
|
778 |
-
<show_in_website>1</show_in_website>
|
779 |
-
<show_in_store>1</show_in_store>
|
780 |
-
</max_amount>
|
781 |
-
<allowspecific translate="label">
|
782 |
-
<label>allow specific countries</label>
|
783 |
-
<frontend_type>allowspecific</frontend_type>
|
784 |
-
<sort_order>140</sort_order>
|
785 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
786 |
-
<show_in_default>1</show_in_default>
|
787 |
-
<show_in_website>1</show_in_website>
|
788 |
-
<show_in_store>1</show_in_store>
|
789 |
-
</allowspecific>
|
790 |
-
<specificcountry translate="label">
|
791 |
-
<label>specific countries</label>
|
792 |
-
<frontend_type>multiselect</frontend_type>
|
793 |
-
<sort_order>150</sort_order>
|
794 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
795 |
-
<show_in_default>1</show_in_default>
|
796 |
-
<show_in_website>1</show_in_website>
|
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>
|
1438 |
-
<fields>
|
1439 |
-
<title translate="label">
|
1440 |
-
<label>Title</label>
|
1441 |
-
<frontend_type>text</frontend_type>
|
1442 |
-
<sort_order>10</sort_order>
|
1443 |
-
<show_in_default>1</show_in_default>
|
1444 |
-
<show_in_website>1</show_in_website>
|
1445 |
-
<show_in_store>1</show_in_store>
|
1446 |
-
</title>
|
1447 |
-
<active translate="label">
|
1448 |
-
<label>Enabled</label>
|
1449 |
-
<frontend_type>select</frontend_type>
|
1450 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1451 |
-
<sort_order>20</sort_order>
|
1452 |
-
<show_in_default>1</show_in_default>
|
1453 |
-
<show_in_website>1</show_in_website>
|
1454 |
-
<show_in_store>1</show_in_store>
|
1455 |
-
</active>
|
1456 |
-
<channel translate="label">
|
1457 |
-
<label>Channel ID</label>
|
1458 |
-
<frontend_type>text</frontend_type>
|
1459 |
-
<sort_order>40</sort_order>
|
1460 |
-
<show_in_default>1</show_in_default>
|
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>
|
1496 |
-
<show_in_default>1</show_in_default>
|
1497 |
-
<show_in_website>1</show_in_website>
|
1498 |
-
<show_in_store>1</show_in_store>
|
1499 |
-
</sort_order>
|
1500 |
-
<min_amount translate="label">
|
1501 |
-
<label>Minimum Amount (CENT)</label>
|
1502 |
-
<frontend_type>text</frontend_type>
|
1503 |
-
<sort_order>120</sort_order>
|
1504 |
-
<show_in_default>1</show_in_default>
|
1505 |
-
<show_in_website>1</show_in_website>
|
1506 |
-
<show_in_store>1</show_in_store>
|
1507 |
-
</min_amount>
|
1508 |
-
<max_amount translate="label">
|
1509 |
-
<label>Maximum Amount (CENT)</label>
|
1510 |
-
<frontend_type>text</frontend_type>
|
1511 |
-
<sort_order>130</sort_order>
|
1512 |
-
<show_in_default>1</show_in_default>
|
1513 |
-
<show_in_website>1</show_in_website>
|
1514 |
-
<show_in_store>1</show_in_store>
|
1515 |
-
</max_amount>
|
1516 |
-
<allowspecific translate="label">
|
1517 |
-
<label>allow specific countries</label>
|
1518 |
-
<frontend_type>allowspecific</frontend_type>
|
1519 |
-
<sort_order>140</sort_order>
|
1520 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1521 |
-
<show_in_default>1</show_in_default>
|
1522 |
-
<show_in_website>1</show_in_website>
|
1523 |
-
<show_in_store>1</show_in_store>
|
1524 |
-
</allowspecific>
|
1525 |
-
<specificcountry translate="label">
|
1526 |
-
<label>specific countries</label>
|
1527 |
-
<frontend_type>multiselect</frontend_type>
|
1528 |
-
<sort_order>150</sort_order>
|
1529 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
1530 |
-
<show_in_default>1</show_in_default>
|
1531 |
-
<show_in_website>1</show_in_website>
|
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/Edition/Edition/sql/hcd_setup/install-15.1.30.php
DELETED
@@ -1,188 +0,0 @@
|
|
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/code/community/HeidelpayCD/Edition/Edition/Helper/AbstractHelper.php
DELETED
@@ -1,98 +0,0 @@
|
|
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/Edition/Helper/BasketApi.php
DELETED
@@ -1,136 +0,0 @@
|
|
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/Edition/Helper/Data.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Helper/OrderState.php
DELETED
@@ -1,105 +0,0 @@
|
|
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/Edition/Helper/Payment.php
DELETED
@@ -1,309 +0,0 @@
|
|
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/Edition/Helper/Validator.php
DELETED
@@ -1,41 +0,0 @@
|
|
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/Edition/Model/Customer.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Model/Mysql4/Customer.php
DELETED
@@ -1,23 +0,0 @@
|
|
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/Edition/Model/Mysql4/Customer/Collection.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Model/Mysql4/Transaction.php
DELETED
@@ -1,23 +0,0 @@
|
|
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/Edition/Model/Mysql4/Transaction/Collection.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Model/Observer.php
DELETED
@@ -1,196 +0,0 @@
|
|
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/Edition/Model/Order/Pdf/Invoice.php
DELETED
@@ -1,21 +0,0 @@
|
|
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/Edition/Model/Payment/Abstract.php
DELETED
@@ -1,1138 +0,0 @@
|
|
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 |
-
if ($this->canCapture()) {
|
729 |
-
$authorisationModel = Mage::getModel('hcd/transaction');
|
730 |
-
/**
|
731 |
-
* @var $authorisation HeidelpayCD_Edition_Model_Transaction
|
732 |
-
*/
|
733 |
-
$authorisation = $authorisationModel->getOneTransactionByMethode(
|
734 |
-
$order->getRealOrderId(),
|
735 |
-
'PA'
|
736 |
-
);
|
737 |
-
|
738 |
-
|
739 |
-
if ($authorisation === false) {
|
740 |
-
Mage::throwException(Mage::helper('hcd')->__('This Transaction could not be capture online.'));
|
741 |
-
return $this;
|
742 |
-
}
|
743 |
-
|
744 |
-
$config = $this->getMainConfig($this->_code, $authorisation['CRITERION_STOREID']);
|
745 |
-
$config['PAYMENT.TYPE'] = 'CP';
|
746 |
-
|
747 |
-
|
748 |
-
$frontend = $this->getFrontend($order->getRealOrderId(), $authorisation['CRITERION_STOREID']);
|
749 |
-
$frontend['FRONTEND.MODE'] = 'DEFAULT';
|
750 |
-
$frontend['FRONTEND.ENABLED'] = 'false';
|
751 |
-
|
752 |
-
$user = $this->getUser($order, true);
|
753 |
-
$basketdetails = ($this->_code == 'hcdbs') ? true : false; // If billsafe set to fin
|
754 |
-
$basketData = $this->getBasketData($order, $basketdetails, $amount);
|
755 |
-
|
756 |
-
$basketData['IDENTIFICATION.REFERENCEID'] = $authorisation['IDENTIFICATION_UNIQUEID'];
|
757 |
-
Mage::dispatchEvent(
|
758 |
-
'heidelpay_capture_bevor_preparePostData', array(
|
759 |
-
'payment' => $payment,
|
760 |
-
'config' => $config,
|
761 |
-
'frontend' => $frontend,
|
762 |
-
'user' => $user,
|
763 |
-
'basketData' => $basketData,
|
764 |
-
'criterion' => $criterion
|
765 |
-
)
|
766 |
-
);
|
767 |
-
$params = Mage::helper('hcd/payment')->preparePostData(
|
768 |
-
$config, $frontend, $user, $basketData,
|
769 |
-
$criterion
|
770 |
-
);
|
771 |
-
|
772 |
-
|
773 |
-
$this->log("doRequest url : " . $config['URL']);
|
774 |
-
$this->log("doRequest params : " . json_encode($params));
|
775 |
-
|
776 |
-
$src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
|
777 |
-
|
778 |
-
$this->log("doRequest response : " . json_encode($src));
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
if ($src['PROCESSING_RESULT'] == "NOK") {
|
783 |
-
Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
|
784 |
-
return $this;
|
785 |
-
}
|
786 |
-
|
787 |
-
$payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
|
788 |
-
Mage::getModel('hcd/transaction')->saveTransactionData($src);
|
789 |
-
}
|
790 |
-
|
791 |
-
return $this;
|
792 |
-
}
|
793 |
-
|
794 |
-
/**
|
795 |
-
* Calculate weather a order can be captured or not
|
796 |
-
*
|
797 |
-
* @return bool canCapture
|
798 |
-
*/
|
799 |
-
public function canCapture()
|
800 |
-
{
|
801 |
-
//check weather this payment method supports capture
|
802 |
-
|
803 |
-
if ($this->_canCapture === false) {
|
804 |
-
return false;
|
805 |
-
}
|
806 |
-
|
807 |
-
// prevent frontend to capture an amount in case of direct booking with automatical invoice
|
808 |
-
if (Mage::app()->getStore()->getId() != 0) {
|
809 |
-
$this->log('try to capture amount in frontend ... this is not necessary !');
|
810 |
-
return false;
|
811 |
-
}
|
812 |
-
|
813 |
-
// loading order object to check wether this
|
814 |
-
$orderIncrementId = Mage::app()->getRequest()->getParam('order_id');
|
815 |
-
$this->log('$orderIncrementId ' . $orderIncrementId);
|
816 |
-
/**
|
817 |
-
* @var $order Mage_Sales_Model_Order order object
|
818 |
-
*/
|
819 |
-
$order = Mage::getModel('sales/order');
|
820 |
-
$order->loadByAttribute('entity_id', (int)$orderIncrementId);
|
821 |
-
/**
|
822 |
-
* @var $transaction HeidelpayCD_Edition_Model_Transaction
|
823 |
-
*/
|
824 |
-
$transaction = Mage::getModel('hcd/transaction');
|
825 |
-
if ($transaction->getOneTransactionByMethode($order->getRealOrderId(), 'PA') === false) {
|
826 |
-
$this->log('there is no preauthorisation for the order ' . $order->getRealOrderId());
|
827 |
-
return false;
|
828 |
-
}
|
829 |
-
|
830 |
-
return true;
|
831 |
-
}
|
832 |
-
|
833 |
-
/**
|
834 |
-
* Api call for refunding a given invoice
|
835 |
-
*
|
836 |
-
* @param Mage_Sales_Model_Order_Payment $payment current payment object
|
837 |
-
* @param float $amount amount to refund
|
838 |
-
*
|
839 |
-
* @return $this
|
840 |
-
*/
|
841 |
-
public function refund(Varien_Object $payment, $amount)
|
842 |
-
{
|
843 |
-
/** @var $order Mage_Sales_Model_Order */
|
844 |
-
$order = $payment->getOrder();
|
845 |
-
|
846 |
-
/** @var $transaction HeidelpayCD_Edition_Model_Transaction */
|
847 |
-
$transaction = Mage::getModel('hcd/transaction');
|
848 |
-
$captureData = $transaction->loadLastTransactionDataByUniqeId((string)$payment->getRefundTransactionId());
|
849 |
-
|
850 |
-
$config = $this->getMainConfig($this->_code, $captureData['CRITERION_STOREID']);
|
851 |
-
$config['PAYMENT.TYPE'] = 'RF';
|
852 |
-
$frontend = $this->getFrontend($order->getRealOrderId(), $captureData['CRITERION_STOREID']);
|
853 |
-
$frontend['FRONTEND.MODE'] = 'DEFAULT';
|
854 |
-
$frontend['FRONTEND.ENABLED'] = 'false';
|
855 |
-
$user = $this->getUser($order, true);
|
856 |
-
$basketData = $this->getBasketData($order, false, $amount);
|
857 |
-
$basketData['IDENTIFICATION.REFERENCEID'] = (string)$payment->getRefundTransactionId();
|
858 |
-
$params = Mage::helper('hcd/payment')->preparePostData(
|
859 |
-
$config, $frontend, $user, $basketData,
|
860 |
-
$criterion = array()
|
861 |
-
);
|
862 |
-
$this->log("doRequest url : " . $config['URL']);
|
863 |
-
$this->log("doRequest params : " . json_encode($params));
|
864 |
-
|
865 |
-
$src = Mage::helper('hcd/payment')->doRequest($config['URL'], $params);
|
866 |
-
$this->log("doRequest response : " . json_encode($src));
|
867 |
-
if ($src['PROCESSING_RESULT'] == "NOK") {
|
868 |
-
Mage::throwException('Heidelpay Error: ' . $src['PROCESSING_RETURN']);
|
869 |
-
return $this;
|
870 |
-
}
|
871 |
-
|
872 |
-
$payment->setTransactionId($src['IDENTIFICATION_UNIQUEID']);
|
873 |
-
Mage::getModel('hcd/transaction')->saveTransactionData($src);
|
874 |
-
return $this;
|
875 |
-
}
|
876 |
-
|
877 |
-
/**
|
878 |
-
* Getter for customer given plus family name
|
879 |
-
*
|
880 |
-
* @param $session Mage_Checkout_Model_Session checkout session
|
881 |
-
*
|
882 |
-
* @return string given plus family name
|
883 |
-
*/
|
884 |
-
public function getCustomerName($session = false)
|
885 |
-
{
|
886 |
-
if ($session === true) {
|
887 |
-
$session = $this->getCheckout();
|
888 |
-
return $session->getQuote()->getBillingAddress()->getFirstname() . ' '
|
889 |
-
. $session->getQuote()->getBillingAddress()->getLastname();
|
890 |
-
}
|
891 |
-
|
892 |
-
return $this->getQuote()->getBillingAddress()->getFirstname() . ' '
|
893 |
-
. $this->getQuote()->getBillingAddress()->getLastname();
|
894 |
-
}
|
895 |
-
|
896 |
-
/**
|
897 |
-
* Save additional payment data of the customer to the database
|
898 |
-
*
|
899 |
-
* @param $data array additional payment information of the customer
|
900 |
-
* @param $uniqeID string payment reference of a account registration
|
901 |
-
*/
|
902 |
-
public function saveCustomerData($data, $uniqeID = null)
|
903 |
-
{
|
904 |
-
/** @var $customerData HeidelpayCD_Edition_Model_Customer */
|
905 |
-
$customerData = Mage::getModel('hcd/customer');
|
906 |
-
|
907 |
-
if ($this->getCustomerData() !== false) {
|
908 |
-
$lastdata = $this->getCustomerData();
|
909 |
-
$customerData->load($lastdata['id']);
|
910 |
-
}
|
911 |
-
|
912 |
-
$this->log('StoreID :' . Mage::app()->getStore()->getId());
|
913 |
-
$customerId = $this->getQuote()->getBillingAddress()->getCustomerId();
|
914 |
-
$storeId = Mage::app()->getStore()->getId();
|
915 |
-
if ($customerId == 0) {
|
916 |
-
$visitorData = Mage::getSingleton('core/session')->getVisitorData();
|
917 |
-
$customerId = $visitorData['visitor_id'];
|
918 |
-
$storeId = 0;
|
919 |
-
}
|
920 |
-
|
921 |
-
$customerData->setPaymentmethode($this->_code);
|
922 |
-
$customerData->setUniqeid($uniqeID);
|
923 |
-
$customerData->setCustomerid($customerId);
|
924 |
-
$customerData->setStoreid($storeId);
|
925 |
-
$data['SHIPPPING_HASH'] = $this->getShippingHash();
|
926 |
-
$customerData->setPaymentData(Mage::getModel('hcd/resource_encryption')->encrypt(json_encode($data)));
|
927 |
-
|
928 |
-
$customerData->save();
|
929 |
-
}
|
930 |
-
|
931 |
-
/**
|
932 |
-
* Generates a customer message for the success page
|
933 |
-
*
|
934 |
-
* Will be used for prepayment and direct debit to show the customer
|
935 |
-
* the billing information
|
936 |
-
*
|
937 |
-
* @param $paymentData transaction details form heidelpay api
|
938 |
-
*
|
939 |
-
* @return bool| string customer message for the success page
|
940 |
-
*/
|
941 |
-
public function showPaymentInfo($paymentData)
|
942 |
-
{
|
943 |
-
/*
|
944 |
-
* This function should not be modified please overwrite this function
|
945 |
-
* in the class of the used payment method !!!
|
946 |
-
*/
|
947 |
-
return false;
|
948 |
-
}
|
949 |
-
|
950 |
-
/**
|
951 |
-
* Handle charge back notices from heidelpay payment
|
952 |
-
*
|
953 |
-
* @param $order Mage_Sales_Model_Order
|
954 |
-
* @param $message string order history message
|
955 |
-
*
|
956 |
-
* @return Mage_Sales_Model_Order
|
957 |
-
*/
|
958 |
-
public function chargeBackTransaction($order, $message="")
|
959 |
-
{
|
960 |
-
// message block for direct debit charge back
|
961 |
-
if ($order->hasInvoices()) {
|
962 |
-
$invIncrementIDs = array();
|
963 |
-
/** @var $invoice Mage_Sales_Model_Order_Invoice */
|
964 |
-
foreach ($order->getInvoiceCollection() as $invoice) {
|
965 |
-
$this->log('Invoice Number ' . (string)$invoice->getIncrementId());
|
966 |
-
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
|
967 |
-
$invoice->setIsPaid(false);
|
968 |
-
// @codingStandardsIgnoreLine use of save in a loop
|
969 |
-
$invoice->save();
|
970 |
-
}
|
971 |
-
|
972 |
-
$order->setIsInProcess(false);
|
973 |
-
$order->setTotalInvoiced(0);
|
974 |
-
$order->setTotalPaid(0);
|
975 |
-
}
|
976 |
-
|
977 |
-
$order->setState(
|
978 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(false),
|
979 |
-
true,
|
980 |
-
$message
|
981 |
-
);
|
982 |
-
|
983 |
-
return $order;
|
984 |
-
}
|
985 |
-
|
986 |
-
/**
|
987 |
-
* Handle transaction with an not ok status
|
988 |
-
*
|
989 |
-
* @param $order Mage_Sales_Model_Order
|
990 |
-
* @param $message string order history message
|
991 |
-
*
|
992 |
-
* @return Mage_Sales_Model_Order
|
993 |
-
*/
|
994 |
-
public function canceledTransaction($order, $message)
|
995 |
-
{
|
996 |
-
if ($order->canCancel()) {
|
997 |
-
$order->cancel();
|
998 |
-
|
999 |
-
$order->setState(
|
1000 |
-
$order->getPayment()->getMethodInstance()->getStatusError(false),
|
1001 |
-
$order->getPayment()->getMethodInstance()->getStatusError(true),
|
1002 |
-
$message
|
1003 |
-
);
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
return $order;
|
1007 |
-
}
|
1008 |
-
|
1009 |
-
/**
|
1010 |
-
* Handle transaction with means processing
|
1011 |
-
*
|
1012 |
-
* @param $order Mage_Sales_Model_Order
|
1013 |
-
* @param $data HeidelpayCD_Edition_Model_Transaction
|
1014 |
-
* @param $message string order history message
|
1015 |
-
*
|
1016 |
-
* @return Mage_Sales_Model_Order
|
1017 |
-
*/
|
1018 |
-
public function processingTransaction($order, $data, $message='')
|
1019 |
-
{
|
1020 |
-
|
1021 |
-
/** @var $paymentHelper HeidelpayCD_Edition_Helper_Payment */
|
1022 |
-
$paymentHelper = Mage::helper('hcd/payment');
|
1023 |
-
|
1024 |
-
|
1025 |
-
$message = ($message === '') ? 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] : $message;
|
1026 |
-
$totallyPaid = false;
|
1027 |
-
|
1028 |
-
$order->getPayment()
|
1029 |
-
->setTransactionId($data['IDENTIFICATION_UNIQUEID'])
|
1030 |
-
->setParentTransactionId($order->getPayment()->getLastTransId())
|
1031 |
-
->setIsTransactionClosed(true);
|
1032 |
-
|
1033 |
-
if ($paymentHelper->format($order->getGrandTotal()) == $data['PRESENTATION_AMOUNT'] and
|
1034 |
-
$order->getOrderCurrencyCode() == $data['PRESENTATION_CURRENCY']
|
1035 |
-
) {
|
1036 |
-
$order->setState(
|
1037 |
-
$order->getPayment()->getMethodInstance()->getStatusSuccess(false),
|
1038 |
-
$order->getPayment()->getMethodInstance()->getStatusSuccess(true),
|
1039 |
-
$message
|
1040 |
-
);
|
1041 |
-
$totallyPaid = true;
|
1042 |
-
} else {
|
1043 |
-
/*
|
1044 |
-
* in case rc is ack and amount is to low or currency miss match
|
1045 |
-
*/
|
1046 |
-
$order->setState(
|
1047 |
-
$order->getPayment()->getMethodInstance()->getStatusPartlyPaid(false),
|
1048 |
-
$order->getPayment()->getMethodInstance()->getStatusPartlyPaid(true),
|
1049 |
-
$message
|
1050 |
-
);
|
1051 |
-
}
|
1052 |
-
|
1053 |
-
$code = $order->getPayment()->getMethodInstance()->getCode();
|
1054 |
-
|
1055 |
-
$path = "payment/" . $code . "/";
|
1056 |
-
$autoInvoice = (Mage::getStoreConfig($path . "invioce", $data['CRITERION_STOREID']) == 1) ? true : false;
|
1057 |
-
|
1058 |
-
$this->log('Auto invoiced :'. (string) $autoInvoice);
|
1059 |
-
|
1060 |
-
if ($order->canInvoice() and ($autoInvoice or $code == 'hcdbs') and $totallyPaid === true) {
|
1061 |
-
$invoice = $order->prepareInvoice();
|
1062 |
-
$invoice->register()->capture();
|
1063 |
-
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
|
1064 |
-
$invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID);
|
1065 |
-
$invoice->setIsPaid(true);
|
1066 |
-
$order->setIsInProcess(true);
|
1067 |
-
$order->addStatusHistoryComment(
|
1068 |
-
Mage::helper('hcd')->__('Automatically invoiced by Heidelpay.'),
|
1069 |
-
false
|
1070 |
-
);
|
1071 |
-
$invoice->save();
|
1072 |
-
|
1073 |
-
if ($this->_invoiceOrderEmail) {
|
1074 |
-
if ($code != 'hcdpp' and $code != 'hcdiv') {
|
1075 |
-
$info = $order->getPayment()->getMethodInstance()->showPaymentInfo($data);
|
1076 |
-
$invoiceMailComment = ($info === false) ? '' : '<h3>'
|
1077 |
-
. $this->_getHelper()->__('Payment Information') . '</h3>' . $info . '<br/>';
|
1078 |
-
}
|
1079 |
-
|
1080 |
-
$invoice->sendEmail(true, $invoiceMailComment); // send invoice mail
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
|
1084 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
1085 |
-
->addObject($invoice)
|
1086 |
-
->addObject($invoice->getOrder());
|
1087 |
-
$transactionSave->save();
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
$order->getPayment()->addTransaction(
|
1091 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE,
|
1092 |
-
null,
|
1093 |
-
true,
|
1094 |
-
$message
|
1095 |
-
);
|
1096 |
-
|
1097 |
-
$order->setIsInProcess(true);
|
1098 |
-
|
1099 |
-
return $order;
|
1100 |
-
}
|
1101 |
-
|
1102 |
-
/**
|
1103 |
-
* Handle transaction with means pending
|
1104 |
-
*
|
1105 |
-
* @param $order Mage_Sales_Model_Order
|
1106 |
-
* @param $data HeidelpayCD_Edition_Model_Transaction
|
1107 |
-
* @param $message string order history message
|
1108 |
-
*
|
1109 |
-
* @return Mage_Sales_Model_Order
|
1110 |
-
*/
|
1111 |
-
public function pendingTransaction($order, $data, $message='')
|
1112 |
-
{
|
1113 |
-
$message = 'Heidelpay ShortID: ' . $data['IDENTIFICATION_SHORTID'] .' '.$message;
|
1114 |
-
|
1115 |
-
$order->getPayment()->setTransactionId($data['IDENTIFICATION_UNIQUEID']);
|
1116 |
-
|
1117 |
-
$order->getPayment()->setIsTransactionClosed(0);
|
1118 |
-
|
1119 |
-
$order->getPayment()->setTransactionAdditionalInfo(
|
1120 |
-
Mage_Sales_Model_Order_Payment_Transaction::RAW_DETAILS,
|
1121 |
-
null
|
1122 |
-
);
|
1123 |
-
|
1124 |
-
$this->log('Set Transaction to Pending : ');
|
1125 |
-
$order->setState(
|
1126 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(false),
|
1127 |
-
$order->getPayment()->getMethodInstance()->getStatusPendig(true),
|
1128 |
-
$message
|
1129 |
-
);
|
1130 |
-
$order->getPayment()->addTransaction(
|
1131 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH,
|
1132 |
-
null,
|
1133 |
-
true,
|
1134 |
-
$message
|
1135 |
-
);
|
1136 |
-
return $order;
|
1137 |
-
}
|
1138 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/HeidelpayCD/Edition/Edition/Model/Payment/AbstractSecuredPaymentMethods.php
DELETED
@@ -1,325 +0,0 @@
|
|
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/Edition/Model/Payment/HcdDirectDebitSecured.php
DELETED
@@ -1,105 +0,0 @@
|
|
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/Edition/Model/Payment/HcdInvoiceSecured.php
DELETED
@@ -1,35 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdbs.php
DELETED
@@ -1,174 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdcc.php
DELETED
@@ -1,76 +0,0 @@
|
|
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/Edition/Model/Payment/Hcddc.php
DELETED
@@ -1,67 +0,0 @@
|
|
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/Edition/Model/Payment/Hcddd.php
DELETED
@@ -1,86 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdeps.php
DELETED
@@ -1,55 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdgp.php
DELETED
@@ -1,22 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdide.php
DELETED
@@ -1,60 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdiv.php
DELETED
@@ -1,60 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdmk.php
DELETED
@@ -1,34 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdmpa.php
DELETED
@@ -1,142 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdpal.php
DELETED
@@ -1,65 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdpf.php
DELETED
@@ -1,56 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdpp.php
DELETED
@@ -1,183 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdsu.php
DELETED
@@ -1,33 +0,0 @@
|
|
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/Edition/Model/Payment/Hcdyt.php
DELETED
@@ -1,24 +0,0 @@
|
|
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/Edition/Model/Resource/Encryption.php
DELETED
@@ -1,39 +0,0 @@
|
|
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/Edition/Model/Resource/Setup.php
DELETED
@@ -1,19 +0,0 @@
|
|
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/Edition/Model/System/Config/Source/Bookingmode.php
DELETED
@@ -1,31 +0,0 @@
|
|
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/Edition/Model/System/Config/Source/Recognition.php
DELETED
@@ -1,32 +0,0 @@
|
|
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/Edition/Model/System/Config/Source/Returnurl.php
DELETED
@@ -1,31 +0,0 @@
|
|
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/Edition/Model/Transaction.php
DELETED
@@ -1,130 +0,0 @@
|
|
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/Edition/controllers/CheckoutController.php
DELETED
@@ -1,288 +0,0 @@
|
|
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/Edition/controllers/IndexController.php
DELETED
@@ -1,664 +0,0 @@
|
|
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/Edition/controllers/ResponseController.php
DELETED
@@ -1,274 +0,0 @@
|
|
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/Edition/etc/config.xml
DELETED
@@ -1,370 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<config>
|
3 |
-
<modules>
|
4 |
-
<HeidelpayCD_Edition>
|
5 |
-
<version>17.5.17</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>
|
62 |
-
<class>hcd/observer</class>
|
63 |
-
<method>removeWalletDataFromCheckout</method>
|
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/Edition/etc/system.xml
DELETED
@@ -1,1539 +0,0 @@
|
|
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>
|
26 |
-
<p></p> <p style="font-size:12px">Die Heidelberger Payment GmbH kurz: heidelpay bietet als BaFin-zertifizierter Payment Service Provider alles was zum Online-Payment gehört.<br /><br />
|
27 |
-
<a href="http://testshops.heidelpay.de/contactform/?campaign=MagentoWL&shop=Magento" target="_blank" style="font-size: 12px; color: #000; font-weight: bold;">>>> Informationen anfordern <<<</a>
|
28 |
-
<br /></p><p><br /> </p><p style="font-size:12px">Das Leistungsspektrum des PCI DSS zertifizierten Unternehmens reicht von weltweiten e-Payment Lösungen, inklusive eines vollständigen Debitorenmanagement-, Risk- und Fraud- Systems
|
29 |
-
bis hin zu einem breiten Angebot alternativer Bezahlverfahren - schnell, sicher, einfach und umfassend - alles aus einer Hand.</p><br />
|
30 |
-
<a href="http://www.heidelpay.de" target="_blank" style="font-size: 12px; color: #000; font-weight: bold;">www.heidelpay.de</a>
|
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>
|
728 |
-
<show_in_default>1</show_in_default>
|
729 |
-
<show_in_website>1</show_in_website>
|
730 |
-
<show_in_store>1</show_in_store>
|
731 |
-
<fields>
|
732 |
-
<title translate="label">
|
733 |
-
<label>Title</label>
|
734 |
-
<frontend_type>text</frontend_type>
|
735 |
-
<sort_order>10</sort_order>
|
736 |
-
<show_in_default>1</show_in_default>
|
737 |
-
<show_in_website>1</show_in_website>
|
738 |
-
<show_in_store>1</show_in_store>
|
739 |
-
</title>
|
740 |
-
<active translate="label">
|
741 |
-
<label>Enabled</label>
|
742 |
-
<frontend_type>select</frontend_type>
|
743 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
744 |
-
<sort_order>20</sort_order>
|
745 |
-
<show_in_default>1</show_in_default>
|
746 |
-
<show_in_website>1</show_in_website>
|
747 |
-
<show_in_store>1</show_in_store>
|
748 |
-
</active>
|
749 |
-
<channel translate="label">
|
750 |
-
<label>Channel ID</label>
|
751 |
-
<frontend_type>text</frontend_type>
|
752 |
-
<sort_order>40</sort_order>
|
753 |
-
<show_in_default>1</show_in_default>
|
754 |
-
<show_in_website>1</show_in_website>
|
755 |
-
<show_in_store>1</show_in_store>
|
756 |
-
</channel>
|
757 |
-
<sort_order translate="label">
|
758 |
-
<label>Sort order</label>
|
759 |
-
<frontend_type>text</frontend_type>
|
760 |
-
<sort_order>110</sort_order>
|
761 |
-
<show_in_default>1</show_in_default>
|
762 |
-
<show_in_website>1</show_in_website>
|
763 |
-
<show_in_store>1</show_in_store>
|
764 |
-
</sort_order>
|
765 |
-
<min_amount translate="label">
|
766 |
-
<label>Minimum Amount (CENT)</label>
|
767 |
-
<frontend_type>text</frontend_type>
|
768 |
-
<sort_order>120</sort_order>
|
769 |
-
<show_in_default>1</show_in_default>
|
770 |
-
<show_in_website>1</show_in_website>
|
771 |
-
<show_in_store>1</show_in_store>
|
772 |
-
</min_amount>
|
773 |
-
<max_amount translate="label">
|
774 |
-
<label>Maximum Amount (CENT)</label>
|
775 |
-
<frontend_type>text</frontend_type>
|
776 |
-
<sort_order>130</sort_order>
|
777 |
-
<show_in_default>1</show_in_default>
|
778 |
-
<show_in_website>1</show_in_website>
|
779 |
-
<show_in_store>1</show_in_store>
|
780 |
-
</max_amount>
|
781 |
-
<allowspecific translate="label">
|
782 |
-
<label>allow specific countries</label>
|
783 |
-
<frontend_type>allowspecific</frontend_type>
|
784 |
-
<sort_order>140</sort_order>
|
785 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
786 |
-
<show_in_default>1</show_in_default>
|
787 |
-
<show_in_website>1</show_in_website>
|
788 |
-
<show_in_store>1</show_in_store>
|
789 |
-
</allowspecific>
|
790 |
-
<specificcountry translate="label">
|
791 |
-
<label>specific countries</label>
|
792 |
-
<frontend_type>multiselect</frontend_type>
|
793 |
-
<sort_order>150</sort_order>
|
794 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
795 |
-
<show_in_default>1</show_in_default>
|
796 |
-
<show_in_website>1</show_in_website>
|
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>
|
1438 |
-
<fields>
|
1439 |
-
<title translate="label">
|
1440 |
-
<label>Title</label>
|
1441 |
-
<frontend_type>text</frontend_type>
|
1442 |
-
<sort_order>10</sort_order>
|
1443 |
-
<show_in_default>1</show_in_default>
|
1444 |
-
<show_in_website>1</show_in_website>
|
1445 |
-
<show_in_store>1</show_in_store>
|
1446 |
-
</title>
|
1447 |
-
<active translate="label">
|
1448 |
-
<label>Enabled</label>
|
1449 |
-
<frontend_type>select</frontend_type>
|
1450 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
1451 |
-
<sort_order>20</sort_order>
|
1452 |
-
<show_in_default>1</show_in_default>
|
1453 |
-
<show_in_website>1</show_in_website>
|
1454 |
-
<show_in_store>1</show_in_store>
|
1455 |
-
</active>
|
1456 |
-
<channel translate="label">
|
1457 |
-
<label>Channel ID</label>
|
1458 |
-
<frontend_type>text</frontend_type>
|
1459 |
-
<sort_order>40</sort_order>
|
1460 |
-
<show_in_default>1</show_in_default>
|
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>
|
1496 |
-
<show_in_default>1</show_in_default>
|
1497 |
-
<show_in_website>1</show_in_website>
|
1498 |
-
<show_in_store>1</show_in_store>
|
1499 |
-
</sort_order>
|
1500 |
-
<min_amount translate="label">
|
1501 |
-
<label>Minimum Amount (CENT)</label>
|
1502 |
-
<frontend_type>text</frontend_type>
|
1503 |
-
<sort_order>120</sort_order>
|
1504 |
-
<show_in_default>1</show_in_default>
|
1505 |
-
<show_in_website>1</show_in_website>
|
1506 |
-
<show_in_store>1</show_in_store>
|
1507 |
-
</min_amount>
|
1508 |
-
<max_amount translate="label">
|
1509 |
-
<label>Maximum Amount (CENT)</label>
|
1510 |
-
<frontend_type>text</frontend_type>
|
1511 |
-
<sort_order>130</sort_order>
|
1512 |
-
<show_in_default>1</show_in_default>
|
1513 |
-
<show_in_website>1</show_in_website>
|
1514 |
-
<show_in_store>1</show_in_store>
|
1515 |
-
</max_amount>
|
1516 |
-
<allowspecific translate="label">
|
1517 |
-
<label>allow specific countries</label>
|
1518 |
-
<frontend_type>allowspecific</frontend_type>
|
1519 |
-
<sort_order>140</sort_order>
|
1520 |
-
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
1521 |
-
<show_in_default>1</show_in_default>
|
1522 |
-
<show_in_website>1</show_in_website>
|
1523 |
-
<show_in_store>1</show_in_store>
|
1524 |
-
</allowspecific>
|
1525 |
-
<specificcountry translate="label">
|
1526 |
-
<label>specific countries</label>
|
1527 |
-
<frontend_type>multiselect</frontend_type>
|
1528 |
-
<sort_order>150</sort_order>
|
1529 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
1530 |
-
<show_in_default>1</show_in_default>
|
1531 |
-
<show_in_website>1</show_in_website>
|
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/Edition/sql/hcd_setup/install-15.1.30.php
DELETED
@@ -1,188 +0,0 @@
|
|
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/code/community/HeidelpayCD/Edition/Helper/OrderState.php
CHANGED
@@ -78,7 +78,9 @@ class HeidelpayCD_Edition_Helper_OrderState extends HeidelpayCD_Edition_Helper_A
|
|
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;
|
78 |
// Set status for transaction with payment transaction
|
79 |
$paidTransactionTypes = array('CP', 'DB', 'RC', 'FI');
|
80 |
|
81 |
+
if (in_array($paymentCode[1], $paidTransactionTypes)
|
82 |
+
and ($data['PROCESSING_RESULT'] == 'ACK' and $data['PROCESSING_STATUS_CODE'] != 80)
|
83 |
+
) {
|
84 |
// only Billsafe finalize will have impacted on the order status
|
85 |
if ($paymentCode[1] === 'FI' and $data['ACCOUNT_BRAND'] !== 'BILLSAFE') {
|
86 |
return;
|
app/code/community/HeidelpayCD/Edition/README.md
CHANGED
@@ -1,28 +1,30 @@
|
|
1 |
-
|
|
|
2 |
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4c8c379f94d64fd3813dffb260e8bdd6)](https://www.codacy.com/app/heidelpay/magento-cd-edition?utm_source=github.com&utm_medium=referral&utm_content=heidelpay/magento-cd-edition&utm_campaign=Badge_Grade)
|
|
|
|
|
3 |
|
4 |
![Logo](https://dev.heidelpay.de/devHeidelpay_400_180.jpg)
|
5 |
|
6 |
-
# heidelpay payment extension for
|
7 |
|
8 |
-
This extension for Magento >=1.8 provides a direct integration of the heidelpay payment methods to your
|
9 |
|
10 |
Currently supported payment methods are:
|
11 |
* credit card
|
12 |
* debit card
|
13 |
-
*
|
14 |
* Giropay
|
15 |
* Sofort
|
16 |
* PayPal
|
17 |
* prepayment
|
18 |
* invoice unsecured
|
|
|
19 |
* EPS
|
20 |
* iDeal
|
21 |
* BillSafe
|
22 |
-
* Postfinance
|
23 |
-
* SEPA direct debit secured
|
24 |
|
25 |
-
For more information please visit -
|
26 |
|
27 |
## SYSTEM REQUIREMENTS
|
28 |
|
1 |
+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/heidelpay/magento-cd-edition.svg?style=flat-square)](https://packagist.org/packages/heidelpay/magento-cd-edition)
|
2 |
+
[![Build Status](https://travis-ci.org/heidelpay/magento-cd-edition.svg?branch=master)](https://travis-ci.org/heidelpay/magento-cd-edition)
|
3 |
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4c8c379f94d64fd3813dffb260e8bdd6)](https://www.codacy.com/app/heidelpay/magento-cd-edition?utm_source=github.com&utm_medium=referral&utm_content=heidelpay/magento-cd-edition&utm_campaign=Badge_Grade)
|
4 |
+
[![PHP 5.6](https://img.shields.io/badge/php-5.6-blue.svg)](http://www.php.net)
|
5 |
+
[![PHP 7.0](https://img.shields.io/badge/php-7.0-blue.svg)](http://www.php.net)
|
6 |
|
7 |
![Logo](https://dev.heidelpay.de/devHeidelpay_400_180.jpg)
|
8 |
|
9 |
+
# heidelpay payment extension for magento1
|
10 |
|
11 |
+
This extension for Magento >=1.8 provides a direct integration of the heidelpay payment methods to your Magento shop.
|
12 |
|
13 |
Currently supported payment methods are:
|
14 |
* credit card
|
15 |
* debit card
|
16 |
+
* sepa direct debit
|
17 |
* Giropay
|
18 |
* Sofort
|
19 |
* PayPal
|
20 |
* prepayment
|
21 |
* invoice unsecured
|
22 |
+
* invoice b2c secured
|
23 |
* EPS
|
24 |
* iDeal
|
25 |
* BillSafe
|
|
|
|
|
26 |
|
27 |
+
For more information please visit -https://dev.heidelpay.de/magento/
|
28 |
|
29 |
## SYSTEM REQUIREMENTS
|
30 |
|
app/code/community/HeidelpayCD/Edition/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HeidelpayCD_Edition>
|
5 |
-
<version>17.
|
6 |
</HeidelpayCD_Edition>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<HeidelpayCD_Edition>
|
5 |
+
<version>17.6.2</version>
|
6 |
</HeidelpayCD_Edition>
|
7 |
</modules>
|
8 |
<global>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HeidelpayCDEdition</name>
|
4 |
-
<version>17.
|
5 |
<stability>stable</stability>
|
6 |
<license>heidelpay license</license>
|
7 |
<channel>community</channel>
|
@@ -36,12 +36,12 @@ Telefon: +49 (0) 6221 / 65 170-20<br />
|
|
36 |
E-Mail: sales@heidelpay.de<br />
|
37 |
Internet: www.heidelpay.de<br />
|
38 |
</description>
|
39 |
-
<notes>- Bugfix
|
40 |
</notes>
|
41 |
<authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
|
42 |
-
<date>2017-
|
43 |
-
<time>
|
44 |
-
<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="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="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><file name="CHANGELOG.md" hash="bc7c79b09a6dfc55c8308b8a5970ba2b"/><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="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="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="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="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="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="246a8ef023dbab0fb6d0d6c8ff4d4ff8"/><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="62a25bfc0a3a19ca15d6add7a2bb56eb"/><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 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="246a8ef023dbab0fb6d0d6c8ff4d4ff8"/><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="62a25bfc0a3a19ca15d6add7a2bb56eb"/><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 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><file name="LICENSE.txt" hash="0367823a347f0dab8e38d5717f9855f3"/><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="246a8ef023dbab0fb6d0d6c8ff4d4ff8"/><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><file name="README.md" hash="0a9f9310566b0fbbe67509eb600c3ac5"/><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="62a25bfc0a3a19ca15d6add7a2bb56eb"/><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"><dir name="Info"><file name="debit.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><file name="masterpass.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/></dir><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"/><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="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="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 name="mail"><file name="hcd_payment_info.phtml" hash="1ec6d33fbb5bc8391a8295be1ffa5b38"/></dir></dir><dir name="onepage"><file name="billing.phtml" hash="14b57c38161e6749fbc37813337c2379"/><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><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"><dir name="Info"><file name="masterpass.phtml" hash="53c30caa1d8838256686aaeef48f42eb"/></dir><file name="masterpass.phtml" hash="53c30caa1d8838256686aaeef48f42eb"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="hcd"><dir><dir name="info"><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 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>
|
45 |
<compatible/>
|
46 |
<dependencies><required><php><min>5.6.0</min><max>7.0.99</max></php></required></dependencies>
|
47 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>HeidelpayCDEdition</name>
|
4 |
+
<version>17.6.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>heidelpay license</license>
|
7 |
<channel>community</channel>
|
36 |
E-Mail: sales@heidelpay.de<br />
|
37 |
Internet: www.heidelpay.de<br />
|
38 |
</description>
|
39 |
+
<notes>- Bugfix pending payment transaction has been handled as processed
|
40 |
</notes>
|
41 |
<authors><author><name>Heidelberger Payment GmbH</name><user>Heidelpay</user><email>magento@heidelpay.de</email></author></authors>
|
42 |
+
<date>2017-06-06</date>
|
43 |
+
<time>14:00:16</time>
|
44 |
+
<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="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="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><file name="CHANGELOG.md" hash="c87f7b923c8732b11f578058227041f9"/><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="e14f80163fea0bf0731d42bfb7f3e46c"/><file name="Payment.php" hash="99b00ac0f9abb9a29fc1764ee3afeead"/><file name="Validator.php" hash="15d69234ea566db7bb481183cb59767b"/></dir><file name="LICENSE.txt" hash="0367823a347f0dab8e38d5717f9855f3"/><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="246a8ef023dbab0fb6d0d6c8ff4d4ff8"/><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><file name="README.md" hash="8b65c2e82e8930cf8b4eaf334522819e"/><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="ecd814eb5add2f92f7be799e8802661f"/><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"><dir name="Info"><file name="debit.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/><file name="masterpass.phtml" hash="0632fa163fa5bb7df9c0da2b4010c7dc"/></dir><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"/><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="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="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 name="mail"><file name="hcd_payment_info.phtml" hash="1ec6d33fbb5bc8391a8295be1ffa5b38"/></dir></dir><dir name="onepage"><file name="billing.phtml" hash="14b57c38161e6749fbc37813337c2379"/><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><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"><dir name="Info"><file name="masterpass.phtml" hash="53c30caa1d8838256686aaeef48f42eb"/></dir><file name="masterpass.phtml" hash="53c30caa1d8838256686aaeef48f42eb"/></dir></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="template"><dir name="hcd"><dir><dir name="info"><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 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>
|
45 |
<compatible/>
|
46 |
<dependencies><required><php><min>5.6.0</min><max>7.0.99</max></php></required></dependencies>
|
47 |
</package>
|