New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

checkout-sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkout-sdk-node - npm Package Compare versions

Comparing version 1.0.30 to 1.0.31

12

dist/Checkout.js

@@ -18,2 +18,6 @@ "use strict";

if (key.startsWith('Bearer')) {
key = key.replace('Bearer', '').trim();
}
return _config.MBC_LIVE_SECRET_KEY_REGEX.test(key) || _config.NAS_LIVE_SECRET_KEY_REGEX.test(key) ? _config.LIVE_BASE_URL : _config.SANDBOX_BASE_URL;

@@ -24,3 +28,9 @@ };

// Unless specified, check environment variables for the key
return !key ? process.env.CKO_SECRET_KEY || '' : key;
let authKey = !key ? process.env.CKO_SECRET_KEY || '' : key; // In case of NAS static keys, append the Bearer prefix
if (_config.NAS_LIVE_SECRET_KEY_REGEX.test(authKey) || _config.NAS_SANDBOX_SECRET_KEY_REGEX.test(authKey)) {
authKey = authKey.startsWith('Bearer') || authKey.startsWith('bearer') ? authKey : `Bearer ${authKey}`;
}
return authKey;
};

@@ -27,0 +37,0 @@

4

dist/config.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.CURRENCIES = exports.PAYMENT_TYPES = exports.SOURCE_ID_REGEX = exports.CARD_TOKEN_REGEX = exports.NAS_LIVE_SECRET_KEY_REGEX = exports.MBC_LIVE_SECRET_KEY_REGEX = exports.DEFAULT_TIMEOUT = exports.API_VERSION_HEADER = exports.REQUEST_ID_HEADER = exports.LIVE_BASE_URL = exports.SANDBOX_BASE_URL = void 0;
exports.CURRENCIES = exports.PAYMENT_TYPES = exports.SOURCE_ID_REGEX = exports.CARD_TOKEN_REGEX = exports.NAS_SANDBOX_SECRET_KEY_REGEX = exports.NAS_LIVE_SECRET_KEY_REGEX = exports.MBC_LIVE_SECRET_KEY_REGEX = exports.DEFAULT_TIMEOUT = exports.API_VERSION_HEADER = exports.REQUEST_ID_HEADER = exports.LIVE_BASE_URL = exports.SANDBOX_BASE_URL = void 0;
const SANDBOX_BASE_URL = 'https://api.sandbox.checkout.com';

@@ -22,2 +22,4 @@ exports.SANDBOX_BASE_URL = SANDBOX_BASE_URL;

exports.NAS_LIVE_SECRET_KEY_REGEX = NAS_LIVE_SECRET_KEY_REGEX;
const NAS_SANDBOX_SECRET_KEY_REGEX = /^sk_sbox_?(\w{27})$/;
exports.NAS_SANDBOX_SECRET_KEY_REGEX = NAS_SANDBOX_SECRET_KEY_REGEX;
const CARD_TOKEN_REGEX = /^(tok)_(\w{26})$/;

@@ -24,0 +26,0 @@ exports.CARD_TOKEN_REGEX = CARD_TOKEN_REGEX;

{
"name": "checkout-sdk-node",
"version": "1.0.30",
"version": "1.0.31",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc