<commit_before>var request = require('request');
var gateway = require(__dirname +'/../../');
var restApiUrl = gateway.config.get('RIPPLE_REST_API');

/**
 *
 * @function getPayment
 * @description Calls ripple rest
 * @param url
 * @param fn
 */
module.exports = function(url, fn){

  //remove "/"
  var path = url.substr(1);
  var url = restApiUrl + path;

  request.get({url: url, json: true}, function(err,_,resp){
    if(err){
      fn(err, null);
    } else {
      if(resp.success) {
        fn(null, resp.payment);
      }
    }
  });
};<commit_msg>[DOC] correct function name<commit_after>var request = require('request');
var gateway = require(__dirname +'/../../');
var restApiUrl = gateway.config.get('RIPPLE_REST_API');

/**
 *
 * @function getPaymentStatus
 * @description Calls ripple rest
 * @param url
 * @param fn
 */
module.exports = function(url, fn){

  //remove "/"
  var path = url.substr(1);
  var url = restApiUrl + path;

  request.get({url: url, json: true}, function(err,_,resp){
    if(err){
      fn(err, null);
    } else {
      if(resp.success) {
        fn(null, resp.payment);
      }
    }
  });
};
{'fraction_non_alphanumeric': 0.18165784832451498, 'fraction_numerical': 0.001763668430335097, 'mean_word_length': 2.9964788732394365, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '104439', 'n_tokens_mistral': 396, 'n_tokens_neox': 379, 'n_words': 87}