Skip to content

Latest commit

 

History

History
259 lines (222 loc) · 5.81 KB

readme.md

File metadata and controls

259 lines (222 loc) · 5.81 KB

Safe Entry Demo App

This is a demo application meant to illustrate how to integrate your application with Safe Entry

Contents


1. Quick Start

1.1 Install Node and NPM (skip this step if you have NPM installed)

For the demo application to run, you will need to install Node and NPM.

Follow the instructions given by the links below depending on your OS.

1.2 Run NPM install

Run the following command in the folder you unzipped the application:

npm install

1.3 Start the Application

Execute the following command to call the Entry API:

To test with payload encryption and signing.

npm run entry

To test without payload encryption and signing.

npm run entry-sandbox

2. How To Use

You are allowed to change the following configurations in the files below:

File Configs
index.js Sample checkin or checkout data
config.js Application ID (AppId) and certificates

3. Possible scenarios

3.1 Single tenant SafeEntry QR app

Sample data Response (Body)
Success
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
    "mobileno": "92376345"
}
    
Http status code: 201
Body: < empty >
Fail - Missing field
{
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
    "mobileno": "92376345"
}
    
Http status code: 400
Body: {"code":400,"message":"Missing subType"}
Fail - Invalid sub type. Only allow "uinfin" or "others
{
    "subType": "test",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
    "mobileno": "92376345"
}
    
Http status code: 400
Body: {"code":400,"message":"Invalid subType"}
Fail - Invalid venue
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "test",
    "mobileno": "92376345"
}
    
Http status code: 400
Body: {"code":400,"message":"Invalid venue"}
Fail - Invalid uinfin
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "test",
    "venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
    "mobileno": "92376345"
}
    
Http status code: 400
Body: {"code":400,"message":"Invalid uinfin"}
Fail - Invalid mobileno
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-83338-SEQRSELFTESTSINGLE-SE",
    "mobileno": "test"
}
    
Http status code: 400
Body: {"code":400,"message":"Invalid mobileno"}

3.2 Multiple tenants SafeEntry QR app

Sample data Response (Body)
Success
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
    "mobileno": "92376345",
    "tenantId": "VENUE1"
}
    
Http status code: 201
Body: < empty >
Fail - Missing tenantId. TenantId is mandatory for Multiple tenant SafeEntry QR app
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
    "mobileno": "92376345"
}
    
Http status code: 400
Body: {"code":400,"message":"Missing tenantId"}
Fail - Invalid tenantId. TenantId does not exist in SafeEntry QR app
{
    "subType": "uinfin",
    "actionType": "checkin",
    "sub": "S9960846C",
    "venueId": "STG-180000001W-409531-SEQRSELFTESTMULTIPLE-SE",
    "mobileno": "92376345",
    "tenantId": "test"
}
    
Http status code: 400
Body: {"code":400,"message":"Invalid tenantId"}

Reporting Issue

You may contact our support for any other technical issues, and we will respond to you within 5 working days.