Inheritance: extends Gpf_Rpc_Request
 /**
  * Get version of installed application
  *
  * @return string version of installed application
  */
 public function getAppVersion()
 {
     $request = new Gpf_Rpc_FormRequest("Gpf_Api_AuthService", "getAppVersion");
     $request->setUrl($this->url);
     try {
         $request->sendNow();
     } catch (Exception $e) {
         $this->setMessage("Connection error: " . $e->getMessage());
         return false;
     }
     $form = $request->getForm();
     return $form->getFieldValue('version');
 }
 protected function sendPayTransactionsCall($paymentNote, $affiliateNote, $send_payment_to_affiliate, $send_generated_invoices_to_merchant, $send_generated_invoices_to_affiliates) {
     $request = new Gpf_Rpc_FormRequest('Pap_Merchants_Payout_PayAffiliatesForm', 'payAffiliates', $this->apiSessionObject);
     $request->setField('paymentNote', $paymentNote);
     $request->setField('affiliateNote', $affiliateNote);
     $request->setField('send_payment_to_affiliate', $send_payment_to_affiliate);
     $request->setField('send_generated_invoices_to_merchant', $send_generated_invoices_to_merchant);
     $request->setField('send_generated_invoices_to_affiliates', $send_generated_invoices_to_affiliates);
     $request->sendNow();
    
     if ($request->getResponseError() != '') {
         throw new Gpf_Exception($request->getResponseError());
     }
 }
 protected function beforeCallRequest(Gpf_Rpc_FormRequest $request)
 {
     $request->addParam('isFromApi', Gpf::YES);
 }
 protected function sendPayTransactionsCall($paymentNote, $affiliateNote, $send_payment_to_affiliate, $send_generated_invoices_to_merchant, $send_generated_invoices_to_affiliates)
 {
     $request = new Gpf_Rpc_FormRequest('Pap_Merchants_Payout_PayAffiliatesForm', 'payAffiliates', $this->apiSessionObject);
     $request->setField('paymentNote', $paymentNote);
     $request->setField('affiliateNote', $affiliateNote);
     $request->setField('send_payment_to_affiliate', $send_payment_to_affiliate);
     $request->setField('send_generated_invoices_to_merchant', $send_generated_invoices_to_merchant);
     $request->setField('send_generated_invoices_to_affiliates', $send_generated_invoices_to_affiliates);
     $request->addParam('ids', new Gpf_Rpc_Array($this->getAffiliatesToPay()));
     $request->addParam('filters', new Gpf_Rpc_Array($this->getFilters()));
     $request->sendNow();
     if ($request->getResponseError() != '') {
         throw new Gpf_Exception($request->getResponseError());
     }
     $response = $request->getStdResponse();
     if ($response->success == 'Y' && strpos($response->infoMessage, self::PAP_MERCHANTS_PAYOUT_PAYAFFILIATESFORM_SUCCESS) !== 0) {
         $request->sendNow();
     }
 }