Mage_Payone - Version 3.7.8

Version Notes

Mage_Payone-3.7.8

Download this release

Release Info

Developer PAYONE
Extension Mage_Payone
Version 3.7.8
Comparing to
See all releases


Code changes from version 3.7.6 to 3.7.8

Files changed (108) hide show
  1. app/code/community/Payone/Core/Block/Adminhtml/Protocol/TransactionStatus/View.php +1 -1
  2. app/code/community/Payone/Core/Block/Checkout/Onepage/Payment/Methods.php +14 -0
  3. app/code/community/Payone/Core/Block/Payment/Method/Form/Creditcard.php +23 -2
  4. app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransfer.php +62 -11
  5. app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransferEps.php +86 -0
  6. app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransferIdl.php +85 -0
  7. app/code/community/Payone/Core/Block/Payment/Method/Form/Payolution.php +39 -7
  8. app/code/community/Payone/Core/Block/Payment/Method/Form/Wallet.php +12 -0
  9. app/code/community/Payone/Core/Block/Paypal/Express/Shortcut.php +2 -17
  10. app/code/community/Payone/Core/Helper/Data.php +13 -0
  11. app/code/community/Payone/Core/Model/Config/General/StatusMapping.php +23 -0
  12. app/code/community/Payone/Core/Model/Config/Misc/TransactionstatusProcessing.php +19 -0
  13. app/code/community/Payone/Core/Model/Config/Payment/Method.php +23 -0
  14. app/code/community/Payone/Core/Model/Config/Payment/Method/Interface.php +11 -0
  15. app/code/community/Payone/Core/Model/Config/Protect/Creditrating.php +18 -0
  16. app/code/community/Payone/Core/Model/Cronjob/TransactionStatus/Worker.php +4 -0
  17. app/code/community/Payone/Core/Model/Domain/Config/PaymentMethod.php +13 -0
  18. app/code/community/Payone/Core/Model/Domain/Customer.php +3 -1
  19. app/code/community/Payone/Core/Model/Factory.php +10 -2
  20. app/code/community/Payone/Core/Model/Handler/Payment/Abstract.php +47 -31
  21. app/code/community/Payone/Core/Model/Handler/Verification/Creditrating.php +4 -0
  22. app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Authorize/Abstract.php +112 -9
  23. app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Capture.php +10 -2
  24. app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Debit.php +2 -1
  25. app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Genericpayment.php +8 -0
  26. app/code/community/Payone/Core/Model/Mapper/ApiRequest/Verification/Creditrating.php +6 -2
  27. app/code/community/Payone/Core/Model/Observer/Checkout/Onepage/MultiplePaymentCheck.php +24 -24
  28. app/code/community/Payone/Core/Model/Observer/Sales/Order.php +13 -1
  29. app/code/community/Payone/Core/Model/Observer/Sales/Quote/Submit/Failure.php +44 -0
  30. app/code/community/Payone/Core/Model/Payment/Method/Abstract.php +4 -0
  31. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferEps.php +66 -0
  32. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferGiropay.php +66 -0
  33. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferIdl.php +66 -0
  34. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferP24.php +66 -0
  35. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferPostFinanceCard.php +66 -0
  36. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferPostFinanceEfinance.php +66 -0
  37. app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferSofortueberweisung.php +66 -0
  38. app/code/community/Payone/Core/Model/Payment/Method/Payolution.php +42 -0
  39. app/code/community/Payone/Core/Model/Payment/Method/WalletAliPay.php +93 -0
  40. app/code/community/Payone/Core/Model/Payment/Method/WalletPaydirekt.php +92 -0
  41. app/code/community/Payone/Core/Model/Payment/Method/WalletPaypalExpress.php +92 -0
  42. app/code/community/Payone/Core/Model/Repository/Api.php +7 -12
  43. app/code/community/Payone/Core/Model/Repository/TransactionStatus.php +8 -0
  44. app/code/community/Payone/Core/Model/Service/Config/XmlGenerate.php +12 -1
  45. app/code/community/Payone/Core/Model/Service/InitializeConfig.php +4 -4
  46. app/code/community/Payone/Core/Model/Service/TransactionStatus/Execute.php +7 -3
  47. app/code/community/Payone/Core/Model/Service/TransactionStatus/Process.php +16 -4
  48. app/code/community/Payone/Core/Model/System/Config/CreditCardHideCvc.php +44 -0
  49. app/code/community/Payone/Core/Model/System/Config/PaymentMethodCode.php +23 -3
  50. app/code/community/Payone/Core/Model/System/Config/PaymentMethodType.php +25 -3
  51. app/code/community/Payone/Core/controllers/Adminhtml/Payonecore/Protocol/TransactionStatusController.php +1 -1
  52. app/code/community/Payone/Core/controllers/PexpressController.php +5 -5
  53. app/code/community/Payone/Core/etc/adminhtml.xml +4 -4
  54. app/code/community/Payone/Core/etc/config.xml +124 -1
  55. app/code/community/Payone/Core/etc/system.xml +352 -0
  56. app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.0.3-3.0.4.php +4 -1
  57. app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.0.8-3.0.9.php +4 -1
  58. app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.7.6-3.7.7.php +52 -0
  59. app/code/community/Payone/Core/sql/payone_core_setup/mysql4-upgrade-3.7.7-3.7.8.php +85 -0
  60. app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.7.3-3.7.4.sql +0 -6
  61. app/code/community/Payone/Core/sql/payone_core_setup/upgrade-3.7.6-3.7.7.sql +6 -0
  62. app/design/adminhtml/default/default/template/payone/core/payment/method/form/payolution.phtml +11 -7
  63. app/design/frontend/base/default/layout/payone/core.xml +0 -1
  64. app/design/frontend/base/default/template/payone/core/payment/method/form/creditcard.phtml +11 -6
  65. app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfer.phtml +50 -43
  66. app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfer/bankgroupeps.phtml +59 -0
  67. app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfer/bankgroupidl.phtml +46 -0
  68. app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransfereps.phtml +76 -0
  69. app/design/frontend/base/default/template/payone/core/payment/method/form/onlinebanktransferidl.phtml +75 -0
  70. app/design/frontend/base/default/template/payone/core/payment/method/form/payolution.phtml +59 -42
  71. app/design/frontend/base/default/template/payone/core/payment/method/form/wallet.phtml +11 -39
  72. app/design/frontend/base/default/template/payone/core/payment/method/info/onlinebanktransfer.phtml +1 -1
  73. app/locale/de_DE/Payone_Core.csv +45 -3
  74. app/locale/nl_NL/Payone_Core.csv +5 -0
  75. js/payone/core/creditcard.js +22 -3
  76. js/payone/core/onlinebanktransfer.js +119 -103
  77. js/payone/core/payolution.js +4 -4
  78. lib/Payone/Api/Enum/AddressCheckType.php +2 -0
  79. lib/Payone/Api/Enum/ConsumerscoreType.php +1 -0
  80. lib/Payone/Api/Enum/WalletType.php +1 -0
  81. lib/Payone/Api/Request/Genericpayment.php +11 -0
  82. lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/Barzahlen.php +1 -1
  83. lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/CreditCardIframe.php +1 -1
  84. lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/Payolution.php +27 -16
  85. lib/Payone/Api/Request/Parameter/Authorization/PaymentMethod/RatePay.php +1 -1
  86. lib/Payone/Enum/ClearingType.php +11 -0
  87. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Barzahlen.php +1 -1
  88. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Creditcard.php +29 -0
  89. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/CreditcardIframe.php +1 -1
  90. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferEps.php +44 -0
  91. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferGiropay.php +44 -0
  92. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferIdl.php +44 -0
  93. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferP24.php +44 -0
  94. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferPfc.php +44 -0
  95. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferPff.php +44 -0
  96. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/OnlineBankTransferSofortueberweisung.php +44 -0
  97. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Payolution.php +42 -0
  98. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/PayolutionDebit.php +1 -1
  99. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/PayolutionInstallment.php +1 -1
  100. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/PayolutionInvoicing.php +1 -1
  101. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/Ratepay.php +1 -1
  102. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/WalletAliPay.php +45 -0
  103. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/WalletPaydirekt.php +45 -0
  104. lib/Payone/Settings/Data/ConfigFile/PaymentMethod/WalletPaypalExpress.php +46 -0
  105. lib/Payone/Settings/Service/XmlGenerate.php +1 -0
  106. package.xml +1 -1
  107. skin/adminhtml/default/default/payone/core/boxes.css +7 -0
  108. skin/frontend/base/default/payone/core/payolution.css +9 -9
