/** * Retrieve payment method instance * * @return \Magento\Payment\Model\MethodInterface */ public function getPaymentMethodInstance() { if ($this->_paymentMethodInstance === null) { $this->_paymentMethodInstance = $this->_paymentData->getMethodInstance($this->getMethodCode()); $this->_paymentMethodInstance->setStore($this->getStoreId()); } return $this->_paymentMethodInstance; }