@xsolla/payment-client-core 0.0.3 → 0.0.4

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 (73) hide show
  1. package/esm2020/lib/core/boolean-string.enum.mjs +6 -0
  2. package/esm2020/lib/core/legal/disclaimer.service.mjs +16 -0
  3. package/esm2020/lib/core/legal/legal.component.config.mjs +2 -0
  4. package/esm2020/lib/core/legal/legal.service.mjs +39 -0
  5. package/esm2020/lib/core/legal/refund-policy.service.mjs +30 -0
  6. package/esm2020/lib/core/legal/secure-connection.service.mjs +31 -0
  7. package/esm2020/lib/core/payment/actions/action.type.mjs +2 -0
  8. package/esm2020/lib/core/payment/actions/check-status.action.type.mjs +2 -0
  9. package/esm2020/lib/core/payment/actions/next-action.type.mjs +2 -0
  10. package/esm2020/lib/core/payment/checkout-item.interface.mjs +2 -0
  11. package/esm2020/lib/core/payment/field.interface.mjs +2 -0
  12. package/esm2020/lib/core/payment/finance-details.interface.mjs +2 -0
  13. package/esm2020/lib/core/payment/initialize-request-params.interface.mjs +2 -0
  14. package/esm2020/lib/core/payment/initialize.service.mjs +39 -0
  15. package/esm2020/lib/core/payment/invoice.interface.mjs +2 -0
  16. package/esm2020/lib/core/payment/payment-config.interface.mjs +2 -0
  17. package/esm2020/lib/core/payment/payment.interface.mjs +2 -0
  18. package/esm2020/lib/core/payment/payment.service.mjs +41 -0
  19. package/esm2020/lib/core/payment/status/finance-info-field.interface.mjs +2 -0
  20. package/esm2020/lib/core/payment/status/line-item.interface.mjs +2 -0
  21. package/esm2020/lib/core/payment/status/status.enum.mjs +12 -0
  22. package/esm2020/lib/core/payment/status/status.interface.mjs +2 -0
  23. package/esm2020/lib/core/payment/status/title-class.enum.mjs +7 -0
  24. package/esm2020/lib/core/payment/status/web-socket-client-type.enum.mjs +6 -0
  25. package/esm2020/lib/core/payment/virtual-currency.interface.mjs +2 -0
  26. package/esm2020/lib/core/payment/xps-comand.enum.mjs +10 -0
  27. package/esm2020/lib/core/payment/xps-error.interface.mjs +2 -0
  28. package/esm2020/lib/core/payment/xps-message.interface.mjs +2 -0
  29. package/esm2020/lib/core/payment/xps-response.interface.mjs +2 -0
  30. package/esm2020/lib/core/payment/xps-subscription-item.interface.mjs +2 -0
  31. package/esm2020/lib/core/saved-methods/saved-methods.service.mjs +5 -7
  32. package/esm2020/lib/core-library.service.mjs +22 -4
  33. package/esm2020/public-api.mjs +2 -1
  34. package/fesm2015/xsolla-payment-client-core.mjs +200 -7
  35. package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
  36. package/fesm2020/xsolla-payment-client-core.mjs +193 -7
  37. package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
  38. package/lib/core/boolean-string.enum.d.ts +4 -0
  39. package/lib/core/legal/disclaimer.service.d.ts +6 -0
  40. package/lib/core/legal/legal.component.config.d.ts +10 -0
  41. package/lib/core/legal/legal.service.d.ts +18 -0
  42. package/lib/core/legal/refund-policy.service.d.ts +11 -0
  43. package/lib/core/legal/secure-connection.service.d.ts +13 -0
  44. package/lib/core/payment/actions/action.type.d.ts +4 -0
  45. package/lib/core/payment/actions/check-status.action.type.d.ts +12 -0
  46. package/lib/core/payment/actions/next-action.type.d.ts +2 -0
  47. package/lib/core/payment/checkout-item.interface.d.ts +11 -0
  48. package/lib/core/payment/field.interface.d.ts +26 -0
  49. package/lib/core/payment/finance-details.interface.d.ts +2 -0
  50. package/lib/core/payment/initialize-request-params.interface.d.ts +6 -0
  51. package/lib/core/payment/initialize.service.d.ts +16 -0
  52. package/lib/core/payment/invoice.interface.d.ts +14 -0
  53. package/lib/core/payment/payment-config.interface.d.ts +5 -0
  54. package/lib/core/payment/payment.interface.d.ts +14 -0
  55. package/lib/core/payment/payment.service.d.ts +22 -0
  56. package/lib/core/payment/status/finance-info-field.interface.d.ts +5 -0
  57. package/lib/core/payment/status/line-item.interface.d.ts +8 -0
  58. package/lib/core/payment/status/status.enum.d.ts +10 -0
  59. package/lib/core/payment/status/status.interface.d.ts +63 -0
  60. package/lib/core/payment/status/title-class.enum.d.ts +5 -0
  61. package/lib/core/payment/status/web-socket-client-type.enum.d.ts +4 -0
  62. package/lib/core/payment/virtual-currency.interface.d.ts +10 -0
  63. package/lib/core/payment/xps-comand.enum.d.ts +8 -0
  64. package/lib/core/payment/xps-error.interface.d.ts +6 -0
  65. package/lib/core/payment/xps-message.interface.d.ts +4 -0
  66. package/lib/core/payment/xps-response.interface.d.ts +264 -0
  67. package/lib/core/payment/xps-subscription-item.interface.d.ts +20 -0
  68. package/lib/core/saved-methods/saved-methods.service.d.ts +1 -3
  69. package/lib/core-library.service.d.ts +10 -1
  70. package/package.json +1 -1
  71. package/public-api.d.ts +1 -0
  72. package/xsolla-payment-client-core-0.0.4.tgz +0 -0
  73. package/xsolla-payment-client-core-0.0.3.tgz +0 -0
@@ -299,10 +299,9 @@ const savedMethodsResponseFactoryProvider = {
299
299
  };
300
300
 
301
301
  class SavedMethodsService {
302
- constructor(responseFactory, settingsService, countryService, secureApi) {
302
+ constructor(responseFactory, settingsService, secureApi) {
303
303
  this.responseFactory = responseFactory;
304
304
  this.settingsService = settingsService;
305
- this.countryService = countryService;
306
305
  this.secureApi = secureApi;
307
306
  this.apiRoute = 'savedmethods';
308
307
  this.cache = new Map();
@@ -330,7 +329,7 @@ class SavedMethodsService {
330
329
  return this.cache.get(cacheKey);
331
330
  }
332
331
  }
333
- SavedMethodsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SavedMethodsService, deps: [{ token: savedMethodsResponseFactoryToken }, { token: SettingsService }, { token: CountryService }, { token: SecureApiClient }], target: i0.ɵɵFactoryTarget.Injectable });
332
+ SavedMethodsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SavedMethodsService, deps: [{ token: savedMethodsResponseFactoryToken }, { token: SettingsService }, { token: SecureApiClient }], target: i0.ɵɵFactoryTarget.Injectable });
334
333
  SavedMethodsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SavedMethodsService, providedIn: 'root' });
335
334
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SavedMethodsService, decorators: [{
336
335
  type: Injectable,
@@ -340,7 +339,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
340
339
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
341
340
  type: Inject,
342
341
  args: [savedMethodsResponseFactoryToken]
343
- }] }, { type: SettingsService }, { type: CountryService }, { type: SecureApiClient }]; } });
342
+ }] }, { type: SettingsService }, { type: SecureApiClient }]; } });
344
343
 
345
344
  class UserBalanceResponse {
346
345
  constructor(userBalance) {
@@ -398,13 +397,186 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImpor
398
397
  args: [userBalanceResponseFactoryToken]
399
398
  }] }, { type: SettingsService }, { type: SecureApiClient }]; } });
400
399
 
