|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* PAYONE Magento 2 Connector is free software: you can redistribute it and/or modify |
|
5
|
|
|
* it under the terms of the GNU Lesser General Public License as published by |
|
6
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
|
7
|
|
|
* (at your option) any later version. |
|
8
|
|
|
* |
|
9
|
|
|
* PAYONE Magento 2 Connector is distributed in the hope that it will be useful, |
|
10
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12
|
|
|
* GNU Lesser General Public License for more details. |
|
13
|
|
|
* |
|
14
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
|
15
|
|
|
* along with PAYONE Magento 2 Connector. If not, see <http://www.gnu.org/licenses/>. |
|
16
|
|
|
* |
|
17
|
|
|
* PHP version 5 |
|
18
|
|
|
* |
|
19
|
|
|
* @category Payone |
|
20
|
|
|
* @package Payone_Magento2_Plugin |
|
21
|
|
|
* @author FATCHIP GmbH <[email protected]> |
|
22
|
|
|
* @copyright 2003 - 2016 Payone GmbH |
|
23
|
|
|
* @license <http://www.gnu.org/licenses/> GNU Lesser General Public License |
|
24
|
|
|
* @link http://www.payone.de |
|
25
|
|
|
*/ |
|
26
|
|
|
|
|
27
|
|
|
namespace Payone\Core\Model\Methods\OnlineBankTransfer; |
|
28
|
|
|
|
|
29
|
|
|
use Payone\Core\Model\PayoneConfig; |
|
30
|
|
|
use Magento\Sales\Model\Order; |
|
|
|
|
|
|
31
|
|
|
use Magento\Framework\DataObject; |
|
|
|
|
|
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* Model for EPS payment method |
|
35
|
|
|
*/ |
|
36
|
|
|
class Eps extends OnlineBankTransferBase |
|
37
|
|
|
{ |
|
38
|
|
|
/** |
|
39
|
|
|
* Payment method code |
|
40
|
|
|
* |
|
41
|
|
|
* @var string |
|
42
|
|
|
*/ |
|
43
|
|
|
protected $_code = PayoneConfig::METHOD_OBT_EPS; |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* Payment method sub type |
|
47
|
|
|
* |
|
48
|
|
|
* @var string |
|
49
|
|
|
*/ |
|
50
|
|
|
protected $sSubType = self::METHOD_OBT_SUBTYPE_EPS; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* Array of all available bank groups |
|
54
|
|
|
* |
|
55
|
|
|
* @var array |
|
56
|
|
|
*/ |
|
57
|
|
|
protected static $aBankGroups = [ |
|
58
|
|
|
'ARZ_OAB' => 'Apothekerbank', |
|
59
|
|
|
'ARZ_BAF' => 'Ärztebank', |
|
60
|
|
|
'EPS_AAB' => 'Austrian Anadi Bank AG', |
|
61
|
|
|
'BA_AUS' => 'Bank Austria', |
|
62
|
|
|
'ARZ_BCS' => 'Bankhaus Carl Spängler & Co.AG', |
|
63
|
|
|
'EPS_SCHEL' => 'Bankhaus Schelhammer & Schattera AG', |
|
64
|
|
|
'BAWAG_PSK' => 'BAWAG P.S.K. AG', |
|
65
|
|
|
'EPS_BKS' => 'BKS Bank AG', |
|
66
|
|
|
'EPS_BKB' => 'Brüll Kallmus Bank AG', |
|
67
|
|
|
'EPS_VLB' => 'BTV VIER LÄNDER BANK', |
|
68
|
|
|
'EPS_CBGG' => 'Capital Bank Grawe Gruppe AG', |
|
69
|
|
|
'EPS_DB' => 'Dolomitenbank', |
|
70
|
|
|
'BAWAG_ESY' => 'Easybank AG', |
|
71
|
|
|
'SPARDAT_EBS' => 'Erste Bank und Sparkassen', |
|
72
|
|
|
'ARZ_HAA' => 'Hypo Alpe-Adria-Bank International AG', |
|
73
|
|
|
'ARZ_VLH' => 'Hypo Landesbank Vorarlberg', |
|
74
|
|
|
'EPS_NOEGB' => 'HYPO NOE Gruppe Bank AG', |
|
75
|
|
|
'EPS_NOELB' => 'HYPO NOE Landesbank AG', |
|
76
|
|
|
'HRAC_OOS' => 'HYPO Oberösterreich, Salzburg, Steiermark', |
|
77
|
|
|
'ARZ_HTB' => 'Hypo Tirol Bank AG', |
|
78
|
|
|
'EPS_HBL' => 'HYPO-BANK BURGENLAND Aktiengesellschaft', |
|
79
|
|
|
'ARZ_IMB' => 'Immo-Bank', |
|
80
|
|
|
'EPS_MFB' => 'Marchfelder Bank', |
|
81
|
|
|
'EPS_OBAG' => 'Oberbank AG', |
|
82
|
|
|
'RAC_RAC' => 'Raiffeisen Bankengruppe Österreich', |
|
83
|
|
|
'EPS_SCHOELLER' => 'Schoellerbank AG', |
|
84
|
|
|
'EPS_SPDBW' => 'Sparda Bank Wien', |
|
85
|
|
|
'EPS_SPDBA' => 'SPARDA-BANK AUSTRIA', |
|
86
|
|
|
'ARZ_OVB' => 'Volksbank Gruppe', |
|
87
|
|
|
'EPS_VKB' => 'Volkskreditbank AG', |
|
88
|
|
|
'EPS_VRBB' => 'VR-Bank Braunau', |
|
89
|
|
|
]; |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* Return parameters specific to this payment sub type |
|
93
|
|
|
* |
|
94
|
|
|
* @param Order $oOrder |
|
95
|
|
|
* @return array |
|
96
|
|
|
*/ |
|
97
|
|
|
public function getSubTypeSpecificParameters(Order $oOrder) |
|
98
|
|
|
{ |
|
99
|
|
|
$oInfoInstance = $this->getInfoInstance(); |
|
100
|
|
|
|
|
101
|
|
|
$aParams = [ |
|
102
|
|
|
'bankcountry' => 'AT', |
|
103
|
|
|
'bankgrouptype' => $oInfoInstance->getAdditionalInformation('bank_group'), |
|
104
|
|
|
]; |
|
105
|
|
|
|
|
106
|
|
|
return $aParams; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
/** |
|
110
|
|
|
* Add the checkout-form-data to the checkout session |
|
111
|
|
|
* |
|
112
|
|
|
* @param DataObject $data |
|
113
|
|
|
* @return $this |
|
114
|
|
|
*/ |
|
115
|
|
|
public function assignData(DataObject $data) |
|
116
|
|
|
{ |
|
117
|
|
|
parent::assignData($data); |
|
118
|
|
|
|
|
119
|
|
|
$oInfoInstance = $this->getInfoInstance(); |
|
120
|
|
|
$oInfoInstance->setAdditionalInformation('bank_group', $this->toolkitHelper->getAdditionalDataEntry($data, 'bank_group')); |
|
121
|
|
|
|
|
122
|
|
|
return $this; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* Return available bank groups |
|
127
|
|
|
* |
|
128
|
|
|
* @return array |
|
129
|
|
|
*/ |
|
130
|
|
|
public static function getBankGroups() |
|
131
|
|
|
{ |
|
132
|
|
|
$aReturn = []; |
|
133
|
|
|
|
|
134
|
|
|
foreach (self::$aBankGroups as $sKey => $sTitle) { |
|
135
|
|
|
$aReturn[] = [ |
|
136
|
|
|
'id' => $sKey, |
|
137
|
|
|
'title' => $sTitle, |
|
138
|
|
|
]; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
return $aReturn; |
|
142
|
|
|
} |
|
143
|
|
|
} |
|
144
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths