liqpay-nestjs 0.2.8 → 0.2.10
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/dist/core/clients/utils.client.js +4 -1
- package/dist/core/types/checkout/checkout-callback.schema.d.ts +15 -15
- package/dist/core/types/checkout/checkout-callback.schema.js +5 -5
- package/dist/core/types/common/enums/mpi-eci.schema.d.ts +5 -1
- package/dist/core/types/common/enums/mpi-eci.schema.js +1 -5
- package/dist/core/types/common/enums/payment-status.schema.d.ts +2 -2
- package/dist/core/types/payment-status/payment-status-response.schema.d.ts +15 -15
- package/dist/core/types/payment-status/payment-status-response.schema.js +5 -5
- package/dist/core/utils/transformers.util.d.ts +1 -1
- package/dist/nest/services/payments.service.d.ts +3 -3
- package/dist/nest/services/webhooks.service.d.ts +3 -3
- package/package.json +1 -1
|
@@ -50,8 +50,11 @@ class LiqPayUtilsClient {
|
|
|
50
50
|
if (error)
|
|
51
51
|
return error;
|
|
52
52
|
const parsed = schema.safeParse(data);
|
|
53
|
-
if (!parsed.success)
|
|
53
|
+
if (!parsed.success) {
|
|
54
|
+
/** testing */
|
|
55
|
+
console.log('PARSED ERROR: ', parsed.error);
|
|
54
56
|
return this.createError('validation_error', 'Invalid response schema');
|
|
57
|
+
}
|
|
55
58
|
return { data: parsed.data, error: null };
|
|
56
59
|
}
|
|
57
60
|
parseError(data) {
|
|
@@ -15,20 +15,20 @@ export declare const LiqPayRawCheckoutCallbackSchema: z.ZodObject<{
|
|
|
15
15
|
commission_credit: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
commission_debit: z.ZodOptional<z.ZodNumber>;
|
|
17
17
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
18
|
-
create_date: z.ZodOptional<z.ZodString
|
|
18
|
+
create_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
19
19
|
currency: z.ZodOptional<z.ZodString>;
|
|
20
20
|
currency_credit: z.ZodOptional<z.ZodString>;
|
|
21
21
|
currency_debit: z.ZodOptional<z.ZodString>;
|
|
22
22
|
customer: z.ZodOptional<z.ZodString>;
|
|
23
23
|
description: z.ZodOptional<z.ZodString>;
|
|
24
|
-
end_date: z.ZodOptional<z.ZodString
|
|
24
|
+
end_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
25
25
|
err_code: z.ZodOptional<z.ZodString>;
|
|
26
26
|
err_description: z.ZodOptional<z.ZodString>;
|
|
27
27
|
info: z.ZodOptional<z.ZodString>;
|
|
28
28
|
ip: z.ZodOptional<z.ZodString>;
|
|
29
29
|
is_3ds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
30
30
|
liqpay_order_id: z.ZodOptional<z.ZodString>;
|
|
31
|
-
mpi_eci: z.ZodOptional<z.ZodNumber
|
|
31
|
+
mpi_eci: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
32
32
|
order_id: z.ZodOptional<z.ZodString>;
|
|
33
33
|
payment_id: z.ZodOptional<z.ZodNumber>;
|
|
34
34
|
paytype: z.ZodOptional<z.ZodString>;
|
|
@@ -39,7 +39,7 @@ export declare const LiqPayRawCheckoutCallbackSchema: z.ZodObject<{
|
|
|
39
39
|
rrn_debit: z.ZodOptional<z.ZodString>;
|
|
40
40
|
sender_bonus: z.ZodOptional<z.ZodNumber>;
|
|
41
41
|
sender_card_bank: z.ZodOptional<z.ZodString>;
|
|
42
|
-
sender_card_country: z.ZodOptional<z.ZodString
|
|
42
|
+
sender_card_country: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
43
43
|
sender_card_mask2: z.ZodOptional<z.ZodString>;
|
|
44
44
|
sender_iban: z.ZodOptional<z.ZodString>;
|
|
45
45
|
sender_card_type: z.ZodOptional<z.ZodString>;
|
|
@@ -76,20 +76,20 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
76
76
|
commission_credit: z.ZodOptional<z.ZodNumber>;
|
|
77
77
|
commission_debit: z.ZodOptional<z.ZodNumber>;
|
|
78
78
|
completion_date: z.ZodOptional<z.ZodString>;
|
|
79
|
-
create_date: z.ZodOptional<z.ZodString
|
|
79
|
+
create_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
80
80
|
currency: z.ZodOptional<z.ZodString>;
|
|
81
81
|
currency_credit: z.ZodOptional<z.ZodString>;
|
|
82
82
|
currency_debit: z.ZodOptional<z.ZodString>;
|
|
83
83
|
customer: z.ZodOptional<z.ZodString>;
|
|
84
84
|
description: z.ZodOptional<z.ZodString>;
|
|
85
|
-
end_date: z.ZodOptional<z.ZodString
|
|
85
|
+
end_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
86
86
|
err_code: z.ZodOptional<z.ZodString>;
|
|
87
87
|
err_description: z.ZodOptional<z.ZodString>;
|
|
88
88
|
info: z.ZodOptional<z.ZodString>;
|
|
89
89
|
ip: z.ZodOptional<z.ZodString>;
|
|
90
90
|
is_3ds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
91
91
|
liqpay_order_id: z.ZodOptional<z.ZodString>;
|
|
92
|
-
mpi_eci: z.ZodOptional<z.ZodNumber
|
|
92
|
+
mpi_eci: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
93
93
|
order_id: z.ZodOptional<z.ZodString>;
|
|
94
94
|
payment_id: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
paytype: z.ZodOptional<z.ZodString>;
|
|
@@ -100,7 +100,7 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
100
100
|
rrn_debit: z.ZodOptional<z.ZodString>;
|
|
101
101
|
sender_bonus: z.ZodOptional<z.ZodNumber>;
|
|
102
102
|
sender_card_bank: z.ZodOptional<z.ZodString>;
|
|
103
|
-
sender_card_country: z.ZodOptional<z.ZodString
|
|
103
|
+
sender_card_country: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
104
104
|
sender_card_mask2: z.ZodOptional<z.ZodString>;
|
|
105
105
|
sender_iban: z.ZodOptional<z.ZodString>;
|
|
106
106
|
sender_card_type: z.ZodOptional<z.ZodString>;
|
|
@@ -130,10 +130,10 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
130
130
|
endDate: Date | undefined;
|
|
131
131
|
errCode: "5" | "limit" | "frod" | "decline" | "err_auth" | "err_cache" | "user_not_found" | "err_sms_send" | "err_sms_otp" | "shop_blocked" | "shop_not_active" | "invalid_signature" | "order_id_empty" | "err_shop_not_agent" | "err_card_def_notfound" | "err_no_card_token" | "err_card_liqpay_def" | "err_card_type" | "err_card_country" | "err_limit_amount" | "err_payment_amount_limit" | "amount_limit" | "payment_err_sender_card" | "payment_processing" | "err_payment_discount" | "err_wallet" | "err_get_verify_code" | "err_verify_code" | "wait_info" | "err_path" | "err_payment_cash_acq" | "err_split_amount" | "err_card_receiver_def" | "payment_err_status" | "public_key_not_found" | "payment_not_found" | "payment_not_subscribed" | "wrong_amount_currency" | "err_amount_hold" | "err_access" | "order_id_duplicate" | "err_blocked" | "err_empty" | "err_empty_phone" | "err_missing" | "err_wrong" | "err_wrong_currency" | "err_phone" | "err_card" | "err_card_bin" | "err_terminal_notfound" | "err_commission_notfound" | "err_payment_create" | "err_mpi" | "err_currency_is_not_allowed" | "err_look" | "err_mods_empty" | "payment_err_type" | "err_payment_currency" | "err_payment_exchangerates" | "err_signature" | "err_api_action" | "err_api_callback" | "err_api_ip" | "expired_phone" | "expired_3ds" | "expired_otp" | "expired_cvv" | "expired_p24" | "expired_sender" | "expired_pin" | "expired_ivr" | "expired_captcha" | "expired_password" | "expired_senderapp" | "expired_prepared" | "expired_mp" | "expired_qr" | "90" | "101" | "102" | "103" | "104" | "105" | "106" | "107" | "108" | "109" | "110" | "111" | "112" | "113" | "114" | "115" | "2903" | "2915" | "3914" | "9851" | "9852" | "9854" | "9855" | "9857" | "9859" | "9860" | "9861" | "9863" | "9867" | "9868" | "9872" | "9882" | "9886" | "9961" | "9989" | undefined;
|
|
132
132
|
is3ds: boolean | undefined;
|
|
133
|
-
mpiEci: 5 | 6 | 7 | undefined;
|
|
133
|
+
mpiEci: "5" | "6" | "7" | undefined;
|
|
134
134
|
paytype: "apay" | "gpay" | "card" | "privat24" | "masterpass" | "moment_part" | "paypart" | "cash" | "invoice" | "qr" | undefined;
|
|
135
135
|
refundDateLast: Date | undefined;
|
|
136
|
-
status: "error" | "
|
|
136
|
+
status: "error" | "failure" | "reversed" | "subscribed" | "success" | "unsubscribed" | "3ds_verify" | "captcha_verify" | "cvv_verify" | "ivr_verify" | "otp_verify" | "password_verify" | "phone_verify" | "pin_verify" | "receiver_verify" | "sender_verify" | "senderapp_verify" | "wait_qr" | "wait_sender" | "p24_verify" | "mp_verify" | "cash_wait" | "hold_wait" | "invoice_wait" | "prepared" | "processing" | "wait_accept" | "wait_card" | "wait_compensation" | "wait_lc" | "wait_reserve" | "wait_secure" | "try_again" | undefined;
|
|
137
137
|
waitReserveStatus: boolean | undefined;
|
|
138
138
|
publicKey?: string | undefined;
|
|
139
139
|
acqId?: number | undefined;
|
|
@@ -161,7 +161,7 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
161
161
|
rrnDebit?: string | undefined;
|
|
162
162
|
senderBonus?: number | undefined;
|
|
163
163
|
senderCardBank?: string | undefined;
|
|
164
|
-
senderCardCountry?: string | undefined;
|
|
164
|
+
senderCardCountry?: string | number | undefined;
|
|
165
165
|
senderCardMask2?: string | undefined;
|
|
166
166
|
senderIban?: string | undefined;
|
|
167
167
|
senderCardType?: string | undefined;
|
|
@@ -194,20 +194,20 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
194
194
|
commission_credit?: number | undefined;
|
|
195
195
|
commission_debit?: number | undefined;
|
|
196
196
|
completion_date?: string | undefined;
|
|
197
|
-
create_date?: string | undefined;
|
|
197
|
+
create_date?: string | number | undefined;
|
|
198
198
|
currency?: string | undefined;
|
|
199
199
|
currency_credit?: string | undefined;
|
|
200
200
|
currency_debit?: string | undefined;
|
|
201
201
|
customer?: string | undefined;
|
|
202
202
|
description?: string | undefined;
|
|
203
|
-
end_date?: string | undefined;
|
|
203
|
+
end_date?: string | number | undefined;
|
|
204
204
|
err_code?: string | undefined;
|
|
205
205
|
err_description?: string | undefined;
|
|
206
206
|
info?: string | undefined;
|
|
207
207
|
ip?: string | undefined;
|
|
208
208
|
is_3ds?: string | boolean | undefined;
|
|
209
209
|
liqpay_order_id?: string | undefined;
|
|
210
|
-
mpi_eci?: number | undefined;
|
|
210
|
+
mpi_eci?: string | number | undefined;
|
|
211
211
|
order_id?: string | undefined;
|
|
212
212
|
payment_id?: number | undefined;
|
|
213
213
|
paytype?: string | undefined;
|
|
@@ -218,7 +218,7 @@ export declare const LiqPayCheckoutCallbackSchema: z.ZodPipe<z.ZodObject<{
|
|
|
218
218
|
rrn_debit?: string | undefined;
|
|
219
219
|
sender_bonus?: number | undefined;
|
|
220
220
|
sender_card_bank?: string | undefined;
|
|
221
|
-
sender_card_country?: string | undefined;
|
|
221
|
+
sender_card_country?: string | number | undefined;
|
|
222
222
|
sender_card_mask2?: string | undefined;
|
|
223
223
|
sender_iban?: string | undefined;
|
|
224
224
|
sender_card_type?: string | undefined;
|
|
@@ -23,20 +23,20 @@ exports.LiqPayRawCheckoutCallbackSchema = zod_1.z.object({
|
|
|
23
23
|
commission_credit: zod_1.z.number().optional(),
|
|
24
24
|
commission_debit: zod_1.z.number().optional(),
|
|
25
25
|
completion_date: zod_1.z.string().optional(),
|
|
26
|
-
create_date: zod_1.z.string().optional(),
|
|
26
|
+
create_date: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
27
27
|
currency: zod_1.z.string().optional(),
|
|
28
28
|
currency_credit: zod_1.z.string().optional(),
|
|
29
29
|
currency_debit: zod_1.z.string().optional(),
|
|
30
30
|
customer: zod_1.z.string().max(100).optional(),
|
|
31
31
|
description: zod_1.z.string().optional(),
|
|
32
|
-
end_date: zod_1.z.string().optional(),
|
|
32
|
+
end_date: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
33
33
|
err_code: zod_1.z.string().optional(),
|
|
34
34
|
err_description: zod_1.z.string().optional(),
|
|
35
35
|
info: zod_1.z.string().optional(),
|
|
36
36
|
ip: zod_1.z.string().optional(),
|
|
37
37
|
is_3ds: zod_1.z.union([zod_1.z.string(), zod_1.z.boolean()]).optional(),
|
|
38
38
|
liqpay_order_id: zod_1.z.string().optional(),
|
|
39
|
-
mpi_eci: zod_1.z.number().optional(),
|
|
39
|
+
mpi_eci: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
40
40
|
order_id: zod_1.z.string().optional(),
|
|
41
41
|
payment_id: zod_1.z.number().optional(),
|
|
42
42
|
paytype: zod_1.z.string().optional(),
|
|
@@ -47,7 +47,7 @@ exports.LiqPayRawCheckoutCallbackSchema = zod_1.z.object({
|
|
|
47
47
|
rrn_debit: zod_1.z.string().optional(),
|
|
48
48
|
sender_bonus: zod_1.z.number().optional(),
|
|
49
49
|
sender_card_bank: zod_1.z.string().optional(),
|
|
50
|
-
sender_card_country: zod_1.z.string().optional(),
|
|
50
|
+
sender_card_country: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
51
51
|
sender_card_mask2: zod_1.z.string().optional(),
|
|
52
52
|
sender_iban: zod_1.z.string().optional(),
|
|
53
53
|
sender_card_type: zod_1.z.string().optional(),
|
|
@@ -81,7 +81,7 @@ exports.LiqPayCheckoutCallbackSchema = exports.LiqPayRawCheckoutCallbackSchema.t
|
|
|
81
81
|
endDate: (0, utils_1.parseDate)(camelized.endDate),
|
|
82
82
|
errCode: (0, utils_1.parseOptional)(error_1.LiqPayErrorCodeSchema, camelized.errCode),
|
|
83
83
|
is3ds: (0, utils_1.parseBoolean)(camelized.is3ds),
|
|
84
|
-
mpiEci: (0, utils_1.parseOptional)(enums_1.LiqPayMpiEciSchema, camelized.mpiEci),
|
|
84
|
+
mpiEci: (0, utils_1.parseOptional)(enums_1.LiqPayMpiEciSchema, String(camelized.mpiEci)),
|
|
85
85
|
paytype: (0, utils_1.parseOptional)(enums_1.LiqPayPaytypeSchema, camelized.paytype),
|
|
86
86
|
refundDateLast: (0, utils_1.parseDate)(camelized.refundDateLast),
|
|
87
87
|
status: (0, utils_1.parseOptional)(enums_1.LiqPayPaymentStatusSchema, camelized.status),
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const LiqPayMpiEciSchema: z.
|
|
2
|
+
export declare const LiqPayMpiEciSchema: z.ZodEnum<{
|
|
3
|
+
5: "5";
|
|
4
|
+
6: "6";
|
|
5
|
+
7: "7";
|
|
6
|
+
}>;
|
|
3
7
|
export type LiqPayMpiEci = z.infer<typeof LiqPayMpiEciSchema>;
|
|
@@ -2,8 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LiqPayMpiEciSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
exports.LiqPayMpiEciSchema = zod_1.z.
|
|
6
|
-
zod_1.z.literal(5),
|
|
7
|
-
zod_1.z.literal(6),
|
|
8
|
-
zod_1.z.literal(7),
|
|
9
|
-
]);
|
|
5
|
+
exports.LiqPayMpiEciSchema = zod_1.z.enum(['5', '6', '7']);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const LiqPayResolvedPaymentStatusSchema: z.ZodEnum<{
|
|
3
3
|
error: "error";
|
|
4
|
-
success: "success";
|
|
5
4
|
failure: "failure";
|
|
6
5
|
reversed: "reversed";
|
|
7
6
|
subscribed: "subscribed";
|
|
7
|
+
success: "success";
|
|
8
8
|
unsubscribed: "unsubscribed";
|
|
9
9
|
}>;
|
|
10
10
|
export type LiqPayResolvedPaymentStatus = z.infer<typeof LiqPayResolvedPaymentStatusSchema>;
|
|
@@ -43,10 +43,10 @@ export declare const LiqPayOtherPaymentStatusSchema: z.ZodEnum<{
|
|
|
43
43
|
export type LiqPayOtherPaymentStatus = z.infer<typeof LiqPayOtherPaymentStatusSchema>;
|
|
44
44
|
export declare const LiqPayPaymentStatusSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
45
45
|
error: "error";
|
|
46
|
-
success: "success";
|
|
47
46
|
failure: "failure";
|
|
48
47
|
reversed: "reversed";
|
|
49
48
|
subscribed: "subscribed";
|
|
49
|
+
success: "success";
|
|
50
50
|
unsubscribed: "unsubscribed";
|
|
51
51
|
}>, z.ZodEnum<{
|
|
52
52
|
"3ds_verify": "3ds_verify";
|
|
@@ -15,19 +15,19 @@ export declare const LiqPayRawPaymentStatusResponseSchema: z.ZodObject<{
|
|
|
15
15
|
commission_credit: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
commission_debit: z.ZodOptional<z.ZodNumber>;
|
|
17
17
|
confirm_phone: z.ZodOptional<z.ZodString>;
|
|
18
|
-
create_date: z.ZodOptional<z.ZodString
|
|
18
|
+
create_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
19
19
|
currency: z.ZodOptional<z.ZodString>;
|
|
20
20
|
currency_credit: z.ZodOptional<z.ZodString>;
|
|
21
21
|
currency_debit: z.ZodOptional<z.ZodString>;
|
|
22
22
|
description: z.ZodOptional<z.ZodString>;
|
|
23
|
-
end_date: z.ZodOptional<z.ZodString
|
|
23
|
+
end_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
24
24
|
info: z.ZodOptional<z.ZodString>;
|
|
25
25
|
ip: z.ZodOptional<z.ZodString>;
|
|
26
26
|
is_3ds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
27
27
|
language: z.ZodOptional<z.ZodString>;
|
|
28
28
|
liqpay_order_id: z.ZodOptional<z.ZodString>;
|
|
29
29
|
moment_part: z.ZodOptional<z.ZodString>;
|
|
30
|
-
mpi_eci: z.ZodOptional<z.ZodNumber
|
|
30
|
+
mpi_eci: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
31
31
|
order_id: z.ZodOptional<z.ZodString>;
|
|
32
32
|
payment_id: z.ZodOptional<z.ZodNumber>;
|
|
33
33
|
paytype: z.ZodOptional<z.ZodString>;
|
|
@@ -38,7 +38,7 @@ export declare const LiqPayRawPaymentStatusResponseSchema: z.ZodObject<{
|
|
|
38
38
|
rrn_debit: z.ZodOptional<z.ZodString>;
|
|
39
39
|
sender_bonus: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
sender_card_bank: z.ZodOptional<z.ZodString>;
|
|
41
|
-
sender_card_country: z.ZodOptional<z.ZodString
|
|
41
|
+
sender_card_country: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
42
42
|
sender_card_mask2: z.ZodOptional<z.ZodString>;
|
|
43
43
|
sender_iban: z.ZodOptional<z.ZodString>;
|
|
44
44
|
sender_card_type: z.ZodOptional<z.ZodString>;
|
|
@@ -69,19 +69,19 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
69
69
|
commission_credit: z.ZodOptional<z.ZodNumber>;
|
|
70
70
|
commission_debit: z.ZodOptional<z.ZodNumber>;
|
|
71
71
|
confirm_phone: z.ZodOptional<z.ZodString>;
|
|
72
|
-
create_date: z.ZodOptional<z.ZodString
|
|
72
|
+
create_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
73
73
|
currency: z.ZodOptional<z.ZodString>;
|
|
74
74
|
currency_credit: z.ZodOptional<z.ZodString>;
|
|
75
75
|
currency_debit: z.ZodOptional<z.ZodString>;
|
|
76
76
|
description: z.ZodOptional<z.ZodString>;
|
|
77
|
-
end_date: z.ZodOptional<z.ZodString
|
|
77
|
+
end_date: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
78
78
|
info: z.ZodOptional<z.ZodString>;
|
|
79
79
|
ip: z.ZodOptional<z.ZodString>;
|
|
80
80
|
is_3ds: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
81
81
|
language: z.ZodOptional<z.ZodString>;
|
|
82
82
|
liqpay_order_id: z.ZodOptional<z.ZodString>;
|
|
83
83
|
moment_part: z.ZodOptional<z.ZodString>;
|
|
84
|
-
mpi_eci: z.ZodOptional<z.ZodNumber
|
|
84
|
+
mpi_eci: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
85
85
|
order_id: z.ZodOptional<z.ZodString>;
|
|
86
86
|
payment_id: z.ZodOptional<z.ZodNumber>;
|
|
87
87
|
paytype: z.ZodOptional<z.ZodString>;
|
|
@@ -92,7 +92,7 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
92
92
|
rrn_debit: z.ZodOptional<z.ZodString>;
|
|
93
93
|
sender_bonus: z.ZodOptional<z.ZodNumber>;
|
|
94
94
|
sender_card_bank: z.ZodOptional<z.ZodString>;
|
|
95
|
-
sender_card_country: z.ZodOptional<z.ZodString
|
|
95
|
+
sender_card_country: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
96
96
|
sender_card_mask2: z.ZodOptional<z.ZodString>;
|
|
97
97
|
sender_iban: z.ZodOptional<z.ZodString>;
|
|
98
98
|
sender_card_type: z.ZodOptional<z.ZodString>;
|
|
@@ -116,10 +116,10 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
116
116
|
is3ds: boolean | undefined;
|
|
117
117
|
language: "uk" | "en" | undefined;
|
|
118
118
|
momentPart: boolean | undefined;
|
|
119
|
-
mpiEci: 5 | 6 | 7 | undefined;
|
|
119
|
+
mpiEci: "5" | "6" | "7" | undefined;
|
|
120
120
|
paytype: "apay" | "gpay" | "card" | "privat24" | "masterpass" | "moment_part" | "paypart" | "cash" | "invoice" | "qr" | undefined;
|
|
121
121
|
result: "error" | "ok" | undefined;
|
|
122
|
-
status: "error" | "
|
|
122
|
+
status: "error" | "failure" | "reversed" | "subscribed" | "success" | "unsubscribed" | "3ds_verify" | "captcha_verify" | "cvv_verify" | "ivr_verify" | "otp_verify" | "password_verify" | "phone_verify" | "pin_verify" | "receiver_verify" | "sender_verify" | "senderapp_verify" | "wait_qr" | "wait_sender" | "p24_verify" | "mp_verify" | "cash_wait" | "hold_wait" | "invoice_wait" | "prepared" | "processing" | "wait_accept" | "wait_card" | "wait_compensation" | "wait_lc" | "wait_reserve" | "wait_secure" | "try_again" | undefined;
|
|
123
123
|
waitReserveStatus: boolean | undefined;
|
|
124
124
|
version: 7 | undefined;
|
|
125
125
|
acqId?: number | undefined;
|
|
@@ -147,7 +147,7 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
147
147
|
rrnDebit?: string | undefined;
|
|
148
148
|
senderBonus?: number | undefined;
|
|
149
149
|
senderCardBank?: string | undefined;
|
|
150
|
-
senderCardCountry?: string | undefined;
|
|
150
|
+
senderCardCountry?: string | number | undefined;
|
|
151
151
|
senderCardMask2?: string | undefined;
|
|
152
152
|
senderIban?: string | undefined;
|
|
153
153
|
senderCardType?: string | undefined;
|
|
@@ -173,19 +173,19 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
173
173
|
commission_credit?: number | undefined;
|
|
174
174
|
commission_debit?: number | undefined;
|
|
175
175
|
confirm_phone?: string | undefined;
|
|
176
|
-
create_date?: string | undefined;
|
|
176
|
+
create_date?: string | number | undefined;
|
|
177
177
|
currency?: string | undefined;
|
|
178
178
|
currency_credit?: string | undefined;
|
|
179
179
|
currency_debit?: string | undefined;
|
|
180
180
|
description?: string | undefined;
|
|
181
|
-
end_date?: string | undefined;
|
|
181
|
+
end_date?: string | number | undefined;
|
|
182
182
|
info?: string | undefined;
|
|
183
183
|
ip?: string | undefined;
|
|
184
184
|
is_3ds?: string | boolean | undefined;
|
|
185
185
|
language?: string | undefined;
|
|
186
186
|
liqpay_order_id?: string | undefined;
|
|
187
187
|
moment_part?: string | undefined;
|
|
188
|
-
mpi_eci?: number | undefined;
|
|
188
|
+
mpi_eci?: string | number | undefined;
|
|
189
189
|
order_id?: string | undefined;
|
|
190
190
|
payment_id?: number | undefined;
|
|
191
191
|
paytype?: string | undefined;
|
|
@@ -196,7 +196,7 @@ export declare const LiqPayPaymentStatusResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
|
196
196
|
rrn_debit?: string | undefined;
|
|
197
197
|
sender_bonus?: number | undefined;
|
|
198
198
|
sender_card_bank?: string | undefined;
|
|
199
|
-
sender_card_country?: string | undefined;
|
|
199
|
+
sender_card_country?: string | number | undefined;
|
|
200
200
|
sender_card_mask2?: string | undefined;
|
|
201
201
|
sender_iban?: string | undefined;
|
|
202
202
|
sender_card_type?: string | undefined;
|
|
@@ -22,19 +22,19 @@ exports.LiqPayRawPaymentStatusResponseSchema = zod_1.z.object({
|
|
|
22
22
|
commission_credit: zod_1.z.number().optional(),
|
|
23
23
|
commission_debit: zod_1.z.number().optional(),
|
|
24
24
|
confirm_phone: zod_1.z.string().optional(),
|
|
25
|
-
create_date: zod_1.z.string().optional(),
|
|
25
|
+
create_date: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
26
26
|
currency: zod_1.z.string().optional(),
|
|
27
27
|
currency_credit: zod_1.z.string().optional(),
|
|
28
28
|
currency_debit: zod_1.z.string().optional(),
|
|
29
29
|
description: zod_1.z.string().optional(),
|
|
30
|
-
end_date: zod_1.z.string().optional(),
|
|
30
|
+
end_date: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
31
31
|
info: zod_1.z.string().optional(),
|
|
32
32
|
ip: zod_1.z.string().optional(),
|
|
33
33
|
is_3ds: zod_1.z.union([zod_1.z.string(), zod_1.z.boolean()]).optional(),
|
|
34
34
|
language: zod_1.z.string().optional(),
|
|
35
35
|
liqpay_order_id: zod_1.z.string().optional(),
|
|
36
36
|
moment_part: zod_1.z.string().optional(),
|
|
37
|
-
mpi_eci: zod_1.z.number().optional(),
|
|
37
|
+
mpi_eci: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
38
38
|
order_id: zod_1.z.string().optional(),
|
|
39
39
|
payment_id: zod_1.z.number().optional(),
|
|
40
40
|
paytype: zod_1.z.string().optional(),
|
|
@@ -45,7 +45,7 @@ exports.LiqPayRawPaymentStatusResponseSchema = zod_1.z.object({
|
|
|
45
45
|
rrn_debit: zod_1.z.string().optional(),
|
|
46
46
|
sender_bonus: zod_1.z.number().optional(),
|
|
47
47
|
sender_card_bank: zod_1.z.string().optional(),
|
|
48
|
-
sender_card_country: zod_1.z.string().optional(),
|
|
48
|
+
sender_card_country: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
49
49
|
sender_card_mask2: zod_1.z.string().optional(),
|
|
50
50
|
sender_iban: zod_1.z.string().optional(),
|
|
51
51
|
sender_card_type: zod_1.z.string().optional(),
|
|
@@ -73,7 +73,7 @@ exports.LiqPayPaymentStatusResponseSchema = exports.LiqPayRawPaymentStatusRespon
|
|
|
73
73
|
is3ds: (0, utils_1.parseBoolean)(camelized.is3ds),
|
|
74
74
|
language: (0, utils_1.parseOptional)(enums_1.LiqPayLanguageSchema, camelized.language),
|
|
75
75
|
momentPart: (0, utils_1.parseBoolean)(camelized.momentPart),
|
|
76
|
-
mpiEci: (0, utils_1.parseOptional)(enums_1.LiqPayMpiEciSchema, camelized.mpiEci),
|
|
76
|
+
mpiEci: (0, utils_1.parseOptional)(enums_1.LiqPayMpiEciSchema, String(camelized.mpiEci)),
|
|
77
77
|
paytype: (0, utils_1.parseOptional)(enums_1.LiqPayPaytypeSchema, camelized.paytype),
|
|
78
78
|
result: (0, utils_1.parseOptional)(enums_1.LiqPayRequestResultSchema, camelized.result),
|
|
79
79
|
status: (0, utils_1.parseOptional)(enums_1.LiqPayPaymentStatusSchema, camelized.status),
|
|
@@ -3,7 +3,7 @@ export declare const toBoolean: (value: string | boolean) => boolean;
|
|
|
3
3
|
export declare const boolTo: <T extends string>(value: boolean | undefined, trueValue: T) => T | undefined;
|
|
4
4
|
export declare const dateToIso: (d?: Date) => string | undefined;
|
|
5
5
|
export declare const parseBoolean: (value: string | boolean | undefined) => boolean | undefined;
|
|
6
|
-
export declare const parseDate: (value: Date | string | undefined) => Date | undefined;
|
|
6
|
+
export declare const parseDate: (value: Date | number | string | undefined) => Date | undefined;
|
|
7
7
|
export declare const parseOptional: <T>(schema: z.ZodType<T>, value: unknown) => T | undefined;
|
|
8
8
|
export declare const stringify: <T>(v?: T) => string | undefined;
|
|
9
9
|
export declare const join: (arr?: string[]) => string | undefined;
|
|
@@ -115,10 +115,10 @@ export declare class LiqPayPaymentsService {
|
|
|
115
115
|
is3ds: boolean | undefined;
|
|
116
116
|
language: "uk" | "en" | undefined;
|
|
117
117
|
momentPart: boolean | undefined;
|
|
118
|
-
mpiEci: 5 | 6 | 7 | undefined;
|
|
118
|
+
mpiEci: "5" | "6" | "7" | undefined;
|
|
119
119
|
paytype: "apay" | "gpay" | "card" | "privat24" | "masterpass" | "moment_part" | "paypart" | "cash" | "invoice" | "qr" | undefined;
|
|
120
120
|
result: "error" | "ok" | undefined;
|
|
121
|
-
status: "error" | "
|
|
121
|
+
status: "error" | "failure" | "reversed" | "subscribed" | "success" | "unsubscribed" | "3ds_verify" | "captcha_verify" | "cvv_verify" | "ivr_verify" | "otp_verify" | "password_verify" | "phone_verify" | "pin_verify" | "receiver_verify" | "sender_verify" | "senderapp_verify" | "wait_qr" | "wait_sender" | "p24_verify" | "mp_verify" | "cash_wait" | "hold_wait" | "invoice_wait" | "prepared" | "processing" | "wait_accept" | "wait_card" | "wait_compensation" | "wait_lc" | "wait_reserve" | "wait_secure" | "try_again" | undefined;
|
|
122
122
|
waitReserveStatus: boolean | undefined;
|
|
123
123
|
version: 7 | undefined;
|
|
124
124
|
acqId?: number | undefined;
|
|
@@ -146,7 +146,7 @@ export declare class LiqPayPaymentsService {
|
|
|
146
146
|
rrnDebit?: string | undefined;
|
|
147
147
|
senderBonus?: number | undefined;
|
|
148
148
|
senderCardBank?: string | undefined;
|
|
149
|
-
senderCardCountry?: string | undefined;
|
|
149
|
+
senderCardCountry?: string | number | undefined;
|
|
150
150
|
senderCardMask2?: string | undefined;
|
|
151
151
|
senderIban?: string | undefined;
|
|
152
152
|
senderCardType?: string | undefined;
|
|
@@ -14,10 +14,10 @@ export declare class LiqPayWebhooksService {
|
|
|
14
14
|
endDate: Date | undefined;
|
|
15
15
|
errCode: "5" | "limit" | "frod" | "decline" | "err_auth" | "err_cache" | "user_not_found" | "err_sms_send" | "err_sms_otp" | "shop_blocked" | "shop_not_active" | "invalid_signature" | "order_id_empty" | "err_shop_not_agent" | "err_card_def_notfound" | "err_no_card_token" | "err_card_liqpay_def" | "err_card_type" | "err_card_country" | "err_limit_amount" | "err_payment_amount_limit" | "amount_limit" | "payment_err_sender_card" | "payment_processing" | "err_payment_discount" | "err_wallet" | "err_get_verify_code" | "err_verify_code" | "wait_info" | "err_path" | "err_payment_cash_acq" | "err_split_amount" | "err_card_receiver_def" | "payment_err_status" | "public_key_not_found" | "payment_not_found" | "payment_not_subscribed" | "wrong_amount_currency" | "err_amount_hold" | "err_access" | "order_id_duplicate" | "err_blocked" | "err_empty" | "err_empty_phone" | "err_missing" | "err_wrong" | "err_wrong_currency" | "err_phone" | "err_card" | "err_card_bin" | "err_terminal_notfound" | "err_commission_notfound" | "err_payment_create" | "err_mpi" | "err_currency_is_not_allowed" | "err_look" | "err_mods_empty" | "payment_err_type" | "err_payment_currency" | "err_payment_exchangerates" | "err_signature" | "err_api_action" | "err_api_callback" | "err_api_ip" | "expired_phone" | "expired_3ds" | "expired_otp" | "expired_cvv" | "expired_p24" | "expired_sender" | "expired_pin" | "expired_ivr" | "expired_captcha" | "expired_password" | "expired_senderapp" | "expired_prepared" | "expired_mp" | "expired_qr" | "90" | "101" | "102" | "103" | "104" | "105" | "106" | "107" | "108" | "109" | "110" | "111" | "112" | "113" | "114" | "115" | "2903" | "2915" | "3914" | "9851" | "9852" | "9854" | "9855" | "9857" | "9859" | "9860" | "9861" | "9863" | "9867" | "9868" | "9872" | "9882" | "9886" | "9961" | "9989" | undefined;
|
|
16
16
|
is3ds: boolean | undefined;
|
|
17
|
-
mpiEci: 5 | 6 | 7 | undefined;
|
|
17
|
+
mpiEci: "5" | "6" | "7" | undefined;
|
|
18
18
|
paytype: "apay" | "gpay" | "card" | "privat24" | "masterpass" | "moment_part" | "paypart" | "cash" | "invoice" | "qr" | undefined;
|
|
19
19
|
refundDateLast: Date | undefined;
|
|
20
|
-
status: "error" | "
|
|
20
|
+
status: "error" | "failure" | "reversed" | "subscribed" | "success" | "unsubscribed" | "3ds_verify" | "captcha_verify" | "cvv_verify" | "ivr_verify" | "otp_verify" | "password_verify" | "phone_verify" | "pin_verify" | "receiver_verify" | "sender_verify" | "senderapp_verify" | "wait_qr" | "wait_sender" | "p24_verify" | "mp_verify" | "cash_wait" | "hold_wait" | "invoice_wait" | "prepared" | "processing" | "wait_accept" | "wait_card" | "wait_compensation" | "wait_lc" | "wait_reserve" | "wait_secure" | "try_again" | undefined;
|
|
21
21
|
waitReserveStatus: boolean | undefined;
|
|
22
22
|
publicKey?: string | undefined;
|
|
23
23
|
acqId?: number | undefined;
|
|
@@ -45,7 +45,7 @@ export declare class LiqPayWebhooksService {
|
|
|
45
45
|
rrnDebit?: string | undefined;
|
|
46
46
|
senderBonus?: number | undefined;
|
|
47
47
|
senderCardBank?: string | undefined;
|
|
48
|
-
senderCardCountry?: string | undefined;
|
|
48
|
+
senderCardCountry?: string | number | undefined;
|
|
49
49
|
senderCardMask2?: string | undefined;
|
|
50
50
|
senderIban?: string | undefined;
|
|
51
51
|
senderCardType?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liqpay-nestjs",
|
|
3
3
|
"description": "LiqPay integration module for NestJS with support for payments, callbacks, and configuration via DI.",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.10",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"main": "dist/index.js",
|