moh4git/maystro-webhook

Maystro Webhook

v0.2.6 2022-12-02 12:45 UTC

This package is auto-updated.

Last update: 2025-06-08 20:08:35 UTC


README

Maystro delivery webhook trait package

How to use:

Installation

You can install the package via composer:

composer require moh4git/maystro-webhook

Now run this php artisan command :

php artisan webhook:install

This command will create a controller inside : app\Http\Controllers\MaystroDelivery

namespace App\Http\Controllers\MaystroDelivery;

use App\Http\Controllers\Controller;
use MaystroWebhook\MaystroWebhook;
use Illuminate\Http\Request;

class MaystroDeliveryController extends Controller
{
    use MaystroWebhook;
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('guest');
    }

    public function responseData()
    {
        \Log::debug(['log_type' => 'test1', 'data' => $this->response_data]);
        return response('OK', 200);
    }
}

Usage

Register the route https://yourdomainname.com/maystro/webhook/endpoint inside your Maystro account in webhooks tab