Laravel integration ,How to get callback for paypack after payment Complete or fail? by using WebHook

How to get callback for paypack after payment Complete or fail?

Are you using our SDK or the REST API?

i am using blade engine

use Paypack\Paypack;

public function packInfo(Request $request){
$paypackInstance = new Paypack();

$paypackInstance->config([
‘client_id’ => ‘…’,
‘client_secret’ =>’ …’,
]);
$cashin = $paypackInstance->Cashin([
‘phone’ => $request->phone,
‘amount’ => $request->amount,
]);

WebhookCall::create()
//->url(‘http://audace.getrwa.com/webhook-receiving-url’)
->url(‘http://127.0.0.1:8001/webhook-receiving-url’)
->payload([‘keys’ => ‘cashin’])
->useSecret(‘myKey’)
->dispatch();

// i need how to get callback

I am not sure what these section does:

WebhookCall::create()
//->url(‘http://audace.getrwa.com/webhook-receiving-url’)
->url(‘http://127.0.0.1:8001/webhook-receiving-url’)
->payload([‘keys’ => ‘cashin’])
->useSecret(‘myKey’)
->dispatch();

Registering a webhook is done on the frontend only, you don’t need to configure that on your side. When you’ve configured your webhook as a production webhook that is where we send you the callback.

For localhost connections there is no way established already to proxy your device so i would suggest tools like ngrok to proxy your device to the web so that our webhook system can find your endpoint.