vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.77k stars 1.02k forks source link

Vendure admin : payment methods : display name in columns #1613

Open christopheblin opened 2 years ago

christopheblin commented 2 years ago

Is your feature request related to a problem? Please describe. I have multiple channels. Each channels has a payment method with code = "stripe" but with a unique name (like 'stripe-channel1').

the fact to have the same code is for the storefronts to be able to "hardcode" the method whatever the channel without using eligiblePaymentMehods before

So when I go to Settings > Payment methods, I only see a bunch of 'stripe'

Describe the solution you'd like If the name would be displayed in addition to the code (like in the shipping methods), I coud distinguish easily between the methods

Describe alternatives you've considered Looking in the db by the name and loading the page with url https://xxx/admin/settings/payment-methods/xxx

christopheblin commented 2 years ago

In fact, there is a deeper problem : when you have multiple methods with the same code, the method becomes unusable in the 'default' channel

the problem is not for shippingMethod because setOrderShippingMethod uses the id (whereas addPaymentToOrder uses the PM code)

-> so, generally speaking, it is not a good idea to have 2 PM with the same code

and maybe there could be a unique index on this column in the db to enforce this "restriction" ?