Obtains a payment by its ID.

@param {String} id - The payment ID.
@param {Function} callback - The callback method.
176484
function getPaymentById(id, callback) {
    var client = new this.clients.Payments();
    client.getById(id, callback);
  }
1251610
function(id, callback) {
        var self = this;

        var requestOptions = {
            uri: '/images/' + id
        };

        self.authorizedRequest(requestOptions, function(err, res, body) {
            if (err || !body.image) {
                callback(err);
                return;
            }

            callback(err, new rackspace.Image(self, body.image));
        });
    }
484322
public function extend($id, callable $callback)
    {
        if (is_callable($callback) || method_exists($callback, '__invoke')) {
            $this->callables[$id] = $callback;
        }
    }
1240456
function (id, callback) {
    var idIsArr = Array.isArray(id);

    if (!id || (idIsArr && id.length === 0)) {
      return _handleErr('Id required for id API call', callback);
    }

    // If an array of Id's was passed, generate a comma delimited string for
    // the query string.
    if (idIsArr) {
      id = id.join();
    }

    return this._request({
      api: 'gifs',
      query: {
        ids: id
      }
    }, callback);
  }
1149780
function list(callback, limit, offset) {
  if(!util.isFunction(callback)) {
    throw new Error('callback must be a function');
  }

  var resource = this.coinjar.merchant.api_endpoint + '/v1/orders.json',
    order_url = this.coinjar.merchant.orders_endpoint + '/',
    query = {};

  if(limit) { query.limit = limit; }
  if(offset) { query.offset = offset; }

  request.get(resource)
    .auth(this.coinjar.merchant.uuid, this.coinjar.merchant.secret)
    .query(query)
    .end(function (response) {
      if(isResponseError(response, callback)) { return; }
      // build the payment page url for each order object
      var i = response.body.orders.length;
      while (i--) {
        response.body.orders[i].payment_page_url = order_url + response.body.orders[i].uuid;
      }
      return callback(null, response.body.orders);
    });
}
856105
def retrieve(payment_id):
        
        http_client = HttpClient()
        response, __ = http_client.get(routes.url(routes.PAYMENT_RESOURCE, resource_id=payment_id))
        return resources.Payment(**response)
757111
function (param, callbackId) {
    if (typeof param === 'string') {
      try {
        param = JSON.parse(param)
      }
      catch (e) {
        return
      }
    }
    if (typeof param !== 'object' || !param.url) {
      return console.error(
        '[h5-render] invalid config or invalid config.url for sendHttp API')
    }

    const sender = this.sender
    const method = param.method || 'GET'
    const xhr = new XMLHttpRequest()
    xhr.open(method, param.url, true)
    xhr.onload = function () {
      sender.performCallback(callbackId, this.responseText)
    }
    xhr.onerror = function (error) {
      return console.error('[h5-render] unexpected error in sendHttp API', error)
      // sender.performCallback(
      //   callbackId,
      //   new Error('unexpected error in sendHttp API')
      // )
    }
    xhr.send()
  }
1098700
function(id, callback) {
        /**
         * Callback for QB.content.delete(id, callback)
         * @callback deleteFileCallback
         * @param {object} error - The error object
         * @param {object} response - Boolean
         */
        this.service.ajax({url: Utils.getUrl(config.urls.blobs, id), type: 'DELETE', dataType: 'text'}, function(err, result) {
            if (err) {
                callback(err, null);
            } else {
                callback(null, true);
            }
        });
    }
815422
public function extend($id, callable $callback)
    {
        if (!$this->has($id)) {
            throw new Exception\NotFoundException;
        }
        $oldCallback = $this->callbacks[$id];
        $this->callbacks[$id] = function () use ($oldCallback, $callback, $id) {
            if (!$this->isReady($id)) {
                $thisFunction = $this->callbacks[$id];
                $this->callbacks[$id] = $oldCallback;
                $this->instantiate($id);
                $this->callbacks[$id] = $thisFunction;
            }
            $instance = $this->instances[$id];
            $newInstance = call_user_func($callback, $instance, $this);
            return $newInstance ?: $instance;
        };
        if ($this->isReady($id)) {
            $instance = $this->instances[$id];
            $newInstance = call_user_func($callback, $instance, $this);
            $this->instances[$id] = $newInstance ?: $instance;
        }
        return $this;
    }
60143
def _handle_callback(self, data):
        """"""

        cb_id = data.get("id")
        args = data.get("args")
        event = self.__callbacks.pop(cb_id, None)
        if not event:
            return
        if not args:
            event.put(args)
            return
        err, info = args
        if err is None:
            event.put(info)
        else:
            LOGGER.warning("Callback returned error of %s", str(err))
            event.put(err)
275576
def find(id)
      response = JSON.parse(@client.get("fees/#{id}").body)
      Promisepay::Fee.new(@client, response['fees'])
    end
1120000
function(id) {
        var q = queues[id];
        q.finished = true;

        if (q.aborted) {
            var msg = "transaction " + id + " was aborted";
            _fail(id, msg);
            return;
        }

        // execute success callback
        if (q.onSuccess) {
            var sc=q.scope || q.win;
            q.onSuccess.call(sc, _returnData(q));
        }
    }
813444
function (callback, id) {
        if (idValidate(callback, id)) {
          var host = apiGraphs
          var endpoint = '/products/' + id + '/recommended.json'
          runMethod(callback, endpoint, host)
        }
      }
639528
function getOrder(account, identifier, callback) {
  validate.address(account);
  validate.identifier(identifier);

  var txRequest = this.remote.requestTx({
    hash: identifier
  });

  txRequest.once('error', callback);
  txRequest.once('transaction', function(response) {
    if (response.TransactionType !== 'OfferCreate'
        && response.TransactionType !== 'OfferCancel') {
      callback(new InvalidRequestError('Invalid parameter: identifier. '
        + 'The transaction corresponding to the given identifier '
        + 'is not an order'));
    } else {
      var options = {
        account: account,
        identifier: identifier
      };
      asyncify(TxToRestConverter.parseOrderFromTx)(response, options, callback);
    }
  });
  txRequest.request();
}
616245
function(callback) {
			var query = this.toQuery();
			var idx = 0;
			while (query.args.length > 0) {
				var value = query.args.shift();
				query.text = query.text.replace(/\?/,callback(value,idx));
				idx++;
			}
			return query.text;
		}
1078209
function cancelPreapprovalPayment(id) {
    var callback = preConditions.getCallback(arguments[arguments.length - 1]);

    showWarning();

    return preapprovalModule.update({
      id: id,
      status: 'cancelled'
    }, callback);
  }
339218
function (key, callback) {
            return client.get(key, function (err, result) {
                return callback(err, result);
            });
        }