상속: extends Gpf_Rpc_Request
 /**
  *
  * @param $paramName
  * @param $paramValue
  * @return string
  */
 private function createApproveDeclineTask(Gpf_Tasks_QuickTaskGroup $quickTaskGroup, $newStatus) {
     $actionRequest = new Gpf_Rpc_ActionRequest('Pap_Merchants_User_DirectLinksForm', 'quickTaskApprove');
     $actionRequest->addParam('directLinkId', $this->directLink->getId());
     $actionRequest->addParam('rstatus', $newStatus);
     $quickTask = new Gpf_Tasks_QuickTask($actionRequest);
     $quickTaskGroup->add($quickTask);
     return $quickTask->getUrl();
 }
 private function createApproveDeclineTask(Gpf_Tasks_QuickTaskGroup $quickTaskGroup, $newStatus) {               
     $actionRequest = new Gpf_Rpc_ActionRequest('Pap_Merchants_Transaction_TransactionsForm', 'changeStatus');
     $actionRequest->addParam('status', $newStatus);
     $actionRequest->addParam('ids', new Gpf_Rpc_Array(array($this->transaction->get(Pap_Db_Table_Transactions::TRANSACTION_ID))));   
     
     $quickTask = new Gpf_Tasks_QuickTask($actionRequest);
     $quickTaskGroup->add($quickTask);
     return $quickTask->getUrl();
 }
 private function createApproveDeclineTask($newStatus) {               
     $actionRequest = new Gpf_Rpc_ActionRequest('Pap_Merchants_User_AffiliateForm', 'changeStatus');
     $actionRequest->addParam('dontSendNotification', 'N');
     $actionRequest->addParam('status', $newStatus);
     $actionRequest->addParam('ids', new Gpf_Rpc_Array(array($this->getUser()->getId())));   
     
     $quickTask = new Gpf_Tasks_QuickTask($actionRequest);
     return $quickTask->getUrl();
 }
 public function createCommissions() {
     $request = new Gpf_Rpc_ActionRequest('Pap_Features_RecurringCommissions_RecurringCommissionsForm',
                                          'createCommissions', $this->getSession());
     $request->addParam('id', $this->getId());
     $request->addParam('orderid', $this->getField('orderid'));
     $request->sendNow();
     $action = $request->getAction();
     if ($action->isError()) {
         throw new Gpf_Exception($action->getErrorMessage());
     }
 }
    private function createApproveDeclineTask(Gpf_Tasks_QuickTaskGroup $quickTaskGroup, $newStatus) {               
        $actionRequest = new Gpf_Rpc_ActionRequest('Pap_Features_Common_AffiliateGroupForm', 'changeStatus');
       
        $commissionGroup = Pap_Db_Table_CommissionGroups::getInstance();

        $userInCommissionGroupId = $commissionGroup->getUserInCommissionGroup($this->campaign->getId(), $this->user->getId());

        $actionRequest->addParam('status', $newStatus);
        $actionRequest->addParam('ids', new Gpf_Rpc_Array(array($userInCommissionGroupId)));   
        
        $quickTask = new Gpf_Tasks_QuickTask($actionRequest);
        $quickTaskGroup->add($quickTask);
        return $quickTask->getUrl();
    }
예제 #6
0
 protected function sendMarkTransactionsCall() {
     $request = new Gpf_Rpc_ActionRequest('Pap_Merchants_Payout_PayAffiliatesFormExportGrid', 'markTransactionsAsPaymentPending', $this->apiSessionObject);
     $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());
     }
 }
    private function makeRefundChargeback($type, $note, $fee) {        
        if ($this->apiSessionObject->getRoleType() == Gpf_Api_Session::AFFILIATE) {
            throw new Exception("This method can be used only by merchant!"); 
        }
        if ($this->getFiltersParameter()->getCount() == 0) {
            throw new Exception("Refund / Chargeback in transactions grid is possible to make only with filters!");
        }

        $request = new Gpf_Rpc_ActionRequest('Pap_Merchants_Transaction_TransactionsForm', 'makeRefundChargebackByParams', $this->apiSessionObject);
        $request->addParam('filters', $this->getFiltersParameter());
        $request->addParam(self::REFUND_MERCHANT_NOTE, $note);
        $request->addParam(self::REFUND_TYPE, $type);
        $request->addParam(self::REFUND_FEE, $fee);

        $request->sendNow();

        return $request->getAction();
    }
예제 #8
0
 protected function sendPayTransactionsCall($paymentNote, $affiliateNote, $send_payment_to_affiliate, $send_generated_invoices_to_merchant, $send_generated_invoices_to_affiliates)
 {
     $request = new Gpf_Rpc_ActionRequest('Pap_Merchants_Payout_PayAffiliatesForm', 'payAffiliates', $this->apiSessionObject);
     $request->addParam('paymentNote', $paymentNote);
     $request->addParam('affiliateNote', $affiliateNote);
     $request->addParam('send_payment_to_affiliate', $send_payment_to_affiliate);
     $request->addParam('send_generated_invoices_to_merchant', $send_generated_invoices_to_merchant);
     $request->addParam('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();
     }
 }
예제 #9
0
 /**
  * @return Gpf_Rpc_Action
  */
 private function makeRefundChargeBack($note, $type, $fee, $refundMultiTier) {
     if ($this->getTransid() == '') {
         throw new Gpf_Exception("No transaction ID. Call setTransid() or load transaction before calling refund/chargeback");
     }
     $request = new Gpf_Rpc_ActionRequest($this->class, 'makeRefundChargeback', $this->getSession());
     $request->addParam('merchant_note', $note);
     $request->addParam('refund_multitier', $refundMultiTier ? 'Y' : 'N');
     $request->addParam('status', $type);
     $request->addParam('ids', new Gpf_Rpc_Map(array($this->getTransid())));
     $request->addParam('fee', $fee);
     $request->sendNow();
     return $request->getAction();
 }
예제 #10
0
 private function sendActionRequest($className, $method, Gpf_Rpc_Params $params) {
     $request = new Gpf_Rpc_ActionRequest($className, $method, $this->getSession());
     $request->setParams($params);
     return $request->sendNow();
 }