/** * API instance getter * Sets current store id to current config instance and passes it to API * * @return \Magento\Paypal\Model\Api\Nvp */ public function getApi() { if (null === $this->_api) { $this->_api = $this->_apiFactory->create($this->_apiType); } $this->_api->setConfigObject($this->_config); return $this->_api; }
/** * @return \Magento\Paypal\Model\Api\Nvp */ protected function _getApi() { if (null === $this->_api) { $this->_api = $this->_apiTypeFactory->create($this->_apiType)->setConfigObject($this->_config); } return $this->_api; }