コード例 #1
0
ファイル: Pro.php プロジェクト: pradeep-wagento/magento2
 /**
  * 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;
 }
コード例 #2
0
ファイル: Checkout.php プロジェクト: Doability/magento2dev
 /**
  * @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;
 }