@xsolla/payment-client-core 0.1.9 → 0.1.11

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.
Files changed (37) hide show
  1. package/esm2020/lib/core/errors-mapping/card-number-sanction-error-codes.const.mjs +5 -0
  2. package/esm2020/lib/core/errors-mapping/field-special-errors-map.const.mjs +9 -0
  3. package/esm2020/lib/core/errors-mapping/xps-response-errors-mapping.service.mjs +52 -0
  4. package/esm2020/lib/core/payment/form/controls/checkbox/checkbox-control.config.mjs +1 -3
  5. package/esm2020/lib/core/payment/form/converters/checkbox/checkbox.converter.mjs +2 -3
  6. package/esm2020/lib/core/payment/form/field-status.interface.mjs +1 -1
  7. package/esm2020/lib/core/payment/initialize/initialize.service.mjs +9 -6
  8. package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
  9. package/esm2020/lib/core/payment/payment.service.mjs +2 -1
  10. package/esm2020/lib/core/payment/status/check-status/check-status.service.mjs +8 -5
  11. package/esm2020/lib/core/payment/submit/submit.service.mjs +11 -6
  12. package/esm2020/lib/core/payment/sync/sync.service.mjs +16 -9
  13. package/esm2020/lib/core-library.module.mjs +5 -4
  14. package/esm2020/lib/core-library.service.mjs +4 -2
  15. package/esm2020/lib/shared/pipes/pipes.module.mjs +17 -0
  16. package/esm2020/lib/shared/pipes/unescape-html/unescape-html.pipe.mjs +23 -0
  17. package/fesm2015/xsolla-payment-client-core.mjs +131 -29
  18. package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
  19. package/fesm2020/xsolla-payment-client-core.mjs +137 -28
  20. package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
  21. package/lib/core/errors-mapping/card-number-sanction-error-codes.const.d.ts +1 -0
  22. package/lib/core/errors-mapping/field-special-errors-map.const.d.ts +5 -0
  23. package/lib/core/errors-mapping/xps-response-errors-mapping.service.d.ts +12 -0
  24. package/lib/core/payment/form/controls/checkbox/checkbox-control.config.d.ts +2 -2
  25. package/lib/core/payment/form/field-status.interface.d.ts +1 -0
  26. package/lib/core/payment/initialize/initialize.service.d.ts +3 -1
  27. package/lib/core/payment/payment.interface.d.ts +0 -1
  28. package/lib/core/payment/status/check-status/check-status.service.d.ts +3 -1
  29. package/lib/core/payment/submit/submit.service.d.ts +3 -1
  30. package/lib/core/payment/sync/sync.service.d.ts +4 -1
  31. package/lib/core-library.module.d.ts +2 -1
  32. package/lib/core-library.service.d.ts +2 -0
  33. package/lib/shared/pipes/pipes.module.d.ts +7 -0
  34. package/lib/shared/pipes/unescape-html/unescape-html.pipe.d.ts +7 -0
  35. package/package.json +1 -1
  36. package/xsolla-payment-client-core-0.1.11.tgz +0 -0
  37. package/xsolla-payment-client-core-0.1.9.tgz +0 -0
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject, isDevMode, NgModule } from '@angular/core';
2
+ import { InjectionToken, Injectable, Inject, Pipe, isDevMode, NgModule } from '@angular/core';
3
3
  import { firstValueFrom, lastValueFrom, map, Subject, BehaviorSubject, filter as filter$1, takeUntil, skip, throwError } from 'rxjs';
4
4
  import * as i1 from '@angular/common/http';
5
5
  import { HttpParams, HttpHeaders, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
@@ -927,6 +927,87 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
927
927
  args: [nextActionsToken]
928
928
  }] }, { type: i0.Injector }]; } });
929
929
 
