protected function refundChargeback() { $transaction = new Pap_Common_Transaction(); $items = explode("|", $this->doubleColonProducts); for ($i = 0; $i<count($items); $i++) { $transId = $this->getTransactionIdFromOrderId($this->getOrderID()."_".$i); if ($transId !== false) $transaction->processRefundChargeback($transId, Pap_Db_Transaction::TYPE_REFUND, '', $this->getOrderID()."_".$i, 0, true); } }
private function makeRefund() { $this->debug('2checkout refund started'); $transaction = new Pap_Db_Transaction(); $transaction->setOrderId($this->getSubscriptionID()); try{ $collection = $transaction->loadCollection(array(Pap_Db_Table_Transactions::ORDER_ID)); } catch (Gpf_Exception $e) { $this->debug('2checkout refund failed - Error in loading transactions: '.$e->getMessage()); return; } if($collection->getSize() == 0) { $this->debug('2checkout refund failed: No transactions with order id: '.$this->getSubscriptionID()); return; } foreach($collection as $transactionDb) { $transaction = new Pap_Common_Transaction(); $transaction->processRefundChargeback($transactionDb->getId(), $transactionDb->getType()); $this->debug('2checkout refunded transaction with id '.$transactionDb->getId()); } }
private function refundChargeback($transactionId, $type, $note) { $transaction = new Pap_Common_Transaction(); $transaction->processRefundChargeback($transactionId, $type, $note, '', 0, true); }
protected function refundChargeback() { $transaction = new Pap_Common_Transaction(); $transaction->processRefundChargeback($this->getTransactionIdFromOrderId($this->getParentTransId()), Pap_Db_Transaction::TYPE_REFUND, '', $this->getOrderID(), 0, true); }
/** * * @service * @anonym * @param ids, status * @return Gpf_Rpc_Action */ public function makeRefundChargeback(Gpf_Rpc_Params $params) { if (!Gpf_Session::getAuthUser()->hasPrivilege(Pap_Privileges::TRANSACTION, Pap_Privileges::P_WRITE) && !Gpf_Session::getAuthUser()->hasPrivilege(Pap_Privileges::TRANSACTION, Pap_Privileges::P_REFUND)) { throw new Gpf_Rpc_PermissionDeniedException('Pap_Merchants_Transaction_TransactionsForm', 'makeRefundChargeback'); } $action = new Gpf_Rpc_Action($params, $this->_("Refund / chargeback of selected transaction(s) was successfully made"), $this->_("Failed to make refund / chargeback of selected transaction(s)")); $note = $action->getParam(self::REFUND_MERCHANT_NOTE); foreach ($action->getIds() as $id) { try { $transaction = new Pap_Common_Transaction(); $transaction->processRefundChargeback($id, $action->getParam(self::REFUND_TYPE), $note, '', $action->getParam(self::REFUND_FEE), $this->isMultitierRefund($action)); $action->addOk(); } catch (Exception $e) { $action->addError(); } } return $action; }
protected function refundChargeback() { $transaction = new Pap_Common_Transaction(); $transaction->processRefundChargeback($this->getTransactionID(), Pap_Db_Transaction::TYPE_REFUND, '', '', 0, true); }