Inheritance: extends Gpf_Rpc_Request
示例#1
0
 /**
  * @service feature read
  * @param $fields
  */
 public function buyFeature(Gpf_Rpc_Params $params)
 {
     $request = new Gpf_Rpc_DataRequest("Dp_QualityUnit_AddonPurchase", "getPurchaseLink");
     $request->setUrl(Gpf_Install_LicenseManager::MEMBERS_URL);
     $request->setParams($params);
     $request->sendNow();
     return $request->getResponseObject();
 }
 /**
  *
  * @service
  * @anonym
  * 
  * @param Gpf_Rpc_Params $params
  */
 public function getLatestVersion(Gpf_Rpc_Params $params)
 {
     $data = new Gpf_Rpc_Data($params);
     $request = new Gpf_Rpc_DataRequest('Dp_Version_Info', 'getLatestVersion');
     $request->setUrl(Gpf_Install_LicenseManager::MEMBERS_URL);
     $request->setField('id', $data->getParam('id'));
     try {
         $request->sendNow();
         $versionInfo = $request->getData();
         if (version_compare($versionInfo->getValue('version'), Gpf_Application::getInstance()->getVersion()) < 0) {
             $versionInfo->setValue('version', Gpf_Application::getInstance()->getVersion());
         }
         return $versionInfo;
     } catch (Exception $e) {
     }
     return $data;
 }
 public function getPayeesDeatilsInfo($payoutId) {
     $this->checkMerchantRole();
     $request = new Gpf_Rpc_DataRequest('Pap_Merchants_Payout_PayoutsHistoryGrid', 'payeesDetails', $this->apiSessionObject);
     $request->addFilter('id', 'E', $payoutId);
     $request->sendNow();
     $results = $request->getData();
     
     $output = array();
     
     for ($i=0; $i<$results->getSize(); $i++) {
         $userinfo = $results->getValue('user' . $i);
         $data = new Gpf_Rpc_Data();
         $data->loadFromObject($userinfo);
         $output[] = $data;
     }
     return $output;
 }
 private function makeServiceCall($string)
 {
     $request = new Gpf_Rpc_DataRequest('Gpf_Install_CheckModSecRpcCaller', 'check');
     $request->setUrl(Gpf_Paths::getInstance()->getFullScriptsUrl() . 'server.php');
     $request->setField('teststring', $string);
     try {
         $request->sendNow();
     } catch (Gpf_Exception $e) {
         return false;
     }
     $data = $request->getData();
     if ($data->getParam('status') != 'OK') {
         return false;
     }
     if ($data->getParam('recieved') != $string) {
         return false;
     }
     return true;
 }
示例#5
0
 private function getData(&$data, $method, $primaryKeyName) {
 	if ($this->visitorId == '') {
         return null;
     }
     if ($data === self::NOT_LOADED_YET) {
         $request = new Gpf_Rpc_DataRequest('Pap_Tracking_Visit_SingleVisitorProcessor', $method, $this->session);
         $request->addParam('visitorId', $this->visitorId);
         $request->addParam('accountId', $this->accountId);
         $request->sendNow();
         $data = $request->getData();
         if (is_null($data->getValue($primaryKeyName))) {
         	$data = null;
         }
     }
     return $data;
 }
 /**
  * @return Gpf_Rpc_DataRequest
  */
 protected function createValidateLicenseDatarequest($licenseCode, $installUrl, $hostedAccountId)
 {
     $request = new Gpf_Rpc_DataRequest('Dp_License_Generator', 'validateLicense');
     $request->setField(self::LICENSE_CODE_MEMBERS_NAME, $licenseCode);
     $url = new Gpf_Install_Url($installUrl);
     $request->setField('url', $url->toString());
     $request->setField('version', Gpf_Application::getInstance()->getVersion());
     $request->setUrl(self::MEMBERS_URL);
     return $request;
 }