http://wiki.usaepay.com/developer/soap-1.4/objects/transactionrequestobject
510950
def transaction_request_object(amount, creditcard, gateway_options)
     {  'AccountHolder' => creditcard.name,
        'ClientIP' => gateway_options[:ip],
        'Details' => transaction_details(amount, creditcard, gateway_options),
        'BillingAddress' => address_hash(creditcard, gateway_options, :billing_address),
        'ShippingAddress' => address_hash(creditcard, gateway_options, :shipping_address),
        'CreditCardData' => {
          'CardNumber' => creditcard.number,
          'CardExpiration' => expiration_date(creditcard),
          'AvsStreet' => gateway_options[:billing_address][:address1],
          'AvsZip' => gateway_options[:billing_address][:zip],
          'CardCode' => creditcard.verification_value } }
    end
1347776
@Override
    @Deprecated
    public Transaction<Type> getTxn(UUID txId) {
        StreamSegments segments = getAndHandleExceptions(
                controller.getCurrentSegments(stream.getScope(), stream.getStreamName()), RuntimeException::new);
        Status status = getAndHandleExceptions(controller.checkTransactionStatus(stream, txId), RuntimeException::new);
        if (status != Status.OPEN) {
            return new TransactionImpl<>(txId, controller, stream);
        }
        
        Map<Segment, SegmentTransaction<Type>> transactions = new HashMap<>();
        for (Segment s : segments.getSegments()) {
            SegmentOutputStream out = outputStreamFactory.createOutputStreamForTransaction(s, txId, config, segments.getDelegationToken());
            SegmentTransactionImpl<Type> impl = new SegmentTransactionImpl<>(txId, out, serializer);
            transactions.put(s, impl);
        }
        return new TransactionImpl<Type>(txId, transactions, segments, controller, stream, pinger);
        
    }
304875
def transaction_from_context(context)
      classname = (context["wrapped"] || context["class"] ||
                    (context[:job] && (context[:job]["wrapped"] || context[:job]["class"]))
                  )
      if classname
        "Sidekiq/#{classname}"
      elsif context[:event]
        "Sidekiq/#{context[:event]}"
      else
        "Sidekiq"
      end
    end
101073
function getTransactionString(transaction) {
    var result = [];
    for (var key in transaction) {
        if (transaction[key] == null) {
            continue;
        }
        var value = bytes_1.hexlify(transaction[key]);
        if ({ gasLimit: true, gasPrice: true, nonce: true, value: true }[key]) {
            value = bytes_1.hexStripZeros(value);
        }
        result.push(key + '=' + value);
    }
    return result.join('&');
}
693606
private function buildCommitRequest()
    {
        $obj_request = (object)['mutations' => []];

        // Transaction at root level, so do not use applyTransaction()
        if(null !== $this->str_next_transaction) {
            $obj_request->transaction = $this->str_next_transaction;
            $obj_request->mode = self::MODE_TRANSACTIONAL;
            $this->str_next_transaction = null;
        } else {
            $obj_request->mode = self::MODE_NON_TRANSACTIONAL;
        }
        return $obj_request;
    }
704865
def query_transaction_by_filter(filter)
      index_of_value = filter.calculate_index_of_value
      if index_of_value.nil?
        return make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end

      case index_of_value
      when Enums::TransactionFilter::TRANSACTION_ID_INDEX
        query_transaction_by_id(filter.transaction_id.to_s)
      when Enums::TransactionFilter::ACCESS_CODE_INDEX
        query_transaction_by_access_code(filter.access_code)
      when Enums::TransactionFilter::INVOICE_NUMBER_INDEX
        query_transaction_with_path(filter.invoice_number, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_NUM_METHOD)
      when Enums::TransactionFilter::INVOICE_REFERENCE_INDEX
        query_transaction_with_path(filter.invoice_reference, Constants::TRANSACTION_METHOD + '/' + Constants::TRANSACTION_QUERY_WITH_INVOICE_REF_METHOD)
      else
        make_response_with_exception(Exceptions::APIKeyInvalidException.new('Invalid transaction filter'), QueryTransactionResponse)
      end
    end
93723
public function transactionsAction(Request $request)
    {
        $dataArray = [
            'html'    => '',
            'success' => 0,
        ];

        $filters = null;
        // filters means the transaction table had a column sort or filter submission or pagination, otherwise its a fresh page load
        if ($request->request->has('filters')) {
            foreach ($request->request->get('filters') as $filter) {
                if (in_array($filter['name'], ['dateTo', 'dateFrom']) && !empty($filter['value'])) {
                    $filter['value']        = new \DateTime($filter['value']);
                    list($hour, $min, $sec) = 'dateTo' == $filter['name'] ? [23, 59, 59] : [00, 00, 00];
                    $filter['value']->setTime($hour, $min, $sec);
                }
                if (!empty($filter['value'])) {
                    $filters[$filter['name']] = $filter['value'];
                }
            }
        }
        $page     = isset($filters['page']) && !empty($filters['page']) ? $filters['page'] : 1;
        $objectId = InputHelper::clean($request->request->get('objectId'));
        if (empty($objectId)) {
            return $this->sendJsonResponse($dataArray);
        }

        $contactClient = $this->checkContactClientAccess($objectId, 'view');
        if ($contactClient instanceof Response) {
            return $this->sendJsonResponse($dataArray);
        }

        $order = [
            'date_added',
            'DESC',
        ];

        if (isset($filters['orderby']) && !empty($filters['orderby'])) {
            $order[0] = $filters['orderby'];
        }
        if (isset($filters['orderbydir']) && !empty($filters['orderbydir'])) {
            $order[1] = $filters['orderbydir'];
        }

        $transactions = $this->getEngagements($contactClient, $filters, $order, $page);

        $dataArray['html']    = $this->renderView(
            'MauticContactClientBundle:Transactions:list.html.php',
            [
                'page'          => $page,
                'contactClient' => $contactClient,
                'transactions'  => $transactions,
                'order'         => $order,
            ]
        );
        $dataArray['success'] = 1;
        $dataArray['total']   = $transactions['total'];

        return $this->sendJsonResponse($dataArray);
    }