930
+ /* eslint-disable @typescript-eslint/no-magic-numbers */
931
+ const cardNumberSanctionErrorCodes = [
932
+ 2034, 2035, 5027, 5024, 5025, 2036,
933
+ ];
934
+
935
+ const fieldSpecialErrorsMap = [
936
+ {
937
+ errorCodes: new Set(cardNumberSanctionErrorCodes),
938
+ fieldName: FieldNames.cardNumber,
939
+ },
940
+ ];
941
+
942
+ class UnescapeHtmlPipe {
943
+ transform(html) {
944
+ if (!html) {
945
+ return '';
946
+ }
947
+ if (html.includes('&gt')) {
948
+ const messageDocument = new DOMParser().parseFromString(html, 'text/html');
949
+ return messageDocument?.documentElement?.textContent ?? '';
950
+ }
951
+ return html;
952
+ }
953
+ }
954
+ UnescapeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: UnescapeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
955
+ UnescapeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: UnescapeHtmlPipe, name: "unescapeHtml" });
956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: UnescapeHtmlPipe, decorators: [{
957
+ type: Pipe,
958
+ args: [{
959
+ name: 'unescapeHtml',
960
+ }]
961
+ }] });
962
+
963
+ class XpsResponseErrorsMappingService {
964
+ constructor(unescapeHtmlPipe) {
965
+ this.unescapeHtmlPipe = unescapeHtmlPipe;
966
+ }
967
+ mapErrors(response) {
968
+ if (!response.errors?.length) {
969
+ return response;
970
+ }
971
+ let mappedErrors = this.mapFieldSpecialErrors(response.errors);
972
+ mappedErrors = this.unescapeErrorsText(mappedErrors);
973
+ return {
974
+ ...response,
975
+ errors: mappedErrors,
976
+ };
977
+ }
978
+ mapFieldSpecialErrors(errors) {
979
+ return errors.map((error) => {
980
+ if (!error.element_name) {
981
+ const errorMap = fieldSpecialErrorsMap.find((map) => map.errorCodes.has(error.code));
982
+ if (errorMap) {
983
+ return {
984
+ ...error,
985
+ element_name: errorMap.fieldName,
986
+ };
987
+ }
988
+ }
989
+ return error;
990
+ });
991
+ }
992
+ unescapeErrorsText(errors) {
993
+ return errors.map((error) => {
994
+ if (!error.message) {
995
+ return error;
996
+ }
997
+ return {
998
+ ...error,
999
+ message: this.unescapeHtmlPipe.transform(error.message),
1000
+ };
1001
+ });
1002
+ }
1003
+ }
1004
+ XpsResponseErrorsMappingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: XpsResponseErrorsMappingService, deps: [{ token: UnescapeHtmlPipe }], target: i0.ɵɵFactoryTarget.Injectable });
1005
+ XpsResponseErrorsMappingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: XpsResponseErrorsMappingService, providedIn: 'root' });
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: XpsResponseErrorsMappingService, decorators: [{
1007
+ type: Injectable,
1008
+ args: [{ providedIn: 'root' }]
1009
+ }], ctorParameters: function () { return [{ type: UnescapeHtmlPipe }]; } });
1010
+
930
1011
  var ErrorTags;
931
1012
  (function (ErrorTags) {
932
1013
  ErrorTags["APP"] = "appError";
@@ -1329,12 +1410,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1329
1410
  }], ctorParameters: function () { return [{ type: CreditCardService }]; } });
1330
1411
 
