@mx51/spi-client-js
Advanced tools
Comparing version 2.6.8 to 2.6.9
{ | ||
"name": "@mx51/spi-client-js", | ||
"version": "2.6.8", | ||
"description": "JavaScript Client Library for Assembly Payments' In-Store Integration.", | ||
"version": "2.6.9", | ||
"description": "JavaScript Client Library for mx51's In-Store Integration.", | ||
"main": "dist/spi-client-js.js", | ||
@@ -17,9 +17,9 @@ "scripts": { | ||
}, | ||
"author": "Assembly Payments", | ||
"author": "mx51", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/mx51/spi-client-js", | ||
"dependencies": { | ||
"@babel/polyfill": "^7.4.4", | ||
"@babel/runtime": "^7.4.5", | ||
"aes-js": "^3.1.0", | ||
"@babel/polyfill": "^7.8.3", | ||
"@babel/runtime": "^7.8.4", | ||
"aes-js": "^3.1.2", | ||
"bn.js": "^4.11.8", | ||
@@ -29,21 +29,21 @@ "jssha": "^2.3.1" | ||
"devDependencies": { | ||
"@babel/cli": "^7.1.2", | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-transform-runtime": "^7.4.4", | ||
"@babel/preset-env": "^7.4.5", | ||
"@babel/cli": "^7.8.4", | ||
"@babel/core": "^7.8.4", | ||
"@babel/plugin-transform-runtime": "^7.8.3", | ||
"@babel/preset-env": "^7.8.4", | ||
"babel-loader": "^8.0.6", | ||
"babel-plugin-istanbul": "^5.2.0", | ||
"connect-api-mocker": "^1.3.6", | ||
"core-js": "^3.1.4", | ||
"jasmine": "^2.8.0", | ||
"karma": "^2.0.5", | ||
"karma-chrome-launcher": "^2.2.0", | ||
"babel-plugin-istanbul": "^6.0.0", | ||
"connect-api-mocker": "^1.7.0", | ||
"core-js": "^3.6.4", | ||
"jasmine": "^3.5.0", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-coverage": "^2.0.1", | ||
"karma-jasmine": "^1.1.1", | ||
"karma-jasmine": "^3.1.1", | ||
"karma-json-fixtures-preprocessor": "0.0.6", | ||
"karma-webpack": "^3.0.5", | ||
"webpack": "^4.35.0", | ||
"karma-webpack": "^4.0.2", | ||
"webpack": "^4.41.6", | ||
"webpack-visualizer-plugin": "^0.1.11", | ||
"webpack-cli": "^3.1.2", | ||
"webpack-dev-server": "^3.1.9" | ||
"webpack-cli": "^3.3.11", | ||
"webpack-dev-server": "^3.10.3" | ||
}, | ||
@@ -57,3 +57,3 @@ "bugs": { | ||
"keywords": [ | ||
"assembly", | ||
"mx51", | ||
"payments", | ||
@@ -60,0 +60,0 @@ "spi", |
@@ -1,8 +0,8 @@ | ||
# SPI Client JavaScript ![NPM](https://img.shields.io/npm/l/spi-client-js) [![Build Status](https://travis-ci.org/AssemblyPayments/spi-client-js.svg?branch=master)](https://travis-ci.org/AssemblyPayments/spi-client-js) ![Code Coverage](https://codecov.io/gh/AssemblyPayments/spi-client-js/branch/master/graph/badge.svg) ![GitHub package.json version](https://img.shields.io/github/package-json/v/AssemblyPayments/spi-client-js) | ||
# SPI Client JavaScript ![NPM](https://img.shields.io/npm/l/spi-client-js) [![Build Status](https://travis-ci.org/mx51/spi-client-js.svg?branch=master)](https://travis-ci.org/mx51/spi-client-js) ![Code Coverage](https://codecov.io/gh/mx51/spi-client-js/branch/master/graph/badge.svg) ![GitHub package.json version](https://img.shields.io/github/package-json/v/mx51/spi-client-js) | ||
This is the JavaScript client library for Assembly Payments in-store integration. | ||
This is the JavaScript client library for mx51 in-store integration. | ||
# 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. | ||
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 [@mx51/spi-client-js](https://www.npmjs.com/package/@mx51/spi-client-js) from npm. | ||
@@ -37,5 +37,5 @@ ## Building | ||
This source code is provided “as is” or “as available” and Assembly makes no representations or warranties, express or implied, regarding the source code, that the source code will meet your requirements, or that this source code will be error-free. Assembly expressly disclaims any and all express and implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Without limiting the generality of the foregoing, Assembly does not warrant, endorse, guarantee, or assume responsibility for this source code. | ||
This source code is provided “as is” or “as available” and mx51 makes no representations or warranties, express or implied, regarding the source code, that the source code will meet your requirements, or that this source code will be error-free. mx51 expressly disclaims any and all express and implied warranties, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Without limiting the generality of the foregoing, mx51 does not warrant, endorse, guarantee, or assume responsibility for this source code. | ||
In no event shall Assembly be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this source code, even if advised of the possibility of such damage. | ||
In no event shall mx51 be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this source code, even if advised of the possibility of such damage. | ||
@@ -24,3 +24,3 @@ export const ConnectionState = { | ||
export class Connection { | ||
constructor(spi) { | ||
constructor() { | ||
this.Address = null; | ||
@@ -30,3 +30,2 @@ this.Connected = false; | ||
this.SpiProtocol = SPI_PROTOCOL; | ||
this._spi = spi; | ||
this._ws = null; | ||
@@ -70,3 +69,3 @@ this._conectionTimeout = null; | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Connecting)})); | ||
document.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Connecting)})); | ||
} | ||
@@ -99,3 +98,3 @@ | ||
this.Connected = true; | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Connected)})); | ||
document.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Connected)})); | ||
} | ||
@@ -110,3 +109,3 @@ | ||
this._ws = null; | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Disconnected)})); | ||
document.dispatchEvent(new CustomEvent('ConnectionStatusChanged', {detail: new ConnectionStateEventArgs(ConnectionState.Disconnected)})); | ||
} | ||
@@ -130,3 +129,3 @@ | ||
onMessageReceived(message) { | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('MessageReceived', {detail: new MessageEventArgs(message.data)})); | ||
document.dispatchEvent(new CustomEvent('MessageReceived', {detail: new MessageEventArgs(message.data)})); | ||
} | ||
@@ -136,4 +135,4 @@ | ||
this._cancelConnectionTimeout(); | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('ErrorReceived', {detail: new MessageEventArgs(err)})); | ||
document.dispatchEvent(new CustomEvent('ErrorReceived', {detail: new MessageEventArgs(err)})); | ||
} | ||
} |
@@ -139,3 +139,3 @@ import { | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
document.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
return new InitiateTxResult(true, "Preauth Initiated"); | ||
@@ -179,3 +179,3 @@ } | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
document.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
} | ||
@@ -197,3 +197,3 @@ | ||
this._spi._eventBus.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
document.dispatchEvent(new CustomEvent('TxFlowStateChanged', {detail: this._spi.CurrentTxFlowState})); | ||
} | ||
@@ -200,0 +200,0 @@ |
@@ -9,3 +9,3 @@ import { Message, SuccessState } from '../src/Messages'; | ||
const posId = 'DummyPos'; | ||
const posVendorId = 'assembly'; | ||
const posVendorId = 'mx51'; | ||
const posVersion = '2.6.0'; | ||
@@ -12,0 +12,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2255234
18069
Updated@babel/polyfill@^7.8.3
Updated@babel/runtime@^7.8.4
Updatedaes-js@^3.1.2