@xsolla/payment-client-core 0.1.12-test2 → 0.1.12

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.
@@ -5020,29 +5020,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
5020
5020
  }]
5021
5021
  }], ctorParameters: function () { return [{ type: ThreeDs20Service }, { type: NextActionService }]; } });
5022
5022
 
5023
- class FormMessagesService extends EmitDataService {
5024
- emitOnResponse(messages) {
5025
- if (!messages) {
5026
- return;
5027
- }
5028
- const mapInfoMessages = (infoMessage) => infoMessage.message;
5029
- super.emit(messages.map(mapInfoMessages));
5030
- }
5031
- }
5032
- FormMessagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5033
- FormMessagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, providedIn: 'root' });
5034
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, decorators: [{
5035
- type: Injectable,
5036
- args: [{
5037
- providedIn: 'root',
5038
- }]
5039
- }] });
5040
-
5041
5023
  class PaymentService {
5042
5024
  get formFieldsStatus$() {
5043
5025
  return this.formFieldsStatusSubject.asObservable().pipe(filter$1(Boolean));
5044
5026
  }
5045
- constructor(initializeService, submitService, syncService, formService, statusService, financeDetailsService, creditCardStateService, nextActionService, controlConfigService, threeDsService, formMessagesService) {
5027
+ constructor(initializeService, submitService, syncService, formService, statusService, financeDetailsService, creditCardStateService, nextActionService, controlConfigService, threeDsService) {
5046
5028
  this.initializeService = initializeService;
5047
5029
  this.submitService = submitService;
5048
5030
  this.syncService = syncService;
@@ -5053,7 +5035,6 @@ class PaymentService {
5053
5035
  this.nextActionService = nextActionService;
5054
5036
  this.controlConfigService = controlConfigService;
5055
5037
  this.threeDsService = threeDsService;
5056
- this.formMessagesService = formMessagesService;
5057
5038
  this.form = null;
5058
5039
  this.data = null;
5059
5040
  this.financeDetails = null;
@@ -5075,7 +5056,6 @@ class PaymentService {
5075
5056
  this.listenFormStatusChanges(this.form);
5076
5057
  this.emitFinanceDetails(this.data.paymentForm?.summary);
5077
5058
  this.emitFormFieldsStatus(this.form);
5078
- this.emitFormMessages(this.data.paymentForm?.messages);
5079
5059
  return this.fields.filter((field) => field?.isVisible === "1" /* XpsBoolean.true */);
5080
5060
  }
5081
5061
  async submit() {
@@ -5090,7 +5070,6 @@ class PaymentService {
5090
5070
  const submitResponse = await this.submitService.request(this.fields, this.form);
5091
5071
  this.data = submitResponse;
5092
5072
  this.emitFinanceDetails(submitResponse.summary);
5093
- this.emitFormMessages(submitResponse.messages);
5094
5073
  // Handle 3ds flow
5095
5074
  if (submitResponse.currentCommand === XpsCommand.create) {
5096
5075
  this.runThreeDs();
@@ -5196,16 +5175,12 @@ class PaymentService {
5196
5175
  });
5197
5176
  this.formFieldsStatusSubject.next(formFieldsStatus);
5198
5177
  }
5199
- emitFormMessages(messages) {
5200
- this.formMessagesService.emitOnResponse(messages);
5201
- }
5202
5178
  setupSyncService(form, fields) {
5203
5179
  this.syncService.setup(form, fields);
5204
5180
  this.syncService.data$
5205
5181
  .pipe(takeUntil(this.destroy$))
5206
5182
  .subscribe((response) => {
5207
5183
  this.emitFinanceDetails(response.summary);
5208
- this.emitFormMessages(response.messages);
5209
5184
  });
5210
5185
  this.syncService.fieldAsyncValidation$
5211
5186
  .pipe(takeUntil(this.destroy$))
@@ -5227,14 +5202,14 @@ class PaymentService {
5227
5202
  .subscribe(() => this.emitFormFieldsStatus(form));
5228
5203
  }
5229
5204
  }
5230
- PaymentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, deps: [{ token: InitializeService }, { token: SubmitService }, { token: SyncService }, { token: FormService }, { token: StatusService }, { token: FinanceDetailsService }, { token: CreditCardStateService }, { token: NextActionService }, { token: ControlConfigService }, { token: ThreeDsService }, { token: FormMessagesService }], target: i0.ɵɵFactoryTarget.Injectable });
5205
+ PaymentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, deps: [{ token: InitializeService }, { token: SubmitService }, { token: SyncService }, { token: FormService }, { token: StatusService }, { token: FinanceDetailsService }, { token: CreditCardStateService }, { token: NextActionService }, { token: ControlConfigService }, { token: ThreeDsService }], target: i0.ɵɵFactoryTarget.Injectable });
5231
5206
  PaymentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, providedIn: 'root' });
