Esempio n. 1
0
 /**
  * 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;
 }
Esempio n. 2
0
 /**
  * @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;
 }