/** * Set payment parent transaction id and current transaction id if it not set * @param Transaction $transaction * @return void */ private function setTransactionIdsForRefund(Transaction $transaction) { if (!$this->getTransactionId()) { $this->setTransactionId($this->transactionManager->generateTransactionId($this, Transaction::TYPE_REFUND, $transaction)); } $this->setParentTransactionId($transaction->getTxnId()); }
/** * Checks if transaction exists * * @return bool */ protected function checkIfTransactionExists() { return $this->transactionManager->isTransactionExists($this->getTransactionId(), $this->getId(), $this->getOrder()->getId()); }