@@ 109-126 (lines=18) @@ | ||
106 | * |
|
107 | * @return array |
|
108 | */ |
|
109 | public function getAvailableCreditcardTypes() |
|
110 | { |
|
111 | $aReturn = []; |
|
112 | ||
113 | $sCreditcardTypes = $this->getConfigParam('types', PayoneConfig::METHOD_CREDITCARD, 'payone_payment'); |
|
114 | if ($sCreditcardTypes) { |
|
115 | $aAllTypes = CreditcardTypes::getCreditcardTypes(); |
|
116 | ||
117 | $aCreditcardTypes = explode(',', $sCreditcardTypes); |
|
118 | foreach ($aCreditcardTypes as $sType) { |
|
119 | $aReturn[] = [ |
|
120 | 'id' => $sType, |
|
121 | 'title' => $aAllTypes[$sType], |
|
122 | ]; |
|
123 | } |
|
124 | } |
|
125 | return $aReturn; |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * Return if cvc has to be checked |
@@ 99-117 (lines=19) @@ | ||
96 | * |
|
97 | * @return array |
|
98 | */ |
|
99 | public function getDebitSepaCountries() |
|
100 | { |
|
101 | $aReturn = []; |
|
102 | ||
103 | $sCountries = $this->getConfigParam('sepa_country', PayoneConfig::METHOD_DEBIT, 'payone_payment'); |
|
104 | if ($sCountries) { |
|
105 | $aCountries = explode(',', $sCountries); |
|
106 | foreach ($aCountries as $sCountryCode) { |
|
107 | $sCountryName = $this->getCountryNameByIso2($sCountryCode); |
|
108 | if ($sCountryName) { |
|
109 | $aReturn[] = [ |
|
110 | 'id' => $sCountryCode, |
|
111 | 'title' => $sCountryName, |
|
112 | ]; |
|
113 | } |
|
114 | } |
|
115 | } |
|
116 | return $aReturn; |
|
117 | } |
|
118 | ||
119 | /** |
|
120 | * Return if state parameter has to be added for the given country |