diff --git a/app/Livewire/Flow2/PaymentMethod.php b/app/Livewire/Flow2/PaymentMethod.php index 794cee2535d4..1dc38b90528c 100644 --- a/app/Livewire/Flow2/PaymentMethod.php +++ b/app/Livewire/Flow2/PaymentMethod.php @@ -26,7 +26,7 @@ class PaymentMethod extends Component public $methods = []; - public $isLoading = false; + public $isLoading = true; public $amount = 0; @@ -75,4 +75,4 @@ class PaymentMethod extends Component { return render('flow2.payment-method', ['methods' => $this->methods]); } -} +} \ No newline at end of file diff --git a/app/Livewire/InvoicePay.php b/app/Livewire/InvoicePay.php index 336859bfaacc..4d0539bddc59 100644 --- a/app/Livewire/InvoicePay.php +++ b/app/Livewire/InvoicePay.php @@ -88,7 +88,10 @@ class InvoicePay extends Component #[On('payment-method-selected')] public function paymentMethodSelected($company_gateway_id, $gateway_type_id, $amount) { + nlog("payment method selected inside InvoicePay"); + $this->payment_method_accepted = true; + $this->context['company_gateway_id'] = $company_gateway_id; $this->context['gateway_type_id'] = $gateway_type_id; $this->context['amount'] = $amount; @@ -98,8 +101,7 @@ class InvoicePay extends Component $this->context['invitation_id'] = $this->invitation_id; // $this->invite = \App\Models\InvoiceInvitation::withTrashed()->find($this->invitation_id)->withoutRelations(); - $this->payment_method_accepted =true; - + $this->component(); } @@ -119,13 +121,16 @@ class InvoicePay extends Component return PaymentMethod::class; // if($this->ready) + + nlog("computed"); + return ProcessPayment::class; } #[Computed()] public function componentUniqueId(): string { - return "purchase-".md5(time()); + return "purchase-".md5(microtime()); } public function mount()