示例#1
0
 public function getTax(Shopware_StoreApi_Models_Auth $authModel)
 {
     if (!$authModel instanceof Shopware_StoreApi_Models_Auth) {
         throw new Enlight_Exception('The parameter authModel is not an instance of the class Shopware_StoreApi_Models_Auth');
     }
     return $this->gateway->getTax($authModel->getShopwareId(), $authModel->getToken());
 }
示例#2
0
 public function isTokenValid(Shopware_StoreApi_Models_Auth $authModel)
 {
     if (!$authModel instanceof Shopware_StoreApi_Models_Auth) {
         return false;
     }
     $array = $this->gateway->isTokenValid($authModel->getShopwareId(), $authModel->getToken());
     if ($array['authorized'] == true) {
         return true;
     } else {
         return false;
     }
 }
示例#3
0
文件: Store.php 项目: nhp/shopware-4
 /**
  * @return null|Shopware_StoreApi_Models_Auth
  */
 public function getIdentity()
 {
     if (!$this->identity instanceof Shopware_StoreApi_Models_Auth) {
         $this->identity = new Shopware_StoreApi_Models_Auth();
         $this->identity->setShopwareId(Shopware()->BackendSession()->pluginManagerShopwareId);
         $this->identity->setToken(Shopware()->BackendSession()->pluginManagerAccountToken);
         $this->identity->setAccountUrl(Shopware()->BackendSession()->pluginManagerAccountUrl);
     }
     return $this->identity;
 }