@param $transactionType

@return string
779533
public static function transactionTypeToServiceName($transactionType)
    {
        switch ($transactionType) {
            case HpsTransactionType::AUTHORIZE:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_AUTH;
                break;
            case HpsTransactionType::CAPTURE:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_ADD_TO_BATCH;
                break;
            case HpsTransactionType::CHARGE:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_SALE;
                break;
            case HpsTransactionType::REFUND:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_RETURN;
                break;
            case HpsTransactionType::REVERSE:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_REVERSAL;
                break;
            case HpsTransactionType::VERIFY:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_ACCOUNT_VERIFY;
                break;
            case HpsTransactionType::LIST_TRANSACTION:
                return HpsItemChoiceTypePosResponseVer10Transaction::REPORT_ACTIVITY;
                break;
            case HpsTransactionType::GET:
                return HpsItemChoiceTypePosResponseVer10Transaction::REPORT_TXN_DETAIL;
                break;
            case HpsTransactionType::VOID:
                return HpsItemChoiceTypePosResponseVer10Transaction::CREDIT_VOID;
                break;
            case HpsTransactionType::BATCH_CLOSE:
                return HpsItemChoiceTypePosResponseVer10Transaction::BATCH_CLOSE;
                break;
            case HpsTransactionType::SECURITY_ERROR:
                return "SecurityError";
                break;
            default:
                return "";
        }
    }
43357
public function getAccountType()
    {
        if (isset($this->data->transactionResponse[0]->accountType)) {
            return (string)$this->data->transactionResponse[0]->accountType;
        } else {
            return '';
        }
    }
996465
public static function getInstance($type)
    {
        self::checkType($type);

        if (!isset(self::$instances[$type])) {
            self::$instances[$type] = new \Tx_Oelib_Session($type);
        }

        return self::$instances[$type];
    }
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');
    }
428593
public function createPaymentByTransactionIdQuery($transactionId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->filterByTransactionId($transactionId);

        return $query;
    }
985693
public function showOrder($transaction_id)
    {
        $response = $this->client->get('transactions/orders/' . $transaction_id);
        return json_decode($response->getBody())->order;
    }
1165543
public function refundTransaction($transaction, $amount = 0.00)
    {
        $this->setRequestData([
            'TRANSACTIONID' => $transaction,
        ]);

        if ($amount > 0) {
            $this->post = $this->post->merge([
                'REFUNDTYPE' => 'Partial',
                'AMT'        => $amount,
            ]);
        }

        return $this->doPayPalRequest('RefundTransaction');
    }
416138
protected function camelCaseFlowPackageType($flowPackageType)
    {
        $packageTypeParts = explode('-', $flowPackageType);
        $packageTypeParts = array_map('ucfirst', $packageTypeParts);
        return implode('', $packageTypeParts);
    }
1095557
public function handleVersionTwo(Transaction $transaction): Transaction
    {
        $transaction->id = Hash::sha256($transaction->serialize())->getHex();

        return $transaction;
    }
108786
protected function getCommand(Transaction $transaction)
    {
        switch ($transaction->getType()->getValue()) {
            case Transaction\TransactionType::SALE:
                return 'ECheck.ProcessPayment';

            case Transaction\TransactionType::AUTH:
                return 'ECheck.Authorize';

            case Transaction\TransactionType::CAPTURE:
                return 'ECheck.Capture';

            case Transaction\TransactionType::REFUND:
                return 'ECheck.Refund';

            case Transaction\TransactionType::VOID:
                return 'ECheck.Void';

            case Transaction\TransactionType::QUERY:
                return 'ECheckReports.StatusTrackingQuery';

            case Transaction\TransactionType::UPDATE:
                return 'ECheck.Update';
        }
    }
1040610
public function fetch($transaction_id)
    {
        $url = 'transactions/' . $transaction_id;

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

        return $api_response->json['transaction'];
    }
346755
public function transaction($txhash) {
        $response = $this->dataClient->get($this->converter->getUrlForTransaction($txhash));
        $res = $this->converter->convertTx($response->body(), null);

        if ($this->converter instanceof BtccomConverter) {
            $res['raw'] = \json_decode($this->dataClient->get("tx/{$txhash}/raw")->body(), true)['data'];
        }

        return $res;
    }
83908
public static function fromDict($rsp, $txnType, $returnType = 'HpsTransactionStatus')
    {
        $statusResponse = $rsp->Transaction->$txnType;

        $status = parent::fromDict($rsp, $txnType, $returnType);
        $status->authorizationCode = (isset($statusResponse->TransactionStatus->AuthCode) ? (string)$statusResponse->TransactionStatus->AuthCode : null);
        $status->originalGatewayResponseCode = (isset($statusResponse->TransactionStatus->GatewayRspCode) ? (string)$statusResponse->TransactionStatus->GatewayRspCode : null);
        $status->originalGatewayResponseText = (isset($statusResponse->TransactionStatus->GatewayRspMsg) ? (string)$statusResponse->TransactionStatus->GatewayRspMsg : null);
        $status->originalResponseCode = (isset($statusResponse->TransactionStatus->RspCode) ? (string)$statusResponse->TransactionStatus->RspCode : null);
        $status->originalResponseText = (isset($statusResponse->TransactionStatus->RspText) ? (string)$statusResponse->TransactionStatus->RspText : null);
        $status->transactionStatus = (isset($statusResponse->TransactionStatus->TxnStatus) ? (string)$statusResponse->TransactionStatus->TxnStatus : null);
        $status->originalTransactionId = (isset($statusResponse->TransactionStatus->GatewayTxnId) ? (string)$statusResponse->TransactionStatus->GatewayTxnId : null);
        $status->altPayment = (isset($statusResponse->TransactionStatus->AltPayment) ? $statusResponse->TransactionStatus->AltPayment : null);
        $status->timezoneConversion = (isset($statusResponse->TzConversion) ? (string)$statusResponse->TzConversion : null);

        return $status;
    }
1128167
public function getTransaction($transactionId): QueryInterface
    {
        $uri = $this->getUri('query', $this->getParameters(['transactionId' => $transactionId]));
        /** @var QueryInterface $response */
        $response = $this->performRequest((string) $uri);

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

        return $response;
    }
1192257
public static function isValidTransactionType($type)
    {
        $transactionTypes = \Genesis\Utils\Common::getClassConstants(__CLASS__);

        return in_array(strtolower($type), $transactionTypes);
    }
794323
public function transactionData($params)
    {
        Util::verifyKeys(
                self::$_transactionSignature,
                $params
                );
        $params["kind"] = TransparentRedirect::CREATE_TRANSACTION;
        $transactionType = isset($params['transaction']['type']) ?
            $params['transaction']['type'] :
            null;
        if ($transactionType != Transaction::SALE && $transactionType != Transaction::CREDIT) {
           throw new InvalidArgumentException(
                   'expected transaction[type] of sale or credit, was: ' .
                   $transactionType
                   );
        }

        return $this->_data($params);
    }
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);
    }