mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Enforce authentication for payment methods
This commit is contained in:
parent
1cbb3b2d20
commit
bf22bb9143
@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
namespace App\Livewire\BillingPortal\Payments;
|
namespace App\Livewire\BillingPortal\Payments;
|
||||||
|
|
||||||
|
use App\Livewire\BillingPortal\Authentication;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use App\Models\Subscription;
|
use App\Models\Subscription;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
@ -26,6 +27,12 @@ class Methods extends Component
|
|||||||
|
|
||||||
public function mount(): void
|
public function mount(): void
|
||||||
{
|
{
|
||||||
|
if (auth()->guard('contact')->guest()) {
|
||||||
|
$this->dispatch('purchase.forward', component: Authentication::class);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$total = collect($this->context['products'])->sum('total_raw');
|
$total = collect($this->context['products'])->sum('total_raw');
|
||||||
|
|
||||||
$methods = auth()->guard('contact')->user()->client->service()->getPaymentMethods(
|
$methods = auth()->guard('contact')->user()->client->service()->getPaymentMethods(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user