bitpay-nodejs
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -36,3 +36,7 @@ const request = require('request') | ||
request(options, function(err, resp, body) { | ||
if(err) console.log(err); | ||
if(err) { | ||
console.log(err); | ||
return fn(err, null); | ||
} | ||
let result = JSON.parse(body); | ||
@@ -49,7 +53,11 @@ if (result.error) { | ||
var options = new Object(this.httpOptions); | ||
options.url = api+'/invoiceData/'+invoiceId; | ||
options.url = 'https://bitpay.com/invoiceData/'+invoiceId; | ||
console.log(options.url); | ||
options.method = 'GET'; | ||
request(options, function(err, resp, body) { | ||
if(err) console.log(err); | ||
if(err) { | ||
console.log(err); | ||
return fn(err, null); | ||
} | ||
console.log(body) | ||
let result = JSON.parse(body); | ||
@@ -71,3 +79,6 @@ if (result.error) { | ||
request(options, function(err, resp, body) { | ||
if(err) console.log(err); | ||
if(err) { | ||
console.log(err); | ||
return fn(err, null); | ||
} | ||
let result = JSON.parse(body); | ||
@@ -74,0 +85,0 @@ if (result.error) { |
{ | ||
"name": "bitpay-nodejs", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "A Node.js library for the Bitpay Bitcoin API", | ||
@@ -5,0 +5,0 @@ "main": "bitpay.js", |
Sorry, the diff of this file is not supported yet
22987
171