Inside of my payment class in
public function capture(\Magento\Payment\Model\InfoInterface $payment)
object $payment
has method $payment->getCcType()
which returns short code 'VI' or 'AE'for example. And I need to get full name of credit card brand, which $payment
doesn't has (I've looked at realization of InfoInterface - there is nothing about it).
The name should match one of this list AMEX, DISCOVER, DINERSCLUB, VISA, MASTERCARD, JCB, UNIONPAY, VOYAGER, CARTEBLEUE, DANKORT, MAESTRO, VPAY, VISAELECTRON, TOKEN, VISADELTADEBIT, MASTERCARDDEBIT (doesn't matter whether it is lower or uppercase).
How it could be converted using magento framework or payment modules?