Closed mbegerau closed 4 years ago
Thanks for your help in finding and documenting this issue. We were in fact aware of this issue and have a fix that is your second solution but with use of the router service ;-) Expect this update next week.
Hey, thanks for your work! I can confirm that it's working now.
Environment changes compared to original post (completely new and clean shop): Shopware: 6.2.0 Mollie: 1.0.13
Environment
OS: Ubuntu 18.04 Apache: 2.4.29 PHP: 7.3.17 MySQL: 5.7.30 Shopware: 6.1.5 (fresh installation from production repository) Mollie: 1.0.10 Other Plugins: Shopware 6 Demo data (1.0.5)
Problem
The request to store the creditcard token (/mollie/components/store-card-token/{customerId}/{token}) fails when the storefront uses some kind of subfolder.
Consequence: The
custom_fields
field in the customer table may not contain the token required for the API request.Detected causes
custom/plugins/MolliePayments/src/Resources/assets/js/components.creditcard.js, lines 145-153
The fetchUrl is set as absolute link.
We have three cases where this causes a problem:
Solution suggestion
To use the same approach as you are using with other variables that you get from the backend we would suggest these changes: