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

[ECP-9564] Provide adminhtml configuration option for Payment Methods #2858

Open
DanieliMi opened this issue Jan 23, 2025 · 12 comments
Open
Assignees
Labels
Enhancement Indicates a new feature request

Comments

@DanieliMi
Copy link

Is your feature request related to a problem? Please describe.
Currently there is no easy way to configure the payment method titles for non developers. They are all configured in config.xml but no adminhtml configuration is provided via system.xml.

Describe the solution you'd like
It would be nice to have the configuration available in the adminhtml so the customers can change method titles themselves without a developer having to set the config via CLI.

Describe alternatives you've considered
An alternative would be to not use the Magento configuration at all but rather use the title provided by the adyen backend response.

Additional context
Might be realted to #2854.

@DanieliMi DanieliMi added the Enhancement Indicates a new feature request label Jan 23, 2025
@aschrammel
Copy link
Contributor

#2854 is pretty sure related this one.

For Credit Card it'll just work fine, but for all other payment methods configuration won't have any effect unless configured in Default scope. That's what is outlined in the linked issue 😄

@candemiralp candemiralp self-assigned this Jan 24, 2025
@candemiralp
Copy link
Member

Hello @DanieliMi,

Thank you for raising your concern and creating a issue for this. As @aschrammel mentioned, we already have an internal investigation ticket to tackle this issue. Therefore, I'm adding this as the sub-task of #2854 as it's a duplicate.

Best Regards,
Can

@candemiralp candemiralp added the Duplicate Indicates that an identical issue has already been opened label Jan 24, 2025
@candemiralp
Copy link
Member

Hello all,

Adding sub-task wasn't a good idea as closing the main issue might not auto complete the sub-tasks.

I am closing this duplicate issue and please follow #2854 as we already have an internal ticket assigned to that issue.

Best Regards,
Can

@DanieliMi
Copy link
Author

Hi @candemiralp, I am not 100% certain it is a duplicate. #2854 aims to provide store scoped translations, while this issue aims to provide configurable options within the adminhtml. If adding adminhtml configuration (via system.xml) as well as store scoped translations is within the scope of the the other ticket the close is perfectly fine. But as I said options within the adminhtml would be a nice feature.

@candemiralp candemiralp reopened this Jan 24, 2025
@candemiralp
Copy link
Member

Hi @DanieliMi,

Thank you for your timely response. I partially agree with you. We've also just now realised #2854 is complaining about only the configuration paths are not used while determining the title in different scopes. You can see my comment there.

As we support ~100 payment methods, it's not feasible to add a title input field for each one in the admin area. We are leaning towards using Adyen's translations for titles provided by Checkout API in /paymentMethods API response. This response contains the titles translated based on the shopperLocale field provided in the API request.

However, this will be a breaking change so we've decided to implement it as a part of V10 of the plugin. ETA of V10 is around the end of Q1 2025.

Please let me know if you have any further questions about this implementation and thank you for reporting back the validity of the issue.

Best Regards,
Can

@candemiralp candemiralp removed the Duplicate Indicates that an identical issue has already been opened label Jan 24, 2025
@candemiralp candemiralp added this to the Adyen Payment 10.0.0 milestone Jan 24, 2025
@DanieliMi
Copy link
Author

Hi @candemiralp, thanks for reconsidering! Yeah I can perfectly understand that adding 100 fields is quite a lot. I am perfectly fine with using the titles provided from the Checkout API. For us there is currently no rush since in our case the store scope title actually works (using 9.12 with the hyvä compat).

@candemiralp
Copy link
Member

Hi @DanieliMi,

Thank you for your response! Please follow up V10 milestone for this update.

Best Regards,
Can

@candemiralp candemiralp changed the title Provide adminhtml configuration option for Payment Methods [ECP-9564] Provide adminhtml configuration option for Payment Methods Jan 24, 2025
@aschrammel
Copy link
Contributor

aschrammel commented Jan 27, 2025

Hi @candemiralp

short question regarding the change proposed for v10: This means there will no more possibility then to override it with values from the configuration?

Will this than be like e.g. the CC card field names? For those we are facing issues for countries where you're not supporting the language of.

Looking at this and the fact that a customer may want to have a different wording than the one provided by you, it would be great to keep the possibility to override the returned translation via a config value (even if it's not provided via the Admin area).

@candemiralp
Copy link
Member

candemiralp commented Jan 27, 2025

Hello @aschrammel,

We were actually planning to override the title coming from the configuration with the fields coming from API response. However, you've raised a valid concern here. We will keep it in mind while introducing the solution. Maybe, the source of truth for the titles can be configured in the plugin configuration and be selected from a dropdown Use configuration or Use API for PM titles. We will discuss this approach eventually with our product manager.

Best Regards,
Can

@aschrammel
Copy link
Contributor

Hi @candemiralp,

thanks a lot for taking this into consideration 😄 Making this configurable sounds pretty nice.

Best regards,
Andreas

@aschrammel
Copy link
Contributor

aschrammel commented Jan 30, 2025

Good morning @candemiralp,

One more idea I'd like to propose regarding configuration via Magento looking at the initial request from @DanieliMi:
As it's absolutely obvious that listing ~100 fields to cover all payment methods is not feasible, an alternative could be to provide a table configuration where the user can map a payment method to a title per row.

The payment method selection could be a dropdown providing all supported payment methods, the title a simple text field.

As a sample I'd like to give the implementation from Elasticsuites "Indices Mapping" here:
Image

As a fallback, it would be awesome to keep the current configuration paths and check them, in case the payment method is not configured in the mapping.

Unfortunately I'm not able to find the place in the current implementation, where configuration value is passed from the backend to frontend for alternative payment methods. Otherwise I'd be happy to provide a PR as POC for proposed solution for v9.

Maybe you can point me to the right place.
For Credit Card titles it is in \Adyen\Payment\Model\Ui\AdyenCcConfigProvider::getConfig

Looking forward to your feedback 😄

Best
Andreas

@candemiralp
Copy link
Member

Hello @aschrammel,

That looks like a nice implementation but the actual scope of the ticket will be determined by the product team depending on the priority vs size of the issue etc. I will bring this idea to the discussion while handling this ticket.

Thank you for the recommendation!

Best Regards,
Can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Indicates a new feature request
Projects
None yet
Development

No branches or pull requests

3 participants