| @@ 479-488 (lines=10) @@ | ||
| 476 | * |
|
| 477 | * @return string |
|
| 478 | */ |
|
| 479 | public function getAddtionalValue($field, $storeId = null): string |
|
| 480 | { |
|
| 481 | $pathPattern = 'payment/%s/%s'; |
|
| 482 | ||
| 483 | return $this->scopeConfig->getValue( |
|
| 484 | sprintf($pathPattern, self::METHOD, $field), |
|
| 485 | ScopeInterface::SCOPE_STORE, |
|
| 486 | $storeId |
|
| 487 | ); |
|
| 488 | } |
|
| 489 | } |
|
| 490 | ||
| @@ 116-125 (lines=10) @@ | ||
| 113 | * |
|
| 114 | * @return bool |
|
| 115 | */ |
|
| 116 | public function isActive($storeId = null): bool |
|
| 117 | { |
|
| 118 | $pathPattern = 'payment/%s/%s'; |
|
| 119 | ||
| 120 | return (bool) $this->scopeConfig->getValue( |
|
| 121 | sprintf($pathPattern, self::METHOD, self::ACTIVE), |
|
| 122 | ScopeInterface::SCOPE_STORE, |
|
| 123 | $storeId |
|
| 124 | ); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Get title of payment. |
|
| @@ 132-141 (lines=10) @@ | ||
| 129 | * |
|
| 130 | * @return string|null |
|
| 131 | */ |
|
| 132 | public function getTitle($storeId = null) |
|
| 133 | { |
|
| 134 | $pathPattern = 'payment/%s/%s'; |
|
| 135 | ||
| 136 | return $this->scopeConfig->getValue( |
|
| 137 | sprintf($pathPattern, self::METHOD, self::TITLE), |
|
| 138 | ScopeInterface::SCOPE_STORE, |
|
| 139 | $storeId |
|
| 140 | ); |
|
| 141 | } |
|
| 142 | ||
| 143 | /** |
|
| 144 | * Get Instruction - Checkoout. |
|
| @@ 148-157 (lines=10) @@ | ||
| 145 | * |
|
| 146 | * @return string|null |
|
| 147 | */ |
|
| 148 | public function getInstructionCheckout($storeId = null) |
|
| 149 | { |
|
| 150 | $pathPattern = 'payment/%s/%s'; |
|
| 151 | ||
| 152 | return $this->scopeConfig->getValue( |
|
| 153 | sprintf($pathPattern, self::METHOD, self::INSTRUCTION_CHECKOUT), |
|
| 154 | ScopeInterface::SCOPE_STORE, |
|
| 155 | $storeId |
|
| 156 | ); |
|
| 157 | } |
|
| 158 | ||
| 159 | /** |
|
| 160 | * Get Expiration. |
|
| @@ 198-207 (lines=10) @@ | ||
| 195 | * |
|
| 196 | * @return string|null |
|
| 197 | */ |
|
| 198 | public function getInstructionLineFirst($storeId = null) |
|
| 199 | { |
|
| 200 | $pathPattern = 'payment/%s/%s'; |
|
| 201 | ||
| 202 | return $this->scopeConfig->getValue( |
|
| 203 | sprintf($pathPattern, self::METHOD, self::INSTRUCTION_LINE_FIRST), |
|
| 204 | ScopeInterface::SCOPE_STORE, |
|
| 205 | $storeId |
|
| 206 | ); |
|
| 207 | } |
|
| 208 | ||
| 209 | /** |
|
| 210 | * Get Instruction Line Second - For Boleto. |
|
| @@ 214-223 (lines=10) @@ | ||
| 211 | * |
|
| 212 | * @return string|null |
|
| 213 | */ |
|
| 214 | public function getInstructionLineSecond($storeId = null) |
|
| 215 | { |
|
| 216 | $pathPattern = 'payment/%s/%s'; |
|
| 217 | ||
| 218 | return $this->scopeConfig->getValue( |
|
| 219 | sprintf($pathPattern, self::METHOD, self::INSTRUCTION_LINE_SECOND), |
|
| 220 | ScopeInterface::SCOPE_STORE, |
|
| 221 | $storeId |
|
| 222 | ); |
|
| 223 | } |
|
| 224 | ||
| 225 | /** |
|
| 226 | * Get Instruction Line Third - For Boleto. |
|
| @@ 230-239 (lines=10) @@ | ||
| 227 | * |
|
| 228 | * @return string|null |
|
| 229 | */ |
|
| 230 | public function getInstructionLineThird($storeId = null) |
|
| 231 | { |
|
| 232 | $pathPattern = 'payment/%s/%s'; |
|
| 233 | ||
| 234 | return $this->scopeConfig->getValue( |
|
| 235 | sprintf($pathPattern, self::METHOD, self::INSTRUCTION_LINE_THIRD), |
|
| 236 | ScopeInterface::SCOPE_STORE, |
|
| 237 | $storeId |
|
| 238 | ); |
|
| 239 | } |
|
| 240 | ||
| 241 | /** |
|
| 242 | * Get if you use document capture on the form. |
|
| @@ 246-255 (lines=10) @@ | ||
| 243 | * |
|
| 244 | * @return string|null |
|
| 245 | */ |
|
| 246 | public function getUseTaxDocumentCapture($storeId = null) |
|
| 247 | { |
|
| 248 | $pathPattern = 'payment/%s/%s'; |
|
| 249 | ||
| 250 | return (bool) $this->scopeConfig->getValue( |
|
| 251 | sprintf($pathPattern, self::METHOD, self::USE_GET_TAX_DOCUMENT), |
|
| 252 | ScopeInterface::SCOPE_STORE, |
|
| 253 | $storeId |
|
| 254 | ); |
|
| 255 | } |
|
| 256 | ||
| 257 | /** |
|
| 258 | * Get if you use name capture on the form. |
|
| @@ 262-271 (lines=10) @@ | ||
| 259 | * |
|
| 260 | * @return string|null |
|
| 261 | */ |
|
| 262 | public function getUseNameCapture($storeId = null) |
|
| 263 | { |
|
| 264 | $pathPattern = 'payment/%s/%s'; |
|
| 265 | ||
| 266 | return (bool) $this->scopeConfig->getValue( |
|
| 267 | sprintf($pathPattern, self::METHOD, self::USE_GET_NAME), |
|
| 268 | ScopeInterface::SCOPE_STORE, |
|
| 269 | $storeId |
|
| 270 | ); |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||
| @@ 103-112 (lines=10) @@ | ||
| 100 | * |
|
| 101 | * @return bool |
|
| 102 | */ |
|
| 103 | public function isCvvEnabled($storeId = null) |
|
| 104 | { |
|
| 105 | $pathPattern = 'payment/%s/%s'; |
|
| 106 | ||
| 107 | return (bool) $this->scopeConfig->getValue( |
|
| 108 | sprintf($pathPattern, self::METHOD, self::CVV_ENABLED), |
|
| 109 | ScopeInterface::SCOPE_STORE, |
|
| 110 | $storeId |
|
| 111 | ); |
|
| 112 | } |
|
| 113 | ||
| 114 | /** |
|
| 115 | * Get Payment configuration status. |
|
| @@ 119-128 (lines=10) @@ | ||
| 116 | * |
|
| 117 | * @return bool |
|
| 118 | */ |
|
| 119 | public function isActive($storeId = null): bool |
|
| 120 | { |
|
| 121 | $pathPattern = 'payment/%s/%s'; |
|
| 122 | ||
| 123 | return (bool) $this->scopeConfig->getValue( |
|
| 124 | sprintf($pathPattern, self::METHOD, self::ACTIVE), |
|
| 125 | ScopeInterface::SCOPE_STORE, |
|
| 126 | $storeId |
|
| 127 | ); |
|
| 128 | } |
|
| 129 | ||
| 130 | /** |
|
| 131 | * Get title of payment. |
|
| @@ 135-144 (lines=10) @@ | ||
| 132 | * |
|
| 133 | * @return string|null |
|
| 134 | */ |
|
| 135 | public function getTitle($storeId = null) |
|
| 136 | { |
|
| 137 | $pathPattern = 'payment/%s/%s'; |
|
| 138 | ||
| 139 | return $this->scopeConfig->getValue( |
|
| 140 | sprintf($pathPattern, self::METHOD, self::TITLE), |
|
| 141 | ScopeInterface::SCOPE_STORE, |
|
| 142 | $storeId |
|
| 143 | ); |
|
| 144 | } |
|
| 145 | ||
| 146 | /** |
|
| 147 | * Get if you use document capture on the form. |
|
| @@ 151-160 (lines=10) @@ | ||
| 148 | * |
|
| 149 | * @return string|null |
|
| 150 | */ |
|
| 151 | public function getUseTaxDocumentCapture($storeId = null) |
|
| 152 | { |
|
| 153 | $pathPattern = 'payment/%s/%s'; |
|
| 154 | ||
| 155 | return (bool) $this->scopeConfig->getValue( |
|
| 156 | sprintf($pathPattern, self::METHOD, self::USE_GET_TAX_DOCUMENT), |
|
| 157 | ScopeInterface::SCOPE_STORE, |
|
| 158 | $storeId |
|
| 159 | ); |
|
| 160 | } |
|
| 161 | ||
| 162 | /** |
|
| 163 | * Get if you use birth date capture on the form. |
|
| @@ 167-176 (lines=10) @@ | ||
| 164 | * |
|
| 165 | * @return string|null |
|
| 166 | */ |
|
| 167 | public function getUseBirthDateCapture($storeId = null) |
|
| 168 | { |
|
| 169 | $pathPattern = 'payment/%s/%s'; |
|
| 170 | ||
| 171 | return (bool) $this->scopeConfig->getValue( |
|
| 172 | sprintf($pathPattern, self::METHOD, self::USE_GET_BIRTH_DATE), |
|
| 173 | ScopeInterface::SCOPE_STORE, |
|
| 174 | $storeId |
|
| 175 | ); |
|
| 176 | } |
|
| 177 | ||
| 178 | /** |
|
| 179 | * Get if you use phone capture on the form. |
|
| @@ 183-192 (lines=10) @@ | ||
| 180 | * |
|
| 181 | * @return string|null |
|
| 182 | */ |
|
| 183 | public function getUsePhoneCapture($storeId = null) |
|
| 184 | { |
|
| 185 | $pathPattern = 'payment/%s/%s'; |
|
| 186 | ||
| 187 | return (bool) $this->scopeConfig->getValue( |
|
| 188 | sprintf($pathPattern, self::METHOD, self::USE_GET_PHONE), |
|
| 189 | ScopeInterface::SCOPE_STORE, |
|
| 190 | $storeId |
|
| 191 | ); |
|
| 192 | } |
|
| 193 | ||
| 194 | /** |
|
| 195 | * Should the cc types. |
|
| @@ 52-61 (lines=10) @@ | ||
| 49 | * |
|
| 50 | * @return bool |
|
| 51 | */ |
|
| 52 | public function useCvv($storeId = null) |
|
| 53 | { |
|
| 54 | $pathPattern = 'payment/%s/%s'; |
|
| 55 | ||
| 56 | return (bool) $this->scopeConfig->getValue( |
|
| 57 | sprintf($pathPattern, self::METHOD, self::CVV_ENABLED), |
|
| 58 | ScopeInterface::SCOPE_STORE, |
|
| 59 | $storeId |
|
| 60 | ); |
|
| 61 | } |
|
| 62 | } |
|
| 63 | ||