400
+ class RefundPolicyService {
401
+ constructor(settingsService) {
402
+ this.settingsService = settingsService;
403
+ this.defaultVersionId = 2;
404
+ this.defaultUrl = 'https://xsolla.com/refund-policy-ps';
405
+ }
406
+ get url() {
407
+ if (!this.settingsService.token) {
408
+ return 'https://xsolla.com/refundpolicy/en-us';
409
+ }
410
+ const language = this.settingsService.user.local ?? 'en';
411
+ const versionId = this.settingsService.project.refundPolicySettings?.policy_version_id ??
412
+ this.defaultVersionId;
413
+ const countryIso = this.settingsService.user.country.value ?? '';
414
+ const projectId = this.settingsService.project.id;
415
+ return `${this.defaultUrl}?policy_version_id=${versionId}&language=${language}&country=${countryIso}&project_id=${projectId}`;
416
+ }
417
+ }
418
+ RefundPolicyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RefundPolicyService, deps: [{ token: SettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
419
+ RefundPolicyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RefundPolicyService, providedIn: 'root' });
420
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: RefundPolicyService, decorators: [{
421
+ type: Injectable,
422
+ args: [{
423
+ providedIn: 'root',
424
+ }]
425
+ }], ctorParameters: function () { return [{ type: SettingsService }]; } });
426
+
427
+ class SecureConnectionService {
428
+ get isWhiteLabel() {
429
+ return !!this.settingsService.settings?.white_label;
430
+ }
431
+ get secureConnectionUrl() {
432
+ this.setSecureConnectionUrl();
433
+ return this._secureConnectionUrl;
434
+ }
435
+ constructor(settingsService) {
436
+ this.settingsService = settingsService;
437
+ this.secureConnectionApi = 'https://verify.xsolla.com/?url=';
438
+ }
439
+ setSecureConnectionUrl() {
440
+ const projectUrl = this.settingsService.project?.projectUrl;
441
+ if (projectUrl) {
442
+ this._secureConnectionUrl = `${this.secureConnectionApi}${encodeURIComponent(projectUrl)}`;
443
+ }
444
+ }
445
+ }
446
+ SecureConnectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureConnectionService, deps: [{ token: SettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
447
+ SecureConnectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureConnectionService, providedIn: 'root' });
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: SecureConnectionService, decorators: [{
449
+ type: Injectable,
450
+ args: [{
451
+ providedIn: 'root',
452
+ }]
453
+ }], ctorParameters: function () { return [{ type: SettingsService }]; } });
454
+
455
+ class DisclaimerService {
456
+ constructor() {
457
+ this.disclaimer = 'disclaimer';
458
+ }
459
+ }
460
+ DisclaimerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DisclaimerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
461
+ DisclaimerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DisclaimerService, providedIn: 'root' });
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: DisclaimerService, decorators: [{
463
+ type: Injectable,
464
+ args: [{
465
+ providedIn: 'root',
466
+ }]
467
+ }] });
468
+
469
+ class LegalService {
470
+ get isJapanUser() {
471
+ return this.settingsService.user?.local === 'ja';
472
+ }
473
+ constructor(settingsService, refundPolicyService, secureConnectionService, disclaimerService) {
474
+ this.settingsService = settingsService;
475
+ this.refundPolicyService = refundPolicyService;
476
+ this.secureConnectionService = secureConnectionService;
477
+ this.disclaimerService = disclaimerService;
478
+ this.sctlPolicyUrl = 'https://xsolla.com/sctl';
479
+ }
480
+ getLegalComponentConfig() {
481
+ return {
482
+ isJapanUser: this.isJapanUser,
483
+ refundPolicyUrl: this.refundPolicyService.url,
484
+ sctlPolicyUrl: this.sctlPolicyUrl,
485
+ secureConnection: {
486
+ secureConnectionUrl: this.secureConnectionService.secureConnectionUrl,
487
+ isWhiteLabel: this.secureConnectionService.isWhiteLabel,
488
+ },
489
+ disclaimer: this.disclaimerService.disclaimer,
490
+ };
491
+ }
492
+ }
493
+ LegalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LegalService, deps: [{ token: SettingsService }, { token: RefundPolicyService }, { token: SecureConnectionService }, { token: DisclaimerService }], target: i0.ɵɵFactoryTarget.Injectable });
494
+ LegalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LegalService, providedIn: 'root' });
495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: LegalService, decorators: [{
496
+ type: Injectable,
497
+ args: [{
498
+ providedIn: 'root',
499
+ }]
500
+ }], ctorParameters: function () { return [{ type: SettingsService }, { type: RefundPolicyService }, { type: SecureConnectionService }, { type: DisclaimerService }]; } });
501
+
502
+ class InitializeService {
503
+ constructor(secureApi, settingsService, countryService) {
504
+ this.secureApi = secureApi;
505
+ this.settingsService = settingsService;
506
+ this.countryService = countryService;
507
+ this.apiRoute = 'directpayment';
508
+ }
509
+ async request(config) {
510
+ const requestParams = {
511
+ access_token: this.settingsService.token,
512
+ pid: String(config.paymentMethodId),
513
+ country: this.countryService.getCountry(),
514
+ returnUrl: config.returnUrl,
515
+ };
516
+ return lastValueFrom(this.secureApi.post(this.apiRoute, new URLSearchParams({ ...requestParams }), {
517
+ headers: new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'),
518
+ responseType: 'json',
519
+ })).catch((error) => {
520
+ throw new ResponseError(error.message);
521
+ });
522
+ }
523
+ }
524
+ InitializeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, deps: [{ token: SecureApiClient }, { token: SettingsService }, { token: CountryService }], target: i0.ɵɵFactoryTarget.Injectable });
525
+ InitializeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, providedIn: 'root' });
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: InitializeService, decorators: [{
527
+ type: Injectable,
528
+ args: [{
529
+ providedIn: 'root',
530
+ }]
531
+ }], ctorParameters: function () { return [{ type: SecureApiClient }, { type: SettingsService }, { type: CountryService }]; } });
532
+
533
+ class PaymentService {
534
+ constructor(initializeService) {
535
+ this.initializeService = initializeService;
536
+ this.data = null;
537
+ }
538
+ async initialize(config) {
539
+ this.data = await this.initializeService.request(config);
540
+ return this.data;
541
+ }
542
+ submit() {
543
+ throw new Error('Method not implemented.');
544
+ }
545
+ getFields() {
546
+ throw new Error('Method not implemented.');
547
+ }
548
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
549
+ validate(field) {
550
+ throw new Error('Method not implemented.');
551
+ }
552
+ runThreeDs() {
553
+ throw new Error('Method not implemented.');
554
+ }
555
+ getFinanceDetails() {
556
+ throw new Error('Method not implemented.');
557
+ }
558
+ getStatus() {
559
+ throw new Error('Method not implemented.');
560
+ }
561
+ }
562
+ PaymentService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, deps: [{ token: InitializeService }], target: i0.ɵɵFactoryTarget.Injectable });
563
+ PaymentService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, providedIn: 'root' });
564
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: PaymentService, decorators: [{
565
+ type: Injectable,
566
+ args: [{
567
+ providedIn: 'root',
568
+ }]
569
+ }], ctorParameters: function () { return [{ type: InitializeService }]; } });
570
+
401
571
  class CoreLibraryService {
402
- constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService) {
572
+ constructor(settingsService, countryService, paymentMethodsService, savedMethodsService, userBalanceService, legalService, paymentService) {
403
573
  this.settingsService = settingsService;
404
574
  this.countryService = countryService;
405
575
  this.paymentMethodsService = paymentMethodsService;
406
576
  this.savedMethodsService = savedMethodsService;
407
577
  this.userBalanceService = userBalanceService;
578
+ this.legalService = legalService;
579
+ this.paymentService = paymentService;
408
580
  this.paymentMethods = {
409
581
  getList: async () => this.paymentMethodsService.getList(),
410
582
  getQuickMethods: async () => this.paymentMethodsService.getQuickMethods(),
@@ -418,15 +590,29 @@ class CoreLibraryService {
418
590
  setCountry(country) {
419
591
  this.countryService.setCountry(country);
420
592
  }
593
+ createPayment(config) {
594
+ return {
595
+ initialize: async () => this.paymentService.initialize(config),
596
+ submit: () => this.paymentService.submit(),
597
+ getFields: () => this.paymentService.getFields(),
598
+ validate: (field) => this.paymentService.validate(field),
599
+ getFinanceDetails: () => this.paymentService.getFinanceDetails(),
600
+ runThreeDs: () => this.paymentService.runThreeDs(),
601
+ getStatus: () => this.paymentService.getStatus(),
602
+ };
603
+ }
604
+ getLegalComponentConfig() {
605
+ return this.legalService.getLegalComponentConfig();
606
+ }
421
607
  }
422
- 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 }], target: i0.ɵɵFactoryTarget.Injectable });
608
+ 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: LegalService }, { token: PaymentService }], target: i0.ɵɵFactoryTarget.Injectable });
423
609
  CoreLibraryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, providedIn: 'root' });
