Esempio n. 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());
 }
Esempio n. 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;
     }
 }
Esempio n. 3
0
 /**
  * @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;
 }