first commit
This commit is contained in:
43
class/payments/class.Prevodem.php
Normal file
43
class/payments/class.Prevodem.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use KupShop\BankAutoPaymentBundle\PaymentSources\FioBankApi;
|
||||
|
||||
class Prevodem extends Payment
|
||||
{
|
||||
public static $name = 'Platba převodem';
|
||||
protected ?string $defaultIcon = '../../common/static/payments/prevodem.svg';
|
||||
|
||||
protected $templateOrderView = 'payment.Prevod.orderView.tpl';
|
||||
|
||||
public $class = 'Převod';
|
||||
|
||||
public $method;
|
||||
|
||||
protected $pay_method = Payment::METHOD_TRANSFER;
|
||||
|
||||
public function hasPaymentDescription()
|
||||
{
|
||||
// Potřebujeme umožnit editaci v adminu i když to je vyplé v nastavení
|
||||
return (Settings::getDefault()['payment_config']['show_payment_instruction'] ?? 0) == 1
|
||||
|| (getVal('FORCE_QR') == 1 && !empty(getAdminUser()));
|
||||
}
|
||||
|
||||
public function requiresEET()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function loadPaymentDbConfig($dbcfg): array
|
||||
{
|
||||
$fioSetting = null;
|
||||
|
||||
if (findModule(\Modules::BANK_AUTO_PAYMENTS, 'fio_bank') && isset($dbcfg->payments[FioBankApi::getName()])) {
|
||||
$fioSetting = array_filter($dbcfg->payments[FioBankApi::getName()],
|
||||
function ($value) {
|
||||
return $value !== null && $value !== false && $value !== '';
|
||||
});
|
||||
}
|
||||
|
||||
return is_array($fioSetting) ? $fioSetting : [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user