Q:

Payment Method not showing information in admin order detail

I've created a custom payment method and want to see the information inside the admin order detail page.
The payment method is a custom instore payment method and working so far.
I'd like to know how to get the name of the used payment method or its additional information into the order detail page

I already tried to follow the instructions from the  official magento 2.3 docs . The examples are not working and containing deprecated functions. 
The examples in the docs for the braintree module are not working for my use-case and some functions used for the offline-payments are deprecated: e.g bank transfer payment model using $this->getConfigData(..) from Magento\Payment\Model\Method\AbstractMethod indicates a deprection @deprecated 100.0.6 for the file. The function getConfigData() is deprecated in @deprecated 100.2.0 
Unfortunately it doesn't give any clue how to replace the deprecated function and only points to the devdocs in version 2.1.
Since this payment method is offline I also tried to make my codes similar to the offline payment methods on github.

A:

I finally fixed the problem.
In my paymentmethod I needed to create/update the file in the
namespace Vendor\ModuleName\Block\Info 
file as follows:
use Magento\Payment\Block\ConfigurableInfo;

class LocalPayment extends ConfigurableInfo
{
    protected function getLabel($field)
    {
        return __($field);
    }
}

This will render the paymentMethod name into the orders. It will also do this for past created orders.

