@xsolla/payment-client-core 0.2.88 → 0.2.90
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 +7 -2
- package/esm2022/lib/core/payment/actions/next-actions.mjs +1 -4
- package/esm2022/lib/core/payment/actions/redirect/redirect.action.class.mjs +8 -8
- package/esm2022/lib/core/payment/field-names.enum.mjs +1 -2
- package/esm2022/lib/core/payment/payment.service.mjs +2 -5
- package/esm2022/lib/core-library.service.mjs +4 -1
- package/fesm2022/xsolla-payment-client-core.mjs +17 -31
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/actions/next-action.service.d.ts +2 -0
- package/lib/core/payment/actions/redirect/redirect.action.class.d.ts +1 -1
- package/lib/core/payment/field-names.enum.d.ts +0 -1
- package/lib/core/payment/payment.service.d.ts +1 -4
- package/lib/core-library.service.d.ts +3 -4
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.90.tgz +0 -0
- package/esm2022/lib/core/payment/actions/redirect/google-three-ds-redirect.action.class.mjs +0 -20
- package/lib/core/payment/actions/redirect/google-three-ds-redirect.action.class.d.ts +0 -9
- package/xsolla-payment-client-core-0.2.88.tgz +0 -0
|
@@ -4,6 +4,7 @@ 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';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class NextActionService {
|
|
9
10
|
private readonly nextActionTokens;
|
|
@@ -15,6 +16,7 @@ export declare class NextActionService {
|
|
|
15
16
|
constructor(nextActionTokens: NextActionTokens, injector: Injector, showErrorsActionCreator: ShowErrorsActionCreator);
|
|
16
17
|
getNextAction(submitResponse: SubmitResponse): NextAction | null;
|
|
17
18
|
emitFlowUpdates(action: NextAction): void;
|
|
19
|
+
emitFlowErrors(errors: XpsError[]): void;
|
|
18
20
|
private fillNextActionsList;
|
|
19
21
|
private findNextAction;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<NextActionService, never>;
|
|
@@ -9,8 +9,8 @@ export declare class RedirectActionCreator implements ActionCreator {
|
|
|
9
9
|
constructor(settingsService: SettingsService);
|
|
10
10
|
getActionData(submitResponse: SubmitResponse): RedirectAction;
|
|
11
11
|
isSuitable(response: SubmitResponse): boolean;
|
|
12
|
-
protected getRedirectUrl(submitResponse: SubmitResponse): string;
|
|
13
12
|
private getRedirect;
|
|
13
|
+
private getRedirectUrl;
|
|
14
14
|
private getIsNewWindowRequired;
|
|
15
15
|
private preparePagesUrl;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<RedirectActionCreator, never>;
|
|
@@ -79,6 +79,5 @@ export declare enum FieldNames {
|
|
|
79
79
|
payViaCheckoutUrl = "payViaCheckoutUrl",
|
|
80
80
|
googlePayInitData = "googlePayInitData",
|
|
81
81
|
googlePayPaymentData = "googlePayPaymentData",
|
|
82
|
-
googlePay3dsRedirect = "googlePay3DSRedirect",
|
|
83
82
|
externalCardIssuerCountry = "externalCardIssuerCountry"
|
|
84
83
|
}
|
|
@@ -77,10 +77,7 @@ export declare class PaymentService {
|
|
|
77
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);
|
|
78
78
|
initialize(config: PaymentConfiguration): Promise<InitializedForm>;
|
|
79
79
|
submit(): Promise<NextAction | null | void>;
|
|
80
|
-
submitWithFields(fields?: Field[]): Promise<
|
|
81
|
-
response: SubmitResponse;
|
|
82
|
-
nextAction: NextAction | null | void;
|
|
83
|
-
}>;
|
|
80
|
+
submitWithFields(fields?: Field[]): Promise<SubmitResponse>;
|
|
84
81
|
setupInitialFieldValues(): void;
|
|
85
82
|
getFields(): Field[];
|
|
86
83
|
getControlStatus(name: FieldNames): ControlStatus | null;
|
|
@@ -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;
|
|
@@ -96,10 +97,7 @@ export declare class CoreLibraryService {
|
|
|
96
97
|
init(configuration: InitConfiguration): Promise<void>;
|
|
97
98
|
getStatus(url?: string): Promise<Status>;
|
|
98
99
|
calculateField(changedField: Field, fields: Field[]): Promise<SyncResponse>;
|
|
99
|
-
submit(fields: Field[]): Promise<
|
|
100
|
-
response: SubmitResponse;
|
|
101
|
-
nextAction: NextAction | null | void;
|
|
102
|
-
}>;
|
|
100
|
+
submit(fields: Field[]): Promise<SubmitResponse>;
|
|
103
101
|
sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
|
|
104
102
|
getQrCodeInitialData(): {
|
|
105
103
|
qrCode: string;
|
|
@@ -119,6 +117,7 @@ export declare class CoreLibraryService {
|
|
|
119
117
|
getLegalComponentConfig(pid?: number): LegalComponentConfig;
|
|
120
118
|
getUserBalanceValue(): Balance | null;
|
|
121
119
|
registerLogHandler(handler: LogHandler): void;
|
|
120
|
+
emitFlowErrors(errors: XpsError[]): void;
|
|
122
121
|
get paymentForm$(): Observable<FormControlStatus | null>;
|
|
123
122
|
get formResponse$(): Observable<FormResponse | null>;
|
|
124
123
|
get formResponseValue(): FormResponse | null;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { XpsCommand } from '../../xps-comand.enum';
|
|
3
|
-
import { RedirectActionCreator } from './redirect.action.class';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export class GoogleThreeDsRedirectActionCreator extends RedirectActionCreator {
|
|
6
|
-
isSuitable(response) {
|
|
7
|
-
return (response.currentCommand === XpsCommand.checkout &&
|
|
8
|
-
!response.parameters.checkout &&
|
|
9
|
-
Boolean(response.parameters.form?.googlePay3DSRedirect?.value));
|
|
10
|
-
}
|
|
11
|
-
getRedirectUrl(submitResponse) {
|
|
12
|
-
return (String(submitResponse.parameters.form?.googlePay3DSRedirect?.value) ?? '');
|
|
13
|
-
}
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
15
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator }); }
|
|
16
|
-
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: GoogleThreeDsRedirectActionCreator, decorators: [{
|
|
18
|
-
type: Injectable
|
|
19
|
-
}] });
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ29vZ2xlLXRocmVlLWRzLXJlZGlyZWN0LmFjdGlvbi5jbGFzcy5qcyIsInNvdXJjZVJvb3QiOiIi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
-
import { RedirectActionCreator } from './redirect.action.class';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class GoogleThreeDsRedirectActionCreator extends RedirectActionCreator {
|
|
5
|
-
isSuitable(response: SubmitResponse): boolean;
|
|
6
|
-
protected getRedirectUrl(submitResponse: SubmitResponse): string;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<GoogleThreeDsRedirectActionCreator, never>;
|
|
8
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<GoogleThreeDsRedirectActionCreator>;
|
|
9
|
-
}
|
|
Binary file
|