@api

@param int $transactionId

@return \Orm\Zed\Payone\Persistence\Base\SpyPaymentPayoneQuery
428593
public function createPaymentByTransactionIdQuery($transactionId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->filterByTransactionId($transactionId);

        return $query;
    }
132593
public function getPdt($transactionID)
    {
        $this->transactionID = $transactionID;
        
        // Now we need to ask PayPal to tell us if it sent this notification
        $pdtResponse = $this->_postData($this->pdtURL, array('cmd' => '_notify-synch', 'tx' => $transactionID, 'at' => $this->pdtToken));
        if ($pdtResponse === FALSE) { // Bail out if we have an error.
            return FALSE;
        }

        // Phew! We have a valid PDT transaction, log it.
        $this->_logTransaction('PDT', 'SUCCESS', 'Parsing complete', $pdtResponse);
        return $pdtResponse;
    }
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');
    }
639567
public function void($transactionId, $clientTransactionId = null)
    {
        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsCreditVoid = $xml->createElement('hps:CreditVoid');
        $hpsCreditVoid->appendChild($xml->createElement('hps:GatewayTxnId', $transactionId));
        $hpsTransaction->appendChild($hpsCreditVoid);

        return $this->_submitTransaction($hpsTransaction, 'CreditVoid', $clientTransactionId);
    }
1361504
public function checkWebPayment($token, $transactionId)
    {
        $requestPayment = new Structure\RequestPaymentDetails($token, $transactionId);

        $this->response = parent::checkWebPayment($this->entity, $requestPayment);

        /**
         * Checks the state of the platform integration.
         */
        if (Exception\IntegrationState::check($this->response->requestState)) {
            throw new Exception\IntegrationState($this->response->requestState);
        }

        if ($this->response->requestState->state == 0) {
            throw new Exception\IntegrationResponse(
                $this->response->requestState->message,
                $this->response->requestState->code
            );
        }

        return $this->response;
    }
158468
protected function createPaymentMethodContainerFromPayment(SpyPaymentPayone $paymentEntity)
    {
        $paymentMethodContainer = new DirectDebitContainer();

        $paymentMethodContainer->setBankCountry($paymentEntity->getSpyPaymentPayoneDetail()->getBankCountry());
        $paymentMethodContainer->setBankAccount($paymentEntity->getSpyPaymentPayoneDetail()->getBankAccount());
        $paymentMethodContainer->setBankCode($paymentEntity->getSpyPaymentPayoneDetail()->getBankCode());
        $paymentMethodContainer->setIban($paymentEntity->getSpyPaymentPayoneDetail()->getIban());
        $paymentMethodContainer->setBic($paymentEntity->getSpyPaymentPayoneDetail()->getBic());

        return $paymentMethodContainer;
    }
1319547
public function delete($paymentId)
    {
        $db = $this->getDb();
        $db->startTransaction();

        $deleteResult = $db->execute('DELETE FROM `oepaypal_orderpayments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));
        $deleteCommentResult = $db->execute('DELETE FROM `oepaypal_orderpaymentcomments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));

        $result = ($deleteResult !== false) || ($deleteCommentResult !== false);

        if ($result) {
            $db->commitTransaction();
        } else {
            $db->rollbackTransaction();
        }

        return $result;
    }
161597
public static function get_last_by_transaction(Transaction $transaction) {
		$db = Database::Get();
		$id = $db->get_one('SELECT id FROM transaction_log WHERE transaction_id=? ORDER BY created DESC LIMIT 1', [ $transaction->id ]);
		if ($id === null) {
			throw new \Exception('No transaction_log yet');
		}

		return self::get_by_id($id);;
	}
953605
public function confirmTransactionById($transactionId, $iConfirmedDate)
    {
        $oTransaction = TdbPkgShopPaymentTransaction::GetNewInstance();
        if (false === $oTransaction->Load($transactionId)) {
            return null;
        }

        return $this->confirmTransactionObject($oTransaction, $iConfirmedDate);
    }
51011
public function getOnPaymentSubmit($storeId = null)
    {
        return $this->getScopeConfig()->getValue(
            self::XML_PATH_TRACK_PAYMENT_SUBMIT,
            ScopeInterface::SCOPE_STORE,
            $storeId
        );
    }
1271312
public function void($transactionId)
    {
        $txnType = 'GiftCardVoid';

        $xml = new DOMDocument();
        $hpsTransaction = $xml->createElement('hps:Transaction');
        $hpsGiftCard = $xml->createElement('hps:'. $txnType);
        $hpsBlock1 = $xml->createElement('hps:Block1');

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

        $hpsGiftCard->appendChild($hpsBlock1);
        $hpsTransaction->appendChild($hpsGiftCard);

        return $this->_submitTransaction($hpsTransaction, $txnType);
    }
1286916
public function getContactsTransactionalDataImportByImportId($importId)
    {
        $url = $this->getApiEndpoint() . self::REST_TRANSACTIONAL_DATA_IMPORT
            . $importId;

        $this->setUrl($url)
            ->setVerb('GET');

        $response = $this->execute();

        if (isset($response->message)) {
            $message = 'GET CONTACTS TRANSACTIONAL DATA IMPORT BY IMPORT ID '
                . $response->message;
            $this->helper->debug('getContactsTransactionalDataImportByImportId', [$message]);
        }

        return $response;
    }
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;
    }
1040610
public function fetch($transaction_id)
    {
        $url = 'transactions/' . $transaction_id;

        $api_response = $this->paylike->client->request('GET', $url);

        return $api_response->json['transaction'];
    }
853056
public function getTerminalUri(string $transactionId): Uri
    {
        $uri = $this->getUri('terminal', ['merchantId' => $this->merchantId, 'transactionId' => $transactionId]);

        return $uri;
    }
1122564
public function getPay($purchaseId)
    {
        $purchase = Purchase::findOrFail($purchaseId);

        if ($purchase->buyer->userId != Auth::user()->userId) {
            return redirect('/inventory/bought')->withErrors([
                "You are not the buyer of this item."
            ]);
        }

        if ($purchase->isPaid()) {
            return redirect('/inventory/bought')->withStatus(
                'You have already successfully paid for this item.'
            );
        }

        return view('mustard::purchase.pay', [
            'purchase' => $purchase,
        ]);
    }
911469
public function findByPaymentDetailsAndTransactionKey($search, $transactionKey)
    {
        $qb = $this->getQueryBuilder()
            ->select('t')
            ->where('t.paymentDetails LIKE :search')
            ->andWhere('t.transactionKey = :transactionKey')
            ->setParameters(array('search' => '%'.$search.'%', 'transactionKey' => $transactionKey));
         
        return $qb->getQuery()
            ->getOneOrNullResult();
    }