I have a custom payment gateway that pass additional payment information back upon the return to Magento store that I would like to store on the associated order, so that it can be displayed on the admin page, similarly to what Paypal Express Checkout offer as shown below. What would be the best practice to do this (I prefer have it done within a controller action that handle the return).
A quick reference:
Take a look the sales order view xml:
<block class="Magento\Sales\Block\Adminhtml\Order\Payment" name="order_payment"/>
As we can see,
Magento\Sales\Block\Adminhtml\Order\Payment block will handle the payment output.
It will get the payment info block:
$paymentInfoBlock = $this->_paymentData->getInfoBlock($payment, $this->getLayout());
In Paypal case, the block info is
Paypal module built the model info to collect and provide access to PayPal-specific payment data:
--Create the model info.
--Create the block info to get the info from the model info.