app/code/community/Payone/Core/Block/Adminhtml/Protocol/TransactionStatus/View.php CHANGED
@@ -82,7 +82,7 @@ class Payone_Core_Block_Adminhtml_Protocol_TransactionStatus_View
82
{
83
$transaction = $this->getTransaction();
84
$params = array('id' => $transaction->getId());
85
- return $this->getUrl('*/adminhtml_transaction/view', $params);
86
}
87
88
/**
82
{
83
$transaction = $this->getTransaction();
84
$params = array('id' => $transaction->getId());
85
+ return $this->getUrl('*/payonecore_transaction/view', $params);
86
}
87
88
/**
app/code/community/Payone/Core/Block/Checkout/Onepage/Payment/Methods.php CHANGED
@@ -142,4 +142,18 @@ class Payone_Core_Block_Checkout_Onepage_Payment_Methods
142
return $this->getAction()->getFullActionName('/');
143
}
144
145
}
142
return $this->getAction()->getFullActionName('/');
143
}
144
145
+ public function getSelectedMethodCode()
146
+ {
147
+ if ($codeMethod = parent::getSelectedMethodCode()) {
148
+ $sessionCodeMethod = Mage::getModel('sales/quote')
149
+ ->load(Mage::getSingleton('checkout/session')->getQuoteId())
150
+ ->getPayment()
151
+ ->getMethodInstance()
152
+ ->getCode();
153
+ if ($codeMethod != $sessionCodeMethod) {
154
+ return $sessionCodeMethod;
155
+ }
156
+ }
157
+ return parent::getSelectedMethodCode();
158
+ }
159
}
app/code/community/Payone/Core/Block/Payment/Method/Form/Creditcard.php CHANGED
@@ -79,13 +79,34 @@ class Payone_Core_Block_Payment_Method_Form_Creditcard
79
}
80
81
/**
82
- * @return array
83
- */
84
protected function getSystemConfigMethodTypes()
85
{
86
return $this->getFactory()->getModelSystemConfigCreditCardType()->toSelectArray();
87
}
88
89
/**
90
* @return string
91
*/
79
}
80
81
/**
82
+ * @return array
83
+ */
84
protected function getSystemConfigMethodTypes()
85
{
86
return $this->getFactory()->getModelSystemConfigCreditCardType()->toSelectArray();
87
}
88
89
+ /**
90
+ * @return array
91
+ */
92
+ protected function getSystemConfigHideCvc()
93
+ {
94
+ return $this->getFactory()->getModelSystemConfigHideCvc()->toSelectArray();
95
+ }
96
+
97
+ /**
98
+ * @return null|string
99
+ */
100
+ public function getHideCvcTypes(){
101
+
102
+ $hideTypes = $this->getPaymentConfig()->getHideCvc();
103
+ if(!empty($hideTypes)){
104
+ return Mage::helper('core')->jsonEncode(($hideTypes));
105
+ }
106
+
107
+ return null;
108
+ }
109
+
110
/**
111
* @return string
112
*/
app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransfer.php CHANGED
@@ -33,7 +33,22 @@
33
class Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
34
extends Payone_Core_Block_Payment_Method_Form_Abstract
35
{
36
protected $hasTypes = true;
37
38
protected function _construct()
39
{
@@ -62,24 +77,60 @@ class Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
62
}
63
64
/**
65
- * @return array
66
*/
67
- protected function getSystemConfigMethodTypes()
68
{
69
- return $this->getFactory()->getModelSystemConfigOnlinebanktransferType()->toSelectArray();
70
}
71
72
- public function getBlockHtmlBankGroup()
73
{
74
- /** @var $block Mage_Core_Block_Template */
75
- $block = $this->getLayout()->createBlock('core/template');
76
- $block->setTemplate('payone/core/payment/method/form/onlinebanktransfer/bankgroup.phtml');
77
- $block->setMethodCode($this->getMethodCode());
78
- $block->setSavedCustomerBankGroup($this->getSavedCustomerData('payone_bank_group'));
79
- $html = $block->toHtml();
80
- return $html;
81
}
82
83
84
/**
85
* Retrieve the payment config method id from Quote.
33
class Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
34
extends Payone_Core_Block_Payment_Method_Form_Abstract
35
{
36
+ /**
37
+ * @var bool
38
+ */
39
protected $hasTypes = true;
40
+ /**
41
+ * @var null
42
+ */
43
+ protected $config = null;
44
+ /**
45
+ * @var string
46
+ */
47
+ protected $formattedFeePrice = '';
48
+ /**
49
+ * @var bool
50
+ */
51
+ protected $isCvc = null;
52
53
protected function _construct()
54
{
77
}
78
79
/**
80
+ * @return string
81
*/
82
+ public function getFormattedFeeConfigForOnlineBankTransfer()
83
{
84
+ $this->config = $this->getPaymentConfig();
85
+ if($this->config) {
86
+
87
+ $quote = $this->getQuote();
88
+
89
+ $feeConfig = $this->config->getFeeConfigForQuote($quote);
90
+
91
+ if (is_array($feeConfig) and array_key_exists('fee_config', $feeConfig) and !empty($feeConfig['fee_config']))
92
+ {
93
+ $this->formattedFeePrice = $this->getFormattedFeePriceLabel($this->_calcFeePrice());
94
+ }
95
+ }
96
+ return $this->formattedFeePrice;
97
+ }
98
+
99
+ /**
100
+ * @return string
101
+ */
102
+ public function getCvcConfig()
103
+ {
104
+ $this->config = $this->getPaymentConfig();
105
+
106
+ if($this->config){
107
+ $this->isCvc = $this->config->getCheckCvc();
108
+ }
109
+
110
+ return $this->isCvc;
111
}
112
113
+ /**
114
+ * @return array
115
+ */
116
+ public function onlineBankTransferTypeMapping()
117
{
118
+ return $onlineBankTransferPayment = array(
119
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERSOFORT => Payone_Api_Enum_OnlinebanktransferType::INSTANT_MONEY_TRANSFER,
120
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERGIROPAY => Payone_Api_Enum_OnlinebanktransferType::GIROPAY,
121
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERPFF => Payone_Api_Enum_OnlinebanktransferType::POSTFINANCE_EFINANCE,
122
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERPFC => Payone_Api_Enum_OnlinebanktransferType::POSTFINANCE_CARD,
123
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERP24 => Payone_Api_Enum_OnlinebanktransferType::P24
124
+ );
125
}
126
127
+ /**
128
+ * @return array
129
+ */
130
+ protected function getSystemConfigMethodTypes()
131
+ {
132
+ return $this->getFactory()->getModelSystemConfigOnlinebanktransferType()->toSelectArray();
133
+ }
134
135
/**
136
* Retrieve the payment config method id from Quote.
app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransferEps.php ADDED
@@ -0,0 +1,86 @@
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_Form_OnlineBankTransferEps
34
+ extends Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
35
+ {
36
+ /**
37
+ * @var bool
38
+ */
39
+ protected $hasTypes = true;
40
+ /**
41
+ * @var null
42
+ */
43
+ protected $config = null;
44
+ /**
45
+ * @var string
46
+ */
47
+ protected $formattedFeePrice = '';
48
+ /**
49
+ * @var bool
50
+ */
51
+ protected $isCvc = null;
52
+
53
+ protected function _construct()
54
+ {
55
+ parent::_construct();
56
+ $this->setTemplate('payone/core/payment/method/form/onlinebanktransfereps.phtml');
57
+ }
58
+ /**
59
+ * @return string
60
+ */
61
+ public function getBlockHtmlBankGroupEps()
62
+ {
63
+ /** @var $block Mage_Core_Block_Template */
64
+ $block = $this->getLayout()->createBlock('core/template');
65
+ $block->setTemplate('payone/core/payment/method/form/onlinebanktransfer/bankgroupeps.phtml');
66
+ $block->setMethodCode($this->getMethodCode());
67
+
68
+ if($this->getSavedCustomerData('payone_bank_group')){
69
+ $block->setSavedCustomerBankGroup($this->getSavedCustomerData('payone_bank_group'));
70
+ }
71
+ $html = $block->toHtml();
72
+ return $html;
73
+ }
74
+
75
+ /**
76
+ * @return array
77
+ */
78
+ public function onlineBankTransferTypeMapping()
79
+ {
80
+ return $onlineBankTransferPayment = array(
81
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFEREPS => Payone_Api_Enum_OnlinebanktransferType::EPS_ONLINE_BANK_TRANSFER
82
+ );
83
+ }
84
+
85
+
86
+ }
app/code/community/Payone/Core/Block/Payment/Method/Form/OnlineBankTransferIdl.php ADDED
@@ -0,0 +1,85 @@
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_Form_OnlineBankTransferIdl
34
+ extends Payone_Core_Block_Payment_Method_Form_OnlineBankTransfer
35
+ {
36
+ /**
37
+ * @var bool
38
+ */
39
+ protected $hasTypes = true;
40
+ /**
41
+ * @var null
42
+ */
43
+ protected $config = null;
44
+ /**
45
+ * @var string
46
+ */
47
+ protected $formattedFeePrice = '';
48
+ /**
49
+ * @var bool
50
+ */
51
+ protected $isCvc = null;
52
+
53
+ protected function _construct()
54
+ {
55
+ parent::_construct();
56
+ $this->setTemplate('payone/core/payment/method/form/onlinebanktransferidl.phtml');
57
+ }
58
+
59
+
60
+ /**
61
+ * @return array
62
+ */
63
+ public function onlineBankTransferTypeMapping()
64
+ {
65
+ return $onlineBankTransferPayment = array(
66
+ Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERIDL => Payone_Api_Enum_OnlinebanktransferType::IDEAL
67
+ );
68
+ }
69
+
70
+
71
+ public function getBlockHtmlBankGroupIdl()
72
+ {
73
+ /** @var $block Mage_Core_Block_Template */
74
+ $block = $this->getLayout()->createBlock('core/template');
75
+ $block->setTemplate('payone/core/payment/method/form/onlinebanktransfer/bankgroupidl.phtml');
76
+ $block->setMethodCode($this->getMethodCode());
77
+
78
+ if($this->getSavedCustomerData('payone_bank_group')){
79
+ $block->setSavedCustomerBankGroup($this->getSavedCustomerData('payone_bank_group'));
80
+ }
81
+
82
+ $html = $block->toHtml();
83
+ return $html;
84
+ }
85
+ }
app/code/community/Payone/Core/Block/Payment/Method/Form/Payolution.php CHANGED
@@ -30,7 +30,7 @@ class Payone_Core_Block_Payment_Method_Form_Payolution extends Payone_Core_Block
30
/**
31
* @var string
32
*/
33
- protected $_sAcceptanceBaseUrl = 'https://payment.payolution.com/payolution-payment/infoport/dataprivacydeclaration?mId=';
34
35
/**
36
* @var bool
@@ -105,7 +105,7 @@ class Payone_Core_Block_Payment_Method_Form_Payolution extends Payone_Core_Block
105
Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONDEBIT => Payone_Api_Enum_PayolutionType::PYD,
106
);
107
}
108
-
109
/**
110
* @return mixed
111
*/
@@ -164,15 +164,33 @@ class Payone_Core_Block_Payment_Method_Form_Payolution extends Payone_Core_Block
164
*/
165
public function isTelephoneRequired()
166
{
167
- // telephone is mandatory for any country in case of Klarna
168
- $telephone = $this->getQuote()->getBillingAddress()->getTelephone();
169
- if (empty($telephone)) {
170
return true;
171
}
172
173
return false;
174
}
175
176
/**
177
* @return bool
178
*/
@@ -212,13 +230,27 @@ class Payone_Core_Block_Payment_Method_Form_Payolution extends Payone_Core_Block
212
return false;
213
}
214
215
/**
216
* @return bool|mixed|string
217
*/
218
public function getPayolutionAcceptanceText()
219
{
220
- $sCompany = $this->getMethod()->getConfig()->getCompanyName();
221
- $sUrl = $this->_sAcceptanceBaseUrl . base64_encode($sCompany);
222
$sContent = file_get_contents($sUrl);
223
$sPage = false;
224
if (!empty($sContent) && stripos($sContent, 'payolution') !== false && stripos($sContent, '<header>') !== false) {
30
/**
31
* @var string
32
*/
33
+ protected $_sAcceptanceBaseUrl = 'https://payment.payolution.com/payolution-payment/infoport/dataprivacydeclaration';
34
35
/**
36
* @var bool
105
Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONDEBIT => Payone_Api_Enum_PayolutionType::PYD,
106
);
107
}
108
+
109
/**
110
* @return mixed
111
*/
164
*/
165
public function isTelephoneRequired()
166
{
167
+ // telephone is mandatory for Payolution orders with a billing address in the netherlands
168
+ $sTelephone = $this->getQuote()->getBillingAddress()->getTelephone();
169
+ $sBillingCountry = $this->getQuote()->getBillingAddress()->getCountryId();
170
+ if (empty($sTelephone) && $sBillingCountry == 'NL') {
171
return true;
172
}
173
174
return false;
175
}
176
177
+ /**
178
+ * @return bool
179
+ */
180
+ public function isSepaDataRequired()
181
+ {
182
+ if ($this->getMethodCode() == Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINSTALLMENT) {
183
+ $sBillingCountry = $this->getQuote()->getBillingAddress()->getCountryId();
184
+ $sCurrency = Mage::app()->getStore()->getCurrentCurrencyCode();
185
+
186
+ if (in_array($sBillingCountry, array('GB', 'UK', 'CH')) && in_array($sCurrency, array('GBP', 'CHF'))) {
187
+ return false;
188
+ }
189
+ }
190
+
191
+ return true;
192
+ }
193
+
194
/**
195
* @return bool
196
*/
230
return false;
231
}
232
233
+ /**
234
+ * Generate the payolution privacy declaration url
235
+ *
236
+ * @return string
237
+ */
238
+ protected function _getAcceptanceUrl()
239
+ {
240
+ $sLocaleCode = Mage::app()->getLocale()->getLocaleCode();
241
+ $sCompany = $this->getMethod()->getConfig()->getCompanyName();
242
+ $sUrl = $this->_sAcceptanceBaseUrl.'?mId='.base64_encode($sCompany);
243
+ $sUrl .= '&lang='.substr($sLocaleCode, 0, 2);
244
+ $sUrl .= '&territory='.substr($sLocaleCode, 3, 2);
245
+ return $sUrl;
246
+ }
247
+
248
/**
249
* @return bool|mixed|string
250
*/
251
public function getPayolutionAcceptanceText()
252
{
253
+ $sUrl = $this->_getAcceptanceUrl();
254
$sContent = file_get_contents($sUrl);
255
$sPage = false;
256
if (!empty($sContent) && stripos($sContent, 'payolution') !== false && stripos($sContent, '<header>') !== false) {
app/code/community/Payone/Core/Block/Payment/Method/Form/Wallet.php CHANGED
@@ -41,6 +41,18 @@ class Payone_Core_Block_Payment_Method_Form_Wallet
41
$this->setTemplate('payone/core/payment/method/form/wallet.phtml');
42
}
43
44
/**
45
* @override To prevent display of fee config on payment method, as there might be differen fees for each wallet type
46
*
41
$this->setTemplate('payone/core/payment/method/form/wallet.phtml');
42
}
43
44
+ /**
45
+ * @return array
46
+ */
47
+ public function walletTypeMapping()
48
+ {
49
+ return $walletPayment = array(
50
+ Payone_Core_Model_System_Config_PaymentMethodCode::WALLETPAYDIREKT => Payone_Api_Enum_WalletType::PAYDIREKT,
51
+ Payone_Core_Model_System_Config_PaymentMethodCode::WALLETPAYPALEXPRESS => Payone_Api_Enum_WalletType::PAYPAL_EXPRESS,
52
+ Payone_Core_Model_System_Config_PaymentMethodCode::WALLETALIPAY => Payone_Api_Enum_WalletType::ALIPAY
53
+ );
54
+ }
55
+
56
/**
57
* @override To prevent display of fee config on payment method, as there might be differen fees for each wallet type
58
*
app/code/community/Payone/Core/Block/Paypal/Express/Shortcut.php CHANGED
@@ -54,14 +54,7 @@ class Payone_Core_Block_Paypal_Express_Shortcut extends Mage_Core_Block_Template
54
*
55
* @var string
56
*/
57
- protected $_paymentMethodCode = Payone_Core_Model_System_Config_PaymentMethodCode::WALLET;
58
-
59
- /**
60
- * Payment method type for Paypal Express
61
- *
62
- * @var string
63
- */
64
- protected $_paymentMethodType = Payone_Api_Enum_WalletType::PAYPAL_EXPRESS;
65
66
/**
67
* Start express action
@@ -82,14 +75,6 @@ class Payone_Core_Block_Paypal_Express_Shortcut extends Mage_Core_Block_Template
82
return $result;
83
}
84
85
- // check payment method type availability
86
- $configMethod = $methodInstance->getConfigForQuote($quote);
87
- $methodTypes = $configMethod->getTypes();
88
- if(!in_array($this->_paymentMethodType, $methodTypes)) {
89
- $this->_shouldRender = false;
90
- return $result;
91
- }
92
-
93
// check visibility button on shopping cart
94
$shortcutOnShoppingCart = $this->getHelperConfig()->getConfigGeneral($quote->getStoreId())->getPaymentPaypalExpressCheckout()->getPaypalExpressCheckoutVisibleOnCart();
95
if(empty($shortcutOnShoppingCart)) {
@@ -107,7 +92,7 @@ class Payone_Core_Block_Paypal_Express_Shortcut extends Mage_Core_Block_Template
107
Mage::getModel(
108
'payone_core/service_paypal_express_checkout', array(
109
'quote' => $quote,
110
- 'config' => $configMethod
111
)
112
)->getCheckoutShortcutImageUrl()
113
);
54
*
55
* @var string
56
*/
57
+ protected $_paymentMethodCode = Payone_Core_Model_System_Config_PaymentMethodCode::WALLETPAYPALEXPRESS;
58
59
/**
60
* Start express action
75
return $result;
76
}
77
78
// check visibility button on shopping cart
79
$shortcutOnShoppingCart = $this->getHelperConfig()->getConfigGeneral($quote->getStoreId())->getPaymentPaypalExpressCheckout()->getPaypalExpressCheckoutVisibleOnCart();
80
if(empty($shortcutOnShoppingCart)) {
92
Mage::getModel(
93
'payone_core/service_paypal_express_checkout', array(
94
'quote' => $quote,
95
+ 'config' => $methodInstance->getConfigForQuote($quote)
96
)
97
)->getCheckoutShortcutImageUrl()
98
);
app/code/community/Payone/Core/Helper/Data.php CHANGED
@@ -186,6 +186,19 @@ class Payone_Core_Helper_Data
186
return true;
187
}
188
189
190
/**
191
* Format Magento Adress "street" into one string.
186
return true;
187
}
188
189
+ /**
190
+ * @param string $sMessage
191
+ * @param int $iStoreId
192
+ * @param int $iLogLevel
193
+ * @return void
194
+ */
195
+ public function logCronjobMessage($sMessage, $iStoreId = null, $iLogLevel = Zend_Log::INFO)
196
+ {
197
+ $oConfig = $this->helperConfig()->getConfigMisc($iStoreId)->getTransactionstatusProcessing();
198
+ if ($oConfig->getLoggingActive()) {
199
+ Mage::log($sMessage, $iLogLevel, 'payone_cron.log', true);
200
+ }
201
+ }
202
203
/**
204
* Format Magento Adress "street" into one string.
app/code/community/Payone/Core/Model/Config/General/StatusMapping.php CHANGED
@@ -85,6 +85,10 @@ class Payone_Core_Model_Config_General_StatusMapping extends Payone_Core_Model_C
85
* @var null
86
*/
87
protected $payolution_debit = null;
88
89
/**
90
* @param array $data
@@ -313,6 +317,25 @@ class Payone_Core_Model_Config_General_StatusMapping extends Payone_Core_Model_C
313
return $this->ratepay;
314
}
315
316
/**
317
* @return null
318
*/
85
* @var null
86
*/
87
protected $payolution_debit = null;
88
+ /**
89
+ * @var null
90
+ */
91
+ protected $payolution = null;
92
93
/**
94
* @param array $data
317
return $this->ratepay;
318
}
319
320
+ /**
321
+ * @return null
322
+ */
323
+ public function getPayolution(){
324
+ return $this->payolution;
325
+ }
326
+
327
+ /**
328
+ * @param $payolution
329
+ */
330
+ public function setPayolution($payolution)
331
+ {
332
+ if (is_string($payolution)) {
333
+ $payolution = $this->initValue($payolution);
334
+ }
335
+
336
+ $this->payolution = $payolution;
337
+ }
338
+
339
/**
340
* @return null
341
*/
app/code/community/Payone/Core/Model/Config/Misc/TransactionstatusProcessing.php CHANGED
@@ -44,6 +44,9 @@ class Payone_Core_Model_Config_Misc_TransactionstatusProcessing
44
/** @var int */
45
protected $proxy_mode = 0;
46
47
public function init(array $data)
48
{
49
foreach ($data as $key => $value) {
@@ -123,4 +126,20 @@ class Payone_Core_Model_Config_Misc_TransactionstatusProcessing
123
return $this->proxy_mode;
124
}
125
126
}
44
/** @var int */
45
protected $proxy_mode = 0;
46
47
+ /** @var int */
48
+ protected $logging_active = 0;
49
+
50
public function init(array $data)
51
{
52
foreach ($data as $key => $value) {
126
return $this->proxy_mode;
127
}
128
129
+ /**
130
+ * @param int $logging_active
131
+ */
132
+ public function setLoggingActive($logging_active)
133
+ {
134
+ $this->logging_active = $logging_active;
135
+ }
136
+
137
+ /**
138
+ * @return int
139
+ */
140
+ public function getLoggingActive()
141
+ {
142
+ return $this->logging_active;
143
+ }
144
+
145
}
app/code/community/Payone/Core/Model/Config/Payment/Method.php CHANGED
@@ -116,6 +116,10 @@ class Payone_Core_Model_Config_Payment_Method
116
* @var array
117
*/
118
protected $types = array();
119
/**
120
* @var array
121
*/
@@ -774,6 +778,25 @@ class Payone_Core_Model_Config_Payment_Method
774
return $this->types;
775
}
776
777
/**
778
* @param int $use_global
779
*/
116
* @var array
117
*/
118
protected $types = array();
119
+ /**
120
+ * @var array
121
+ */
122
+ protected $hide_cvc = array();
123
/**
124
* @var array
125
*/
778
return $this->types;
779
}
780
781
+ /**
782
+ * @param $hide_cvc
783
+ */
784
+ public function setHideCvc($hide_cvc)
785
+ {
786
+ $this->hide_cvc = $hide_cvc;
787
+ }
788
+
789
+ /**
790
+ * @return array
791
+ */
792
+ public function getHideCvc()
793
+ {
794
+ return $this->hide_cvc;
795
+ }
796
+
797
+
798
+
799
+
800
/**
801
* @param int $use_global
802
*/
app/code/community/Payone/Core/Model/Config/Payment/Method/Interface.php CHANGED
@@ -190,6 +190,17 @@ interface Payone_Core_Model_Config_Payment_Method_Interface
190
*/
191
public function getCheckCvc();
192
193
/**
194
* @param string $code
195
*/
190
*/
191
public function getCheckCvc();
192
193
+ /**
194
+ * @param $hide_cvc
195
+ * @return mixed
196
+ */
197
+ public function setHideCvc($hide_cvc);
198
+
199
+ /**
200
+ * @return string
201
+ */
202
+ public function getHideCvc();
203
+
204
/**
205
* @param string $code
206
*/
app/code/community/Payone/Core/Model/Config/Protect/Creditrating.php CHANGED
@@ -45,6 +45,8 @@ class Payone_Core_Model_Config_Protect_Creditrating
45
/** @var string */
46
protected $mode = '';
47
48
/** @var int */
49
protected $payment_hint_enabled = 0;
50
/** @var string */
@@ -513,4 +515,20 @@ class Payone_Core_Model_Config_Protect_Creditrating
513
{
514
return $this->payment_hint_text;
515
}
516
}
45
/** @var string */
46
protected $mode = '';
47
48
+ protected $unknown_default = 'G';
49
+
50
/** @var int */
51
protected $payment_hint_enabled = 0;
52
/** @var string */
515
{
516
return $this->payment_hint_text;
517
}
518
+
519
+ /**
520
+ * @param string $unknown_default
521
+ */
522
+ public function setUnknownDefault($unknown_default)
523
+ {
524
+ $this->unknown_default = $unknown_default;
525
+ }
526
+
527
+ /**
528
+ * @return string
529
+ */
530
+ public function getUnknownDefault()
531
+ {
532
+ return $this->unknown_default;
533
+ }
534
}
app/code/community/Payone/Core/Model/Cronjob/TransactionStatus/Worker.php CHANGED
@@ -42,11 +42,15 @@ class Payone_Core_Model_Cronjob_TransactionStatus_Worker
42
*/
43
public function execute(Mage_Cron_Model_Schedule $schedule)
44
{
45
$service = $this->getFactory()->getServiceTransactionStatusExecute();
46
47
$count = $service->executePending();
48
49
$schedule->setMessages($count . ' Transaction-Status processed');
50
}
51
52
}
42
*/
43
public function execute(Mage_Cron_Model_Schedule $schedule)
44
{
45
+ Mage::helper('payone_core')->logCronjobMessage("Started cronjob");
46
+
47
$service = $this->getFactory()->getServiceTransactionStatusExecute();
48
49
$count = $service->executePending();
50
51
$schedule->setMessages($count . ' Transaction-Status processed');
52
+
53
+ Mage::helper('payone_core')->logCronjobMessage("Finished cronjob");
54
}
55
56
}
app/code/community/Payone/Core/Model/Domain/Config/PaymentMethod.php CHANGED
@@ -68,6 +68,7 @@
68
* @method setKlarnaConfig($klarnaConfig)
69
* @method setCheckCvc($checkCvc)
70
* @method string getCheckCvc()
71
* @method setCheckBankAccount($checkBankaccount)
72
* @method int getCheckBankAccount()
73
* @method setSepaCountry($sepaCountry)
@@ -600,6 +601,7 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
600
// prepare ratepay config
601
$this->unserializeData('ratepay_config');
602
$this->explodeData('types');
603
$this->explodeData('specificcountry');
604
$this->explodeData('sepa_country');
605
}
@@ -621,6 +623,8 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
621
// prepare types
622
$this->implodeData('types');
623
624
// prepare specificcountry
625
$this->implodeData('specificcountry');
626
@@ -683,6 +687,15 @@ class Payone_Core_Model_Domain_Config_PaymentMethod
683
}
684
}
685
686
/**
687
* @return array
688
*/
68
* @method setKlarnaConfig($klarnaConfig)
69
* @method setCheckCvc($checkCvc)
70
* @method string getCheckCvc()
71
+ * @method setHideCvc($hideCvc)
72
* @method setCheckBankAccount($checkBankaccount)
73
* @method int getCheckBankAccount()
74
* @method setSepaCountry($sepaCountry)
601
// prepare ratepay config
602
$this->unserializeData('ratepay_config');
603
$this->explodeData('types');
604
+ $this->explodeData('hide_cvc');
605
$this->explodeData('specificcountry');
606
$this->explodeData('sepa_country');
607
}
623
// prepare types
624
$this->implodeData('types');
625
626
+ $this->implodeData('hide_cvc');
627
+
628
// prepare specificcountry
629
$this->implodeData('specificcountry');
630
687
}
688
}
689
690
+ /**
691
+ * @return array
692
+ */
693
+ public function getHideCvc()
694
+ {
695
+ $this->explodeData('hide_cvc');
696
+ return $this->getData('hide_cvc');
697
+ }
698
+
699
/**
700
* @return array
701
*/
app/code/community/Payone/Core/Model/Domain/Customer.php CHANGED
@@ -96,7 +96,9 @@ class Payone_Core_Model_Domain_Customer
96
{
97
$plain_customer_data = Mage::helper('core')->decrypt($this->customer_data);
98
// $plain_customer_data = $this->customer_data;
99
- $result = Mage::helper('core')->jsonDecode($plain_customer_data);
100
if(!is_null($key) && is_array($result) && isset($result[$key])) {
101
return $result[$key];
102
}
96
{
97
$plain_customer_data = Mage::helper('core')->decrypt($this->customer_data);
98
// $plain_customer_data = $this->customer_data;
99
+ if (!empty($plain_customer_data)) {
100
+ $result = Mage::helper('core')->jsonDecode($plain_customer_data);
101
+ }
102
if(!is_null($key) && is_array($result) && isset($result[$key])) {
103
return $result[$key];
104
}
app/code/community/Payone/Core/Model/Factory.php CHANGED
@@ -714,7 +714,7 @@ class Payone_Core_Model_Factory
714
}
715
716
/**
717
- * @return Payone_Api_Request_AddressCheck
718
*/
719
public function getRequestVerificationConsumerScore()
720
{
@@ -1581,6 +1581,14 @@ class Payone_Core_Model_Factory
1581
return Mage::getSingleton('payone_core/system_config_creditCardType');
1582
}
1583
1584
/**
1585
* @return Payone_Core_Model_System_Config_OnlinebanktransferType
1586
*/
@@ -1718,4 +1726,4 @@ class Payone_Core_Model_Factory
1718
$configData = Mage::getModel('core/config_data');
1719
return $configData;
1720
}
1721
- }
714
}
715
716
/**
717
+ * @return Payone_Api_Request_Consumerscore
718
*/
719
public function getRequestVerificationConsumerScore()
720
{
1581
return Mage::getSingleton('payone_core/system_config_creditCardType');
1582
}
1583
1584
+ /**
1585
+ * @return Payone_Core_Model_System_Config_CreditCardType
1586
+ */
1587
+ public function getModelSystemConfigHideCvc()
1588
+ {
1589
+ return Mage::getSingleton('payone_core/system_config_creditCardHideCvc');
1590
+ }
1591
+
1592
/**
1593
* @return Payone_Core_Model_System_Config_OnlinebanktransferType
1594
*/
1726
$configData = Mage::getModel('core/config_data');
1727
return $configData;
1728
}
1729
+ }
app/code/community/Payone/Core/Model/Handler/Payment/Abstract.php CHANGED
@@ -66,43 +66,43 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
66
*/
67
protected $request = null;
68
69
- protected function _isIframePaymentOrder($oRequest)
70
{
71
- if($this->_isYapitalOrder($oRequest) || $this->_isCreditcardIframe($oRequest)) {
72
return true;
73
}
74
75
return false;
76
}
77
-
78
- protected function _getPaymentMethod()
79
{
80
$oOrder = Mage::getSingleton('checkout/session')->getQuote();
81
$oPayment = $oOrder->getPayment();
82
return $oPayment->getMethod();
83
}
84
-
85
- protected function _isCreditcardIframe($oRequest)
86
{
87
- if($this->_getPaymentMethod() == 'payone_creditcard_iframe') {
88
return true;
89
}
90
91
return false;
92
}
93
-
94
- protected function _isYapitalOrder($oRequest)
95
{
96
- if($oRequest->getClearingtype() == 'wlt') {
97
$oPayment = $oRequest->getPayment();
98
- if($oPayment->getWallettype() == 'YPL') {
99
return true;
100
}
101
}
102
103
return false;
104
}
105
-
106
/**
107
* @param Payone_Api_Response_Interface $response
108
* @return Payone_Core_Model_Handler_Payment_Abstract
@@ -121,13 +121,13 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
121
$this->sendAvsMail($response);
122
} elseif ($response->isRedirect()) {
123
$sRedirectUrl = $response->getRedirecturl();
124
- if($this->_isIframePaymentOrder($request)) {
125
$oSession = Mage::getSingleton('checkout/session');
126
$oSession->setPayoneIframeUrl($sRedirectUrl);
127
$oSession->setPayonePaymentType($this->_getPaymentMethod());
128
$sRedirectUrl = Mage::helper('payone_core/url')->getMagentoUrl('payone_core/iframe/show');
129
}
130
-
131
// Magento is url-encoding the redirect url in the javascript since 1.9.3.0.......
132
// decoding the already url encoded url to make it work again
133
if (version_compare(Mage::getVersion(), '1.9.3', '>=')) {
@@ -143,7 +143,8 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
143
$this->updatePaymentByOrder($order);
144
145
if ($response instanceof Payone_Api_Response_Authorization_Abstract ||
146
- $response instanceof Payone_Api_Response_Authorization_Redirect) {
147
// Create Transaction
148
$this->getServiceTransactionCreate()->createByApiResponse($order, $response, $request);
149
} else {
@@ -160,11 +161,11 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
160
// Update Order
161
$this->updateOrder($order);
162
163
- if(method_exists($response, 'getAddPaydataInstructionNotes') && $response->getAddPaydataInstructionNotes()) {
164
$oSession = Mage::getSingleton('checkout/session');
165
$oSession->setPayoneBarzahlenHtml(urldecode($response->getAddPaydataInstructionNotes()));
166
}
167
-
168
// Update Customer
169
$this->updateCustomerByResponse($response);
170
@@ -188,21 +189,37 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
188
{
189
if ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Creditcard) {
190
$order->setData('payone_payment_method_type', $this->getPayment()->getData('cc_type'));
191
- } elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer) {
192
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_onlinebanktransfer_type'));
193
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_SafeInvoice) {
194
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_safe_invoice_type'));
195
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
196
- $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
197
- $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment)
198
- {
199
- $order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_payolution_type'));
200
- } elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Wallet) {
201
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_wallet_type'));
202
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Ratepay) {
203
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_ratepay_type'));
204
}
205
-
206
$oQuote = Mage::getSingleton('checkout/session')->getQuote();
207
$oAddress = $oQuote->getShippingAddress();
208
$order->setData('payone_payment_fee', $oAddress->getData('payone_payment_fee'));
@@ -233,22 +250,21 @@ abstract class Payone_Core_Model_Handler_Payment_Abstract
233
$payment->setPayoneClearingBankCity($response->getClearingBankcity());
234
$payment->setPayoneClearingBankName($response->getClearingBankname());
235
236
- if($response instanceof Payone_Api_Response_Capture_Approved)
237
- {
238
$payment->setPayoneClearingReference($response->getClearingReference());
239
$payment->setPayoneClearingInstructionnote($response->getClearingInstructionnote());
240
$payment->setPayoneClearingLegalnote($response->getClearingLegalnote());
241
$payment->setPayoneClearingDuedate($response->getClearingDuedate());
242
}
243
- } elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_Ratepay) {
244
$oSession = Mage::getSingleton('checkout/session');
245
$oSession->unsRatePayFingerprint();
246
}
247
-
248
- if($response instanceof Payone_Api_Response_Authorization_Abstract) {
249
- if($response->getAddPaydataClearingReference()) {
250
$payment->setPayoneClearingReference($response->getAddPaydataClearingReference());
251
- } elseif($response->getClearingReference()) {
252
$payment->setPayoneClearingReference($response->getClearingReference());
253
}
254
}
66
*/
67
protected $request = null;
68
69
+ protected function _isIframePaymentOrder($oRequest)
70
{
71
+ if ($this->_isYapitalOrder($oRequest) || $this->_isCreditcardIframe($oRequest)) {
72
return true;
73
}
74
75
return false;
76
}
77
+
78
+ protected function _getPaymentMethod()
79
{
80
$oOrder = Mage::getSingleton('checkout/session')->getQuote();
81
$oPayment = $oOrder->getPayment();
82
return $oPayment->getMethod();
83
}
84
+
85
+ protected function _isCreditcardIframe($oRequest)
86
{
87
+ if ($this->_getPaymentMethod() == 'payone_creditcard_iframe') {
88
return true;
89
}
90
91
return false;
92
}
93
+
94
+ protected function _isYapitalOrder($oRequest)
95
{
96
+ if ($oRequest->getClearingtype() == 'wlt') {
97
$oPayment = $oRequest->getPayment();
98
+ if ($oPayment->getWallettype() == 'YPL') {
99
return true;
100
}
101
}
102
103
return false;
104
}
105
+
106
/**
107
* @param Payone_Api_Response_Interface $response
108
* @return Payone_Core_Model_Handler_Payment_Abstract
121
$this->sendAvsMail($response);
122
} elseif ($response->isRedirect()) {
123
$sRedirectUrl = $response->getRedirecturl();
124
+ if ($this->_isIframePaymentOrder($request)) {
125
$oSession = Mage::getSingleton('checkout/session');
126
$oSession->setPayoneIframeUrl($sRedirectUrl);
127
$oSession->setPayonePaymentType($this->_getPaymentMethod());
128
$sRedirectUrl = Mage::helper('payone_core/url')->getMagentoUrl('payone_core/iframe/show');
129
}
130
+
131
// Magento is url-encoding the redirect url in the javascript since 1.9.3.0.......
132
// decoding the already url encoded url to make it work again
133
if (version_compare(Mage::getVersion(), '1.9.3', '>=')) {
143
$this->updatePaymentByOrder($order);
144
145
if ($response instanceof Payone_Api_Response_Authorization_Abstract ||
146
+ $response instanceof Payone_Api_Response_Authorization_Redirect
147
+ ) {
148
// Create Transaction
149
$this->getServiceTransactionCreate()->createByApiResponse($order, $response, $request);
150
} else {
161
// Update Order
162
$this->updateOrder($order);
163
164
+ if (method_exists($response, 'getAddPaydataInstructionNotes') && $response->getAddPaydataInstructionNotes()) {
165
$oSession = Mage::getSingleton('checkout/session');
166
$oSession->setPayoneBarzahlenHtml(urldecode($response->getAddPaydataInstructionNotes()));
167
}
168
+
169
// Update Customer
170
$this->updateCustomerByResponse($response);
171
189
{
190
if ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Creditcard) {
191
$order->setData('payone_payment_method_type', $this->getPayment()->getData('cc_type'));
192
+ } elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer ||
193
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferSofortueberweisung ||
194
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferGiropay ||
195
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferEps ||
196
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferIdl ||
197
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceEfinance ||
198
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceCard ||
199
+ $this->getConfigPaymentMethod() instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferP24)
200
+ {
201
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_onlinebanktransfer_type'));
202
+
203
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_SafeInvoice) {
204
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_safe_invoice_type'));
205
+
206
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
207
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
208
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment ||
209
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Payolution
210
+ ) {
211
+ $order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_payolution_type')
212
+ );
213
+ } elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Wallet ||
214
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_WalletPaydirekt ||
215
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_WalletPaypalExpress ||
216
+ $this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_WalletAliPay
217
+ ) {
218
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_wallet_type'));
219
} elseif ($this->getPaymentMethod() instanceof Payone_Core_Model_Payment_Method_Ratepay) {
220
$order->setData('payone_payment_method_type', $this->getPayment()->getData('payone_ratepay_type'));
221
}
222
+
223
$oQuote = Mage::getSingleton('checkout/session')->getQuote();
224
$oAddress = $oQuote->getShippingAddress();
225
$order->setData('payone_payment_fee', $oAddress->getData('payone_payment_fee'));
250
$payment->setPayoneClearingBankCity($response->getClearingBankcity());
251
$payment->setPayoneClearingBankName($response->getClearingBankname());
252
253
+ if ($response instanceof Payone_Api_Response_Capture_Approved) {
254
$payment->setPayoneClearingReference($response->getClearingReference());
255
$payment->setPayoneClearingInstructionnote($response->getClearingInstructionnote());
256
$payment->setPayoneClearingLegalnote($response->getClearingLegalnote());
257
$payment->setPayoneClearingDuedate($response->getClearingDuedate());
258
}
259
+ } elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Ratepay) {
260
$oSession = Mage::getSingleton('checkout/session');
261
$oSession->unsRatePayFingerprint();
262
}
263
+
264
+ if ($response instanceof Payone_Api_Response_Authorization_Abstract) {
265
+ if ($response->getAddPaydataClearingReference()) {
266
$payment->setPayoneClearingReference($response->getAddPaydataClearingReference());
267
+ } elseif ($response->getClearingReference()) {
268
$payment->setPayoneClearingReference($response->getClearingReference());
269
}
270
}
app/code/community/Payone/Core/Model/Handler/Verification/Creditrating.php CHANGED
@@ -52,9 +52,13 @@ class Payone_Core_Model_Handler_Verification_Creditrating
52
53
$creditRatingScore = array();
54
if ($response instanceof Payone_Api_Response_Consumerscore_Valid) {
55
/** @var $response Payone_Api_Response_Consumerscore_Valid */
56
$creditRatingScore = $response->getScore();
57
58
$address->setPayoneProtectScore($creditRatingScore);
59
$address->setPayoneProtectDate(now());
60
$address->setPayoneProtectHash($this->helper()->createAddressHash($address));
52
53
$creditRatingScore = array();
54
if ($response instanceof Payone_Api_Response_Consumerscore_Valid) {
55
+
56
+ $unknownDefault = $this->config->getUnknownDefault();
57
/** @var $response Payone_Api_Response_Consumerscore_Valid */
58
$creditRatingScore = $response->getScore();
59
60
+ $creditRatingScore = $creditRatingScore === 'U' ? $unknownDefault : $creditRatingScore;
61
+
62
$address->setPayoneProtectScore($creditRatingScore);
63
$address->setPayoneProtectDate(now());
64
$address->setPayoneProtectHash($this->helper()->createAddressHash($address));
app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Authorize/Abstract.php CHANGED
@@ -107,14 +107,21 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
107
{
108
109
}
110
-
111
protected function _getReferenceNumber($oPayment, $oOrder)
112
{
113
$sRefNr = $oOrder->getIncrementId();
114
- if ($oPayment instanceof Payone_Core_Model_Payment_Method_Wallet && $this->_getWalletType() == 'PDT') {
115
$sRefNr = str_replace('_', '-', $sRefNr);
116
}
117
-
118
return $sRefNr;
119
}
120
@@ -143,7 +150,8 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
143
144
// Always use PREAUTHORIZATION for Payolution Debit and Invoicing
145
if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
146
- $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing)
147
{
148
$requestType = Payone_Api_Enum_RequestType::PREAUTHORIZATION;
149
}
@@ -330,7 +338,9 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
330
331
// Multiple Ips could be included, we only send the last one.
332
$remoteIps = explode(',', $remoteIp);
333
- $ip = array_pop($remoteIps);
334
return $ip;
335
}
336
@@ -478,7 +488,15 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
478
479
$payment->setPseudocardpan($info->getPayonePseudocardpan());
480
$isRedirect = true;
481
- } elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer) {
482
$country = $this->getOrder()->getBillingAddress()->getCountry();
483
$payoneOnlinebanktransferType = $info->getPayoneOnlinebanktransferType();
484
$iban = $info->getPayoneSepaIban();
@@ -502,6 +520,8 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
502
}
503
break;
504
case Payone_Api_Enum_OnlinebanktransferType::IDEAL:
505
case Payone_Api_Enum_OnlinebanktransferType::EPS_ONLINE_BANK_TRANSFER:
506
$payment->setBankgrouptype($info->getPayoneBankGroup());
507
break;
@@ -520,7 +540,40 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
520
// BillSAFE is a redirect payment method, Klarna not
521
$isRedirect = true;
522
}
523
- } elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Wallet) {
524
$payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
525
$payment->setWallettype($this->_getWalletType());
526
$isRedirect = true;
@@ -622,7 +675,8 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
622
$payment->setTelephonenumber($telephone);
623
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
624
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
625
- $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment)
626
{
627
$payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Payolution();
628
$payment->setApiVersion();
@@ -670,6 +724,15 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
670
}
671
672
$payment->setPaydata($payData);
673
}
674
675
if ($isRedirect === true) {
@@ -690,12 +753,19 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
690
$sType = false;
691
692
$aPostPayment = Mage::app()->getRequest()->getPost('payment');
693
if($aPostPayment && array_key_exists('payone_wallet_type', $aPostPayment)) {
694
$sType = $aPostPayment['payone_wallet_type'];
695
} else {
696
$sType = Payone_Api_Enum_WalletType::PAYPAL_EXPRESS;
697
}
698
699
return $sType;
700
}
701
@@ -737,9 +807,39 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
737
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer) {
738
$clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFER;
739
}
740
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Wallet) {
741
$clearingType = Payone_Enum_ClearingType::WALLET;
742
}
743
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Invoice) {
744
$clearingType = Payone_Enum_ClearingType::INVOICE;
745
}
@@ -767,6 +867,9 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
767
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment) {
768
$clearingType = Payone_Enum_ClearingType::PAYOLUTIONINSTALLMENT;
769
}
770
771
return $clearingType;
772
}
@@ -872,4 +975,4 @@ abstract class Payone_Core_Model_Mapper_ApiRequest_Payment_Authorize_Abstract
872
873
return $data;
874
}
875
- }
107
{
108
109
}
110
+
111
+ /**
112
+ * @param $oPayment
113
+ * @param $oOrder
114
+ * @return mixed
115
+ */
116
protected function _getReferenceNumber($oPayment, $oOrder)
117
{
118
$sRefNr = $oOrder->getIncrementId();
119
+ if (($oPayment instanceof Payone_Core_Model_Payment_Method_Wallet
120
+ || $oPayment instanceof Payone_Core_Model_Payment_Method_WalletPaydirekt)
121
+ && ($this->_getWalletType() == 'PDT')
122
+ ) {
123
$sRefNr = str_replace('_', '-', $sRefNr);
124
}
125
return $sRefNr;
126
}
127
150
151
// Always use PREAUTHORIZATION for Payolution Debit and Invoicing
152
if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
153
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
154
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_Payolution)
155
{
156
$requestType = Payone_Api_Enum_RequestType::PREAUTHORIZATION;
157
}
338
339
// Multiple Ips could be included, we only send the last one.
340
$remoteIps = explode(',', $remoteIp);
341
+ $ip = array_shift($remoteIps);
342
+ // remove leading Whitespace for Muliple IPs e.g. "0.0.0.0, 1.1.1.1"
343
+ $ip = trim($ip);
344
return $ip;
345
}
346
488
489
$payment->setPseudocardpan($info->getPayonePseudocardpan());
490
$isRedirect = true;
491
+ } elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer ||
492
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferSofortueberweisung ||
493
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferGiropay ||
494
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferEps ||
495
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferIdl ||
496
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceEfinance ||
497
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceCard ||
498
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferP24)
499
+ {
500
$country = $this->getOrder()->getBillingAddress()->getCountry();
501
$payoneOnlinebanktransferType = $info->getPayoneOnlinebanktransferType();
502
$iban = $info->getPayoneSepaIban();
520
}
521
break;
522
case Payone_Api_Enum_OnlinebanktransferType::IDEAL:
523
+ $payment->setBankgrouptype($info->getPayoneBankGroup());
524
+ break;
525
case Payone_Api_Enum_OnlinebanktransferType::EPS_ONLINE_BANK_TRANSFER:
526
$payment->setBankgrouptype($info->getPayoneBankGroup());
527
break;
540
// BillSAFE is a redirect payment method, Klarna not
541
$isRedirect = true;
542
}
543
+ }
544
+ //Wallet PayDirekt
545
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletPaydirekt) {
546
+ $payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
547
+
548
+ $payment->setWallettype(Payone_Api_Enum_WalletType::PAYDIREKT);
549
+ $isRedirect = true;
550
+
551
+ if ($this->_getWalletType() == 'PDT' && $this->getOrder()->getIsVirtual()) { // is Paydirekt and virtual/download?
552
+ $payData = new Payone_Api_Request_Parameter_Paydata_Paydata();
553
+ $payData->addItem(
554
+ new Payone_Api_Request_Parameter_Paydata_DataItem(
555
+ array('key' => 'shopping_cart_type', 'data' => 'DIGITAL')
556
+ )
557
+ );
558
+ $payment->setPaydata($payData);
559
+ }
560
+ }
561
+ //Wallet PayPal Express
562
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletPaypalExpress) {
563
+ $payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
564
+
565
+ $payment->setWallettype(Payone_Api_Enum_WalletType::PAYPAL_EXPRESS);
566
+ $isRedirect = true;
567
+ }
568
+ //Wallet AliPay
569
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletAliPay) {
570
+ $payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
571
+
572
+ $payment->setWallettype(Payone_Api_Enum_WalletType::ALIPAY);
573
+ $isRedirect = true;
574
+ }
575
+ //Old Wallet Payment
576
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Wallet) {
577
$payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Wallet();
578
$payment->setWallettype($this->_getWalletType());
579
$isRedirect = true;
675
$payment->setTelephonenumber($telephone);
676
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
677
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
678
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment
679
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_Payolution )
680
{
681
$payment = new Payone_Api_Request_Parameter_Authorization_PaymentMethod_Payolution();
682
$payment->setApiVersion();
724
}
725
726
$payment->setPaydata($payData);
727
+
728
+ if ($this->getOrder()->getBillingAddress()->getCountryId() == 'NL') {
729
+ $telephone = $this->getOrder()->getBillingAddress()->getTelephone();
730
+ if (empty($telephone)) {
731
+ $telephone = $info->getPayoneCustomerTelephone();
732
+ }
733
+
734
+ $payment->setTelephonenumber($telephone);
735
+ }
736
}
737
738
if ($isRedirect === true) {
753
$sType = false;
754
755
$aPostPayment = Mage::app()->getRequest()->getPost('payment');
756
+
757
if($aPostPayment && array_key_exists('payone_wallet_type', $aPostPayment)) {
758
$sType = $aPostPayment['payone_wallet_type'];
759
} else {
760
$sType = Payone_Api_Enum_WalletType::PAYPAL_EXPRESS;
761
}
762
763
+ if($aPostPayment && array_key_exists('payone_wallet_paydirekt_type', $aPostPayment)) {
764
+ $sType = $aPostPayment['payone_wallet_paydirekt_type'];
765
+ } else {
766
+ $sType = Payone_Api_Enum_WalletType::PAYPAL_EXPRESS;
767
+ }
768
+
769
return $sType;
770
}
771
807
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer) {
808
$clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFER;
809
}
810
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferSofortueberweisung) {
811
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERSOFORT;
812
+ }
813
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferIdl) {
814
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERIDL;
815
+ }
816
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceCard) {
817
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERPFC;
818
+ }
819
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferp24) {
820
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERP24;
821
+ }
822
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceEfinance) {
823
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERPFF;
824
+ }
825
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferGiropay) {
826
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFERGIROPAY;
827
+ }
828
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferEps) {
829
+ $clearingType = Payone_Enum_ClearingType::ONLINEBANKTRANSFEREPS;
830
+ }
831
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Wallet) {
832
$clearingType = Payone_Enum_ClearingType::WALLET;
833
}
834
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletPaydirekt) {
835
+ $clearingType = Payone_Enum_ClearingType::WALLETPAYDIREKT;
836
+ }
837
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletPaypalExpress) {
838
+ $clearingType = Payone_Enum_ClearingType::WALLETPAYPALEXPRESS;
839
+ }
840
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_WalletAliPay) {
841
+ $clearingType = Payone_Enum_ClearingType::WALLETALIPAY;
842
+ }
843
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Invoice) {
844
$clearingType = Payone_Enum_ClearingType::INVOICE;
845
}
867
elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment) {
868
$clearingType = Payone_Enum_ClearingType::PAYOLUTIONINSTALLMENT;
869
}
870
+ elseif ($paymentMethod instanceof Payone_Core_Model_Payment_Method_Payolution) {
871
+ $clearingType = Payone_Enum_ClearingType::PAYOLUTION;
872
+ }
873
874
return $clearingType;
875
}
975
976
return $data;
977
}
978
+ }
app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Capture.php CHANGED
@@ -86,7 +86,8 @@ class Payone_Core_Model_Mapper_ApiRequest_Payment_Capture
86
$request->setApiVersion('3.10');
87
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
88
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
89
- $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment)
90
{
91
$info = $paymentMethod->getInfoInstance();
92
if($info->getPayoneIsb2b() == '1') {
@@ -151,7 +152,14 @@ class Payone_Core_Model_Mapper_ApiRequest_Payment_Capture
151
152
// settleaccount possibilities depend on payment method:
153
if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_AdvancePayment
154
- or $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer
155
) {
156
$payment = $paymentMethod->getInfoInstance();
157
// Advancepayment and OnlineBankTransfer use NO/AUTO
86
$request->setApiVersion('3.10');
87
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
88
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
89
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment ||
90
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_Payolution)
91
{
92
$info = $paymentMethod->getInfoInstance();
93
if($info->getPayoneIsb2b() == '1') {
152
153
// settleaccount possibilities depend on payment method:
154
if ($paymentMethod instanceof Payone_Core_Model_Payment_Method_AdvancePayment
155
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransfer
156
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferSofortueberweisung
157
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferGiropay
158
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferEps
159
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferIdl
160
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceEfinance
161
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferPostFinanceCard
162
+ || $paymentMethod instanceof Payone_Core_Model_Payment_Method_OnlineBankTransferP24
163
) {
164
$payment = $paymentMethod->getInfoInstance();
165
// Advancepayment and OnlineBankTransfer use NO/AUTO
app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Debit.php CHANGED
@@ -81,7 +81,8 @@ class Payone_Core_Model_Mapper_ApiRequest_Payment_Debit
81
$request->setApiVersion('3.10');
82
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
83
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
84
- $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment)
85
{
86
$info = $paymentMethod->getInfoInstance();
87
if($info->getPayoneIsb2b() == '1') {
81
$request->setApiVersion('3.10');
82
} elseif($paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionDebit ||
83
$paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInvoicing ||
84
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_PayolutionInstallment ||
85
+ $paymentMethod instanceof Payone_Core_Model_Payment_Method_Payolution)
86
{
87
$info = $paymentMethod->getInfoInstance();
88
if($info->getPayoneIsb2b() == '1') {
app/code/community/Payone/Core/Model/Mapper/ApiRequest/Payment/Genericpayment.php CHANGED
@@ -321,6 +321,14 @@ class Payone_Core_Model_Mapper_ApiRequest_Payment_Genericpayment
321
);
322
}
323
324
$request->setPaydata($paydata);
325
$request->setAid($this->getConfigPayment()->getAid());
326
$request->setCurrency($oQuote->getQuoteCurrencyCode());
321
);
322
}
323
324
+ if ($oAddress->getCountry() == 'NL') {
325
+ $sTelephone = $oAddress->getTelephone();
326
+ if (empty($sTelephone)) {
327
+ $sTelephone = $aRequestParams['payone_customer_telephone'];
328
+ }
329
+ $request->setTelephonenumber($sTelephone);
330
+ }
331
+
332
$request->setPaydata($paydata);
333
$request->setAid($this->getConfigPayment()->getAid());
334
$request->setCurrency($oQuote->getQuoteCurrencyCode());
app/code/community/Payone/Core/Model/Mapper/ApiRequest/Verification/Creditrating.php CHANGED
@@ -53,7 +53,11 @@ class Payone_Core_Model_Mapper_ApiRequest_Verification_Creditrating
53
54
55
$request->setConsumerscoretype($config->getType());
56
- $request->setAddresschecktype(Payone_Api_Enum_AddressCheckType::NONE);
57
58
$request->setAid($configGlobal->getAid());
59
$request->setMid($configGlobal->getMid());
@@ -106,4 +110,4 @@ class Payone_Core_Model_Mapper_ApiRequest_Verification_Creditrating
106
{
107
return $this->config;
108
}
109
- }
53
54
55
$request->setConsumerscoretype($config->getType());
56
+ $request->setAddresschecktype(
57
+ ($config->getType() === Payone_Api_Enum_ConsumerscoreType::BONIVERSUM_VERITA) ?
58
+ Payone_Api_Enum_AddressCheckType::BONIVERSUM_PERSON :
59
+ Payone_Api_Enum_AddressCheckType::NONE
60
+ );
61
62
$request->setAid($configGlobal->getAid());
63
$request->setMid($configGlobal->getMid());
110
{
111
return $this->config;
112
}
113
+ }
app/code/community/Payone/Core/Model/Observer/Checkout/Onepage/MultiplePaymentCheck.php CHANGED
@@ -41,6 +41,15 @@ class Payone_Core_Model_Observer_Checkout_Onepage_MultiplePaymentCheck extends P
41
/** @var Payone_Core_Model_Config_Payment_Method_Interface */
42
protected $paymentConfig = null;
43
44
/**
45
* @param Varien_Event_Observer $observer
46
* @return void
@@ -49,24 +58,22 @@ class Payone_Core_Model_Observer_Checkout_Onepage_MultiplePaymentCheck extends P
49
{
50
/** @var Mage_Checkout_OnepageController|Payone_Core_Checkout_OnepageController $controllerAction */
51
$controllerAction = $observer->getEvent()->getControllerAction();
52
- $paymentData = $controllerAction->getRequest()->getPost('payment', array());
53
- $selectedMethod = $paymentData['method'];
54
55
- if ($selectedMethod != Payone_Core_Model_System_Config_PaymentMethodCode::DEBITPAYMENT &&
56
- $selectedMethod != Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINVOICING &&
57
- $selectedMethod != Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONDEBIT &&
58
- $selectedMethod != Payone_Core_Model_System_Config_PaymentMethodCode::CREDITCARD
59
- ) {
60
return;
61
}
62
63
if (!$controllerAction instanceof Payone_Core_Checkout_OnepageController) {
64
- // for Core controller action check if there was a forward from Payone Controller to
65
- // avoid double execution
66
$request = $controllerAction->getRequest();
67
- if ($request->getBeforeForwardInfo('module_name') == 'payone_core'
68
- and $request->getBeforeForwardInfo('controller_name') == 'checkout_onepage'
69
- and $request->getBeforeForwardInfo('action_name') == 'verifyPayment'
70
) {
71
return;
72
}
@@ -74,17 +81,10 @@ class Payone_Core_Model_Observer_Checkout_Onepage_MultiplePaymentCheck extends P
74
75
$this->init($observer);
76
77
- if ($selectedMethod == Payone_Core_Model_System_Config_PaymentMethodCode::DEBITPAYMENT) {
78
- $controllerAction = $this->_performDebitChecks($controllerAction);
79
- } elseif($selectedMethod == Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINVOICING ||
80
- $selectedMethod == Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONDEBIT ||
81
- $selectedMethod == Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINSTALLMENT)
82
- {
83
- $controllerAction = $this->_performPayolutionChecks($controllerAction);
84
- }
85
- elseif($selectedMethod == Payone_Core_Model_System_Config_PaymentMethodCode::CREDITCARD) {
86
- $controllerAction = $this->_performHostedCreditcardChecks($controllerAction);
87
- }
88
89
return $controllerAction;
90
}
@@ -327,4 +327,4 @@ class Payone_Core_Model_Observer_Checkout_Onepage_MultiplePaymentCheck extends P
327
{
328
return $this->paymentConfig;
329
}
330
- }
41
/** @var Payone_Core_Model_Config_Payment_Method_Interface */
42
protected $paymentConfig = null;
43
44
+ protected $paymentMethodChecks = [
45
+ Payone_Core_Model_System_Config_PaymentMethodCode::CREDITCARD => '_performHostedCreditcardChecks',
46
+ Payone_Core_Model_System_Config_PaymentMethodCode::DEBITPAYMENT => '_performDebitChecks',
47
+ Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTION => '_performPayolutionChecks',
48
+ Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONDEBIT => '_performPayolutionChecks',
49
+ Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINSTALLMENT => '_performPayolutionChecks',
50
+ Payone_Core_Model_System_Config_PaymentMethodCode::PAYOLUTIONINVOICING => '_performPayolutionChecks',
51
+ ];
52
+
53
/**
54
* @param Varien_Event_Observer $observer
55
* @return void
58
{
59
/** @var Mage_Checkout_OnepageController|Payone_Core_Checkout_OnepageController $controllerAction */
60
$controllerAction = $observer->getEvent()->getControllerAction();
61
+ $paymentData = $controllerAction->getRequest()->getPost('payment', []);
62
+ $selectedPaymentMethod = $paymentData['method'];
63
64
+ if (!array_key_exists($selectedPaymentMethod, $this->paymentMethodChecks) ||
65
+ !method_exists($this, $this->paymentMethodChecks[$selectedPaymentMethod])
66
+ ) {
67
return;
68
}
69
70
if (!$controllerAction instanceof Payone_Core_Checkout_OnepageController) {
71
+ // For the core controller action check if the request was
72
+ // forwarded from Payone controller to avoid double execution
73
$request = $controllerAction->getRequest();
74
+ if ($request->getBeforeForwardInfo('module_name') == 'payone_core' &&
75
+ $request->getBeforeForwardInfo('controller_name') == 'checkout_onepage' &&
76
+ $request->getBeforeForwardInfo('action_name') == 'verifyPayment'
77
) {
78
return;
79
}
81
82
$this->init($observer);
83
84
+ $controllerAction = call_user_func_array(
85
+ [$this, $this->paymentMethodChecks[$selectedPaymentMethod]],
86
+ [$controllerAction]
87
+ );
88
89
return $controllerAction;
90
}
327
{
328
return $this->paymentConfig;
329
}
330
+ }
app/code/community/Payone/Core/Model/Observer/Sales/Order.php CHANGED
@@ -110,7 +110,15 @@ class Payone_Core_Model_Observer_Sales_Order
110
$customerSavedData['payone_bank_country'] = $payment->getPayoneBankCountry();
111
}
112
113
- if($payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFER) {
114
$paymentMethodCode = $payment->getMethodInstance()->getCode();
115
$customerSavedData['payone_onlinebanktransfer_type'] = $payment->getPayoneOnlinebanktransferType();
116
$customerSavedData['payone_account_number'] = $payment->getPayoneAccountNumber()?$payment->getPayoneAccountNumber():'';
@@ -118,6 +126,8 @@ class Payone_Core_Model_Observer_Sales_Order
118
$customerSavedData['payone_sepa_iban'] = $payment->getPayoneSepaIban()?$payment->getPayoneSepaIban():'';
119
$customerSavedData['payone_sepa_bic'] = $payment->getPayoneSepaBic()?$payment->getPayoneSepaBic():'';
120
$customerSavedData['payone_bank_group'] = $payment->getPayoneBankGroup();
121
}
122
123
if($payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::CREDITCARD) {
@@ -129,6 +139,8 @@ class Payone_Core_Model_Observer_Sales_Order
129
$customerSavedData['cc_number_enc'] = $payment->getCcNumberEnc();
130
$customerSavedData['payone_pseudocardpan'] = $payment->getPayonePseudocardpan();
131
$customerSavedData['payone_config_payment_method_id'] = $payment->getPayoneConfigPaymentMethodId();
132
}
133
134
if(!empty($paymentMethodCode)) {
110
$customerSavedData['payone_bank_country'] = $payment->getPayoneBankCountry();
111
}
112
113
+ if($payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFER ||
114
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERSOFORT ||
115
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERGIROPAY ||
116
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFEREPS ||
117
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERIDL ||
118
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERPFC ||
119
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERPFF ||
120
+ $payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERP24)
121
+ {
122
$paymentMethodCode = $payment->getMethodInstance()->getCode();
123
$customerSavedData['payone_onlinebanktransfer_type'] = $payment->getPayoneOnlinebanktransferType();
124
$customerSavedData['payone_account_number'] = $payment->getPayoneAccountNumber()?$payment->getPayoneAccountNumber():'';
126
$customerSavedData['payone_sepa_iban'] = $payment->getPayoneSepaIban()?$payment->getPayoneSepaIban():'';
127
$customerSavedData['payone_sepa_bic'] = $payment->getPayoneSepaBic()?$payment->getPayoneSepaBic():'';
128
$customerSavedData['payone_bank_group'] = $payment->getPayoneBankGroup();
129
+
130
+ //Mage::log($customerSavedData, null, 'test.log', true);
131
}
132
133
if($payment->getMethodInstance()->getCode() == Payone_Core_Model_System_Config_PaymentMethodCode::CREDITCARD) {
139
$customerSavedData['cc_number_enc'] = $payment->getCcNumberEnc();
140
$customerSavedData['payone_pseudocardpan'] = $payment->getPayonePseudocardpan();
141
$customerSavedData['payone_config_payment_method_id'] = $payment->getPayoneConfigPaymentMethodId();
142
+
143
+ //Mage::log($customerSavedData, null, 'test.log', true);
144
}
145
146
if(!empty($paymentMethodCode)) {
app/code/community/Payone/Core/Model/Observer/Sales/Quote/Submit/Failure.php ADDED
@@ -0,0 +1,44 @@
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 Observer
18
+ * @copyright Copyright (c) 2017 <kontakt@fatchip.de> - www.fatchip.com
19
+ * @author Robert Müller <robert.mueller@fatchip.de>
20
+ * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
+ * @link http://www.noovias.com
22
+ */
23
+
24
+ class Payone_Core_Model_Observer_Sales_Quote_Submit_Failure
25
+ extends Payone_Core_Model_Observer_Abstract
26
+ {
27
+ /**
28
+ * Retrieves api log entry from session and writes it to the db
29
+ *
30
+ * @param Varien_Event_Observer $observer
31
+ * @return void
32
+ */
33
+ public function protocol(Varien_Event_Observer $observer)
34
+ {
35
+ $oSession = Mage::getSingleton('checkout/session');
36
+
37
+ /** @var $domainObject Payone_Core_Model_Repository_Api */
38
+ $domainObject = $oSession->getPayoneApiLogEntry();
39
+ if ($domainObject) {
40
+ $domainObject->save();
41
+ $oSession->unsPayoneApiLogEntry();
42
+ }
43
+ }
44
+ }
app/code/community/Payone/Core/Model/Payment/Method/Abstract.php CHANGED
@@ -287,6 +287,10 @@ abstract class Payone_Core_Model_Payment_Method_Abstract
287
$config = $this->getConfigByOrder($order);
288
$service = $this->getFactory()->getServicePaymentDebit($config);
289
$service->setConfigStore($this->getConfigStore($order->getStoreId()));
290
$service->execute($payment, $amount);
291
}
292
287
$config = $this->getConfigByOrder($order);
288
$service = $this->getFactory()->getServicePaymentDebit($config);
289
$service->setConfigStore($this->getConfigStore($order->getStoreId()));
290
+
291
+ if($order->getBaseCurrencyCode() != $order->getOrderCurrencyCode()) {
292
+ $amount = Mage::app()->getStore()->roundPrice($order->getGrandTotal()); // MAGE-306
293
+ }
294
$service->execute($payment, $amount);
295
}
296
app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferEps.php ADDED
@@ -0,0 +1,66 @@
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 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_Model
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_Model_Payment_Method_OnlineBankTransferEps
34
+ extends Payone_Core_Model_Payment_Method_Abstract
35
+ {
36
+ protected $methodType = Payone_Core_Model_System_Config_PaymentMethodType::ONLINEBANKTRANSFEREPS;
37
+
38
+ protected $_code = Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFEREPS;
39
+
40
+ protected $_formBlockType = 'payone_core/payment_method_form_onlineBankTransferEps';
41
+ protected $_infoBlockType = 'payone_core/payment_method_info_onlineBankTransfer';
42
+
43
+ /** @var Payone_Core_Model_Config_Payment_Method_Interface[] */
44
+ protected $matchingConfigs = array();
45
+
46
+ protected $_canUseInternal = false;
47
+
48
+ /**
49
+ * @api
50
+ *
51
+ * To be used in Form_Block, which has to display all online bank transfer types
52
+ *
53
+ * @param Mage_Sales_Model_Quote $quote
54
+ * @return Payone_Core_Model_Config_Payment_Method_Interface
55
+ */
56
+ public function getAllConfigsByQuote(Mage_Sales_Model_Quote $quote)
57
+ {
58
+ if (empty($this->matchingConfigs)) {
59
+ $configStore = $this->getConfigStore($quote->getStoreId());
60
+
61
+ $this->matchingConfigs = $configStore->getPayment()->getMethodsForQuote($this->methodType, $quote);
62
+ }
63
+
64
+ return $this->matchingConfigs;
65
+ }
66
+ }
app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferGiropay.php ADDED
@@ -0,0 +1,66 @@
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 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_Model
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_Model_Payment_Method_OnlineBankTransferGiropay
34
+ extends Payone_Core_Model_Payment_Method_Abstract
35
+ {
36
+ protected $methodType = Payone_Core_Model_System_Config_PaymentMethodType::ONLINEBANKTRANSFERGIROPAY;
37
+
38
+ protected $_code = Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERGIROPAY;
39
+
40
+ protected $_formBlockType = 'payone_core/payment_method_form_onlineBankTransfer';
41
+ protected $_infoBlockType = 'payone_core/payment_method_info_onlineBankTransfer';
42
+
43
+ /** @var Payone_Core_Model_Config_Payment_Method_Interface[] */
44
+ protected $matchingConfigs = array();
45
+
46
+ protected $_canUseInternal = false;
47
+
48
+ /**
49
+ * @api
50
+ *
51
+ * To be used in Form_Block, which has to display all online bank transfer types
52
+ *
53
+ * @param Mage_Sales_Model_Quote $quote
54
+ * @return Payone_Core_Model_Config_Payment_Method_Interface
55
+ */
56
+ public function getAllConfigsByQuote(Mage_Sales_Model_Quote $quote)
57
+ {
58
+ if (empty($this->matchingConfigs)) {
59
+ $configStore = $this->getConfigStore($quote->getStoreId());
60
+
61
+ $this->matchingConfigs = $configStore->getPayment()->getMethodsForQuote($this->methodType, $quote);
62
+ }
63
+
64
+ return $this->matchingConfigs;
65
+ }
66
+ }
app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferIdl.php ADDED
@@ -0,0 +1,66 @@
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 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_Model
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_Model_Payment_Method_OnlineBankTransferIdl
34
+ extends Payone_Core_Model_Payment_Method_Abstract
35
+ {
36
+ protected $methodType = Payone_Core_Model_System_Config_PaymentMethodType::ONLINEBANKTRANSFERIDL;
37
+
38
+ protected $_code = Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERIDL;
39
+
40
+ protected $_formBlockType = 'payone_core/payment_method_form_onlineBankTransferIdl';
41
+ protected $_infoBlockType = 'payone_core/payment_method_info_onlineBankTransfer';
42
+
43
+ /** @var Payone_Core_Model_Config_Payment_Method_Interface[] */
44
+ protected $matchingConfigs = array();
45
+
46
+ protected $_canUseInternal = false;
47
+
48
+ /**
49
+ * @api
50
+ *
51
+ * To be used in Form_Block, which has to display all online bank transfer types
52
+ *
53
+ * @param Mage_Sales_Model_Quote $quote
54
+ * @return Payone_Core_Model_Config_Payment_Method_Interface
55
+ */
56
+ public function getAllConfigsByQuote(Mage_Sales_Model_Quote $quote)
57
+ {
58
+ if (empty($this->matchingConfigs)) {
59
+ $configStore = $this->getConfigStore($quote->getStoreId());
60
+
61
+ $this->matchingConfigs = $configStore->getPayment()->getMethodsForQuote($this->methodType, $quote);
62
+ }
63
+
64
+ return $this->matchingConfigs;
65
+ }
66
+ }
app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferP24.php ADDED
@@ -0,0 +1,66 @@
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 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_Model
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_Model_Payment_Method_OnlineBankTransferP24
34
+ extends Payone_Core_Model_Payment_Method_Abstract
35
+ {
36
+ protected $methodType = Payone_Core_Model_System_Config_PaymentMethodType::ONLINEBANKTRANSFERP24;
37
+
38
+ protected $_code = Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERP24;
39
+
40
+ protected $_formBlockType = 'payone_core/payment_method_form_onlineBankTransfer';
41
+ protected $_infoBlockType = 'payone_core/payment_method_info_onlineBankTransfer';
42
+
43
+ /** @var Payone_Core_Model_Config_Payment_Method_Interface[] */
44
+ protected $matchingConfigs = array();
45
+
46
+ protected $_canUseInternal = false;
47
+
48
+ /**
49
+ * @api
50
+ *
51
+ * To be used in Form_Block, which has to display all online bank transfer types
52
+ *
53
+ * @param Mage_Sales_Model_Quote $quote
54
+ * @return Payone_Core_Model_Config_Payment_Method_Interface
55
+ */
56
+ public function getAllConfigsByQuote(Mage_Sales_Model_Quote $quote)
57
+ {
58
+ if (empty($this->matchingConfigs)) {
59
+ $configStore = $this->getConfigStore($quote->getStoreId());
60
+
61
+ $this->matchingConfigs = $configStore->getPayment()->getMethodsForQuote($this->methodType, $quote);
62
+ }
63
+
64
+ return $this->matchingConfigs;
65
+ }
66
+ }
app/code/community/Payone/Core/Model/Payment/Method/OnlineBankTransferPostFinanceCard.php ADDED
@@ -0,0 +1,66 @@
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 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_Model
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_Model_Payment_Method_OnlineBankTransferPostFinanceCard
34
+ extends Payone_Core_Model_Payment_Method_Abstract
35
+ {
36
+ protected $methodType = Payone_Core_Model_System_Config_PaymentMethodType::ONLINEBANKTRANSFERPFC;
37
+
38
+ protected $_code = Payone_Core_Model_System_Config_PaymentMethodCode::ONLINEBANKTRANSFERPFC;
39
+
40
+ protected $_formBlockType = 'payone_core/payment_method_form_onlineBankTransfer';
41
+ protected $_infoBlockType = 'payone_core/payment_method_info_onlineBankTransfer';
42
+
43
+ /** @var Payone_Core_Model_Config_Payment_Method_Interface[] */
44
+ protected $matchingConfigs = array();
45
+
46
+ protected $_canUseInternal = false;
47
+
48
+ /**
49
+ * @api
50
+ *
51
+ * To be used in Form_Block, which has to display all online bank transfer types