laravel-shopify
laravel-shopify copied to clipboard
ShopDomain::fromRequest does not check all possible headers
ShopDomain::fromRequest($request)
fails finding the header with the shop domain in it because it is looking in the wrong places.
I do manual code to find the domain like this: $domain = ShopDomain::fromNative($request->header('x-shopify-shop-domain'));
::fromRequest(...)
tries to find the 'X-Shop-Domain' header which does not exist.
This happens in a controller which is used for the CarrierService. So when the checkout loads all shipping methods, Shopify calls the route which executes this controller/action. The actual route has the middleware auth.webhook
.
I'm wondering if this is a miss and if I should do a pull request and add it? Or if I'm supposed to do this in another way. All I want is to get the shop user in the controller.
Please create a PR :)
This looks like a super old issue, with the changes recently going to close but we can reopen if it still exists.