Version Notes
Mage_Payone-3.1.8
Download this release
Release Info
Developer | noovias |
Extension | Mage_Payone |
Version | 3.1.8 |
Comparing to | |
See all releases |
Code changes from version 3.1.6 to 3.1.8
- app/code/community/Payone/Core/Block/Adminhtml/System/Config/Form/Field/KlarnaStoreId.php +77 -0
- app/code/community/Payone/Core/Block/Checkout/Onepage/Review/SepaMandate.php +109 -0
- app/code/community/Payone/Core/Block/Checkout/Onepage/Success/SepaMandatePdfLink.php +157 -0
- app/code/community/Payone/Core/Block/Payment/Method/Form/DebitPayment.php +28 -0
- app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransfer.php +10 -0
- app/code/community/Payone/Core/Block/Payment/Method/Form/SafeInvoice.php +35 -0
- app/code/community/Payone/Core/Block/Payment/Method/Form/SafeInvoice/Klarna.php +258 -0
- app/code/community/Payone/Core/Block/Payment/Method/Info/CashOnDelivery.php +40 -40
- app/code/community/Payone/Core/Block/Payment/Method/Info/DebitPayment.php +16 -0
- app/code/community/Payone/Core/Block/Payment/Method/Info/OnlineBankTransfer.php +16 -0
- app/code/community/Payone/Core/Block/Payment/Method/Info/SafeInvoice.php +163 -163
- app/code/community/Payone/Core/Model/Config/General/Global.php +246 -246
- app/code/community/Payone/Core/Model/Config/Payment/Method.php +123 -0
- app/code/community/Payone/Core/Model/Config/Payment/Method/Interface.php +60 -0
- app/code/community/Payone/Core/Model/Domain/Config/PaymentMethod.php +36 -0
- app/code/community/Payone/Core/Model/Factory.php +126 -0
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Management/GetFile.php +87 -0
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Management/ManageMandate.php +143 -0
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Abstract.php +541 -508
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Authorize.php +10 -0
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Authorize/Abstract.php +174 -23
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Capture.php +20 -9
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Debit.php +15 -2
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Preauthorize.php +9 -0
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Verification/AddressCheck.php +113 -113
- app/code/community/Payone/Core/Model/Mapper/ApiRequest/Verification/BankAccountCheck.php +7 -2
- app/code/community/Payone/Core/Model/Observer/Checkout/Onepage.php +0 -39
- app/code/community/Payone/Core/Model/Observer/Checkout/Onepage/DebitPayment.php +199 -0
- app/code/community/Payone/Core/Model/Observer/Sales/Order.php +78 -78
- app/code/community/Payone/Core/Model/Observer/TransactionStatus/InvoiceCreate.php +206 -206
- app/code/community/Payone/Core/Model/Payment/Method/Abstract.php +38 -4
- app/code/community/Payone/Core/Model/Payment/Method/Financing.php +0 -1
- app/code/community/Payone/Core/Model/Payment/Method/SafeInvoice.php +136 -137
- app/code/community/Payone/Core/Model/Service/Config/XmlGenerate.php +26 -0
- app/code/community/Payone/Core/Model/Service/Management/GetFile.php +92 -0
- app/code/community/Payone/Core/Model/Service/Management/ManageMandate.php +100 -0
- app/code/community/Payone/Core/Model/Service/Payment/Abstract.php +154 -154
- app/code/community/Payone/Core/Model/Service/TransactionStatus/Process.php +194 -194
- app/code/community/Payone/Core/Model/Service/TransactionStatus/StoreClearingParameters.php +83 -83
- app/code/community/Payone/Core/Model/Service/Verification/BankAccountCheck.php +7 -3
- app/code/community/Payone/Core/Model/System/Config/Abstract.php +21 -0
- app/code/community/Payone/Core/Model/System/Config/FinancingType.php +2 -0
- app/code/community/Payone/Core/Model/System/Config/KlarnaCountry.php +81 -0
- app/code/community/Payone/Core/Model/System/Config/SafeInvoiceType.php +4 -1
- app/code/community/Payone/Core/Model/System/Config/SepaCountry.php +59 -0
- app/code/community/Payone/Core/controllers/Checkout/Onepage/PaymentController.php +207 -207
- app/code/community/Payone/Core/controllers/Checkout/Onepage/SuccessController.php +74 -0
- app/code/community/Payone/Core/controllers/Checkout/OnepageController.php +60 -6
- app/code/community/Payone/Core/etc/config.xml +45 -1
- app/code/community/Payone/Core/etc/system.xml +49 -0
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.0.3-3.0.4.php +50 -50
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.0.8-3.0.9.php +59 -59
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.1.3-3.1.4.php +59 -59
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.1.4-3.1.5.php +58 -58
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.1.6-3.1.7.php +169 -0
- app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.1.7-3.1.8.php +88 -0
- app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.1.3-3.1.4.sql +10 -10
- app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.1.4-3.1.5.sql +6 -6
- app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.1.6-3.1.7.sql +31 -0
- app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.1.7-3.1.8.sql +30 -0
- app/design/adminhtml/default/default/layout/payone/core.xml +3 -0
- app/design/adminhtml/default/default/template/payone/core/payment/method/form/debitpayment.phtml +97 -45
- app/design/adminhtml/default/default/template/payone/core/payment/method/info/cashondelivery.phtml +32 -32
- app/design/adminhtml/default/default/template/payone/core/payment/method/info/debitpayment.phtml +17 -6
- app/design/adminhtml/default/default/template/payone/core/payment/method/info/onlinebanktransfer.phtml +18 -7
- app/design/frontend/base/default/layout/payone/core.xml +25 -0
- app/design/frontend/base/default/template/payone/core/checkout/onepage/review/sepamandate.phtml +24 -0
- app/design/frontend/base/default/template/payone/core/checkout/onepage/success/sepamandatepdflink.phtml +30 -0
- app/design/frontend/base/default/template/payone/core/checkout/protect.phtml +2 -7
- app/design/frontend/base/default/template/payone/core/payment/method/form/creditcard.phtml +5 -5
- app/design/frontend/base/default/template/payone/core/payment/method/form/debitpayment.phtml +72 -21
- app/design/frontend/base/default/template/payone/core/payment/method/form/financing.phtml +1 -1
- app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfer.phtml +65 -13
- app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfer/bankgroup.phtml +74 -74
- app/design/frontend/base/default/template/payone/core/payment/method/form/safe_invoice.phtml +7 -1
- app/design/frontend/base/default/template/payone/core/payment/method/form/safe_invoice/klarna.phtml +191 -0
- app/design/frontend/base/default/template/payone/core/payment/method/form/safe_invoice/klarna/scripts.phtml +25 -0
- app/design/frontend/base/default/template/payone/core/payment/method/form/wallet.phtml +1 -1
- app/design/frontend/base/default/template/payone/core/payment/method/info/debitpayment.phtml +18 -7
- app/design/frontend/base/default/template/payone/core/payment/method/info/onlinebanktransfer.phtml +17 -6
- app/design/frontend/base/default/template/payone/core/payment/method/info/safe_invoice.phtml +47 -47
- app/locale/de_DE/Payone_Core.csv +27 -1
- app/locale/en_US/Payone_Core.csv +2 -1
- js/payone/core/creditcard.js +1 -1
- js/payone/core/debitpayment.js +138 -0
- js/payone/core/klarna.js +38 -0
- js/payone/core/onlinebanktransfer.js +35 -27
- js/payone/core/safe_invoice.js +42 -2
- js/payone/core/sepa_input.js +67 -0
- js/payone/core/sepa_validation.js +56 -0
- lib/Payone/Api/Enum/AccessAction.php +40 -0
- lib/Payone/Api/Enum/FileFormat.php +34 -0
- lib/Payone/Api/Enum/FileType.php +34 -0
- lib/Payone/Api/Enum/FinancingType.php +1 -0
- lib/Payone/Api/Enum/Gender.php +37 -0
- lib/Payone/Api/Enum/PayoutOpenBalance.php +37 -0
- lib/Payone/Api/Enum/PeriodUnit.php +38 -0
- lib/Payone/Api/Enum/PeriodUnitRecurring.php +39 -0
- lib/Payone/Api/Enum/RequestType.php +5 -0
- lib/Payone/Api/Factory.php +140 -0
- lib/Payone/Api/Mapper/Request/Management/UpdateAccess.php +95 -0
- lib/Payone/Api/Mapper/Request/Payment/CreateAccess.php +96 -0
- lib/Payone/Api/Mapper/Request/Payment/Vauthorization.php +46 -0
- lib/Payone/Api/Mapper/Response/Abstract.php +12 -0
- lib/Payone/Api/Mapper/Response/CreateAccess.php +61 -0
- lib/Payone/Api/Mapper/Response/GetFile.php +64 -0
- lib/Payone/Api/Mapper/Response/ManageMandate.php +60 -0
- lib/Payone/Api/Mapper/Response/UpdateAccess.php +61 -0
- lib/Payone/Api/Mapper/Response/Vauthorization.php +60 -0
- lib/Payone/Api/Request/BankAccountCheck.php +89 -9
- lib/Payone/Api/Request/CreateAccess.php +526 -0
- lib/Payone/Api/Request/GetFile.php +98 -0
- lib/Payone/Api/Request/ManageMandate.php +161 -0
- lib/Payone/Api/Request/Parameter/Authorization/DeliveryData.php +20 -0
- lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/DebitPayment.php +60 -0
- lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/OnlineBankTransfer.php +40 -0
- lib/Payone/Api/Request/Parameter/Authorization/PersonalData.php +41 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/3dsecure.php +96 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/Abstract.php +38 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/Billing.php +151 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/Invoicing/Transaction.php +132 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/PaymentMethod/Abstract.php +36 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/PaymentMethod/CreditCard.php +156 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/PaymentMethod/DebitPayment.php +176 -0
- lib/Payone/Api/Request/Parameter/CreateAccess/PersonalData.php +288 -0
- lib/Payone/Api/Request/Parameter/Debit/PaymentMethod/BankAccount.php +60 -0
- lib/Payone/Api/Request/Parameter/Invoicing/Access/Item.php +258 -0
- lib/Payone/Api/Request/Parameter/ManageMandate/Abstract.php +40 -0
- lib/Payone/Api/Request/Parameter/ManageMandate/PaymentMethod/Abstract.php +40 -0
- lib/Payone/Api/Request/Parameter/ManageMandate/PaymentMethod/BankAccount.php +136 -0
- lib/Payone/Api/Request/Parameter/ManageMandate/PersonalData.php +200 -0
- lib/Payone/Api/Request/Parameter/Refund/PaymentMethod/BankAccount.php +60 -0
- lib/Payone/Api/Request/Parameter/UpdateAccess/Invoicing/Transaction.php +90 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/Abstract.php +38 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/Invoicing/Transaction.php +112 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/PaymentMethod/Abstract.php +36 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/PaymentMethod/CreditCard.php +177 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/PaymentMethod/DebitPayment.php +176 -0
- lib/Payone/Api/Request/Parameter/Vauthorization/PersonalData.php +288 -0
- lib/Payone/Api/Request/UpdateAccess.php +353 -0
- lib/Payone/Api/Request/Vauthorization.php +330 -0
- lib/Payone/Api/Response/Authorization/Abstract.php +20 -0
- lib/Payone/Api/Response/Authorization/Approved.php +59 -0
- lib/Payone/Api/Response/BankAccountCheck/Valid.php +119 -0
- lib/Payone/Api/Response/Capture/Approved.php +82 -0
- lib/Payone/Api/Response/CreateAccess/Approved.php +95 -0
- lib/Payone/Api/Response/Management/GetFile.php +70 -0
- lib/Payone/Api/Response/Management/ManageMandate/Approved.php +155 -0
- lib/Payone/Api/Response/Management/UpdateAccess/Ok.php +35 -0
- lib/Payone/Api/Response/Vauthorization/Approved.php +95 -0
- lib/Payone/Api/Service/Management/GetFile.php +66 -0
- lib/Payone/Api/Service/Management/ManageMandate.php +67 -0
- lib/Payone/Api/Service/Management/UpdateAccess.php +83 -0
- lib/Payone/Api/Service/Payment/CreateAccess.php +84 -0
- lib/Payone/Api/Service/Payment/CreateAccessInterface.php +42 -0
- lib/Payone/Api/Service/Payment/Vauthorize.php +83 -0
- lib/Payone/Api/Service/Payment/VauthorizeInterface.php +42 -0
- lib/Payone/Builder.php +50 -0
- lib/Payone/Config.php +26 -1
- lib/Payone/Protocol/Config/Filter.php +8 -0
- lib/Payone/SessionStatus/Config.php +64 -0
- lib/Payone/SessionStatus/Enum/Action.php +42 -0
- lib/Payone/SessionStatus/Exception/Abstract.php +36 -0
- lib/Payone/SessionStatus/Exception/MissmatchingKeys.php +37 -0
- lib/Payone/SessionStatus/Exception/NoPostRequest.php +37 -0
- lib/Payone/SessionStatus/Exception/NoRequestData.php +37 -0
- lib/Payone/SessionStatus/Exception/Validation.php +37 -0
- lib/Payone/SessionStatus/Factory.php +121 -0
- lib/Payone/SessionStatus/Mapper/Request.php +87 -0
- lib/Payone/SessionStatus/Mapper/RequestInterface.php +42 -0
- lib/Payone/SessionStatus/Persistence/Interface.php +53 -0
- lib/Payone/SessionStatus/Request.php +111 -0
- lib/Payone/SessionStatus/Request/Abstract.php +133 -0
- lib/Payone/SessionStatus/Request/Interface.php +60 -0
- lib/Payone/SessionStatus/Request/Item.php +280 -0
- lib/Payone/SessionStatus/Request/Item/Abstract.php +133 -0
- lib/Payone/SessionStatus/Request/Item/Interface.php +160 -0
- lib/Payone/SessionStatus/Response.php +70 -0
- lib/Payone/SessionStatus/Response/Abstract.php +84 -0
- lib/Payone/SessionStatus/Response/Interface.php +36 -0
- lib/Payone/SessionStatus/Service/HandleRequest.php +206 -0
- lib/Payone/SessionStatus/Service/ProtocolRequest.php +116 -0
- lib/Payone/SessionStatus/Service/ProtocolRequest/Interface.php +76 -0
- lib/Payone/SessionStatus/Validator/Abstract.php +39 -0
- lib/Payone/SessionStatus/Validator/DefaultParameters.php +70 -0
- lib/Payone/SessionStatus/Validator/Interface.php +41 -0
- lib/Payone/SessionStatus/Validator/Ip.php +147 -0
- lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Financing.php +24 -1
- lib/Payone/Settings/Service/XmlGenerate.php +20 -0
- lib/Payone/TransactionStatus/Request.php +124 -1
- package.xml +8 -8
- skin/frontend/default/default/payone/core/mandate.css +37 -0
app/code/community/Payone/Core/Block/Adminhtml/System/Config/Form/Field/KlarnaStoreId.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Adminhtml_System
|
18 |
+
* @copyright Copyright (c) 2013 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Alexander Dite <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Adminhtml_System
|
29 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
|
34 |
+
class Payone_Core_Block_Adminhtml_System_Config_Form_Field_KlarnaStoreId
|
35 |
+
extends Payone_Core_Block_Adminhtml_System_Config_Form_Field_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
*
|
39 |
+
*/
|
40 |
+
protected function _prepareToRender()
|
41 |
+
{
|
42 |
+
$this->addColumn('klarna_store_id', array(
|
43 |
+
'label' => Mage::helper('payone_core')->__('Store-ID'),
|
44 |
+
'style' => 'min-width:120px;',
|
45 |
+
));
|
46 |
+
|
47 |
+
$this->addColumn('countries', array(
|
48 |
+
'label' => Mage::helper('payone_core')->__('Countries'),
|
49 |
+
'style' => 'min-width:120px; min-height: 110px;',
|
50 |
+
));
|
51 |
+
$this->_addAfter = false;
|
52 |
+
$this->_addButtonLabel = Mage::helper('payone_core')->__('Add Store-ID');
|
53 |
+
parent::_prepareToRender();
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* @param string $columnName
|
58 |
+
* @return string
|
59 |
+
* @throws Exception
|
60 |
+
*/
|
61 |
+
protected function _renderCellTemplate($columnName)
|
62 |
+
{
|
63 |
+
if ($columnName == 'countries')
|
64 |
+
{
|
65 |
+
$selectType = Payone_Core_Block_Adminhtml_System_Config_Form_Field_Abstract::PAYONE_CORE_FIELD_MULTISELECT;
|
66 |
+
$modelConfigCode = $this->getFactory()->getModelSystemConfigKlarnaCountry();
|
67 |
+
$options = $modelConfigCode->toOptionArray();
|
68 |
+
$rendered = $this->prepareCellTemplate($columnName, $selectType, $options);
|
69 |
+
|
70 |
+
}
|
71 |
+
else {
|
72 |
+
return parent::_renderCellTemplate($columnName);
|
73 |
+
}
|
74 |
+
|
75 |
+
return $rendered;
|
76 |
+
}
|
77 |
+
}
|
app/code/community/Payone/Core/Block/Checkout/Onepage/Review/SepaMandate.php
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Payment
|
18 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Matthias Walter <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Payment
|
29 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
class Payone_Core_Block_Checkout_Onepage_Review_SepaMandate extends Mage_Core_Block_Template
|
34 |
+
{
|
35 |
+
/** @var Payone_Core_Model_Factory */
|
36 |
+
protected $factory = null;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
public function getMandateText()
|
42 |
+
{
|
43 |
+
$mandateText = $this->getFactory()->getSingletonCheckoutSession()->getPayoneSepaMandateText();
|
44 |
+
return $mandateText;
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function getMandateTextDecoded()
|
51 |
+
{
|
52 |
+
return urldecode($this->getMandateText());
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
protected function getMandateStatus()
|
59 |
+
{
|
60 |
+
return $this->getFactory()->getSingletonCheckoutSession()->getPayoneSepaMandateStatus();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @return bool
|
65 |
+
*/
|
66 |
+
public function showMandate()
|
67 |
+
{
|
68 |
+
$mandateText = $this->getMandateText();
|
69 |
+
if (!empty($mandateText) and $this->getMandateStatus() == Payone_Core_Model_Service_Management_ManageMandate::STATUS_PENDING) {
|
70 |
+
return true;
|
71 |
+
}
|
72 |
+
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @param string $html
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function _afterToHtml($html)
|
81 |
+
{
|
82 |
+
/*
|
83 |
+
* after block is rendered we should clear relevant checkout session fields to avoid
|
84 |
+
* falsy interpretation on further checkout passes
|
85 |
+
*/
|
86 |
+
// do not unset mandate status as we need it in further processing
|
87 |
+
$this->getFactory()->getSingletonCheckoutSession()->unsetData('payone_sepa_mandate_text');
|
88 |
+
return parent::_afterToHtml($html);
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @param Payone_Core_Model_Factory $factory
|
93 |
+
*/
|
94 |
+
public function setFactory(Payone_Core_Model_Factory $factory)
|
95 |
+
{
|
96 |
+
$this->factory = $factory;
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @return Payone_Core_Model_Factory
|
101 |
+
*/
|
102 |
+
public function getFactory()
|
103 |
+
{
|
104 |
+
if ($this->factory === null) {
|
105 |
+
$this->factory = new Payone_Core_Model_Factory();
|
106 |
+
}
|
107 |
+
return $this->factory;
|
108 |
+
}
|
109 |
+
}
|
app/code/community/Payone/Core/Block/Checkout/Onepage/Success/SepaMandatePdfLink.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Checkout
|
18 |
+
* @copyright Copyright (c) 2013 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Alexander Dite <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Checkout
|
29 |
+
* @copyright Copyright (c) 2013 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
|
34 |
+
class Payone_Core_Block_Checkout_Onepage_Success_SepaMandatePdfLink
|
35 |
+
extends Mage_Core_Block_Template
|
36 |
+
{
|
37 |
+
/** @var Payone_Core_Model_Factory */
|
38 |
+
protected $factory = null;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* after block is rendered we should clear relevant checkout session fields to avoid
|
42 |
+
* falsy interpretation on further checkout passes
|
43 |
+
*
|
44 |
+
* @param string $html
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
protected function _afterToHtml($html)
|
48 |
+
{
|
49 |
+
$this->getCheckoutSession()->unsPayoneSepaMandateDownloadEnabled();
|
50 |
+
$this->getCheckoutSession()->unsPayoneSepaMandateIdentification();
|
51 |
+
return parent::_afterToHtml($html);
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return Mage_Checkout_Model_Session
|
56 |
+
*/
|
57 |
+
protected function getCheckoutSession()
|
58 |
+
{
|
59 |
+
return $this->getFactory()->getSingletonCheckoutSession();
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @return bool
|
64 |
+
*/
|
65 |
+
public function showLink()
|
66 |
+
{
|
67 |
+
$orderId = $this->getOrderId();
|
68 |
+
if (!$orderId) {
|
69 |
+
return false;
|
70 |
+
}
|
71 |
+
$order = $this->getFactory()->getModelSalesOrder();
|
72 |
+
$order->load($orderId);
|
73 |
+
|
74 |
+
if ($order->getPayment()->getMethod() != Payone_Core_Model_System_Config_PaymentMethodCode::DEBITPAYMENT) {
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
|
78 |
+
$downloadEnabled = $this->getCheckoutSession()->getPayoneSepaMandateDownloadEnabled();
|
79 |
+
$mandateIdentification = $this->getMandateIdentification();
|
80 |
+
|
81 |
+
if (!$downloadEnabled or empty($mandateIdentification)) {
|
82 |
+
return false;
|
83 |
+
}
|
84 |
+
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
+
protected function getMandateIdentification()
|
92 |
+
{
|
93 |
+
return $this->getCheckoutSession()->getPayoneSepaMandateIdentification();
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* @return string
|
98 |
+
*/
|
99 |
+
public function getLinkText()
|
100 |
+
{
|
101 |
+
return $this->helperPayone()->__('Your mandate as PDF');
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
public function getLinkHref()
|
108 |
+
{
|
109 |
+
$isSecure = Mage::app()->getStore()->isCurrentlySecure();
|
110 |
+
|
111 |
+
$url = Mage::getUrl('payone_core/checkout_onepage_success/getSepaPdf',
|
112 |
+
array(
|
113 |
+
'_nosid' => true,
|
114 |
+
'_secure' => $isSecure,
|
115 |
+
'order_id' => $this->getOrderId(),
|
116 |
+
'mandate_identification' => $this->getMandateIdentification()
|
117 |
+
)
|
118 |
+
);
|
119 |
+
|
120 |
+
return $url;
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* @return int
|
125 |
+
*/
|
126 |
+
protected function getOrderId()
|
127 |
+
{
|
128 |
+
return $this->getCheckoutSession()->getLastOrderId();
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @param \Payone_Core_Model_Factory $factory
|
133 |
+
*/
|
134 |
+
public function setFactory(Payone_Core_Model_Factory $factory)
|
135 |
+
{
|
136 |
+
$this->factory = $factory;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @return \Payone_Core_Model_Factory
|
141 |
+
*/
|
142 |
+
public function getFactory()
|
143 |
+
{
|
144 |
+
if ($this->factory === null) {
|
145 |
+
$this->factory = new Payone_Core_Model_Factory();
|
146 |
+
}
|
147 |
+
return $this->factory;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @return Payone_Core_Helper_Data
|
152 |
+
*/
|
153 |
+
protected function helperPayone()
|
154 |
+
{
|
155 |
+
return $this->getFactory()->helper();
|
156 |
+
}
|
157 |
+
}
|
app/code/community/Payone/Core/Block/Payment/Method/Form/DebitPayment.php
CHANGED
@@ -56,4 +56,32 @@ class Payone_Core_Block_Payment_Method_Form_DebitPayment
|
|
56 |
$quote = $this->getQuote();
|
57 |
return $quote->getBillingAddress()->getCountry();
|
58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
56 |
$quote = $this->getQuote();
|
57 |
return $quote->getBillingAddress()->getCountry();
|
58 |
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Return list of selected SEPA countries for debit payment
|
62 |
+
*
|
63 |
+
* @return array
|
64 |
+
*/
|
65 |
+
public function getSelectedSepaCountries()
|
66 |
+
{
|
67 |
+
$paymentConfig = $this->getPaymentConfig();
|
68 |
+
$selectedCountryCodes = $paymentConfig->getSepaCountry();
|
69 |
+
|
70 |
+
if (!$selectedCountryCodes) {
|
71 |
+
return array();
|
72 |
+
}
|
73 |
+
|
74 |
+
/** @var Mage_Directory_Model_Resource_Country_Collection $countryCollection */
|
75 |
+
$countryCollection = Mage::getResourceModel('directory/country_collection');
|
76 |
+
$allCountries = $countryCollection->loadData()->toOptionArray(false);
|
77 |
+
|
78 |
+
$resultArr = array();
|
79 |
+
foreach ($allCountries as $country) {
|
80 |
+
if (in_array($country['value'], $selectedCountryCodes)) {
|
81 |
+
$resultArr[$country['value']] = $country['label'];
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
return $resultArr;
|
86 |
+
}
|
87 |
}
|
app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransfer.php
CHANGED
@@ -51,6 +51,16 @@ class Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
|
|
51 |
return $quote->getBillingAddress()->getCountry();
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* @return array
|
56 |
*/
|
51 |
return $quote->getBillingAddress()->getCountry();
|
52 |
}
|
53 |
|
54 |
+
/**
|
55 |
+
* Returns currency
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
public function getCurrency()
|
59 |
+
{
|
60 |
+
$quote = $this->getQuote();
|
61 |
+
return $quote->getQuoteCurrencyCode();
|
62 |
+
}
|
63 |
+
|
64 |
/**
|
65 |
* @return array
|
66 |
*/
|
app/code/community/Payone/Core/Block/Payment/Method/Form/SafeInvoice.php
CHANGED
@@ -81,4 +81,39 @@ class Payone_Core_Block_Payment_Method_Form_SafeInvoice
|
|
81 |
return 0;
|
82 |
}
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
81 |
return 0;
|
82 |
}
|
83 |
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @return string
|
87 |
+
*/
|
88 |
+
public function getBlockHtmlKlarna()
|
89 |
+
{
|
90 |
+
/** @var Payone_Core_Block_Payment_Method_Form_SafeInvoice_Klarna $block */
|
91 |
+
$block = $this->getLayout()->createBlock('payone_core/payment_method_form_safeInvoice_klarna');
|
92 |
+
$block->setQuote($this->getQuote());
|
93 |
+
$block->setPaymentMethodConfig($this->getPaymentConfig());
|
94 |
+
$html = $block->toHtml();
|
95 |
+
return $html;
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @return bool
|
100 |
+
*/
|
101 |
+
public function showBlockHtmlKlarna()
|
102 |
+
{
|
103 |
+
$types = $this->getTypes();
|
104 |
+
|
105 |
+
if (count($types) == 1) {
|
106 |
+
$type = array_pop($types);
|
107 |
+
if ($type['code'] == Payone_Api_Enum_FinancingType::KLV) {
|
108 |
+
return true;
|
109 |
+
}
|
110 |
+
} elseif (count($types) > 1) {
|
111 |
+
foreach ($types as $type) {
|
112 |
+
if ($type['code'] == Payone_Api_Enum_FinancingType::KLV) {
|
113 |
+
return true;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
return false;
|
118 |
+
}
|
119 |
}
|
app/code/community/Payone/Core/Block/Payment/Method/Form/SafeInvoice/Klarna.php
ADDED
@@ -0,0 +1,258 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Payment
|
18 |
+
* @copyright Copyright (c) 2013 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Alexander Dite <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Payment
|
29 |
+
* @copyright Copyright (c) 2013 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
|
34 |
+
class Payone_Core_Block_Payment_Method_Form_SafeInvoice_Klarna
|
35 |
+
extends Mage_Core_Block_Template
|
36 |
+
{
|
37 |
+
/** @var Payone_Core_Model_Config_Payment_Method_Interface */
|
38 |
+
protected $paymentMethodConfig;
|
39 |
+
/** @var Mage_Sales_Model_Quote */
|
40 |
+
protected $quote;
|
41 |
+
/** @var Payone_Core_Model_Factory */
|
42 |
+
protected $factory = null;
|
43 |
+
|
44 |
+
protected function _construct()
|
45 |
+
{
|
46 |
+
parent::_construct();
|
47 |
+
$this->setTemplate('payone/core/payment/method/form/safe_invoice/klarna.phtml');
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @param \Payone_Core_Model_Config_Payment_Method_Interface $paymentMethodConfig
|
52 |
+
*/
|
53 |
+
public function setPaymentMethodConfig($paymentMethodConfig)
|
54 |
+
{
|
55 |
+
$this->paymentMethodConfig = $paymentMethodConfig;
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @return \Payone_Core_Model_Config_Payment_Method_Interface
|
60 |
+
*/
|
61 |
+
public function getPaymentMethodConfig()
|
62 |
+
{
|
63 |
+
return $this->paymentMethodConfig;
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @param \Mage_Sales_Model_Quote $quote
|
68 |
+
*/
|
69 |
+
public function setQuote($quote)
|
70 |
+
{
|
71 |
+
$this->quote = $quote;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @return \Mage_Sales_Model_Quote
|
76 |
+
*/
|
77 |
+
public function getQuote()
|
78 |
+
{
|
79 |
+
return $this->quote;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* @return bool
|
84 |
+
*/
|
85 |
+
public function isAgreementCheckboxRequired()
|
86 |
+
{
|
87 |
+
$country = $this->getCountry();
|
88 |
+
if ($country == 'AT' or $country == 'DE') {
|
89 |
+
return true;
|
90 |
+
}
|
91 |
+
return false;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
public function getKlarnaStoreId()
|
98 |
+
{
|
99 |
+
$country = $this->getCountry();
|
100 |
+
$klarnaConfig = $this->getPaymentMethodConfig()->getKlarnaConfig();
|
101 |
+
if (empty($klarnaConfig)) {
|
102 |
+
return '';
|
103 |
+
}
|
104 |
+
foreach ($klarnaConfig as $config) {
|
105 |
+
if (isset($config['countries']) and is_array($config['countries'])
|
106 |
+
and in_array($country, $config['countries'])
|
107 |
+
) {
|
108 |
+
return $config['klarna_store_id'];
|
109 |
+
}
|
110 |
+
}
|
111 |
+
return '';
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @return string
|
116 |
+
*/
|
117 |
+
public function getCountry()
|
118 |
+
{
|
119 |
+
$quote = $this->getQuote();
|
120 |
+
$billing = $quote->getBillingAddress();
|
121 |
+
return $billing->getCountry();
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @return bool
|
126 |
+
*/
|
127 |
+
public function isDobRequired()
|
128 |
+
{
|
129 |
+
// required for all countries
|
130 |
+
// required only if customer didn't enter Dob in previous checkout step
|
131 |
+
$customerDob = $this->getQuote()->getCustomerDob();
|
132 |
+
if (empty($customerDob)) {
|
133 |
+
return true;
|
134 |
+
}
|
135 |
+
return false;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
public function canShowAdditionalFields()
|
142 |
+
{
|
143 |
+
$country = $this->getCountry();
|
144 |
+
if (empty($country)) {
|
145 |
+
return false;
|
146 |
+
}
|
147 |
+
return true;
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @return bool
|
152 |
+
*/
|
153 |
+
public function isGenderRequired()
|
154 |
+
{
|
155 |
+
// required only for Austria (AT), Germany (DE) and Netherlands (NL)
|
156 |
+
$country = $this->getCountry();
|
157 |
+
if ($country != 'AT' and $country != 'DE' and $country != 'NL') {
|
158 |
+
return false;
|
159 |
+
}
|
160 |
+
// required only if customer didn't enter gender in his customer account or previous checkout step
|
161 |
+
$customerGender = $this->getQuote()->getCustomerGender();
|
162 |
+
if (empty($customerGender)) {
|
163 |
+
return true;
|
164 |
+
}
|
165 |
+
return false;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* @return array
|
170 |
+
*/
|
171 |
+
public function getGenderOptions()
|
172 |
+
{
|
173 |
+
$customerResource = $this->getFactory()->getSingletonCustomerResource();
|
174 |
+
$options = $customerResource->getAttribute('gender')->getSource()->getAllOptions();
|
175 |
+
return $options;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* @return bool
|
180 |
+
*/
|
181 |
+
public function isPersonalidRequired()
|
182 |
+
{
|
183 |
+
$country = $this->getCountry();
|
184 |
+
// mandatory for Denmark (DK), Finland(FI), Norway (NO) and Sweden (SE)
|
185 |
+
if ($country == 'DK' or $country == 'FI' or $country == 'NO' or $country == 'SE') {
|
186 |
+
return true;
|
187 |
+
}
|
188 |
+
return false;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* @return bool
|
193 |
+
*/
|
194 |
+
public function isShippingAddressAdditionRequired()
|
195 |
+
{
|
196 |
+
$shippingAddress = $this->getQuote()->getShippingAddress();
|
197 |
+
$country = $shippingAddress->getCountry();
|
198 |
+
// required only for Netherlands (NL)
|
199 |
+
if ($country != 'NL') {
|
200 |
+
return false;
|
201 |
+
}
|
202 |
+
|
203 |
+
$addressAdditionShipping = $shippingAddress->getStreet(2);
|
204 |
+
if (empty($addressAdditionShipping)) {
|
205 |
+
return true;
|
206 |
+
}
|
207 |
+
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
|
211 |
+
public function isBillingAddressAdditionRequired()
|
212 |
+
{
|
213 |
+
$billingAddress = $this->getQuote()->getBillingAddress();
|
214 |
+
$country = $billingAddress->getCountry();
|
215 |
+
// required only for Netherlands (NL)
|
216 |
+
if ($country != 'NL') {
|
217 |
+
return false;
|
218 |
+
}
|
219 |
+
$addressAdditionBilling = $billingAddress->getStreet(2);
|
220 |
+
if (empty($addressAdditionBilling)) {
|
221 |
+
return true;
|
222 |
+
}
|
223 |
+
return false;
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* @return bool
|
228 |
+
*/
|
229 |
+
public function isTelephoneRequired()
|
230 |
+
{
|
231 |
+
// telephone is mandatory for any country in case of Klarna
|
232 |
+
$telephone = $this->getQuote()->getBillingAddress()->getTelephone();
|
233 |
+
if (empty($telephone)) {
|
234 |
+
return true;
|
235 |
+
}
|
236 |
+
|
237 |
+
return false;
|
238 |
+
}
|
239 |
+
|
240 |
+
/**
|
241 |
+
* @param \Payone_Core_Model_Factory $factory
|
242 |
+
*/
|
243 |
+
public function setFactory(Payone_Core_Model_Factory $factory)
|
244 |
+
{
|
245 |
+
$this->factory = $factory;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* @return \Payone_Core_Model_Factory
|
250 |
+
*/
|
251 |
+
public function getFactory()
|
252 |
+
{
|
253 |
+
if ($this->factory === null) {
|
254 |
+
$this->factory = new Payone_Core_Model_Factory();
|
255 |
+
}
|
256 |
+
return $this->factory;
|
257 |
+
}
|
258 |
+
}
|
app/code/community/Payone/Core/Block/Payment/Method/Info/CashOnDelivery.php
CHANGED
@@ -1,41 +1,41 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
*
|
6 |
-
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
-
* that is bundled with this package in the file LICENSE.txt
|
8 |
-
*
|
9 |
-
* DISCLAIMER
|
10 |
-
*
|
11 |
-
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
-
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
-
* needs please refer to http://www.payone.de for more information.
|
14 |
-
*
|
15 |
-
* @category Payone
|
16 |
-
* @package Payone_Core_Block
|
17 |
-
* @subpackage Payment
|
18 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
-
* @author Matthias Walter <info@noovias.com>
|
20 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
-
* @link http://www.noovias.com
|
22 |
-
*/
|
23 |
-
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @category Payone
|
27 |
-
* @package Payone_Core_Block
|
28 |
-
* @subpackage Payment
|
29 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
-
* @link http://www.noovias.com
|
32 |
-
*/
|
33 |
-
class Payone_Core_Block_Payment_Method_Info_CashOnDelivery
|
34 |
-
extends Payone_Core_Block_Payment_Method_Info_Abstract
|
35 |
-
{
|
36 |
-
protected function _construct()
|
37 |
-
{
|
38 |
-
parent::_construct();
|
39 |
-
$this->setTemplate('payone/core/payment/method/info/cashondelivery.phtml');
|
40 |
-
}
|
41 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Payment
|
18 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Matthias Walter <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Payment
|
29 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
class Payone_Core_Block_Payment_Method_Info_CashOnDelivery
|
34 |
+
extends Payone_Core_Block_Payment_Method_Info_Abstract
|
35 |
+
{
|
36 |
+
protected function _construct()
|
37 |
+
{
|
38 |
+
parent::_construct();
|
39 |
+
$this->setTemplate('payone/core/payment/method/info/cashondelivery.phtml');
|
40 |
+
}
|
41 |
}
|
app/code/community/Payone/Core/Block/Payment/Method/Info/DebitPayment.php
CHANGED
@@ -64,4 +64,20 @@ class Payone_Core_Block_Payment_Method_Info_DebitPayment
|
|
64 |
{
|
65 |
return $this->getInfo()->getPayoneBankCode();
|
66 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
64 |
{
|
65 |
return $this->getInfo()->getPayoneBankCode();
|
66 |
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* @return string
|
70 |
+
*/
|
71 |
+
public function getPayoneSepaIban()
|
72 |
+
{
|
73 |
+
return $this->getInfo()->getPayoneSepaIban();
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* @return string
|
78 |
+
*/
|
79 |
+
public function getPayoneSepaBic()
|
80 |
+
{
|
81 |
+
return $this->getInfo()->getPayoneSepaBic();
|
82 |
+
}
|
83 |
}
|
app/code/community/Payone/Core/Block/Payment/Method/Info/OnlineBankTransfer.php
CHANGED
@@ -65,4 +65,20 @@ class Payone_Core_Block_Payment_Method_Info_OnlineBankTransfer
|
|
65 |
{
|
66 |
return $this->getInfo()->getPayoneBankCode();
|
67 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
65 |
{
|
66 |
return $this->getInfo()->getPayoneBankCode();
|
67 |
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public function getPayoneSepaIban()
|
73 |
+
{
|
74 |
+
return $this->getInfo()->getPayoneSepaIban();
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @return string
|
79 |
+
*/
|
80 |
+
public function getPayoneSepaBic()
|
81 |
+
{
|
82 |
+
return $this->getInfo()->getPayoneSepaBic();
|
83 |
+
}
|
84 |
}
|
app/code/community/Payone/Core/Block/Payment/Method/Info/SafeInvoice.php
CHANGED
@@ -1,164 +1,164 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
*
|
6 |
-
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
-
* that is bundled with this package in the file LICENSE.txt
|
8 |
-
*
|
9 |
-
* DISCLAIMER
|
10 |
-
*
|
11 |
-
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
-
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
-
* needs please refer to http://www.payone.de for more information.
|
14 |
-
*
|
15 |
-
* @category Payone
|
16 |
-
* @package Payone_Core_Block
|
17 |
-
* @subpackage Payment
|
18 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
-
* @author Matthias Walter <info@noovias.com>
|
20 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
-
* @link http://www.noovias.com
|
22 |
-
*/
|
23 |
-
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @category Payone
|
27 |
-
* @package Payone_Core_Block
|
28 |
-
* @subpackage Payment
|
29 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
-
* @link http://www.noovias.com
|
32 |
-
*/
|
33 |
-
class Payone_Core_Block_Payment_Method_Info_SafeInvoice
|
34 |
-
extends Payone_Core_Block_Payment_Method_Info_Abstract
|
35 |
-
{
|
36 |
-
protected function _construct()
|
37 |
-
{
|
38 |
-
parent::_construct();
|
39 |
-
$this->setTemplate('payone/core/payment/method/info/safe_invoice.phtml');
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* @return string
|
45 |
-
*/
|
46 |
-
public function getSafeInvoiceType()
|
47 |
-
{
|
48 |
-
$model = $this->getFactory()->getModelSystemConfigSafeInvoiceType();
|
49 |
-
$array = $model->toSelectArray();
|
50 |
-
|
51 |
-
$safeInvoiceType = $this->getInfo()->getPayoneSafeInvoiceType();
|
52 |
-
if (array_key_exists($safeInvoiceType, $array)) {
|
53 |
-
return $array[$safeInvoiceType];
|
54 |
-
}
|
55 |
-
return '';
|
56 |
-
}
|
57 |
-
|
58 |
-
public function toPdf()
|
59 |
-
{
|
60 |
-
$this->setTemplate('payone/core/payment/method/pdf/safe_invoice.phtml');
|
61 |
-
return $this->toHtml();
|
62 |
-
}
|
63 |
-
|
64 |
-
|
65 |
-
/**
|
66 |
-
* @return string
|
67 |
-
*/
|
68 |
-
public function getPayoneClearingBankAccountholder()
|
69 |
-
{
|
70 |
-
return $this->getInfo()->getPayoneClearingBankAccountholder();
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* @return string
|
75 |
-
*/
|
76 |
-
public function getPayoneClearingBankCountry()
|
77 |
-
{
|
78 |
-
return $this->getInfo()->getPayoneClearingBankCountry();
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* @return string
|
83 |
-
*/
|
84 |
-
public function getPayoneClearingBankAccount()
|
85 |
-
{
|
86 |
-
return $this->getInfo()->getPayoneClearingBankAccount();
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* @return string
|
91 |
-
*/
|
92 |
-
public function getPayoneClearingBankCode()
|
93 |
-
{
|
94 |
-
return $this->getInfo()->getPayoneClearingBankCode();
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* @return string
|
99 |
-
*/
|
100 |
-
public function getPayoneClearingBankIban()
|
101 |
-
{
|
102 |
-
return $this->getInfo()->getPayoneClearingBankIban();
|
103 |
-
}
|
104 |
-
|
105 |
-
/**
|
106 |
-
* @return string
|
107 |
-
*/
|
108 |
-
public function getPayoneClearingBankBic()
|
109 |
-
{
|
110 |
-
return $this->getInfo()->getPayoneClearingBankBic();
|
111 |
-
}
|
112 |
-
|
113 |
-
/**
|
114 |
-
* @return string
|
115 |
-
*/
|
116 |
-
public function getPayoneClearingBankCity()
|
117 |
-
{
|
118 |
-
return $this->getInfo()->getPayoneClearingBankCity();
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @return string
|
123 |
-
*/
|
124 |
-
public function getPayoneClearingBankName()
|
125 |
-
{
|
126 |
-
return $this->getInfo()->getPayoneClearingBankName();
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @return string
|
132 |
-
*/
|
133 |
-
public function getPayoneClearingReference()
|
134 |
-
{
|
135 |
-
return $this->getInfo()->getPayoneClearingReference();
|
136 |
-
}
|
137 |
-
|
138 |
-
|
139 |
-
/**
|
140 |
-
* @return string
|
141 |
-
*/
|
142 |
-
public function getPayoneClearingInstructionnote()
|
143 |
-
{
|
144 |
-
return $this->getInfo()->getPayoneClearingInstructionnote();
|
145 |
-
}
|
146 |
-
|
147 |
-
|
148 |
-
/**
|
149 |
-
* @return string
|
150 |
-
*/
|
151 |
-
public function getPayoneClearingLegalnote()
|
152 |
-
{
|
153 |
-
return $this->getInfo()->getPayoneClearingLegalnote();
|
154 |
-
}
|
155 |
-
|
156 |
-
|
157 |
-
/**
|
158 |
-
* @return string
|
159 |
-
*/
|
160 |
-
public function getPayoneClearingDuedate()
|
161 |
-
{
|
162 |
-
return $this->getInfo()->getPayoneClearingDuedate();
|
163 |
-
}
|
164 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Block
|
17 |
+
* @subpackage Payment
|
18 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Matthias Walter <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Block
|
28 |
+
* @subpackage Payment
|
29 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
class Payone_Core_Block_Payment_Method_Info_SafeInvoice
|
34 |
+
extends Payone_Core_Block_Payment_Method_Info_Abstract
|
35 |
+
{
|
36 |
+
protected function _construct()
|
37 |
+
{
|
38 |
+
parent::_construct();
|
39 |
+
$this->setTemplate('payone/core/payment/method/info/safe_invoice.phtml');
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @return string
|
45 |
+
*/
|
46 |
+
public function getSafeInvoiceType()
|
47 |
+
{
|
48 |
+
$model = $this->getFactory()->getModelSystemConfigSafeInvoiceType();
|
49 |
+
$array = $model->toSelectArray();
|
50 |
+
|
51 |
+
$safeInvoiceType = $this->getInfo()->getPayoneSafeInvoiceType();
|
52 |
+
if (array_key_exists($safeInvoiceType, $array)) {
|
53 |
+
return $array[$safeInvoiceType];
|
54 |
+
}
|
55 |
+
return '';
|
56 |
+
}
|
57 |
+
|
58 |
+
public function toPdf()
|
59 |
+
{
|
60 |
+
$this->setTemplate('payone/core/payment/method/pdf/safe_invoice.phtml');
|
61 |
+
return $this->toHtml();
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* @return string
|
67 |
+
*/
|
68 |
+
public function getPayoneClearingBankAccountholder()
|
69 |
+
{
|
70 |
+
return $this->getInfo()->getPayoneClearingBankAccountholder();
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @return string
|
75 |
+
*/
|
76 |
+
public function getPayoneClearingBankCountry()
|
77 |
+
{
|
78 |
+
return $this->getInfo()->getPayoneClearingBankCountry();
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
public function getPayoneClearingBankAccount()
|
85 |
+
{
|
86 |
+
return $this->getInfo()->getPayoneClearingBankAccount();
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* @return string
|
91 |
+
*/
|
92 |
+
public function getPayoneClearingBankCode()
|
93 |
+
{
|
94 |
+
return $this->getInfo()->getPayoneClearingBankCode();
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @return string
|
99 |
+
*/
|
100 |
+
public function getPayoneClearingBankIban()
|
101 |
+
{
|
102 |
+
return $this->getInfo()->getPayoneClearingBankIban();
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @return string
|
107 |
+
*/
|
108 |
+
public function getPayoneClearingBankBic()
|
109 |
+
{
|
110 |
+
return $this->getInfo()->getPayoneClearingBankBic();
|
111 |
+
}
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @return string
|
115 |
+
*/
|
116 |
+
public function getPayoneClearingBankCity()
|
117 |
+
{
|
118 |
+
return $this->getInfo()->getPayoneClearingBankCity();
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @return string
|
123 |
+
*/
|
124 |
+
public function getPayoneClearingBankName()
|
125 |
+
{
|
126 |
+
return $this->getInfo()->getPayoneClearingBankName();
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
/**
|
131 |
+
* @return string
|
132 |
+
*/
|
133 |
+
public function getPayoneClearingReference()
|
134 |
+
{
|
135 |
+
return $this->getInfo()->getPayoneClearingReference();
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @return string
|
141 |
+
*/
|
142 |
+
public function getPayoneClearingInstructionnote()
|
143 |
+
{
|
144 |
+
return $this->getInfo()->getPayoneClearingInstructionnote();
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
/**
|
149 |
+
* @return string
|
150 |
+
*/
|
151 |
+
public function getPayoneClearingLegalnote()
|
152 |
+
{
|
153 |
+
return $this->getInfo()->getPayoneClearingLegalnote();
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
/**
|
158 |
+
* @return string
|
159 |
+
*/
|
160 |
+
public function getPayoneClearingDuedate()
|
161 |
+
{
|
162 |
+
return $this->getInfo()->getPayoneClearingDuedate();
|
163 |
+
}
|
164 |
}
|
app/code/community/Payone/Core/Model/Config/General/Global.php
CHANGED
@@ -1,246 +1,246 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
*
|
4 |
-
* NOTICE OF LICENSE
|
5 |
-
*
|
6 |
-
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
-
* that is bundled with this package in the file LICENSE.txt
|
8 |
-
*
|
9 |
-
* DISCLAIMER
|
10 |
-
*
|
11 |
-
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
-
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
-
* needs please refer to http://www.payone.de for more information.
|
14 |
-
*
|
15 |
-
* @category Payone
|
16 |
-
* @package Payone_Core_Model
|
17 |
-
* @subpackage Config
|
18 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
-
* @author Matthias Walter <info@noovias.com>
|
20 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
-
* @link http://www.noovias.com
|
22 |
-
*/
|
23 |
-
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @category Payone
|
27 |
-
* @package Payone_Core_Model
|
28 |
-
* @subpackage Config
|
29 |
-
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
-
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
-
* @link http://www.noovias.com
|
32 |
-
*/
|
33 |
-
class Payone_Core_Model_Config_General_Global extends Payone_Core_Model_Config_AreaAbstract
|
34 |
-
{
|
35 |
-
/**
|
36 |
-
* @var int
|
37 |
-
*/
|
38 |
-
protected $mid = 0;
|
39 |
-
/**
|
40 |
-
* @var int
|
41 |
-
*/
|
42 |
-
protected $portalid = 0;
|
43 |
-
/**
|
44 |
-
* @var int
|
45 |
-
*/
|
46 |
-
protected $aid = 0;
|
47 |
-
/**
|
48 |
-
* @var string
|
49 |
-
*/
|
50 |
-
protected $key = '';
|
51 |
-
/**
|
52 |
-
* @var int
|
53 |
-
*/
|
54 |
-
protected $allowspecific = 0;
|
55 |
-
/**
|
56 |
-
* @var array
|
57 |
-
*/
|
58 |
-
protected $specificcountry = array();
|
59 |
-
/**
|
60 |
-
* @var string
|
61 |
-
*/
|
62 |
-
protected $request_type = '';
|
63 |
-
/**
|
64 |
-
* @var int
|
65 |
-
*/
|
66 |
-
protected $transmit_ip = 1;
|
67 |
-
/**
|
68 |
-
* @var int
|
69 |
-
*/
|
70 |
-
protected $proxy_mode = 0;
|
71 |
-
|
72 |
-
/**
|
73 |
-
* initialize config with specificcounty as array
|
74 |
-
* @param array $data
|
75 |
-
*/
|
76 |
-
public function init(array $data)
|
77 |
-
{
|
78 |
-
if(array_key_exists('specificcountry',$data) && is_string($data['specificcountry']))
|
79 |
-
{
|
80 |
-
$data['specificcountry_by_string'] = $data['specificcountry'];
|
81 |
-
unset($data['specificcountry']);
|
82 |
-
}
|
83 |
-
|
84 |
-
parent::init($data);
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* @param int $aid
|
89 |
-
*/
|
90 |
-
public function setAid($aid)
|
91 |
-
{
|
92 |
-
$this->aid = $aid;
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* @return int
|
97 |
-
*/
|
98 |
-
public function getAid()
|
99 |
-
{
|
100 |
-
return $this->aid;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* @param int $allowspecific
|
105 |
-
*/
|
106 |
-
public function setAllowspecific($allowspecific)
|
107 |
-
{
|
108 |
-
$this->allowspecific = $allowspecific;
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @return int
|
113 |
-
*/
|
114 |
-
public function getAllowspecific()
|
115 |
-
{
|
116 |
-
return $this->allowspecific;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* @param string $key
|
121 |
-
*/
|
122 |
-
public function setKey($key)
|
123 |
-
{
|
124 |
-
$this->key = $key;
|
125 |
-
}
|
126 |
-
|
127 |
-
/**
|
128 |
-
* @return string
|
129 |
-
*/
|
130 |
-
public function getKey()
|
131 |
-
{
|
132 |
-
return $this->key;
|
133 |
-
}
|
134 |
-
|
135 |
-
/**
|
136 |
-
* @param int $mid
|
137 |
-
*/
|
138 |
-
public function setMid($mid)
|
139 |
-
{
|
140 |
-
$this->mid = $mid;
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @return int
|
145 |
-
*/
|
146 |
-
public function getMid()
|
147 |
-
{
|
148 |
-
return $this->mid;
|
149 |
-
}
|
150 |
-
|
151 |
-
/**
|
152 |
-
* @param int $portalid
|
153 |
-
*/
|
154 |
-
public function setPortalid($portalid)
|
155 |
-
{
|
156 |
-
$this->portalid = $portalid;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* @return int
|
161 |
-
*/
|
162 |
-
public function getPortalid()
|
163 |
-
{
|
164 |
-
return $this->portalid;
|
165 |
-
}
|
166 |
-
|
167 |
-
/**
|
168 |
-
* @param string $request_type
|
169 |
-
*/
|
170 |
-
public function setRequestType($request_type)
|
171 |
-
{
|
172 |
-
$this->request_type = $request_type;
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* @return string
|
177 |
-
*/
|
178 |
-
public function getRequestType()
|
179 |
-
{
|
180 |
-
return $this->request_type;
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
* @param array $specificcountry
|
185 |
-
*/
|
186 |
-
public function setSpecificcountry(array $specificcountry)
|
187 |
-
{
|
188 |
-
$this->specificcountry = $specificcountry;
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* @return array
|
193 |
-
*/
|
194 |
-
public function getSpecificcountry()
|
195 |
-
{
|
196 |
-
return $this->specificcountry;
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* @param $specificcountry
|
201 |
-
*/
|
202 |
-
public function setSpecificcountryByString($specificcountry)
|
203 |
-
{
|
204 |
-
$this->specificcountry = explode(',', $specificcountry);
|
205 |
-
}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* @return string
|
209 |
-
*/
|
210 |
-
public function getSpecificcountryAsString()
|
211 |
-
{
|
212 |
-
return implode(',', $this->specificcountry);
|
213 |
-
}
|
214 |
-
|
215 |
-
/**
|
216 |
-
* @param int $transmit_ip
|
217 |
-
*/
|
218 |
-
public function setTransmitIp($transmit_ip)
|
219 |
-
{
|
220 |
-
$this->transmit_ip = $transmit_ip;
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* @return int
|
225 |
-
*/
|
226 |
-
public function getTransmitIp()
|
227 |
-
{
|
228 |
-
return $this->transmit_ip;
|
229 |
-
}
|
230 |
-
|
231 |
-
/**
|
232 |
-
* @param int $proxy_mode
|
233 |
-
*/
|
234 |
-
public function setProxyMode($proxy_mode)
|
235 |
-
{
|
236 |
-
$this->proxy_mode = $proxy_mode;
|
237 |
-
}
|
238 |
-
|
239 |
-
/**
|
240 |
-
* @return int
|
241 |
-
*/
|
242 |
-
public function getProxyMode()
|
243 |
-
{
|
244 |
-
return $this->proxy_mode;
|
245 |
-
}
|
246 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the GNU General Public License (GPL 3)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt
|
8 |
+
*
|
9 |
+
* DISCLAIMER
|
10 |
+
*
|
11 |
+
* Do not edit or add to this file if you wish to upgrade Payone_Core to newer
|
12 |
+
* versions in the future. If you wish to customize Payone_Core for your
|
13 |
+
* needs please refer to http://www.payone.de for more information.
|
14 |
+
*
|
15 |
+
* @category Payone
|
16 |
+
* @package Payone_Core_Model
|
17 |
+
* @subpackage Config
|
18 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
19 |
+
* @author Matthias Walter <info@noovias.com>
|
20 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
21 |
+
* @link http://www.noovias.com
|
22 |
+
*/
|
23 |
+
|
24 |
+
/**
|
25 |
+
*
|
26 |
+
* @category Payone
|
27 |
+
* @package Payone_Core_Model
|
28 |
+
* @subpackage Config
|
29 |
+
* @copyright Copyright (c) 2012 <info@noovias.com> - www.noovias.com
|
30 |
+
* @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
|
31 |
+
* @link http://www.noovias.com
|
32 |
+
*/
|
33 |
+
class Payone_Core_Model_Config_General_Global extends Payone_Core_Model_Config_AreaAbstract
|
34 |
+
{
|
35 |
+
/**
|
36 |
+
* @var int
|
37 |
+
*/
|
38 |
+
protected $mid = 0;
|
39 |
+
/**
|
40 |
+
* @var int
|
41 |
+
*/
|
42 |
+
protected $portalid = 0;
|
43 |
+
/**
|
44 |
+
* @var int
|
45 |
+
*/
|
46 |
+
protected $aid = 0;
|
47 |
+
/**
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
protected $key = '';
|
51 |
+
/**
|
52 |
+
* @var int
|
53 |
+
*/
|
54 |
+
protected $allowspecific = 0;
|
55 |
+
/**
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
+
protected $specificcountry = array();
|
59 |
+
/**
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
protected $request_type = '';
|
63 |
+
/**
|
64 |
+
* @var int
|
65 |
+
*/
|
66 |
+
protected $transmit_ip = 1;
|
67 |
+
/**
|
68 |
+
* @var int
|
69 |
+
*/
|
70 |
+
protected $proxy_mode = 0;
|
71 |
+
|
72 |
+
/**
|
73 |
+
* initialize config with specificcounty as array
|
74 |
+
* @param array $data
|
75 |
+
*/
|
76 |
+
public function init(array $data)
|
77 |
+
{
|
78 |
+
if(array_key_exists('specificcountry',$data) && is_string($data['specificcountry']))
|
79 |
+
{
|
80 |
+
$data['specificcountry_by_string'] = $data['specificcountry'];
|
81 |
+
unset($data['specificcountry']);
|
82 |
+
}
|
83 |
+
|
84 |
+
parent::init($data);
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* @param int $aid
|
89 |
+
*/
|
90 |
+
public function setAid($aid)
|
91 |
+
{
|
92 |
+
$this->aid = $aid;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @return int
|
97 |
+
*/
|
98 |
+
public function getAid()
|
99 |
+
{
|
100 |
+
return $this->aid;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param int $allowspecific
|
105 |
+
*/
|
106 |
+
public function setAllowspecific($allowspecific)
|
107 |
+
{
|
108 |
+
$this->allowspecific = $allowspecific;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return int
|
113 |
+
*/
|
114 |
+
public function getAllowspecific()
|
115 |
+
{
|
116 |
+
return $this->allowspecific;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* @param string $key
|
121 |
+
*/
|
122 |
+
public function setKey($key)
|
123 |
+
{
|
124 |
+
$this->key = $key;
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* @return string
|
129 |
+
*/
|
130 |
+
public function getKey()
|
131 |
+
{
|
132 |
+
return $this->key;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @param int $mid
|
137 |
+
*/
|
138 |
+
public function setMid($mid)
|
139 |
+
{
|
140 |
+
$this->mid = $mid;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @return int
|
145 |
+
*/
|
146 |
+
public function getMid()
|
147 |
+
{
|
148 |
+
return $this->mid;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* @param int $portalid
|
153 |
+
*/
|
154 |
+
public function setPortalid($portalid)
|
155 |
+
{
|
156 |
+
$this->portalid = $portalid;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @return int
|
161 |
+
*/
|
162 |
+
public function getPortalid()
|
163 |
+
{
|
164 |
+
return $this->portalid;
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* @param string $request_type
|
169 |
+
*/
|
170 |
+
public function setRequestType($request_type)
|
171 |
+
{
|
172 |
+
$this->request_type = $request_type;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* @return string
|
177 |
+
*/
|
178 |
+
public function getRequestType()
|
179 |
+
{
|
180 |
+
return $this->request_type;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* @param array $specificcountry
|
185 |
+
*/
|
186 |
+
public function setSpecificcountry(array $specificcountry)
|
187 |
+
{
|
188 |
+
$this->specificcountry = $specificcountry;
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* @return array
|
193 |
+
*/
|
194 |
+
public function getSpecificcountry()
|
195 |
+
{
|
196 |
+
return $this->specificcountry;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* @param $specificcountry
|
201 |
+
*/
|
202 |
+
public function setSpecificcountryByString($specificcountry)
|
203 |
+
{
|
204 |
+
$this->specificcountry = explode(',', $specificcountry);
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
+
public function getSpecificcountryAsString()
|
211 |
+
{
|
212 |
+
return implode(',', $this->specificcountry);
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* @param int $transmit_ip
|
217 |
+
*/
|
218 |
+
public function setTransmitIp($transmit_ip)
|
219 |
+
{
|
220 |
+
$this->transmit_ip = $transmit_ip;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* @return int
|
225 |
+
*/
|
226 |
+
public function getTransmitIp()
|
227 |
+
{
|
228 |
+
return $this->transmit_ip;
|
229 |
+
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* @param int $proxy_mode
|
233 |
+
*/
|
234 |
+
public function setProxyMode($proxy_mode)
|
235 |
+
{
|
236 |
+
$this->proxy_mode = $proxy_mode;
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* @return int
|
241 |
+
*/
|
242 |
+
public function getProxyMode()
|
243 |
+
{
|
244 |
+
return $this->proxy_mode;
|
245 |
+
}
|
246 |
+
}
|
app/code/community/Payone/Core/Model/Config/Payment/Method.php
CHANGED
@@ -116,6 +116,11 @@ class Payone_Core_Model_Config_Payment_Method
|
|
116 |
* @var array
|
117 |
*/
|
118 |
protected $types = array();
|
|
|
|
|
|
|
|
|
|
|
119 |
/**
|
120 |
* @var int
|
121 |
*/
|
@@ -131,6 +136,23 @@ class Payone_Core_Model_Config_Payment_Method
|
|
131 |
/** @var string */
|
132 |
protected $message_response_blocked = '';
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
/**
|
135 |
* @var int
|
136 |
*/
|
@@ -426,6 +448,22 @@ class Payone_Core_Model_Config_Payment_Method
|
|
426 |
return $this->key;
|
427 |
}
|
428 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
/**
|
430 |
* @param int $mid
|
431 |
*/
|
@@ -709,6 +747,70 @@ class Payone_Core_Model_Config_Payment_Method
|
|
709 |
return $this->message_response_blocked;
|
710 |
}
|
711 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
712 |
/**
|
713 |
* @param string $bankaccountcheck_type
|
714 |
*/
|
@@ -735,4 +837,25 @@ class Payone_Core_Model_Config_Payment_Method
|
|
735 |
}
|
736 |
return false;
|
737 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
738 |
}
|
116 |
* @var array
|
117 |
*/
|
118 |
protected $types = array();
|
119 |
+
/**
|
120 |
+
* @var array
|
121 |
+
*/
|
122 |
+
protected $klarna_config = array();
|
123 |
+
|
124 |
/**
|
125 |
* @var int
|
126 |
*/
|
136 |
/** @var string */
|
137 |
protected $message_response_blocked = '';
|
138 |
|
139 |
+
/**
|
140 |
+
* @var array
|
141 |
+
*/
|
142 |
+
protected $sepa_country = array();
|
143 |
+
/**
|
144 |
+
* @var int
|
145 |
+
*/
|
146 |
+
protected $sepa_de_show_bank_data = 0;
|
147 |
+
/**
|
148 |
+
* @var int
|
149 |
+
*/
|
150 |
+
protected $sepa_mandate_enabled = 1;
|
151 |
+
/**
|
152 |
+
* @var int
|
153 |
+
*/
|
154 |
+
protected $sepa_mandate_download_enabled = 1;
|
155 |
+
|
156 |
/**
|
157 |
* @var int
|
158 |
*/
|
448 |
return $this->key;
|
449 |
}
|
450 |
|
451 |
+
/**
|
452 |
+
* @param array $klarna_config
|
453 |
+
*/
|
454 |
+
public function setKlarnaConfig($klarna_config)
|
455 |
+
{
|
456 |
+
$this->klarna_config = $klarna_config;
|
457 |
+
}
|
458 |
+
|
459 |
+
/**
|
460 |
+
* @return array
|
461 |
+
*/
|
462 |
+
public function getKlarnaConfig()
|
463 |
+
{
|
464 |
+
return $this->klarna_config;
|
465 |
+
}
|
466 |
+
|
467 |
/**
|
468 |
* @param int $mid
|
469 |
*/
|
747 |
return $this->message_response_blocked;
|
748 |
}
|
749 |
|
750 |
+
/**
|
751 |
+
* @param array $sepaCountry
|
752 |
+
*/
|
753 |
+
public function setSepaCountry($sepaCountry)
|
754 |
+
{
|
755 |
+
$this->sepa_country = $sepaCountry;
|
756 |
+
}
|
757 |
+
|
758 |
+
/**
|
759 |
+
* @return array
|
760 |
+
*/
|
761 |
+
public function getSepaCountry()
|
762 |
+
{
|
763 |
+
return $this->sepa_country;
|
764 |
+
}
|
765 |
+
|
766 |
+
/**
|
767 |
+
* @param int $sepaDeShowBankData
|
768 |
+
*/
|
769 |
+
public function setSepaDeShowBankData($sepaDeShowBankData)
|
770 |
+
{
|
771 |
+
$this->sepa_de_show_bank_data = $sepaDeShowBankData;
|
772 |
+
}
|
773 |
+
|
774 |
+
/**
|
775 |
+
* @return int
|
776 |
+
*/
|
777 |
+
public function getSepaDeShowBankData()
|
778 |
+
{
|
779 |
+
return $this->sepa_de_show_bank_data;
|
780 |
+
}
|
781 |
+
|
782 |
+
/**
|
783 |
+
* @param int $sepaMandateEnabled
|
784 |
+
*/
|
785 |
+
public function setSepaMandateEnabled($sepaMandateEnabled)
|
786 |
+
{
|
787 |
+
$this->sepa_mandate_enabled = $sepaMandateEnabled;
|
788 |
+
}
|
789 |
+
|
790 |
+
/**
|
791 |
+
* @return int
|
792 |
+
*/
|
793 |
+
public function getSepaMandateEnabled()
|
794 |
+
{
|
795 |
+
return $this->sepa_mandate_enabled;
|
796 |
+
}
|
797 |
+
|
798 |
+
/**
|
799 |
+
* @param int $sepaMandateDownloadEnabled
|
800 |
+
*/
|
801 |
+
public function setSepaMandateDownloadEnabled($sepaMandateDownloadEnabled)
|
802 |
+
{
|
803 |
+
$this->sepa_mandate_download_enabled = $sepaMandateDownloadEnabled;
|
804 |
+
}
|
805 |
+
|
806 |
+
/**
|
807 |
+
* @return int
|
808 |
+
*/
|
809 |
+
public function getSepaMandateDownloadEnabled()
|
810 |
+
{
|
811 |
+
return $this->sepa_mandate_download_enabled;
|
812 |
+
}
|
813 |
+
|
814 |
/**
|
815 |
* @param string $bankaccountcheck_type
|
816 |
*/
|
837 |
}
|
838 |
return false;
|
839 |
}
|
840 |
+
|
841 |
+
/**
|
842 |
+
* @return bool
|
843 |
+
*/
|
844 |
+
public function isSepaMandateEnabled()
|
845 |
+
{
|
846 |
+
if ($this->getSepaMandateEnabled()) {
|
847 |
+
return true;
|
848 |
+
}
|
849 |
+
return false;
|
850 |
+
}
|
851 |
+
|
852 |
+
/**
|
853 |
+
* @return bool
|
854 |
+
*/
|
855 |
+
public function isSepaDeShowBankDataEnabled() {
|
856 |
+
if ($this->getSepaDeShowBankData()) {
|
857 |
+
return true;
|
858 |
+
}
|
859 |
+
return false;
|
860 |
+
}
|
861 |
}
|
app/code/community/Payone/Core/Model/Config/Payment/Method/Interface.php
CHANGED
@@ -52,6 +52,16 @@ interface Payone_Core_Model_Config_Payment_Method_Interface
|
|
52 |
*/
|
53 |
public function isBankAccountCheckEnabled();
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
/**
|
56 |
* @param string $country
|
57 |
* @return bool
|
@@ -120,6 +130,46 @@ interface Payone_Core_Model_Config_Payment_Method_Interface
|
|
120 |
*/
|
121 |
public function getMessageResponseBlocked();
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
/**
|
124 |
* @param int $check_cvc
|
125 |
*/
|
@@ -213,6 +263,16 @@ interface Payone_Core_Model_Config_Payment_Method_Interface
|
|
213 |
*/
|
214 |
public function getKey();
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
/**
|
217 |
* @param int $mid
|
218 |
*/
|
52 |
*/
|
53 |
public function isBankAccountCheckEnabled();
|
54 |
|
55 |
+
/**
|
56 |
+
* @return bool
|
57 |
+
*/
|
58 |
+
public function isSepaMandateEnabled();
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @return bool
|
62 |
+
*/
|
63 |
+
public function isSepaDeShowBankDataEnabled();
|
64 |
+
|
65 |
/**
|
66 |
* @param string $country
|
67 |
* @return bool
|
130 |
*/
|
131 |
public function getMessageResponseBlocked();
|
132 |
|
133 |
+
/**
|
134 |
+
* @param array $sepaCountry
|
135 |
+
*/
|
136 |
+
public function setSepaCountry($sepaCountry);
|
137 |
+
|
138 |
+
/**
|
139 |
+
* @return array
|
140 |
+
*/
|
141 |
+
public function getSepaCountry();
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @param int $sepaDeShowBankData
|
145 |
+
*/
|
146 |
+
public function setSepaDeShowBankData($sepaDeShowBankData);
|
147 |
+
|
148 |
+
/**
|
149 |
+
* @return int
|
150 |
+
*/
|
151 |
+
public function getSepaDeShowBankData();
|
152 |
+
|
153 |
+
/**
|
154 |
+
* @param int $sepaMandateEnabled
|
155 |
+
*/
|
156 |
+
public function setSepaMandateEnabled($sepaMandateEnabled);
|
157 |
+
|
158 |
+
/**
|
159 |
+
* @return int
|
160 |
+
*/
|
161 |
+
public function getSepaMandateEnabled();
|
162 |
+
|
163 |
+
/**
|
164 |
+
* @param int $sepaMandateDownloadEnabled
|
165 |
+
*/
|
166 |
+
public function setSepaMandateDownloadEnabled($sepaMandateDownloadEnabled);
|
167 |
+
|
168 |
+
/**
|
169 |
+
* @return int
|
170 |
+
*/
|
171 |
+
public function getSepaMandateDownloadEnabled();
|
172 |
+
|
173 |
/**
|
174 |
* @param int $check_cvc
|
175 |
*/
|
263 |
*/
|
264 |
public function getKey();
|
265 |
|
266 |
+
/**
|
267 |
+
* @param array $klarna_config
|
268 |
+
*/
|
269 |
+
public function setKlarnaConfig($klarna_config);
|
270 |
+
|
271 |
+
/**
|
272 |
+
* @return array
|
273 |
+
*/
|
274 |
+
public function getKlarnaConfig();
|
275 |
+
|
276 |
/**
|
277 |
* @param int $mid
|
278 |
*/
|
app/code/community/Payone/Core/Model/Domain/Config/PaymentMethod.php
CHANGED
@@ -65,10 +65,18 @@
|
|
65 |
* @method setInvoiceTransmit($invoiceTransmit)
|
66 |
* @method int getInvoiceTransmit()
|
67 |
* @method setTypes($types)
|
|
|
68 |
* @method setCheckCvc($checkCvc)
|
69 |
* @method int getCheckCvc()
|
70 |
* @method setCheckBankAccount($checkBankaccount)
|
71 |
* @method int getCheckBankAccount()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
* @method setMinOrderTotal($minOrderTotal)
|
73 |
* @method float getMinOrderTotal()
|
74 |
* @method setMaxOrderTotal($maxOrderTotal)
|
@@ -443,6 +451,7 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
|
|
443 |
else {
|
444 |
$value = array_pop($fieldValue);
|
445 |
switch ($fieldKey) {
|
|
|
446 |
case 'fee_config':
|
447 |
unset($value['__empty']);
|
448 |
$value = empty($value) ? null : $value;
|
@@ -571,8 +580,11 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
|
|
571 |
{
|
572 |
// prepare fee_config
|
573 |
$this->unserializeData('fee_config');
|
|
|
|
|
574 |
$this->explodeData('types');
|
575 |
$this->explodeData('specificcountry');
|
|
|
576 |
}
|
577 |
|
578 |
|
@@ -595,8 +607,14 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
|
|
595 |
// prepare specificcountry
|
596 |
$this->implodeData('specificcountry');
|
597 |
|
|
|
|
|
|
|
598 |
// prepare fee_config
|
599 |
$this->serializeData('fee_config');
|
|
|
|
|
|
|
600 |
}
|
601 |
|
602 |
/**
|
@@ -663,6 +681,15 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
|
|
663 |
return $this->getData('fee_config');
|
664 |
}
|
665 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
/**
|
667 |
* @return array
|
668 |
*/
|
@@ -672,6 +699,15 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
|
|
672 |
return $this->getData('specificcountry');
|
673 |
}
|
674 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
/**
|
676 |
* @return Payone_Core_Model_Factory
|
677 |
*/
|
65 |
* @method setInvoiceTransmit($invoiceTransmit)
|
66 |
* @method int getInvoiceTransmit()
|
67 |
* @method setTypes($types)
|
68 |
+
* @method setKlarnaConfig($klarnaConfig)
|
69 |
* @method setCheckCvc($checkCvc)
|
70 |
* @method int getCheckCvc()
|
71 |
* @method setCheckBankAccount($checkBankaccount)
|
72 |
* @method int getCheckBankAccount()
|
73 |
+
* @method setSepaCountry($sepaCountry)
|
74 |
+
* @method setSepaDeShowBankData($sepaDeShowBankData)
|
75 |
+
* @method int getSepaDeShowBankData()
|
76 |
+
* @method setSepaMandateEnabled($sepaMandateEnabled)
|
77 |
+
* @method int getSepaMandateEnabled()
|
78 |
+
* @method setSepaMandateDownloadEnabled($sepaMandateDownloadEnabled)
|
79 |
+
* @method int getSepaMandateDownloadEnabled()
|
80 |
* @method setMinOrderTotal($minOrderTotal)
|
81 |
* @method float getMinOrderTotal()
|
82 |
* @method setMaxOrderTotal($maxOrderTotal)
|
451 |
else {
|
452 |
$value = array_pop($fieldValue);
|
453 |
switch ($fieldKey) {
|
454 |
+
case 'klarna_config':
|
455 |
case 'fee_config':
|
456 |
unset($value['__empty']);
|
457 |
$value = empty($value) ? null : $value;
|
580 |
{
|
581 |
// prepare fee_config
|
582 |
$this->unserializeData('fee_config');
|
583 |
+
// prepare klarna config
|
584 |
+
$this->unserializeData('klarna_config');
|
585 |
$this->explodeData('types');
|
586 |
$this->explodeData('specificcountry');
|
587 |
+
$this->explodeData('sepa_country');
|
588 |
}
|
589 |
|
590 |
|
607 |
// prepare specificcountry
|
608 |
$this->implodeData('specificcountry');
|
609 |
|
610 |
+
// prepare sepa_country
|
611 |
+
$this->implodeData('sepa_country');
|
612 |
+
|
613 |
// prepare fee_config
|
614 |
$this->serializeData('fee_config');
|
615 |
+
|
616 |
+
// prepare klarna_config
|
617 |
+
$this->serializeData('klarna_config');
|
618 |
}
|
619 |
|
620 |
/**
|
681 |
return $this->getData('fee_config');
|
682 |
}
|
683 |
|
684 |
+
/**
|
685 |
+
* @return array
|
686 |
+
*/
|
687 |
+
public function getKlarnaConfig()
|
688 |
+
{
|
689 |
+
$this->unserializeData('klarna_config');
|
690 |
+
return $this->getData('klarna_config');
|
691 |
+
}
|
692 |
+
|
693 |
/**
|
694 |
* @return array
|
695 |
*/
|
699 |
return $this->getData('specificcountry');
|
700 |
}
|
701 |
|
702 |
+
/**
|
703 |
+
* @return array
|
704 |
+
*/
|
705 |
+
public function getSepaCountry()
|
706 |
+
{
|
707 |
+
$this->explodeData('sepa_country');
|
708 |
+
return $this->getData('sepa_country');
|
709 |
+
}
|
710 |
+
|
711 |
/**
|
712 |
* @return Payone_Core_Model_Factory
|
713 |
*/
|
app/code/community/Payone/Core/Model/Factory.php
CHANGED
@@ -245,6 +245,34 @@ class Payone_Core_Model_Factory
|
|
245 |
return $mapper;
|
246 |
}
|
247 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
/**
|
249 |
* @param Payone_Core_Model_Config_Protect_Creditrating $config
|
250 |
* @return Payone_Core_Model_Mapper_ApiRequest_Verification_Creditrating
|
@@ -358,6 +386,41 @@ class Payone_Core_Model_Factory
|
|
358 |
return $service;
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
/**
|
362 |
* @param Payone_Core_Model_Config_Protect_AddressCheck $config
|
363 |
* @return Payone_Core_Model_Service_Verification_AddressCheck
|
@@ -579,6 +642,24 @@ class Payone_Core_Model_Factory
|
|
579 |
return $request;
|
580 |
}
|
581 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
582 |
/**
|
583 |
* @return Payone_Api_Request_AddressCheck
|
584 |
*/
|
@@ -690,6 +771,32 @@ class Payone_Core_Model_Factory
|
|
690 |
return $service;
|
691 |
}
|
692 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
693 |
/**
|
694 |
* @return Payone_Api_Service_Verification_ConsumerScore
|
695 |
*/
|
@@ -1061,6 +1168,17 @@ class Payone_Core_Model_Factory
|
|
1061 |
return $model;
|
1062 |
}
|
1063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
/**
|
1065 |
* @return Mage_Customer_Model_Address
|
1066 |
*/
|
@@ -1435,6 +1553,14 @@ class Payone_Core_Model_Factory
|
|
1435 |
return Mage::getSingleton('payone_core/system_config_methodType');
|
1436 |
}
|
1437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1438 |
/**
|
1439 |
* @return Mage_Core_Model_Resource_Transaction
|
1440 |
*/
|
245 |
return $mapper;
|
246 |
}
|
247 |
|
248 |
+
/**
|
249 |
+
* @param Payone_Core_Model_Config_Payment_Method_Interface $config
|
250 |
+
* @return Payone_Core_Model_Mapper_ApiRequest_Management_ManageMandate
|
251 |
+
*/
|
252 |
+
public function getMapperManagementRequestManageMandate(Payone_Core_Model_Config_Payment_Method_Interface $config)
|
253 |
+
{
|
254 |
+
/** @var Payone_Core_Model_Mapper_ApiRequest_Management_ManageMandate $mapper */
|
255 |
+
$mapper = Mage::getModel('payone_core/mapper_apiRequest_management_manageMandate');
|
256 |
+
$mapper->setPaymentConfig($config);
|
257 |
+
$mapper->setFactory($this);
|
258 |
+
|
259 |
+
return $mapper;
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* @param Payone_Core_Model_Config_Payment_Method_Interface $config
|
264 |
+
* @return Payone_Core_Model_Mapper_ApiRequest_Management_GetFile
|
265 |
+
*/
|
266 |
+
public function getMapperManagementRequestGetFile(Payone_Core_Model_Config_Payment_Method_Interface $config)
|
267 |
+
{
|
268 |
+
/** @var Payone_Core_Model_Mapper_ApiRequest_Management_GetFile $mapper */
|
269 |
+
$mapper = Mage::getModel('payone_core/mapper_apiRequest_management_getFile');
|
270 |
+
$mapper->setConfig($config);
|
271 |
+
$mapper->setFactory($this);
|
272 |
+
|
273 |
+
return $mapper;
|
274 |
+
}
|
275 |
+
|
276 |
/**
|
277 |
* @param Payone_Core_Model_Config_Protect_Creditrating $config
|
278 |
* @return Payone_Core_Model_Mapper_ApiRequest_Verification_Creditrating
|
386 |
return $service;
|
387 |
}
|
388 |
|
389 |
+
/**
|
390 |
+
* @param $paymentMethodConfigId
|
391 |
+
* @param $storeId
|
392 |
+
* @return Payone_Core_Model_Service_Management_ManageMandate
|
393 |
+
*/
|
394 |
+
public function getServiceManagementManageMandate($paymentMethodConfigId, $storeId)
|
395 |
+
{
|
396 |
+
$config = $this->helperConfig()->getConfigPaymentMethodById($paymentMethodConfigId, $storeId);
|
397 |
+
$mapper = $this->getMapperManagementRequestManageMandate($config);
|
398 |
+
/** @var Payone_Core_Model_Service_Management_ManageMandate $service */
|
399 |
+
$service = Mage::getModel('payone_core/service_management_manageMandate');
|
400 |
+
$service->setMapper($mapper);
|
401 |
+
$service->setServiceApiManageMandate($this->getServiceApiManagementMan |