helper = $helper; } /** * Create payment method instance. * * @param PaymentMethodInterface $paymentMethod * @return \Magento\Payment\Model\MethodInterface */ public function create(PaymentMethodInterface $paymentMethod) { $methodInstance = $this->helper->getMethodInstance($paymentMethod->getCode()); $methodInstance->setStore($paymentMethod->getStoreId()); return $methodInstance; } }