Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
auth-net-request
Advanced tools
npm install auth-net-request
var AuthorizeRequest = require('auth-net-request');
var Request = new AuthorizeRequest({
api: '123',
key: '1234',
cert: '/path/to/cert.pem',
rejectUnauthorized: false, // true
requestCert: true, // false
agent: false // http.agent object
sandbox: false // true
});
Request.send(<method>, <xml>, [xmlOptions], function(err, response) {});
<method>
- As specified in the Auhorize.net API without the "Request"
suffix, e.g. "createTransaction".<xml>
- Either an XML string or a JavaScript object reflecting the JSON
specification in the Authorize.net API.xmlOptions.rejectUnauthorized
- see https.request
option.
Note: defaults to false
. Likely want to set to true
.xmlOptions.requestCert
- Defaults to true
.xmlOptions.agent
- Defaults to false
.xmlOptions.extraOptions
- Adds an <extraOptions>
tag to the request. For?If !err
on the send
method callback, response
is as specified in the
Authorize.net API. E.g. consider checking and recording
response.transactionResponse.responseCode
,
response.transactionResponse.authCode
and
response.transactionResponse.transId
.
If !!err
on the send
method callback, you can get access to the
following properties of err
:
err.name
err.message
err.code
err.stack
err.response
- response from Authorize.net API, if the request
got that far.!err
on the send
method callback does not necessarily mean a
transaction was approved. Note the differences among the following
in the API documentation: messages.resultCode
,
messages.message.code
and transactionResponse.responseCode
.
Version >= 2.x.x
has a breaking change, all values are returned as strings rather than strings and numbers (unless the value is an object, array, etc).
FAQs
Authorize.net requests for Node.JS
The npm package auth-net-request receives a total of 6 weekly downloads. As such, auth-net-request popularity was classified as not popular.
We found that auth-net-request demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.