@xsolla/payment-client-core 0.0.8 → 0.0.10-1
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/payment/emit-data.service.abstract.mjs +11 -0
- package/esm2020/lib/core/payment/finance-details/cart-item.interface.mjs +2 -0
- package/esm2020/lib/core/payment/finance-details/cart-line.interface.mjs +2 -0
- package/esm2020/lib/core/payment/finance-details/cart-pricing.interface.mjs +2 -0
- package/esm2020/lib/core/payment/finance-details/default-image-patterns.const.mjs +10 -0
- package/esm2020/lib/core/payment/finance-details/finance-details-response.token.mjs +8 -0
- package/esm2020/lib/core/payment/finance-details/finance-details.class.mjs +214 -0
- package/esm2020/lib/core/payment/finance-details/finance-details.service.mjs +25 -0
- package/esm2020/lib/core/payment/finance-details/price.helpers.mjs +15 -0
- package/esm2020/lib/core/payment/finance-details/price.interface.mjs +2 -0
- package/esm2020/lib/core/payment/form/controls/control-config.service.mjs +8 -1
- package/esm2020/lib/core/payment/form/converters/converter.abstract.mjs +2 -5
- package/esm2020/lib/core/payment/form/converters/zip.converter.mjs +3 -3
- package/esm2020/lib/core/payment/initialize/initialize-request-params.interface.mjs +1 -1
- package/esm2020/lib/core/payment/initialize/initialize.service.mjs +4 -1
- package/esm2020/lib/core/payment/payment.interface.mjs +1 -1
- package/esm2020/lib/core/payment/payment.service.mjs +46 -7
- package/esm2020/lib/core/payment/sync/sync.service.mjs +13 -2
- package/esm2020/lib/core/payment/xps-finance.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-purchase.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-response.interface.mjs +1 -1
- package/esm2020/lib/core/payment/xps-summary.interface.mjs +2 -0
- package/esm2020/lib/core-library.module.mjs +4 -1
- package/esm2020/lib/core-library.service.mjs +13 -7
- package/fesm2015/xsolla-payment-client-core.mjs +362 -17
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +351 -17
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/payment/emit-data.service.abstract.d.ts +7 -0
- package/lib/core/payment/finance-details/cart-item.interface.d.ts +13 -0
- package/lib/core/payment/finance-details/cart-line.interface.d.ts +8 -0
- package/lib/core/payment/finance-details/cart-pricing.interface.d.ts +10 -0
- package/lib/core/payment/finance-details/default-image-patterns.const.d.ts +6 -0
- package/lib/core/payment/finance-details/finance-details-response.token.d.ts +7 -0
- package/lib/core/payment/finance-details/finance-details.class.d.ts +25 -0
- package/lib/core/payment/finance-details/finance-details.service.d.ts +12 -0
- package/lib/core/payment/finance-details/price.helpers.d.ts +6 -0
- package/lib/core/payment/finance-details/price.interface.d.ts +4 -0
- package/lib/core/payment/form/controls/control-config.service.d.ts +2 -0
- package/lib/core/payment/form/converters/converter.abstract.d.ts +1 -2
- package/lib/core/payment/initialize/initialize-request-params.interface.d.ts +1 -0
- package/lib/core/payment/initialize/initialize.service.d.ts +1 -0
- package/lib/core/payment/payment.interface.d.ts +8 -3
- package/lib/core/payment/payment.service.d.ts +15 -3
- package/lib/core/payment/sync/sync.service.d.ts +6 -2
- package/lib/core/payment/xps-finance.interface.d.ts +57 -0
- package/lib/core/payment/xps-purchase.interface.d.ts +15 -0
- package/lib/core/payment/xps-response.interface.d.ts +2 -74
- package/lib/core/payment/xps-summary.interface.d.ts +6 -0
- package/lib/core-library.service.d.ts +3 -1
- package/package.json +1 -1
- package/xsolla-payment-client-core-0.0.10-1.tgz +0 -0
- package/esm2020/lib/core/payment/finance-details.interface.mjs +0 -2
- package/lib/core/payment/finance-details.interface.d.ts +0 -2
- package/xsolla-payment-client-core-0.0.8.tgz +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CartLine } from './cart-line.interface';
|
|
2
|
+
import { Price } from './price.interface';
|
|
3
|
+
export interface CartItem {
|
|
4
|
+
imgSrc?: string;
|
|
5
|
+
hasDefaultImg?: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
price: Price;
|
|
8
|
+
priceBeforeDiscount?: Price;
|
|
9
|
+
description?: string | null;
|
|
10
|
+
tax?: CartLine | null;
|
|
11
|
+
quantity?: number;
|
|
12
|
+
isBonus: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CartLine } from './cart-line.interface';
|
|
2
|
+
export interface CartSummary {
|
|
3
|
+
transactionDetails?: CartLine[];
|
|
4
|
+
shipping?: CartLine[];
|
|
5
|
+
subtotal?: CartLine;
|
|
6
|
+
subtotalPayment?: CartLine;
|
|
7
|
+
subtotalDetails?: CartLine[];
|
|
8
|
+
total: CartLine;
|
|
9
|
+
totalDetails?: CartLine[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
+
import { FinanceDetails } from './finance-details.class';
|
|
3
|
+
type ResponseParameters = ConstructorParameters<typeof FinanceDetails>;
|
|
4
|
+
export type FinanceDetailsResponseFactory = (...args: ResponseParameters) => FinanceDetails;
|
|
5
|
+
export declare const financeDetailsResponseFactoryToken: InjectionToken<FinanceDetailsResponseFactory>;
|
|
6
|
+
export declare const financeDetailsResponseFactoryProvider: ValueProvider;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { XpsFinance } from '../xps-finance.interface';
|
|
2
|
+
import { XpsPurchase } from '../xps-purchase.interface';
|
|
3
|
+
import { CartItem } from './cart-item.interface';
|
|
4
|
+
import { CartSummary } from './cart-pricing.interface';
|
|
5
|
+
export declare class FinanceDetails {
|
|
6
|
+
readonly purchase: XpsPurchase;
|
|
7
|
+
readonly finance: XpsFinance;
|
|
8
|
+
private get shouldShowZeroIndirectTaxRate();
|
|
9
|
+
private get isSalesTaxes();
|
|
10
|
+
constructor(parameters: {
|
|
11
|
+
purchase: XpsPurchase;
|
|
12
|
+
finance: XpsFinance;
|
|
13
|
+
});
|
|
14
|
+
getFormattedPurchaseForCart(): CartItem[];
|
|
15
|
+
getFormattedPricingForCart(): CartSummary;
|
|
16
|
+
getPaymentCountry(): string;
|
|
17
|
+
private getTaxForItem;
|
|
18
|
+
private getTaxesForSubtotalDetails;
|
|
19
|
+
private getVatLabelForSubtotalDetails;
|
|
20
|
+
private getTaxesForTotalDetails;
|
|
21
|
+
private getVatLabelForTotalDetails;
|
|
22
|
+
private isIndia;
|
|
23
|
+
private isGhana;
|
|
24
|
+
private isDefaultImage;
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EmitDataService } from '../emit-data.service.abstract';
|
|
2
|
+
import { XpsSummary } from '../xps-summary.interface';
|
|
3
|
+
import { FinanceDetailsResponseFactory } from './finance-details-response.token';
|
|
4
|
+
import { FinanceDetails } from './finance-details.class';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class FinanceDetailsService extends EmitDataService<FinanceDetails> {
|
|
7
|
+
private readonly responseFactory;
|
|
8
|
+
constructor(responseFactory: FinanceDetailsResponseFactory);
|
|
9
|
+
emit(summary?: XpsSummary): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FinanceDetailsService, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FinanceDetailsService>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Price } from './price.interface';
|
|
2
|
+
export declare function extractMoneyCurrency<T>(money: (T & {
|
|
3
|
+
amount: null | number;
|
|
4
|
+
currency: string;
|
|
5
|
+
}) | undefined, allowZero?: boolean): Price;
|
|
6
|
+
export declare function createPriceOrUndefined(amount: number | undefined | null, currency: string): Price | undefined;
|
|
@@ -3,12 +3,14 @@ import { UntypedFormControl } from '@angular/forms';
|
|
|
3
3
|
import { Field } from '../../field.interface';
|
|
4
4
|
import { Converter } from '../converters/converter.abstract';
|
|
5
5
|
import { ConvertersMap } from '../converters/converters-map.interface';
|
|
6
|
+
import { ControlConfig } from './control-config';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class ControlConfigService {
|
|
8
9
|
private readonly convertersMap;
|
|
9
10
|
private readonly injector;
|
|
10
11
|
constructor(convertersMap: ConvertersMap, injector: Injector);
|
|
11
12
|
getFormControl(field: Field): UntypedFormControl | null;
|
|
13
|
+
getConfig(field: Field): ControlConfig | null;
|
|
12
14
|
getConverter(field: Field | null): Converter | null;
|
|
13
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<ControlConfigService, never>;
|
|
14
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<ControlConfigService>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UntypedFormControl, ValidatorFn } 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';
|
|
@@ -9,7 +9,6 @@ export declare abstract class Converter {
|
|
|
9
9
|
convertToConfig(field: Field, formState?: FormState): ControlConfig;
|
|
10
10
|
convertToFormControl(field: Field): UntypedFormControl;
|
|
11
11
|
getValidators(field: Field): ValidatorFn[];
|
|
12
|
-
getAsyncValidators(field: Field): AsyncValidatorFn | AsyncValidatorFn[] | null;
|
|
13
12
|
createDefaultControlConfig<T extends {
|
|
14
13
|
[key: string]: unknown;
|
|
15
14
|
}>(controlConfigClass: new () => T, field: Field): T;
|
|
@@ -11,6 +11,7 @@ export declare class InitializeService {
|
|
|
11
11
|
private readonly settingsService;
|
|
12
12
|
private readonly countryService;
|
|
13
13
|
private readonly apiRoute;
|
|
14
|
+
private readonly ps4ReferId;
|
|
14
15
|
constructor(responseFactory: InitializeResponseFactory, secureApi: SecureApiClient, settingsService: SettingsService, countryService: CountryService);
|
|
15
16
|
request(config: PaymentConfig): Promise<InitializeResponse>;
|
|
16
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<InitializeService, never>;
|
|
@@ -3,16 +3,21 @@ import { Observable } from 'rxjs';
|
|
|
3
3
|
import { NextAction } from './actions/next-action.interface';
|
|
4
4
|
import { Status } from './status/status.interface';
|
|
5
5
|
import { StatusParams } from './status/status-params.interface';
|
|
6
|
-
import { FinanceDetails } from './finance-details.interface';
|
|
7
6
|
import { Field } from './field.interface';
|
|
7
|
+
import { ControlConfig } from './form/controls/control-config';
|
|
8
|
+
import { FinanceDetails } from './finance-details/finance-details.class';
|
|
8
9
|
export interface Payment {
|
|
9
10
|
initialize(): Promise<Field[]>;
|
|
10
11
|
submit(): Promise<NextAction | null>;
|
|
11
12
|
getFields(): Field[];
|
|
12
13
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
13
|
-
getFinanceDetails(): FinanceDetails;
|
|
14
|
+
getFinanceDetails(): FinanceDetails | null;
|
|
14
15
|
runThreeDs(): NextAction;
|
|
15
16
|
getStatus(params: StatusParams): Promise<Status>;
|
|
16
|
-
|
|
17
|
+
form: {
|
|
18
|
+
changeFieldValue(name: string, value: string): void;
|
|
19
|
+
getControlConfig(field: Field): ControlConfig | null;
|
|
20
|
+
};
|
|
17
21
|
flowUpdates$: Observable<NextAction>;
|
|
22
|
+
financeDetailsUpdates$: Observable<FinanceDetails>;
|
|
18
23
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
|
2
2
|
import { NextAction } from './actions/next-action.interface';
|
|
3
3
|
import { Field } from './field.interface';
|
|
4
|
-
import { FinanceDetails } from './finance-details.interface';
|
|
5
4
|
import { FormService } from './form/form.service';
|
|
6
5
|
import { InitializeService } from './initialize/initialize.service';
|
|
7
6
|
import { PaymentConfig } from './payment-config.interface';
|
|
@@ -11,6 +10,10 @@ import { SyncService } from './sync/sync.service';
|
|
|
11
10
|
import { StatusService } from './status/status.service';
|
|
12
11
|
import { StatusParams } from './status/status-params.interface';
|
|
13
12
|
import { NextActionService } from './actions/next-action.service';
|
|
13
|
+
import { ControlConfig } from './form/controls/control-config';
|
|
14
|
+
import { ControlConfigService } from './form/controls/control-config.service';
|
|
15
|
+
import { FinanceDetails } from './finance-details/finance-details.class';
|
|
16
|
+
import { FinanceDetailsService } from './finance-details/finance-details.service';
|
|
14
17
|
import * as i0 from "@angular/core";
|
|
15
18
|
export declare class PaymentService {
|
|
16
19
|
private readonly initializeService;
|
|
@@ -18,20 +21,29 @@ export declare class PaymentService {
|
|
|
18
21
|
private readonly syncService;
|
|
19
22
|
private readonly formService;
|
|
20
23
|
private readonly statusService;
|
|
24
|
+
private readonly financeDetailsService;
|
|
21
25
|
private readonly nextActionService;
|
|
26
|
+
private readonly controlConfigService;
|
|
22
27
|
form: UntypedFormGroup | null;
|
|
23
28
|
private data;
|
|
29
|
+
private financeDetails;
|
|
24
30
|
private fields;
|
|
25
31
|
private config;
|
|
26
|
-
|
|
32
|
+
private destroy$;
|
|
33
|
+
constructor(initializeService: InitializeService, submitService: SubmitService, syncService: SyncService, formService: FormService, statusService: StatusService, financeDetailsService: FinanceDetailsService, nextActionService: NextActionService, controlConfigService: ControlConfigService);
|
|
27
34
|
initialize(config: PaymentConfig): Promise<Field[]>;
|
|
28
35
|
submit(): Promise<NextAction | null>;
|
|
29
36
|
getFields(): Field[];
|
|
30
37
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
31
38
|
runThreeDs(): NextAction;
|
|
32
|
-
getFinanceDetails(): FinanceDetails;
|
|
39
|
+
getFinanceDetails(): FinanceDetails | null;
|
|
33
40
|
getStatus(params: StatusParams): Promise<Status>;
|
|
41
|
+
getFieldConfig(field: Field): ControlConfig | null;
|
|
34
42
|
changeFieldValue(name: string, value: string): void;
|
|
43
|
+
destroy(): void;
|
|
44
|
+
private emitFinanceDetails;
|
|
45
|
+
private setupSyncService;
|
|
46
|
+
private listenFinanceDetails;
|
|
35
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
36
48
|
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
37
49
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { UntypedFormGroup, ValidationErrors } from '@angular/forms';
|
|
2
2
|
import { SecureApiClient } from '../../http/secure-api/secure-api.service';
|
|
3
3
|
import { SettingsService } from '../../settings/settings.service';
|
|
4
|
+
import { EmitDataService } from '../emit-data.service.abstract';
|
|
4
5
|
import { Field } from '../field.interface';
|
|
6
|
+
import { XpsResponse } from '../xps-response.interface';
|
|
5
7
|
import { SyncRequestFactory } from './sync-request.token';
|
|
8
|
+
import { SyncResponse } from './sync-response.class';
|
|
6
9
|
import { SyncResponseFactory } from './sync-response.token';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class SyncService {
|
|
11
|
+
export declare class SyncService extends EmitDataService<XpsResponse> {
|
|
9
12
|
private readonly requestFactory;
|
|
10
13
|
private readonly responseFactory;
|
|
11
14
|
private readonly secureApi;
|
|
@@ -18,7 +21,8 @@ export declare class SyncService {
|
|
|
18
21
|
setup(form: UntypedFormGroup, fields: Field[]): void;
|
|
19
22
|
reset(): void;
|
|
20
23
|
validate(field: Field): Promise<ValidationErrors | null>;
|
|
21
|
-
|
|
24
|
+
getSyncValidationErrors(field: Field): ValidationErrors | null;
|
|
25
|
+
protected request(field: Field): Promise<SyncResponse>;
|
|
22
26
|
private isReadyField;
|
|
23
27
|
private getPrevFieldSyncState;
|
|
24
28
|
private setPrevFieldSyncState;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface XpsFinance {
|
|
2
|
+
payment_country: {
|
|
3
|
+
iso: string;
|
|
4
|
+
};
|
|
5
|
+
sub_total: {
|
|
6
|
+
amount: number;
|
|
7
|
+
currency: string;
|
|
8
|
+
payment_amount: number;
|
|
9
|
+
payment_currency: string;
|
|
10
|
+
};
|
|
11
|
+
discount: {
|
|
12
|
+
amount: number;
|
|
13
|
+
currency: string;
|
|
14
|
+
};
|
|
15
|
+
vat_user?: {
|
|
16
|
+
amount: number;
|
|
17
|
+
percent: number;
|
|
18
|
+
currency: string;
|
|
19
|
+
visible: boolean;
|
|
20
|
+
};
|
|
21
|
+
sales_tax: {
|
|
22
|
+
amount: number;
|
|
23
|
+
percent: number;
|
|
24
|
+
currency: string;
|
|
25
|
+
};
|
|
26
|
+
sales_tax_user?: {
|
|
27
|
+
amount: number;
|
|
28
|
+
percent: number;
|
|
29
|
+
currency: string;
|
|
30
|
+
};
|
|
31
|
+
fee: {
|
|
32
|
+
amount: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
};
|
|
35
|
+
total: {
|
|
36
|
+
amount: number;
|
|
37
|
+
currency: string;
|
|
38
|
+
};
|
|
39
|
+
xsolla_credits?: {
|
|
40
|
+
payment_amount: number;
|
|
41
|
+
payment_currency: string;
|
|
42
|
+
};
|
|
43
|
+
vat: {
|
|
44
|
+
amount: number;
|
|
45
|
+
percent: number;
|
|
46
|
+
currency: string;
|
|
47
|
+
visible: boolean;
|
|
48
|
+
};
|
|
49
|
+
user_balance?: {
|
|
50
|
+
amount: number;
|
|
51
|
+
currency: string;
|
|
52
|
+
};
|
|
53
|
+
grand_total?: {
|
|
54
|
+
amount: number;
|
|
55
|
+
currency: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CheckoutItem } from './checkout-item.interface';
|
|
2
|
+
import { VirtualCurrency } from './virtual-currency.interface';
|
|
3
|
+
import { XpsSubscriptionItem } from './xps-subscription-item.interface';
|
|
4
|
+
export interface XpsPurchase {
|
|
5
|
+
virtual_currency?: VirtualCurrency[];
|
|
6
|
+
checkout_items?: CheckoutItem[];
|
|
7
|
+
virtual_items?: VirtualCurrency[];
|
|
8
|
+
subscriptions?: XpsSubscriptionItem[];
|
|
9
|
+
checkout?: {
|
|
10
|
+
amount: number;
|
|
11
|
+
currency: string;
|
|
12
|
+
description: string;
|
|
13
|
+
is_bonus?: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { XpsBoolean } from '../xps-boolean.enum';
|
|
2
|
-
import { CheckoutItem } from './checkout-item.interface';
|
|
3
2
|
import { Field } from './field.interface';
|
|
4
3
|
import { Invoice } from './invoice.interface';
|
|
5
4
|
import { LineItem } from './status/line-item.interface';
|
|
6
5
|
import { StatusEnum } from './status/status.enum';
|
|
7
6
|
import { TitleClass } from './status/title-class.enum';
|
|
8
7
|
import { WebSocketClientType } from './status/web-socket-client-type.enum';
|
|
9
|
-
import { VirtualCurrency } from './virtual-currency.interface';
|
|
10
8
|
import { XpsCommand } from './xps-comand.enum';
|
|
11
9
|
import { XpsError } from './xps-error.interface';
|
|
12
10
|
import { XpsMessage } from './xps-message.interface';
|
|
13
|
-
import {
|
|
11
|
+
import { XpsSummary } from './xps-summary.interface';
|
|
14
12
|
export interface XpsResponse {
|
|
15
13
|
checkout: {
|
|
16
14
|
action: string;
|
|
@@ -19,77 +17,7 @@ export interface XpsResponse {
|
|
|
19
17
|
[key: string]: string;
|
|
20
18
|
};
|
|
21
19
|
};
|
|
22
|
-
summary:
|
|
23
|
-
purchase: {
|
|
24
|
-
virtual_currency?: VirtualCurrency[];
|
|
25
|
-
checkout_items?: CheckoutItem[];
|
|
26
|
-
virtual_items?: VirtualCurrency[];
|
|
27
|
-
subscriptions?: XpsSubscriptionItem[];
|
|
28
|
-
checkout?: {
|
|
29
|
-
amount: number;
|
|
30
|
-
currency: string;
|
|
31
|
-
description: string;
|
|
32
|
-
is_bonus?: boolean;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
finance: {
|
|
36
|
-
payment_country: {
|
|
37
|
-
iso: string;
|
|
38
|
-
};
|
|
39
|
-
sub_total: {
|
|
40
|
-
amount: number;
|
|
41
|
-
currency: string;
|
|
42
|
-
payment_amount: number;
|
|
43
|
-
payment_currency: string;
|
|
44
|
-
};
|
|
45
|
-
discount: {
|
|
46
|
-
amount: number;
|
|
47
|
-
currency: string;
|
|
48
|
-
};
|
|
49
|
-
vat_user?: {
|
|
50
|
-
amount: number;
|
|
51
|
-
percent: number;
|
|
52
|
-
currency: string;
|
|
53
|
-
visible: boolean;
|
|
54
|
-
};
|
|
55
|
-
sales_tax: {
|
|
56
|
-
amount: number;
|
|
57
|
-
percent: number;
|
|
58
|
-
currency: string;
|
|
59
|
-
};
|
|
60
|
-
sales_tax_user?: {
|
|
61
|
-
amount: number;
|
|
62
|
-
percent: number;
|
|
63
|
-
currency: string;
|
|
64
|
-
};
|
|
65
|
-
fee: {
|
|
66
|
-
amount: number;
|
|
67
|
-
currency: string;
|
|
68
|
-
};
|
|
69
|
-
total: {
|
|
70
|
-
amount: number;
|
|
71
|
-
currency: string;
|
|
72
|
-
};
|
|
73
|
-
xsolla_credits?: {
|
|
74
|
-
payment_amount: number;
|
|
75
|
-
payment_currency: string;
|
|
76
|
-
};
|
|
77
|
-
vat: {
|
|
78
|
-
amount: number;
|
|
79
|
-
percent: number;
|
|
80
|
-
currency: string;
|
|
81
|
-
visible: boolean;
|
|
82
|
-
};
|
|
83
|
-
user_balance?: {
|
|
84
|
-
amount: number;
|
|
85
|
-
currency: string;
|
|
86
|
-
};
|
|
87
|
-
grand_total?: {
|
|
88
|
-
amount: number;
|
|
89
|
-
currency: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
};
|
|
20
|
+
summary: XpsSummary;
|
|
93
21
|
buyData: {
|
|
94
22
|
currency: string;
|
|
95
23
|
enabled: boolean;
|
|
@@ -14,6 +14,7 @@ import { DeviceFingerPrintService } from './core/device-finger-print/device-fing
|
|
|
14
14
|
import { LegalService } from './core/legal/legal.service';
|
|
15
15
|
import { LegalComponentConfig } from './core/legal/legal.component.config';
|
|
16
16
|
import { NextActionService } from './core/payment/actions/next-action.service';
|
|
17
|
+
import { FinanceDetailsService } from './core/payment/finance-details/finance-details.service';
|
|
17
18
|
import * as i0 from "@angular/core";
|
|
18
19
|
export declare class CoreLibraryService {
|
|
19
20
|
private readonly settingsService;
|
|
@@ -23,6 +24,7 @@ export declare class CoreLibraryService {
|
|
|
23
24
|
private readonly userBalanceService;
|
|
24
25
|
private readonly paymentService;
|
|
25
26
|
private readonly deviceFingerPrintService;
|
|
27
|
+
private readonly financeDetailsService;
|
|
26
28
|
private readonly legalService;
|
|
27
29
|
private readonly nextActionService;
|
|
28
30
|
paymentMethods: {
|
|
@@ -31,7 +33,7 @@ export declare class CoreLibraryService {
|
|
|
31
33
|
getSavedMethods: () => Promise<SavedMethod[]>;
|
|
32
34
|
getUserBalance: () => Promise<UserBalanceResponse>;
|
|
33
35
|
};
|
|
34
|
-
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, legalService: LegalService, nextActionService: NextActionService);
|
|
36
|
+
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, paymentService: PaymentService, deviceFingerPrintService: DeviceFingerPrintService, financeDetailsService: FinanceDetailsService, legalService: LegalService, nextActionService: NextActionService);
|
|
35
37
|
init(configuration: InitConfiguration): Promise<void>;
|
|
36
38
|
setCountry(country: string): void;
|
|
37
39
|
createPayment(config: PaymentConfig): Payment;
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export {};
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmluYW5jZS1kZXRhaWxzLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3BheW1lbnQtY2xpZW50LWNvcmUvc3JjL2xpYi9jb3JlL3BheW1lbnQvZmluYW5jZS1kZXRhaWxzLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVE9ETzogdXBkYXRlIG9uY2UgZmluYW5jZS1kZXRhaWxzLnNlcnZpY2UuIGlzIGltcGxlbWVudGVkXG4vLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWVtcHR5LWludGVyZmFjZVxuZXhwb3J0IGludGVyZmFjZSBGaW5hbmNlRGV0YWlscyB7fVxuIl19
|
|
Binary file
|