2024-02-13 18:57:05 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://www.elastic.co/licensing/elastic-license
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Livewire\BillingPortal;
|
|
|
|
|
2024-02-22 14:07:57 +01:00
|
|
|
use App\Models\CompanyGateway;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Livewire\Attributes\On;
|
2024-02-13 18:57:05 +01:00
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class RFF extends Component
|
|
|
|
{
|
|
|
|
public array $context;
|
|
|
|
|
2024-02-22 14:07:57 +01:00
|
|
|
#[On('passed-required-fields-check')]
|
|
|
|
public function continue(): void
|
2024-02-13 18:57:05 +01:00
|
|
|
{
|
|
|
|
$this->dispatch('purchase.next');
|
|
|
|
}
|
2024-02-22 04:00:39 +01:00
|
|
|
|
2024-02-13 18:57:05 +01:00
|
|
|
public function render()
|
|
|
|
{
|
2024-02-22 14:07:57 +01:00
|
|
|
$gateway = CompanyGateway::findOrFail($this->context['form']['company_gateway_id']);
|
|
|
|
$countries = Cache::get('countries');
|
|
|
|
|
|
|
|
return view('billing-portal.v3.rff', [
|
|
|
|
'gateway' => $gateway->driver(
|
|
|
|
auth()->guard('contact')->user()->client
|
|
|
|
),
|
|
|
|
'countries' => $countries,
|
|
|
|
'company' => $gateway->company,
|
|
|
|
]);
|
2024-02-13 18:57:05 +01:00
|
|
|
}
|
|
|
|
}
|