How to add a new configuration field for all the installed payment methods?

Hello,

I checked that model, it is checking if with that key if already exist in DB then update it, otherwise add the new entry into core config data.

But I original question is different

Let you explain by example:

In magento we can able to new payment method setting by system.xml
Now i want to add each payment method wise one field and name of field is “Fee”

how to do that?

I recommend to implement it without touching the database, and add an after plugin to a method which reads the configuraton instead, because the set of installed payment methods can be dynamically changed.

do you know any such a event?

For example, you could write a plugin to the \Magento\Config\Block\System\Config\For::initFields() method.

See:

I tied to create


And plugin file code is :smile:

<?php namespace MageArray\GroupPayment\Model; class Plugin { public function beforeinitFields($subject, $result) { } } but i am not able to do add new attribute into group. $group->getChildren()