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.
aditionalInformation
property of payment entity to store all custom details, also you need to specifypaymentInfoKeys
andprivateInfoKeys
in the paymentconfig.xml
. What examples are not working from the documentation?config.xml
using these types of information?Magento\Payment\Model\Method\AbstractMethod
is deprecated and should not be used. The official documentation describes only recommended approach based on Payment Gateway - this approach applicable for offline and online payment solutions.