Merge branch 'display_bank_info_at_payment_verification' into 'master'

Display bank info at payment verification

See merge request CIEFWorldwideSdnBhd/exchange-2.0!24
This commit is contained in:
omair saleh
2021-03-29 18:11:21 +00:00
3 changed files with 57 additions and 1 deletions
@@ -0,0 +1,27 @@
<?php
namespace App\Classes\Modules\ServiceTypes\Services;
use App\Classes\Modules\Banks\Services\FetchesBank;
use App\Models\SegmentConstant;
class FetchesServiceBankConfigurations
{
/** @var FetchesBank */
private $fetchesBank;
/**
* FetchesServiceBankConfigurations constructor.
* @param FetchesBank $fetchesBank
*/
public function __construct(FetchesBank $fetchesBank)
{
$this->fetchesBank = $fetchesBank;
}
public function execute(SegmentConstant $constants)
{
return $this->fetchesBank->execute(['id' => $constants->detail->bank_id]);
}
}
@@ -14,15 +14,19 @@ class FetchesServiceConfigurations
/** @var FetchesServiceCurrenciesConfigurations */
private $fetchesServiceCurrenciesConfigurations;
/** @var FetchesServiceBankConfigurations */
private $fetchesServiceBankConfigurations;
/**
* FetchesServiceConfigurations constructor.
* @param FetchesConstant $fetchesConstant
* @param FetchesServiceCurrenciesConfigurations $fetchesServiceCurrenciesConfigurations
*/
public function __construct(FetchesConstant $fetchesConstant, FetchesServiceCurrenciesConfigurations $fetchesServiceCurrenciesConfigurations)
public function __construct(FetchesConstant $fetchesConstant, FetchesServiceCurrenciesConfigurations $fetchesServiceCurrenciesConfigurations, FetchesServiceBankConfigurations $fetchesServiceBankConfigurations)
{
$this->fetchesConstant = $fetchesConstant;
$this->fetchesServiceCurrenciesConfigurations = $fetchesServiceCurrenciesConfigurations;
$this->fetchesServiceBankConfigurations = $fetchesServiceBankConfigurations;
}
@@ -32,6 +36,7 @@ class FetchesServiceConfigurations
'active' => (int) $constant->detail->is_active ?? false,
'billable' => (int) $constant->detail->is_billable ?? false,
'bank_id' => $constant->detail->bank_id ?? '',
'bank_info' => $constant->detail->bank_id ? $this->fetchesServiceBankConfigurations->execute($constant) : '',
'currencies' => $this->fetchesServiceCurrenciesConfigurations->execute($constant)
], $this->addConfigurations($constant)->toArray());
File diff suppressed because one or more lines are too long