public function process($apiKey, $datas, $type)
 {
     $pdfPro = new PdfPro($apiKey);
     $methodConfig = Mage::getStoreConfig('pdfpro/config/communication_method');
     $methodDatas = Mage::getConfig()->getNode('global/easypdf_communication_method')->asArray();
     if (isset($methodDatas[$methodConfig])) {
         $method = array('title' => $methodDatas[$methodConfig]['title'], 'model' => Mage::getModel($methodDatas[$methodConfig]['model']));
         return $pdfPro->getPDF($datas, $type, $method);
     } else {
         throw new Mage_Core_Exception('You need to select the communication method by go to EasyPDF -> Configuration');
     }
 }
示例#2
0
 /**
  * Get version of PDF Pro from Server
  */
 public function getServerVersion()
 {
     $apiKey = $this->getDefaultApiKey();
     $pdfPro = new PdfPro($apiKey);
     return $pdfPro->getServerVersion();
 }