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

Base path of storefront domain appended twcie to generated redirect result URL. #338

Closed
AndreasA opened this issue Jan 17, 2023 · 2 comments
Assignees
Labels
Bug report Indicates that issue has been marked as a possible bug

Comments

@AndreasA
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

Versions
Shopware version: 6.4.18.0
Plugin version: 3.8.1

To Reproduce
Steps to reproduce the behavior:

  1. Add a domain https://www.example.com/en
  2. Trigger handle payment.
  3. generated url is https://www.example.com/en/en/adyen/redirect-result in some cases.

Expected behavior
URL should be generated correctly.

Additional context
The issue is that if the SALES_CHANNEL_BASE_URL attribute is set by Storefront, the storefront router (if storefront is installed) appends that URL to absolute paths.

As for headless the base url attribute might not be set, it is good that you do not require that attribute to determine the correct URL. However, it can result in wrong URLs.

One solutoin would be to use router.default again as service. As that one only generates /adyen/redirect-result and then with adding the base url https://www.example.com/en/ it works correctly and should result in https://www.example.com/en/adyen/redirect-result.

This should also work if the domain is instead https://en.example.com and would then result in https://en.example.com/adyen/redirect-result.

@candemiralp
Copy link
Member

Hello @AndreasA,

Thank you for opening this issue and creating a PR at the same time. We will try to reproduce the issue and try to fix with your PR. After PR is approved, we will merge it.

Thank you for your contribution.

Best Regards,
Can

@candemiralp candemiralp self-assigned this Jan 19, 2023
@candemiralp candemiralp added the Bug report Indicates that issue has been marked as a possible bug label Jan 19, 2023
@candemiralp
Copy link
Member

Hello @AndreasA,

Thank you for reporting this issue and for your contribution. Your PR has been merged and we are closing this Github issue.

Best Regards,
Can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Indicates that issue has been marked as a possible bug
Projects
None yet
Development

No branches or pull requests

2 participants