How is \Magento\Sales\Model\Order\Payment::canRefund() implemented and used?

See also: