liqpay-nestjs 0.2.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/README.md +15 -0
- package/dist/core/constants.d.ts +3 -0
- package/dist/core/constants.js +7 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +17 -0
- package/dist/core/liqpay.client.d.ts +65 -0
- package/dist/core/liqpay.client.js +156 -0
- package/dist/core/schemas/base/envelope.schema.d.ts +6 -0
- package/dist/core/schemas/base/envelope.schema.js +11 -0
- package/dist/core/schemas/base/index.d.ts +3 -0
- package/dist/core/schemas/base/index.js +19 -0
- package/dist/core/schemas/base/request.type.d.ts +4 -0
- package/dist/core/schemas/base/request.type.js +2 -0
- package/dist/core/schemas/base/response.type.d.ts +15 -0
- package/dist/core/schemas/base/response.type.js +2 -0
- package/dist/core/schemas/checkout/checkout-callback.schema.d.ts +241 -0
- package/dist/core/schemas/checkout/checkout-callback.schema.js +91 -0
- package/dist/core/schemas/checkout/checkout-request.schema.d.ts +421 -0
- package/dist/core/schemas/checkout/checkout-request.schema.js +70 -0
- package/dist/core/schemas/checkout/index.d.ts +2 -0
- package/dist/core/schemas/checkout/index.js +18 -0
- package/dist/core/schemas/common/detail-addenda.schema.d.ts +11 -0
- package/dist/core/schemas/common/detail-addenda.schema.js +13 -0
- package/dist/core/schemas/common/enums/action.schema.d.ts +12 -0
- package/dist/core/schemas/common/enums/action.schema.js +17 -0
- package/dist/core/schemas/common/enums/bonus-type.schema.d.ts +8 -0
- package/dist/core/schemas/common/enums/bonus-type.schema.js +10 -0
- package/dist/core/schemas/common/enums/commission-payer.schema.d.ts +6 -0
- package/dist/core/schemas/common/enums/commission-payer.schema.js +5 -0
- package/dist/core/schemas/common/enums/currency.schema.d.ts +7 -0
- package/dist/core/schemas/common/enums/currency.schema.js +8 -0
- package/dist/core/schemas/common/enums/error-code.schema.d.ts +117 -0
- package/dist/core/schemas/common/enums/error-code.schema.js +122 -0
- package/dist/core/schemas/common/enums/index.d.ts +13 -0
- package/dist/core/schemas/common/enums/index.js +29 -0
- package/dist/core/schemas/common/enums/language.schema.d.ts +6 -0
- package/dist/core/schemas/common/enums/language.schema.js +5 -0
- package/dist/core/schemas/common/enums/mpi-eci.schema.d.ts +3 -0
- package/dist/core/schemas/common/enums/mpi-eci.schema.js +9 -0
- package/dist/core/schemas/common/enums/payment-status.schema.d.ts +81 -0
- package/dist/core/schemas/common/enums/payment-status.schema.js +48 -0
- package/dist/core/schemas/common/enums/paytype.schema.d.ts +14 -0
- package/dist/core/schemas/common/enums/paytype.schema.js +16 -0
- package/dist/core/schemas/common/enums/request-result.schema.d.ts +6 -0
- package/dist/core/schemas/common/enums/request-result.schema.js +5 -0
- package/dist/core/schemas/common/enums/subscribe-period.schema.d.ts +8 -0
- package/dist/core/schemas/common/enums/subscribe-period.schema.js +10 -0
- package/dist/core/schemas/common/enums/unit.schema.d.ts +55 -0
- package/dist/core/schemas/common/enums/unit.schema.js +58 -0
- package/dist/core/schemas/common/enums/version.schema.d.ts +2 -0
- package/dist/core/schemas/common/enums/version.schema.js +8 -0
- package/dist/core/schemas/common/fiscal-data.schema.d.ts +86 -0
- package/dist/core/schemas/common/fiscal-data.schema.js +41 -0
- package/dist/core/schemas/common/index.d.ts +3 -0
- package/dist/core/schemas/common/index.js +19 -0
- package/dist/core/schemas/common/split-rule.schema.d.ts +36 -0
- package/dist/core/schemas/common/split-rule.schema.js +13 -0
- package/dist/core/schemas/error/error-response.schema.d.ts +121 -0
- package/dist/core/schemas/error/error-response.schema.js +10 -0
- package/dist/core/schemas/error/error.type.d.ts +6 -0
- package/dist/core/schemas/error/error.type.js +2 -0
- package/dist/core/schemas/error/index.d.ts +3 -0
- package/dist/core/schemas/error/index.js +19 -0
- package/dist/core/schemas/payment-status/index.d.ts +2 -0
- package/dist/core/schemas/payment-status/index.js +18 -0
- package/dist/core/schemas/payment-status/payment-status-request.schema.d.ts +43 -0
- package/dist/core/schemas/payment-status/payment-status-request.schema.js +23 -0
- package/dist/core/schemas/payment-status/payment-status-response.schema.d.ts +213 -0
- package/dist/core/schemas/payment-status/payment-status-response.schema.js +85 -0
- package/dist/core/types/documented/checkout.callback.d.ts +250 -0
- package/dist/core/types/documented/checkout.callback.js +2 -0
- package/dist/core/types/documented/checkout.request.d.ts +236 -0
- package/dist/core/types/documented/checkout.request.js +2 -0
- package/dist/core/types/documented/detail-addenda.d.ts +33 -0
- package/dist/core/types/documented/detail-addenda.js +2 -0
- package/dist/core/types/documented/envelope.d.ts +15 -0
- package/dist/core/types/documented/envelope.js +2 -0
- package/dist/core/types/documented/fiscal-data.d.ts +80 -0
- package/dist/core/types/documented/fiscal-data.js +2 -0
- package/dist/core/types/documented/payment-status.request.d.ts +23 -0
- package/dist/core/types/documented/payment-status.request.js +2 -0
- package/dist/core/types/documented/payment-status.response.d.ts +225 -0
- package/dist/core/types/documented/payment-status.response.js +2 -0
- package/dist/core/types/documented/split-rule.d.ts +29 -0
- package/dist/core/types/documented/split-rule.js +2 -0
- package/dist/core/types/documented/types.d.ts +287 -0
- package/dist/core/types/documented/types.js +199 -0
- package/dist/core/types/payloads.d.ts +158 -0
- package/dist/core/types/payloads.js +2 -0
- package/dist/core/types/undocumented/checkout.callback.d.ts +61 -0
- package/dist/core/types/undocumented/checkout.callback.js +2 -0
- package/dist/core/types/undocumented/checkout.request.d.ts +39 -0
- package/dist/core/types/undocumented/checkout.request.js +2 -0
- package/dist/core/types/undocumented/detail-addenda.d.ts +9 -0
- package/dist/core/types/undocumented/detail-addenda.js +2 -0
- package/dist/core/types/undocumented/envelope.d.ts +4 -0
- package/dist/core/types/undocumented/envelope.js +2 -0
- package/dist/core/types/undocumented/fiscal-data.d.ts +23 -0
- package/dist/core/types/undocumented/fiscal-data.js +2 -0
- package/dist/core/types/undocumented/payment-status.request.d.ts +6 -0
- package/dist/core/types/undocumented/payment-status.request.js +2 -0
- package/dist/core/types/undocumented/payment-status.response.d.ts +54 -0
- package/dist/core/types/undocumented/payment-status.response.js +2 -0
- package/dist/core/types/undocumented/split-rule.d.ts +9 -0
- package/dist/core/types/undocumented/split-rule.js +2 -0
- package/dist/core/types/undocumented/types.d.ts +181 -0
- package/dist/core/types/undocumented/types.js +160 -0
- package/dist/core/utils/index.d.ts +2 -0
- package/dist/core/utils/index.js +18 -0
- package/dist/core/utils/is-success.util.d.ts +5 -0
- package/dist/core/utils/is-success.util.js +6 -0
- package/dist/core/utils/parse-boolean.d.ts +2 -0
- package/dist/core/utils/parse-boolean.js +7 -0
- package/dist/core/utils/parse-date.d.ts +1 -0
- package/dist/core/utils/parse-date.js +10 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +21 -0
- package/dist/nest/constants/index.d.ts +1 -0
- package/dist/nest/constants/index.js +17 -0
- package/dist/nest/constants/liqpay.constants.d.ts +1 -0
- package/dist/nest/constants/liqpay.constants.js +4 -0
- package/dist/nest/index.d.ts +3 -0
- package/dist/nest/index.js +19 -0
- package/dist/nest/interfaces/index.d.ts +2 -0
- package/dist/nest/interfaces/index.js +18 -0
- package/dist/nest/interfaces/liqpay-async-options.interface.d.ts +7 -0
- package/dist/nest/interfaces/liqpay-async-options.interface.js +2 -0
- package/dist/nest/interfaces/liqpay-options.interface.d.ts +25 -0
- package/dist/nest/interfaces/liqpay-options.interface.js +2 -0
- package/dist/nest/liqpay.module.d.ts +6 -0
- package/dist/nest/liqpay.module.js +37 -0
- package/dist/nest/liqpay.providers.d.ts +4 -0
- package/dist/nest/liqpay.providers.js +32 -0
- package/dist/nest/liqpay.service.d.ts +66 -0
- package/dist/nest/liqpay.service.js +57 -0
- package/package.json +57 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { LiqPayAction, LiqPayCurrency, LiqPayMpiEci, LiqPayPaymentStatus, LiqPayPaytype } from './types';
|
|
2
|
+
export interface LiqPayCheckoutCallback {
|
|
3
|
+
acq_id: number;
|
|
4
|
+
action: LiqPayAction;
|
|
5
|
+
agent_commission: number;
|
|
6
|
+
amount: number;
|
|
7
|
+
amount_bonus: number;
|
|
8
|
+
amount_credit: number;
|
|
9
|
+
amount_debit: number;
|
|
10
|
+
authcode_credit: string;
|
|
11
|
+
authcode_debit: string;
|
|
12
|
+
card_token: string;
|
|
13
|
+
commission_credit: number;
|
|
14
|
+
commission_debit: number;
|
|
15
|
+
completion_date: Date;
|
|
16
|
+
create_date: Date;
|
|
17
|
+
currency: LiqPayCurrency;
|
|
18
|
+
currency_credit: LiqPayCurrency;
|
|
19
|
+
currency_debit: LiqPayCurrency;
|
|
20
|
+
customer: string;
|
|
21
|
+
description: string;
|
|
22
|
+
end_date: Date;
|
|
23
|
+
err_code: string;
|
|
24
|
+
err_description: string;
|
|
25
|
+
info: string;
|
|
26
|
+
ip: string;
|
|
27
|
+
is_3ds: boolean;
|
|
28
|
+
liqpay_order_id: string;
|
|
29
|
+
mpi_eci: LiqPayMpiEci;
|
|
30
|
+
order_id: string;
|
|
31
|
+
payment_id: number;
|
|
32
|
+
paytype: LiqPayPaytype;
|
|
33
|
+
public_key: string;
|
|
34
|
+
receiver_commission: number;
|
|
35
|
+
redirect_to: string;
|
|
36
|
+
refund_date_last: Date;
|
|
37
|
+
rrn_credit: string;
|
|
38
|
+
rrn_debit: string;
|
|
39
|
+
sender_bonus: number;
|
|
40
|
+
sender_card_bank: string;
|
|
41
|
+
sender_card_country: string;
|
|
42
|
+
sender_card_mask2: string;
|
|
43
|
+
sender_iban: string;
|
|
44
|
+
sender_card_type: string;
|
|
45
|
+
sender_commission: number;
|
|
46
|
+
sender_first_name: string;
|
|
47
|
+
sender_last_name: string;
|
|
48
|
+
sender_phone: string;
|
|
49
|
+
status: LiqPayPaymentStatus;
|
|
50
|
+
wait_reserve_status?: boolean;
|
|
51
|
+
token: string;
|
|
52
|
+
type: string;
|
|
53
|
+
version: 7;
|
|
54
|
+
err_erc: string;
|
|
55
|
+
product_category: string;
|
|
56
|
+
product_description: string;
|
|
57
|
+
product_name: string;
|
|
58
|
+
product_url: string;
|
|
59
|
+
refund_amount: number;
|
|
60
|
+
verifycode?: string;
|
|
61
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LiqPayDetailAddenda } from './detail-addenda';
|
|
2
|
+
import { LiqPayFiscalData } from './fiscal-data';
|
|
3
|
+
import { LiqPaySplitRule } from './split-rule';
|
|
4
|
+
import { LiqPayAction, LiqPayCurrency, LiqPayLanguage, LiqPayPaytype, LiqPaySubscribePeriodicity } from './types';
|
|
5
|
+
export interface LiqPayCheckoutRequest {
|
|
6
|
+
version: 7;
|
|
7
|
+
public_key: string;
|
|
8
|
+
action: LiqPayAction;
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: LiqPayCurrency;
|
|
11
|
+
description: string;
|
|
12
|
+
order_id: string;
|
|
13
|
+
expired_date?: string;
|
|
14
|
+
language?: LiqPayLanguage;
|
|
15
|
+
paytypes?: LiqPayPaytype[];
|
|
16
|
+
result_url?: string;
|
|
17
|
+
server_url?: string;
|
|
18
|
+
sender_country_code?: string;
|
|
19
|
+
sender_first_name?: string;
|
|
20
|
+
sender_last_name?: string;
|
|
21
|
+
sender_postal_code?: string;
|
|
22
|
+
sender_address?: string;
|
|
23
|
+
sender_city?: string;
|
|
24
|
+
subscribe?: '1';
|
|
25
|
+
subscribe_date_start?: string;
|
|
26
|
+
subscribe_periodicity?: LiqPaySubscribePeriodicity;
|
|
27
|
+
customer?: string;
|
|
28
|
+
recurringbytoken?: '1';
|
|
29
|
+
customer_user_id?: string;
|
|
30
|
+
product_category?: string;
|
|
31
|
+
product_description?: string;
|
|
32
|
+
product_name?: string;
|
|
33
|
+
product_url?: string;
|
|
34
|
+
rro_info?: LiqPayFiscalData;
|
|
35
|
+
split_rules?: LiqPaySplitRule[];
|
|
36
|
+
info?: string;
|
|
37
|
+
verifycode?: 'Y';
|
|
38
|
+
dae?: LiqPayDetailAddenda;
|
|
39
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LiqPayFiscalTax, LiqPayUnit } from './types';
|
|
2
|
+
export interface LiqPayFiscalData {
|
|
3
|
+
items?: LiqPayFiscalProductById[] | LiqPayFiscalProductByApi[];
|
|
4
|
+
delivery_emails?: string[];
|
|
5
|
+
}
|
|
6
|
+
export interface LiqPayFiscalProductById {
|
|
7
|
+
amount: number;
|
|
8
|
+
cost: number;
|
|
9
|
+
id: number;
|
|
10
|
+
price: number;
|
|
11
|
+
}
|
|
12
|
+
export interface LiqPayFiscalProductByApi {
|
|
13
|
+
amount: number;
|
|
14
|
+
cost: number;
|
|
15
|
+
price: number;
|
|
16
|
+
categoryname: string;
|
|
17
|
+
name: string;
|
|
18
|
+
unitcode: LiqPayUnit;
|
|
19
|
+
barcode?: string;
|
|
20
|
+
codifier?: string;
|
|
21
|
+
vndcode?: string;
|
|
22
|
+
taxs?: LiqPayFiscalTax[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LiqPayAction, LiqPayBonusType, LiqPayCurrency, LiqPayLanguage, LiqPayMpiEci, LiqPayPaymentStatus, LiqPayPaytype, LiqPayRequestResult } from './types';
|
|
2
|
+
export interface LiqPayPaymentStatusResponse {
|
|
3
|
+
version: 7;
|
|
4
|
+
public_key: string;
|
|
5
|
+
action: LiqPayAction;
|
|
6
|
+
acq_id: number;
|
|
7
|
+
agent_commission: number;
|
|
8
|
+
amount: number;
|
|
9
|
+
amount_bonus: number;
|
|
10
|
+
amount_credit: number;
|
|
11
|
+
amount_debit: number;
|
|
12
|
+
authcode_credit: string;
|
|
13
|
+
authcode_debit: string;
|
|
14
|
+
bonus_procent: number;
|
|
15
|
+
bonus_type: LiqPayBonusType;
|
|
16
|
+
card_token: string;
|
|
17
|
+
commission_credit: number;
|
|
18
|
+
commission_debit: number;
|
|
19
|
+
confirm_phone: string;
|
|
20
|
+
create_date: string;
|
|
21
|
+
currency: LiqPayCurrency;
|
|
22
|
+
currency_credit: LiqPayCurrency;
|
|
23
|
+
currency_debit: LiqPayCurrency;
|
|
24
|
+
description: string;
|
|
25
|
+
end_date: string;
|
|
26
|
+
info: string;
|
|
27
|
+
ip: string;
|
|
28
|
+
is_3ds: boolean;
|
|
29
|
+
language: LiqPayLanguage;
|
|
30
|
+
liqpay_order_id: string;
|
|
31
|
+
moment_part: boolean;
|
|
32
|
+
mpi_eci: LiqPayMpiEci;
|
|
33
|
+
order_id: string;
|
|
34
|
+
payment_id: number;
|
|
35
|
+
paytype: LiqPayPaytype;
|
|
36
|
+
receiver_commission: number;
|
|
37
|
+
result: LiqPayRequestResult;
|
|
38
|
+
rrn_credit: string;
|
|
39
|
+
rrn_debit: string;
|
|
40
|
+
sender_bonus: number;
|
|
41
|
+
sender_card_bank: string;
|
|
42
|
+
sender_card_country: string;
|
|
43
|
+
sender_card_mask2: string;
|
|
44
|
+
sender_iban: string;
|
|
45
|
+
sender_card_type: string;
|
|
46
|
+
sender_commission: number;
|
|
47
|
+
sender_first_name: string;
|
|
48
|
+
sender_last_name: string;
|
|
49
|
+
sender_phone: string;
|
|
50
|
+
status: LiqPayPaymentStatus;
|
|
51
|
+
wait_reserve_status?: boolean;
|
|
52
|
+
transaction_id: number;
|
|
53
|
+
type: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LiqPayFiscalData } from '../../schemas/common';
|
|
2
|
+
import { LiqPayCommisionPayer } from './types';
|
|
3
|
+
export interface LiqPaySplitRule {
|
|
4
|
+
public_key: string;
|
|
5
|
+
amount: number;
|
|
6
|
+
commission_payer: LiqPayCommisionPayer;
|
|
7
|
+
server_url: string;
|
|
8
|
+
rro_info?: LiqPayFiscalData;
|
|
9
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export declare const LiqPayTaxRates: {
|
|
2
|
+
readonly NO_VAT: {
|
|
3
|
+
readonly letter: "А";
|
|
4
|
+
readonly name: "Без ПДВ 0%";
|
|
5
|
+
readonly type: 0;
|
|
6
|
+
readonly prc: 0;
|
|
7
|
+
};
|
|
8
|
+
readonly VAT20: {
|
|
9
|
+
readonly letter: "Б";
|
|
10
|
+
readonly name: "ПДВ 20%";
|
|
11
|
+
readonly type: 0;
|
|
12
|
+
readonly prc: 20;
|
|
13
|
+
};
|
|
14
|
+
readonly VAT7: {
|
|
15
|
+
readonly letter: "В";
|
|
16
|
+
readonly name: "ПДВ 7%";
|
|
17
|
+
readonly type: 0;
|
|
18
|
+
readonly prc: 7;
|
|
19
|
+
};
|
|
20
|
+
readonly EXCISE5: {
|
|
21
|
+
readonly letter: "Г";
|
|
22
|
+
readonly name: "АКЦИЗ 5%";
|
|
23
|
+
readonly type: 1;
|
|
24
|
+
readonly prc: 5;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type LiqPayTaxRateKey = keyof typeof LiqPayTaxRates;
|
|
28
|
+
export type LiqPayFiscalTax = (typeof LiqPayTaxRates)[LiqPayTaxRateKey];
|
|
29
|
+
export declare enum LiqPayActionEnum {
|
|
30
|
+
PAY = "pay",
|
|
31
|
+
HOLD = "hold",
|
|
32
|
+
PAYSPLIT = "paysplit",
|
|
33
|
+
SUBSCRIBE = "subscribe",
|
|
34
|
+
PAYDONATE = "paydonate",
|
|
35
|
+
AUTH = "auth",
|
|
36
|
+
REGULAR = "regular",
|
|
37
|
+
STATUS = "status"
|
|
38
|
+
}
|
|
39
|
+
export type LiqPayAction = `${LiqPayActionEnum}`;
|
|
40
|
+
export declare enum LiqPayCurrencyEnum {
|
|
41
|
+
USD = "USD",
|
|
42
|
+
EUR = "EUR",
|
|
43
|
+
UAH = "UAH"
|
|
44
|
+
}
|
|
45
|
+
export type LiqPayCurrency = `${LiqPayCurrencyEnum}`;
|
|
46
|
+
export declare enum LiqPayPaytypeEnum {
|
|
47
|
+
APAY = "apay",
|
|
48
|
+
GPAY = "gpay",
|
|
49
|
+
CARD = "card",
|
|
50
|
+
PRIVAT24 = "privat24",
|
|
51
|
+
MASTERPASS = "masterpass",
|
|
52
|
+
MOMENT_PART = "moment_part",
|
|
53
|
+
PAYPART = "paypart",
|
|
54
|
+
CASH = "cash",
|
|
55
|
+
INVOICE = "invoice",
|
|
56
|
+
QR = "qr"
|
|
57
|
+
}
|
|
58
|
+
export type LiqPayPaytype = `${LiqPayPaytypeEnum}`;
|
|
59
|
+
export type LiqPayMpiEci = 5 | 6 | 7;
|
|
60
|
+
export declare enum LiqPayResolvedPaymentStatusEnum {
|
|
61
|
+
ERROR = "error",
|
|
62
|
+
FAILURE = "failure",
|
|
63
|
+
REVERSED = "reversed",
|
|
64
|
+
SUBSCRIBED = "subscribed",
|
|
65
|
+
SUCCESS = "success",
|
|
66
|
+
UNSUBSCRIBED = "unsubscribed"
|
|
67
|
+
}
|
|
68
|
+
export type LiqPayResolvedPaymentStatus = `${LiqPayResolvedPaymentStatusEnum}`;
|
|
69
|
+
export declare enum LiqPayUnresolvedPaymentStatusEnum {
|
|
70
|
+
DS3_VERIFY = "3ds_verify",
|
|
71
|
+
CAPTCHA_VERIFY = "captcha_verify",
|
|
72
|
+
CVV_VERIFY = "cvv_verify",
|
|
73
|
+
IVR_VERIFY = "ivr_verify",
|
|
74
|
+
OTP_VERIFY = "otp_verify",
|
|
75
|
+
PASSWORD_VERIFY = "password_verify",
|
|
76
|
+
PHONE_VERIFY = "phone_verify",
|
|
77
|
+
PIN_VERIFY = "pin_verify",
|
|
78
|
+
RECEIVER_VERIFY = "receiver_verify",
|
|
79
|
+
SENDER_VERIFY = "sender_verify",
|
|
80
|
+
SENDERAPP_VERIFY = "senderapp_verify",
|
|
81
|
+
WAIT_QR = "wait_qr",
|
|
82
|
+
WAIT_SENDER = "wait_sender",
|
|
83
|
+
P24_VERIFY = "p24_verify",
|
|
84
|
+
MP_VERIFY = "mp_verify"
|
|
85
|
+
}
|
|
86
|
+
export type LiqPayUnresolvedPaymentStatus = `${LiqPayUnresolvedPaymentStatusEnum}`;
|
|
87
|
+
export declare enum LiqPayOtherPaymentStatusEnum {
|
|
88
|
+
CASH_WAIT = "cash_wait",
|
|
89
|
+
HOLD_WAIT = "hold_wait",
|
|
90
|
+
INVOICE_WAIT = "invoice_wait",
|
|
91
|
+
PREPARED = "prepared",
|
|
92
|
+
PROCESSING = "processing",
|
|
93
|
+
WAIT_ACCEPT = "wait_accept",
|
|
94
|
+
WAIT_CARD = "wait_card",
|
|
95
|
+
WAIT_COMPENSATION = "wait_compensation",
|
|
96
|
+
WAIT_LC = "wait_lc",
|
|
97
|
+
WAIT_RESERVE = "wait_reserve",
|
|
98
|
+
WAIT_SECURE = "wait_secure",
|
|
99
|
+
TRY_AGAIN = "try_again"
|
|
100
|
+
}
|
|
101
|
+
export type LiqPayOtherPaymentStatus = `${LiqPayOtherPaymentStatusEnum}`;
|
|
102
|
+
export type LiqPayPaymentStatus = LiqPayResolvedPaymentStatus | LiqPayUnresolvedPaymentStatus | LiqPayOtherPaymentStatus;
|
|
103
|
+
export declare enum LiqPayCommisionPayerEnum {
|
|
104
|
+
SENDER = "sender",
|
|
105
|
+
RECEIVER = "receiver"
|
|
106
|
+
}
|
|
107
|
+
export type LiqPayCommisionPayer = `${LiqPayCommisionPayerEnum}`;
|
|
108
|
+
export declare enum LiqPayLanguageEnum {
|
|
109
|
+
UK = "uk",
|
|
110
|
+
EN = "en"
|
|
111
|
+
}
|
|
112
|
+
export type LiqPayLanguage = `${LiqPayLanguageEnum}`;
|
|
113
|
+
export declare enum LiqPaySubscribePeriodicityEnum {
|
|
114
|
+
DAY = "day",
|
|
115
|
+
WEEK = "week",
|
|
116
|
+
MONTH = "month",
|
|
117
|
+
YEAR = "year"
|
|
118
|
+
}
|
|
119
|
+
export type LiqPaySubscribePeriodicity = `${LiqPaySubscribePeriodicityEnum}`;
|
|
120
|
+
export declare enum LiqPayBonusTypeEnum {
|
|
121
|
+
BONUSPLUS = "bonusplus",
|
|
122
|
+
DISCOUNT_CLUB = "discount_club",
|
|
123
|
+
PERSONAL = "personal",
|
|
124
|
+
PROMO = "promo"
|
|
125
|
+
}
|
|
126
|
+
export type LiqPayBonusType = `${LiqPayBonusTypeEnum}`;
|
|
127
|
+
export declare enum LiqPayRequestResultEnum {
|
|
128
|
+
OK = "ok",
|
|
129
|
+
ERROR = "error"
|
|
130
|
+
}
|
|
131
|
+
export type LiqPayRequestResult = `${LiqPayRequestResultEnum}`;
|
|
132
|
+
export declare enum LiqPayUnitEnum {
|
|
133
|
+
meter = "10001",
|
|
134
|
+
square_meter = "10002",
|
|
135
|
+
cubic_meter = "10003",
|
|
136
|
+
kilometer = "10004",
|
|
137
|
+
square_kilometer = "10005",
|
|
138
|
+
cubic_kilometer = "10006",
|
|
139
|
+
decimeter = "10007",
|
|
140
|
+
square_decimeter = "10008",
|
|
141
|
+
cubic_decimeter = "10009",
|
|
142
|
+
centimeter = "10010",
|
|
143
|
+
square_centimeter = "10011",
|
|
144
|
+
cubic_centimeter = "10012",
|
|
145
|
+
hectare = "10013",
|
|
146
|
+
liter = "10014",
|
|
147
|
+
kilogram = "10015",
|
|
148
|
+
gram = "10016",
|
|
149
|
+
metric_ton = "10017",
|
|
150
|
+
centner = "10018",
|
|
151
|
+
kilowatt_hour = "10019",
|
|
152
|
+
kilowatt = "10020",
|
|
153
|
+
centner_per_hectare = "10021",
|
|
154
|
+
head = "10022",
|
|
155
|
+
notebook = "10023",
|
|
156
|
+
book = "10024",
|
|
157
|
+
copy = "10025",
|
|
158
|
+
square_meter_residential = "10026",
|
|
159
|
+
piece = "10027",
|
|
160
|
+
box = "10028",
|
|
161
|
+
cistern = "10029",
|
|
162
|
+
crate = "10030",
|
|
163
|
+
package = "10031",
|
|
164
|
+
pack = "10032",
|
|
165
|
+
roll = "10033",
|
|
166
|
+
hryvnia = "10034",
|
|
167
|
+
kilometer_per_hour = "10035",
|
|
168
|
+
running_meter = "10036",
|
|
169
|
+
product = "10037",
|
|
170
|
+
set = "10038",
|
|
171
|
+
day = "10039",
|
|
172
|
+
service = "10040",
|
|
173
|
+
hour = "10041",
|
|
174
|
+
month = "10042",
|
|
175
|
+
bottle = "10043",
|
|
176
|
+
para = "10044",
|
|
177
|
+
portion = "10045",
|
|
178
|
+
minute = "10046",
|
|
179
|
+
milliliter = "10047"
|
|
180
|
+
}
|
|
181
|
+
export type LiqPayUnit = `${LiqPayUnitEnum}`;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiqPayUnitEnum = exports.LiqPayRequestResultEnum = exports.LiqPayBonusTypeEnum = exports.LiqPaySubscribePeriodicityEnum = exports.LiqPayLanguageEnum = exports.LiqPayCommisionPayerEnum = exports.LiqPayOtherPaymentStatusEnum = exports.LiqPayUnresolvedPaymentStatusEnum = exports.LiqPayResolvedPaymentStatusEnum = exports.LiqPayPaytypeEnum = exports.LiqPayCurrencyEnum = exports.LiqPayActionEnum = exports.LiqPayTaxRates = void 0;
|
|
4
|
+
exports.LiqPayTaxRates = {
|
|
5
|
+
NO_VAT: { letter: 'А', name: 'Без ПДВ 0%', type: 0, prc: 0 },
|
|
6
|
+
VAT20: { letter: 'Б', name: 'ПДВ 20%', type: 0, prc: 20 },
|
|
7
|
+
VAT7: { letter: 'В', name: 'ПДВ 7%', type: 0, prc: 7 },
|
|
8
|
+
EXCISE5: { letter: 'Г', name: 'АКЦИЗ 5%', type: 1, prc: 5 },
|
|
9
|
+
};
|
|
10
|
+
var LiqPayActionEnum;
|
|
11
|
+
(function (LiqPayActionEnum) {
|
|
12
|
+
LiqPayActionEnum["PAY"] = "pay";
|
|
13
|
+
LiqPayActionEnum["HOLD"] = "hold";
|
|
14
|
+
LiqPayActionEnum["PAYSPLIT"] = "paysplit";
|
|
15
|
+
LiqPayActionEnum["SUBSCRIBE"] = "subscribe";
|
|
16
|
+
LiqPayActionEnum["PAYDONATE"] = "paydonate";
|
|
17
|
+
LiqPayActionEnum["AUTH"] = "auth";
|
|
18
|
+
LiqPayActionEnum["REGULAR"] = "regular";
|
|
19
|
+
LiqPayActionEnum["STATUS"] = "status";
|
|
20
|
+
})(LiqPayActionEnum || (exports.LiqPayActionEnum = LiqPayActionEnum = {}));
|
|
21
|
+
var LiqPayCurrencyEnum;
|
|
22
|
+
(function (LiqPayCurrencyEnum) {
|
|
23
|
+
LiqPayCurrencyEnum["USD"] = "USD";
|
|
24
|
+
LiqPayCurrencyEnum["EUR"] = "EUR";
|
|
25
|
+
LiqPayCurrencyEnum["UAH"] = "UAH";
|
|
26
|
+
})(LiqPayCurrencyEnum || (exports.LiqPayCurrencyEnum = LiqPayCurrencyEnum = {}));
|
|
27
|
+
var LiqPayPaytypeEnum;
|
|
28
|
+
(function (LiqPayPaytypeEnum) {
|
|
29
|
+
LiqPayPaytypeEnum["APAY"] = "apay";
|
|
30
|
+
LiqPayPaytypeEnum["GPAY"] = "gpay";
|
|
31
|
+
LiqPayPaytypeEnum["CARD"] = "card";
|
|
32
|
+
LiqPayPaytypeEnum["PRIVAT24"] = "privat24";
|
|
33
|
+
LiqPayPaytypeEnum["MASTERPASS"] = "masterpass";
|
|
34
|
+
LiqPayPaytypeEnum["MOMENT_PART"] = "moment_part";
|
|
35
|
+
LiqPayPaytypeEnum["PAYPART"] = "paypart";
|
|
36
|
+
LiqPayPaytypeEnum["CASH"] = "cash";
|
|
37
|
+
LiqPayPaytypeEnum["INVOICE"] = "invoice";
|
|
38
|
+
LiqPayPaytypeEnum["QR"] = "qr";
|
|
39
|
+
})(LiqPayPaytypeEnum || (exports.LiqPayPaytypeEnum = LiqPayPaytypeEnum = {}));
|
|
40
|
+
var LiqPayResolvedPaymentStatusEnum;
|
|
41
|
+
(function (LiqPayResolvedPaymentStatusEnum) {
|
|
42
|
+
LiqPayResolvedPaymentStatusEnum["ERROR"] = "error";
|
|
43
|
+
LiqPayResolvedPaymentStatusEnum["FAILURE"] = "failure";
|
|
44
|
+
LiqPayResolvedPaymentStatusEnum["REVERSED"] = "reversed";
|
|
45
|
+
LiqPayResolvedPaymentStatusEnum["SUBSCRIBED"] = "subscribed";
|
|
46
|
+
LiqPayResolvedPaymentStatusEnum["SUCCESS"] = "success";
|
|
47
|
+
LiqPayResolvedPaymentStatusEnum["UNSUBSCRIBED"] = "unsubscribed";
|
|
48
|
+
})(LiqPayResolvedPaymentStatusEnum || (exports.LiqPayResolvedPaymentStatusEnum = LiqPayResolvedPaymentStatusEnum = {}));
|
|
49
|
+
var LiqPayUnresolvedPaymentStatusEnum;
|
|
50
|
+
(function (LiqPayUnresolvedPaymentStatusEnum) {
|
|
51
|
+
LiqPayUnresolvedPaymentStatusEnum["DS3_VERIFY"] = "3ds_verify";
|
|
52
|
+
LiqPayUnresolvedPaymentStatusEnum["CAPTCHA_VERIFY"] = "captcha_verify";
|
|
53
|
+
LiqPayUnresolvedPaymentStatusEnum["CVV_VERIFY"] = "cvv_verify";
|
|
54
|
+
LiqPayUnresolvedPaymentStatusEnum["IVR_VERIFY"] = "ivr_verify";
|
|
55
|
+
LiqPayUnresolvedPaymentStatusEnum["OTP_VERIFY"] = "otp_verify";
|
|
56
|
+
LiqPayUnresolvedPaymentStatusEnum["PASSWORD_VERIFY"] = "password_verify";
|
|
57
|
+
LiqPayUnresolvedPaymentStatusEnum["PHONE_VERIFY"] = "phone_verify";
|
|
58
|
+
LiqPayUnresolvedPaymentStatusEnum["PIN_VERIFY"] = "pin_verify";
|
|
59
|
+
LiqPayUnresolvedPaymentStatusEnum["RECEIVER_VERIFY"] = "receiver_verify";
|
|
60
|
+
LiqPayUnresolvedPaymentStatusEnum["SENDER_VERIFY"] = "sender_verify";
|
|
61
|
+
LiqPayUnresolvedPaymentStatusEnum["SENDERAPP_VERIFY"] = "senderapp_verify";
|
|
62
|
+
LiqPayUnresolvedPaymentStatusEnum["WAIT_QR"] = "wait_qr";
|
|
63
|
+
LiqPayUnresolvedPaymentStatusEnum["WAIT_SENDER"] = "wait_sender";
|
|
64
|
+
LiqPayUnresolvedPaymentStatusEnum["P24_VERIFY"] = "p24_verify";
|
|
65
|
+
LiqPayUnresolvedPaymentStatusEnum["MP_VERIFY"] = "mp_verify";
|
|
66
|
+
})(LiqPayUnresolvedPaymentStatusEnum || (exports.LiqPayUnresolvedPaymentStatusEnum = LiqPayUnresolvedPaymentStatusEnum = {}));
|
|
67
|
+
var LiqPayOtherPaymentStatusEnum;
|
|
68
|
+
(function (LiqPayOtherPaymentStatusEnum) {
|
|
69
|
+
LiqPayOtherPaymentStatusEnum["CASH_WAIT"] = "cash_wait";
|
|
70
|
+
LiqPayOtherPaymentStatusEnum["HOLD_WAIT"] = "hold_wait";
|
|
71
|
+
LiqPayOtherPaymentStatusEnum["INVOICE_WAIT"] = "invoice_wait";
|
|
72
|
+
LiqPayOtherPaymentStatusEnum["PREPARED"] = "prepared";
|
|
73
|
+
LiqPayOtherPaymentStatusEnum["PROCESSING"] = "processing";
|
|
74
|
+
LiqPayOtherPaymentStatusEnum["WAIT_ACCEPT"] = "wait_accept";
|
|
75
|
+
LiqPayOtherPaymentStatusEnum["WAIT_CARD"] = "wait_card";
|
|
76
|
+
LiqPayOtherPaymentStatusEnum["WAIT_COMPENSATION"] = "wait_compensation";
|
|
77
|
+
LiqPayOtherPaymentStatusEnum["WAIT_LC"] = "wait_lc";
|
|
78
|
+
LiqPayOtherPaymentStatusEnum["WAIT_RESERVE"] = "wait_reserve";
|
|
79
|
+
LiqPayOtherPaymentStatusEnum["WAIT_SECURE"] = "wait_secure";
|
|
80
|
+
LiqPayOtherPaymentStatusEnum["TRY_AGAIN"] = "try_again";
|
|
81
|
+
})(LiqPayOtherPaymentStatusEnum || (exports.LiqPayOtherPaymentStatusEnum = LiqPayOtherPaymentStatusEnum = {}));
|
|
82
|
+
var LiqPayCommisionPayerEnum;
|
|
83
|
+
(function (LiqPayCommisionPayerEnum) {
|
|
84
|
+
LiqPayCommisionPayerEnum["SENDER"] = "sender";
|
|
85
|
+
LiqPayCommisionPayerEnum["RECEIVER"] = "receiver";
|
|
86
|
+
})(LiqPayCommisionPayerEnum || (exports.LiqPayCommisionPayerEnum = LiqPayCommisionPayerEnum = {}));
|
|
87
|
+
var LiqPayLanguageEnum;
|
|
88
|
+
(function (LiqPayLanguageEnum) {
|
|
89
|
+
LiqPayLanguageEnum["UK"] = "uk";
|
|
90
|
+
LiqPayLanguageEnum["EN"] = "en";
|
|
91
|
+
})(LiqPayLanguageEnum || (exports.LiqPayLanguageEnum = LiqPayLanguageEnum = {}));
|
|
92
|
+
var LiqPaySubscribePeriodicityEnum;
|
|
93
|
+
(function (LiqPaySubscribePeriodicityEnum) {
|
|
94
|
+
LiqPaySubscribePeriodicityEnum["DAY"] = "day";
|
|
95
|
+
LiqPaySubscribePeriodicityEnum["WEEK"] = "week";
|
|
96
|
+
LiqPaySubscribePeriodicityEnum["MONTH"] = "month";
|
|
97
|
+
LiqPaySubscribePeriodicityEnum["YEAR"] = "year";
|
|
98
|
+
})(LiqPaySubscribePeriodicityEnum || (exports.LiqPaySubscribePeriodicityEnum = LiqPaySubscribePeriodicityEnum = {}));
|
|
99
|
+
var LiqPayBonusTypeEnum;
|
|
100
|
+
(function (LiqPayBonusTypeEnum) {
|
|
101
|
+
LiqPayBonusTypeEnum["BONUSPLUS"] = "bonusplus";
|
|
102
|
+
LiqPayBonusTypeEnum["DISCOUNT_CLUB"] = "discount_club";
|
|
103
|
+
LiqPayBonusTypeEnum["PERSONAL"] = "personal";
|
|
104
|
+
LiqPayBonusTypeEnum["PROMO"] = "promo";
|
|
105
|
+
})(LiqPayBonusTypeEnum || (exports.LiqPayBonusTypeEnum = LiqPayBonusTypeEnum = {}));
|
|
106
|
+
var LiqPayRequestResultEnum;
|
|
107
|
+
(function (LiqPayRequestResultEnum) {
|
|
108
|
+
LiqPayRequestResultEnum["OK"] = "ok";
|
|
109
|
+
LiqPayRequestResultEnum["ERROR"] = "error";
|
|
110
|
+
})(LiqPayRequestResultEnum || (exports.LiqPayRequestResultEnum = LiqPayRequestResultEnum = {}));
|
|
111
|
+
var LiqPayUnitEnum;
|
|
112
|
+
(function (LiqPayUnitEnum) {
|
|
113
|
+
LiqPayUnitEnum["meter"] = "10001";
|
|
114
|
+
LiqPayUnitEnum["square_meter"] = "10002";
|
|
115
|
+
LiqPayUnitEnum["cubic_meter"] = "10003";
|
|
116
|
+
LiqPayUnitEnum["kilometer"] = "10004";
|
|
117
|
+
LiqPayUnitEnum["square_kilometer"] = "10005";
|
|
118
|
+
LiqPayUnitEnum["cubic_kilometer"] = "10006";
|
|
119
|
+
LiqPayUnitEnum["decimeter"] = "10007";
|
|
120
|
+
LiqPayUnitEnum["square_decimeter"] = "10008";
|
|
121
|
+
LiqPayUnitEnum["cubic_decimeter"] = "10009";
|
|
122
|
+
LiqPayUnitEnum["centimeter"] = "10010";
|
|
123
|
+
LiqPayUnitEnum["square_centimeter"] = "10011";
|
|
124
|
+
LiqPayUnitEnum["cubic_centimeter"] = "10012";
|
|
125
|
+
LiqPayUnitEnum["hectare"] = "10013";
|
|
126
|
+
LiqPayUnitEnum["liter"] = "10014";
|
|
127
|
+
LiqPayUnitEnum["kilogram"] = "10015";
|
|
128
|
+
LiqPayUnitEnum["gram"] = "10016";
|
|
129
|
+
LiqPayUnitEnum["metric_ton"] = "10017";
|
|
130
|
+
LiqPayUnitEnum["centner"] = "10018";
|
|
131
|
+
LiqPayUnitEnum["kilowatt_hour"] = "10019";
|
|
132
|
+
LiqPayUnitEnum["kilowatt"] = "10020";
|
|
133
|
+
LiqPayUnitEnum["centner_per_hectare"] = "10021";
|
|
134
|
+
LiqPayUnitEnum["head"] = "10022";
|
|
135
|
+
LiqPayUnitEnum["notebook"] = "10023";
|
|
136
|
+
LiqPayUnitEnum["book"] = "10024";
|
|
137
|
+
LiqPayUnitEnum["copy"] = "10025";
|
|
138
|
+
LiqPayUnitEnum["square_meter_residential"] = "10026";
|
|
139
|
+
LiqPayUnitEnum["piece"] = "10027";
|
|
140
|
+
LiqPayUnitEnum["box"] = "10028";
|
|
141
|
+
LiqPayUnitEnum["cistern"] = "10029";
|
|
142
|
+
LiqPayUnitEnum["crate"] = "10030";
|
|
143
|
+
LiqPayUnitEnum["package"] = "10031";
|
|
144
|
+
LiqPayUnitEnum["pack"] = "10032";
|
|
145
|
+
LiqPayUnitEnum["roll"] = "10033";
|
|
146
|
+
LiqPayUnitEnum["hryvnia"] = "10034";
|
|
147
|
+
LiqPayUnitEnum["kilometer_per_hour"] = "10035";
|
|
148
|
+
LiqPayUnitEnum["running_meter"] = "10036";
|
|
149
|
+
LiqPayUnitEnum["product"] = "10037";
|
|
150
|
+
LiqPayUnitEnum["set"] = "10038";
|
|
151
|
+
LiqPayUnitEnum["day"] = "10039";
|
|
152
|
+
LiqPayUnitEnum["service"] = "10040";
|
|
153
|
+
LiqPayUnitEnum["hour"] = "10041";
|
|
154
|
+
LiqPayUnitEnum["month"] = "10042";
|
|
155
|
+
LiqPayUnitEnum["bottle"] = "10043";
|
|
156
|
+
LiqPayUnitEnum["para"] = "10044";
|
|
157
|
+
LiqPayUnitEnum["portion"] = "10045";
|
|
158
|
+
LiqPayUnitEnum["minute"] = "10046";
|
|
159
|
+
LiqPayUnitEnum["milliliter"] = "10047";
|
|
160
|
+
})(LiqPayUnitEnum || (exports.LiqPayUnitEnum = LiqPayUnitEnum = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./parse-boolean"), exports);
|
|
18
|
+
__exportStar(require("./parse-date"), exports);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseBool = exports.toBoolean = void 0;
|
|
4
|
+
const toBoolean = (value) => typeof value === 'string' ? value.toLowerCase() === 'true' : Boolean(value);
|
|
5
|
+
exports.toBoolean = toBoolean;
|
|
6
|
+
const parseBool = (value) => value !== undefined ? (0, exports.toBoolean)(value) : undefined;
|
|
7
|
+
exports.parseBool = parseBool;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseDate: (value: Date | string | undefined) => Date | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parseDate = void 0;
|
|
4
|
+
const parseDate = (value) => {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
const date = new Date(value);
|
|
8
|
+
return isNaN(date.getTime()) ? undefined : date;
|
|
9
|
+
};
|
|
10
|
+
exports.parseDate = parseDate;
|