diff --git a/.gitignore b/.gitignore index bf29a8e0..da34317b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ composer.lock .php-cs-fixer.cache .phpunit.result.cache +.idea diff --git a/src/Contracts/Objects/Values/WebhookId.php b/src/Contracts/Objects/Values/WebhookId.php new file mode 100644 index 00000000..89c3f350 --- /dev/null +++ b/src/Contracts/Objects/Values/WebhookId.php @@ -0,0 +1,12 @@ +domain = $domain; $this->data = $data; + $this->webhookId = $webhookId; } /** @@ -62,8 +71,8 @@ public function __construct(string $domain, stdClass $data) * @return bool */ public function handle( - IShopCommand $shopCommand, - IShopQuery $shopQuery, + IShopCommand $shopCommand, + IShopQuery $shopQuery, CancelCurrentPlan $cancelCurrentPlanAction ): bool { // Convert the domain diff --git a/src/Traits/WebhookController.php b/src/Traits/WebhookController.php index 171307f5..28e04b82 100644 --- a/src/Traits/WebhookController.php +++ b/src/Traits/WebhookController.php @@ -28,6 +28,7 @@ public function handle(string $type, Request $request): ResponseResponse $jobClass::dispatch( $request->header('x-shopify-shop-domain'), + $request->header('x-shopify-webhook-id'), $jobData )->onQueue(Util::getShopifyConfig('job_queues')['webhooks']);