Troubleshooting Step Wizard: Next Button Loader Spinning Infinitely

I am using a step wizard. Inside the step wizard, I have used afterValidation. Inside that, I am making a function call. I am getting the response within a maximum of 2 minutes. However, the next step is not opening; the next button loader keeps spinning indefinitely.

Step::make('step1')
 ->afterValidation(function (Set $set, $state) {
 if ($state['payment_gateway'] === 'Payment Terminals') {

                            $response = publisher(strval(floatval($state['amount']) * 100), $state['pos_epi_id']);
                           
                            if ( $response['STATE'] === '0') {
                                $payment = $this->paymentCreate($state);

                                info('Payment created');
                            }
                        }
}),
 Step::make('step2')
->schema([View::make('forms.components.workshop-payment-response')])

i am getting payment created but its not jumping to step two,
Was this page helpful?