@param $transactionId
@param $type

@return bool
@throws \Doctrine\ORM\NonUniqueResultException
162972
public function isDonateAlreadyAdded($transactionId, $type)
    {
        if (!$transactionId) {
            return false;
        }

        $query = $this->createQueryBuilder('p')
            ->select('p')
            ->where('p.transactionId = :transactionId')
            ->setParameter('transactionId', $transactionId)
            ->andWhere('p.type = :type')
            ->setParameter('type', $type)
            ->andWhere('p.success = :success')
            ->setParameter('success', Entity::STATUS_SUCCESS)
            ->setMaxResults(1)
            ->getQuery();

        return (bool)$query->getOneOrNullResult($query::HYDRATE_SIMPLEOBJECT);
    }
1069248
@Programmatic
    public List<PublishedEvent> findByTransactionId(final UUID transactionId) {
        return repositoryService.allMatches(
                new QueryDefault<>(PublishedEvent.class,
                        "findByTransactionId", 
                        "transactionId", transactionId));
    }
990336
public function cancelTransaction($transactionCode)
    {
        return $this->sendTransaction([
            'email'           => $this->email,
            'token'           => $this->token,
            'transactionCode' => $transactionCode,
        ], $this->url['cancelTransaction']);
    }
1204668
public WePayOrder queryByTransactionId(String transactionId){
        checkNotNullAndEmpty(transactionId, "transactionId");
        Map<String, String> queryParams = new TreeMap<>();
        put(queryParams, WepayField.TRANSACTION_ID, transactionId);
        return doQueryOrder(queryParams);
    }
318199
public function execute(TransactionData $transactionData, $argument = null)
    {
        $transactionData->setResponse(
            $this->processAndGetResponse(
                $transactionData,
                function (TransactionData $transaction, Expectation $expectation) {
                    $this->validateRequestOrThrowException($expectation, $this->logger);
                    $executions = $this->searchForExecutionsCount($expectation);
                    $this->logger->debug('Listed ' . \count($executions) . ' request matching the expectation');

                    return $transaction->getResponse()
                        ->withStatus(200)
                        ->withHeader('Content-Type', 'application/json')
                        ->withBody(new StringStream(json_encode($executions)));
                }
            )
        );
    }
510408
private function setTransaction(TransactionInterface $transaction) {
        $transactions = $this->getTransactions();
        $transactions[$this->getDbService()] = $transaction;
        $this->setTransactions($transactions);
    }
453664
public function execute(TransactionData $transactionData, $argument = null)
    {
        $this->requestsStorage->addRequest($transactionData->getRequest());
    }
877597
public static function canRefund($type)
    {
        $transactionTypesList = [
            self::CAPTURE,
            self::CASHU,
            self::INIT_RECURRING_SALE,
            self::INIT_RECURRING_SALE_3D,
            self::INPAY,
            self::P24,
            self::PAYPAL_EXPRESS,
            self::PPRO,
            self::SALE,
            self::SALE_3D,
            self::SOFORT,
            self::TRUSTLY_SALE,
            self::FASHIONCHEQUE,
            self::KLARNA_CAPTURE,
            self::ZIMPLER,
            self::ENTERCASH,
            self::INSTANT_TRANSFER,
            self::PAYU,
            self::BITPAY_SALE,
            self::NEOSURF,
            self::SAFETYPAY
        ];

        return in_array(strtolower($type), $transactionTypesList);
    }
569007
public function loadByTransactionId($transactionId)
    {
        $db = $this->getDb();
        $data = $db->getRow('SELECT * FROM `oepaypal_orderpayments` WHERE `oepaypal_transactionid` = ' . $db->quote($transactionId));

        return $data;
    }
1136800
public static function canCapture($type)
    {
        $transactionTypesList = [
            self::AUTHORIZE,
            self::AUTHORIZE_3D,
            self::KLARNA_AUTHORIZE
        ];

        return in_array(strtolower($type), $transactionTypesList);
    }
293958
public static function isRefund($type)
    {
        $transactionTypesList = [
            self::REFUND,
            self::SDD_REFUND,
            self::KLARNA_REFUND,
            self::BITPAY_REFUND
        ];

        return in_array(strtolower($type), $transactionTypesList);
    }
564196
public static function get($transactionId)
    {
        $api = new Api\Info();
        $api->setTransactionId($transactionId);
        $result = $api->doRequest();

        $result['transactionId'] = $transactionId;

        return new Result\Transaction($result);
    }
428593
public function createPaymentByTransactionIdQuery($transactionId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->filterByTransactionId($transactionId);

        return $query;
    }
1348641
public function processTransaction(array $transactionData, string $operation): ProcessInterface
    {
        // When hitting the process endpoint, we only need the transactionId and operation key/value pairs, and
        // optionally the transactionAmount if we are capturing a portion of the total amount.
        $transactionData = array_filter($transactionData + ['operation' => $operation], function ($k) {
            return in_array($k, ['transactionId', 'operation', 'transactionAmount']);
        }, ARRAY_FILTER_USE_KEY);

        $uri = $this->getUri('process', $this->getParameters($transactionData));
        /** @var ProcessInterface $response */
        $response = $this->performRequest((string) $uri);

        Assert::isInstanceOf($response, ProcessInterface::class, 'Invalid response');

        return $response;
    }
79389
public static void putTransactionId(final String transactionId) {
		if ((transactionId != null) && (0 < transactionId.length())) {
			MDC.put(TRANSACTION_ID, transactionId);
		}
	}
499026
public function execute(TransactionData $transactionData, $argument = null)
    {
        $list = json_encode($this->storage->listExpectations());

        $transactionData->setResponse(
            $transactionData->getResponse()
            ->withBody(new StringStream($list))
            ->withHeader('Content-type', 'application/json')
        );
    }
1372847
public function createChild(Transaction\TransactionType $type, $amount = null)
    {
        $child = new Transaction($this);
        $child->setType($type);
        $child->setAmount($amount ?: $this->amount);
        $this->children->add($child);

        return $child;
    }