Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
safecharge
Advanced tools
This module generates URL-s for the Safecharge PPP, and validates responses.
$ npm install safecharge
Exapmple:
safecharge.getPPPURL([{
name: 'Foo',
amount: 19.95
}], {
merchant_id: 'XXX',
merchant_site_id: 'YYY',
}, 'ZZZ');
//https://secure.safecharge.com/ppp/purchase.do?merchant_id=XXX&merchant_site_id=YYY¤cy=USD&version=3.0.0&handling=0&shipping=0&discount=0&total_tax=0&time_stamp=2013-10-03.15%3A23%3A03&total_amount=19.95&item_name_1=Foo&item_amount_1=19.95&checksum=6c514a07da49485e009aedbc99194262
The following default values are used:
secret: process.env.SAFECHARGE_SECRET
merchant_id: process.env.SAFECHARGE_MERCHANT_ID
merchant_site_id: process.env.SAFECHARGE_MERCHANT_SITE_ID
curreny: 'USD'
version: '3.0.0'
handling: 0 (globally, and for each individual item)
shipping: 0 (globally, and for each individual item)
discount: 0 (globally, and for each individual item)
item.quantity: 1
total_tax: 0
time_stamp: the current time
total_amount: calculated according to the safecharge docs:
total = shipping + handling - discount
for each item
total += (item.amount - item.discount + item.shipping + item.handling)*item.quantity
total *= (1 + total_tax/100)
Validates Safecharges response against checksum
.
data
is an object, containing totalAmount
, currency
, responseTimeStamp
, PPP_TransactionID
, Status
, productId
fields.
secret
defaults to process.env.SAFECHARGE_SECRET
.
FAQs
SafeCharge REST API wrapper for Nodejs
The npm package safecharge receives a total of 430 weekly downloads. As such, safecharge popularity was classified as not popular.
We found that safecharge 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.