Get all transactions where there is a pagseguro transaction code
@return array
@throws \Exception
765024
public function searchTransactions()
    {
        try {
            $connection = $this->getConnection();
            $select = $connection->select()
                ->from( ['order' => 'sales_order'], ['status', 'created_at', 'increment_id', 'store_id', 'entity_id'] )
                ->join( ['ps' => 'pagseguro_orders'], 'order.entity_id = ps.order_id')
                ->where('ps.transaction_code != ?', '')
                ->order('order.created_at DESC');

            if (!is_null($this->_session->getData('store_id'))) {
                $select = $select->where('order.store_id = ?', $this->_session->getData('store_id'));
            }

            if ($this->_scopeConfig->getValue('payment/pagseguro/environment')) {
                $select = $select->where('ps.environment = ?', $this->_scopeConfig->getValue('payment/pagseguro/environment'));
            }

            if (!empty($this->_idMagento)) {
                $select = $select->where('order.increment_id = ?', $this->_idMagento);
            }

            if (!empty($this->_idPagseguro)) {
                $select = $select->where('ps.transaction_code = ?', $this->_idPagseguro);
            }

            if (!empty($this->_status)) {
                $select = $this->getStatusFromPaymentKey($this->_status) == 'partially_refunded'
                    ? $select->where('ps.partially_refunded = ?', 1)
                    : $select->where('order.status = ?', $this->getStatusFromPaymentKey($this->_status));
            }

            if (!empty($this->_dateBegin) && !empty($this->_dateEnd)) {
                $startDate = date('Y-m-d H:i:s', strtotime(str_replace("/", "-", $this->_dateBegin)));
                $endDate = date('Y-m-d'.' 23:59:59', strtotime(str_replace("/", "-", $this->_dateEnd)));
                $select = $select->where('order.created_at >= ?', $startDate)->where('order.created_at <= ?', $endDate);
            }

            $connection->prepare($select);
            return $connection->fetchAll($select);
        } catch (\Exception $exception) {
            throw $exception;
        }
    }
1267509
public function getTransactionReference()
    {
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            return $this->data['id'];
        }
        if (isset($this->data['error']) && isset($this->data['error']['charge'])) {
            return $this->data['error']['charge'];
        }

        return null;
    }
427493
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'              => $this->transformAmount($this->amount, $this->currency),
            'currency'            => $this->currency,
            'customer_account_id' => $this->customer_account_id,
            'return_url'          => $this->return_url,
            'customer_email'      => $this->customer_email,
            'customer_phone'      => $this->customer_phone,
            'billing_address'     => $this->getBillingAddressParamsStructure(),
            'shipping_address'    => $this->getShippingAddressParamsStructure()
        ];
    }
628931
public function getTransactionReference()
    {
        $reference = [];

        foreach (['TxAuthNo', 'VPSTxId'] as $key) {
            $value = $this->getDataItem($key);

            if ($value !== null) {
                $reference[$key] = $value;
            }
        }

        // If there is no auth number or VPS transaction ID, then
        // there is no reference to speak of; return null.

        if (empty($reference)) {
            return;
        }

        // The security key is passed in as a parameter by the application,
        // and not POSTed from the gateway.

        $reference['SecurityKey'] = $this->getSecurityKey();

        $reference['VendorTxCode'] = $this->getTransactionId();

        ksort($reference);

        return json_encode($reference);
    }
606613
public function getPunchCard(): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/stats/punch_card',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()));
    }
518101
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'notification_url'   => $this->notification_url,
            'source_wallet_id'   => $this->source_wallet_id,
            'source_wallet_pwd'  => $this->transformWalletPassword($this->source_wallet_pwd)
        ];
    }
688164
protected TransactionImpl[] getRecoveringTransactions() {
        TransactionImpl[] recoveredTransactions = new TransactionImpl[_recoveringTransactions.size()];
        _recoveringTransactions.toArray(recoveredTransactions);
        return recoveredTransactions;
    }
