Berlingske payment service supporting MobilePay and Dibs gateways
You need Docker Engine version 17.09.0 and higher.
Just simply use
npm install
To set all needed local environment variables please use docker-compose.override.yml.
In docker-compose.override.yml.dist you can find list of all variables with example
values.
To start application please write inside docker container:
npm start
or
npm run dev
for nodemon file watcher.
We use Jest for testing our application. To run both the unit and functional tests use the following command.
npm t
You can also run the tests in watch mode
npm run test:watch
Since Jest provides an easy way for filtering tests it runs, we don't have any explicit npm script commands.
Instead you can use the following to run just unit tests:
npm run test -- unit
You can generate code coverage in html format using
npm run test:coverage
The output will be in tests/coverage folder.
Service uses these env vars:
Environment variables:
actiontoken collection has 2 indexes, one is ttl index:
await MongoDB.collection('actiontoken').createIndex({ token: 1 }, { unique: true });
await MongoDB.collection('actiontoken').createIndex({ updated: 1 }, { expireAfterSeconds: purchaseConfig.purchaseCacheTime });
orders collection has one ttl index:
await MongoDB.collection('orders').createIndex({ changedAt: 1 }, { expireAfterSeconds: 30 * 86400 });
Content type
Image
Digest
sha256:c56ab96d2…
Size
65.5 MB
Last updated
about 3 years ago
docker pull berlingskemedia/bm.ms.payment_manager