Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless sales channel - webhooks cannot be used #401

Open
AndreasA opened this issue Jul 20, 2023 · 1 comment
Open

Headless sales channel - webhooks cannot be used #401

AndreasA opened this issue Jul 20, 2023 · 1 comment
Assignees

Comments

@AndreasA
Copy link
Contributor

AndreasA commented Jul 20, 2023

Describe the bug
The webhook notification receiver currently requires Storefront sales channels as its route scope is storefront.

It would be great if it could also be used for headless sales channels.

Necessary changes:

  • RouteScope chnages:
    • either use an API integration with corresponding ACL role.
    • create a custom route scope for adyen, so the old path can be used and keep the current authentication methods.
      • this might be the better solution as you can add the adyen routescope and storefront to ensure old webhooks will continue to work.
  • Somehow add an information regarding the sales channel to the webhook call, e.g. sales channel ID query parameter or header.
    • adding it optionally to the path might also be a solution, that way headless integrations can use the ID there, but for existing ones it will still work through the domain paths.

It will work for storefront sales channels that are also used headless, but for headless only sales channels it will fail.

Versions
Shopware version: 6.5.3.3
Plugin version: 3.12.1

See https://github.com/Adyen/adyen-shopware6/blob/3.12.1/src/Storefront/Controller/NotificationReceiverController.php

@AndreasA
Copy link
Contributor Author

AndreasA commented Jul 27, 2023

@peterojo I think this might actually be quite simple to fix, by e.g. creating a store api route that has auth required set to false, and the sales channel ID as path parameter (potentially optional parameter) and the sales channel ID passed to the notfication service, and then calls the notfiication service. that one should also work for storefront sales channels but using different routes could even be by design.

I could create a corresponding PR.

I would suggest something like /store-api/adyen/notification/<sales-channel-id>

@candemiralp candemiralp self-assigned this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants