Wrapper around getTransaction function that is
meant to be used directly as a client-facing function.
Unlike getTransaction, it will call next with any errors
and send a JSON response to the client on success.

See getTransaction for parameter details
540582
function getTransactionAndRespond(account, identifier, options, callback) {
  getTransaction(
    this,
    account,
    identifier,
    options,
    function(error, transaction) {
      if (error) {
        callback(error);
      } else {
        callback(null, {transaction: transaction});
      }
    }
  );
}
289147
public function getTransactionResult($token)
    {
        $transactionResult = new TransactionResult();
        $transactionResult->tokenInput = $token;

        return $this->callSoapMethod('getTransactionResult', $transactionResult);
    }
80508
public void tx(VoidFunc1<Session> func) throws SQLException {
		try {
			beginTransaction();
			func.call(this);
			commit();
		} catch (Throwable e) {
			quietRollback();
			throw (e instanceof SQLException) ? (SQLException) e : new SQLException(e);
		}
	}
14521
def get_transaction_status(self, transactionId):
        
        params = {}
        params['TransactionId'] = transactionId
    
        response = self.make_request("GetTransactionStatus", params)
        body = response.read()
        if(response.status == 200):
            rs = ResultSet()
            h = handler.XmlHandler(rs, self)
            xml.sax.parseString(body, h)
            return rs
        else:
            raise FPSResponseError(response.status, response.reason, body)
835644
public final Transaction getTransaction()
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "getTransaction"
                            );
        // If the log is full introduce a delay for a checkpoiunt before allowing the 
        // application to proceed.
        objectManagerState.transactionPacing();
        Transaction transaction = objectManagerState.getTransaction();

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "getTransaction"
                       , "returns transaction=" + transaction + "(Transaction)"
                            );
        return transaction;
    }
1354894
public function getTransactionDetail($transaction_id){
        $url = $this->authenticationService->getServerEndPoint() . Endpoints::VERSION . Endpoints::BASE_WALLET . Endpoints::WALLET_TRANSACTION;
        $url = sprintf($url,$transaction_id);
        $result = $this->authenticationService->getTransport()->fetch($url);

        if($result["code"] == APIResponse::RESPONSE_SUCCESS){
            // Wrap it in a array since maskData takes an Array of Array
            $maskWrapper = array($result['results']);
            $this->maskData($maskWrapper);
            return $maskWrapper[0];
        }else{
            return 0;
        }
    }
474421
function (conn, opts) {
            var self = this;
            return this.__setTransactionIsolation(conn, opts).chain(function () {
                return self.__logConnectionExecute(conn, self.beginTransactionSql);
            });
        }
113789
@Override
    public EntityTransaction getTransaction()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "em.getTransaction();\n" + toString());

        return getEMInvocationInfo(false).getTransaction();
    }
856678
public TransactionImpl getCurrentTransaction()
    {
        TransactionImpl tx = tx_table.get(Thread.currentThread());
        if(tx == null)
        {
            throw new TransactionNotInProgressException("Calling method needed transaction, but no transaction found for current thread :-(");
        }
        return tx;
    }
