Untitled
unknown
plain_text
2 years ago
3.6 kB
12
Indexable
# Cuscapi Integration Service
## Description
Integration with Cuscapi middleware.
## Prerequisites
1. Install `nodejs` and `npm`
2. Add .env file by running the following command
```bash
npm run env:generate
```
3. Update the variables in `.env` file
4. Install the dependencies by running the following command
```bash
# install node modules
npm install
```
## Running the service
```bash
# development mode
npm run start
# watch mode(auto restart on change)
npm run start:dev
# debug mode
npm run start:debug
# production mode
npm run start:prod
```
## Test
```bash
# unit tests
npm run test
# e2e tests
npm run test:e2e
# test coverage
npm run test:cov
```
## System Settings - POS Settings JSON format (11011)
```json
{
"ca_merchant_brand": "PL",
"ca_merchant_id": "PL1000",
"ca_outlet_id": "PL1000",
"ts_merchant_key": "HQ-XXXX-XXXX"
}
```
| **Property Name** | **Type** | **Description** | **Optional/Required** | **Default Value** | Example Value |
| --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------- | ----------------- | -------------- |
| **ca_merchant_brand** | string | This is the merchant brand name provided by Cuscapi. | Required | | `PL` |
| **ca_merchant_id** | string | This is the merchant id provided by Cuscapi. | Required | | `PL1000` |
| **ca_outlet_id** | string | This is the outlet id provided by Cuscapi. | Required | | `PL1000` |
| ts_merchant_key | string | This is the merchant key defined in TS system and starts with "HQ". | Optional | | `HQ-1234-5678` |
| is_test_mode | boolean | If this property is set to `true` then the `ts_merchant_key` value given in the POS settings JSON will be sent to third party in order payload otherwise the original merchant key will be sent. | Optional | `false` | `true` |
| use_staging_auth | boolean | If this property is set to `true` then the order will be created in staging env instead of live env. | Optional | `false` | `true` |
| smartkiosk_table_no | string | Table no to be sent to Cuscapi for SmartKiosk app orders. The string should contain the numbers only. | Optional | `99` | `99` |
## System Settings - Plugin (11007)
```bash
1050
```
Editor is loading...