1331
1412
  class InitializeService {
1332
- constructor(responseFactory, xpsApiService, settingsService, countryService, nextActionService, encryptCreditCardService) {
1413
+ constructor(responseFactory, xpsApiService, settingsService, countryService, nextActionService, xpsResponseErrorsMappingService, encryptCreditCardService) {
1333
1414
  this.responseFactory = responseFactory;
1334
1415
  this.xpsApiService = xpsApiService;
1335
1416
  this.settingsService = settingsService;
1336
1417
  this.countryService = countryService;
1337
1418
  this.nextActionService = nextActionService;
1419
+ this.xpsResponseErrorsMappingService = xpsResponseErrorsMappingService;
1338
1420
  this.encryptCreditCardService = encryptCreditCardService;
1339
1421
  // TODO PAYMENTS-15743: replace with new refer id for headless core
1340
1422
  this.ps4ReferId = '22';
@@ -1349,7 +1431,8 @@ class InitializeService {
1349
1431
  };
1350
1432
  return this.xpsApiService
1351
1433
  .directPaymentRequest(requestParams)
1352
- .then((response) => {
1434
+ .then((xpsResponse) => {
1435
+ const response = this.xpsResponseErrorsMappingService.mapErrors(xpsResponse);
1353
1436
  const initializeResponse = this.responseFactory(response);
1354
1437
  if (initializeResponse.paymentForm?.errors?.length) {
1355
1438
  this.nextActionService.emitFlowUpdates(new ShowErrorsAction(initializeResponse.paymentForm.errors));
@@ -1371,7 +1454,7 @@ class InitializeService {
1371
1454
  this.encryptCreditCardService.setPublicKey(atob(publicKeyField.value));
1372
1455
  }
1373
1456
  }
1374
- InitializeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, deps: [{ token: initializeResponseFactoryToken }, { token: XpsApiService }, { token: SettingsService }, { token: CountryService }, { token: NextActionService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1457
+ InitializeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, deps: [{ token: initializeResponseFactoryToken }, { token: XpsApiService }, { token: SettingsService }, { token: CountryService }, { token: NextActionService }, { token: XpsResponseErrorsMappingService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1375
1458
  InitializeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, providedIn: 'root' });
1376
1459
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, decorators: [{
1377
1460
  type: Injectable,
@@ -1381,7 +1464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1381
1464
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
1382
1465
  type: Inject,
1383
1466
  args: [initializeResponseFactoryToken]
1384
- }] }, { type: XpsApiService }, { type: SettingsService }, { type: CountryService }, { type: NextActionService }, { type: EncryptCreditCardService }]; } });
1467
+ }] }, { type: XpsApiService }, { type: SettingsService }, { type: CountryService }, { type: NextActionService }, { type: XpsResponseErrorsMappingService }, { type: EncryptCreditCardService }]; } });
1385
1468
 
1386
1469
  class XpsApiPartRequest {
1387
1470
  addXpsParameters(parameters) {
@@ -1496,12 +1579,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1496
1579
  }], ctorParameters: function () { return [{ type: SettingsService }]; } });
1497
1580
 
1498
1581
  class SubmitService {
1499
- constructor(requestFactory, responseFactory, settingsService, deviceFingerPrintService, xpsApiService, encryptCreditCardService) {
1582
+ constructor(requestFactory, responseFactory, settingsService, deviceFingerPrintService, xpsApiService, xpsResponseErrorsMappingService, encryptCreditCardService) {
1500
1583
  this.requestFactory = requestFactory;
1501
1584
  this.responseFactory = responseFactory;
1502
1585
  this.settingsService = settingsService;
1503
1586
  this.deviceFingerPrintService = deviceFingerPrintService;
1504
1587
  this.xpsApiService = xpsApiService;
1588
+ this.xpsResponseErrorsMappingService = xpsResponseErrorsMappingService;
1505
1589
  this.encryptCreditCardService = encryptCreditCardService;
1506
1590
  }
1507
1591
  // NB: Never add 'async' statement for this method!
@@ -1522,14 +1606,17 @@ class SubmitService {
1522
1606
  const encryptedRequest = this.encryptCreditCardService.encryptCreditCard(requestParams);
1523
1607
  return this.xpsApiService
1524
1608
  .directPaymentRequest(encryptedRequest)
1525
- .then((response) => this.responseFactory(response))
1609
+ .then((xpsResponse) => {
1610
+ const response = this.xpsResponseErrorsMappingService.mapErrors(xpsResponse);
1611
+ return this.responseFactory(response);
1612
+ })
1526
1613
  .catch((error) => {
1527
1614
  throw new ResponseError(error.message);
1528
1615
  });
1529
1616
  }));
1530
1617
  }
1531
1618
  }
