@xsolla/payment-client-core 0.2.44 → 0.2.46

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 (87) hide show
  1. package/esm2022/lib/core/agreements-group.const.mjs +17 -0
  2. package/esm2022/lib/core/extended-window.interface.mjs +1 -1
  3. package/esm2022/lib/core/payment/actions/action.interface.mjs +1 -1
  4. package/esm2022/lib/core/payment/actions/next-action.service.mjs +1 -1
  5. package/esm2022/lib/core/payment/field-names.enum.mjs +4 -1
  6. package/esm2022/lib/core/payment/field.interface.mjs +1 -1
  7. package/esm2022/lib/core/payment/finance-details/finance-details.service.mjs +4 -1
  8. package/esm2022/lib/core/payment/initialize-actions/action.interface.mjs +2 -0
  9. package/esm2022/lib/core/payment/initialize-actions/initialize-next-action.service.mjs +40 -0
  10. package/esm2022/lib/core/payment/initialize-actions/initialize-next-actions.mjs +7 -0
  11. package/esm2022/lib/core/payment/initialize-actions/next-action.interface.mjs +2 -0
  12. package/esm2022/lib/core/payment/initialize-actions/special-button/special-button.action.class.mjs +46 -0
  13. package/esm2022/lib/core/payment/initialize-actions/special-button/special-button.action.type.mjs +2 -0
  14. package/esm2022/lib/core/payment/initialized-form.inteface.mjs +1 -1
  15. package/esm2022/lib/core/payment/payment.service.mjs +72 -24
  16. package/esm2022/lib/core/payment/sync/request/sync-request.class.mjs +3 -1
  17. package/esm2022/lib/core/payment/sync/sync.service.mjs +4 -4
  18. package/esm2022/lib/core/payment/xps-error.interface.mjs +1 -1
  19. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-integration.type.mjs +6 -2
  20. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-params-builder.service.mjs +90 -0
  21. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-session.interface.mjs +2 -0
  22. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.mjs +6 -3
  23. package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.mjs +64 -87
  24. package/esm2022/lib/core/sdk-payment-systems/apple-pay/checkout-params.interface.mjs +1 -1
  25. package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.mjs +80 -0
  26. package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.mjs +65 -0
  27. package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.abstract.mjs +31 -0
  28. package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.type.mjs +2 -0
  29. package/esm2022/lib/core/sdk-payment-systems/google-pay/check-payment-device-data.interface.mjs +2 -0
  30. package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay-init-params.interface.mjs +1 -1
  31. package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay-library.interface.mjs +1 -1
  32. package/esm2022/lib/core/sdk-payment-systems/google-pay/google-pay.service.mjs +70 -59
  33. package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.mjs +75 -0
  34. package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-instant-payment.service.mjs +121 -0
  35. package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-payment-service.interface.mjs +2 -0
  36. package/esm2022/lib/core/sdk-payment-systems/google-pay/updated-price.interface.mjs +2 -0
  37. package/esm2022/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.mjs +1 -1
  38. package/esm2022/lib/core/sdk-payment-systems/sdk-payment-systems.interface.mjs +1 -1
  39. package/esm2022/lib/core/settings/project.interface.mjs +1 -1
  40. package/esm2022/lib/core-library.module.mjs +18 -1
  41. package/esm2022/lib/core-library.service.mjs +16 -2
  42. package/fesm2022/xsolla-payment-client-core.mjs +920 -336
  43. package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
  44. package/lib/core/extended-window.interface.d.ts +1 -1
  45. package/lib/core/payment/actions/action.interface.d.ts +2 -2
  46. package/lib/core/payment/actions/next-action.service.d.ts +1 -1
  47. package/lib/core/payment/actions/next-actions.d.ts +1 -1
  48. package/lib/core/payment/field-names.enum.d.ts +4 -1
  49. package/lib/core/payment/field.interface.d.ts +1 -1
  50. package/lib/core/payment/finance-details/finance-details.service.d.ts +1 -0
  51. package/lib/core/payment/initialize-actions/action.interface.d.ts +11 -0
  52. package/lib/core/payment/initialize-actions/initialize-next-action.service.d.ts +16 -0
  53. package/lib/core/payment/initialize-actions/initialize-next-actions.d.ts +5 -0
  54. package/lib/core/payment/initialize-actions/next-action.interface.d.ts +2 -0
  55. package/lib/core/payment/initialize-actions/special-button/special-button.action.class.d.ts +17 -0
  56. package/lib/core/payment/initialize-actions/special-button/special-button.action.type.d.ts +6 -0
  57. package/lib/core/payment/initialized-form.inteface.d.ts +2 -0
  58. package/lib/core/payment/payment.service.d.ts +11 -2
  59. package/lib/core/payment/sync/sync.service.d.ts +1 -1
  60. package/lib/core/payment/xps-error.interface.d.ts +1 -0
  61. package/lib/core/sdk-payment-systems/apple-pay/apple-pay-integration.type.d.ts +5 -1
  62. package/lib/core/sdk-payment-systems/apple-pay/apple-pay-params-builder.service.d.ts +15 -0
  63. package/lib/core/sdk-payment-systems/apple-pay/apple-pay-session.interface.d.ts +135 -0
  64. package/lib/core/sdk-payment-systems/apple-pay/apple-pay.errors.enum.d.ts +5 -2
  65. package/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.d.ts +24 -13
  66. package/lib/core/sdk-payment-systems/apple-pay/checkout-params.interface.d.ts +1 -0
  67. package/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.d.ts +16 -0
  68. package/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.d.ts +13 -0
  69. package/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.abstract.d.ts +13 -0
  70. package/lib/core/sdk-payment-systems/apple-pay/session-handlers/session-handler.type.d.ts +3 -0
  71. package/lib/core/sdk-payment-systems/google-pay/check-payment-device-data.interface.d.ts +9 -0
  72. package/lib/core/sdk-payment-systems/google-pay/google-pay-init-params.interface.d.ts +6 -0
  73. package/lib/core/sdk-payment-systems/google-pay/google-pay-library.interface.d.ts +170 -52
  74. package/lib/core/sdk-payment-systems/google-pay/google-pay.service.d.ts +18 -10
  75. package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.d.ts +18 -0
  76. package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-instant-payment.service.d.ts +18 -0
  77. package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-payment-service.interface.d.ts +14 -0
  78. package/lib/core/sdk-payment-systems/google-pay/updated-price.interface.d.ts +7 -0
  79. package/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.d.ts +7 -1
  80. package/lib/core/sdk-payment-systems/sdk-payment-systems.interface.d.ts +1 -1
  81. package/lib/core/settings/project.interface.d.ts +1 -0
  82. package/lib/core-library.service.d.ts +12 -0
  83. package/package.json +1 -1
  84. package/xsolla-payment-client-core-0.2.46.tgz +0 -0
  85. package/esm2022/lib/core/agreementsGroup.const.mjs +0 -17
  86. package/xsolla-payment-client-core-0.2.44.tgz +0 -0
  87. /package/lib/core/{agreementsGroup.const.d.ts → agreements-group.const.d.ts} +0 -0
