Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Non official npm module for the Adyen Payment service.
$ npm install adyen
Adyen Hosted Payment Pages (HPPs)
For more information please check the Adyen's documenation http://www.adyen.com/developers/documentation/
// Init payment
var
HPP = require('adyen').HPP;
hppPayment = new HPP({
test: true, // optional: true for Adyen test environment
HMACKey: 'YourHMAC_Key',
// Required for the payment
merchantReference: 'DummyPaymentID', // optional (lib do this)
// default: 'PAYMENT-YYYY-MM-DDThh:mm:ssTZD'
paymentAmount: 100, // EUR 1,00 = 100
currencyCode: 'EUR', // optional (lib do this), default: 'EUR'
shipBeforeDate: 2014-01-25 // 'YYYY-MM-DD'
skinCode: 'YourSkinCode',
merchantAccount: 'YourMerchantAccountName',
sessionValidity: 'YYYY-MM-DDThh:mm:ssZ', // optional (lib do this), default: 24h
// Optional for the payment
shopperLocale: 'nl_NL', // optional: 'en_US'
orderData: 'XY 1 year subscription', // optional
merchantReturnData: '', // optional
countryCode: 'NL', // optional
shopperEmail: 'test@test.com', // optional
shopperReference: 'shopperID' // optional
// allowedMethods // optional: check the Adyen documentation
// blockedMethods // optional: check the Adyen documentation
// offset // optional: check the Adyen documentation
// offerEmail // optional: check the Adyen documentation
// shopperStatement: '' // optional
});
// Get URL to the payment window
hppPayment.generateRequest(function (err, url, merchantReference) {
if (err) {
return console.error(err);
}
console.log(merchantReference);
console.log(url);
});
// Init validator
// Use the decodeURIComponent() values
var
ValidateHPP = require('adyen').ValidateHPP;
validateHPP = new ValidateHPP({
HMACKey: 'YourHMAC_Key',
// Required for the validation
skinCode: 'SkinCode From the callback url',
authResult: 'STATUS From the callback url',
pspReference: 'pspReference From the callback url',
merchantReference: 'merchantReference From the callback url',
merchantSig: 'merchantSig From the callback url'
// Optional for the validation
merchantReturnData: '' // optional
});
// true if valid
var isValid = validateHPP.validatePayment();
console.log(isValid);
FAQs
NodeJS module for the Adyen payment provider
The npm package adyen receives a total of 170 weekly downloads. As such, adyen popularity was classified as not popular.
We found that adyen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.