auth-net-request
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -6,2 +6,6 @@ var https = require('https') | ||
var responseMap = { | ||
createCustomerProfileFromTransaction: 'createCustomerProfile' | ||
} | ||
module.exports = (function() { | ||
@@ -92,2 +96,5 @@ var AuthorizeRequest = function(options) { | ||
// This is the response received from Authorize.net | ||
var responseAction = responseMap[action] || action; | ||
req.write(content); | ||
@@ -113,3 +120,3 @@ req.on('error', function(err) { | ||
if (!response[action + 'Response']) { | ||
if (!response[responseAction + 'Response']) { | ||
return callback(new Error('Unexpected response: ' + data)); | ||
@@ -119,3 +126,3 @@ } | ||
var keys = Object.keys(response[action + 'Response']).filter(function(k) { return k !== 'xmlns:xsi' && k !== 'xmlns:xsd' && k !== 'xmlns'; }) | ||
var keys = Object.keys(response[responseAction + 'Response']).filter(function(k) { return k !== 'xmlns:xsi' && k !== 'xmlns:xsd' && k !== 'xmlns'; }) | ||
, length = keys.length | ||
@@ -126,3 +133,3 @@ , i = 0 | ||
for (i = 0; i < length; ++i) { | ||
values[keys[i]] = response[action + 'Response'][keys[i]]; | ||
values[keys[i]] = response[responseAction + 'Response'][keys[i]]; | ||
} | ||
@@ -129,0 +136,0 @@ |
{ | ||
"name": "auth-net-request", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Authorize.net requests for Node.JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
6765
127