698009
async function () {
    const encodedABI = simpleTokenContractObj.methods.transfer(receiverAddress, bigNumAmount.toString(10)).encodeABI();

    const estimateGasObj = new EstimateGasKlass({
      contract_name: simpleTokenContractName,
      contract_address: oThis.contractAddress,
      chain: 'value',
      sender_address: senderAddress,
      method_name: 'transfer',
      method_arguments: [receiverAddress, bigNumAmount.toString(10)]
    });

    const estimateGasResponse = await estimateGasObj.perform()
      , gasToUse = estimateGasResponse.data.gas_to_use
    ;

    // set txParams for firing event
    const rawTxParams = {
      from: senderAddress, to: receiverAddress, value: bigNumAmount.toString(10),
      gasPrice: VC_GAS_PRICE, gas: gasToUse
    };

    // set params in notification data
    notificationData.message.payload.params.txParams = rawTxParams; // one time

    // set txParams for executing transaction
    const txParams = {
      from: senderAddress,
      to: oThis.contractAddress,
      data: encodedABI,
      gasPrice: VC_GAS_PRICE,
      gas: gasToUse
    };

    // Unlock account and send transaction
    return new Promise(function (onResolve, onReject) {
      const onReceipt = function (receipt) {
        // Publish event
        notificationData.message.kind = 'transaction_mined';
        openSTNotification.publishEvent.perform(notificationData);

        // send response
        if (basicHelper.isReturnTypeTxReceipt(returnType)) {
          return onResolve(responseHelper.successWithData({
            transaction_uuid: txUUID,
            transaction_hash: receipt.transactionHash,
            transaction_receipt: receipt
          }));
        }
      };

      web3Provider.eth.personal.unlockAccount(senderAddress, senderPassphrase)
        .then(function () {
          return web3Provider.eth.sendTransaction(txParams)
            .on('transactionHash', function (transactionHash) {
              // set transaction hash in notification data
              notificationData.message.payload.transaction_hash = transactionHash; // one time
              // Publish event
              notificationData.message.kind = 'transaction_initiated';
              openSTNotification.publishEvent.perform(notificationData);

              // send response
              if (basicHelper.isReturnTypeTxHash(returnType)) {
                return onResolve(responseHelper.successWithData({
                  transaction_uuid: txUUID,
                  transaction_hash: transactionHash,
                  transaction_receipt: {}
                }));
              }
            })
            .on('receipt', onReceipt)
        })
        .catch(async function (reason) {
          logger.error("ST :: Transaction failed.\n\t Reason:", reason);

          const onCatchError = function () {
            // set error data in notification data
            notificationData.message.payload.error_data = reason;
            // Publish event
            notificationData.message.kind = 'transaction_error';
            openSTNotification.publishEvent.perform(notificationData);

            // send response
            let errObj = responseHelper.error({
              internal_error_identifier: 'l_ci_st_transfer_6',
              api_error_identifier: 'transaction_failed',
              error_config: basicHelper.fetchErrorConfig()
            });
            return onResolve(errObj);
          };

          const isNotMinedInSomeBlocksError = reason.message.includes('not mined within');
          if (isNotMinedInSomeBlocksError) {
            // get receipt
            const res = await contractInteractHelper.getTransactionReceiptFromTrasactionHash(
              web3Provider,
              notificationData.message.payload.transaction_hash
            );

            if (res.isSuccess()) {
              onReceipt(res.data.receipt);
            } else {
              onCatchError();
            }
          } else {
            onCatchError();
          }

        });

    });

  }
205472
function getAccountDetail (queryOptions, { accountId, key, writerId }) {
  return sendQuery(
    queryOptions,
    queryHelper.addQuery(
      queryHelper.emptyQuery(),
      'getAccountDetail',
      {
        accountId
      }
    ),
    (resolve, reject, responseName, response) => {
      if (responseName !== 'ACCOUNT_DETAIL_RESPONSE') {
        const error = JSON.stringify(response.toObject().errorResponse)
        return reject(new Error(`Query response error: expected=ACCOUNT_DETAIL_RESPONSE, actual=${responseName}\nReason: ${error}`))
      }

      const transactions = JSON.parse(response.getAccountDetailResponse().toObject().detail)
      resolve(transactions)
    }
  )
}
1362556
function TransactionTask(readOnly, txnCallback, errorCallback, successCallback) {
  this.readOnly = readOnly;
  this.txnCallback = txnCallback;
  this.errorCallback = errorCallback;
  this.successCallback = successCallback;
}
1019259
protected SITransaction getTransaction() {

        if (TRACE.isEntryEnabled()) {
            final String methodName = "getTransaction";
            SibTr.entry(this, TRACE, methodName);
            SibTr.exit(this, TRACE, methodName, null);
        }
        return null;

    }
275491
private <T> void runTransaction(
      final Transaction.Function<T> transactionCallback,
      final SettableApiFuture<T> resultFuture,
      final TransactionOptions options) {
    // span is intentionally not ended here. It will be ended by runTransactionAttempt on success
    // or error.
    Span span = tracer.spanBuilder("CloudFirestore.Transaction").startSpan();
    try (Scope s = tracer.withSpan(span)) {
      runTransactionAttempt(transactionCallback, resultFuture, options, span);
    }
  }
1309114
def _ExecuteTransaction(self, transaction):
    """"""

    def Action(connection):
      connection.cursor.execute("START TRANSACTION")
      for query in transaction:
        connection.cursor.execute(query["query"], query["args"])
      connection.cursor.execute("COMMIT")
      return connection.cursor.fetchall()

    return self._RetryWrapper(Action)
339623
def transactional(func):
    
    @wraps(func)
    def wrapper(*args, **kwargs):
        with transaction():
            return func(*args, **kwargs)
    return wrapper
1020378
public TransactionWrapper getTransactionWrapper(Transaction t) {
    	if (t == null) {
    		return null;
    	}
    	final TransactionWrapperAppData twad = (TransactionWrapperAppData) t.getApplicationData();
    	return twad != null ? twad.getTransactionWrapper(t, this) : null;
	}