1333189
protected void ack(TransactionAttempt tx, DrpcRequestInfo requestInfo)
    {
        if (logger.isDebugEnabled() == true)
        {
            String logFormat = "Transaction succeeded. TransactionAttempt={0}, DrpcRequestInfo={1}";
            logger.debug(MessageFormat.format(logFormat, tx, requestInfo));
        }

        try
        {
            this.fetchHelper.ack(requestInfo.getRequestId(), "Succeeded");
        }
        catch (TException ex)
        {
            String logFormat = "Success notify failed. TransactionAttempt={0}, DrpcRequestInfo={1}";
            logger.warn(MessageFormat.format(logFormat, tx, requestInfo));
        }
    }
982904
def create_request
      raise AttributeMissing.new "(2500) TransactionReference or OrderReference need to be present." if (transaction_reference.nil? && order_reference.nil?)
      raise AttributeMissing.new "(2500) SiteReference must be present." if (site_reference.nil? && (REXML::XPath.first(@request_xml, "//SiteReference").text.blank? rescue true))
      REXML::XPath.first(@request_xml, "//Request").attributes["Type"] = "TRANSACTIONQUERY"
      ops = REXML::XPath.first(@request_xml, "//Operation")
      ["TermUrl", "MerchantName", "Currency", "SettlementDay"].each { |e| ops.delete_element e }
      (ops.elements["SiteReference"] || ops.add_element("SiteReference")).text = self.site_reference if self.site_reference
      (ops.elements["TransactionReference"] || ops.add_element("TransactionReference")).text = self.transaction_reference if self.transaction_reference
      order = REXML::XPath.first(@request_xml, "//Operation")
      (order.elements["OrderReference"] || order.add_element("OrderReference")).text = self.order_reference if self.order_reference
      root = @request_xml.root
      (root.elements["Certificate"] || root.add_element("Certificate")).text = self.site_alias if self.site_alias
    end
993542
protected static function deleteTransactionByIdAsyncWithHttpInfo($transaction_id) 
    {
        $returnType = '';  
        $request = self::deleteTransactionByIdRequest($transaction_id); 

        return self::getHttpClient()
            ->sendAsync($request, self::createHttpClientOption())
            ->then(
                function ($response) use ($returnType) {
                    return [null, $response->getStatusCode(), $response->getHeaders()];
                },
                function ($exception) {
                    $response = $exception->getResponse();
                    $statusCode = $response->getStatusCode();
                    throw new ApiException(
                        sprintf(
                            '[%d] Error connecting to the API (%s)',
                            $statusCode,
                            $exception->getRequest()->getUri()
                        ),
                        $statusCode,
                        $response->getHeaders(),
                        $response->getBody()
                    );
                }
            );
    }
585070
def _handle_post(self, transaction):
        
        path = str("/" + transaction.request.uri_path)
        transaction.response = Response()
        transaction.response.destination = transaction.request.source
        transaction.response.token = transaction.request.token

        # Create request
        transaction = self._server.resourceLayer.create_resource(path, transaction)
        return transaction
653873
def transaction(self, collections, action, waitForSync = False, lockTimeout = None, params = None) :
        """"""
        payload = {
                "collections": collections,
                "action": action,
                "waitForSync": waitForSync}
        if lockTimeout is not None:
                payload["lockTimeout"] = lockTimeout
        if params is not None:
            payload["params"] = params

        self.connection.reportStart(action)

        r = self.connection.session.post(self.transactionURL, data = json.dumps(payload, default=str))

        self.connection.reportItem()

        data = r.json()

        if (r.status_code == 200 or r.status_code == 201 or r.status_code == 202) and not data.get("error") :
            return data
        else :
            raise TransactionError(data["errorMessage"], action, data)
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)
169694
def get_transaction(self, account_id, transaction_id, **params):
        """"""
        response = self._get(
            'v2', 'accounts', account_id, 'transactions', transaction_id, params=params)
        return self._make_api_object(response, Transaction)
684942
async def request(self, request, addr, integrity_key=None, retransmissions=None):
        
        assert request.transaction_id not in self.transactions

        if integrity_key is not None:
            request.add_message_integrity(integrity_key)
            request.add_fingerprint()

        transaction = stun.Transaction(request, addr, self, retransmissions=retransmissions)
        transaction.integrity_key = integrity_key
        self.transactions[request.transaction_id] = transaction
        try:
            return await transaction.run()
        finally:
            del self.transactions[request.transaction_id]
777334
def transactions(self, time=TransRange.HOUR, base="btc", quote="usd"):
        
        params = {'time': time}
        url = self._construct_url("transactions/", base, quote)
        return self._get(url, params=params, return_json=True, version=2)
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;
    }