I used laravel SDK, the cashin works well but webhook doesn't

Hello team,
I am currently using laravel sdk for cashin. and it works

$paypackInstance = new \Paypack\Paypack();
    $paypackInstance->config([
        'client_id' => env('PAYPACK_CLIENT_ID'),
        'client_secret' => env('PAYPACK_CLIENT_SECRET')
        ]);

    return $paypackInstance->Cashin([    'phone' => "0780331198",    'amount' => "100"]);

I went through webhooks documentation here but i couldn;t get it done well.

This is sample codes of what i was trying

<?php

include 'db.php';
// Takes raw data from the request
$json = file_get_contents('php://input');

$data = json_decode($json,TRUE);
echo $data['status'];
$q = mysqli_query($conn,"INSERT INTO `test` (`id`, `data`) VALUES (NULL, '$data[status]')");

Here i wanteed to save the status in the db for testing, and it is not working.

I used ngrok to generate the link and added it into webhook in my dashboard .
Kindly help, or if there are some sample codes for callback using php, please share

Hello serge,
We currently don’t have sample code but we’ll share them tomorrow, in the meantime is the problem you’re facing webhooks related or retrieving the status of your transaction?

current issue is it seems like the webhook i created is not being listened to.
And i think I followed every single step @shema

What mode did you set for your webhook

Production I think, here’s a screenshot

Can you try to initialize your sdk like this?

$paypackInstance->config([ 'client_id' => env('PAYPACK_CLIENT_ID'), 'client_secret' => env('PAYPACK_CLIENT_SECRET'), ‘webhook_mode’ => ‘production’ ]);

It worked, thank you so much.
I think ‘webhook_mode’ => ‘production’ was the issue