5232
5207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, decorators: [{
5233
5208
  type: Injectable,
5234
5209
  args: [{
5235
5210
  providedIn: 'root',
5236
5211
  }]
5237
- }], ctorParameters: function () { return [{ type: InitializeService }, { type: SubmitService }, { type: SyncService }, { type: FormService }, { type: StatusService }, { type: FinanceDetailsService }, { type: CreditCardStateService }, { type: NextActionService }, { type: ControlConfigService }, { type: ThreeDsService }, { type: FormMessagesService }]; } });
5212
+ }], ctorParameters: function () { return [{ type: InitializeService }, { type: SubmitService }, { type: SyncService }, { type: FormService }, { type: StatusService }, { type: FinanceDetailsService }, { type: CreditCardStateService }, { type: NextActionService }, { type: ControlConfigService }, { type: ThreeDsService }]; } });
5238
5213
 
5239
5214
  class RefundPolicyService {
5240
5215
  constructor(settingsService) {
@@ -5339,7 +5314,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
5339
5314
  }], ctorParameters: function () { return [{ type: SettingsService }, { type: RefundPolicyService }, { type: SecureConnectionService }, { type: DisclaimerService }]; } });
5340
5315
 
5341
5316
  class CoreLibraryService {
5342
- constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService) {
5317
+ constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService) {
5343
5318
  this.settingsService = settingsService;
5344
5319
  this.countryService = countryService;
5345
5320
  this.paymentMethodsService = paymentMethodsService;
@@ -5354,7 +5329,6 @@ class CoreLibraryService {
5354
5329
  this.nextActionService = nextActionService;
5355
5330
  this.creditCardService = creditCardService;
5356
5331
  this.creditCardStateService = creditCardStateService;
5357
- this.formMessagesService = formMessagesService;
5358
5332
  this.paymentMethods = {
5359
5333
  getList: async () => this.paymentMethodsService.getList(),
5360
5334
  getQuickMethods: async () => this.paymentMethodsService.getQuickMethods(),
@@ -5392,7 +5366,6 @@ class CoreLibraryService {
5392
5366
  changeFieldValue: (name, value) => this.paymentService.changeFieldValue(name, value),
5393
5367
  changeFieldState: (name, state) => this.paymentService.changeFieldState(name, state),
5394
5368
  updateFieldFormState: (fieldName, formState) => this.paymentService.updateFieldFormState(fieldName, formState),
5395
- formMessages$: this.formMessagesService.data$,
5396
5369
  },
5397
5370
  };
5398
5371
  }
@@ -5420,14 +5393,14 @@ class CoreLibraryService {
5420
5393
  return masksFunctionsMap[sanitizedName];
5421
5394
  }
5422
5395
  }
5423
- CoreLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, deps: [{ token: SettingsService }, { token: CountryService }, { token: PaymentMethodsService }, { token: SavedMethodsService }, { token: UserBalanceService }, { token: PaymentConfigService }, { token: PaymentService }, { token: DeviceFingerPrintService }, { token: FinanceDetailsService }, { token: LegalService }, { token: StatusService }, { token: NextActionService }, { token: CreditCardService }, { token: CreditCardStateService }, { token: FormMessagesService }], target: i0.ɵɵFactoryTarget.Injectable });
5396
+ CoreLibraryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, deps: [{ token: SettingsService }, { token: CountryService }, { token: PaymentMethodsService }, { token: SavedMethodsService }, { token: UserBalanceService }, { token: PaymentConfigService }, { token: PaymentService }, { token: DeviceFingerPrintService }, { token: FinanceDetailsService }, { token: LegalService }, { token: StatusService }, { token: NextActionService }, { token: CreditCardService }, { token: CreditCardStateService }], target: i0.ɵɵFactoryTarget.Injectable });
5424
5397
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
5425
5398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
5426
5399
  type: Injectable,
5427
5400
  args: [{
5428
5401
  providedIn: 'root',
5429
5402
  }]
5430
- }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentConfigService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: StatusService }, { type: NextActionService }, { type: CreditCardService }, { type: CreditCardStateService }, { type: FormMessagesService }]; } });
5403
+ }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: PaymentConfigService }, { type: PaymentService }, { type: DeviceFingerPrintService }, { type: FinanceDetailsService }, { type: LegalService }, { type: StatusService }, { type: NextActionService }, { type: CreditCardService }, { type: CreditCardStateService }]; } });
5431
5404
 
5432
5405
  class HttpError extends AppError {
5433
5406
  constructor(error, req) {