@@ -1,18 +1,163 @@
1
- export declare class GooglePayClient {
2
- constructor(options: {
3
- environment: string;
4
- });
5
- isReadyToPay(isReadyToPayRequest: string): Promise<{
6
- result: boolean;
7
- }>;
8
- createButton(options: ButtonOptions): HTMLButtonElement;
9
- loadPaymentData(paymentDataRequest: GooglePayPaymentRequest): Promise<PaymentDataResponse>;
10
- prefetchPaymentData(paymentDataRequest: GooglePayPaymentRequest): void;
1
+ type ApiVersion = number;
2
+ type ApiVersionMinor = number;
3
+ interface Address {
4
+ name: string;
5
+ address1: string;
6
+ address2: string;
7
+ address3: string;
8
+ locality: string;
9
+ administrativeArea: string;
10
+ countryCode: string;
11
+ postalCode: string;
12
+ sortingCode: string;
13
+ }
14
+ export type DisplayItems = Array<{
15
+ label: string;
16
+ type: string;
17
+ price: string;
18
+ }>;
19
+ export interface TransactionInfo {
20
+ currencyCode?: string;
21
+ totalPriceStatus: string;
22
+ totalPrice?: number | string;
23
+ countryCode?: string;
24
+ totalPriceLabel?: string;
25
+ displayItems?: DisplayItems;
26
+ }
27
+ export interface AllowedPaymentMethod {
28
+ type: string;
29
+ parameters: {
30
+ allowedAuthMethods: string[];
31
+ allowedCardNetworks: string[];
32
+ allowPrepaidCards: boolean;
33
+ billingAddressRequired: boolean;
34
+ billingAddressParameters: {
35
+ format: string;
36
+ phoneNumberRequired: boolean;
37
+ };
38
+ };
39
+ tokenizationSpecification: {
40
+ type: string;
41
+ parameters: {
42
+ gateway: string;
43
+ 'vantiv:merchantPayPageId'?: string;
44
+ 'vantiv:merchantOrderId'?: string;
45
+ 'vantiv:merchantTransactionId'?: string;
46
+ 'vantiv:merchantReportGroup'?: string;
47
+ };
48
+ };
49
+ }
50
+ export interface IsReadyToPayRequest {
51
+ apiVersion: ApiVersion;
52
+ apiVersionMinor: ApiVersionMinor;
53
+ allowedPaymentMethods: AllowedPaymentMethod[];
54
+ }
55
+ export interface GooglePayPaymentRequest {
56
+ apiVersion: ApiVersion;
57
+ apiVersionMinor: ApiVersionMinor;
58
+ merchantInfo: {
59
+ merchantId: string;
60
+ };
61
+ allowedPaymentMethods: AllowedPaymentMethod[];
62
+ transactionInfo: TransactionInfo;
63
+ emailRequired: boolean;
64
+ shippingAddressRequired: boolean;
65
+ callbackIntents: string[];
66
+ }
67
+ export interface PaymentAuthorizationResult {
68
+ transactionState: 'SUCCESS' | 'ERROR';
69
+ error?: {
70
+ reason: string;
71
+ message: string;
72
+ intent: string;
73
+ };
74
+ }
75
+ export interface PaymentData {
76
+ apiVersion: number;
77
+ apiVersionMinor: number;
78
+ paymentMethodData: {
79
+ type: string;
80
+ description: string;
81
+ info: {
82
+ cardDetails: string;
83
+ assuranceDetails: {
84
+ accountVerified: boolean;
85
+ cardHolderAuthenticated: boolean;
86
+ };
87
+ cardNetwork: string;
88
+ billingAddress?: Address;
89
+ };
90
+ tokenizationData: {
91
+ type: string;
92
+ token?: string;
93
+ };
94
+ };
95
+ email?: string;
96
+ shippingAddress?: Address;
97
+ }
98
+ export interface PaymentDataRequestUpdate {
99
+ newTransactionInfo?: {
100
+ displayItems?: Array<{
101
+ label: string;
102
+ type: string;
103
+ price: string;
104
+ }>;
105
+ currencyCode: string;
106
+ countryCode?: string;
107
+ transactionId?: string;
108
+ totalPriceStatus: string;
109
+ totalPrice: string;
110
+ totalPriceLabel?: string;
111
+ checkoutOption?: string;
112
+ };
113
+ newShippingOptionParameters?: {
114
+ defaultSelectedOptionId: string;
115
+ shippingOptions?: Array<{
116
+ id: string;
117
+ label: string;
118
+ description?: string;
119
+ }>;
120
+ };
121
+ newOfferInfo?: {
122
+ offers: Array<{
123
+ redemptionCode: string;
124
+ description: string;
125
+ }>;
126
+ };
127
+ error?: {
128
+ reason: string;
129
+ message: string;
130
+ intent: string;
131
+ };
132
+ }
133
+ export interface GoogleInitData {
134
+ isReadyToPayRequest: IsReadyToPayRequest;
135
+ paymentDataRequest: GooglePayPaymentRequest;
136
+ amexCardNotification?: string;
137
+ }
138
+ export interface IntermediatePaymentData {
139
+ callbackTrigger?: 'INITIALIZE' | 'SHIPPING_ADDRESS' | 'SHIPPING_OPTION';
140
+ shippingAddress?: {
141
+ administrativeArea: string;
142
+ countryCode: string;
143
+ locality: string;
144
+ postalCode: string;
145
+ };
146
+ shippingOptionData?: {
147
+ id: string;
148
+ };
149
+ }
150
+ export type PaymentDataChangedHandler = (intermediatePaymentData: IntermediatePaymentData) => Promise<PaymentDataRequestUpdate>;
151
+ export type PaymentAuthorizedHandler = (paymentData: PaymentData) => Promise<PaymentAuthorizationResult>;
152
+ export interface GooglePayClientInitData {
153
+ environment: string;
154
+ paymentDataCallbacks?: {
155
+ onPaymentDataChanged: PaymentDataChangedHandler;
156
+ onPaymentAuthorized: PaymentAuthorizedHandler;
157
+ };
11
158
  }
12
159
  export interface GooglePayClientInit {
13
- new (options: {
14
- environment: string;
15
- }): GooglePayClient;
160
+ new (options: GooglePayClientInitData): GooglePayClient;
16
161
  }
17
162
  export interface PaymentDataRequest {
18
163
  transactionInfo: {
@@ -30,7 +175,7 @@ export interface PaymentDataResponse {
30
175
  }
31
176
  export interface ButtonOptions {
32
177
  onClick(): void;
33
- allowedPaymentMethods: GooglePayPaymentMethod[];
178
+ allowedPaymentMethods: AllowedPaymentMethod[];
34
179
  buttonColor?: 'default' | 'black' | 'white';
35
180
  buttonType?: 'plain' | 'buy';
36
181
  buttonSizeMode?: 'static' | 'fill';
@@ -42,42 +187,15 @@ export interface GooglePayLibrary {
42
187
  };
43
188
  };
44
189
  }
45
- export interface GooglePayPaymentMethod {
46
- type: string;
47
- parameters: {
48
- allowedAuthMethods: string[];
49
- allowedCardNetworks: string[];
50
- allowPrepaidCards: boolean;
51
- billingAddressRequired: boolean;
52
- billingAddressParameters: {
53
- format: string;
54
- phoneNumberRequired: boolean;
55
- };
56
- };
57
- tokenizationSpecification: {
58
- type: string;
59
- parameters: {
60
- gateway: 'vantiv';
61
- 'vantiv:merchantPayPageId': string;
62
- 'vantiv:merchantOrderId': string;
63
- 'vantiv:merchantTransactionId': string;
64
- 'vantiv:merchantReportGroup': string;
65
- };
66
- };
67
- }
68
- export interface GooglePayPaymentRequest {
69
- apiVersion: number;
70
- apiVersionMinor: number;
71
- merchantInfo: {
72
- merchantId: string;
73
- };
74
- allowedPaymentMethods: GooglePayPaymentMethod[];
75
- transactionInfo: {
76
- currencyCode: string;
77
- totalPriceStatus: string;
78
- totalPrice: string;
79
- countryCode: string;
80
- };
81
- emailRequired: boolean;
82
- shippingAddressRequired: boolean;
190
+ export declare class GooglePayClient {
191
+ constructor(options: {
192
+ environment: string;
193
+ });
194
+ isReadyToPay(isReadyToPayRequest: IsReadyToPayRequest): Promise<{
195
+ result: boolean;
196
+ }>;
197
+ createButton(options: ButtonOptions): HTMLButtonElement;
198
+ loadPaymentData(paymentDataRequest: GooglePayPaymentRequest): Promise<PaymentDataResponse>;
199
+ prefetchPaymentData(paymentDataRequest: GooglePayPaymentRequest): void;
83
200
  }
201
+ export {};
@@ -1,33 +1,41 @@
1
1
  import { Injector } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
- import { PaymentSystemProcessingService } from '../payment-systems/payment-system-processing.service';
3
+ import { ElkLoggerService } from '../../exceptions-handling/elk/elk-logger.service';
4
4
  import { ExtendedWindow } from '../../extended-window.interface';
5
- import { GooglePayInitParams } from './google-pay-init-params.interface';
6
5
  import { CheckStatusAction } from '../../payment/actions/check-status/check-status.action.type';
6
+ import { PaymentSystemProcessingService } from '../payment-systems/payment-system-processing.service';
7
+ import { CheckPaymentDeviceData } from './check-payment-device-data.interface';
7
8
  import { GooglePayButtonColorType } from './google-pay-button-color.type';
9
+ import { GooglePayInitParams } from './google-pay-init-params.interface';
10
+ import { GooglePayCheckoutPaymentService } from './payment/google-pay-checkout-payment.service';
11
+ import { GooglePayInstantPaymentService } from './payment/google-pay-instant-payment.service';
8
12
  import * as i0 from "@angular/core";
9
13
  export declare class GooglePayService {
10
14
  private readonly window;
11
- readonly paymentSystemProcessingService: PaymentSystemProcessingService;
12
- readonly injector: Injector;
15
+ private readonly elkLoggerService;
16
+ private readonly paymentSystemProcessingService;
17
+ private readonly googlePayCheckoutPaymentService;
18
+ private readonly googlePayInstantPaymentService;
19
+ private readonly injector;
13
20
  private readonly googlePayScriptUrl;
14
21
  private readonly readyToPay;
15
- private checkout;
16
22
  private googlePaymentClient;
17
- private isSandbox;
18
- private country;
23
+ private initParams;
24
+ private paymentService;
25
+ private onPaymentDataChanged;
26
+ private onPaymentAuthorized;
19
27
  private get libraryWasInitialized();
20
28
  private get googlePaymentClientWasInitialized();
21
- constructor(window: ExtendedWindow, paymentSystemProcessingService: PaymentSystemProcessingService, injector: Injector);
29
+ constructor(window: ExtendedWindow, elkLoggerService: ElkLoggerService, paymentSystemProcessingService: PaymentSystemProcessingService, googlePayCheckoutPaymentService: GooglePayCheckoutPaymentService, googlePayInstantPaymentService: GooglePayInstantPaymentService, injector: Injector);
22
30
  get readyToPay$(): Observable<boolean | null>;
23
31
  isReadyToPay(): boolean | null;
24
32
  initGooglePayLibrary(data: GooglePayInitParams): void;
25
- checkPaymentDevice(base64checkoutData: string): void;
33
+ checkPaymentDevice(data: CheckPaymentDeviceData): void;
26
34
  proceedCheckout(): Promise<CheckStatusAction | null>;
27
35
  createButton(onClickHandler: () => void, buttonColor?: GooglePayButtonColorType): HTMLButtonElement | null;
28
36
  private setupGooglePayClient;
29
37
  private onLoadScript;
30
- private isCancelledStatus;
38
+ private getPaymentService;
31
39
  static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayService, never>;
32
40
  static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayService>;
33
41
  }
@@ -0,0 +1,18 @@
1
+ import { PaymentSystemProcessingService } from '../../payment-systems/payment-system-processing.service';
2
+ import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest, PaymentDataResponse } from '../google-pay-library.interface';
3
+ import { GooglePayPaymentService, PreparePaymentParams } from './google-pay-payment-service.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GooglePayCheckoutPaymentService implements GooglePayPaymentService {
6
+ readonly paymentSystemProcessingService: PaymentSystemProcessingService;
7
+ private initParams;
8
+ private checkout;
9
+ constructor(paymentSystemProcessingService: PaymentSystemProcessingService);
10
+ preparePayment({ initParams, checkDeviceData, }: PreparePaymentParams): GoogleInitData | null;
11
+ getPaymentRequest(): GooglePayPaymentRequest | null;
12
+ getAllowedPaymentMethods(): AllowedPaymentMethod[];
13
+ handleSuccessfulPayment(response: PaymentDataResponse): void;
14
+ handleFailedPayment(error: unknown): void;
15
+ private isCancelledStatus;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayCheckoutPaymentService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayCheckoutPaymentService>;
18
+ }
@@ -0,0 +1,18 @@
1
+ import { SummaryFinanceDetailsAdapterService } from '../../../payment/finance-details/summary/summary-finance-details-adapter.service';
2
+ import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest } from '../google-pay-library.interface';
3
+ import { GooglePayPaymentService, PreparePaymentParams } from './google-pay-payment-service.interface';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GooglePayInstantPaymentService implements GooglePayPaymentService {
6
+ private readonly summaryFinanceDetailsAdapterService;
7
+ private initParams;
8
+ private googleInitData;
9
+ constructor(summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService);
10
+ preparePayment({ initParams, checkDeviceData, }: PreparePaymentParams): GoogleInitData | null;
11
+ getPaymentRequest(): GooglePayPaymentRequest | null;
12
+ getAllowedPaymentMethods(): AllowedPaymentMethod[];
13
+ private extractGoogleInitData;
14
+ private getItemsTaxes;
15
+ private getTotalAmount;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<GooglePayInstantPaymentService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<GooglePayInstantPaymentService>;
18
+ }
@@ -0,0 +1,14 @@
1
+ import { CheckPaymentDeviceData } from '../check-payment-device-data.interface';
2
+ import { GooglePayInitParams } from '../google-pay-init-params.interface';
3
+ import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest, PaymentDataResponse } from '../google-pay-library.interface';
4
+ export interface PreparePaymentParams {
5
+ initParams: GooglePayInitParams;
6
+ checkDeviceData: CheckPaymentDeviceData;
7
+ }
8
+ export interface GooglePayPaymentService {
9
+ preparePayment(params: PreparePaymentParams): GoogleInitData | null;
10
+ getPaymentRequest(): GooglePayPaymentRequest | null;
11
+ getAllowedPaymentMethods(): AllowedPaymentMethod[];
12
+ handleSuccessfulPayment?(response: PaymentDataResponse): void;
13
+ handleFailedPayment?(error: unknown): void;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { CartLine } from '../../payment/finance-details/cart-line.interface';
2
+ export interface UpdatedPrice {
3
+ total: number;
4
+ subtotalPayment?: CartLine | null;
5
+ subtotalDetails?: CartLine[];
6
+ totalDetails?: CartLine[];
7
+ }
@@ -1,6 +1,12 @@
1
+ import { Field } from '../payment/field.interface';
2
+ import { SubmitResponse } from '../payment/submit/response/submit-response.class';
3
+ import { XpsSummary } from '../payment/xps-summary.interface';
1
4
  import { XpsBoolean } from '../xps-boolean.enum';
2
5
  export interface SdkPaymentSystemsInitialData {
3
- data: string;
4
6
  sandbox: XpsBoolean;
5
7
  country: string;
8
+ fields: Field[];
9
+ summary: XpsSummary | null;
10
+ submitResponse: SubmitResponse | null;
11
+ data: string | null;
6
12
  }
@@ -1,4 +1,4 @@
1
1
  import { SdkPaymentSystemsInitialData } from './sdk-payment-systems-initial-data.interface';
2
2
  export interface SdkPaymentSystems {
3
- getInitialData(): SdkPaymentSystemsInitialData;
3
+ getInitialData(): Promise<SdkPaymentSystemsInitialData>;
4
4
  }
@@ -29,4 +29,5 @@ export interface Project {
29
29
  isMerchantManageSavedMethods?: boolean;
30
30
  trackingInfo: TrackingInfo[] | [];
31
31
  isSubtotalVisibleByDefault?: boolean;
32
+ isApplePayIframeIntegrationTurnedOn?: boolean;
32
33
  }
@@ -10,6 +10,7 @@ import { UserBalanceService } from './core/user-balance/user-balance.service';
10
10
  import { PaymentConfiguration } from './core/payment/payment-configuration.interface';
11
11
  import { PaymentService } from './core/payment/payment.service';
12
12
  import { Payment } from './core/payment/payment.interface';
13
+ import { Field } from './core/payment/field.interface';
13
14
  import { DeviceFingerPrintService } from './core/device-finger-print/device-finger-print.service';
14
15
  import { LegalService } from './core/legal/legal.service';
15
16
  import { LegalComponentConfig } from './core/legal/legal.component.config';
@@ -44,6 +45,11 @@ import { SendInstructionService } from './core/xsolla-number/api/send-instructio
44
45
  import { SendInstructionResponseInterface } from './core/xsolla-number/api/send-instruction/response/send-instruction-response.interface';
45
46
  import { SendInstructionParametersInterface } from './core/xsolla-number/api/send-instruction/send-instruction-parameters.interface';
46
47
  import { ScriptTrackerService } from './core/script-tracker/script-tracker.service';
48
+ import { SyncResponse } from './core/payment/sync/response/sync-response.class';
49
+ import { XpsSummary } from './core/payment/xps-summary.interface';
50
+ import { SubmitResponse } from './core/payment/submit/response/submit-response.class';
51
+ import { DeepReadonly } from './core/deep-readonly.type';
52
+ import { Project } from './core/settings/project.interface';
47
53
  import * as i0 from "@angular/core";
48
54
  export declare class CoreLibraryService {
49
55
  private readonly settingsService;
@@ -77,9 +83,14 @@ export declare class CoreLibraryService {
77
83
  deleteSavedMethod: (id: number, type: string) => Promise<boolean>;
78
84
  };
79
85
  sdkPaymentSystems: SdkPaymentSystems;
86
+ finance: {
87
+ getDetailsFromSummary: (summary: XpsSummary) => FinanceDetails;
88
+ };
80
89
  constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService, formMessagesService: FormMessagesService, editSavedMethodsService: EditSavedMethodsService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, performanceService: PerformanceService, combinedPaymentMethodsService: CombinedPaymentMethodsService, countriesApiService: CountriesApiService, sendInstructionService: SendInstructionService, scriptTrackerService: ScriptTrackerService);
81
90
  init(configuration: InitConfiguration): Promise<void>;
82
91
  getStatus(url?: string): Promise<Status>;
92
+ calculateField(changedField: Field, fields: Field[]): Promise<SyncResponse>;
93
+ submit(fields: Field[]): Promise<SubmitResponse>;
83
94
  sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
84
95
  getQrCodeInitialData(): {
85
96
  qrCode: string;
@@ -101,6 +112,7 @@ export declare class CoreLibraryService {
101
112
  get paymentForm$(): Observable<FormControlStatus | null>;
102
113
  get formResponse$(): Observable<FormResponse | null>;
103
114
  get formResponseValue(): FormResponse | null;
115
+ get projectSettings(): DeepReadonly<Project>;
104
116
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
105
117
  static ɵprov: i0.ɵɵInjectableDeclaration<CoreLibraryService>;
106
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/payment-client-core",
3
- "version": "0.2.44",
3
+ "version": "0.2.46",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.3",
6
6
  "@angular/core": "^17.3.3",
@@ -1,17 +0,0 @@
1
- import { FieldNames } from './payment/field-names.enum';
2
- export const agreementsGroup = [
3
- FieldNames.licenseDisclaimer,
4
- FieldNames.termsAndConditions,
5
- FieldNames.termsAndConditionsHtcEula,
6
- FieldNames.termsAndConditionsAtariTc,
7
- FieldNames.termsAndConditionsAtariPp,
8
- FieldNames.termsAndConditionsRolandEula,
9
- FieldNames.termsAndConditionsRobloxEula,
10
- FieldNames.termsAndConditionsDeusLoVultEula,
11
- FieldNames.termsAndConditionsOnzenga,
12
- FieldNames.take2Taxes,
13
- FieldNames.rockstarTaxes,
14
- FieldNames.omnibusDirective,
15
- FieldNames.koreaLimitsInstruction,
16
- ];
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdyZWVtZW50c0dyb3VwLmNvbnN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcGF5bWVudC1jbGllbnQtY29yZS9zcmMvbGliL2NvcmUvYWdyZWVtZW50c0dyb3VwLmNvbnN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSw0QkFBNEIsQ0FBQztBQUV4RCxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUc7SUFDN0IsVUFBVSxDQUFDLGlCQUFpQjtJQUM1QixVQUFVLENBQUMsa0JBQWtCO0lBQzdCLFVBQVUsQ0FBQyx5QkFBeUI7SUFDcEMsVUFBVSxDQUFDLHlCQUF5QjtJQUNwQyxVQUFVLENBQUMseUJBQXlCO0lBQ3BDLFVBQVUsQ0FBQyw0QkFBNEI7SUFDdkMsVUFBVSxDQUFDLDRCQUE0QjtJQUN2QyxVQUFVLENBQUMsZ0NBQWdDO0lBQzNDLFVBQVUsQ0FBQyx5QkFBeUI7SUFDcEMsVUFBVSxDQUFDLFVBQVU7SUFDckIsVUFBVSxDQUFDLGFBQWE7SUFDeEIsVUFBVSxDQUFDLGdCQUFnQjtJQUMzQixVQUFVLENBQUMsc0JBQXNCO0NBQ2xDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGaWVsZE5hbWVzIH0gZnJvbSAnLi9wYXltZW50L2ZpZWxkLW5hbWVzLmVudW0nO1xuXG5leHBvcnQgY29uc3QgYWdyZWVtZW50c0dyb3VwID0gW1xuICBGaWVsZE5hbWVzLmxpY2Vuc2VEaXNjbGFpbWVyLFxuICBGaWVsZE5hbWVzLnRlcm1zQW5kQ29uZGl0aW9ucyxcbiAgRmllbGROYW1lcy50ZXJtc0FuZENvbmRpdGlvbnNIdGNFdWxhLFxuICBGaWVsZE5hbWVzLnRlcm1zQW5kQ29uZGl0aW9uc0F0YXJpVGMsXG4gIEZpZWxkTmFtZXMudGVybXNBbmRDb25kaXRpb25zQXRhcmlQcCxcbiAgRmllbGROYW1lcy50ZXJtc0FuZENvbmRpdGlvbnNSb2xhbmRFdWxhLFxuICBGaWVsZE5hbWVzLnRlcm1zQW5kQ29uZGl0aW9uc1JvYmxveEV1bGEsXG4gIEZpZWxkTmFtZXMudGVybXNBbmRDb25kaXRpb25zRGV1c0xvVnVsdEV1bGEsXG4gIEZpZWxkTmFtZXMudGVybXNBbmRDb25kaXRpb25zT256ZW5nYSxcbiAgRmllbGROYW1lcy50YWtlMlRheGVzLFxuICBGaWVsZE5hbWVzLnJvY2tzdGFyVGF4ZXMsXG4gIEZpZWxkTmFtZXMub21uaWJ1c0RpcmVjdGl2ZSxcbiAgRmllbGROYW1lcy5rb3JlYUxpbWl0c0luc3RydWN0aW9uLFxuXTtcbiJdfQ==