1532
- SubmitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SubmitService, deps: [{ token: submitRequestFactoryToken }, { token: submitResponseFactoryToken }, { token: SettingsService }, { token: DeviceFingerPrintService }, { token: XpsApiService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1619
+ SubmitService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SubmitService, deps: [{ token: submitRequestFactoryToken }, { token: submitResponseFactoryToken }, { token: SettingsService }, { token: DeviceFingerPrintService }, { token: XpsApiService }, { token: XpsResponseErrorsMappingService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1533
1620
  SubmitService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SubmitService, providedIn: 'root' });
1534
1621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SubmitService, decorators: [{
1535
1622
  type: Injectable,
@@ -1540,7 +1627,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1540
1627
  }] }, { type: undefined, decorators: [{
1541
1628
  type: Inject,
1542
1629
  args: [submitResponseFactoryToken]
1543
- }] }, { type: SettingsService }, { type: DeviceFingerPrintService }, { type: XpsApiService }, { type: EncryptCreditCardService }]; } });
1630
+ }] }, { type: SettingsService }, { type: DeviceFingerPrintService }, { type: XpsApiService }, { type: XpsResponseErrorsMappingService }, { type: EncryptCreditCardService }]; } });
1544
1631
 
1545
1632
  class EmitDataService {
1546
1633
  constructor() {
@@ -1612,13 +1699,14 @@ const syncResponseFactoryProvider = {
1612
1699
  };
1613
1700
 
1614
1701
  class SyncService extends EmitDataService {
1615
- constructor(requestFactory, responseFactory, xpsApiService, nextActionService, settingsService, encryptCreditCardService) {
1702
+ constructor(requestFactory, responseFactory, xpsApiService, nextActionService, settingsService, xpsResponseErrorsMappingService, encryptCreditCardService) {
1616
1703
  super();
1617
1704
  this.requestFactory = requestFactory;
1618
1705
  this.responseFactory = responseFactory;
1619
1706
  this.xpsApiService = xpsApiService;
1620
1707
  this.nextActionService = nextActionService;
1621
1708
  this.settingsService = settingsService;
1709
+ this.xpsResponseErrorsMappingService = xpsResponseErrorsMappingService;
1622
1710
  this.encryptCreditCardService = encryptCreditCardService;
1623
1711
  this.prevFieldSyncStates = {};
1624
1712
  this.form = new UntypedFormGroup({});
@@ -1679,10 +1767,9 @@ class SyncService extends EmitDataService {
1679
1767
  const encryptedRequest = this.encryptCreditCardService.encryptCreditCard(requestParams);
1680
1768
  return this.xpsApiService
1681
1769
  .directPaymentRequest(encryptedRequest)
1682
- .then((response) => {
1683
- if (response.errors?.length) {
1684
- this.nextActionService.emitFlowUpdates(new ShowErrorsAction(response.errors));
1685
- }
1770
+ .then((xpsResponse) => {
1771
+ const response = this.xpsResponseErrorsMappingService.mapErrors(xpsResponse);
1772
+ this.emitFormErrors(response);
1686
1773
  this.emit(response);
1687
1774
  return this.responseFactory(field, response);
1688
1775
  });
@@ -1698,8 +1785,14 @@ class SyncService extends EmitDataService {
1698
1785
  setPrevFieldSyncState(field, value, result) {
1699
1786
  this.prevFieldSyncStates[field.name] = { value, result };
1700
1787
  }
1788
+ emitFormErrors(response) {
1789
+ const formErrors = response.errors?.filter((error) => !error.element_name);
1790
+ if (formErrors?.length) {
1791
+ this.nextActionService.emitFlowUpdates(new ShowErrorsAction(formErrors));
1792
+ }
1793
+ }
1701
1794
  }
1702
- SyncService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SyncService, deps: [{ token: syncRequestFactoryToken }, { token: syncResponseFactoryToken }, { token: XpsApiService }, { token: NextActionService }, { token: SettingsService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1795
+ SyncService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SyncService, deps: [{ token: syncRequestFactoryToken }, { token: syncResponseFactoryToken }, { token: XpsApiService }, { token: NextActionService }, { token: SettingsService }, { token: XpsResponseErrorsMappingService }, { token: EncryptCreditCardService }], target: i0.ɵɵFactoryTarget.Injectable });
1703
1796
  SyncService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SyncService, providedIn: 'root' });
1704
1797
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SyncService, decorators: [{
1705
1798
  type: Injectable,
@@ -1712,7 +1805,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
1712
1805
  }] }, { type: undefined, decorators: [{
1713
1806
  type: Inject,
1714
1807
  args: [syncResponseFactoryToken]
1715
- }] }, { type: XpsApiService }, { type: NextActionService }, { type: SettingsService }, { type: EncryptCreditCardService }]; } });
1808
+ }] }, { type: XpsApiService }, { type: NextActionService }, { type: SettingsService }, { type: XpsResponseErrorsMappingService }, { type: EncryptCreditCardService }]; } });
1716
1809
 
