Get transaction details.

@param $transactionId

@throws \Exception|mixed

@return \MAbiola\Paystack\Models\Transaction
768919
public function details($transactionId)
    {
        $transactionData = $this->getTransactionResource()->get($transactionId);

        if ($transactionData instanceof \Exception) {
            throw $transactionData;
        }

        return TransactionObject::make($transactionData);
    }
966757
public function void($transactionId)
    {
        $xml = new DOMDocument();
        $transaction = $xml->createElement('hps:Transaction');
        $void = $xml->createElement('hps:AltPaymentVoid');

        $void->appendChild($xml->createElement('hps:TransactionType', $this->_transactionType));
        $void->appendChild($xml->createElement('hps:GatewayTxnId', $transactionId));

        $transaction->appendChild($void);
        return $this->_submitTransaction($transaction, 'AltPaymentVoid');
    }
1354894
public function getTransactionDetail($transaction_id){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_WALLET . Endpoints::WALLET_TRANSACTION;
        $url = sprintf($url,$transaction_id);
        $result = $this->authenticationService->getTransport()->fetch($url);

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            // Wrap it in a array since maskData takes an Array of Array
            $maskWrapper = array($result['results']);
            $this->maskData($maskWrapper);
            return $maskWrapper[0];
        }else{
            return 0;
        }
    }
720440
protected function getConnection($bindTransaction)
    {
        if (empty($this->connection)) {
            $this->connection = $this->getNewConnection(array($this->connectionInfo));
            $this->connections[] = $this->connection;

            if($bindTransaction)
                $this->TransactionManager->bindConnection($this->connection);
        }
        return $this->connection;
    }
91309
public function getTransactionIsolation()
    {
        if ($this->transactionIsolationLevel === null) {
            $this->transactionIsolationLevel = $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel();
        }

        return $this->transactionIsolationLevel;
    }
751000
private function doCancelTransaction($transactionId)
    {
        $refund = [
            'TransactionID' => $transactionId,
        ];

        /** @var Refund $refund */
        $refund = ClassValidator::getInstance('Eway\Rapid\Model\Refund', $refund);

        return $this->getHttpService()->postCancelAuthorisation($refund->toArray());
    }
347291
public function getTransaction( $transaction = self::TRANSACTION_LAST_USED, $throwExceptionIfNotFound = true )
    {

        if( $transaction === self::TRANSACTIONS_ALL ) {
            return array_keys( $this->queue );
        }

        if( $transaction === self::TRANSACTION_LAST_CREATED ) {
            if( !$this->queue) {
                $this->newTransaction();
            }
            $queue = array_keys( $this->queue );
            return array_pop( $queue );
        }

        if( $transaction === self::TRANSACTION_LAST_USED ) {
            if( !$this->queue) {
                $this->newTransaction();
            }
            return $this->lastTransaction;
        }

        if( $transaction === self::TRANSACTION_NEW ) {
            return $this->newTransaction();
        }

        if( !array_key_exists( $transaction, $this->queue ) ) {
            if( $throwExceptionIfNotFound ) {
                throw new TransactionDoesNotExistException(
                    "Transaction with this name `{$transaction}` doesn't exist. Sorry."
                );
            }
            return null;
        }

        return $transaction;

    }
1165822
public function getTransactionsByCode($code)
    {
        $this->_library->setEnvironment();
        $this->_library->setCharset();
        $this->_library->setLog();

        $response = null;
        try {
            $response = \PagSeguro\Services\Transactions\Search\Code::search(
                $this->_library->getPagSeguroCredentials(),
                $code
            );

            return $response;
        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        }
    }
1204668
public WePayOrder queryByTransactionId(String transactionId){
        checkNotNullAndEmpty(transactionId, "transactionId");
        Map<String, String> queryParams = new TreeMap<>();
        put(queryParams, WepayField.TRANSACTION_ID, transactionId);
        return doQueryOrder(queryParams);
    }