424
610
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: CoreLibraryService, decorators: [{
425
611
  type: Injectable,
426
612
  args: [{
427
613
  providedIn: 'root',
428
614
  }]
429
- }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }]; } });
615
+ }], ctorParameters: function () { return [{ type: SettingsService }, { type: CountryService }, { type: PaymentMethodsService }, { type: SavedMethodsService }, { type: UserBalanceService }, { type: LegalService }, { type: PaymentService }]; } });
430
616
 
431
617
  class HttpError extends AppError {
432
618
  constructor(error, req) {
@@ -1 +1 @@
1
- {"version":3,"file":"xsolla-payment-client-core.mjs","sources":["../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/app-error.class.ts","../../../packages/payment-client-core/src/lib/core/settings/empty-utils-response.error.ts","../../../packages/payment-client-core/src/lib/core/window.token.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/api-url.const.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/secure-api.service.ts","../../../packages/payment-client-core/src/lib/core/settings/settings.service.ts","../../../packages/payment-client-core/src/lib/core/country/country.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/response-error.class.ts","../../../packages/payment-client-core/src/lib/core/boolean-number.enum.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods.service.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods.service.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.class.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.token.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance.service.ts","../../../packages/payment-client-core/src/lib/core-library.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/http-error.class.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.ts","../../../packages/payment-client-core/src/lib/core-library.module.ts","../../../packages/payment-client-core/src/public-api.ts","../../../packages/payment-client-core/src/xsolla-payment-client-core.ts"],"sourcesContent":["export class AppError extends Error {\n public constructor(message: string) {\n super(message);\n }\n}\n","import { AppError } from '../exceptions-handling/errors/app-error.class';\n\nexport class EmptyUtilsResponseError extends AppError {\n public constructor() {\n super('Utils response is empty or not requested. Check your token.');\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ExtendedWindow } from './extended-window.interface';\n\nexport const windowToken: InjectionToken<ExtendedWindow> = new InjectionToken(\n 'window'\n);\n","export const defaultApiUrl = 'https://secure.xsolla.com/paystation2/api/';\nexport const sandboxApiUrl =\n 'https://sandbox-secure.xsolla.com/paystation2/api/';\n","import { Observable } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { windowToken } from '../../window.token';\nimport { ExtendedWindow } from '../../extended-window.interface';\nimport { RequestOptions } from './options.interface';\nimport { defaultApiUrl, sandboxApiUrl } from './api-url.const';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SecureApiClient {\n private isSandboxMode = false;\n\n public constructor(\n private readonly httpClient: HttpClient,\n @Inject(windowToken)\n private readonly window: ExtendedWindow\n ) {}\n\n public setSandboxMode(isSandboxMode: boolean): void {\n this.isSandboxMode = isSandboxMode;\n }\n\n public get<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.get<T>(`${this.baseUrl}${url}`, options);\n }\n\n public post<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.post<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public patch<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.patch<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public put<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.put<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public delete<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.delete<T>(`${this.baseUrl}${url}`, options);\n }\n\n public get baseUrl(): string {\n let predefinedBaseUrl: string | null = null;\n\n try {\n predefinedBaseUrl = this.window.localStorage.getItem('devApiUrl');\n } catch (e: unknown) {\n console.warn('localStorage is not available');\n }\n\n if (predefinedBaseUrl) {\n return predefinedBaseUrl;\n }\n\n return this.isSandboxMode ? sandboxApiUrl : defaultApiUrl;\n }\n}\n","import { firstValueFrom } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { HttpParams } from '@angular/common/http';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { DeepReadonly } from '../deep-readonly.type';\nimport { InitConfiguration } from './configuration.interface';\nimport { EmptyUtilsResponseError } from './empty-utils-response.error';\nimport { User } from './user.interface';\nimport { Settings } from './settings.interface';\nimport { Purchase } from './purchase.interface';\nimport { Project } from './project.interface';\nimport { UtilsResponse } from './utils-response.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n public get project(): DeepReadonly<Project> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.project;\n }\n\n public get purchase(): DeepReadonly<Purchase> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.purchase;\n }\n\n public get settings(): DeepReadonly<Settings> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n if (this.response?.purchase_external_id) {\n return {\n ...this.response.settings,\n purchase_external_id: this.response.purchase_external_id,\n };\n }\n\n return this.response?.settings;\n }\n\n public get user(): DeepReadonly<User> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.user;\n }\n\n public get utilsResponse(): DeepReadonly<UtilsResponse> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response;\n }\n\n public get isEmpty(): boolean {\n return !this.response;\n }\n\n public get token(): string {\n return this._token;\n }\n\n public get hasResponse(): boolean {\n return !!this.response;\n }\n\n public isInitialized = false;\n\n private response!: DeepReadonly<UtilsResponse> | undefined;\n\n private _token = '';\n\n private sandboxMode = false;\n\n public constructor(private readonly secureApi: SecureApiClient) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n if (!configuration.token) {\n return Promise.reject('token is missing');\n }\n\n this._token = configuration.token;\n this.sandboxMode = !!configuration.sandbox;\n\n await this.sendRequest(this.token);\n\n this.isInitialized = true;\n }\n\n public isSandboxMode(): boolean {\n return this.sandboxMode;\n }\n\n private async sendRequest(token: string): Promise<void> {\n const params = new HttpParams().set('access_token', token);\n\n this.secureApi.setSandboxMode(this.isSandboxMode());\n\n this.response = await firstValueFrom(\n this.secureApi.get<UtilsResponse>('utils', { params })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CountryService {\n private userDefinedCountry: string | null = null;\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n public setCountry(country: string): void {\n this.userDefinedCountry = country;\n }\n\n public getCountry(): string {\n return this.userDefinedCountry ?? this.getTokenCountry();\n }\n\n private getTokenCountry(): string {\n return this.settingsService.user.country.value;\n }\n}\n","import { AppError } from './app-error.class';\n\nexport class ResponseError extends AppError {\n public constructor(message?: string) {\n super('Response failed' + (message ? `: \"${message}\".` : '.'));\n }\n}\n","export enum BooleanNumber {\n false = 0,\n true = 1,\n}\n","import { BooleanNumber } from '../boolean-number.enum';\nimport { PaymentMethodApi } from './payment-method-api.interface';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsApi } from './payment-methods-api.interface';\n\nexport class PaymentMethodsResponse {\n public readonly top: PaymentMethod[];\n public readonly especial: PaymentMethod[];\n public readonly remained: PaymentMethod[];\n public readonly remainedCount: { total: number; visible: number };\n\n public constructor(paymentMethods: PaymentMethodsApi) {\n this.especial = paymentMethods.especial.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.top = paymentMethods.top.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remained = paymentMethods.remained.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remainedCount = {\n total: paymentMethods.remained_count.total,\n visible: paymentMethods.remained_count.visible,\n };\n }\n\n private mapPaymentMethod(method: PaymentMethodApi): PaymentMethod {\n return {\n id: method.id,\n rank: method.rank,\n name: method.name,\n aliases: method.aliases,\n categories: method.cat,\n isVisible: method.is_visible,\n recommended: method.recommended === BooleanNumber.true,\n enabledSaveAccount: method.enabled_save_account,\n iconName: method.switch_icon_name,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof PaymentMethodsResponse>;\n\nexport type PaymentMethodsResponseFactory = (\n ...args: ResponseParameters\n) => PaymentMethodsResponse;\n\nexport const paymentMethodsResponseFactoryToken: InjectionToken<PaymentMethodsResponseFactory> =\n new InjectionToken<PaymentMethodsResponseFactory>('PaymentMethodsResponse');\n\nexport const paymentMethodsResponseFactoryProvider: ValueProvider = {\n provide: paymentMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) =>\n new PaymentMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsRequestParams } from './payment-methods-request-params.interface';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\nimport { PaymentMethodsResponseApi } from './payment-methods-response.interface';\nimport {\n PaymentMethodsResponseFactory,\n paymentMethodsResponseFactoryToken,\n} from './payment-methods-response.token';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentMethodsService {\n private readonly apiRoute = 'remained_payment_methods';\n\n private readonly cache = new Map<string, Promise<PaymentMethodsResponse>>();\n\n public constructor(\n @Inject(paymentMethodsResponseFactoryToken)\n private readonly responseFactory: PaymentMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.remained;\n }\n\n public async getQuickMethods(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.especial;\n }\n\n private async request(): Promise<PaymentMethodsResponse> {\n const requestParams: PaymentMethodsRequestParams = {\n access_token: this.settingsService.token,\n country: this.countryService.getCountry(),\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<PaymentMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(\n map((response) => this.responseFactory(response.payment_methods))\n )\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport { SavedMethodApi } from './saved-method-api.interface';\nimport { SavedMethod } from './saved-method.interface';\n\nexport class SavedMethodsResponse {\n public readonly list: SavedMethod[];\n\n public constructor(savedMethods: SavedMethodsResponseApi) {\n this.list = savedMethods.list.map((method) => this.mapSavedMethod(method));\n }\n\n private mapSavedMethod(method: SavedMethodApi): SavedMethod {\n return {\n currency: method.currency,\n form: method.form,\n id: method.id,\n isSelected: method.isSelected,\n isBabkaPay: method.is_babka_pay,\n name: method.name,\n pid: method.pid,\n psName: method.psName,\n recurrentType: method.recurrent_type,\n replaced: method.replaced,\n type: method.type,\n cardExpiryDate: method.card_expiry_date,\n iconName: method.switch_icon_name,\n partner: method.partner,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof SavedMethodsResponse>;\n\nexport type SavedMethodsResponseFactory = (\n ...args: ResponseParameters\n) => SavedMethodsResponse;\n\nexport const savedMethodsResponseFactoryToken: InjectionToken<SavedMethodsResponseFactory> =\n new InjectionToken<SavedMethodsResponseFactory>('SavedMethodsResponse');\n\nexport const savedMethodsResponseFactoryProvider: ValueProvider = {\n provide: savedMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new SavedMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { SavedMethodsRequestParams } from './saved-methods-request-params.interface';\nimport { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport {\n SavedMethodsResponseFactory,\n savedMethodsResponseFactoryToken,\n} from './saved-methods-response.token';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\nimport { SavedMethod } from './saved-method.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SavedMethodsService {\n private readonly apiRoute = 'savedmethods';\n\n private readonly cache = new Map<string, Promise<SavedMethodsResponse>>();\n\n public constructor(\n @Inject(savedMethodsResponseFactoryToken)\n private readonly responseFactory: SavedMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<SavedMethod[]> {\n const response = await this.request();\n return response.list;\n }\n\n private async request(): Promise<SavedMethodsResponse> {\n const requestParams: SavedMethodsRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<SavedMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { UserBalanceApi } from './user-balance-api.interface';\n\nexport class UserBalanceResponse {\n public readonly isEnoughUserBalance: boolean;\n public readonly isEnoughUserRecurrentBalance: boolean;\n\n public constructor(userBalance: UserBalanceApi) {\n this.isEnoughUserBalance = userBalance.is_enough_user_balance ?? false;\n this.isEnoughUserRecurrentBalance =\n userBalance.is_enough_user_recurrent_balance ?? false;\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { UserBalanceResponse } from './user-balance-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof UserBalanceResponse>;\n\nexport type UserBalanceResponseFactory = (\n ...args: ResponseParameters\n) => UserBalanceResponse;\n\nexport const userBalanceResponseFactoryToken: InjectionToken<UserBalanceResponseFactory> =\n new InjectionToken<UserBalanceResponseFactory>('UserBalanceResponse');\n\nexport const userBalanceResponseFactoryProvider: ValueProvider = {\n provide: userBalanceResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new UserBalanceResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport {\n UserBalanceResponseFactory,\n userBalanceResponseFactoryToken,\n} from './user-balance-response.token';\nimport { UserBalanceResponse } from './user-balance-response.class';\nimport { UserBalanceRequestParams } from './user-balance-request-params.interface';\nimport { UserBalanceApi } from './user-balance-api.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserBalanceService {\n private readonly apiRoute = 'balance/sufficiency';\n\n private readonly cache = new Map<string, Promise<UserBalanceResponse>>();\n\n public constructor(\n @Inject(userBalanceResponseFactoryToken)\n private readonly responseFactory: UserBalanceResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getUserBalance(): Promise<UserBalanceResponse> {\n return this.request();\n }\n\n private async request(): Promise<UserBalanceResponse> {\n const requestParams: UserBalanceRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<UserBalanceApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InitConfiguration } from './core/settings/configuration.interface';\nimport { SettingsService } from './core/settings/settings.service';\nimport { CountryService } from './core/country/country.service';\nimport { PaymentMethodsService } from './core/payment-methods/payment-methods.service';\nimport { PaymentMethod } from './core/payment-methods/payment-method.interface';\nimport { SavedMethodsService } from './core/saved-methods/saved-methods.service';\nimport { SavedMethod } from './core/saved-methods/saved-method.interface';\nimport { UserBalanceResponse } from './core/user-balance/user-balance-response.class';\nimport { UserBalanceService } from './core/user-balance/user-balance.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoreLibraryService {\n public paymentMethods = {\n getList: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getList(),\n\n getQuickMethods: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getQuickMethods(),\n getSavedMethods: async (): Promise<SavedMethod[]> =>\n this.savedMethodsService.getList(),\n getUserBalance: async (): Promise<UserBalanceResponse> =>\n this.userBalanceService.getUserBalance(),\n };\n\n public constructor(\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly paymentMethodsService: PaymentMethodsService,\n private readonly savedMethodsService: SavedMethodsService,\n private readonly userBalanceService: UserBalanceService\n ) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n return this.settingsService.init(configuration);\n }\n\n public setCountry(country: string): void {\n this.countryService.setCountry(country);\n }\n}\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\nimport { AppError } from './app-error.class';\nimport { HttpErrorData } from '../http-interceptor/http-error-data.interface';\nimport { HttpErrorResponseData } from '../http-interceptor/http-error-response-data.interface';\n\nexport class HttpError extends AppError {\n private readonly RESTRICTED_KEYS_REGEXP = new RegExp(\n '.*(card_number|number|cvv|cvn|month|year|cardholdername|client_data|dfp|password).*',\n 'i'\n );\n private readonly httpErrorData!: HttpErrorData;\n\n public constructor(error: HttpErrorResponse, req: HttpRequest<unknown>) {\n super(error.message);\n\n this.httpErrorData = {\n request: {\n url: req.url,\n method: req.method,\n headers: req.headers,\n },\n response: {\n status: error.status,\n headers: error.headers,\n },\n };\n\n if (req.body) {\n this.httpErrorData.request.data = this.cleanPersonalData(\n req.body as { [key: string]: unknown }\n );\n }\n\n if (error.statusText) {\n const errorData = error.error as HttpErrorResponseData;\n\n this.httpErrorData.response.data = {\n statusText: error.statusText,\n errors: errorData?.errors ?? [],\n };\n }\n }\n\n public getHttpErrorData(): HttpErrorData {\n return this.httpErrorData;\n }\n\n private cleanPersonalData(data: { [key: string]: unknown }): {\n [key: string]: unknown;\n } {\n return Object.entries(data).reduce((acc, [key, val]) => {\n return {\n ...acc,\n [key]: this.RESTRICTED_KEYS_REGEXP.test(key) ? '***' : val,\n };\n }, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\n\nimport { catchError } from 'rxjs/operators';\nimport { Router } from '@angular/router';\nimport { Observable, throwError } from 'rxjs';\nimport { HttpError } from '../errors/http-error.class';\n@Injectable()\nexport class HttpExceptionsInterceptor implements HttpInterceptor {\n public constructor(public router: Router) {}\n\n public intercept(\n req: HttpRequest<unknown>,\n next: HttpHandler\n ): Observable<HttpEvent<unknown>> {\n return next.handle(req).pipe(\n catchError((error: HttpErrorResponse) => {\n return throwError(() => new HttpError(error, req));\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { HttpExceptionsInterceptor } from './core/exceptions-handling/http-interceptor/http-exceptions.interceptor';\nimport { windowToken } from './core/window.token';\nimport { paymentMethodsResponseFactoryProvider } from './core/payment-methods/payment-methods-response.token';\nimport { savedMethodsResponseFactoryProvider } from './core/saved-methods/saved-methods-response.token';\nimport { userBalanceResponseFactoryProvider } from './core/user-balance/user-balance-response.token';\n\n@NgModule({\n imports: [HttpClientModule],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: HttpExceptionsInterceptor,\n multi: true,\n },\n { provide: windowToken, useValue: window },\n paymentMethodsResponseFactoryProvider,\n savedMethodsResponseFactoryProvider,\n userBalanceResponseFactoryProvider,\n ],\n})\nexport class CoreLibraryModule {}\n","/*\n * Public API Surface of core-library\n */\n\nexport * from './lib/core-library.service';\nexport * from './lib/core-library.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SecureApiClient","i1.SettingsService","i2.CountryService","i3.SecureApiClient","i2.SecureApiClient","i3.PaymentMethodsService","i4.SavedMethodsService","i5.UserBalanceService","i1"],"mappings":";;;;;;;;AAAM,MAAO,QAAS,SAAQ,KAAK,CAAA;AACjC,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;KAChB;AACF;;ACFK,MAAO,uBAAwB,SAAQ,QAAQ,CAAA;AACnD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,6DAA6D,CAAC,CAAC;KACtE;AACF;;ACHM,MAAM,WAAW,GAAmC,IAAI,cAAc,CAC3E,QAAQ,CACT;;ACLM,MAAM,aAAa,GAAG,4CAA4C,CAAC;AACnE,MAAM,aAAa,GACxB,oDAAoD;;MCSzC,eAAe,CAAA;IAG1B,WACmB,CAAA,UAAsB,EAEtB,MAAsB,EAAA;QAFtB,IAAU,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,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAZjB,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,yBAAyB;AACnC,YAAA,KAAK,EAAE,IAAI;AACZ,SAAA;AACD,QAAA,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE;QAC1C,qCAAqC;QACrC,mCAAmC;QACnC,kCAAkC;AACnC,KAAA,EAAA,OAAA,EAAA,CAXS,gBAAgB,CAAA,EAAA,CAAA,CAAA;2FAaf,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAd7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,yBAAyB;AACnC,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE;wBAC1C,qCAAqC;wBACrC,mCAAmC;wBACnC,kCAAkC;AACnC,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"xsolla-payment-client-core.mjs","sources":["../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/app-error.class.ts","../../../packages/payment-client-core/src/lib/core/settings/empty-utils-response.error.ts","../../../packages/payment-client-core/src/lib/core/window.token.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/api-url.const.ts","../../../packages/payment-client-core/src/lib/core/http/secure-api/secure-api.service.ts","../../../packages/payment-client-core/src/lib/core/settings/settings.service.ts","../../../packages/payment-client-core/src/lib/core/country/country.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/response-error.class.ts","../../../packages/payment-client-core/src/lib/core/boolean-number.enum.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/payment-methods/payment-methods.service.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.class.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods-response.token.ts","../../../packages/payment-client-core/src/lib/core/saved-methods/saved-methods.service.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.class.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance-response.token.ts","../../../packages/payment-client-core/src/lib/core/user-balance/user-balance.service.ts","../../../packages/payment-client-core/src/lib/core/legal/refund-policy.service.ts","../../../packages/payment-client-core/src/lib/core/legal/secure-connection.service.ts","../../../packages/payment-client-core/src/lib/core/legal/disclaimer.service.ts","../../../packages/payment-client-core/src/lib/core/legal/legal.service.ts","../../../packages/payment-client-core/src/lib/core/payment/initialize.service.ts","../../../packages/payment-client-core/src/lib/core/payment/payment.service.ts","../../../packages/payment-client-core/src/lib/core-library.service.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/errors/http-error.class.ts","../../../packages/payment-client-core/src/lib/core/exceptions-handling/http-interceptor/http-exceptions.interceptor.ts","../../../packages/payment-client-core/src/lib/core-library.module.ts","../../../packages/payment-client-core/src/public-api.ts","../../../packages/payment-client-core/src/xsolla-payment-client-core.ts"],"sourcesContent":["export class AppError extends Error {\n public constructor(message: string) {\n super(message);\n }\n}\n","import { AppError } from '../exceptions-handling/errors/app-error.class';\n\nexport class EmptyUtilsResponseError extends AppError {\n public constructor() {\n super('Utils response is empty or not requested. Check your token.');\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { ExtendedWindow } from './extended-window.interface';\n\nexport const windowToken: InjectionToken<ExtendedWindow> = new InjectionToken(\n 'window'\n);\n","export const defaultApiUrl = 'https://secure.xsolla.com/paystation2/api/';\nexport const sandboxApiUrl =\n 'https://sandbox-secure.xsolla.com/paystation2/api/';\n","import { Observable } from 'rxjs';\nimport { Inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { windowToken } from '../../window.token';\nimport { ExtendedWindow } from '../../extended-window.interface';\nimport { RequestOptions } from './options.interface';\nimport { defaultApiUrl, sandboxApiUrl } from './api-url.const';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SecureApiClient {\n private isSandboxMode = false;\n\n public constructor(\n private readonly httpClient: HttpClient,\n @Inject(windowToken)\n private readonly window: ExtendedWindow\n ) {}\n\n public setSandboxMode(isSandboxMode: boolean): void {\n this.isSandboxMode = isSandboxMode;\n }\n\n public get<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.get<T>(`${this.baseUrl}${url}`, options);\n }\n\n public post<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.post<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public patch<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.patch<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public put<T>(\n url: string,\n body: unknown | null,\n options?: RequestOptions\n ): Observable<T> {\n return this.httpClient.put<T>(`${this.baseUrl}${url}`, body, options);\n }\n\n public delete<T>(url: string, options?: RequestOptions): Observable<T> {\n return this.httpClient.delete<T>(`${this.baseUrl}${url}`, options);\n }\n\n public get baseUrl(): string {\n let predefinedBaseUrl: string | null = null;\n\n try {\n predefinedBaseUrl = this.window.localStorage.getItem('devApiUrl');\n } catch (e: unknown) {\n console.warn('localStorage is not available');\n }\n\n if (predefinedBaseUrl) {\n return predefinedBaseUrl;\n }\n\n return this.isSandboxMode ? sandboxApiUrl : defaultApiUrl;\n }\n}\n","import { firstValueFrom } from 'rxjs';\nimport { Injectable } from '@angular/core';\nimport { HttpParams } from '@angular/common/http';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { DeepReadonly } from '../deep-readonly.type';\nimport { InitConfiguration } from './configuration.interface';\nimport { EmptyUtilsResponseError } from './empty-utils-response.error';\nimport { User } from './user.interface';\nimport { Settings } from './settings.interface';\nimport { Purchase } from './purchase.interface';\nimport { Project } from './project.interface';\nimport { UtilsResponse } from './utils-response.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SettingsService {\n public get project(): DeepReadonly<Project> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.project;\n }\n\n public get purchase(): DeepReadonly<Purchase> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.purchase;\n }\n\n public get settings(): DeepReadonly<Settings> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n if (this.response?.purchase_external_id) {\n return {\n ...this.response.settings,\n purchase_external_id: this.response.purchase_external_id,\n };\n }\n\n return this.response?.settings;\n }\n\n public get user(): DeepReadonly<User> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response.user;\n }\n\n public get utilsResponse(): DeepReadonly<UtilsResponse> {\n if (!this.response) {\n throw new EmptyUtilsResponseError();\n }\n\n return this.response;\n }\n\n public get isEmpty(): boolean {\n return !this.response;\n }\n\n public get token(): string {\n return this._token;\n }\n\n public get hasResponse(): boolean {\n return !!this.response;\n }\n\n public isInitialized = false;\n\n private response!: DeepReadonly<UtilsResponse> | undefined;\n\n private _token = '';\n\n private sandboxMode = false;\n\n public constructor(private readonly secureApi: SecureApiClient) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n if (!configuration.token) {\n return Promise.reject('token is missing');\n }\n\n this._token = configuration.token;\n this.sandboxMode = !!configuration.sandbox;\n\n await this.sendRequest(this.token);\n\n this.isInitialized = true;\n }\n\n public isSandboxMode(): boolean {\n return this.sandboxMode;\n }\n\n private async sendRequest(token: string): Promise<void> {\n const params = new HttpParams().set('access_token', token);\n\n this.secureApi.setSandboxMode(this.isSandboxMode());\n\n this.response = await firstValueFrom(\n this.secureApi.get<UtilsResponse>('utils', { params })\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CountryService {\n private userDefinedCountry: string | null = null;\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n public setCountry(country: string): void {\n this.userDefinedCountry = country;\n }\n\n public getCountry(): string {\n return this.userDefinedCountry ?? this.getTokenCountry();\n }\n\n private getTokenCountry(): string {\n return this.settingsService.user.country.value;\n }\n}\n","import { AppError } from './app-error.class';\n\nexport class ResponseError extends AppError {\n public constructor(message?: string) {\n super('Response failed' + (message ? `: \"${message}\".` : '.'));\n }\n}\n","export enum BooleanNumber {\n false = 0,\n true = 1,\n}\n","import { BooleanNumber } from '../boolean-number.enum';\nimport { PaymentMethodApi } from './payment-method-api.interface';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsApi } from './payment-methods-api.interface';\n\nexport class PaymentMethodsResponse {\n public readonly top: PaymentMethod[];\n public readonly especial: PaymentMethod[];\n public readonly remained: PaymentMethod[];\n public readonly remainedCount: { total: number; visible: number };\n\n public constructor(paymentMethods: PaymentMethodsApi) {\n this.especial = paymentMethods.especial.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.top = paymentMethods.top.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remained = paymentMethods.remained.map((method) =>\n this.mapPaymentMethod(method)\n );\n this.remainedCount = {\n total: paymentMethods.remained_count.total,\n visible: paymentMethods.remained_count.visible,\n };\n }\n\n private mapPaymentMethod(method: PaymentMethodApi): PaymentMethod {\n return {\n id: method.id,\n rank: method.rank,\n name: method.name,\n aliases: method.aliases,\n categories: method.cat,\n isVisible: method.is_visible,\n recommended: method.recommended === BooleanNumber.true,\n enabledSaveAccount: method.enabled_save_account,\n iconName: method.switch_icon_name,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof PaymentMethodsResponse>;\n\nexport type PaymentMethodsResponseFactory = (\n ...args: ResponseParameters\n) => PaymentMethodsResponse;\n\nexport const paymentMethodsResponseFactoryToken: InjectionToken<PaymentMethodsResponseFactory> =\n new InjectionToken<PaymentMethodsResponseFactory>('PaymentMethodsResponse');\n\nexport const paymentMethodsResponseFactoryProvider: ValueProvider = {\n provide: paymentMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) =>\n new PaymentMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { PaymentMethod } from './payment-method.interface';\nimport { PaymentMethodsRequestParams } from './payment-methods-request-params.interface';\nimport { PaymentMethodsResponse } from './payment-methods-response.class';\nimport { PaymentMethodsResponseApi } from './payment-methods-response.interface';\nimport {\n PaymentMethodsResponseFactory,\n paymentMethodsResponseFactoryToken,\n} from './payment-methods-response.token';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentMethodsService {\n private readonly apiRoute = 'remained_payment_methods';\n\n private readonly cache = new Map<string, Promise<PaymentMethodsResponse>>();\n\n public constructor(\n @Inject(paymentMethodsResponseFactoryToken)\n private readonly responseFactory: PaymentMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.remained;\n }\n\n public async getQuickMethods(): Promise<PaymentMethod[]> {\n const response = await this.request();\n return response.especial;\n }\n\n private async request(): Promise<PaymentMethodsResponse> {\n const requestParams: PaymentMethodsRequestParams = {\n access_token: this.settingsService.token,\n country: this.countryService.getCountry(),\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<PaymentMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(\n map((response) => this.responseFactory(response.payment_methods))\n )\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport { SavedMethodApi } from './saved-method-api.interface';\nimport { SavedMethod } from './saved-method.interface';\n\nexport class SavedMethodsResponse {\n public readonly list: SavedMethod[];\n\n public constructor(savedMethods: SavedMethodsResponseApi) {\n this.list = savedMethods.list.map((method) => this.mapSavedMethod(method));\n }\n\n private mapSavedMethod(method: SavedMethodApi): SavedMethod {\n return {\n currency: method.currency,\n form: method.form,\n id: method.id,\n isSelected: method.isSelected,\n isBabkaPay: method.is_babka_pay,\n name: method.name,\n pid: method.pid,\n psName: method.psName,\n recurrentType: method.recurrent_type,\n replaced: method.replaced,\n type: method.type,\n cardExpiryDate: method.card_expiry_date,\n iconName: method.switch_icon_name,\n partner: method.partner,\n };\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof SavedMethodsResponse>;\n\nexport type SavedMethodsResponseFactory = (\n ...args: ResponseParameters\n) => SavedMethodsResponse;\n\nexport const savedMethodsResponseFactoryToken: InjectionToken<SavedMethodsResponseFactory> =\n new InjectionToken<SavedMethodsResponseFactory>('SavedMethodsResponse');\n\nexport const savedMethodsResponseFactoryProvider: ValueProvider = {\n provide: savedMethodsResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new SavedMethodsResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { SavedMethodsRequestParams } from './saved-methods-request-params.interface';\nimport { SavedMethodsResponseApi } from './saved-methods-response.interface';\nimport {\n SavedMethodsResponseFactory,\n savedMethodsResponseFactoryToken,\n} from './saved-methods-response.token';\nimport { SavedMethodsResponse } from './saved-methods-response.class';\nimport { SavedMethod } from './saved-method.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SavedMethodsService {\n private readonly apiRoute = 'savedmethods';\n\n private readonly cache = new Map<string, Promise<SavedMethodsResponse>>();\n\n public constructor(\n @Inject(savedMethodsResponseFactoryToken)\n private readonly responseFactory: SavedMethodsResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getList(): Promise<SavedMethod[]> {\n const response = await this.request();\n return response.list;\n }\n\n private async request(): Promise<SavedMethodsResponse> {\n const requestParams: SavedMethodsRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<SavedMethodsResponseApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { UserBalanceApi } from './user-balance-api.interface';\n\nexport class UserBalanceResponse {\n public readonly isEnoughUserBalance: boolean;\n public readonly isEnoughUserRecurrentBalance: boolean;\n\n public constructor(userBalance: UserBalanceApi) {\n this.isEnoughUserBalance = userBalance.is_enough_user_balance ?? false;\n this.isEnoughUserRecurrentBalance =\n userBalance.is_enough_user_recurrent_balance ?? false;\n }\n}\n","import { InjectionToken, ValueProvider } from '@angular/core';\nimport { UserBalanceResponse } from './user-balance-response.class';\n\ntype ResponseParameters = ConstructorParameters<typeof UserBalanceResponse>;\n\nexport type UserBalanceResponseFactory = (\n ...args: ResponseParameters\n) => UserBalanceResponse;\n\nexport const userBalanceResponseFactoryToken: InjectionToken<UserBalanceResponseFactory> =\n new InjectionToken<UserBalanceResponseFactory>('UserBalanceResponse');\n\nexport const userBalanceResponseFactoryProvider: ValueProvider = {\n provide: userBalanceResponseFactoryToken,\n useValue: (...args: ResponseParameters) => new UserBalanceResponse(...args),\n};\n","import { HttpHeaders } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { lastValueFrom, map } from 'rxjs';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport {\n UserBalanceResponseFactory,\n userBalanceResponseFactoryToken,\n} from './user-balance-response.token';\nimport { UserBalanceResponse } from './user-balance-response.class';\nimport { UserBalanceRequestParams } from './user-balance-request-params.interface';\nimport { UserBalanceApi } from './user-balance-api.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserBalanceService {\n private readonly apiRoute = 'balance/sufficiency';\n\n private readonly cache = new Map<string, Promise<UserBalanceResponse>>();\n\n public constructor(\n @Inject(userBalanceResponseFactoryToken)\n private readonly responseFactory: UserBalanceResponseFactory,\n private readonly settingsService: SettingsService,\n private readonly secureApi: SecureApiClient\n ) {}\n\n public async getUserBalance(): Promise<UserBalanceResponse> {\n return this.request();\n }\n\n private async request(): Promise<UserBalanceResponse> {\n const requestParams: UserBalanceRequestParams = {\n access_token: this.settingsService.token,\n };\n const cacheKey = JSON.stringify(requestParams);\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n lastValueFrom(\n this.secureApi\n .post<UserBalanceApi>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n .pipe(map((response) => this.responseFactory(response)))\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n })\n );\n }\n\n // @ts-expect-error the map already has the cache with key\n return this.cache.get(cacheKey);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../../core/settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class RefundPolicyService {\n public readonly defaultVersionId = 2;\n public readonly defaultUrl = 'https://xsolla.com/refund-policy-ps';\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n public get url(): string {\n if (!this.settingsService.token) {\n return 'https://xsolla.com/refundpolicy/en-us';\n }\n const language = this.settingsService.user.local ?? 'en';\n const versionId =\n this.settingsService.project.refundPolicySettings?.policy_version_id ??\n this.defaultVersionId;\n const countryIso = this.settingsService.user.country.value ?? '';\n const projectId = this.settingsService.project.id;\n return `${this.defaultUrl}?policy_version_id=${versionId}&language=${language}&country=${countryIso}&project_id=${projectId}`;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { SettingsService } from '../settings/settings.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SecureConnectionService {\n public get isWhiteLabel(): boolean {\n return !!this.settingsService.settings?.white_label;\n }\n public get secureConnectionUrl(): string | undefined {\n this.setSecureConnectionUrl();\n return this._secureConnectionUrl;\n }\n\n public readonly secureConnectionApi = 'https://verify.xsolla.com/?url=';\n\n private _secureConnectionUrl?: string;\n\n public constructor(private readonly settingsService: SettingsService) {}\n\n private setSecureConnectionUrl(): void {\n const projectUrl = this.settingsService.project?.projectUrl;\n\n if (projectUrl) {\n this._secureConnectionUrl = `${\n this.secureConnectionApi\n }${encodeURIComponent(projectUrl)}`;\n }\n }\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DisclaimerService {\n public readonly disclaimer = 'disclaimer';\n}\n","import { Injectable } from '@angular/core';\nimport { LegalComponentConfig } from './legal.component.config';\nimport { SettingsService } from '../settings/settings.service';\nimport { RefundPolicyService } from './refund-policy.service';\nimport { SecureConnectionService } from './secure-connection.service';\nimport { DisclaimerService } from './disclaimer.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LegalService {\n public readonly sctlPolicyUrl = 'https://xsolla.com/sctl';\n\n private get isJapanUser(): boolean {\n return this.settingsService.user?.local === 'ja';\n }\n\n public constructor(\n private readonly settingsService: SettingsService,\n private readonly refundPolicyService: RefundPolicyService,\n private readonly secureConnectionService: SecureConnectionService,\n private readonly disclaimerService: DisclaimerService\n ) {}\n\n public getLegalComponentConfig(): LegalComponentConfig {\n return {\n isJapanUser: this.isJapanUser,\n refundPolicyUrl: this.refundPolicyService.url,\n sctlPolicyUrl: this.sctlPolicyUrl,\n secureConnection: {\n secureConnectionUrl: this.secureConnectionService.secureConnectionUrl,\n isWhiteLabel: this.secureConnectionService.isWhiteLabel,\n },\n disclaimer: this.disclaimerService.disclaimer,\n };\n }\n}\n","import { HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { lastValueFrom } from 'rxjs';\nimport { CountryService } from '../country/country.service';\nimport { ResponseError } from '../exceptions-handling/errors/response-error.class';\nimport { SecureApiClient } from '../http/secure-api/secure-api.service';\nimport { SettingsService } from '../settings/settings.service';\nimport { InitializeRequestParams } from './initialize-request-params.interface';\nimport { PaymentConfig } from './payment-config.interface';\nimport { XpsResponse } from './xps-response.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class InitializeService {\n private readonly apiRoute = 'directpayment';\n\n public constructor(\n private readonly secureApi: SecureApiClient,\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService\n ) {}\n\n public async request(config: PaymentConfig): Promise<XpsResponse> {\n const requestParams: InitializeRequestParams = {\n access_token: this.settingsService.token,\n pid: String(config.paymentMethodId),\n country: this.countryService.getCountry(),\n returnUrl: config.returnUrl,\n };\n\n return lastValueFrom(\n this.secureApi.post<XpsResponse>(\n this.apiRoute,\n new URLSearchParams({ ...requestParams }),\n {\n headers: new HttpHeaders().set(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=utf-8'\n ),\n responseType: 'json',\n }\n )\n ).catch((error: Error) => {\n throw new ResponseError(error.message);\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { NextAction } from './actions/next-action.type';\nimport { Field } from './field.interface';\nimport { FinanceDetails } from './finance-details.interface';\nimport { InitializeService } from './initialize.service';\nimport { PaymentConfig } from './payment-config.interface';\nimport { Status } from './status/status.interface';\nimport { XpsResponse } from './xps-response.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PaymentService {\n private data: XpsResponse | null = null;\n\n public constructor(private readonly initializeService: InitializeService) {}\n\n public async initialize(config: PaymentConfig): Promise<XpsResponse> {\n this.data = await this.initializeService.request(config);\n return this.data;\n }\n\n public submit(): NextAction {\n throw new Error('Method not implemented.');\n }\n\n public getFields(): Field[] {\n throw new Error('Method not implemented.');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public validate(field: Field): boolean {\n throw new Error('Method not implemented.');\n }\n\n public runThreeDs(): NextAction {\n throw new Error('Method not implemented.');\n }\n\n public getFinanceDetails(): FinanceDetails {\n throw new Error('Method not implemented.');\n }\n\n public getStatus(): Status {\n throw new Error('Method not implemented.');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { InitConfiguration } from './core/settings/configuration.interface';\nimport { SettingsService } from './core/settings/settings.service';\nimport { CountryService } from './core/country/country.service';\nimport { PaymentMethodsService } from './core/payment-methods/payment-methods.service';\nimport { PaymentMethod } from './core/payment-methods/payment-method.interface';\nimport { SavedMethodsService } from './core/saved-methods/saved-methods.service';\nimport { SavedMethod } from './core/saved-methods/saved-method.interface';\nimport { UserBalanceResponse } from './core/user-balance/user-balance-response.class';\nimport { UserBalanceService } from './core/user-balance/user-balance.service';\nimport { PaymentConfig } from './core/payment/payment-config.interface';\nimport { PaymentService } from './core/payment/payment.service';\nimport { Payment } from './core/payment/payment.interface';\nimport { Field } from './core/payment/field.interface';\nimport { LegalService } from './core/legal/legal.service';\nimport { LegalComponentConfig } from './core/legal/legal.component.config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CoreLibraryService {\n public paymentMethods = {\n getList: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getList(),\n\n getQuickMethods: async (): Promise<PaymentMethod[]> =>\n this.paymentMethodsService.getQuickMethods(),\n getSavedMethods: async (): Promise<SavedMethod[]> =>\n this.savedMethodsService.getList(),\n getUserBalance: async (): Promise<UserBalanceResponse> =>\n this.userBalanceService.getUserBalance(),\n };\n\n public constructor(\n private readonly settingsService: SettingsService,\n private readonly countryService: CountryService,\n private readonly paymentMethodsService: PaymentMethodsService,\n private readonly savedMethodsService: SavedMethodsService,\n private readonly userBalanceService: UserBalanceService,\n private readonly legalService: LegalService,\n private readonly paymentService: PaymentService\n ) {}\n\n public async init(configuration: InitConfiguration): Promise<void> {\n return this.settingsService.init(configuration);\n }\n\n public setCountry(country: string): void {\n this.countryService.setCountry(country);\n }\n\n public createPayment(config: PaymentConfig): Payment {\n return {\n initialize: async () => this.paymentService.initialize(config),\n submit: () => this.paymentService.submit(),\n getFields: () => this.paymentService.getFields(),\n validate: (field: Field) => this.paymentService.validate(field),\n getFinanceDetails: () => this.paymentService.getFinanceDetails(),\n runThreeDs: () => this.paymentService.runThreeDs(),\n getStatus: () => this.paymentService.getStatus(),\n };\n }\n\n public getLegalComponentConfig(): LegalComponentConfig {\n return this.legalService.getLegalComponentConfig();\n }\n}\n","import { HttpErrorResponse, HttpRequest } from '@angular/common/http';\nimport { AppError } from './app-error.class';\nimport { HttpErrorData } from '../http-interceptor/http-error-data.interface';\nimport { HttpErrorResponseData } from '../http-interceptor/http-error-response-data.interface';\n\nexport class HttpError extends AppError {\n private readonly RESTRICTED_KEYS_REGEXP = new RegExp(\n '.*(card_number|number|cvv|cvn|month|year|cardholdername|client_data|dfp|password).*',\n 'i'\n );\n private readonly httpErrorData!: HttpErrorData;\n\n public constructor(error: HttpErrorResponse, req: HttpRequest<unknown>) {\n super(error.message);\n\n this.httpErrorData = {\n request: {\n url: req.url,\n method: req.method,\n headers: req.headers,\n },\n response: {\n status: error.status,\n headers: error.headers,\n },\n };\n\n if (req.body) {\n this.httpErrorData.request.data = this.cleanPersonalData(\n req.body as { [key: string]: unknown }\n );\n }\n\n if (error.statusText) {\n const errorData = error.error as HttpErrorResponseData;\n\n this.httpErrorData.response.data = {\n statusText: error.statusText,\n errors: errorData?.errors ?? [],\n };\n }\n }\n\n public getHttpErrorData(): HttpErrorData {\n return this.httpErrorData;\n }\n\n private cleanPersonalData(data: { [key: string]: unknown }): {\n [key: string]: unknown;\n } {\n return Object.entries(data).reduce((acc, [key, val]) => {\n return {\n ...acc,\n [key]: this.RESTRICTED_KEYS_REGEXP.test(key) ? '***' : val,\n };\n }, {});\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n} from '@angular/common/http';\n\nimport { catchError } from 'rxjs/operators';\nimport { Router } from '@angular/router';\nimport { Observable, throwError } from 'rxjs';\nimport { HttpError } from '../errors/http-error.class';\n@Injectable()\nexport class HttpExceptionsInterceptor implements HttpInterceptor {\n public constructor(public router: Router) {}\n\n public intercept(\n req: HttpRequest<unknown>,\n next: HttpHandler\n ): Observable<HttpEvent<unknown>> {\n return next.handle(req).pipe(\n catchError((error: HttpErrorResponse) => {\n return throwError(() => new HttpError(error, req));\n })\n );\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';\nimport { HttpExceptionsInterceptor } from './core/exceptions-handling/http-interceptor/http-exceptions.interceptor';\nimport { windowToken } from './core/window.token';\nimport { paymentMethodsResponseFactoryProvider } from './core/payment-methods/payment-methods-response.token';\nimport { savedMethodsResponseFactoryProvider } from './core/saved-methods/saved-methods-response.token';\nimport { userBalanceResponseFactoryProvider } from './core/user-balance/user-balance-response.token';\n\n@NgModule({\n imports: [HttpClientModule],\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: HttpExceptionsInterceptor,\n multi: true,\n },\n { provide: windowToken, useValue: window },\n paymentMethodsResponseFactoryProvider,\n savedMethodsResponseFactoryProvider,\n userBalanceResponseFactoryProvider,\n ],\n})\nexport class CoreLibraryModule {}\n","/*\n * Public API Surface of core-library\n */\n\nexport * from './lib/core-library.service';\nexport * from './lib/core-library.module';\nexport * from './lib/core/legal/legal.component.config';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.SecureApiClient","i1.SettingsService","i2.CountryService","i3.SecureApiClient","i2.SecureApiClient","i2.RefundPolicyService","i3.SecureConnectionService","i4.DisclaimerService","i2.SettingsService","i3.CountryService","i1.InitializeService","i3.PaymentMethodsService","i4.SavedMethodsService","i5.UserBalanceService","i6.LegalService","i7.PaymentService","i1"],"mappings":";;;;;;;;AAAM,MAAO,QAAS,SAAQ,KAAK,CAAA;AACjC,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;KAChB;AACF;;ACFK,MAAO,uBAAwB,SAAQ,QAAQ,CAAA;AACnD,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,6DAA6D,CAAC,CAAC;KACtE;AACF;;ACHM,MAAM,WAAW,GAAmC,IAAI,cAAc,CAC3E,QAAQ,CACT;;ACLM,MAAM,aAAa,GAAG,4CAA4C,CAAC;AACnE,MAAM,aAAa,GACxB,oDAAoD;;MCSzC,eAAe,CAAA;IAG1B,WACmB,CAAA,UAAsB,EAEtB,MAAsB,EAAA;QAFtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QAEtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;QALjC,IAAa,CAAA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BAC1C,qCAAqC;wBACrC,mCAAmC;wBACnC,kCAAkC;AACnC,qBAAA;AACF,iBAAA,CAAA;;;ACrBD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,4 @@
1
+ export declare enum BooleanString {
2
+ true = "1",
3
+ false = "0"
4
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class DisclaimerService {
3
+ readonly disclaimer = "disclaimer";
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<DisclaimerService, never>;
5
+ static ɵprov: i0.ɵɵInjectableDeclaration<DisclaimerService>;
6
+ }
@@ -0,0 +1,10 @@
1
+ export interface LegalComponentConfig {
2
+ isJapanUser: boolean;
3
+ refundPolicyUrl: string;
4
+ sctlPolicyUrl?: string;
5
+ secureConnection: {
6
+ secureConnectionUrl?: string;
7
+ isWhiteLabel?: boolean;
8
+ };
9
+ disclaimer?: string;
10
+ }
@@ -0,0 +1,18 @@
1
+ import { LegalComponentConfig } from './legal.component.config';
2
+ import { SettingsService } from '../settings/settings.service';
3
+ import { RefundPolicyService } from './refund-policy.service';
4
+ import { SecureConnectionService } from './secure-connection.service';
5
+ import { DisclaimerService } from './disclaimer.service';
6
+ import * as i0 from "@angular/core";
7
+ export declare class LegalService {
8
+ private readonly settingsService;
9
+ private readonly refundPolicyService;
10
+ private readonly secureConnectionService;
11
+ private readonly disclaimerService;
12
+ readonly sctlPolicyUrl = "https://xsolla.com/sctl";
13
+ private get isJapanUser();
14
+ constructor(settingsService: SettingsService, refundPolicyService: RefundPolicyService, secureConnectionService: SecureConnectionService, disclaimerService: DisclaimerService);
15
+ getLegalComponentConfig(): LegalComponentConfig;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<LegalService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<LegalService>;
18
+ }
@@ -0,0 +1,11 @@
1
+ import { SettingsService } from '../../core/settings/settings.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RefundPolicyService {
4
+ private readonly settingsService;
5
+ readonly defaultVersionId = 2;
6
+ readonly defaultUrl = "https://xsolla.com/refund-policy-ps";
7
+ constructor(settingsService: SettingsService);
8
+ get url(): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<RefundPolicyService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<RefundPolicyService>;
11
+ }
@@ -0,0 +1,13 @@
1
+ import { SettingsService } from '../settings/settings.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SecureConnectionService {
4
+ private readonly settingsService;
5
+ get isWhiteLabel(): boolean;
6
+ get secureConnectionUrl(): string | undefined;
7
+ readonly secureConnectionApi = "https://verify.xsolla.com/?url=";
8
+ private _secureConnectionUrl?;
9
+ constructor(settingsService: SettingsService);
10
+ private setSecureConnectionUrl;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SecureConnectionService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<SecureConnectionService>;
13
+ }
@@ -0,0 +1,4 @@
1
+ export interface Action<T = string, D = object> {
2
+ type: T;
3
+ data: D;
4
+ }
@@ -0,0 +1,12 @@
1
+ import { Action } from './action.type';
2
+ type CheckStatusActionType = 'check_status';
3
+ interface CheckStatusActionData {
4
+ order: object;
5
+ invoiceId: number;
6
+ status: {
7
+ type: string;
8
+ isFinalStatus: boolean;
9
+ };
10
+ }
11
+ export type CheckStatusAction = Action<CheckStatusActionType, CheckStatusActionData>;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { CheckStatusAction } from './check-status.action.type';
2
+ export type NextAction = CheckStatusAction;
@@ -0,0 +1,11 @@
1
+ export interface CheckoutItem {
2
+ quantity: number;
3
+ amount: number | null;
4
+ amount_before_discount?: number | null;
5
+ name: string;
6
+ image_url: string;
7
+ description: string | null;
8
+ currency: string;
9
+ is_bonus: boolean;
10
+ indirect_tax_rate: number;
11
+ }