@xsolla/payment-client-core 0.2.91 → 0.2.92
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-actions.mjs +3 -1
- package/esm2022/lib/core/payment/actions/redirect/google-three-ds-redirect.action.class.mjs +20 -0
- package/esm2022/lib/core/payment/actions/redirect/redirect.action.class.mjs +16 -8
- package/esm2022/lib/core/payment/actions/redirect/redirect.action.type.mjs +1 -1
- package/esm2022/lib/core/payment/field-names.enum.mjs +2 -1
- package/esm2022/lib/core/payment/form/validators/required/required.validator.mjs +1 -2
- package/esm2022/lib/core/payment/payment-configuration.interface.mjs +1 -1
- package/esm2022/lib/core/payment/payment-configurations/types/google-pay-form-configuration.interface.mjs +2 -0
- package/esm2022/lib/core/payment/payment-configurations/types/is-credit-card-settings.guard.mjs +5 -0
- package/esm2022/lib/core/payment/payment-configurations/types/is-google-pay-settings.guard.mjs +5 -0
- package/esm2022/lib/core/payment/payment-settings/payment-settings.service.mjs +8 -5
- package/esm2022/lib/core/payment/payment.service.mjs +13 -5
- package/esm2022/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.mjs +1 -1
- package/esm2022/lib/core-library.service.mjs +1 -1
- package/fesm2022/xsolla-payment-client-core.mjs +59 -17
- package/fesm2022/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/actions/redirect/google-three-ds-redirect.action.class.d.ts +9 -0
- package/lib/core/payment/actions/redirect/redirect.action.class.d.ts +2 -1
- package/lib/core/payment/actions/redirect/redirect.action.type.d.ts +1 -0
- package/lib/core/payment/field-names.enum.d.ts +1 -0
- package/lib/core/payment/payment-configuration.interface.d.ts +4 -2
- package/lib/core/payment/payment-configurations/types/google-pay-form-configuration.interface.d.ts +8 -0
- package/lib/core/payment/payment-configurations/types/is-credit-card-settings.guard.d.ts +3 -0
- package/lib/core/payment/payment-configurations/types/is-google-pay-settings.guard.d.ts +3 -0
- package/lib/core/payment/payment.service.d.ts +4 -1
- package/lib/core/sdk-payment-systems/sdk-payment-systems-initial-data.interface.d.ts +1 -0
- package/lib/core-library.service.d.ts +4 -1
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.2.92.tgz +0 -0
- package/xsolla-payment-client-core-0.2.91.tgz +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SubmitResponse } from '../../requests/submit/response/submit-response.class';
|
|
2
|
+
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
|
+
}
|
|
@@ -9,9 +9,10 @@ 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;
|
|
12
13
|
private getRedirect;
|
|
13
|
-
private getRedirectUrl;
|
|
14
14
|
private getIsNewWindowRequired;
|
|
15
|
+
private getIsSameWindowRequired;
|
|
15
16
|
private preparePagesUrl;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<RedirectActionCreator, never>;
|
|
17
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<RedirectActionCreator>;
|
|
@@ -79,6 +79,7 @@ export declare enum FieldNames {
|
|
|
79
79
|
payViaCheckoutUrl = "payViaCheckoutUrl",
|
|
80
80
|
googlePayInitData = "googlePayInitData",
|
|
81
81
|
googlePayPaymentData = "googlePayPaymentData",
|
|
82
|
+
googlePay3dsRedirect = "googlePay3DSRedirect",
|
|
82
83
|
externalCardIssuerCountry = "externalCardIssuerCountry",
|
|
83
84
|
pmId = "pm_id"
|
|
84
85
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { XpsBoolean } from '../xps-boolean.enum';
|
|
2
2
|
import { creditCardPaymentMethodId } from './credit-card-payment-methods-id.variable';
|
|
3
3
|
import { PaymentConfigurationCreditCardSettings } from './payment-configurations/types/credit-card-form-configuration.interface';
|
|
4
|
+
import { PaymentConfigurationGooglePaySettings } from './payment-configurations/types/google-pay-form-configuration.interface';
|
|
5
|
+
import { googlePayPid } from '../sdk-payment-systems/sdk-payment-methods.const';
|
|
4
6
|
export interface OverridedField {
|
|
5
7
|
initialValue: XpsBoolean | string;
|
|
6
8
|
}
|
|
@@ -16,8 +18,8 @@ export interface BasePaymentConfiguration {
|
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
20
|
interface PaymentConfigurationWithGeneralSettings extends BasePaymentConfiguration {
|
|
19
|
-
paymentMethodId: Exclude<number, typeof creditCardPaymentMethodId>;
|
|
21
|
+
paymentMethodId: Exclude<number, typeof creditCardPaymentMethodId | typeof googlePayPid>;
|
|
20
22
|
paymentMethodSettings?: never;
|
|
21
23
|
}
|
|
22
|
-
export type PaymentConfiguration = PaymentConfigurationCreditCardSettings | PaymentConfigurationWithGeneralSettings;
|
|
24
|
+
export type PaymentConfiguration = PaymentConfigurationCreditCardSettings | PaymentConfigurationGooglePaySettings | PaymentConfigurationWithGeneralSettings;
|
|
23
25
|
export {};
|
package/lib/core/payment/payment-configurations/types/google-pay-form-configuration.interface.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BasePaymentConfiguration } from '../../payment-configuration.interface';
|
|
2
|
+
import { googlePayPid } from '../../../sdk-payment-systems/sdk-payment-methods.const';
|
|
3
|
+
export type PaymentConfigurationGooglePaySettings = BasePaymentConfiguration & {
|
|
4
|
+
paymentMethodId: typeof googlePayPid;
|
|
5
|
+
paymentMethodSettings: {
|
|
6
|
+
useSdkHandlerForUserBackRedirect?: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaymentConfigurationCreditCardSettings } from './credit-card-form-configuration.interface';
|
|
2
|
+
import { PaymentConfiguration } from '../../payment-configuration.interface';
|
|
3
|
+
export declare const isCreditCardSettingsGuard: (settings: PaymentConfiguration) => settings is PaymentConfigurationCreditCardSettings;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PaymentConfiguration } from '../../payment-configuration.interface';
|
|
2
|
+
import { PaymentConfigurationGooglePaySettings } from './google-pay-form-configuration.interface';
|
|
3
|
+
export declare const isGooglePaySettingsGuard: (settings: PaymentConfiguration) => settings is PaymentConfigurationGooglePaySettings;
|
|
@@ -80,7 +80,10 @@ export declare class PaymentService {
|
|
|
80
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);
|
|
81
81
|
initialize(config: PaymentConfiguration): Promise<InitializedForm>;
|
|
82
82
|
submit(): Promise<NextAction | null | void>;
|
|
83
|
-
submitWithFields(fields?: Field[]): Promise<
|
|
83
|
+
submitWithFields(fields?: Field[]): Promise<{
|
|
84
|
+
response: SubmitResponse;
|
|
85
|
+
nextAction: NextAction | null | void;
|
|
86
|
+
}>;
|
|
84
87
|
setupInitialFieldValues(): void;
|
|
85
88
|
getFields(): Field[];
|
|
86
89
|
getControlStatus(name: FieldNames): ControlStatus | null;
|
|
@@ -97,7 +97,10 @@ export declare class CoreLibraryService {
|
|
|
97
97
|
init(configuration: InitConfiguration): Promise<void>;
|
|
98
98
|
getStatus(url?: string): Promise<Status>;
|
|
99
99
|
calculateField(changedField: Field, fields: Field[]): Promise<SyncResponse>;
|
|
100
|
-
submit(fields: Field[]): Promise<
|
|
100
|
+
submit(fields: Field[]): Promise<{
|
|
101
|
+
response: SubmitResponse;
|
|
102
|
+
nextAction: NextAction | null | void;
|
|
103
|
+
}>;
|
|
101
104
|
sendAnalytics(action: string, type: keyof typeof userBehaviourEventTypes, options?: SendEventMethodOptionsInterface): void;
|
|
102
105
|
getQrCodeInitialData(): {
|
|
103
106
|
qrCode: string;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|