2024-07-04 02:58:51 +02:00
|
|
|
<?php
|
2024-08-05 06:02:58 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
2024-07-04 02:58:51 +02:00
|
|
|
|
|
|
|
namespace App\Http\ViewComposers\Components\Rotessa;
|
|
|
|
|
|
|
|
use App\DataProviders\CAProvinces;
|
|
|
|
use App\DataProviders\USStates;
|
|
|
|
use Illuminate\View\Component;
|
|
|
|
use App\Models\ClientContact;
|
|
|
|
use Illuminate\Support\Arr;
|
|
|
|
use Illuminate\View\View;
|
|
|
|
|
|
|
|
// AmericanBankInfo Component
|
|
|
|
class AccountComponent extends Component
|
|
|
|
{
|
|
|
|
private $fields = [
|
|
|
|
'bank_account_type',
|
|
|
|
'routing_number',
|
|
|
|
'institution_number',
|
|
|
|
'transit_number',
|
|
|
|
'bank_name',
|
|
|
|
'country',
|
|
|
|
'account_number'
|
|
|
|
];
|
|
|
|
|
|
|
|
private $defaults = [
|
|
|
|
'bank_account_type' => null,
|
|
|
|
'routing_number' => null,
|
|
|
|
'institution_number' => null,
|
|
|
|
'transit_number' => null,
|
2024-08-03 04:38:48 +02:00
|
|
|
'bank_name' => null,
|
2024-07-04 02:58:51 +02:00
|
|
|
'account_number' => null,
|
|
|
|
'country' => 'US',
|
|
|
|
"authorization_type" => 'Online'
|
|
|
|
];
|
|
|
|
|
2024-08-22 08:45:06 +02:00
|
|
|
public function __construct(public array $account)
|
|
|
|
{
|
|
|
|
$this->attributes = $this->newAttributeBag(Arr::only($this->account, $this->fields));
|
2024-07-04 02:58:51 +02:00
|
|
|
}
|
2024-08-22 08:45:06 +02:00
|
|
|
|
2024-07-04 02:58:51 +02:00
|
|
|
public function render()
|
|
|
|
{
|
2024-07-30 04:10:18 +02:00
|
|
|
|
|
|
|
return render('gateways.rotessa.components.account', $this->attributes->getAttributes() + $this->defaults);
|
2024-07-04 02:58:51 +02:00
|
|
|
}
|
|
|
|
}
|