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')])
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,
4 Replies
technocrat
technocrat3mo ago
anybody?
toeknee
toeknee3mo ago
what is your browser console saying? Also, try: return true at the end
technocrat
technocrat3mo ago
No description
toeknee
toeknee3mo ago
Commen tout info('Payment created'); I suspect that's returning somehting else.