@xsolla/payment-client-core 0.1.4 → 0.1.5-2
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/esm2020/lib/core/device-finger-print/device-finger-print.service.mjs +26 -126
- package/esm2020/lib/core/device-finger-print/hash.type.mjs +1 -1
- package/esm2020/lib/core/encrypt-credit-card/encrypt-credit-card.service.mjs +72 -0
- package/esm2020/lib/core/encrypt-credit-card/encrypted-card.interface.mjs +2 -0
- package/esm2020/lib/core/encrypt-credit-card/open-card.interface.mjs +2 -0
- package/esm2020/lib/core/exceptions-handling/errors/encrypt-card-error.mjs +9 -0
- package/esm2020/lib/core/payment/actions/check-status/check-status.action.class.mjs +2 -3
- package/esm2020/lib/core/payment/actions/next-action.interface.mjs +1 -1
- package/esm2020/lib/core/payment/actions/next-actions.mjs +3 -1
- package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.class.mjs +7 -0
- package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.token.mjs +11 -0
- package/esm2020/lib/core/payment/actions/three-ds/three-ds.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/credit-card-payment-methods-id.variable.mjs +15 -0
- package/esm2020/lib/core/payment/form/controls/phone-control.config.mjs +8 -0
- package/esm2020/lib/core/payment/form/converters/birth-date.converter.mjs +38 -0
- package/esm2020/lib/core/payment/form/converters/card-expiration.converter.mjs +36 -0
- package/esm2020/lib/core/payment/form/converters/cardholder-name.converter.mjs +25 -0
- package/esm2020/lib/core/payment/form/converters/converters-map.mjs +21 -1
- package/esm2020/lib/core/payment/form/converters/cpf-name-regex.variable.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/cpf-name.converter.mjs +34 -0
- package/esm2020/lib/core/payment/form/converters/cpf-number.converter.mjs +31 -0
- package/esm2020/lib/core/payment/form/converters/cvv.converter.mjs +50 -0
- package/esm2020/lib/core/payment/form/converters/phone.converter.mjs +37 -0
- package/esm2020/lib/core/payment/form/converters/street-number/street-number-from-state.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/converters/street-number/street-number.converter.mjs +28 -0
- package/esm2020/lib/core/payment/form/converters/text.converter.mjs +19 -0
- package/esm2020/lib/core/payment/form/form.module.mjs +28 -1
- package/esm2020/lib/core/payment/form/validators/birth-date.validator.mjs +37 -0
- package/esm2020/lib/core/payment/form/validators/max-length-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/min-length-validator.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/phone-validator.mjs +6 -0
- package/esm2020/lib/core/payment/initialize/initialize-request-params.interface.mjs +1 -1
- package/esm2020/lib/core/payment/initialize/initialize.service.mjs +28 -19
- package/esm2020/lib/core/payment/initialize/response/initialize-response.class.mjs +43 -0
- package/esm2020/lib/core/payment/initialize/response/initialize-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +19 -5
- package/esm2020/lib/core/payment/status/check-status/check-status.service.mjs +8 -13
- package/esm2020/lib/core/payment/status/check-status/response/check-status-response.class.mjs +1 -1
- package/esm2020/lib/core/payment/submit/submit.service.mjs +13 -16
- package/esm2020/lib/core/payment/sync/field-async-validation.interface.mjs +1 -1
- package/esm2020/lib/core/payment/sync/field-sync-state.interface.mjs +1 -1
- package/esm2020/lib/core/payment/sync/request/sync-request.class.mjs +31 -0
- package/esm2020/lib/core/payment/sync/request/sync-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/sync/response/sync-response.class.mjs +17 -0
- package/esm2020/lib/core/payment/sync/response/sync-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/sync/sync.service.mjs +15 -15
- package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/notify-dfp-status.service.mjs +49 -0
- package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.class.mjs +8 -0
- package/esm2020/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.class.mjs +7 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.token.mjs +8 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.mjs +7 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.mjs +2 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-three-ds.service.mjs +60 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.mjs +7 -0
- package/esm2020/lib/core/payment/three-ds/api/status-three-ds/three-ds-checkout-form.interface.mjs +2 -0
- package/esm2020/lib/core/payment/three-ds/dfp-collect/dfp-collect.service.mjs +105 -0
- package/esm2020/lib/core/payment/three-ds/reinsurance-check/reinsurance-check.service.mjs +41 -0
- package/esm2020/lib/core/payment/three-ds/reinsurance-check/timer.interface.mjs +2 -0
- package/esm2020/lib/core/payment/three-ds/three-ds-20/status-update.interface.mjs +2 -0
- package/esm2020/lib/core/payment/three-ds/three-ds-20/three-ds20.service.mjs +109 -0
- package/esm2020/lib/core/payment/three-ds/three-ds-form.interface.mjs +2 -0
- package/esm2020/lib/core/payment/three-ds/three-ds-status-websocket-types.enum.mjs +5 -0
- package/esm2020/lib/core/payment/three-ds/three-ds.service.mjs +40 -0
- package/esm2020/lib/core/payment/xps-api/xps-api.service.mjs +79 -0
- package/esm2020/lib/core/payment/xps-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-request.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-response.error.mjs +7 -0
- package/esm2020/lib/core/payment/xps-response.interface.mjs +1 -1
- package/esm2020/lib/core-library.module.mjs +13 -4
- package/esm2020/lib/core-library.service.mjs +2 -2
- package/fesm2015/xsolla-payment-client-core.mjs +1899 -1057
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +1852 -1017
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/device-finger-print/device-finger-print.service.d.ts +3 -31
- package/lib/core/device-finger-print/hash.type.d.ts +1 -1
- package/lib/core/encrypt-credit-card/encrypt-credit-card.service.d.ts +16 -0
- package/lib/core/encrypt-credit-card/encrypted-card.interface.d.ts +6 -0
- package/lib/core/encrypt-credit-card/open-card.interface.d.ts +6 -0
- package/lib/core/exceptions-handling/errors/encrypt-card-error.d.ts +5 -0
- package/lib/core/payment/actions/next-action.interface.d.ts +2 -1
- package/lib/core/payment/actions/three-ds/three-ds.action.class.d.ts +8 -0
- package/lib/core/payment/actions/three-ds/three-ds.action.token.d.ts +4 -0
- package/lib/core/payment/actions/three-ds/three-ds.action.type.d.ts +5 -0
- package/lib/core/payment/credit-card-payment-methods-id.variable.d.ts +6 -0
- package/lib/core/payment/form/controls/phone-control.config.d.ts +6 -0
- package/lib/core/payment/form/converters/birth-date.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/card-expiration.converter.d.ts +16 -0
- package/lib/core/payment/form/converters/cardholder-name.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/cpf-name-regex.variable.d.ts +1 -0
- package/lib/core/payment/form/converters/cpf-name.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/cpf-number.converter.d.ts +11 -0
- package/lib/core/payment/form/converters/cvv.converter.d.ts +18 -0
- package/lib/core/payment/form/converters/phone.converter.d.ts +13 -0
- package/lib/core/payment/form/converters/street-number/street-number-from-state.interface.d.ts +3 -0
- package/lib/core/payment/form/converters/street-number/street-number.converter.d.ts +14 -0
- package/lib/core/payment/form/converters/text.converter.d.ts +11 -0
- package/lib/core/payment/form/validators/birth-date.validator.d.ts +2 -0
- package/lib/core/payment/form/validators/max-length-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/min-length-validator.d.ts +2 -0
- package/lib/core/payment/form/validators/phone-validator.d.ts +2 -0
- package/lib/core/payment/initialize/initialize-request-params.interface.d.ts +1 -0
- package/lib/core/payment/initialize/initialize.service.d.ts +8 -6
- package/lib/core/payment/initialize/{initialize-response.class.d.ts → response/initialize-response.class.d.ts} +2 -2
- package/lib/core/payment/payment.interface.d.ts +2 -2
- package/lib/core/payment/payment.service.d.ts +4 -2
- package/lib/core/payment/status/check-status/check-status.service.d.ts +3 -4
- package/lib/core/payment/submit/submit.service.d.ts +5 -4
- package/lib/core/payment/sync/field-async-validation.interface.d.ts +1 -1
- package/lib/core/payment/sync/field-sync-state.interface.d.ts +1 -1
- package/lib/core/payment/sync/{sync-request.class.d.ts → request/sync-request.class.d.ts} +3 -3
- package/lib/core/payment/sync/{sync-response.class.d.ts → response/sync-response.class.d.ts} +2 -2
- package/lib/core/payment/sync/sync.service.d.ts +8 -7
- package/lib/core/payment/three-ds/api/notify-dfp-status/notify-dfp-status.service.d.ts +14 -0
- package/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.class.d.ts +10 -0
- package/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.token.d.ts +6 -0
- package/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.class.d.ts +5 -0
- package/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.token.d.ts +6 -0
- package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.d.ts +7 -0
- package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.token.d.ts +6 -0
- package/lib/core/payment/three-ds/api/status-three-ds/status-three-ds-response.interface.d.ts +7 -0
- package/lib/core/payment/three-ds/api/status-three-ds/status-three-ds.service.d.ts +21 -0
- package/lib/core/payment/three-ds/api/status-three-ds/status-types.enum.d.ts +5 -0
- package/lib/core/payment/three-ds/api/status-three-ds/three-ds-checkout-form.interface.d.ts +7 -0
- package/lib/core/payment/three-ds/dfp-collect/dfp-collect.service.d.ts +20 -0
- package/lib/core/payment/three-ds/reinsurance-check/reinsurance-check.service.d.ts +12 -0
- package/lib/core/payment/three-ds/reinsurance-check/timer.interface.d.ts +9 -0
- package/lib/core/payment/three-ds/three-ds-20/status-update.interface.d.ts +12 -0
- package/lib/core/payment/three-ds/three-ds-20/three-ds20.service.d.ts +32 -0
- package/lib/core/payment/three-ds/three-ds-form.interface.d.ts +11 -0
- package/lib/core/payment/three-ds/three-ds-status-websocket-types.enum.d.ts +3 -0
- package/lib/core/payment/three-ds/three-ds.service.d.ts +14 -0
- package/lib/core/payment/xps-api/xps-api.service.d.ts +20 -0
- package/lib/core/payment/xps-request-params.interface.d.ts +3 -0
- package/lib/core/payment/xps-request.interface.d.ts +10 -0
- package/lib/core/payment/xps-response.error.d.ts +4 -0
- package/lib/core/payment/xps-response.interface.d.ts +2 -10
- package/package.json +2 -3
- package/xsolla-payment-client-core-0.1.5-2.tgz +0 -0
- package/esm2020/lib/core/device-finger-print/device-finger-print-components.interface.mjs +0 -2
- package/esm2020/lib/core/device-finger-print/fingerprint-js.interface.mjs +0 -2
- package/esm2020/lib/core/exceptions-handling/errors/default-terminal-error.class.mjs +0 -8
- package/esm2020/lib/core/payment/initialize/initialize-response.class.mjs +0 -43
- package/esm2020/lib/core/payment/initialize/initialize-response.token.mjs +0 -8
- package/esm2020/lib/core/payment/sync/sync-request.class.mjs +0 -31
- package/esm2020/lib/core/payment/sync/sync-request.token.mjs +0 -8
- package/esm2020/lib/core/payment/sync/sync-response.class.mjs +0 -17
- package/esm2020/lib/core/payment/sync/sync-response.token.mjs +0 -8
- package/esm2020/lib/core/payment/xps-request.abstract.mjs +0 -8
- package/lib/core/device-finger-print/device-finger-print-components.interface.d.ts +0 -4
- package/lib/core/device-finger-print/fingerprint-js.interface.d.ts +0 -6
- package/lib/core/exceptions-handling/errors/default-terminal-error.class.d.ts +0 -4
- package/lib/core/payment/xps-request.abstract.d.ts +0 -6
- package/xsolla-payment-client-core-0.1.4.tgz +0 -0
- /package/lib/core/payment/initialize/{initialize-response.token.d.ts → response/initialize-response.token.d.ts} +0 -0
- /package/lib/core/payment/sync/{sync-request.token.d.ts → request/sync-request.token.d.ts} +0 -0
- /package/lib/core/payment/sync/{sync-response.token.d.ts → response/sync-response.token.d.ts} +0 -0
|
@@ -1,44 +1,16 @@
|
|
|
1
|
-
import { SecureApiClient } from '../http/secure-api/secure-api.service';
|
|
2
1
|
import { SettingsService } from '../settings/settings.service';
|
|
3
|
-
import { ExtendedWindow } from '../extended-window.interface';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
export declare class DeviceFingerPrintService {
|
|
6
|
-
private readonly secureApi;
|
|
7
4
|
private readonly settingsService;
|
|
8
|
-
private readonly window;
|
|
9
5
|
private hash;
|
|
10
|
-
private readonly apiRoute;
|
|
11
|
-
private fingerprintJs;
|
|
12
6
|
private antifraudFingerprintLibrary;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
init(): Promise<void>;
|
|
7
|
+
constructor(settingsService: SettingsService);
|
|
8
|
+
init(): void;
|
|
16
9
|
getHash(): Promise<string>;
|
|
17
|
-
private loadFingerprintJs;
|
|
18
10
|
private loadAntifraudFingerprintLibrary;
|
|
19
|
-
private makeAntifraudFingerprint;
|
|
20
|
-
/**
|
|
21
|
-
*Загружаем библиотеку, генерируем данные,
|
|
22
|
-
*хешируем с помощью BASE64 и отправляем на бэкенд,
|
|
23
|
-
*в ответ получаем dfp_hash.
|
|
24
|
-
**/
|
|
25
11
|
private buildHash;
|
|
26
|
-
/**
|
|
27
|
-
*Новая версия библиотеки содержит не все компоненты, некоторые приходится имплементировать самостоятельно
|
|
28
|
-
**/
|
|
29
|
-
private getHasLiedResolution;
|
|
30
|
-
/**
|
|
31
|
-
*Бэкенд заточен под конкретные поля, которые необходимо смапить.
|
|
32
|
-
**/
|
|
33
|
-
private getComponents;
|
|
34
|
-
/**
|
|
35
|
-
* Получаем данные dfp с помощью FingerprintJS, мапим необходимые поля, добавляем хэш
|
|
36
|
-
**/
|
|
37
12
|
private generate;
|
|
38
|
-
|
|
39
|
-
* Отправка dfp на сервер, в ответ получаем dfp_hash
|
|
40
|
-
**/
|
|
41
|
-
private send;
|
|
13
|
+
private makeAntifraudFingerprint;
|
|
42
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceFingerPrintService, never>;
|
|
43
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceFingerPrintService>;
|
|
44
16
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { XpsApiPartRequest } from '../payment/xps-api-part-request.abstract';
|
|
2
|
+
import { CreditCardService } from '../credit-card/credit-card.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EncryptCreditCardService {
|
|
5
|
+
private readonly creditCardService;
|
|
6
|
+
private readonly jsEncrypt;
|
|
7
|
+
private readonly secureFieldNames;
|
|
8
|
+
constructor(creditCardService: CreditCardService);
|
|
9
|
+
setPublicKey(publicKey: string): void;
|
|
10
|
+
encryptCreditCard<T extends XpsApiPartRequest>(request: XpsApiPartRequest): T;
|
|
11
|
+
private encrypt;
|
|
12
|
+
private createEncryptedCard;
|
|
13
|
+
private createOpenCard;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EncryptCreditCardService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EncryptCreditCardService>;
|
|
16
|
+
}
|
|
@@ -3,4 +3,5 @@ import { ShowFieldsAction } from './show-fields/show-fields.action.type';
|
|
|
3
3
|
import { StatusUpdatedAction } from './status-updated/status-updated.action.type';
|
|
4
4
|
import { RedirectAction } from './redirect/redirect.action.type';
|
|
5
5
|
import { ShowErrorsAction } from './show-errors/show-errors.action.type';
|
|
6
|
-
|
|
6
|
+
import { ThreeDsAction } from './three-ds/three-ds.action.type';
|
|
7
|
+
export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ThreeDsAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { ThreeDsActionData, ThreeDsActionType } from './three-ds.action.type';
|
|
3
|
+
import { StatusChallenge } from '../../three-ds/three-ds-20/status-update.interface';
|
|
4
|
+
export declare class ThreeDsAction implements Action {
|
|
5
|
+
type: ThreeDsActionType;
|
|
6
|
+
data: ThreeDsActionData;
|
|
7
|
+
constructor(statusUpdate: StatusChallenge);
|
|
8
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
+
export declare const threeDsActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
+
export declare const threeDsActionFactoryProvider: ValueProvider;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Action } from '../action.interface';
|
|
2
|
+
import { StatusChallenge } from '../../three-ds/three-ds-20/status-update.interface';
|
|
3
|
+
export type ThreeDsActionType = '3DS';
|
|
4
|
+
export type ThreeDsActionData = StatusChallenge;
|
|
5
|
+
export type ThreeDsAction = Action<ThreeDsActionType, ThreeDsActionData>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const masterCardAndVisaPaymentMethodId = 26;
|
|
2
|
+
export declare const maestroPaymentMethodId = 490;
|
|
3
|
+
export declare const creditCardPaymentMethodId = 1380;
|
|
4
|
+
export declare const americanExpressMethodId = 714;
|
|
5
|
+
export declare const specialCards: number[];
|
|
6
|
+
export declare const cardsWith3ds: number[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
5
|
+
import { Converter } from './converter.abstract';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class BirthDateConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(field: Field): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BirthDateConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BirthDateConverter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Converter } from './converter.abstract';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { Field } from '../../field.interface';
|
|
5
|
+
import { FormState } from '../form-state.interface';
|
|
6
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CardExpirationConverter extends Converter {
|
|
9
|
+
constructor(syncService: SyncService);
|
|
10
|
+
getValidators(): ValidatorFn[];
|
|
11
|
+
protected createControlConfig(field: Field, formState: FormState): TextControlConfig;
|
|
12
|
+
protected getAutocomplete(): string;
|
|
13
|
+
protected getDataType(): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardExpirationConverter, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardExpirationConverter>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Field } from '../../field.interface';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
4
|
+
import { Converter } from './converter.abstract';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CardholderNameConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
9
|
+
protected getAutocomplete(): string;
|
|
10
|
+
protected getDataType(): string;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardholderNameConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardholderNameConverter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cpfNameRegex: RegExp;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
5
|
+
import { Converter } from './converter.abstract';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class CpfNameConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(field: Field): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpfNameConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpfNameConverter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Field } from '../../field.interface';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
4
|
+
import { Converter } from './converter.abstract';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CpfNumberConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpfNumberConverter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpfNumberConverter>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Converter } from './converter.abstract';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { ValidatorFn } from '@angular/forms';
|
|
4
|
+
import { Field } from '../../field.interface';
|
|
5
|
+
import { FormState } from '../form-state.interface';
|
|
6
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class CvvConverter extends Converter {
|
|
9
|
+
private readonly maxFieldLength;
|
|
10
|
+
constructor(syncService: SyncService);
|
|
11
|
+
getValidators(): ValidatorFn[];
|
|
12
|
+
protected createControlConfig(field: Field, formState: FormState): TextControlConfig;
|
|
13
|
+
protected getAutocomplete(): string;
|
|
14
|
+
protected getDataType(): string;
|
|
15
|
+
protected shouldHideUserInput(): boolean;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CvvConverter, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CvvConverter>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ValidatorFn } from '@angular/forms';
|
|
2
|
+
import { Converter } from './converter.abstract';
|
|
3
|
+
import { SyncService } from '../../sync/sync.service';
|
|
4
|
+
import { Field } from '../../field.interface';
|
|
5
|
+
import { PhoneControlConfig } from '../controls/phone-control.config';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class PhoneConverter extends Converter {
|
|
8
|
+
constructor(syncService: SyncService);
|
|
9
|
+
getValidators(field: Field): ValidatorFn[];
|
|
10
|
+
protected createControlConfig(field: Field): PhoneControlConfig;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PhoneConverter, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PhoneConverter>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StreetNumberFormState } from './street-number-from-state.interface';
|
|
2
|
+
import { ValidatorFn } from '@angular/forms';
|
|
3
|
+
import { Field } from '../../../field.interface';
|
|
4
|
+
import { SyncService } from '../../../sync/sync.service';
|
|
5
|
+
import { TextControlConfig } from '../../controls/text-control.config';
|
|
6
|
+
import { Converter } from '../converter.abstract';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class StreetNumberConverter extends Converter {
|
|
9
|
+
constructor(syncService: SyncService);
|
|
10
|
+
getValidators(field: Field, formState?: StreetNumberFormState): ValidatorFn[];
|
|
11
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StreetNumberConverter, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StreetNumberConverter>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Field } from '../../field.interface';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { TextControlConfig } from '../controls/text-control.config';
|
|
4
|
+
import { Converter } from './converter.abstract';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TextConverter extends Converter {
|
|
7
|
+
constructor(syncService: SyncService);
|
|
8
|
+
protected createControlConfig(field: Field): TextControlConfig;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TextConverter, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TextConverter>;
|
|
11
|
+
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { CountryService } from '../../country/country.service';
|
|
2
|
-
import {
|
|
2
|
+
import { EncryptCreditCardService } from '../../encrypt-credit-card/encrypt-credit-card.service';
|
|
3
3
|
import { SettingsService } from '../../settings/settings.service';
|
|
4
4
|
import { PaymentConfig } from '../payment-config.interface';
|
|
5
|
-
import { InitializeResponseFactory } from './initialize-response.token';
|
|
6
|
-
import { InitializeResponse } from './initialize-response.class';
|
|
7
5
|
import { NextActionService } from '../actions/next-action.service';
|
|
6
|
+
import { XpsApiService } from '../xps-api/xps-api.service';
|
|
7
|
+
import { InitializeResponseFactory } from './response/initialize-response.token';
|
|
8
|
+
import { InitializeResponse } from './response/initialize-response.class';
|
|
8
9
|
import * as i0 from "@angular/core";
|
|
9
10
|
export declare class InitializeService {
|
|
10
11
|
protected readonly responseFactory: InitializeResponseFactory;
|
|
11
|
-
private readonly
|
|
12
|
+
private readonly xpsApiService;
|
|
12
13
|
private readonly settingsService;
|
|
13
14
|
private readonly countryService;
|
|
14
15
|
private readonly nextActionService;
|
|
15
|
-
private readonly
|
|
16
|
+
private readonly encryptCreditCardService;
|
|
16
17
|
private readonly ps4ReferId;
|
|
17
|
-
constructor(responseFactory: InitializeResponseFactory,
|
|
18
|
+
constructor(responseFactory: InitializeResponseFactory, xpsApiService: XpsApiService, settingsService: SettingsService, countryService: CountryService, nextActionService: NextActionService, encryptCreditCardService: EncryptCreditCardService);
|
|
18
19
|
request(config: PaymentConfig): Promise<InitializeResponse>;
|
|
20
|
+
private setCreditCardEncryptKey;
|
|
19
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<InitializeService, never>;
|
|
20
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<InitializeService>;
|
|
21
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PaymentForm } from '
|
|
2
|
-
import { XpsResponse } from '
|
|
1
|
+
import { PaymentForm } from '../../payment-form.interface';
|
|
2
|
+
import { XpsResponse } from '../../xps-response.interface';
|
|
3
3
|
export declare class InitializeResponse {
|
|
4
4
|
readonly paymentForm: PaymentForm | null;
|
|
5
5
|
constructor(response: XpsResponse);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ValidationErrors } from '@angular/forms';
|
|
2
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import { ValidationErrors } from '@angular/forms';
|
|
3
3
|
import { NextAction } from './actions/next-action.interface';
|
|
4
4
|
import { Status } from './status/status.interface';
|
|
5
5
|
import { Field } from './field.interface';
|
|
@@ -13,7 +13,7 @@ export interface Payment {
|
|
|
13
13
|
getFields(): Field[];
|
|
14
14
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
15
15
|
getFinanceDetails(): FinanceDetails | null;
|
|
16
|
-
runThreeDs():
|
|
16
|
+
runThreeDs(): void;
|
|
17
17
|
getStatus(): Promise<Status>;
|
|
18
18
|
form: {
|
|
19
19
|
fieldsStatus$: Observable<FormFieldsStatus>;
|
|
@@ -17,6 +17,7 @@ import { PaymentConfig } from './payment-config.interface';
|
|
|
17
17
|
import { ValidationErrors } from './form/validators/validation-errors.interface';
|
|
18
18
|
import { InputEventName } from './form/input-event.enum';
|
|
19
19
|
import { FormFieldsStatus } from './form/form-fields-status.interface';
|
|
20
|
+
import { ThreeDsService } from './three-ds/three-ds.service';
|
|
20
21
|
import { CreditCardStateService } from './credit-card-state/credit-card-state.service';
|
|
21
22
|
import * as i0 from "@angular/core";
|
|
22
23
|
export declare class PaymentService {
|
|
@@ -29,6 +30,7 @@ export declare class PaymentService {
|
|
|
29
30
|
private readonly creditCardStateService;
|
|
30
31
|
private readonly nextActionService;
|
|
31
32
|
private readonly controlConfigService;
|
|
33
|
+
private readonly threeDsService;
|
|
32
34
|
form: UntypedFormGroup | null;
|
|
33
35
|
get formFieldsStatus$(): Observable<FormFieldsStatus>;
|
|
34
36
|
private data;
|
|
@@ -39,12 +41,12 @@ export declare class PaymentService {
|
|
|
39
41
|
private destroy$;
|
|
40
42
|
private formDestroy$;
|
|
41
43
|
private readonly formFieldsStatusSubject;
|
|
42
|
-
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
|
|
44
|
+
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService, threeDsService: ThreeDsService);
|
|
43
45
|
initialize(config: PaymentConfig): Promise<Field[]>;
|
|
44
46
|
submit(): Promise<NextAction | null | void>;
|
|
45
47
|
getFields(): Field[];
|
|
46
48
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
47
|
-
runThreeDs():
|
|
49
|
+
runThreeDs(): void;
|
|
48
50
|
getFinanceDetails(): FinanceDetails | null;
|
|
49
51
|
getStatus(): Promise<Status>;
|
|
50
52
|
getFieldConfig(field: Field): ControlConfig | null;
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { SecureApiClient } from '../../../http/secure-api/secure-api.service';
|
|
2
1
|
import { SettingsService } from '../../../settings/settings.service';
|
|
3
2
|
import { CheckStatusRequestFactory } from './request/check-status-request.token';
|
|
4
3
|
import { CheckStatusResponseFactory } from './response/check-status-response.token';
|
|
5
4
|
import { XpsApiPart } from '../../xps-api-part.abstract';
|
|
5
|
+
import { XpsApiService } from '../../xps-api/xps-api.service';
|
|
6
6
|
import { CheckStatusResponse } from './response/check-status-response.class';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class CheckStatusService extends XpsApiPart<CheckStatusResponse> {
|
|
9
|
-
private readonly
|
|
9
|
+
private readonly xpsApiService;
|
|
10
10
|
private readonly settingsService;
|
|
11
11
|
private readonly requestFactory;
|
|
12
12
|
private readonly responseFactory;
|
|
13
|
-
private readonly apiRoute;
|
|
14
13
|
private invoice;
|
|
15
|
-
constructor(
|
|
14
|
+
constructor(xpsApiService: XpsApiService, settingsService: SettingsService, requestFactory: CheckStatusRequestFactory, responseFactory: CheckStatusResponseFactory);
|
|
16
15
|
setRequestParams(invoice: number): void;
|
|
17
16
|
request(): void;
|
|
18
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckStatusService, never>;
|
|
@@ -5,16 +5,17 @@ import { SettingsService } from '../../settings/settings.service';
|
|
|
5
5
|
import { SubmitResponse } from './response/submit-response.class';
|
|
6
6
|
import { UntypedFormGroup } from '@angular/forms';
|
|
7
7
|
import { DeviceFingerPrintService } from '../../device-finger-print/device-finger-print.service';
|
|
8
|
-
import {
|
|
8
|
+
import { XpsApiService } from '../xps-api/xps-api.service';
|
|
9
|
+
import { EncryptCreditCardService } from '../../encrypt-credit-card/encrypt-credit-card.service';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
export declare class SubmitService {
|
|
11
12
|
private readonly requestFactory;
|
|
12
13
|
private readonly responseFactory;
|
|
13
14
|
private readonly settingsService;
|
|
14
15
|
private readonly deviceFingerPrintService;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly
|
|
17
|
-
constructor(requestFactory: SubmitRequestFactory, responseFactory: SubmitResponseFactory, settingsService: SettingsService, deviceFingerPrintService: DeviceFingerPrintService,
|
|
16
|
+
private readonly xpsApiService;
|
|
17
|
+
private readonly encryptCreditCardService;
|
|
18
|
+
constructor(requestFactory: SubmitRequestFactory, responseFactory: SubmitResponseFactory, settingsService: SettingsService, deviceFingerPrintService: DeviceFingerPrintService, xpsApiService: XpsApiService, encryptCreditCardService: EncryptCreditCardService);
|
|
18
19
|
request(fields: Field[], form: UntypedFormGroup): Promise<SubmitResponse>;
|
|
19
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SubmitService, never>;
|
|
20
21
|
static ɵprov: i0.ɵɵInjectableDeclaration<SubmitService>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UntypedFormGroup } from '@angular/forms';
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import {
|
|
4
|
-
export declare class SyncRequest extends
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { XpsApiPartRequest } from '../../xps-api-part-request.abstract';
|
|
4
|
+
export declare class SyncRequest extends XpsApiPartRequest {
|
|
5
5
|
readonly access_token: string;
|
|
6
6
|
readonly xps_fix_command = "calculate";
|
|
7
7
|
constructor(parameters: {
|
package/lib/core/payment/sync/{sync-response.class.d.ts → response/sync-response.class.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ValidationErrors } from '@angular/forms';
|
|
2
|
-
import { Field } from '
|
|
3
|
-
import { XpsResponse } from '
|
|
2
|
+
import { Field } from '../../field.interface';
|
|
3
|
+
import { XpsResponse } from '../../xps-response.interface';
|
|
4
4
|
export declare class SyncResponse {
|
|
5
5
|
readonly error: ValidationErrors | null;
|
|
6
6
|
readonly fields: Field[];
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { SecureApiClient } from '../../http/secure-api/secure-api.service';
|
|
4
3
|
import { SettingsService } from '../../settings/settings.service';
|
|
5
4
|
import { EmitDataService } from '../emit-data.service.abstract';
|
|
6
5
|
import { Field } from '../field.interface';
|
|
7
6
|
import { XpsResponse } from '../xps-response.interface';
|
|
8
|
-
import { SyncRequestFactory } from './sync-request.token';
|
|
9
|
-
import { SyncResponse } from './sync-response.class';
|
|
10
|
-
import { SyncResponseFactory } from './sync-response.token';
|
|
7
|
+
import { SyncRequestFactory } from './request/sync-request.token';
|
|
8
|
+
import { SyncResponse } from './response/sync-response.class';
|
|
9
|
+
import { SyncResponseFactory } from './response/sync-response.token';
|
|
11
10
|
import { NextActionService } from '../actions/next-action.service';
|
|
11
|
+
import { XpsApiService } from '../xps-api/xps-api.service';
|
|
12
12
|
import { FieldAsyncValidation } from './field-async-validation.interface';
|
|
13
|
+
import { EncryptCreditCardService } from '../../encrypt-credit-card/encrypt-credit-card.service';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
export declare class SyncService extends EmitDataService<XpsResponse> {
|
|
15
16
|
private readonly requestFactory;
|
|
16
17
|
private readonly responseFactory;
|
|
17
|
-
private readonly
|
|
18
|
+
private readonly xpsApiService;
|
|
18
19
|
private readonly nextActionService;
|
|
19
20
|
private readonly settingsService;
|
|
20
|
-
private readonly
|
|
21
|
+
private readonly encryptCreditCardService;
|
|
21
22
|
private prevFieldSyncStates;
|
|
22
23
|
private form;
|
|
23
24
|
private fields;
|
|
24
25
|
private readonly fieldAsyncValidation;
|
|
25
|
-
constructor(requestFactory: SyncRequestFactory, responseFactory: SyncResponseFactory,
|
|
26
|
+
constructor(requestFactory: SyncRequestFactory, responseFactory: SyncResponseFactory, xpsApiService: XpsApiService, nextActionService: NextActionService, settingsService: SettingsService, encryptCreditCardService: EncryptCreditCardService);
|
|
26
27
|
get fieldAsyncValidation$(): Observable<FieldAsyncValidation>;
|
|
27
28
|
setup(form: UntypedFormGroup, fields: Field[]): void;
|
|
28
29
|
reset(): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SecureApiClient } from '../../../../http/secure-api/secure-api.service';
|
|
2
|
+
import { SettingsService } from '../../../../settings/settings.service';
|
|
3
|
+
import { NotifyDfpStatusRequestFactory } from './request/notify-dfp-status-request.token';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NotifyDfpStatusService {
|
|
6
|
+
private readonly secureApi;
|
|
7
|
+
private readonly settingsService;
|
|
8
|
+
private readonly requestFactory;
|
|
9
|
+
private readonly apiRouteComplete;
|
|
10
|
+
constructor(secureApi: SecureApiClient, settingsService: SettingsService, requestFactory: NotifyDfpStatusRequestFactory);
|
|
11
|
+
request(threeDsId: string, isCompind: boolean): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotifyDfpStatusService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NotifyDfpStatusService>;
|
|
14
|
+
}
|
package/lib/core/payment/three-ds/api/notify-dfp-status/request/notify-dfp-status-request.token.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { NotifyDfpStatusRequest } from './notify-dfp-status-request.class';
|
|
3
|
+
export type NotifyDfpStatusRequestParameters = ConstructorParameters<typeof NotifyDfpStatusRequest>;
|
|
4
|
+
export type NotifyDfpStatusRequestFactory = (...args: NotifyDfpStatusRequestParameters) => NotifyDfpStatusRequest;
|
|
5
|
+
export declare const notifyDfpStatusRequestFactoryToken: InjectionToken<NotifyDfpStatusRequestFactory>;
|
|
6
|
+
export declare const notifyDfpStatusRequestFactoryProvider: ValueProvider;
|
package/lib/core/payment/three-ds/api/status-three-ds/request/status-three-ds-request.token.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { StatusThreeDsRequest } from './status-three-ds-request.class';
|
|
3
|
+
export type StatusThreeDsRequestParameters = ConstructorParameters<typeof StatusThreeDsRequest>;
|
|
4
|
+
export type StatusThreeDsRequestFactory = (...args: StatusThreeDsRequestParameters) => StatusThreeDsRequest;
|
|
5
|
+
export declare const statusThreeDsRequestFactoryToken: InjectionToken<StatusThreeDsRequestFactory>;
|
|
6
|
+
export declare const statusThreeDsRequestFactoryProvider: ValueProvider;
|
package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.class.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThreeDsCheckoutForm } from '../three-ds-checkout-form.interface';
|
|
2
|
+
import { Properties } from '../../../../../properties.type';
|
|
3
|
+
export declare class StatusThreeDsResponse {
|
|
4
|
+
readonly status: string;
|
|
5
|
+
readonly checkoutForm?: ThreeDsCheckoutForm;
|
|
6
|
+
constructor(params: Properties<StatusThreeDsResponse>);
|
|
7
|
+
}
|
package/lib/core/payment/three-ds/api/status-three-ds/response/status-three-ds-response.token.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { StatusThreeDsResponse } from './status-three-ds-response.class';
|
|
3
|
+
export type StatusThreeDsResponseParameters = ConstructorParameters<typeof StatusThreeDsResponse>;
|
|
4
|
+
export type StatusThreeDsResponseFactory = (...args: StatusThreeDsResponseParameters) => StatusThreeDsResponse;
|
|
5
|
+
export declare const statusThreeDsResponseFactoryToken: InjectionToken<StatusThreeDsResponseFactory>;
|
|
6
|
+
export declare const statusThreeDsResponseFactoryProvider: ValueProvider;
|