Skip to content

Payment methods from core source model are not grouped properly #19664

@wojtekn

Description

@wojtekn

Summary

There is \Magento\Payment\Model\Config\Source\Allmethods class in the Magento core which can be used as source model for backend configuration fields. It displays available payment methods grouped by payment provider. Not all methods shipped with M2 have group defined, so some of them are displayed outside option group. This can be confusing.

It looks as follows now:

methods-without-group-1

methods-without-group-2

Examples

  1. Create empty custom module
  2. Add new field to system configuration using mentioned source model:
    <group id="payment" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
        <label>Payment settings</label>
            <field id="ccmethods" translate="label" type="multiselect" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>CC methods</label>
            <source_model>Magento\Payment\Model\Config\Source\Allmethods</source_model>
        </field>
    </group>

Proposed solution

Configure one missing group for PayPal method, one for Authorize.net method and a group for all Braintree methods.

I will submit PR for this soon.

Metadata

Metadata

Assignees

Labels

Component: PaymentFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentProgress: PR CreatedIndicates that Pull Request has been created to fix issueReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions