@xsolla/payment-client-core 0.0.3 → 0.0.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/boolean-string.enum.mjs +6 -0
- package/esm2020/lib/core/legal/disclaimer.service.mjs +16 -0
- package/esm2020/lib/core/legal/legal.component.config.mjs +2 -0
- package/esm2020/lib/core/legal/legal.service.mjs +39 -0
- package/esm2020/lib/core/legal/refund-policy.service.mjs +30 -0
- package/esm2020/lib/core/legal/secure-connection.service.mjs +31 -0
- package/esm2020/lib/core/payment/actions/action.type.mjs +2 -0
- package/esm2020/lib/core/payment/actions/check-status.action.type.mjs +2 -0
- package/esm2020/lib/core/payment/actions/next-action.type.mjs +2 -0
- package/esm2020/lib/core/payment/checkout-item.interface.mjs +2 -0
- package/esm2020/lib/core/payment/field.interface.mjs +2 -0
- package/esm2020/lib/core/payment/finance-details.interface.mjs +2 -0
- package/esm2020/lib/core/payment/initialize-request-params.interface.mjs +2 -0
- package/esm2020/lib/core/payment/initialize.service.mjs +39 -0
- package/esm2020/lib/core/payment/invoice.interface.mjs +2 -0
- package/esm2020/lib/core/payment/payment-config.interface.mjs +2 -0
- package/esm2020/lib/core/payment/payment.interface.mjs +2 -0
- package/esm2020/lib/core/payment/payment.service.mjs +41 -0
- package/esm2020/lib/core/payment/status/finance-info-field.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/line-item.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/status.enum.mjs +12 -0
- package/esm2020/lib/core/payment/status/status.interface.mjs +2 -0
- package/esm2020/lib/core/payment/status/title-class.enum.mjs +7 -0
- package/esm2020/lib/core/payment/status/web-socket-client-type.enum.mjs +6 -0
- package/esm2020/lib/core/payment/virtual-currency.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-comand.enum.mjs +10 -0
- package/esm2020/lib/core/payment/xps-error.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-message.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-response.interface.mjs +2 -0
- package/esm2020/lib/core/payment/xps-subscription-item.interface.mjs +2 -0
- package/esm2020/lib/core/saved-methods/saved-methods.service.mjs +5 -7
- package/esm2020/lib/core-library.service.mjs +22 -4
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/xsolla-payment-client-core.mjs +200 -7
- package/fesm2015/xsolla-payment-client-core.mjs.map +1 -1
- package/fesm2020/xsolla-payment-client-core.mjs +193 -7
- package/fesm2020/xsolla-payment-client-core.mjs.map +1 -1
- package/lib/core/boolean-string.enum.d.ts +4 -0
- package/lib/core/legal/disclaimer.service.d.ts +6 -0
- package/lib/core/legal/legal.component.config.d.ts +10 -0
- package/lib/core/legal/legal.service.d.ts +18 -0
- package/lib/core/legal/refund-policy.service.d.ts +11 -0
- package/lib/core/legal/secure-connection.service.d.ts +13 -0
- package/lib/core/payment/actions/action.type.d.ts +4 -0
- package/lib/core/payment/actions/check-status.action.type.d.ts +12 -0
- package/lib/core/payment/actions/next-action.type.d.ts +2 -0
- package/lib/core/payment/checkout-item.interface.d.ts +11 -0
- package/lib/core/payment/field.interface.d.ts +26 -0
- package/lib/core/payment/finance-details.interface.d.ts +2 -0
- package/lib/core/payment/initialize-request-params.interface.d.ts +6 -0
- package/lib/core/payment/initialize.service.d.ts +16 -0
- package/lib/core/payment/invoice.interface.d.ts +14 -0
- package/lib/core/payment/payment-config.interface.d.ts +5 -0
- package/lib/core/payment/payment.interface.d.ts +14 -0
- package/lib/core/payment/payment.service.d.ts +22 -0
- package/lib/core/payment/status/finance-info-field.interface.d.ts +5 -0
- package/lib/core/payment/status/line-item.interface.d.ts +8 -0
- package/lib/core/payment/status/status.enum.d.ts +10 -0
- package/lib/core/payment/status/status.interface.d.ts +63 -0
- package/lib/core/payment/status/title-class.enum.d.ts +5 -0
- package/lib/core/payment/status/web-socket-client-type.enum.d.ts +4 -0
- package/lib/core/payment/virtual-currency.interface.d.ts +10 -0
- package/lib/core/payment/xps-comand.enum.d.ts +8 -0
- package/lib/core/payment/xps-error.interface.d.ts +6 -0
- package/lib/core/payment/xps-message.interface.d.ts +4 -0
- package/lib/core/payment/xps-response.interface.d.ts +264 -0
- package/lib/core/payment/xps-subscription-item.interface.d.ts +20 -0
- package/lib/core/saved-methods/saved-methods.service.d.ts +1 -3
- package/lib/core-library.service.d.ts +10 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/xsolla-payment-client-core-0.0.4.tgz +0 -0
- package/xsolla-payment-client-core-0.0.3.tgz +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BooleanString } from '../boolean-string.enum';
|
|
2
|
+
export interface Field {
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
value: string;
|
|
6
|
+
title: string;
|
|
7
|
+
example: string;
|
|
8
|
+
options?: unknown[];
|
|
9
|
+
isMandatory: BooleanString;
|
|
10
|
+
isReadonly?: BooleanString;
|
|
11
|
+
isVisible: BooleanString;
|
|
12
|
+
isPakets?: BooleanString;
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
regex?: string;
|
|
15
|
+
validation_error_msg?: string;
|
|
16
|
+
label_hint?: string;
|
|
17
|
+
javascript: {
|
|
18
|
+
change: {
|
|
19
|
+
mutableFields: string[];
|
|
20
|
+
staticParams: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
params: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CountryService } from '../country/country.service';
|
|
2
|
+
import { SecureApiClient } from '../http/secure-api/secure-api.service';
|
|
3
|
+
import { SettingsService } from '../settings/settings.service';
|
|
4
|
+
import { PaymentConfig } from './payment-config.interface';
|
|
5
|
+
import { XpsResponse } from './xps-response.interface';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class InitializeService {
|
|
8
|
+
private readonly secureApi;
|
|
9
|
+
private readonly settingsService;
|
|
10
|
+
private readonly countryService;
|
|
11
|
+
private readonly apiRoute;
|
|
12
|
+
constructor(secureApi: SecureApiClient, settingsService: SettingsService, countryService: CountryService);
|
|
13
|
+
request(config: PaymentConfig): Promise<XpsResponse>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InitializeService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<InitializeService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Invoice {
|
|
2
|
+
purchase_invoice_id: number | null;
|
|
3
|
+
geotype_id: number | null;
|
|
4
|
+
payment_country: string | null;
|
|
5
|
+
payment_method_contr_id: number | null;
|
|
6
|
+
ps_type: number | null;
|
|
7
|
+
purchase_sum: number | null;
|
|
8
|
+
purchase_currency: string | null;
|
|
9
|
+
purchase_sku: string | null;
|
|
10
|
+
purchase_digital_content_sku: string | null;
|
|
11
|
+
purchase_description: string | null;
|
|
12
|
+
digital_content_cart_id: number | null;
|
|
13
|
+
digital_good_cart_id: number | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NextAction } from './actions/next-action.type';
|
|
2
|
+
import { Field } from './field.interface';
|
|
3
|
+
import { FinanceDetails } from './finance-details.interface';
|
|
4
|
+
import { Status } from './status/status.interface';
|
|
5
|
+
import { XpsResponse } from './xps-response.interface';
|
|
6
|
+
export interface Payment {
|
|
7
|
+
initialize(): Promise<XpsResponse>;
|
|
8
|
+
submit(): NextAction;
|
|
9
|
+
getFields(): Field[];
|
|
10
|
+
validate(field: Field): boolean;
|
|
11
|
+
getFinanceDetails(): FinanceDetails;
|
|
12
|
+
runThreeDs(): NextAction;
|
|
13
|
+
getStatus(): Status;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NextAction } from './actions/next-action.type';
|
|
2
|
+
import { Field } from './field.interface';
|
|
3
|
+
import { FinanceDetails } from './finance-details.interface';
|
|
4
|
+
import { InitializeService } from './initialize.service';
|
|
5
|
+
import { PaymentConfig } from './payment-config.interface';
|
|
6
|
+
import { Status } from './status/status.interface';
|
|
7
|
+
import { XpsResponse } from './xps-response.interface';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class PaymentService {
|
|
10
|
+
private readonly initializeService;
|
|
11
|
+
private data;
|
|
12
|
+
constructor(initializeService: InitializeService);
|
|
13
|
+
initialize(config: PaymentConfig): Promise<XpsResponse>;
|
|
14
|
+
submit(): NextAction;
|
|
15
|
+
getFields(): Field[];
|
|
16
|
+
validate(field: Field): boolean;
|
|
17
|
+
runThreeDs(): NextAction;
|
|
18
|
+
getFinanceDetails(): FinanceDetails;
|
|
19
|
+
getStatus(): Status;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PaymentService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PaymentService>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { FinanceInfoField } from './finance-info-field.interface';
|
|
2
|
+
import { LineItem } from './line-item.interface';
|
|
3
|
+
import { StatusEnum } from './status.enum';
|
|
4
|
+
import { TitleClass } from './title-class.enum';
|
|
5
|
+
import { WebSocketClientType } from './web-socket-client-type.enum';
|
|
6
|
+
export interface Status {
|
|
7
|
+
postMessageStatus: string;
|
|
8
|
+
virtualCurrencyAmount: number;
|
|
9
|
+
statusState: StatusEnum;
|
|
10
|
+
email: string;
|
|
11
|
+
webSocketUrl: string;
|
|
12
|
+
webSocketChannelName: string;
|
|
13
|
+
webSocketClientType: WebSocketClientType;
|
|
14
|
+
financeInfo: {
|
|
15
|
+
[key: string]: FinanceInfoField;
|
|
16
|
+
};
|
|
17
|
+
isCancelUser: boolean;
|
|
18
|
+
backUrlSettings: {
|
|
19
|
+
backUrl: string;
|
|
20
|
+
backUrlAction?: string;
|
|
21
|
+
backUrlCaption: string;
|
|
22
|
+
returnRegion: string;
|
|
23
|
+
showBackButton?: boolean;
|
|
24
|
+
};
|
|
25
|
+
additionalBackButton: {
|
|
26
|
+
link: string;
|
|
27
|
+
action: string;
|
|
28
|
+
label: string;
|
|
29
|
+
region: string;
|
|
30
|
+
isEnabled: boolean;
|
|
31
|
+
};
|
|
32
|
+
group: string;
|
|
33
|
+
needToCheck: boolean;
|
|
34
|
+
autoRedirect?: {
|
|
35
|
+
time: number;
|
|
36
|
+
};
|
|
37
|
+
userReturnStatus?: string;
|
|
38
|
+
statusMessage: string;
|
|
39
|
+
discount: number | null;
|
|
40
|
+
userId?: string;
|
|
41
|
+
invoice?: number;
|
|
42
|
+
pid?: number;
|
|
43
|
+
projectAmount?: {
|
|
44
|
+
amount: string;
|
|
45
|
+
currency: string;
|
|
46
|
+
};
|
|
47
|
+
titleClass: TitleClass;
|
|
48
|
+
isSuccess?: boolean;
|
|
49
|
+
isCanceled?: boolean;
|
|
50
|
+
babkaLink: string;
|
|
51
|
+
paymentCountryIso: string;
|
|
52
|
+
order?: {
|
|
53
|
+
lineitems?: LineItem[];
|
|
54
|
+
shipping?: {
|
|
55
|
+
currency: string;
|
|
56
|
+
amount: number;
|
|
57
|
+
};
|
|
58
|
+
contained_taxes?: {
|
|
59
|
+
sales_tax?: boolean;
|
|
60
|
+
user_vat?: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { BooleanString } from '../boolean-string.enum';
|
|
2
|
+
import { CheckoutItem } from './checkout-item.interface';
|
|
3
|
+
import { Field } from './field.interface';
|
|
4
|
+
import { Invoice } from './invoice.interface';
|
|
5
|
+
import { LineItem } from './status/line-item.interface';
|
|
6
|
+
import { StatusEnum } from './status/status.enum';
|
|
7
|
+
import { TitleClass } from './status/title-class.enum';
|
|
8
|
+
import { WebSocketClientType } from './status/web-socket-client-type.enum';
|
|
9
|
+
import { VirtualCurrency } from './virtual-currency.interface';
|
|
10
|
+
import { XpsCommand } from './xps-comand.enum';
|
|
11
|
+
import { XpsError } from './xps-error.interface';
|
|
12
|
+
import { XpsMessage } from './xps-message.interface';
|
|
13
|
+
import { XpsSubscriptionItem } from './xps-subscription-item.interface';
|
|
14
|
+
export interface XpsResponse {
|
|
15
|
+
checkout: {
|
|
16
|
+
action: string;
|
|
17
|
+
method: string;
|
|
18
|
+
data: {
|
|
19
|
+
[key: string]: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
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
|
+
};
|
|
93
|
+
buyData: {
|
|
94
|
+
currency: string;
|
|
95
|
+
enabled: boolean;
|
|
96
|
+
example: null | unknown;
|
|
97
|
+
isMandatory: null | boolean;
|
|
98
|
+
isPakets: null | boolean;
|
|
99
|
+
isReadonly: null | boolean;
|
|
100
|
+
isVisible: BooleanString;
|
|
101
|
+
label_hint: null | string;
|
|
102
|
+
name: string;
|
|
103
|
+
options: null | unknown[];
|
|
104
|
+
regex: null | unknown;
|
|
105
|
+
sum: string;
|
|
106
|
+
title: null | string;
|
|
107
|
+
tooltip: null | string;
|
|
108
|
+
type: 'submit' | string;
|
|
109
|
+
validation_error_msg: null | string;
|
|
110
|
+
value: string;
|
|
111
|
+
};
|
|
112
|
+
accountXsolla: string;
|
|
113
|
+
public_id: string;
|
|
114
|
+
idCardType: string | null;
|
|
115
|
+
switch_card_icon: string | null;
|
|
116
|
+
form: {
|
|
117
|
+
[key: string]: Field;
|
|
118
|
+
};
|
|
119
|
+
isShortForm: BooleanString;
|
|
120
|
+
taxDisclaimer: string | null;
|
|
121
|
+
number: number;
|
|
122
|
+
barcode: unknown;
|
|
123
|
+
offers: unknown;
|
|
124
|
+
instruction: string;
|
|
125
|
+
errors: XpsError[] | null;
|
|
126
|
+
restrictions: unknown;
|
|
127
|
+
info: string;
|
|
128
|
+
pid: number;
|
|
129
|
+
project: {
|
|
130
|
+
id: number;
|
|
131
|
+
isMerchant: boolean;
|
|
132
|
+
isUnknownPrice: number;
|
|
133
|
+
name: string;
|
|
134
|
+
};
|
|
135
|
+
error?: {
|
|
136
|
+
fields: {
|
|
137
|
+
[key: string]: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
invoiceCreated: BooleanString;
|
|
141
|
+
messages?: XpsMessage[];
|
|
142
|
+
status?: StatusEnum | XpsStatus | null;
|
|
143
|
+
final?: boolean;
|
|
144
|
+
elapsedTime?: number;
|
|
145
|
+
group?: string;
|
|
146
|
+
is_payment_account_attached?: boolean;
|
|
147
|
+
is_partial_pay?: boolean;
|
|
148
|
+
country?: {
|
|
149
|
+
iso: string;
|
|
150
|
+
};
|
|
151
|
+
userSession?: Invoice;
|
|
152
|
+
currentCommand: XpsCommand;
|
|
153
|
+
title: string;
|
|
154
|
+
onlineBanking?: {
|
|
155
|
+
value: string;
|
|
156
|
+
};
|
|
157
|
+
threeDSForm: {
|
|
158
|
+
threeDSTrXid: string;
|
|
159
|
+
threeDSMethod: string;
|
|
160
|
+
threeDSMethodData: string;
|
|
161
|
+
webSocketChannelUrl: string;
|
|
162
|
+
webSocketChannelName: string;
|
|
163
|
+
webSocketClientType: WebSocketClientType;
|
|
164
|
+
statusUrl: string;
|
|
165
|
+
waitCallback: boolean;
|
|
166
|
+
} | null;
|
|
167
|
+
skipForm: boolean;
|
|
168
|
+
skipCheckout: boolean;
|
|
169
|
+
isMap: boolean;
|
|
170
|
+
isCheckout: boolean;
|
|
171
|
+
categories: number[];
|
|
172
|
+
textAll?: {
|
|
173
|
+
fatal: boolean;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
export interface XpsStatus {
|
|
177
|
+
is_partial_pay: boolean;
|
|
178
|
+
marketplace: string;
|
|
179
|
+
autoredirect?: {
|
|
180
|
+
time: number;
|
|
181
|
+
};
|
|
182
|
+
statusData: {
|
|
183
|
+
project: number;
|
|
184
|
+
pid: number;
|
|
185
|
+
out: number;
|
|
186
|
+
payment_country_iso: string;
|
|
187
|
+
v1: string;
|
|
188
|
+
v2: string;
|
|
189
|
+
v3: string;
|
|
190
|
+
invoice: number;
|
|
191
|
+
email: string;
|
|
192
|
+
state: number;
|
|
193
|
+
stateText: StatusEnum;
|
|
194
|
+
statusPs: number;
|
|
195
|
+
key: string;
|
|
196
|
+
webSocketChannelUrl: string;
|
|
197
|
+
webSocketChannelName: string;
|
|
198
|
+
webSocketClientType: WebSocketClientType;
|
|
199
|
+
projectAmount: string;
|
|
200
|
+
recurrentId?: number;
|
|
201
|
+
};
|
|
202
|
+
gshare_banner_enabled: boolean;
|
|
203
|
+
invoice: number;
|
|
204
|
+
repayment?: null[] | null;
|
|
205
|
+
email?: null[] | null;
|
|
206
|
+
group: string;
|
|
207
|
+
sharing?: unknown;
|
|
208
|
+
pre_orders: unknown;
|
|
209
|
+
text: {
|
|
210
|
+
info: {
|
|
211
|
+
[key: string]: {
|
|
212
|
+
key?: string;
|
|
213
|
+
pref?: string;
|
|
214
|
+
value?: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
state: string;
|
|
218
|
+
stateFailed: string;
|
|
219
|
+
is_additional_back_url_enabled?: boolean;
|
|
220
|
+
additional_back_url_link?: string;
|
|
221
|
+
additional_back_url_label?: string;
|
|
222
|
+
additional_back_url_action?: string;
|
|
223
|
+
backurl: string;
|
|
224
|
+
backurl_caption: string;
|
|
225
|
+
backurl_action: string;
|
|
226
|
+
redeem_instruction_link?: null;
|
|
227
|
+
order?: {
|
|
228
|
+
lineitems?: LineItem[];
|
|
229
|
+
shipping?: {
|
|
230
|
+
currency: string;
|
|
231
|
+
amount: number;
|
|
232
|
+
};
|
|
233
|
+
contained_taxes?: {
|
|
234
|
+
sales_tax?: boolean;
|
|
235
|
+
user_vat?: boolean;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
country: string;
|
|
240
|
+
return_region: string;
|
|
241
|
+
additional_button_return_region?: string;
|
|
242
|
+
isUserLegal: boolean;
|
|
243
|
+
isCancelUser: boolean;
|
|
244
|
+
isPreloader: boolean;
|
|
245
|
+
alternative?: unknown;
|
|
246
|
+
showEmailRequest: boolean;
|
|
247
|
+
autoRecharge: {
|
|
248
|
+
params?: unknown;
|
|
249
|
+
packages: unknown;
|
|
250
|
+
label_error: string;
|
|
251
|
+
label_continue: string;
|
|
252
|
+
};
|
|
253
|
+
title_class: TitleClass;
|
|
254
|
+
needToCheck: boolean;
|
|
255
|
+
custom_message: string;
|
|
256
|
+
custom_header: string;
|
|
257
|
+
babkaLink: string;
|
|
258
|
+
discount?: {
|
|
259
|
+
[key: string]: {
|
|
260
|
+
key?: string;
|
|
261
|
+
value?: string;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface XpsSubscriptionItem {
|
|
2
|
+
amount: number;
|
|
3
|
+
is_trial: boolean;
|
|
4
|
+
trial_period: number;
|
|
5
|
+
period: number;
|
|
6
|
+
currency: string;
|
|
7
|
+
description: string;
|
|
8
|
+
package_info: string;
|
|
9
|
+
period_type: string;
|
|
10
|
+
expiration_period_type: string;
|
|
11
|
+
recurrent_type: string;
|
|
12
|
+
date_next_charge: string;
|
|
13
|
+
amount_next_charge: string;
|
|
14
|
+
setup_fee: number;
|
|
15
|
+
currency_next_charge: string;
|
|
16
|
+
promotion_details: unknown;
|
|
17
|
+
is_allow_user_select_recurrent_type: string;
|
|
18
|
+
date_start: string;
|
|
19
|
+
date_end: string;
|
|
20
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CountryService } from '../country/country.service';
|
|
2
1
|
import { SecureApiClient } from '../http/secure-api/secure-api.service';
|
|
3
2
|
import { SettingsService } from '../settings/settings.service';
|
|
4
3
|
import { SavedMethodsResponseFactory } from './saved-methods-response.token';
|
|
@@ -7,11 +6,10 @@ import * as i0 from "@angular/core";
|
|
|
7
6
|
export declare class SavedMethodsService {
|
|
8
7
|
private readonly responseFactory;
|
|
9
8
|
private readonly settingsService;
|
|
10
|
-
private readonly countryService;
|
|
11
9
|
private readonly secureApi;
|
|
12
10
|
private readonly apiRoute;
|
|
13
11
|
private readonly cache;
|
|
14
|
-
constructor(responseFactory: SavedMethodsResponseFactory, settingsService: SettingsService,
|
|
12
|
+
constructor(responseFactory: SavedMethodsResponseFactory, settingsService: SettingsService, secureApi: SecureApiClient);
|
|
15
13
|
getList(): Promise<SavedMethod[]>;
|
|
16
14
|
private request;
|
|
17
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<SavedMethodsService, never>;
|
|
@@ -7,6 +7,11 @@ import { SavedMethodsService } from './core/saved-methods/saved-methods.service'
|
|
|
7
7
|
import { SavedMethod } from './core/saved-methods/saved-method.interface';
|
|
8
8
|
import { UserBalanceResponse } from './core/user-balance/user-balance-response.class';
|
|
9
9
|
import { UserBalanceService } from './core/user-balance/user-balance.service';
|
|
10
|
+
import { PaymentConfig } from './core/payment/payment-config.interface';
|
|
11
|
+
import { PaymentService } from './core/payment/payment.service';
|
|
12
|
+
import { Payment } from './core/payment/payment.interface';
|
|
13
|
+
import { LegalService } from './core/legal/legal.service';
|
|
14
|
+
import { LegalComponentConfig } from './core/legal/legal.component.config';
|
|
10
15
|
import * as i0 from "@angular/core";
|
|
11
16
|
export declare class CoreLibraryService {
|
|
12
17
|
private readonly settingsService;
|
|
@@ -14,15 +19,19 @@ export declare class CoreLibraryService {
|
|
|
14
19
|
private readonly paymentMethodsService;
|
|
15
20
|
private readonly savedMethodsService;
|
|
16
21
|
private readonly userBalanceService;
|
|
22
|
+
private readonly legalService;
|
|
23
|
+
private readonly paymentService;
|
|
17
24
|
paymentMethods: {
|
|
18
25
|
getList: () => Promise<PaymentMethod[]>;
|
|
19
26
|
getQuickMethods: () => Promise<PaymentMethod[]>;
|
|
20
27
|
getSavedMethods: () => Promise<SavedMethod[]>;
|
|
21
28
|
getUserBalance: () => Promise<UserBalanceResponse>;
|
|
22
29
|
};
|
|
23
|
-
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService);
|
|
30
|
+
constructor(settingsService: SettingsService, countryService: CountryService, paymentMethodsService: PaymentMethodsService, savedMethodsService: SavedMethodsService, userBalanceService: UserBalanceService, legalService: LegalService, paymentService: PaymentService);
|
|
24
31
|
init(configuration: InitConfiguration): Promise<void>;
|
|
25
32
|
setCountry(country: string): void;
|
|
33
|
+
createPayment(config: PaymentConfig): Payment;
|
|
34
|
+
getLegalComponentConfig(): LegalComponentConfig;
|
|
26
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoreLibraryService, never>;
|
|
27
36
|
static ɵprov: i0.ɵɵInjectableDeclaration<CoreLibraryService>;
|
|
28
37
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
Binary file
|
|
Binary file
|