1717
1810
  class ControlConfig {
1718
1811
  constructor() {
@@ -2341,8 +2434,6 @@ class CheckboxControlConfig extends ControlConfig {
2341
2434
  constructor() {
2342
2435
  super(...arguments);
2343
2436
  this.controlType = 'checkbox';
2344
- this.checkedValue = true; // eslint-disable-line @typescript-eslint/no-explicit-any
2345
- this.uncheckedValue = false; // eslint-disable-line @typescript-eslint/no-explicit-any
2346
2437
  }
2347
2438
  }
2348
2439
 
@@ -2362,8 +2453,7 @@ class CheckboxConverter extends Converter {
2362
2453
  createControlConfig(field) {
2363
2454
  const config = this.createDefaultControlConfig(CheckboxControlConfig, field);
2364
2455
  config.placeholder = config.title;
2365
- config.checkedValue = this.checkedValue;
2366
- config.uncheckedValue = this.uncheckedValue;
2456
+ config.initValue = field.value;
2367
2457
  return config;
2368
2458
  }
2369
2459
  }
@@ -3769,10 +3859,11 @@ const checkStatusResponseFactoryProvider = {
3769
3859
  };
3770
3860
 
3771
3861
  class CheckStatusService extends XpsApiPart {
3772
- constructor(xpsApiService, settingsService, requestFactory, responseFactory) {
3862
+ constructor(xpsApiService, settingsService, xpsResponseErrorsMappingService, requestFactory, responseFactory) {
3773
3863
  super();
3774
3864
  this.xpsApiService = xpsApiService;
3775
3865
  this.settingsService = settingsService;
3866
+ this.xpsResponseErrorsMappingService = xpsResponseErrorsMappingService;
3776
3867
  this.requestFactory = requestFactory;
3777
3868
  this.responseFactory = responseFactory;
3778
3869
  }
@@ -3783,7 +3874,8 @@ class CheckStatusService extends XpsApiPart {
3783
3874
  const requestParams = this.requestFactory(this.settingsService.token, this.invoice);
3784
3875
  this.xpsApiService
3785
3876
  .directPaymentRequest(requestParams)
3786
- .then((response) => {
3877
+ .then((xpsResponse) => {
3878
+ const response = this.xpsResponseErrorsMappingService.mapErrors(xpsResponse);
3787
3879
  const checkStatusResponse = this.responseFactory({
3788
3880
  status: response.status,
3789
3881
  final: response.final,
@@ -3796,14 +3888,14 @@ class CheckStatusService extends XpsApiPart {
3796
3888
  });
3797
3889
  }
3798
3890
  }
3799
- CheckStatusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CheckStatusService, deps: [{ token: XpsApiService }, { token: SettingsService }, { token: checkStatusRequestFactoryToken }, { token: checkStatusResponseFactoryToken }], target: i0.ɵɵFactoryTarget.Injectable });
3891
+ CheckStatusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CheckStatusService, deps: [{ token: XpsApiService }, { token: SettingsService }, { token: XpsResponseErrorsMappingService }, { token: checkStatusRequestFactoryToken }, { token: checkStatusResponseFactoryToken }], target: i0.ɵɵFactoryTarget.Injectable });
3800
3892
  CheckStatusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CheckStatusService, providedIn: 'root' });
3801
3893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CheckStatusService, decorators: [{
3802
3894
  type: Injectable,
3803
3895
  args: [{
3804
3896
  providedIn: 'root',
3805
3897
  }]
3806
- }], ctorParameters: function () { return [{ type: XpsApiService }, { type: SettingsService }, { type: undefined, decorators: [{
3898
+ }], ctorParameters: function () { return [{ type: XpsApiService }, { type: SettingsService }, { type: XpsResponseErrorsMappingService }, { type: undefined, decorators: [{
3807
3899
  type: Inject,
3808
3900
  args: [checkStatusRequestFactoryToken]
3809
3901
  }] }, { type: undefined, decorators: [{
@@ -5077,6 +5169,7 @@ class PaymentService {
5077
5169
  validationStatus: control.status,
5078
5170
  errors: control.errors,
5079
5171
  isFocused: this.focusFieldName === name,
5172
+ isTouched: control.touched,
5080
5173
  };
5081
5174
  });
5082
5175
  this.formFieldsStatusSubject.next(formFieldsStatus);
@@ -5265,7 +5358,6 @@ class CoreLibraryService {
5265
5358
  getFinanceDetails: () => this.paymentService.getFinanceDetails(),
5266
5359
  runThreeDs: () => this.paymentService.runThreeDs(),
5267
5360
  getStatus: async () => this.paymentService.getStatus(),
5268
- flowUpdates$: this.nextActionService.flowUpdates$,
5269
5361
  financeDetailsUpdates$: this.financeDetailsService.data$,
5270
5362
  form: {
5271
5363
  fieldsStatus$: this.paymentService.formFieldsStatus$,
@@ -5283,6 +5375,9 @@ class CoreLibraryService {
5283
5375
  cardTypeUpdates$: this.creditCardStateService.data$,
5284
5376
  };
5285
5377
  }
5378
+ get flowUpdates$() {
5379
+ return this.nextActionService.flowUpdates$;
5380
+ }
5286
5381
  get financeDetailsUpdates$() {
5287
5382
  return this.financeDetailsService.data$;
5288
5383
  }
@@ -5444,10 +5539,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
5444
5539
  }]
5445
5540
  }] });
5446
5541
 
5542
+ class PipesModule {
5543
+ }
5544
+ PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5545
+ PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: PipesModule, declarations: [UnescapeHtmlPipe], exports: [UnescapeHtmlPipe] });
5546
+ PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PipesModule, providers: [UnescapeHtmlPipe] });
5547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PipesModule, decorators: [{
5548
+ type: NgModule,
5549
+ args: [{
5550
+ declarations: [UnescapeHtmlPipe],
5551
+ providers: [UnescapeHtmlPipe],
5552
+ exports: [UnescapeHtmlPipe],
5553
+ }]
5554
+ }] });
5555
+
5447
5556
  class CoreLibraryModule {
5448
5557
  }
5449
5558
  CoreLibraryModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5450
- CoreLibraryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, imports: [HttpClientModule, FormModule] });
5559
+ CoreLibraryModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, imports: [HttpClientModule, FormModule, PipesModule] });
5451
5560
  CoreLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, providers: [
5452
5561
  {
5453
5562
  provide: HTTP_INTERCEPTORS,
@@ -5476,11 +5585,11 @@ CoreLibraryModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
5476
5585
  },
5477
5586
  ...nextActions,
5478
5587
  ...flowUpdateNextActions,
5479
- ], imports: [HttpClientModule, FormModule] });
5588
+ ], imports: [HttpClientModule, FormModule, PipesModule] });
5480
5589
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryModule, decorators: [{
5481
5590
  type: NgModule,
5482
5591
  args: [{
5483
- imports: [HttpClientModule, FormModule],
5592
+ imports: [HttpClientModule, FormModule, PipesModule],
5484
5593
  providers: [
5485
5594
  {
5486
5595
  provide: HTTP_INTERCEPTORS,