mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
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:
@@ -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
Reference in New Issue
Block a user