Comparing version 2.9.0 to 2.9.1
@@ -87,6 +87,14 @@ 'use strict'; | ||
} | ||
return nodeify(this.rq.post(request).catch(normalizeError), cb); | ||
} | ||
}, { | ||
key: 'postBody', | ||
value: function postBody(params, cb) { | ||
var request = { | ||
url: this.getEntityUrl(params), | ||
body: params.data | ||
}; | ||
return nodeify(this.rq.post(request).catch(normalizeError), cb); | ||
} | ||
}, { | ||
key: 'put', | ||
@@ -93,0 +101,0 @@ value: function put(params, cb) { |
@@ -9,4 +9,2 @@ "use strict"; | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var Promise = require("promise"), | ||
@@ -24,7 +22,4 @@ _require = require('../utils/razorpay-utils'), | ||
return { | ||
create: function create() { | ||
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var callback = arguments[1]; | ||
create: function create(params, callback) { | ||
/* | ||
@@ -39,12 +34,7 @@ * Creates Payment Link. | ||
var url = BASE_URL, | ||
notes = params.notes, | ||
rest = _objectWithoutProperties(params, ["notes"]), | ||
data = Object.assign(params); | ||
return api.post({ | ||
var url = BASE_URL; | ||
return api.postBody({ | ||
url: url, | ||
data: data | ||
}, callback, true); | ||
data: params | ||
}, callback); | ||
}, | ||
@@ -51,0 +41,0 @@ cancel: function cancel(paymentLinkId, callback) { |
{ | ||
"name": "razorpay", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"description": "Official Node SDK for Razorpay API", | ||
@@ -5,0 +5,0 @@ "main": "dist/razorpay", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8087
298512