332128
public function getData()
    {
        if ($transactionId = $this->httpRequest->query->get('mtid')) {
            $this->setTransactionId($transactionId);
        }

        if ($currency = $this->httpRequest->query->get('currency')) {
            $this->setCurrency($currency);
        }

        if ($amount = $this->httpRequest->query->get('amount')) {
            $this->setAmount($amount);
        }

        if ($subId = $this->httpRequest->query->get('subid')) {
            $this->setSubId($subId);
        }

        $this->validate(
            'username',
            'password',
            'transactionId',
            'currency',
            'amount'
        );

        $document = new \DOMDocument('1.0', 'utf-8');
        $document->formatOutput = false;
        $document->createElement('soapenv:Header');

        $envelope = $document->appendChild(
            $document->createElementNS('http://schemas.xmlsoap.org/soap/envelope/', 'soapenv:Envelope')
        );
        $envelope->setAttribute('xmlns:urn', 'urn:pscservice');

        $body = $envelope->appendChild(
            $document->createElement('soapenv:Body')
        );

        $debit = $body->appendChild(
            $document->createElement('urn:executeDebit')
        );

        $debit->appendChild(
            $document->createElement('urn:username', $this->getUsername())
        );

        $debit->appendChild(
            $document->createElement('urn:password', $this->getPassword())
        );

        $debit->appendChild(
            $document->createElement('urn:mtid', $this->getTransactionId())
        );

        $debit->appendChild(
            $document->createElement('urn:subId', $this->getSubId())
        );

        $debit->appendChild(
            $document->createElement('urn:amount', $this->getAmount())
        );

        $debit->appendChild(
            $document->createElement('urn:currency', $this->getCurrency())
        );

        $debit->appendChild(
            $document->createElement('urn:close', '1')
        );

        return $document->saveXML();
    }
1199447
public function execute($paymentId)
    {
        $url    = $this->environment->getApiUrl() . '1/sales/' . $paymentId . '/' . $this->type;
        $params = [];

        if ($this->amount != null) {
            $params['amount'] = $this->amount;
        }

        if ($this->serviceTaxAmount != null) {
            $params['serviceTaxAmount'] = $this->serviceTaxAmount;
        }

        $url .= '?' . http_build_query($params);

        return $this->sendRequest('PUT', $url);
    }
95210
public function get($paymentId)
    {

        $this->debugData[] = __METHOD__;

        $method = 'GET';
        $uri = $this->config['apiQueryUri'] . \sprintf('/sales/%s', $paymentId);
        $options = [
            'headers' => $this->headers
        ];

        $this->debugData[][__LINE__]['method'] = $method;
        $this->debugData[][__LINE__]['uri'] = $uri;
        $this->debugData[][__LINE__]['options'] = $uri;

        try {

            $response = $this->http()->request($method, $uri, $options);

            $this->debugData[][__LINE__]['response'] = $response;

            $result = \json_decode($response->getBody()->getContents(), true);            

            if ($response->getStatusCode() === HttpStatus::Ok) {
                return $result;
            } elseif ($response->getStatusCode() == HttpStatus::BadRequest) {
                return 'status_codex';
            }

        } catch (\Exception $e) {

            $result = array(
                'code'=>$e->getCode(),
                'message'=>$e->getMessage()
                );

            $this->debugData[][__LINE__]['exception'] = $e->getMessage();

        }

        return $result;
    }
152714
public function execute($paymentId)
    {
        $url = $this->environment->getApiQueryURL() . '1/sales/' . $paymentId;

        return $this->sendRequest('GET', $url);
    }
341994
public function status($transactionId)
    {
        $xml = new DOMDocument();
        $transaction = $xml->createElement('hps:Transaction');
        $status = $xml->createElement('hps:GetTransactionStatus');

        $status->appendChild($xml->createElement('hps:GatewayTxnId', $transactionId));

        $transaction->appendChild($status);
        return $this->_submitTransaction($transaction, 'GetTransactionStatus');
    }
300012
public function verify($transactionRef)
    {
        $transactionData = $this->getTransactionResource()->verify($transactionRef);

        if ($transactionData instanceof \Exception) {
            throw $transactionData;
        }

        if ($transactionData['status'] == TransactionContract::TRANSACTION_STATUS_SUCCESS) {
            return [
                'authorization' => $transactionData['authorization'],
                'customer'      => $transactionData['customer'],
                'amount'        => $transactionData['amount'],
                'plan'          => $transactionData['plan'],
            ];
        }

        return false;
    }
223581
public function getData()
    {
        $this->validate('transactionReference');

        $data = [
            'opcode'     => 1,
            'payment_id' => $this->getTransactionReference(),
            'token'      => $this->getRequestToken(),
        ];

        if ($this->getAmount()) {
            $data['amount'] = $this->getAmount();
        }

        return $data;
    }
824282
public Transaction findByTransactionId(String transactionId) {
        EntityManager entityManager = getEntityManager();
        try {
            return entityManager.createQuery("SELECT t FROM io.motown.operatorapi.viewmodel.persistence.entities.Transaction AS t WHERE t.transactionId = :transactionId", Transaction.class)
                    .setParameter("transactionId", transactionId)
                    .getSingleResult();
        } finally {
            entityManager.close();
        }
    }