@xsolla/payment-client-core 0.1.13-test → 0.1.13

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.
@@ -5023,29 +5023,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
5023
5023
  }]
5024
5024
  }], ctorParameters: function () { return [{ type: ThreeDs20Service }, { type: NextActionService }]; } });
5025
5025
 
5026
- class FormMessagesService extends EmitDataService {
5027
- emitOnResponse(messages) {
5028
- if (!messages) {
5029
- return;
5030
- }
5031
- const mapInfoMessages = (infoMessage) => infoMessage.message;
5032
- super.emit(messages.map(mapInfoMessages));
5033
- }
5034
- }
5035
- FormMessagesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
5036
- FormMessagesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, providedIn: 'root' });
5037
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FormMessagesService, decorators: [{
5038
- type: Injectable,
5039
- args: [{
5040
- providedIn: 'root',
5041
- }]
5042
- }] });
5043
-
5044
5026
  class PaymentService {
5045
5027
  get formFieldsStatus$() {
5046
5028
  return this.formFieldsStatusSubject.asObservable().pipe(filter$1(Boolean));
5047
5029
  }
5048
- constructor(initializeService, submitService, syncService, formService, statusService, financeDetailsService, creditCardStateService, nextActionService, controlConfigService, threeDsService, formMessagesService) {
5030
+ constructor(initializeService, submitService, syncService, formService, statusService, financeDetailsService, creditCardStateService, nextActionService, controlConfigService, threeDsService) {
5049
5031
  this.initializeService = initializeService;
5050
5032
  this.submitService = submitService;
5051
5033
  this.syncService = syncService;
@@ -5056,7 +5038,6 @@ class PaymentService {
5056
5038
  this.nextActionService = nextActionService;
5057
5039
  this.controlConfigService = controlConfigService;
5058
5040
  this.threeDsService = threeDsService;
5059
- this.formMessagesService = formMessagesService;
5060
5041
  this.form = null;
5061
5042
  this.data = null;
5062
5043
  this.financeDetails = null;
@@ -5078,7 +5059,6 @@ class PaymentService {
5078
5059
  this.listenFormStatusChanges(this.form);
5079
5060
  this.emitFinanceDetails(this.data.paymentForm?.summary);
5080
5061
  this.emitFormFieldsStatus(this.form);
5081
- this.emitFormMessages(this.data.paymentForm?.messages);
5082
5062
  return this.fields.filter((field) => field?.isVisible === "1" /* XpsBoolean.true */);
5083
5063
  }
5084
5064
  async submit() {
@@ -5093,7 +5073,6 @@ class PaymentService {
5093
5073
  const submitResponse = await this.submitService.request(this.fields, this.form);
5094
5074
  this.data = submitResponse;
5095
5075
  this.emitFinanceDetails(submitResponse.summary);
5096
- this.emitFormMessages(submitResponse.messages);
5097
5076
  // Handle 3ds flow
5098
5077
  if (submitResponse.currentCommand === XpsCommand.create) {
5099
5078
  this.runThreeDs();
@@ -5199,16 +5178,12 @@ class PaymentService {
5199
5178
  });
5200
5179
  this.formFieldsStatusSubject.next(formFieldsStatus);
5201
5180
  }
5202
- emitFormMessages(messages) {
5203
- this.formMessagesService.emitOnResponse(messages);
5204
- }
5205
5181
  setupSyncService(form, fields) {
5206
5182
  this.syncService.setup(form, fields);
5207
5183
  this.syncService.data$
5208
5184
  .pipe(takeUntil(this.destroy$))
5209
5185
  .subscribe((response) => {
5210
5186
  this.emitFinanceDetails(response.summary);
5211
- this.emitFormMessages(response.messages);
5212
5187
  });
5213
5188
  this.syncService.fieldAsyncValidation$
5214
5189
  .pipe(takeUntil(this.destroy$))
@@ -5230,14 +5205,14 @@ class PaymentService {
5230
5205
  .subscribe(() => this.emitFormFieldsStatus(form));
5231
5206
  }
5232
5207
  }
5233
- 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 });
5208
+ 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 });
5234
5209
  PaymentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, providedIn: 'root' });
5235
5210
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, decorators: [{
5236
5211
  type: Injectable,
5237
5212
  args: [{
5238
5213
  providedIn: 'root',
5239
5214
  }]
5240
- }], 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 }]; } });
5215
+ }], ctorParameters: function () { return [{ type: InitializeService }, { type: SubmitService }, { type: SyncService }, { type: FormService }, { type: StatusService }, { type: FinanceDetailsService }, { type: CreditCardStateService }, { type: NextActionService }, { type: ControlConfigService }, { type: ThreeDsService }]; } });
5241
5216
 
5242
5217
  class RefundPolicyService {
5243
5218
  constructor(settingsService) {
@@ -5342,7 +5317,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
5342
5317
  }], ctorParameters: function () { return [{ type: SettingsService }, { type: RefundPolicyService }, { type: SecureConnectionService }, { type: DisclaimerService }]; } });
5343
5318
 
5344
5319
  class CoreLibraryService {
5345
- constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService, formMessagesService) {
5320
+ constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, paymentConfigService, paymentService, deviceFingerPrintService, financeDetailsService, legalService, statusService, nextActionService, creditCardService, creditCardStateService) {
5346
5321
  this.settingsService = settingsService;
5347
5322
  this.countryService = countryService;
5348
5323
  this.paymentMethodsService = paymentMethodsService;
@@ -5357,7 +5332,6 @@ class CoreLibraryService {
5357
5332
  this.nextActionService = nextActionService;
5358
5333
  this.creditCardService = creditCardService;
5359
5334
  this.creditCardStateService = creditCardStateService;
5360
- this.formMessagesService = formMessagesService;
5361
5335
  this.paymentMethods = {
5362
5336
  getList: async () => this.paymentMethodsService.getList(),
5363
5337
  getQuickMethods: async () => this.paymentMethodsService.getQuickMethods(),
@@ -5395,7 +5369,6 @@ class CoreLibraryService {
5395
5369
  changeFieldValue: (name, value) => this.paymentService.changeFieldValue(name, value),
5396
5370
  changeFieldState: (name, state) => this.paymentService.changeFieldState(name, state),
5397
5371
  updateFieldFormState: (fieldName, formState) => this.paymentService.updateFieldFormState(fieldName, formState),
5398
- formMessages$: this.formMessagesService.data$,
5399
5372
  },
5400
5373
  };
5401
5374
  }
@@ -5426,14 +5399,14 @@ class CoreLibraryService {
5426
5399
  return this.userBalanceService.getUserBalanceValue();
5427
5400
  }
5428
5401
  }
5429
- 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 });
5402
+ 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 });
5430
5403
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
5431
5404
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
5432
5405
  type: Injectable,
5433
5406
  args: [{
5434
5407
  providedIn: 'root',
5435
5408
  }]
5436
- }], 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 }]; } });
5409
+ }], 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 }]; } });
5437
5410
 
5438
5411
  class HttpError extends AppError {
5439
5412
  constructor(error, req) {