Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@assemblypayments/spi-client-js

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@assemblypayments/spi-client-js - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

package.json
{
"name": "@assemblypayments/spi-client-js",
"version": "2.0.3",
"version": "2.0.4",
"description": "JavaScript Client Library for Assembly Payments' In-Store Integration.",

@@ -5,0 +5,0 @@ "main": "karma.conf.js",

@@ -5,2 +5,32 @@ # SPI Client JavaScript

# Setup
Below are basic instructions on how to run the library for development. If all you want to do is use the library in your project, just import [@assemblypayments/spi-client-js](https://www.npmjs.com/package/@assemblypayments/spi-client-js) from npm.
## Building
To download the dependencies and install the package, run the following:
```
npm install
```
## Testing
To run a suite of unit tests configured in `karma.conf.js`, run the following:
```
npm test
```
## Creating a distribution
To create a distribution, run the following:
```
npm run transpile
```
This will update the `dist/spi-client.js.js` file used for the npm package.
# Disclaimer

@@ -7,0 +37,0 @@

@@ -127,3 +127,12 @@ /// <summary>

let now = Date.now();
let msgTime = Date.parse(this.DateTimeStamp);
// Stamp format: 2018-04-19T01:42:38.279
let dts = this.DateTimeStamp.split(/[\-\+\. :T]/);
let msgTime = new Date(
// year, month, date
dts[0], dts[1] - 1, dts[2],
// hour, minute, second, millis
dts[3], dts[4], dts[5], dts[6]
).getTime(); // Local time zone
return msgTime - now;

@@ -143,3 +152,3 @@ }

let sig = Crypto.HmacSignature(secrets.HmacKey, env.enc);
if(sig.toUpperCase() != env.hmac) {
if (sig.toUpperCase() != env.hmac) {
return new Message("_", Events.InvalidHmacSignature, null, false);

@@ -169,3 +178,4 @@ }

let now = Date.now();
let adjustedTime = new Date(now + stamp.ServerTimeDelta);
let tzoffset = new Date().getTimezoneOffset() * 60 * 1000;
let adjustedTime = new Date(now - tzoffset + stamp.ServerTimeDelta);

@@ -172,0 +182,0 @@ // Format date: "yyyy-MM-ddTHH:mm:ss.fff"

Sorry, the diff of this file is too big to display

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