diff --git a/lib/apple/index.js b/lib/apple/index.js index 19b0977..2d82933 100644 --- a/lib/apple/index.js +++ b/lib/apple/index.js @@ -88,7 +88,7 @@ exports.verifyPayment = function (payment, cb) { } - function checkReceipt(error, resultString) { + function checkReceipt(error, result) { if (error) { return cb(error); } diff --git a/lib/https/post.js b/lib/https/post.js index f3114f3..8b061cb 100644 --- a/lib/https/post.js +++ b/lib/https/post.js @@ -14,8 +14,8 @@ module.exports = function (url, options, cb) { 'content-type': 'application/x-www-form-urlencoded', 'content-length': Buffer.byteLength(data) }; - } else if (data.json) { - data = JSON.stringify(data.json); + } else if (options.json) { + data = JSON.stringify(options.json); options.headers = { 'content-type': 'application/json', 'content-length': Buffer.byteLength(data)