@xsolla/payment-client-core 0.2.89 → 0.2.91
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.
- package/esm2022/lib/core/payment/actions/next-action.service.mjs +23 -9
- package/esm2022/lib/core/payment/external-change-fields.const.mjs +2 -1
- package/esm2022/lib/core/payment/field-names.enum.mjs +2 -1
- package/esm2022/lib/core/payment/finance-details/finance-details.service.mjs +17 -5
- package/esm2022/lib/core/payment/form/form.service.mjs +13 -5
- package/esm2022/lib/core/payment/initialize-actions/initialize-next-action.service.mjs +11 -4
- package/esm2022/lib/core/payment/payment-behaviour/payment-behaviour.service.mjs +15 -5
- package/esm2022/lib/core/payment/payment-behaviour/strategies/apple-pay-with-shipping-address/apple-pay-with-shipping-address.strategy.mjs +2 -1
- package/esm2022/lib/core/payment/payment-behaviour/strategies/behaviour-strategy.abstract.mjs +1 -1
- package/esm2022/lib/core/payment/payment-behaviour/strategies/google-pay-instant-flow/google-pay-instant-flow.strategy.mjs +2 -1
- package/esm2022/lib/core/payment/payment-behaviour/strategies/google-pay-regular-flow/google-pay-regular-flow.strategy.mjs +2 -1
- package/esm2022/lib/core/payment/payment.service.mjs +31 -8
- package/esm2022/lib/core/payment/requests/initialize/initialize.service.mjs +2 -1
- package/esm2022/lib/core/payment/requests/submit/submit.service.mjs +2 -1
- package/esm2022/lib/core/payment/requests/sync/sync.service.mjs +2 -1
- package/esm2022/lib/core/payment/status/listen-status/listen-status.service.mjs +5 -2
- package/esm2022/lib/core/payment/three-ds/three-ds-20/three-ds20.service.mjs +11 -4
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay-cart/apple-pay-cart.service.mjs +13 -5
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.mjs +9 -5
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/external-window-communication/external-window-communication.service.mjs +9 -4
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.mjs +19 -4
- package/esm2022/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.mjs +17 -4
- package/esm2022/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.mjs +9 -4
- package/esm2022/lib/core/user-behaviour-analytics/one-time-analytics-events.const.mjs +2 -5
- package/esm2022/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.mjs +42 -3
- package/esm2022/lib/core-library.service.mjs +4 -1
- package/fesm2022/xsolla-payment-client-core.mjs +682 -530
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/actions/next-action.service.d.ts +7 -2
- package/lib/core/payment/field-names.enum.d.ts +2 -1
- package/lib/core/payment/finance-details/finance-details.service.d.ts +5 -2
- package/lib/core/payment/form/form.service.d.ts +5 -2
- package/lib/core/payment/initialize-actions/initialize-next-action.service.d.ts +4 -1
- package/lib/core/payment/payment-behaviour/payment-behaviour.service.d.ts +4 -1
- package/lib/core/payment/payment-behaviour/strategies/apple-pay-with-shipping-address/apple-pay-with-shipping-address.strategy.d.ts +1 -0
- package/lib/core/payment/payment-behaviour/strategies/behaviour-strategy.abstract.d.ts +1 -0
- package/lib/core/payment/payment-behaviour/strategies/google-pay-instant-flow/google-pay-instant-flow.strategy.d.ts +1 -0
- package/lib/core/payment/payment-behaviour/strategies/google-pay-regular-flow/google-pay-regular-flow.strategy.d.ts +1 -0
- package/lib/core/payment/payment.service.d.ts +6 -1
- package/lib/core/payment/three-ds/three-ds-20/three-ds20.service.d.ts +3 -1
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay-cart/apple-pay-cart.service.d.ts +3 -1
- package/lib/core/sdk-payment-systems/apple-pay/apple-pay.service.d.ts +3 -1
- package/lib/core/sdk-payment-systems/apple-pay/external-window-communication/external-window-communication.service.d.ts +3 -1
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/braintree.handler.d.ts +3 -1
- package/lib/core/sdk-payment-systems/apple-pay/session-handlers/checkout.handler.d.ts +3 -1
- package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.d.ts +3 -1
- package/lib/core/user-behaviour-analytics/user-behaviour-event-name.enum.d.ts +40 -3
- package/lib/core-library.service.d.ts +2 -0
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.91.tgz +0 -0
- package/xsolla-payment-client-core-0.2.89.tgz +0 -0
|
@@ -4,19 +4,24 @@ import { SubmitResponse } from '../requests/submit/response/submit-response.clas
|
|
|
4
4
|
import { NextAction } from './next-action.interface';
|
|
5
5
|
import { NextActionTokens } from './next-actions';
|
|
6
6
|
import { ShowErrorsActionCreator } from './show-errors/show-errors.action.class';
|
|
7
|
+
import { XpsError } from '../xps-error.interface';
|
|
8
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
10
|
export declare class NextActionService {
|
|
9
11
|
private readonly nextActionTokens;
|
|
10
12
|
private readonly injector;
|
|
11
13
|
private readonly showErrorsActionCreator;
|
|
14
|
+
private readonly userBehaviourAnalyticsService;
|
|
12
15
|
private readonly flowUpdatesSubject;
|
|
13
16
|
private readonly nextActionsList;
|
|
14
17
|
get flowUpdates$(): Observable<NextAction>;
|
|
15
|
-
constructor(nextActionTokens: NextActionTokens, injector: Injector, showErrorsActionCreator: ShowErrorsActionCreator);
|
|
18
|
+
constructor(nextActionTokens: NextActionTokens, injector: Injector, showErrorsActionCreator: ShowErrorsActionCreator, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
16
19
|
getNextAction(submitResponse: SubmitResponse): NextAction | null;
|
|
17
20
|
emitFlowUpdates(action: NextAction): void;
|
|
21
|
+
emitFlowErrors(errors: XpsError[]): void;
|
|
18
22
|
private fillNextActionsList;
|
|
19
|
-
private
|
|
23
|
+
private findNextActionCreator;
|
|
24
|
+
private logNextAction;
|
|
20
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<NextActionService, never>;
|
|
21
26
|
static ɵprov: i0.ɵɵInjectableDeclaration<NextActionService>;
|
|
22
27
|
}
|
|
@@ -79,5 +79,6 @@ export declare enum FieldNames {
|
|
|
79
79
|
payViaCheckoutUrl = "payViaCheckoutUrl",
|
|
80
80
|
googlePayInitData = "googlePayInitData",
|
|
81
81
|
googlePayPaymentData = "googlePayPaymentData",
|
|
82
|
-
externalCardIssuerCountry = "externalCardIssuerCountry"
|
|
82
|
+
externalCardIssuerCountry = "externalCardIssuerCountry",
|
|
83
|
+
pmId = "pm_id"
|
|
83
84
|
}
|
|
@@ -5,16 +5,19 @@ import { FinanceDetails } from './finance-details.interface';
|
|
|
5
5
|
import { StatusFinanceDetailsAdapterService } from './status/status-finance-details-adapter.service';
|
|
6
6
|
import { SummaryFinanceDetailsAdapterService } from './summary/summary-finance-details-adapter.service';
|
|
7
7
|
import { SessionService } from '../../session/session.service';
|
|
8
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class FinanceDetailsService extends EmitDataService<FinanceDetails> {
|
|
10
11
|
private readonly sessionService;
|
|
11
12
|
private readonly summaryFinanceDetailsAdapterService;
|
|
12
13
|
private readonly statusFinanceDetailsAdapterService;
|
|
14
|
+
private readonly userBehaviourAnalyticsService;
|
|
13
15
|
private readonly purchaseSessionKey;
|
|
14
|
-
constructor(sessionService: SessionService, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, statusFinanceDetailsAdapterService: StatusFinanceDetailsAdapterService);
|
|
15
|
-
emitWithSummary(summary?: XpsSummary): void;
|
|
16
|
+
constructor(sessionService: SessionService, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, statusFinanceDetailsAdapterService: StatusFinanceDetailsAdapterService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
17
|
+
emitWithSummary(summary?: XpsSummary, needLogCart?: boolean): void;
|
|
16
18
|
emitWithStatus(status?: Status): void;
|
|
17
19
|
getDetailsFromSummary(summary: XpsSummary): FinanceDetails;
|
|
20
|
+
private logCartEvent;
|
|
18
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<FinanceDetailsService, never>;
|
|
19
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<FinanceDetailsService>;
|
|
20
23
|
}
|
|
@@ -4,15 +4,18 @@ import { ControlConfigService } from './controls/control-config.service';
|
|
|
4
4
|
import { FieldFormStates } from './field-form-states.interface';
|
|
5
5
|
import { FormState } from './form-state.interface';
|
|
6
6
|
import { FieldNames } from '../field-names.enum';
|
|
7
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class FormService {
|
|
9
|
-
|
|
10
|
+
private readonly controlConfigService;
|
|
11
|
+
private readonly userBehaviourAnalyticsService;
|
|
10
12
|
fieldFormStates: FieldFormStates;
|
|
11
|
-
constructor(controlConfigService: ControlConfigService);
|
|
13
|
+
constructor(controlConfigService: ControlConfigService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
12
14
|
createForm(fields: Field[]): UntypedFormGroup;
|
|
13
15
|
getFieldFormState(fieldName: FieldNames): FormState | null;
|
|
14
16
|
updateFieldFormState(form: UntypedFormGroup, fields: Field[], fieldName: string, formState: FormState): void;
|
|
15
17
|
private getVisibleFields;
|
|
18
|
+
private logCreateForm;
|
|
16
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
17
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
|
|
18
21
|
}
|
|
@@ -2,15 +2,18 @@ import { Injector } from '@angular/core';
|
|
|
2
2
|
import { InitializeResponse } from '../requests/initialize/response/initialize-response.class';
|
|
3
3
|
import { InitializeNextActionTokens } from './initialize-next-actions';
|
|
4
4
|
import { InitializeNextAction } from './next-action.interface';
|
|
5
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class InitializeNextActionService {
|
|
7
8
|
private readonly initializeNextActionTokens;
|
|
9
|
+
private readonly userBehaviourAnalyticsService;
|
|
8
10
|
private readonly injector;
|
|
9
11
|
private readonly initializeNextActionsList;
|
|
10
|
-
constructor(initializeNextActionTokens: InitializeNextActionTokens, injector: Injector);
|
|
12
|
+
constructor(initializeNextActionTokens: InitializeNextActionTokens, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, injector: Injector);
|
|
11
13
|
getNextAction(response: InitializeResponse): InitializeNextAction | null;
|
|
12
14
|
private fillNextActionsList;
|
|
13
15
|
private findNextAction;
|
|
16
|
+
private logNextAction;
|
|
14
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<InitializeNextActionService, never>;
|
|
15
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<InitializeNextActionService>;
|
|
16
19
|
}
|
|
@@ -4,13 +4,16 @@ import { BehaviourStrategyTokens } from './behaviour-strategies';
|
|
|
4
4
|
import { InitializeResponse } from '../requests/initialize/response/initialize-response.class';
|
|
5
5
|
import { SubmitResponse } from '../requests/submit/response/submit-response.class';
|
|
6
6
|
import { PaymentConfiguration } from '../payment-configuration.interface';
|
|
7
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class PaymentBehaviourService {
|
|
9
10
|
private readonly behaviourStrategyTokens;
|
|
11
|
+
private readonly userBehaviourAnalyticsService;
|
|
10
12
|
private readonly injector;
|
|
11
|
-
constructor(behaviourStrategyTokens: BehaviourStrategyTokens, injector: Injector);
|
|
13
|
+
constructor(behaviourStrategyTokens: BehaviourStrategyTokens, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, injector: Injector);
|
|
12
14
|
getApplicableBehaviourStrategies(paymentData: InitializeResponse | SubmitResponse | null, config: PaymentConfiguration): BehaviourStrategy[];
|
|
13
15
|
private getBehaviourStrategies;
|
|
16
|
+
private logApplicableStrategies;
|
|
14
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentBehaviourService, never>;
|
|
15
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentBehaviourService>;
|
|
16
19
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BehaviourStrategy } from '../behaviour-strategy.abstract';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class ApplePayWithShippingAddressStrategy extends BehaviourStrategy {
|
|
4
|
+
name: string;
|
|
4
5
|
constructor();
|
|
5
6
|
isSuitable(): boolean;
|
|
6
7
|
onInit(): void;
|
|
@@ -3,6 +3,7 @@ import { SubmitResponse } from '../../requests/submit/response/submit-response.c
|
|
|
3
3
|
import { PaymentConfiguration } from '../../payment-configuration.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare abstract class BehaviourStrategy {
|
|
6
|
+
abstract name: string;
|
|
6
7
|
protected paymentData: InitializeResponse | SubmitResponse | null;
|
|
7
8
|
protected paymentConfig: PaymentConfiguration;
|
|
8
9
|
isSuitable(): boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BehaviourStrategy } from '../behaviour-strategy.abstract';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class GooglePayRegularFlowStrategy extends BehaviourStrategy {
|
|
4
|
+
name: string;
|
|
4
5
|
constructor();
|
|
5
6
|
isSuitable(): boolean;
|
|
6
7
|
canAutoSubmit(): boolean;
|
|
@@ -14,6 +14,7 @@ import { ControlConfigService } from './form/controls/control-config.service';
|
|
|
14
14
|
import { FinanceDetails } from './finance-details/finance-details.interface';
|
|
15
15
|
import { FinanceDetailsService } from './finance-details/finance-details.service';
|
|
16
16
|
import { NextAction } from './actions/next-action.interface';
|
|
17
|
+
import { UserBehaviourAnalyticsService } from '../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
17
18
|
import { Field } from './field.interface';
|
|
18
19
|
import { PaymentConfiguration } from './payment-configuration.interface';
|
|
19
20
|
import { ValidationErrors } from './form/validators/validation-errors.interface';
|
|
@@ -58,6 +59,7 @@ export declare class PaymentService {
|
|
|
58
59
|
private readonly printInstructionService;
|
|
59
60
|
private readonly paymentBehaviourService;
|
|
60
61
|
private readonly translateService;
|
|
62
|
+
private readonly userBehaviourAnalyticsService;
|
|
61
63
|
form: UntypedFormGroup | null;
|
|
62
64
|
get formFieldsStatus$(): Observable<FormFieldsStatus>;
|
|
63
65
|
get paymentForm$(): Observable<FormControlStatus | null>;
|
|
@@ -67,6 +69,7 @@ export declare class PaymentService {
|
|
|
67
69
|
private financeDetails;
|
|
68
70
|
private focusFieldName;
|
|
69
71
|
private fields;
|
|
72
|
+
private isSubmitAttempted;
|
|
70
73
|
private config;
|
|
71
74
|
private destroy$;
|
|
72
75
|
private formDestroy$;
|
|
@@ -74,7 +77,7 @@ export declare class PaymentService {
|
|
|
74
77
|
private readonly formFieldsStatusSubject;
|
|
75
78
|
private readonly _formResponse$;
|
|
76
79
|
private isSavingMethodMode;
|
|
77
|
-
constructor(loggerService: LoggerService, initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, initializeNextActionService: InitializeNextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService, formMessagesService: FormMessagesService, settingsService: SettingsService, countryService: CountryService, checkStatusActionCreator: CheckStatusActionCreator, printInstructionService: PrintInstructionService, paymentBehaviourService: PaymentBehaviourService, translateService: TranslateService);
|
|
80
|
+
constructor(loggerService: LoggerService, initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, initializeNextActionService: InitializeNextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService, formMessagesService: FormMessagesService, settingsService: SettingsService, countryService: CountryService, checkStatusActionCreator: CheckStatusActionCreator, printInstructionService: PrintInstructionService, paymentBehaviourService: PaymentBehaviourService, translateService: TranslateService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
78
81
|
initialize(config: PaymentConfiguration): Promise<InitializedForm>;
|
|
79
82
|
submit(): Promise<NextAction | null | void>;
|
|
80
83
|
submitWithFields(fields?: Field[]): Promise<SubmitResponse>;
|
|
@@ -116,6 +119,8 @@ export declare class PaymentService {
|
|
|
116
119
|
private destroyBehaviourStrategies;
|
|
117
120
|
private autoSubmitBehaviourStrategies;
|
|
118
121
|
private handleSubmitWithErrors;
|
|
122
|
+
private logSubmitAttempt;
|
|
123
|
+
private logSubmit;
|
|
119
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
120
125
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
121
126
|
}
|
|
@@ -6,6 +6,7 @@ import { ThreeDsForm } from '../three-ds-form.interface';
|
|
|
6
6
|
import { DfpCollectService } from '../dfp-collect/dfp-collect.service';
|
|
7
7
|
import { ReinsuranceCheckService } from '../reinsurance-check/reinsurance-check.service';
|
|
8
8
|
import { StatusUpdate } from './status-update.interface';
|
|
9
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class ThreeDs20Service {
|
|
11
12
|
private readonly statusThreeDsService;
|
|
@@ -13,6 +14,7 @@ export declare class ThreeDs20Service {
|
|
|
13
14
|
private readonly webSocketFactory;
|
|
14
15
|
private readonly dfpCollectService;
|
|
15
16
|
private readonly reinsuranceCheckService;
|
|
17
|
+
private readonly userBehaviourAnalyticsService;
|
|
16
18
|
get statusUpdates$(): Observable<StatusUpdate>;
|
|
17
19
|
private webSocketSubscription;
|
|
18
20
|
private webSocketReconnectionSubscription;
|
|
@@ -23,7 +25,7 @@ export declare class ThreeDs20Service {
|
|
|
23
25
|
private readonly notifyDfpTimeoutMs;
|
|
24
26
|
private readonly statusThreeDsTimerId;
|
|
25
27
|
private readonly statusThreeDsTimeoutMs;
|
|
26
|
-
constructor(statusThreeDsService: StatusThreeDsService, notifyDfpStatusService: NotifyDfpStatusService, webSocketFactory: WebSocketFactory, dfpCollectService: DfpCollectService, reinsuranceCheckService: ReinsuranceCheckService);
|
|
28
|
+
constructor(statusThreeDsService: StatusThreeDsService, notifyDfpStatusService: NotifyDfpStatusService, webSocketFactory: WebSocketFactory, dfpCollectService: DfpCollectService, reinsuranceCheckService: ReinsuranceCheckService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
27
29
|
checkThreeDs20(threeDsForm: ThreeDsForm | null): Promise<void>;
|
|
28
30
|
private handleThreeDsUpdates;
|
|
29
31
|
private stopReinsuranceMethods;
|
|
@@ -5,8 +5,10 @@ import { UpdatedPrice } from '../updated-price.interface';
|
|
|
5
5
|
import { ShippingAddress } from '../shipping-address.interface';
|
|
6
6
|
import { XpsResponse } from '../../../payment/xps-response.interface';
|
|
7
7
|
import { SummaryFinanceDetailsAdapterService } from '../../../payment/finance-details/summary/summary-finance-details-adapter.service';
|
|
8
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class ApplePayCartService {
|
|
11
|
+
private readonly userBehaviourAnalyticsService;
|
|
10
12
|
private readonly summaryFinanceDetailsAdapterService;
|
|
11
13
|
private readonly cartSuccessfulRecalculated;
|
|
12
14
|
private readonly cartErrorRecalculated;
|
|
@@ -14,7 +16,7 @@ export declare class ApplePayCartService {
|
|
|
14
16
|
get cartSuccessfulRecalculated$(): Observable<UpdatedPrice>;
|
|
15
17
|
get cartErrorRecalculated$(): Observable<ApplePayError>;
|
|
16
18
|
get cartRecalculationRequest$(): Observable<ShippingAddress>;
|
|
17
|
-
constructor(summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService);
|
|
19
|
+
constructor(userBehaviourAnalyticsService: UserBehaviourAnalyticsService, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService);
|
|
18
20
|
recalculateCartTaxes(shippingContact: ApplePayShippingContact): void;
|
|
19
21
|
buildShippingContactUpdate(paymentParams: ApplePayParams, updatedPrice: UpdatedPrice): ApplePayShippingContactUpdate;
|
|
20
22
|
sendSuccessfulRecalculatedCart(xpsResponse: XpsResponse): void;
|
|
@@ -20,6 +20,7 @@ import { ShippingAddress } from './shipping-address.interface';
|
|
|
20
20
|
import { ApplePayShippingContact } from './session-handlers/apple-pay-session.interface';
|
|
21
21
|
import { UpdatedPrice } from './updated-price.interface';
|
|
22
22
|
import { LoggerService } from '../../exceptions-handling/logger/logger.service';
|
|
23
|
+
import { UserBehaviourAnalyticsService } from '../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
23
24
|
import * as i0 from "@angular/core";
|
|
24
25
|
export declare class ApplePayService {
|
|
25
26
|
private readonly window;
|
|
@@ -30,6 +31,7 @@ export declare class ApplePayService {
|
|
|
30
31
|
private readonly loggerService;
|
|
31
32
|
private readonly applePaySdkService;
|
|
32
33
|
private readonly externalWindowCommunicationService;
|
|
34
|
+
private readonly userBehaviourAnalyticsService;
|
|
33
35
|
private readonly settingsService;
|
|
34
36
|
private readonly payment;
|
|
35
37
|
private readonly error;
|
|
@@ -50,7 +52,7 @@ export declare class ApplePayService {
|
|
|
50
52
|
get getWindowSendTokenMessage$(): Observable<ApplePaySendTokenMessage>;
|
|
51
53
|
get getWindowClose$(): Observable<WindowCloseMessage>;
|
|
52
54
|
get getWindowReturnMessage$(): Observable<ReturnMessage>;
|
|
53
|
-
constructor(window: ExtendedWindow, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, braintreeHandler: BraintreeHandler, checkoutHandler: CheckoutHandler, appleParamsBuilder: ApplePayParamsBuilderService, loggerService: LoggerService, applePaySdkService: ApplePaySdkService, externalWindowCommunicationService: ApplePayExternalWindowCommunicationService, settingsService: SettingsService);
|
|
55
|
+
constructor(window: ExtendedWindow, summaryFinanceDetailsAdapterService: SummaryFinanceDetailsAdapterService, braintreeHandler: BraintreeHandler, checkoutHandler: CheckoutHandler, appleParamsBuilder: ApplePayParamsBuilderService, loggerService: LoggerService, applePaySdkService: ApplePaySdkService, externalWindowCommunicationService: ApplePayExternalWindowCommunicationService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService, settingsService: SettingsService);
|
|
54
56
|
addApplePaySdkJs(): void;
|
|
55
57
|
removeListeners(): void;
|
|
56
58
|
setApplePayParams(data: {
|
|
@@ -7,13 +7,15 @@ import { CommandsForPages } from '../commands-for-pages.enum';
|
|
|
7
7
|
import { RecalculateCartMessage } from '../socket-messages/recalculate-cart-message.interface';
|
|
8
8
|
import { ApplePaySendTokenMessage } from '../socket-messages/send-token-message.interface';
|
|
9
9
|
import { ReturnMessage } from '../socket-messages/return-message.interface';
|
|
10
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export declare class ApplePayExternalWindowCommunicationService {
|
|
12
13
|
private readonly window;
|
|
13
14
|
private readonly webSocketFactory;
|
|
14
15
|
private readonly socketBridgeService;
|
|
16
|
+
private readonly userBehaviourAnalyticsService;
|
|
15
17
|
private websocketClient;
|
|
16
|
-
constructor(window: ExtendedWindow, webSocketFactory: WebSocketFactory, socketBridgeService: SocketBridgeService);
|
|
18
|
+
constructor(window: ExtendedWindow, webSocketFactory: WebSocketFactory, socketBridgeService: SocketBridgeService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
17
19
|
getWindowClose$(): Observable<WindowCloseMessage>;
|
|
18
20
|
getWindowReturnMessage$(): Observable<ReturnMessage>;
|
|
19
21
|
getWindowSendTokenMessage$(): Observable<ApplePaySendTokenMessage>;
|
|
@@ -5,13 +5,15 @@ import { ApplePaySessionHandlerAbstract } from './session-handler.abstract';
|
|
|
5
5
|
import { StartSessionParams } from './start-session-params.interface';
|
|
6
6
|
import { ApplePayCartService } from '../apple-pay-cart/apple-pay-cart.service';
|
|
7
7
|
import { LoggerService } from '../../../exceptions-handling/logger/logger.service';
|
|
8
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class BraintreeHandler extends ApplePaySessionHandlerAbstract {
|
|
10
11
|
private readonly window;
|
|
11
12
|
private readonly loggerService;
|
|
12
13
|
private readonly applePayCartService;
|
|
14
|
+
private readonly userBehaviourAnalyticsService;
|
|
13
15
|
private paymentClient;
|
|
14
|
-
constructor(window: ExtendedWindow, loggerService: LoggerService, applePayCartService: ApplePayCartService);
|
|
16
|
+
constructor(window: ExtendedWindow, loggerService: LoggerService, applePayCartService: ApplePayCartService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
15
17
|
setClient(client: ApplePay): void;
|
|
16
18
|
startSession(params: ApplePayParams, additionalParams: StartSessionParams, applePayFinallyCallback: () => void): void;
|
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<BraintreeHandler, never>;
|
|
@@ -4,12 +4,14 @@ import { ApplePayParams } from '../apple-pay-params.interface';
|
|
|
4
4
|
import { ApplePaySessionHandlerAbstract } from './session-handler.abstract';
|
|
5
5
|
import { StartSessionParams } from './start-session-params.interface';
|
|
6
6
|
import { ApplePayCartService } from '../apple-pay-cart/apple-pay-cart.service';
|
|
7
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class CheckoutHandler extends ApplePaySessionHandlerAbstract {
|
|
9
10
|
private readonly window;
|
|
10
11
|
private readonly http;
|
|
11
12
|
private readonly applePayCartService;
|
|
12
|
-
|
|
13
|
+
private readonly userBehaviourAnalyticsService;
|
|
14
|
+
constructor(window: ExtendedWindow, http: HttpClient, applePayCartService: ApplePayCartService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
13
15
|
startSession(params: ApplePayParams, additionalParams: StartSessionParams, applePayFinallyCallback: () => void): void;
|
|
14
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutHandler, never>;
|
|
15
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutHandler>;
|
package/lib/core/sdk-payment-systems/google-pay/payment/google-pay-checkout-payment.service.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { PaymentSystemProcessingService } from '../../payment-systems/payment-system-processing.service';
|
|
2
2
|
import { AllowedPaymentMethod, GoogleInitData, GooglePayPaymentRequest, PaymentDataResponse } from '../google-pay-library.interface';
|
|
3
3
|
import { GooglePayPaymentService, PreparePaymentParams } from './google-pay-payment-service.interface';
|
|
4
|
+
import { UserBehaviourAnalyticsService } from '../../../user-behaviour-analytics/user-behaviour-analytics.service';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class GooglePayCheckoutPaymentService implements GooglePayPaymentService {
|
|
6
7
|
readonly paymentSystemProcessingService: PaymentSystemProcessingService;
|
|
8
|
+
private readonly userBehaviourAnalyticsService;
|
|
7
9
|
private initParams;
|
|
8
10
|
private checkout;
|
|
9
|
-
constructor(paymentSystemProcessingService: PaymentSystemProcessingService);
|
|
11
|
+
constructor(paymentSystemProcessingService: PaymentSystemProcessingService, userBehaviourAnalyticsService: UserBehaviourAnalyticsService);
|
|
10
12
|
preparePayment({ initParams, checkDeviceData, }: PreparePaymentParams): GoogleInitData | null;
|
|
11
13
|
getPaymentRequest(): GooglePayPaymentRequest | null;
|
|
12
14
|
getAllowedPaymentMethods(): AllowedPaymentMethod[];
|
|
@@ -1,8 +1,45 @@
|
|
|
1
1
|
export declare enum UserBehaviourEventName {
|
|
2
2
|
openPaystation = "open-paystation",
|
|
3
|
-
showMethodHeader = "show-method-header",
|
|
4
3
|
showErrorMessage = "show-error-message",
|
|
5
4
|
openStatusError = "open-status-error",
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
changeStatus = "change-status",
|
|
6
|
+
checkStatusUpdate = "check-status-update",
|
|
7
|
+
sysTrackedScripts = "sys-tracked_scripts",
|
|
8
|
+
showShoppingCart = "show-shopping_cart",
|
|
9
|
+
attemptBuyNow = "attempt-buy_now",
|
|
10
|
+
attemptContinue = "attempt-continue",
|
|
11
|
+
clickBtnPay = "click-btn-pay",
|
|
12
|
+
initializeNextAction = "initialize-next-action",
|
|
13
|
+
nextAction = "next-action",
|
|
14
|
+
createForm = "create-form",
|
|
15
|
+
applicablePaymentStrategies = "applicable-payment-strategies",
|
|
16
|
+
initializeRequest = "initialize-request",
|
|
17
|
+
submitRequest = "submit-request",
|
|
18
|
+
syncRequest = "sync-request",
|
|
19
|
+
threeDs2complete = "3DS-2.0-complete",
|
|
20
|
+
threeDs2challenge = "3DS-2.0-challenge",
|
|
21
|
+
threeDs2collectDfp = "3DS-2.0-collect-dfp",
|
|
22
|
+
applePayRecalculateCartTaxes = "apple-pay-recalculate-cart-taxes",
|
|
23
|
+
applePayRecalculateCartError = "apple-pay-recalculate-cart-error",
|
|
24
|
+
applePayOpenWebSocketConnection = "apple-pay-open-web-socket-connection",
|
|
25
|
+
applePaySendMessageToAnotherWindow = "apple-pay-send-message-to-another-window",
|
|
26
|
+
applePayBraintreeStartSession = "apple-pay-braintree-start-session",
|
|
27
|
+
applePayBraintreeSelectShipping = "apple-pay-braintree-select-shipping",
|
|
28
|
+
applePayBraintreeCartSuccessfulRecalculated = "apple-pay-braintree-cart-successful-recalculated",
|
|
29
|
+
applePayBraintreeCartErrorRecalculated = "apple-pay-braintree-cart-error-recalculated",
|
|
30
|
+
applePayBraintreeValidateMerchant = "apple-pay-braintree-validate-merchant",
|
|
31
|
+
applePayBraintreeValidateMerchantError = "apple-pay-braintree-validate-merchant-error",
|
|
32
|
+
applePayBraintreePaymentAuthorized = "apple-pay-braintree-payment-authorized",
|
|
33
|
+
applePayBraintreePaymentTokenizationError = "apple-pay-braintree-payment-tokenization-error",
|
|
34
|
+
applePayBraintreePaymentCancel = "apple-pay-braintree-payment-cancel",
|
|
35
|
+
applePayCheckoutSelectShipping = "apple-pay-checkout-select-shipping",
|
|
36
|
+
applePayCheckoutCartSuccessfulRecalculated = "apple-pay-checkout-cart-successful-recalculated",
|
|
37
|
+
applePayCheckoutCartErrorRecalculated = "apple-pay-checkout-cart-error-recalculated",
|
|
38
|
+
applePayCheckoutValidateMerchant = "apple-pay-checkout-validate-merchant",
|
|
39
|
+
applePayCheckoutValidateMerchantError = "apple-pay-checkout-validate-merchant-error",
|
|
40
|
+
applePayCheckoutPaymentAuthorized = "apple-pay-checkout-payment-authorized",
|
|
41
|
+
applePayCheckoutPaymentCancel = "apple-pay-checkout-payment-cancel",
|
|
42
|
+
applePayAcquirer = "apple-pay-acquirer",
|
|
43
|
+
googlePayHandleFailedPayment = "google-pay-handle-failed-payment",
|
|
44
|
+
googlePayHandleSuccessfulPayment = "google-pay-handle-successful-payment"
|
|
8
45
|
}
|
|
@@ -53,6 +53,7 @@ import { CommonLogAttributesService } from './core/exceptions-handling/common-lo
|
|
|
53
53
|
import { CommonLogAttributes } from './core/exceptions-handling/common-log-attributes/common-log-attributes.interface';
|
|
54
54
|
import { LogHandler } from './core/exceptions-handling/logger/log-handler.interface';
|
|
55
55
|
import { LoggerService } from './core/exceptions-handling/logger/logger.service';
|
|
56
|
+
import { XpsError } from './core/payment/xps-error.interface';
|
|
56
57
|
import * as i0 from "@angular/core";
|
|
57
58
|
export declare class CoreLibraryService {
|
|
58
59
|
private readonly settingsService;
|
|
@@ -116,6 +117,7 @@ export declare class CoreLibraryService {
|
|
|
116
117
|
getLegalComponentConfig(pid?: number): LegalComponentConfig;
|
|
117
118
|
getUserBalanceValue(): Balance | null;
|
|
118
119
|
registerLogHandler(handler: LogHandler): void;
|
|
120
|
+
emitFlowErrors(errors: XpsError[]): void;
|
|
119
121
|
get paymentForm$(): Observable<FormControlStatus | null>;
|
|
120
122
|
get formResponse$(): Observable<FormResponse | null>;
|
|
121
123
|
get formResponseValue(): FormResponse | null;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|