generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add handler for SHOP_UPDATED webhook
- Loading branch information
1 parent
5c68522
commit 87b2ba8
Showing
4 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Codelayer\LaravelShopifyIntegration\Events; | ||
|
||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class ShopifyShopUpdated | ||
{ | ||
use Dispatchable, SerializesModels; | ||
|
||
public function __construct(public string $shop) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Codelayer\LaravelShopifyIntegration\Lib\Handlers; | ||
|
||
use Codelayer\LaravelShopifyIntegration\Events\ShopifyShopUpdated; | ||
use Shopify\Webhooks\Handler; | ||
|
||
class ShopUpdated implements Handler | ||
{ | ||
public function handle(string $topic, string $shop, array $body): void | ||
{ | ||
event(new ShopifyShopUpdated($shop)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters