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 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(); }
/** * @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(); }