Function startTransaction

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 11/9/18 15:50

@param string $transactionId

@return $this
160767
public function startTransaction($transactionId = '')
    {
        $this->logger->debug(__FUNCTION__, 'Input Transaction ID: ' . json_encode($transactionId));
        if (empty($transactionId)) {
            $transactionId = date('YmdHis') . rand(100000, 999999);
        }
        $this->transactionId = $transactionId;
        $this->logger->debug(__FUNCTION__, 'Output Transaction ID: ' . json_encode($this->transactionId));

        return $this;
    }
886792
public function beginTransaction() {
		$this->connect();
		
		if ($this->txStatus == self::TX_NOT_STARTED) {
			$this->txStatus = self::TX_STARTED;
			$this->txCounter = 1;
			return $this->driver->begin();
		}
		
		$this->txCounter++;
		return false;
	}
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);
    }
1095711
public function commitTransaction()
    {
        if (!self::$transaction) {
            throw new TransactionException("There is no Active Transaction");
        }

        self::$transaction = false;
        foreach (self::$connectionList as $dbDriver) {
            $dbDriver->commitTransaction();
        }
    }
679549
public function beginTransaction($transactionOptions, array $options = [])
    {
        $res = $this->connection->beginTransaction([
            'projectId' => $this->projectId,
            'transactionOptions' => $transactionOptions
        ] + $options);

        return $res['transaction'];
    }
1071248
public function setTransactionid($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->transactionid !== $v) {
            $this->transactionid = $v;
            $this->modifiedColumns[GamecurrencyTableMap::COL_TRANSACTIONID] = true;
        }

        return $this;
    }
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');
    }
768919
public function details($transactionId)
    {
        $transactionData = $this->getTransactionResource()->get($transactionId);

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

        return TransactionObject::make($transactionData);
    }
428593
public function createPaymentByTransactionIdQuery($transactionId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->filterByTransactionId($transactionId);

        return $query;
    }
427322
public function start( $autoCommit = 1 )
	{
		$this->openTransactions ++;
		if( $this->openTransactions == 1 )
		{
			if( $autoCommit )
			{
				$query = "SET AUTOCOMMIT=0";
			}
			$this->Execute( $query );
			$query = "START TRANSACTION";
			$this->Execute ($query);
		}
	}
1201257
public Transaction beginTransaction() {
        Transaction txn = new Transaction(rollbackSupported);
        LOG.debug("Starting transaction: {}", txn);
        return txn;
    }
1158535
protected function begin_transaction() {
        if (!$this->transactions_supported()) {
            return;
        }

        $sql = "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED";
        $this->query_start($sql, NULL, SQL_QUERY_AUX);
        $result = $this->mysqli->query($sql);
        $this->query_end($result);

        $sql = "START TRANSACTION";
        $this->query_start($sql, NULL, SQL_QUERY_AUX);
        $result = $this->mysqli->query($sql);
        $this->query_end($result);
    }
760693
public function begin($savepoint = null){
		$this->connection->getDriver()->beginTransaction($savepoint);
		$this->notifyObservers(ObserverInterface::BEGIN);
		return $this;
	}
1063395
public function beginTransaction()
	{
		++$this->transactions;

		if ( $this->transactions == 1 )
		{
			try
			{
				$this->getPdo()->beginTransaction();
			}
			catch ( Exception $e )
			{
				--$this->transactions;

				throw $e;
			}
		}
		elseif ( $this->transactions > 1 && $this->queryGrammar->supportsSavepoints() )
		{
			$this->getPdo()->exec( $this->queryGrammar->compileSavepoint( 'trans' . $this->transactions ) );
		}

		$this->fireConnectionEvent( 'beganTransaction' );
	}
386994
public function beginTransaction() {
        // check if a transaction is already active
        if ($this->getConnection()->inTransaction())
            throw new \Exception("Already inside a DB transaction. You need to commit it before beginning a new one.");

        try {
            // No need to check for the connection again
            $this->getConnection(false)->beginTransaction();
        } catch (Exception $_e) {
            throw new \Exception("Error while beginning DB transaction: ".$pe->getMessage());
        }
    }
851165
function begin() {
		$this->dbh or $this->setup();

		if ($this->savepoint == 0) {
			\mysqli_autocommit($this->dbh, false);
			\mysqli_begin_transaction($this->dbh);
		}
		else { // already in a transaction
			\mysqli_query($this->dbh, 'SAVEPOINT save'.$this->savepoint);
		}

		$this->savepoint++;
		return $this;
	}
89928
protected function setTransactionId(Payment $payment, $transactionId) {
        $payment->setTransactionId($transactionId);
        $payment->setLastTransId($transactionId);
        $payment->setCcTransId($transactionId);
    }