adyen-shopware6
adyen-shopware6 copied to clipboard
[ECP-9094] Easy way to change API settings depending on order data, e.g. depending on the products
Hi,
some shops might need to differentiate which credentials to use, depending on the products in the cart, e.g. some type of products are always handled by one of the companies, all others go to the normal one.
This is currently a bit tricky to implement, though not impossible, using Shopware configuration loaded events and replacing some services of the plugin.
It would be nice if this could be done easier, e.g. by decorating the configurationservice, however, it would need an interface then and the orderid or orderentity as parameter for this to work. or some events.
However, I know this is probably a low priority or might not be done at all as it is a bit of an edge case. on the other hand adding some corresponding event listerners or making the configuration service decoratable accordingly, should not be that much work either.
Hello @AndreasA,
Thanks for creating this issue. I am trying to realise the use case. As I understand, some products might use different Adyen credentials to complete the payment. Could you please give a use case of this enhancement? So that, I can discuss the implementation with our product manager.
Best Regards, Can
@candemiralp Hi it is a bit of an edge-case which is why I think it would be enough to have some corresponding event listeners.
It is the following scenario:
- Company has multiple subsidiaries
- Each subsidiaries has their own webshop
- In addition to products that are delivered there are digital software products
- those products are only handled by some subsidiaries but all allow those products to be ordered.
- Therefore, it is disallowed using a cart validator to combine those products.
- all software products need to be paid to the corresponding subsidiary, so if one does not handle them directly, they defer to another subsidiary..
Hi @AndreasA,
I have created an internal ticket for this enhancement. Thank you for your contribution.
Best Regards, Can