@xsolla/payment-client-core 0.1.2 → 0.1.4
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/credit-card/credit-card-settings.interface.mjs +2 -0
- package/esm2020/lib/core/credit-card/credit-card-types.enum.mjs +20 -0
- package/esm2020/lib/core/credit-card/credit-card.interface.mjs +2 -0
- package/esm2020/lib/core/credit-card/credit-card.service.mjs +41 -0
- package/esm2020/lib/core/credit-card/credit-cards-map.const.mjs +36 -0
- package/esm2020/lib/core/credit-card/default-mask.const.mjs +2 -0
- package/esm2020/lib/core/credit-card/four-block-mask.const.mjs +2 -0
- package/esm2020/lib/core/credit-card/ordered-cards-settings.const.mjs +45 -0
- package/esm2020/lib/core/credit-card/types/american-express.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/aura.mjs +15 -0
- package/esm2020/lib/core/credit-card/types/china-union-pay.mjs +12 -0
- package/esm2020/lib/core/credit-card/types/dankort.mjs +15 -0
- package/esm2020/lib/core/credit-card/types/default-card.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/diners-clubs.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/discover.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/elo.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/hipercard.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/jcb.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/maestro.mjs +14 -0
- package/esm2020/lib/core/credit-card/types/mastercard.mjs +16 -0
- package/esm2020/lib/core/credit-card/types/mir.mjs +15 -0
- package/esm2020/lib/core/credit-card/types/naranja.mjs +15 -0
- package/esm2020/lib/core/credit-card/types/postepay.mjs +13 -0
- package/esm2020/lib/core/credit-card/types/visa.mjs +13 -0
- package/esm2020/lib/core/payment/actions/next-action.interface.mjs +1 -1
- package/esm2020/lib/core/payment/actions/next-actions.mjs +1 -3
- package/esm2020/lib/core/payment/actions/show-fields/show-fields.action.token.mjs +3 -2
- package/esm2020/lib/core/payment/credit-card-state/credit-card-state.interface.mjs +2 -0
- package/esm2020/lib/core/payment/credit-card-state/credit-card-state.service.mjs +14 -0
- package/esm2020/lib/core/payment/form/controls/card-number-control.config.mjs +10 -0
- package/esm2020/lib/core/payment/form/converters/card-number.converter.mjs +45 -0
- package/esm2020/lib/core/payment/form/converters/converter.abstract.mjs +8 -6
- package/esm2020/lib/core/payment/form/converters/converters-map.mjs +3 -1
- package/esm2020/lib/core/payment/form/converters/email.converter.mjs +3 -3
- package/esm2020/lib/core/payment/form/converters/zip.converter.mjs +4 -5
- package/esm2020/lib/core/payment/form/field-status.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/form-fields-status.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/form.module.mjs +8 -4
- package/esm2020/lib/core/payment/form/input-event.enum.mjs +6 -0
- package/esm2020/lib/core/payment/form/validators/async-validator-fn.type.mjs +2 -0
- package/esm2020/lib/core/payment/form/validators/convert.function.mjs +6 -14
- package/esm2020/lib/core/payment/form/validators/credit-card-min-length.validator.mjs +32 -0
- package/esm2020/lib/core/payment/form/validators/email-validator.mjs +3 -4
- package/esm2020/lib/core/payment/form/validators/is-empty-input-value.function.mjs +4 -0
- package/esm2020/lib/core/payment/form/validators/luhn-formula-validator/luhn-formula.validator.mjs +40 -0
- package/esm2020/lib/core/payment/form/validators/required-validator.mjs +3 -4
- package/esm2020/lib/core/payment/form/validators/validation-error.interface.mjs +1 -1
- package/esm2020/lib/core/payment/form/validators/validators.module.mjs +18 -0
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +57 -46
- package/esm2020/lib/core/payment/sync/field-async-validation.interface.mjs +2 -0
- package/esm2020/lib/core/payment/sync/sync-response.class.mjs +7 -4
- package/esm2020/lib/core/payment/sync/sync.service.mjs +14 -11
- package/esm2020/lib/core/payment/xps-response.interface.mjs +1 -1
- package/esm2020/lib/core/type-guards/is-string.function.mjs +4 -0
- package/esm2020/lib/core-library.service.mjs +20 -7
- package/fesm2015/xsolla-payment-client-core.mjs +559 -120
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +558 -119
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/credit-card/credit-card-settings.interface.d.ts +10 -0
- package/lib/core/credit-card/credit-card-types.enum.d.ts +18 -0
- package/lib/core/credit-card/credit-card.interface.d.ts +9 -0
- package/lib/core/credit-card/credit-card.service.d.ts +11 -0
- package/lib/core/credit-card/credit-cards-map.const.d.ts +5 -0
- package/lib/core/credit-card/default-mask.const.d.ts +1 -0
- package/lib/core/credit-card/four-block-mask.const.d.ts +1 -0
- package/lib/core/credit-card/ordered-cards-settings.const.d.ts +12 -0
- package/lib/core/credit-card/types/american-express.d.ts +2 -0
- package/lib/core/credit-card/types/aura.d.ts +2 -0
- package/lib/core/credit-card/types/china-union-pay.d.ts +2 -0
- package/lib/core/credit-card/types/dankort.d.ts +2 -0
- package/lib/core/credit-card/types/default-card.d.ts +2 -0
- package/lib/core/credit-card/types/diners-clubs.d.ts +2 -0
- package/lib/core/credit-card/types/discover.d.ts +2 -0
- package/lib/core/credit-card/types/elo.d.ts +2 -0
- package/lib/core/credit-card/types/hipercard.d.ts +2 -0
- package/lib/core/credit-card/types/jcb.d.ts +2 -0
- package/lib/core/credit-card/types/maestro.d.ts +2 -0
- package/lib/core/credit-card/types/mastercard.d.ts +2 -0
- package/lib/core/credit-card/types/mir.d.ts +2 -0
- package/lib/core/credit-card/types/naranja.d.ts +2 -0
- package/lib/core/credit-card/types/postepay.d.ts +2 -0
- package/lib/core/credit-card/types/visa.d.ts +2 -0
- package/lib/core/payment/actions/next-action.interface.d.ts +1 -2
- package/lib/core/payment/credit-card-state/credit-card-state.interface.d.ts +3 -0
- package/lib/core/payment/credit-card-state/credit-card-state.service.d.ts +7 -0
- package/lib/core/payment/form/controls/card-number-control.config.d.ts +11 -0
- package/lib/core/payment/form/converters/card-number.converter.d.ts +19 -0
- package/lib/core/payment/form/converters/converter.abstract.d.ts +4 -1
- package/lib/core/payment/form/converters/email.converter.d.ts +1 -1
- package/lib/core/payment/form/field-status.interface.d.ts +7 -0
- package/lib/core/payment/form/form-fields-status.interface.d.ts +4 -0
- package/lib/core/payment/form/form.module.d.ts +2 -1
- package/lib/core/payment/form/validators/async-validator-fn.type.d.ts +4 -0
- package/lib/core/payment/form/validators/convert.function.d.ts +1 -1
- package/lib/core/payment/form/validators/credit-card-min-length.validator.d.ts +12 -0
- package/lib/core/payment/form/validators/email-validator.d.ts +1 -1
- package/lib/core/payment/form/validators/is-empty-input-value.function.d.ts +1 -0
- package/lib/core/payment/form/validators/luhn-formula-validator/luhn-formula.validator.d.ts +6 -0
- package/lib/core/payment/form/validators/required-validator.d.ts +1 -1
- package/lib/core/payment/form/validators/validation-error.interface.d.ts +0 -1
- package/lib/core/payment/form/validators/validators.module.d.ts +7 -0
- package/lib/core/payment/payment.interface.d.ts +3 -1
- package/lib/core/payment/payment.service.d.ts +12 -4
- package/lib/core/payment/sync/field-async-validation.interface.d.ts +7 -0
- package/lib/core/payment/sync/sync-response.class.d.ts +2 -4
- package/lib/core/payment/sync/sync.service.d.ts +4 -0
- package/lib/core/payment/xps-response.interface.d.ts +1 -0
- package/lib/core/type-guards/is-string.function.d.ts +1 -0
- package/lib/core-library.service.d.ts +10 -1
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.1.4.tgz +0 -0
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.class.mjs +0 -12
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.token.mjs +0 -13
- package/esm2020/lib/core/payment/actions/show-field-state/show-field-state.action.type.mjs +0 -2
- package/esm2020/lib/core/payment/form/input-events.enum.mjs +0 -6
- package/esm2020/lib/core/payment/form/validators/errors-codes.enum.mjs +0 -8
- package/esm2020/lib/core/payment/show-field-state.interface.mjs +0 -2
- package/lib/core/payment/actions/show-field-state/show-field-state.action.class.d.ts +0 -8
- package/lib/core/payment/actions/show-field-state/show-field-state.action.token.d.ts +0 -4
- package/lib/core/payment/actions/show-field-state/show-field-state.action.type.d.ts +0 -11
- package/lib/core/payment/form/validators/errors-codes.enum.d.ts +0 -6
- package/lib/core/payment/show-field-state.interface.d.ts +0 -8
- package/xsolla-payment-client-core-0.1.2.tgz +0 -0
- /package/lib/core/payment/form/{input-events.enum.d.ts → input-event.enum.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreditCardTypes } from './credit-card-types.enum';
|
|
2
|
+
export interface CreditCardSettings {
|
|
3
|
+
id: CreditCardTypes;
|
|
4
|
+
minLength: number;
|
|
5
|
+
maxLength: number;
|
|
6
|
+
iconName: string | null;
|
|
7
|
+
mask: string;
|
|
8
|
+
checkNumber(number: string): boolean;
|
|
9
|
+
maxCvvLength?: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare enum CreditCardTypes {
|
|
2
|
+
DEFAULT = "0",
|
|
3
|
+
VISA = "1",
|
|
4
|
+
MASTERCARD = "2",
|
|
5
|
+
MAESTRO = "3",
|
|
6
|
+
AMERICAN_EXPRESS = "4",
|
|
7
|
+
DINERS_CLUBS = "5",
|
|
8
|
+
DISCOVER = "6",
|
|
9
|
+
JCB = "9",
|
|
10
|
+
DANKORT = "11",
|
|
11
|
+
HIPERCARD = "12",
|
|
12
|
+
ELO = "13",
|
|
13
|
+
AURA = "14",
|
|
14
|
+
NARANJA = "15",
|
|
15
|
+
MIR = "16",
|
|
16
|
+
CHINA_UNION_PAY = "17",
|
|
17
|
+
POSTEPAY = "18"
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CreditCardTypes } from './credit-card-types.enum';
|
|
2
|
+
import { CreditCardSettings } from './credit-card-settings.interface';
|
|
3
|
+
import { CreditCardState } from '../payment/credit-card-state/credit-card-state.interface';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
export interface CreditCard {
|
|
6
|
+
getTypeByNumber(cardNumber: string): CreditCardTypes;
|
|
7
|
+
getCreditCardSettings(cardType: CreditCardTypes): CreditCardSettings;
|
|
8
|
+
cardTypeUpdates$: Observable<CreditCardState>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CreditCardTypes } from './credit-card-types.enum';
|
|
2
|
+
import { CreditCardSettings } from './credit-card-settings.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CreditCardService {
|
|
5
|
+
getBinNumber(cardNumber: string): string;
|
|
6
|
+
getAccountSuffix(cardNumber: string): string;
|
|
7
|
+
getTypeByNumber(cardNumber: string): CreditCardTypes;
|
|
8
|
+
getCreditCardSettings(cardType: CreditCardTypes): CreditCardSettings;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreditCardService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CreditCardService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultMask = "9999 9999 9999 9999 999";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const fourBlockMask = "9999 9999 9999 9999";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CreditCardSettings } from './credit-card-settings.interface';
|
|
2
|
+
/**
|
|
3
|
+
* order does matter
|
|
4
|
+
* settings with more specific pattern should be placed above
|
|
5
|
+
* Example:
|
|
6
|
+
* - 12*
|
|
7
|
+
* - 12
|
|
8
|
+
* - 1
|
|
9
|
+
* "12*" pattern should be checked first, otherwise pattern "1" will be taken
|
|
10
|
+
* before "12*" checked
|
|
11
|
+
*/
|
|
12
|
+
export declare const orderedCardSettings: CreditCardSettings[];
|
|
@@ -3,5 +3,4 @@ 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
|
-
|
|
7
|
-
export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction | ShowFieldStateAction;
|
|
6
|
+
export type NextAction = CheckStatusAction | ShowFieldsAction | StatusUpdatedAction | ShowErrorsAction | RedirectAction;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EmitDataService } from '../emit-data.service.abstract';
|
|
2
|
+
import { CreditCardState } from './credit-card-state.interface';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CreditCardStateService extends EmitDataService<CreditCardState> {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreditCardStateService, never>;
|
|
6
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CreditCardStateService>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
2
|
+
import { ControlConfig } from './control-config';
|
|
3
|
+
import { CreditCardTypes } from '../../../credit-card/credit-card-types.enum';
|
|
4
|
+
export declare class CardNumberConfig extends ControlConfig {
|
|
5
|
+
controlType: string;
|
|
6
|
+
placeholder?: string | SafeHtml | null;
|
|
7
|
+
icon?: string;
|
|
8
|
+
availableCardTypes: CreditCardTypes[];
|
|
9
|
+
activeCardType?: CreditCardTypes;
|
|
10
|
+
customError: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Converter } from './converter.abstract';
|
|
2
|
+
import { SyncService } from '../../sync/sync.service';
|
|
3
|
+
import { CreditCardMinLengthValidator } from '../validators/credit-card-min-length.validator';
|
|
4
|
+
import { Field } from '../../field.interface';
|
|
5
|
+
import { ValidatorFn } from '@angular/forms';
|
|
6
|
+
import { FormState } from '../form-state.interface';
|
|
7
|
+
import { CardNumberConfig } from '../controls/card-number-control.config';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class CardNumberConverter extends Converter {
|
|
10
|
+
private readonly maxLengthValidator;
|
|
11
|
+
private readonly minLengthValidator;
|
|
12
|
+
constructor(syncService: SyncService, maxLengthValidator: CreditCardMinLengthValidator, minLengthValidator: CreditCardMinLengthValidator);
|
|
13
|
+
getValidators(field: Field): ValidatorFn[];
|
|
14
|
+
protected createControlConfig(field: Field, formState: FormState): CardNumberConfig;
|
|
15
|
+
protected getAutocomplete(): string;
|
|
16
|
+
protected getDataType(): string;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CardNumberConverter, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CardNumberConverter>;
|
|
19
|
+
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { UntypedFormControl
|
|
1
|
+
import { UntypedFormControl } from '@angular/forms';
|
|
2
2
|
import { Field } from '../../field.interface';
|
|
3
3
|
import { SyncService } from '../../sync/sync.service';
|
|
4
4
|
import { ControlConfig } from '../controls/control-config';
|
|
5
5
|
import { FormState } from '../form-state.interface';
|
|
6
|
+
import { ValidatorFn } from '../validators/validator-fn.type';
|
|
7
|
+
import { AsyncValidatorFn } from '../validators/async-validator-fn.type';
|
|
6
8
|
export declare abstract class Converter {
|
|
7
9
|
protected syncService: SyncService;
|
|
8
10
|
protected constructor(syncService: SyncService);
|
|
9
11
|
convertToConfig(field: Field, formState?: FormState): ControlConfig;
|
|
10
12
|
convertToFormControl(field: Field): UntypedFormControl;
|
|
11
13
|
getValidators(field: Field): ValidatorFn[];
|
|
14
|
+
getAsyncValidators(field: Field): AsyncValidatorFn | AsyncValidatorFn[] | null;
|
|
12
15
|
createDefaultControlConfig<T extends {
|
|
13
16
|
[key: string]: unknown;
|
|
14
17
|
}>(controlConfigClass: new () => T, field: Field): T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ValidatorFn } from '@angular/forms';
|
|
2
1
|
import { Field } from '../../field.interface';
|
|
3
2
|
import { SyncService } from '../../sync/sync.service';
|
|
4
3
|
import { TextControlConfig } from '../controls/text-control.config';
|
|
4
|
+
import { ValidatorFn } from '../validators/validator-fn.type';
|
|
5
5
|
import { Converter } from './converter.abstract';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class EmailConverter extends Converter {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "@angular/forms";
|
|
3
|
+
import * as i2 from "./validators/validators.module";
|
|
3
4
|
export declare class FormModule {
|
|
4
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof i1.ReactiveFormsModule], never>;
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof i1.ReactiveFormsModule, typeof i2.ValidatorsModule], never>;
|
|
6
7
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormModule>;
|
|
7
8
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ValidationErrors } from './validation-errors.interface';
|
|
4
|
+
export type AsyncValidatorFn = (c: AbstractControl) => Promise<ValidationErrors | null> | Observable<ValidationErrors | null>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
2
|
import { ValidatorFn as ConvertedValidatorFn } from './validator-fn.type';
|
|
3
|
-
export declare function convert(validator: ValidatorFn, message: string
|
|
3
|
+
export declare function convert(validator: ValidatorFn, message: string): ConvertedValidatorFn;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ValidationErrors } from '@angular/forms';
|
|
2
|
+
import { CreditCardService } from '../../../credit-card/credit-card.service';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CreditCardMinLengthValidator {
|
|
5
|
+
private readonly creditService;
|
|
6
|
+
constructor(creditService: CreditCardService);
|
|
7
|
+
validate: (field: {
|
|
8
|
+
value: string;
|
|
9
|
+
}) => ValidationErrors | null;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreditCardMinLengthValidator, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CreditCardMinLengthValidator>;
|
|
12
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ValidatorFn } from './validator-fn.type';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function convertedEmailValidator(): ValidatorFn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEmptyInputValue(value: string | null | undefined): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ValidatorFn } from '@angular/forms';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function convertedRequiredValidator(): ValidatorFn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "@angular/common";
|
|
3
|
+
export declare class ValidatorsModule {
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValidatorsModule, never>;
|
|
5
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ValidatorsModule, never, [typeof i1.CommonModule], never>;
|
|
6
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<ValidatorsModule>;
|
|
7
|
+
}
|
|
@@ -5,7 +5,8 @@ import { Status } from './status/status.interface';
|
|
|
5
5
|
import { Field } from './field.interface';
|
|
6
6
|
import { ControlConfig } from './form/controls/control-config';
|
|
7
7
|
import { FinanceDetails } from './finance-details/finance-details.class';
|
|
8
|
-
import { InputEventName } from './form/input-
|
|
8
|
+
import { InputEventName } from './form/input-event.enum';
|
|
9
|
+
import { FormFieldsStatus } from './form/form-fields-status.interface';
|
|
9
10
|
export interface Payment {
|
|
10
11
|
initialize(): Promise<Field[]>;
|
|
11
12
|
submit(): Promise<NextAction | null | void>;
|
|
@@ -15,6 +16,7 @@ export interface Payment {
|
|
|
15
16
|
runThreeDs(): NextAction;
|
|
16
17
|
getStatus(): Promise<Status>;
|
|
17
18
|
form: {
|
|
19
|
+
fieldsStatus$: Observable<FormFieldsStatus>;
|
|
18
20
|
changeFieldValue(name: string, value: string): void;
|
|
19
21
|
getControlConfig(field: Field): ControlConfig | null;
|
|
20
22
|
changeFieldState(name: string, state: InputEventName): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
1
2
|
import { UntypedFormGroup } from '@angular/forms';
|
|
2
3
|
import { FormService } from './form/form.service';
|
|
3
4
|
import { InitializeService } from './initialize/initialize.service';
|
|
@@ -14,7 +15,9 @@ import { NextAction } from './actions/next-action.interface';
|
|
|
14
15
|
import { Field } from './field.interface';
|
|
15
16
|
import { PaymentConfig } from './payment-config.interface';
|
|
16
17
|
import { ValidationErrors } from './form/validators/validation-errors.interface';
|
|
17
|
-
import { InputEventName } from './form/input-
|
|
18
|
+
import { InputEventName } from './form/input-event.enum';
|
|
19
|
+
import { FormFieldsStatus } from './form/form-fields-status.interface';
|
|
20
|
+
import { CreditCardStateService } from './credit-card-state/credit-card-state.service';
|
|
18
21
|
import * as i0 from "@angular/core";
|
|
19
22
|
export declare class PaymentService {
|
|
20
23
|
private readonly initializeService;
|
|
@@ -23,16 +26,20 @@ export declare class PaymentService {
|
|
|
23
26
|
private readonly formService;
|
|
24
27
|
private readonly statusService;
|
|
25
28
|
private readonly financeDetailsService;
|
|
29
|
+
private readonly creditCardStateService;
|
|
26
30
|
private readonly nextActionService;
|
|
27
31
|
private readonly controlConfigService;
|
|
28
32
|
form: UntypedFormGroup | null;
|
|
33
|
+
get formFieldsStatus$(): Observable<FormFieldsStatus>;
|
|
29
34
|
private data;
|
|
30
35
|
private financeDetails;
|
|
36
|
+
private focusFieldName;
|
|
31
37
|
private fields;
|
|
32
38
|
private config;
|
|
33
39
|
private destroy$;
|
|
34
40
|
private formDestroy$;
|
|
35
|
-
|
|
41
|
+
private readonly formFieldsStatusSubject;
|
|
42
|
+
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, creditCardStateService: CreditCardStateService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
|
|
36
43
|
initialize(config: PaymentConfig): Promise<Field[]>;
|
|
37
44
|
submit(): Promise<NextAction | null | void>;
|
|
38
45
|
getFields(): Field[];
|
|
@@ -45,10 +52,11 @@ export declare class PaymentService {
|
|
|
45
52
|
changeFieldState(name: string, state: InputEventName): void;
|
|
46
53
|
destroy(): void;
|
|
47
54
|
private emitFinanceDetails;
|
|
55
|
+
private emitCreditCardState;
|
|
56
|
+
private emitFormFieldsStatus;
|
|
48
57
|
private setupSyncService;
|
|
49
58
|
private listenFinanceDetails;
|
|
50
|
-
private
|
|
51
|
-
private getControlState;
|
|
59
|
+
private listenFormStatusChanges;
|
|
52
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
53
61
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
54
62
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
import { ValidationErrors } from '@angular/forms';
|
|
1
2
|
import { Field } from '../field.interface';
|
|
2
3
|
import { XpsResponse } from '../xps-response.interface';
|
|
3
4
|
export declare class SyncResponse {
|
|
4
|
-
readonly
|
|
5
|
-
code: number;
|
|
6
|
-
message: string;
|
|
7
|
-
};
|
|
5
|
+
readonly error: ValidationErrors | null;
|
|
8
6
|
readonly fields: Field[];
|
|
9
7
|
readonly parameters: XpsResponse;
|
|
10
8
|
constructor(changedField: Field, response: XpsResponse);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import { SecureApiClient } from '../../http/secure-api/secure-api.service';
|
|
3
4
|
import { SettingsService } from '../../settings/settings.service';
|
|
4
5
|
import { EmitDataService } from '../emit-data.service.abstract';
|
|
@@ -8,6 +9,7 @@ import { SyncRequestFactory } from './sync-request.token';
|
|
|
8
9
|
import { SyncResponse } from './sync-response.class';
|
|
9
10
|
import { SyncResponseFactory } from './sync-response.token';
|
|
10
11
|
import { NextActionService } from '../actions/next-action.service';
|
|
12
|
+
import { FieldAsyncValidation } from './field-async-validation.interface';
|
|
11
13
|
import * as i0 from "@angular/core";
|
|
12
14
|
export declare class SyncService extends EmitDataService<XpsResponse> {
|
|
13
15
|
private readonly requestFactory;
|
|
@@ -19,7 +21,9 @@ export declare class SyncService extends EmitDataService<XpsResponse> {
|
|
|
19
21
|
private prevFieldSyncStates;
|
|
20
22
|
private form;
|
|
21
23
|
private fields;
|
|
24
|
+
private readonly fieldAsyncValidation;
|
|
22
25
|
constructor(requestFactory: SyncRequestFactory, responseFactory: SyncResponseFactory, secureApi: SecureApiClient, nextActionService: NextActionService, settingsService: SettingsService);
|
|
26
|
+
get fieldAsyncValidation$(): Observable<FieldAsyncValidation>;
|
|
23
27
|
setup(form: UntypedFormGroup, fields: Field[]): void;
|
|
24
28
|
reset(): void;
|
|
25
29
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isString(value: unknown): value is string;
|
|
@@ -19,6 +19,11 @@ import { FinanceDetailsService } from './core/payment/finance-details/finance-de
|
|
|
19
19
|
import { PaymentConfigService } from './core/payment/config/config.service';
|
|
20
20
|
import { Status } from './core/payment/status/status.interface';
|
|
21
21
|
import { StatusService } from './core/payment/status/status.service';
|
|
22
|
+
import { CreditCardService } from './core/credit-card/credit-card.service';
|
|
23
|
+
import { CreditCard } from './core/credit-card/credit-card.interface';
|
|
24
|
+
import { CreditCardStateService } from './core/payment/credit-card-state/credit-card-state.service';
|
|
25
|
+
import { Observable } from 'rxjs';
|
|
26
|
+
import { CreditCardState } from './core/payment/credit-card-state/credit-card-state.interface';
|
|
22
27
|
import * as i0 from "@angular/core";
|
|
23
28
|
export declare class CoreLibraryService {
|
|
24
29
|
private readonly settingsService;
|
|
@@ -33,17 +38,21 @@ export declare class CoreLibraryService {
|
|
|
33
38
|
private readonly legalService;
|
|
34
39
|
private readonly statusService;
|
|
35
40
|
private readonly nextActionService;
|
|
41
|
+
private readonly creditCardService;
|
|
42
|
+
private readonly creditCardStateService;
|
|
36
43
|
paymentMethods: {
|
|
37
44
|
getList: () => Promise<PaymentMethod[]>;
|
|
38
45
|
getQuickMethods: () => Promise<PaymentMethod[]>;
|
|
39
46
|
getSavedMethods: () => Promise<SavedMethod[]>;
|
|
40
47
|
getUserBalance: () => Promise<UserBalanceResponse>;
|
|
41
48
|
};
|
|
42
|
-
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService);
|
|
49
|
+
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentConfigService: PaymentConfigService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, statusService: StatusService, nextActionService: NextActionService, creditCardService: CreditCardService, creditCardStateService: CreditCardStateService);
|
|
43
50
|
init(configuration: InitConfiguration): Promise<void>;
|
|
44
51
|
getStatus(url?: string): Promise<Status>;
|
|
45
52
|
setCountry(country: string): void;
|
|
46
53
|
createPayment(config: PaymentConfig): Payment;
|
|
54
|
+
getCreditCardService(): CreditCard;
|
|
55
|
+
get cardTypeUpdates$(): Observable<CreditCardState>;
|
|
47
56
|
getLegalComponentConfig(): LegalComponentConfig;
|
|
48
57
|
getFieldMask(field: Field): undefined | (() => string);
|
|
49
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export class ShowFieldStateAction {
|
|
2
|
-
constructor(control) {
|
|
3
|
-
this.type = 'show_field_state';
|
|
4
|
-
this.data = {
|
|
5
|
-
fieldName: control.fieldName,
|
|
6
|
-
fieldState: control.fieldState,
|
|
7
|
-
error: control.error,
|
|
8
|
-
isFocused: control.isFocused,
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hvdy1maWVsZC1zdGF0ZS5hY3Rpb24uY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wYXltZW50LWNsaWVudC1jb3JlL3NyYy9saWIvY29yZS9wYXltZW50L2FjdGlvbnMvc2hvdy1maWVsZC1zdGF0ZS9zaG93LWZpZWxkLXN0YXRlLmFjdGlvbi5jbGFzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxNQUFNLE9BQU8sb0JBQW9CO0lBSS9CLFlBQW1CLE9BQXVCO1FBSG5DLFNBQUksR0FBNkIsa0JBQWtCLENBQUM7UUFJekQsSUFBSSxDQUFDLElBQUksR0FBRztZQUNWLFNBQVMsRUFBRSxPQUFPLENBQUMsU0FBUztZQUM1QixVQUFVLEVBQUUsT0FBTyxDQUFDLFVBQVU7WUFDOUIsS0FBSyxFQUFFLE9BQU8sQ0FBQyxLQUFLO1lBQ3BCLFNBQVMsRUFBRSxPQUFPLENBQUMsU0FBUztTQUM3QixDQUFDO0lBQ0osQ0FBQztDQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQWN0aW9uIH0gZnJvbSAnLi4vYWN0aW9uLmludGVyZmFjZSc7XG5pbXBvcnQgeyBTaG93RmllbGRTdGF0ZSB9IGZyb20gJy4uLy4uL3Nob3ctZmllbGQtc3RhdGUuaW50ZXJmYWNlJztcbmltcG9ydCB7XG4gIFNob3dGaWVsZFN0YXRlQWN0aW9uRGF0YSxcbiAgU2hvd0ZpZWxkU3RhdGVBY3Rpb25UeXBlLFxufSBmcm9tICcuL3Nob3ctZmllbGQtc3RhdGUuYWN0aW9uLnR5cGUnO1xuXG5leHBvcnQgY2xhc3MgU2hvd0ZpZWxkU3RhdGVBY3Rpb24gaW1wbGVtZW50cyBBY3Rpb24ge1xuICBwdWJsaWMgdHlwZTogU2hvd0ZpZWxkU3RhdGVBY3Rpb25UeXBlID0gJ3Nob3dfZmllbGRfc3RhdGUnO1xuICBwdWJsaWMgZGF0YTogU2hvd0ZpZWxkU3RhdGVBY3Rpb25EYXRhO1xuXG4gIHB1YmxpYyBjb25zdHJ1Y3Rvcihjb250cm9sOiBTaG93RmllbGRTdGF0ZSkge1xuICAgIHRoaXMuZGF0YSA9IHtcbiAgICAgIGZpZWxkTmFtZTogY29udHJvbC5maWVsZE5hbWUsXG4gICAgICBmaWVsZFN0YXRlOiBjb250cm9sLmZpZWxkU3RhdGUsXG4gICAgICBlcnJvcjogY29udHJvbC5lcnJvcixcbiAgICAgIGlzRm9jdXNlZDogY29udHJvbC5pc0ZvY3VzZWQsXG4gICAgfTtcbiAgfVxufVxuIl19
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ShowFieldStateAction } from './show-field-state.action.class';
|
|
3
|
-
export const showFieldStateActionFactoryToken = new InjectionToken('ShowFieldStateAction');
|
|
4
|
-
export const showFieldStateActionFactoryProvider = {
|
|
5
|
-
provide: showFieldStateActionFactoryToken,
|
|
6
|
-
useValue: {
|
|
7
|
-
factory: (...args) => new ShowFieldStateAction(...args),
|
|
8
|
-
isSuitable: () => {
|
|
9
|
-
return true;
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
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c3JjL2xpYi9jb3JlL3BheW1lbnQvYWN0aW9ucy9zaG93LWZpZWxkLXN0YXRlL3Nob3ctZmllbGQtc3RhdGUuYWN0aW9uLnR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEZvcm1Db250cm9sU3RhdHVzIH0gZnJvbSAnQGFuZ3VsYXIvZm9ybXMnO1xuaW1wb3J0IHsgVmFsaWRhdGlvbkVycm9yIGFzIENvbnRyb2xWYWxpZGF0aW9uRXJyb3IgfSBmcm9tICcuLi8uLi9mb3JtL3ZhbGlkYXRvcnMvdmFsaWRhdGlvbi1lcnJvci5pbnRlcmZhY2UnO1xuaW1wb3J0IHsgQWN0aW9uIH0gZnJvbSAnLi4vYWN0aW9uLmludGVyZmFjZSc7XG5cbmV4cG9ydCB0eXBlIFNob3dGaWVsZFN0YXRlQWN0aW9uVHlwZSA9ICdzaG93X2ZpZWxkX3N0YXRlJztcblxuZXhwb3J0IGludGVyZmFjZSBTaG93RmllbGRTdGF0ZUFjdGlvbkRhdGEge1xuICBmaWVsZE5hbWU6IHN0cmluZztcbiAgZmllbGRTdGF0ZTogRm9ybUNvbnRyb2xTdGF0dXM7XG4gIGVycm9yOiBDb250cm9sVmFsaWRhdGlvbkVycm9yIHwgbnVsbDtcbiAgaXNGb2N1c2VkPzogYm9vbGVhbjtcbn1cblxuZXhwb3J0IHR5cGUgU2hvd0ZpZWxkU3RhdGVBY3Rpb24gPSBBY3Rpb248XG4gIFNob3dGaWVsZFN0YXRlQWN0aW9uVHlwZSxcbiAgU2hvd0ZpZWxkU3RhdGVBY3Rpb25EYXRhXG4+O1xuIl19
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export var InputEventName;
|
|
2
|
-
(function (InputEventName) {
|
|
3
|
-
InputEventName["blur"] = "blur";
|
|
4
|
-
InputEventName["focus"] = "focus";
|
|
5
|
-
})(InputEventName || (InputEventName = {}));
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtZXZlbnRzLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wYXltZW50LWNsaWVudC1jb3JlL3NyYy9saWIvY29yZS9wYXltZW50L2Zvcm0vaW5wdXQtZXZlbnRzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksY0FHWDtBQUhELFdBQVksY0FBYztJQUN4QiwrQkFBYSxDQUFBO0lBQ2IsaUNBQWUsQ0FBQTtBQUNqQixDQUFDLEVBSFcsY0FBYyxLQUFkLGNBQWMsUUFHekIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZW51bSBJbnB1dEV2ZW50TmFtZSB7XG4gIGJsdXIgPSAnYmx1cicsXG4gIGZvY3VzID0gJ2ZvY3VzJyxcbn1cbiJdfQ==
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export var ErrorsCodes;
|
|
2
|
-
(function (ErrorsCodes) {
|
|
3
|
-
ErrorsCodes["minLength"] = "min-length";
|
|
4
|
-
ErrorsCodes["maxLength"] = "max-length";
|
|
5
|
-
ErrorsCodes["invalidValue"] = "invalid-value";
|
|
6
|
-
ErrorsCodes["required"] = "required";
|
|
7
|
-
})(ErrorsCodes || (ErrorsCodes = {}));
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3JzLWNvZGVzLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wYXltZW50LWNsaWVudC1jb3JlL3NyYy9saWIvY29yZS9wYXltZW50L2Zvcm0vdmFsaWRhdG9ycy9lcnJvcnMtY29kZXMuZW51bS50cyJdLCJuYW1lcy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VsZFN0YXRlIHtcbiAgZmllbGROYW1lOiBzdHJpbmc7XG4gIGZpZWxkU3RhdGU6IEZvcm1Db250cm9sU3RhdHVzO1xuICBlcnJvcjogQ29udHJvbFZhbGlkYXRpb25FcnJvciB8IG51bGw7XG4gIGlzRm9jdXNlZD86IGJvb2xlYW47XG59XG4iXX0=
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Action } from '../action.interface';
|
|
2
|
-
import { ShowFieldState } from '../../show-field-state.interface';
|
|
3
|
-
import { ShowFieldStateActionData, ShowFieldStateActionType } from './show-field-state.action.type';
|
|
4
|
-
export declare class ShowFieldStateAction implements Action {
|
|
5
|
-
type: ShowFieldStateActionType;
|
|
6
|
-
data: ShowFieldStateActionData;
|
|
7
|
-
constructor(control: ShowFieldState);
|
|
8
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
-
import { ActionFactoryValue } from '../action-factory-value.interface';
|
|
3
|
-
export declare const showFieldStateActionFactoryToken: InjectionToken<ActionFactoryValue>;
|
|
4
|
-
export declare const showFieldStateActionFactoryProvider: ValueProvider;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FormControlStatus } from '@angular/forms';
|
|
2
|
-
import { ValidationError as ControlValidationError } from '../../form/validators/validation-error.interface';
|
|
3
|
-
import { Action } from '../action.interface';
|
|
4
|
-
export type ShowFieldStateActionType = 'show_field_state';
|
|
5
|
-
export interface ShowFieldStateActionData {
|
|
6
|
-
fieldName: string;
|
|
7
|
-
fieldState: FormControlStatus;
|
|
8
|
-
error: ControlValidationError | null;
|
|
9
|
-
isFocused?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export type ShowFieldStateAction = Action<ShowFieldStateActionType, ShowFieldStateActionData>;
|