@felipebri23/3ds2-integrated-server-test
v1.0.0
Published
This project wraps our vendor's MPI Javascript libraries (as of 17th April 2019 just Cardinal Commerce).
Downloads
3
Readme
3DSv2.js
This project wraps our vendor's MPI Javascript libraries (as of 17th April 2019 just Cardinal Commerce).
It uses Typescript v3.4+ and rollup.js to generate a bundled Javascript file that contains our library and all its dependencies.
It was based on rollup's Typescript library template
Requirements
Visual Studio Code:
- Prettier - Code Formatter extension
To build the JavaScript:
- Installing Docker locally (18.06+)
- or installing NodeJS locally (10.10+)
Development workfow
npm i
npm run dev
# That's it!
The dev
npm script watches for changes, generates inlined sourcemaps and starts an HTTP server (port 8080) to serve the generated JS file.
How to build
Docker & GitBash (preferred):
docker build -t registry.payvision.com/internal-mpi-js-builder . MSYS_NO_PATHCONV=1 docker run --rm -it -v $PWD/dist:/dist registry.payvision.com/internal-mpi-js-builder # Optional docker rmi registry.payvision.com/internal-mpi-js-builder
Node:
npm i npm run build
In both scenarios a 3ds2integratedserver.js
will be place inside the dist
folder.
Why is Docker preferred?
Simply because it doesn't pollute the environment and helps making builds reproducible.
Troubleshooting
ERROR2000 Invalid call, something went wrong with the library's internals.
If you get this error, it means your state table, located in main.ts
needs to be updated with new and/or renamed states.