845657
public function fetchAll(): array
    {
        if (!$this->wasExecuted()) {
            $this->exec();
        }

        return $this->getAdapter()->getStatement()->fetchAll(PDO::FETCH_ASSOC);
    }
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;
    }
876819
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'                => $this->transformAmount($this->amount, $this->currency),
            'currency'              => $this->currency,
            'customer_email'        => $this->customer_email,
            'customer_phone'        => $this->customer_phone,
            'account_name'          => $this->account_name,
            'bank_name'             => $this->bank_name,
            'iban'                  => $this->iban,
            'bic'                   => $this->bic,
            'account_number'        => $this->account_number,
            'bank_code'             => $this->bank_code,
            'branch_code'           => $this->branch_code,
            'account_number_suffix' => $this->account_number_suffix,
            'sort_code'             => $this->sort_code,
            'aba_routing_number'    => $this->aba_routing_number,
            'billing_address'       => $this->getBillingAddressParamsStructure(),
        ];
    }
38761
public function getTransactionsManager() {
		if ($this->_transactionsManager === null) {
			if ($this->hasLocator()) {
				$locator = $this->getLocator();

				if ($locator->has(self::PHSRV_TRANSACTIONS)) {
					$this->_transactionsManager = $locator->get(self::PHSRV_TRANSACTIONS);
				}
			}
			
			if ($this->_transactionsManager === null) {
				$this->_transactionsManager = new TransactionsManager($this->getTableModelDi());
			}
			
			$this->_transactionsManager->setDbService($this->getAdapterName());
		}
		
		return $this->_transactionsManager;
	}
1343624
public function request()
    {
        //load payments by date
        $this->getPagSeguroAbandoned();

        if ($this->_PagSeguroPaymentList->getTransactions()) {
            foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
                date_default_timezone_set('UTC');
                $order = \UOL\PagSeguro\Helper\Data::getReferenceDecryptOrderID($payment->getReference());
                $order = $this->_order->load($order);
                if ($this->getStoreReference() == \UOL\PagSeguro\Helper\Data::getReferenceDecrypt(
                        $payment->getReference())
                ) {
                    if (!is_null($this->_session->getData('store_id'))) {
                        array_push($this->_arrayPayments, $this->build($payment, $order));
                    }
                    if ($order) {
                        array_push($this->_arrayPayments, $this->build($payment, $order));
                    }
                }
            }
        }
        date_default_timezone_set($this->_timezone->getConfigTimezone());

        return $this->_arrayPayments;
    }
652154
public function getAggregations()
    {
        $aggregations = [];

        foreach (parent::getAggregations() as $key => $aggregation) {
            $aggregations[$key] = $this->getAggregation($key);
        }

        return $aggregations;
    }
954444
public function getStorableData()
    {
        return [
            'id' => 'Transaction',
            'flat' => [
                'Total' => \Heystack\Ecommerce\convertMoneyToString($this->total),
                'Status' => $this->status,
                'Currency' => $this->currencyService->getActiveCurrencyCode()
            ],
            'related' => []
        ];

    }
801441
public function extend() 
    {
        return [
            "amount"    => $this->amount()->toMicro(),
            "recipient" => $this->recipient()->address()->toClean(),
            "message"   => $this->message()->toDTO(),
            // transaction type specialization
            "type"      => TransactionType::TRANSFER,
        ];
    }
177094
protected function getPaymentTransactionStructure()
    {
        return [
            'usage'              => $this->usage,
            'remote_ip'          => $this->remote_ip,
            'return_success_url' => $this->return_success_url,
            'return_failure_url' => $this->return_failure_url,
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'consumer_reference' => $this->consumer_reference,
            'customer_email'     => $this->customer_email,
            'iban'               => $this->iban,
            'bic'                => $this->bic,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
1272587
public function getCommitables()
    {
        $data = array();

        foreach ($this->_entities as $entity) {
            if ($entity->getEntityState() & AnDomain::STATE_COMMITABLE) {
                $data[] = $entity;
            }
        }

        return $data;
    }