@ekyc_qoobiss/qbs-ect-cmp 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -351,6 +351,7 @@ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
351
351
  const { state, onChange } = createStore({
352
352
  flowStatus: FlowStatus.LANDING,
353
353
  environment: 'PROD',
354
+ debug: false,
354
355
  requestId: '',
355
356
  redirectId: '',
356
357
  initialised: false,
@@ -363,6 +364,9 @@ const { state, onChange } = createStore({
363
364
  phoneNumber: '',
364
365
  apiBaseUrl: 'https://apiro.id-kyc.com',
365
366
  });
367
+ onChange('environment', value => {
368
+ state.debug = value == 'QA';
369
+ });
366
370
  onChange('flowStatus', value => {
367
371
  sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
368
372
  });
@@ -438,7 +442,8 @@ class ApiCall {
438
442
  return jsonResp.valid;
439
443
  }
440
444
  async AddIdentificationRequest(deviceInfo) {
441
- //console.log('Calling identity request with store:' + JSON.stringify(store));
445
+ if (state.debug)
446
+ console.log('Calling identity request with store:' + JSON.stringify(state));
442
447
  let data = {
443
448
  requestId: state.requestId,
444
449
  clientDeviceInfo: JSON.stringify(deviceInfo),
@@ -1891,11 +1896,14 @@ class ML5 {
1891
1896
  });
1892
1897
  }
1893
1898
  loaded() {
1894
- console.log('ML5 LOADED!!!');
1899
+ if (state.debug)
1900
+ console.log('ML5 LOADED!!!');
1895
1901
  }
1896
1902
  gotResults(error, results) {
1897
- console.log(error);
1898
- console.log(results);
1903
+ if (state.debug)
1904
+ console.log(error);
1905
+ if (state.debug)
1906
+ console.log(results);
1899
1907
  }
1900
1908
  }
1901
1909
 
@@ -2236,15 +2244,12 @@ class FaceML5Detector {
2236
2244
  const faceBox = result[0].detection.box;
2237
2245
  const { top, left, bottom, right } = faceBox;
2238
2246
  const { imageHeight, imageWidth } = result[0].detection;
2239
- const topIndent = top * 100 / imageHeight;
2240
- const leftIndent = left * 100 / imageWidth;
2241
- const rightIndent = (imageWidth - right) * 100 / imageWidth;
2242
- const bottomIndent = (imageHeight - bottom) * 100 / imageHeight;
2247
+ const topIndent = (top * 100) / imageHeight;
2248
+ const leftIndent = (left * 100) / imageWidth;
2249
+ const rightIndent = ((imageWidth - right) * 100) / imageWidth;
2250
+ const bottomIndent = ((imageHeight - bottom) * 100) / imageHeight;
2243
2251
  // console.log('indent: '+topIndent+' | '+leftIndent+' | '+rightIndent+' | '+bottomIndent);
2244
- return !(topIndent < this.Y_OFFSET_FROM_FRAME ||
2245
- leftIndent < this.X_OFFSET_FROM_FRAME ||
2246
- rightIndent < this.X_OFFSET_FROM_FRAME ||
2247
- bottomIndent < this.Y_OFFSET_FROM_FRAME);
2252
+ return !(topIndent < this.Y_OFFSET_FROM_FRAME || leftIndent < this.X_OFFSET_FROM_FRAME || rightIndent < this.X_OFFSET_FROM_FRAME || bottomIndent < this.Y_OFFSET_FROM_FRAME);
2248
2253
  }
2249
2254
  async checkFacePose(results) {
2250
2255
  let face = new FaceLandmarks(results[0], this.width, this.height);
@@ -2253,17 +2258,18 @@ class FaceML5Detector {
2253
2258
  if (this.frontFace == null) {
2254
2259
  this.frontFace = face;
2255
2260
  // await this.drawFrame('green');
2256
- console.log('face ok');
2261
+ if (state.debug)
2262
+ console.log('face ok');
2257
2263
  }
2258
2264
  else if (this.frontFace != null && this.presentedFacePose == null) {
2259
2265
  let ff = this.frontFace;
2260
- if (face.nose.y < ff.nose.y - (ff.eyesDistance() * 0.4))
2266
+ if (face.nose.y < ff.nose.y - ff.eyesDistance() * 0.4)
2261
2267
  this.presentedFacePose = FacePose.LookUp;
2262
- if (face.nose.y > ff.nose.y + (ff.eyesDistance() * 0.4))
2268
+ if (face.nose.y > ff.nose.y + ff.eyesDistance() * 0.4)
2263
2269
  this.presentedFacePose = FacePose.LookDown;
2264
- if (face.nose.x > ff.nose.x + (ff.eyesDistance() * 0.5))
2270
+ if (face.nose.x > ff.nose.x + ff.eyesDistance() * 0.5)
2265
2271
  this.presentedFacePose = FacePose.LookLeft;
2266
- if (face.nose.x < ff.nose.x - (ff.eyesDistance() * 0.5))
2272
+ if (face.nose.x < ff.nose.x - ff.eyesDistance() * 0.5)
2267
2273
  this.presentedFacePose = FacePose.LookRight;
2268
2274
  /*
2269
2275
  if (
@@ -6008,7 +6014,8 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
6008
6014
 
6009
6015
  const IdentificationComponent = class {
6010
6016
  async onTokenChange(newValue, _oldValue) {
6011
- //console.log('Token change called with value: ' + newValue);
6017
+ if (state.debug)
6018
+ console.log('Token change called with value: ' + newValue);
6012
6019
  if (newValue == '') {
6013
6020
  newValue = state.token;
6014
6021
  return;
@@ -6019,7 +6026,8 @@ const IdentificationComponent = class {
6019
6026
  }
6020
6027
  }
6021
6028
  async onOrderIdChange(newValue, _oldValue) {
6022
- //console.log('OrderId change called with value: ' + newValue);
6029
+ if (state.debug)
6030
+ console.log('OrderId change called with value: ' + newValue);
6023
6031
  if (state.requestId !== newValue && newValue != '') {
6024
6032
  state.requestId = newValue;
6025
6033
  state.initialised = false;
@@ -6048,7 +6056,8 @@ const IdentificationComponent = class {
6048
6056
  }
6049
6057
  }
6050
6058
  async onRedirectIdChange(newValue, _oldValue) {
6051
- //console.log('RedirectId change called with value: ' + newValue);
6059
+ if (state.debug)
6060
+ console.log('RedirectId change called with value: ' + newValue);
6052
6061
  if (state.redirectId != '') {
6053
6062
  newValue = state.redirectId;
6054
6063
  return;
@@ -6121,13 +6130,15 @@ const IdentificationComponent = class {
6121
6130
  paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6122
6131
  };
6123
6132
  if (this.token) {
6124
- //console.log('Store Token set with property value: ' + this.token);
6133
+ if (state.debug)
6134
+ console.log('Store Token set with property value: ' + this.token);
6125
6135
  state.token = this.token;
6126
6136
  }
6127
6137
  else if (state.token == '') {
6128
6138
  state.token = sessionStorage.getItem(SessionKeys.TokenKey);
6129
6139
  this.token = state.token;
6130
- //console.log('Store Token set with session value: ' + store.token);
6140
+ if (state.debug)
6141
+ console.log('Store Token set with session value: ' + state.token);
6131
6142
  }
6132
6143
  if (this.redirect_id) {
6133
6144
  state.redirectId = this.redirect_id;
@@ -6160,16 +6171,19 @@ const IdentificationComponent = class {
6160
6171
  }
6161
6172
  const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
6162
6173
  if (this.order_id && this.order_id != '') {
6163
- //console.log('Current RequestId has value: ' + this.order_id);
6174
+ if (state.debug)
6175
+ console.log('Current RequestId has value: ' + this.order_id);
6164
6176
  if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
6165
- //console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
6177
+ if (state.debug)
6178
+ console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
6166
6179
  state.flowStatus = FlowStatus.LANDING;
6167
6180
  state.initialised = false;
6168
6181
  }
6169
6182
  state.requestId = this.order_id;
6170
6183
  }
6171
6184
  else if (savedRequest) {
6172
- //console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
6185
+ if (state.debug)
6186
+ console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
6173
6187
  state.requestId = savedRequest;
6174
6188
  this.order_id = savedRequest;
6175
6189
  }
@@ -9,7 +9,8 @@ import Events from '../../helpers/Events';
9
9
  import * as uuid from 'uuid';
10
10
  export class IdentificationComponent {
11
11
  async onTokenChange(newValue, _oldValue) {
12
- //console.log('Token change called with value: ' + newValue);
12
+ if (store.debug)
13
+ console.log('Token change called with value: ' + newValue);
13
14
  if (newValue == '') {
14
15
  newValue = store.token;
15
16
  return;
@@ -20,7 +21,8 @@ export class IdentificationComponent {
20
21
  }
21
22
  }
22
23
  async onOrderIdChange(newValue, _oldValue) {
23
- //console.log('OrderId change called with value: ' + newValue);
24
+ if (store.debug)
25
+ console.log('OrderId change called with value: ' + newValue);
24
26
  if (store.requestId !== newValue && newValue != '') {
25
27
  store.requestId = newValue;
26
28
  store.initialised = false;
@@ -49,7 +51,8 @@ export class IdentificationComponent {
49
51
  }
50
52
  }
51
53
  async onRedirectIdChange(newValue, _oldValue) {
52
- //console.log('RedirectId change called with value: ' + newValue);
54
+ if (store.debug)
55
+ console.log('RedirectId change called with value: ' + newValue);
53
56
  if (store.redirectId != '') {
54
57
  newValue = store.redirectId;
55
58
  return;
@@ -121,13 +124,15 @@ export class IdentificationComponent {
121
124
  paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
122
125
  };
123
126
  if (this.token) {
124
- //console.log('Store Token set with property value: ' + this.token);
127
+ if (store.debug)
128
+ console.log('Store Token set with property value: ' + this.token);
125
129
  store.token = this.token;
126
130
  }
127
131
  else if (store.token == '') {
128
132
  store.token = sessionStorage.getItem(SessionKeys.TokenKey);
129
133
  this.token = store.token;
130
- //console.log('Store Token set with session value: ' + store.token);
134
+ if (store.debug)
135
+ console.log('Store Token set with session value: ' + store.token);
131
136
  }
132
137
  if (this.redirect_id) {
133
138
  store.redirectId = this.redirect_id;
@@ -160,16 +165,19 @@ export class IdentificationComponent {
160
165
  }
161
166
  const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
162
167
  if (this.order_id && this.order_id != '') {
163
- //console.log('Current RequestId has value: ' + this.order_id);
168
+ if (store.debug)
169
+ console.log('Current RequestId has value: ' + this.order_id);
164
170
  if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
165
- //console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
171
+ if (store.debug)
172
+ console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
166
173
  store.flowStatus = FlowStatus.LANDING;
167
174
  store.initialised = false;
168
175
  }
169
176
  store.requestId = this.order_id;
170
177
  }
171
178
  else if (savedRequest) {
172
- //console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
179
+ if (store.debug)
180
+ console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
173
181
  store.requestId = savedRequest;
174
182
  this.order_id = savedRequest;
175
183
  }
@@ -55,7 +55,8 @@ export class ApiCall {
55
55
  return jsonResp.valid;
56
56
  }
57
57
  async AddIdentificationRequest(deviceInfo) {
58
- //console.log('Calling identity request with store:' + JSON.stringify(store));
58
+ if (store.debug)
59
+ console.log('Calling identity request with store:' + JSON.stringify(store));
59
60
  let data = {
60
61
  requestId: store.requestId,
61
62
  clientDeviceInfo: JSON.stringify(deviceInfo),
@@ -26,10 +26,13 @@ export class ML5 {
26
26
  });
27
27
  }
28
28
  loaded() {
29
- console.log('ML5 LOADED!!!');
29
+ if (store.debug)
30
+ console.log('ML5 LOADED!!!');
30
31
  }
31
32
  gotResults(error, results) {
32
- console.log(error);
33
- console.log(results);
33
+ if (store.debug)
34
+ console.log(error);
35
+ if (store.debug)
36
+ console.log(results);
34
37
  }
35
38
  }
@@ -4,6 +4,7 @@ import { SessionKeys } from './textValues';
4
4
  const { state, onChange } = createStore({
5
5
  flowStatus: FlowStatus.LANDING,
6
6
  environment: 'PROD',
7
+ debug: false,
7
8
  requestId: '',
8
9
  redirectId: '',
9
10
  initialised: false,
@@ -16,6 +17,9 @@ const { state, onChange } = createStore({
16
17
  phoneNumber: '',
17
18
  apiBaseUrl: 'https://apiro.id-kyc.com',
18
19
  });
20
+ onChange('environment', value => {
21
+ state.debug = value == 'QA';
22
+ });
19
23
  onChange('flowStatus', value => {
20
24
  sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
21
25
  });
@@ -7,6 +7,7 @@ import face_white_svg from '../../assets/canvas-masks/face_white.svg';
7
7
  // @ts-ignore
8
8
  import face_green_svg from '../../assets/canvas-masks/face_green.svg';
9
9
  import { GlobalValues } from '../../helpers/textValues';
10
+ import store from '../../helpers/store';
10
11
  export class FaceML5Detector {
11
12
  static getInstance(stream, isMobile) {
12
13
  if (!FaceML5Detector.instance) {
@@ -146,15 +147,12 @@ export class FaceML5Detector {
146
147
  const faceBox = result[0].detection.box;
147
148
  const { top, left, bottom, right } = faceBox;
148
149
  const { imageHeight, imageWidth } = result[0].detection;
149
- const topIndent = top * 100 / imageHeight;
150
- const leftIndent = left * 100 / imageWidth;
151
- const rightIndent = (imageWidth - right) * 100 / imageWidth;
152
- const bottomIndent = (imageHeight - bottom) * 100 / imageHeight;
150
+ const topIndent = (top * 100) / imageHeight;
151
+ const leftIndent = (left * 100) / imageWidth;
152
+ const rightIndent = ((imageWidth - right) * 100) / imageWidth;
153
+ const bottomIndent = ((imageHeight - bottom) * 100) / imageHeight;
153
154
  // console.log('indent: '+topIndent+' | '+leftIndent+' | '+rightIndent+' | '+bottomIndent);
154
- return !(topIndent < this.Y_OFFSET_FROM_FRAME ||
155
- leftIndent < this.X_OFFSET_FROM_FRAME ||
156
- rightIndent < this.X_OFFSET_FROM_FRAME ||
157
- bottomIndent < this.Y_OFFSET_FROM_FRAME);
155
+ return !(topIndent < this.Y_OFFSET_FROM_FRAME || leftIndent < this.X_OFFSET_FROM_FRAME || rightIndent < this.X_OFFSET_FROM_FRAME || bottomIndent < this.Y_OFFSET_FROM_FRAME);
158
156
  }
159
157
  async checkFacePose(results) {
160
158
  let face = new FaceLandmarks(results[0], this.width, this.height);
@@ -163,17 +161,18 @@ export class FaceML5Detector {
163
161
  if (this.frontFace == null) {
164
162
  this.frontFace = face;
165
163
  // await this.drawFrame('green');
166
- console.log('face ok');
164
+ if (store.debug)
165
+ console.log('face ok');
167
166
  }
168
167
  else if (this.frontFace != null && this.presentedFacePose == null) {
169
168
  let ff = this.frontFace;
170
- if (face.nose.y < ff.nose.y - (ff.eyesDistance() * 0.4))
169
+ if (face.nose.y < ff.nose.y - ff.eyesDistance() * 0.4)
171
170
  this.presentedFacePose = FacePose.LookUp;
172
- if (face.nose.y > ff.nose.y + (ff.eyesDistance() * 0.4))
171
+ if (face.nose.y > ff.nose.y + ff.eyesDistance() * 0.4)
173
172
  this.presentedFacePose = FacePose.LookDown;
174
- if (face.nose.x > ff.nose.x + (ff.eyesDistance() * 0.5))
173
+ if (face.nose.x > ff.nose.x + ff.eyesDistance() * 0.5)
175
174
  this.presentedFacePose = FacePose.LookLeft;
176
- if (face.nose.x < ff.nose.x - (ff.eyesDistance() * 0.5))
175
+ if (face.nose.x < ff.nose.x - ff.eyesDistance() * 0.5)
177
176
  this.presentedFacePose = FacePose.LookRight;
178
177
  /*
179
178
  if (
@@ -347,6 +347,7 @@ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
347
347
  const { state, onChange } = createStore({
348
348
  flowStatus: FlowStatus.LANDING,
349
349
  environment: 'PROD',
350
+ debug: false,
350
351
  requestId: '',
351
352
  redirectId: '',
352
353
  initialised: false,
@@ -359,6 +360,9 @@ const { state, onChange } = createStore({
359
360
  phoneNumber: '',
360
361
  apiBaseUrl: 'https://apiro.id-kyc.com',
361
362
  });
363
+ onChange('environment', value => {
364
+ state.debug = value == 'QA';
365
+ });
362
366
  onChange('flowStatus', value => {
363
367
  sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
364
368
  });
@@ -434,7 +438,8 @@ class ApiCall {
434
438
  return jsonResp.valid;
435
439
  }
436
440
  async AddIdentificationRequest(deviceInfo) {
437
- //console.log('Calling identity request with store:' + JSON.stringify(store));
441
+ if (state.debug)
442
+ console.log('Calling identity request with store:' + JSON.stringify(state));
438
443
  let data = {
439
444
  requestId: state.requestId,
440
445
  clientDeviceInfo: JSON.stringify(deviceInfo),
@@ -1887,11 +1892,14 @@ class ML5 {
1887
1892
  });
1888
1893
  }
1889
1894
  loaded() {
1890
- console.log('ML5 LOADED!!!');
1895
+ if (state.debug)
1896
+ console.log('ML5 LOADED!!!');
1891
1897
  }
1892
1898
  gotResults(error, results) {
1893
- console.log(error);
1894
- console.log(results);
1899
+ if (state.debug)
1900
+ console.log(error);
1901
+ if (state.debug)
1902
+ console.log(results);
1895
1903
  }
1896
1904
  }
1897
1905
 
@@ -2232,15 +2240,12 @@ class FaceML5Detector {
2232
2240
  const faceBox = result[0].detection.box;
2233
2241
  const { top, left, bottom, right } = faceBox;
2234
2242
  const { imageHeight, imageWidth } = result[0].detection;
2235
- const topIndent = top * 100 / imageHeight;
2236
- const leftIndent = left * 100 / imageWidth;
2237
- const rightIndent = (imageWidth - right) * 100 / imageWidth;
2238
- const bottomIndent = (imageHeight - bottom) * 100 / imageHeight;
2243
+ const topIndent = (top * 100) / imageHeight;
2244
+ const leftIndent = (left * 100) / imageWidth;
2245
+ const rightIndent = ((imageWidth - right) * 100) / imageWidth;
2246
+ const bottomIndent = ((imageHeight - bottom) * 100) / imageHeight;
2239
2247
  // console.log('indent: '+topIndent+' | '+leftIndent+' | '+rightIndent+' | '+bottomIndent);
2240
- return !(topIndent < this.Y_OFFSET_FROM_FRAME ||
2241
- leftIndent < this.X_OFFSET_FROM_FRAME ||
2242
- rightIndent < this.X_OFFSET_FROM_FRAME ||
2243
- bottomIndent < this.Y_OFFSET_FROM_FRAME);
2248
+ return !(topIndent < this.Y_OFFSET_FROM_FRAME || leftIndent < this.X_OFFSET_FROM_FRAME || rightIndent < this.X_OFFSET_FROM_FRAME || bottomIndent < this.Y_OFFSET_FROM_FRAME);
2244
2249
  }
2245
2250
  async checkFacePose(results) {
2246
2251
  let face = new FaceLandmarks(results[0], this.width, this.height);
@@ -2249,17 +2254,18 @@ class FaceML5Detector {
2249
2254
  if (this.frontFace == null) {
2250
2255
  this.frontFace = face;
2251
2256
  // await this.drawFrame('green');
2252
- console.log('face ok');
2257
+ if (state.debug)
2258
+ console.log('face ok');
2253
2259
  }
2254
2260
  else if (this.frontFace != null && this.presentedFacePose == null) {
2255
2261
  let ff = this.frontFace;
2256
- if (face.nose.y < ff.nose.y - (ff.eyesDistance() * 0.4))
2262
+ if (face.nose.y < ff.nose.y - ff.eyesDistance() * 0.4)
2257
2263
  this.presentedFacePose = FacePose.LookUp;
2258
- if (face.nose.y > ff.nose.y + (ff.eyesDistance() * 0.4))
2264
+ if (face.nose.y > ff.nose.y + ff.eyesDistance() * 0.4)
2259
2265
  this.presentedFacePose = FacePose.LookDown;
2260
- if (face.nose.x > ff.nose.x + (ff.eyesDistance() * 0.5))
2266
+ if (face.nose.x > ff.nose.x + ff.eyesDistance() * 0.5)
2261
2267
  this.presentedFacePose = FacePose.LookLeft;
2262
- if (face.nose.x < ff.nose.x - (ff.eyesDistance() * 0.5))
2268
+ if (face.nose.x < ff.nose.x - ff.eyesDistance() * 0.5)
2263
2269
  this.presentedFacePose = FacePose.LookRight;
2264
2270
  /*
2265
2271
  if (
@@ -6004,7 +6010,8 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
6004
6010
 
6005
6011
  const IdentificationComponent = class {
6006
6012
  async onTokenChange(newValue, _oldValue) {
6007
- //console.log('Token change called with value: ' + newValue);
6013
+ if (state.debug)
6014
+ console.log('Token change called with value: ' + newValue);
6008
6015
  if (newValue == '') {
6009
6016
  newValue = state.token;
6010
6017
  return;
@@ -6015,7 +6022,8 @@ const IdentificationComponent = class {
6015
6022
  }
6016
6023
  }
6017
6024
  async onOrderIdChange(newValue, _oldValue) {
6018
- //console.log('OrderId change called with value: ' + newValue);
6025
+ if (state.debug)
6026
+ console.log('OrderId change called with value: ' + newValue);
6019
6027
  if (state.requestId !== newValue && newValue != '') {
6020
6028
  state.requestId = newValue;
6021
6029
  state.initialised = false;
@@ -6044,7 +6052,8 @@ const IdentificationComponent = class {
6044
6052
  }
6045
6053
  }
6046
6054
  async onRedirectIdChange(newValue, _oldValue) {
6047
- //console.log('RedirectId change called with value: ' + newValue);
6055
+ if (state.debug)
6056
+ console.log('RedirectId change called with value: ' + newValue);
6048
6057
  if (state.redirectId != '') {
6049
6058
  newValue = state.redirectId;
6050
6059
  return;
@@ -6117,13 +6126,15 @@ const IdentificationComponent = class {
6117
6126
  paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
6118
6127
  };
6119
6128
  if (this.token) {
6120
- //console.log('Store Token set with property value: ' + this.token);
6129
+ if (state.debug)
6130
+ console.log('Store Token set with property value: ' + this.token);
6121
6131
  state.token = this.token;
6122
6132
  }
6123
6133
  else if (state.token == '') {
6124
6134
  state.token = sessionStorage.getItem(SessionKeys.TokenKey);
6125
6135
  this.token = state.token;
6126
- //console.log('Store Token set with session value: ' + store.token);
6136
+ if (state.debug)
6137
+ console.log('Store Token set with session value: ' + state.token);
6127
6138
  }
6128
6139
  if (this.redirect_id) {
6129
6140
  state.redirectId = this.redirect_id;
@@ -6156,16 +6167,19 @@ const IdentificationComponent = class {
6156
6167
  }
6157
6168
  const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
6158
6169
  if (this.order_id && this.order_id != '') {
6159
- //console.log('Current RequestId has value: ' + this.order_id);
6170
+ if (state.debug)
6171
+ console.log('Current RequestId has value: ' + this.order_id);
6160
6172
  if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
6161
- //console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
6173
+ if (state.debug)
6174
+ console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
6162
6175
  state.flowStatus = FlowStatus.LANDING;
6163
6176
  state.initialised = false;
6164
6177
  }
6165
6178
  state.requestId = this.order_id;
6166
6179
  }
6167
6180
  else if (savedRequest) {
6168
- //console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
6181
+ if (state.debug)
6182
+ console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
6169
6183
  state.requestId = savedRequest;
6170
6184
  this.order_id = savedRequest;
6171
6185
  }