Example #1
0
 /**
  * For SOAP - Post Order Directly to Presswise
  *
  * @access public
  * @return void
  */
 public function postSoapOrder()
 {
     return;
     try {
         $oAuth = $this->_getSoapAuthObj();
         $aItem = $this->_getSoapItemObj();
         $oSoapAuthObj = new SoapVar($oAuth, SOAP_ENC_OBJECT, "auth");
         $oSoapOrderObj = new SoapVar($aItem, SOAP_ENC_OBJECT, "data");
         $client = new SoapClient(NULL, array('location' => PRESSWISE_ENDPOINT, 'trace' => true, 'encoding' => 'ISO-8859-1', 'uri' => "http://test-uri/"));
         $result = $client->add_purchase_order($oSoapAuthObj, $oSoapOrderObj);
         if ($result['result']['status']['code'] != 0) {
             $this->isErrors = true;
             $this->_errors['API Error'] = $result['result']['status']['text'];
         }
     } catch (Exception $e) {
         PresswiseDb::logError($e);
         $this->isErrors = true;
         $this->_errors = $e->getMessage();
         return false;
     }
 }