Open ofinsterbusch opened 1 week ago
Hello @ofinsterbusch,
Thank you for reaching out.
We will check this and come back to you as soon as possible.
Thank you,
Kind regards.
Hello @ofinsterbusch,
Note that our team finished investigating the reported issue.
When Sylius has more than 1 sales channels, all the payment methods from all channels will be shown on checkout for every channel. The issue is caused as our MolliePaymentMethodResolver is being decorated with the default resolver, as already stated by you. Since there is no prebuilt channel-based resolver in Sylius, we fixed the issue by adding the method that filters payment methods per channel. Now, only payment methods that belong to certain channels will be shown for it on checkout. Please note that the changes will be live with the next release (expected at the start of the next week).
Thank you,
Kind regards.
That's great, thank you!
When having multiple payment methods for different channels Mollie assumes it will be the main payment method.
This affects the way the SyliusMolliePlugin\Payments\MethodResolver\MolliePaymentMethodResolver class works
The resolvers checks for a Mollie payment method and then for it's parents but using the default payment method resolver and not the ChannelBasedPaymentMethodResolver. This results in showing any payment method that is enabled without considering the customer order channel.
This can be solved decorating the service _sylius_mollie_plugin.payment_resolver.mollie_paymentmethod.inner and pointing it to the ChannelBasedPaymentMethodResolver
But it probably should go through all the methods in the CompositePaymentMethodResolver ignoring the mollie one.