@tonder.io/ionic-lite-sdk 0.0.41-beta.1 → 0.0.42-beta.2
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/.gitlab-ci.yml +28 -28
- package/README.md +532 -532
- package/dist/classes/3dsHandler.d.ts +3 -1
- package/dist/classes/BaseInlineCheckout.d.ts +3 -2
- package/dist/classes/liteCheckout.d.ts +1 -1
- package/dist/data/cardApi.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/types/commons.d.ts +1 -0
- package/dist/types/liteInlineCheckout.d.ts +1 -1
- package/jest.config.ts +14 -14
- package/package.json +41 -41
- package/rollup.config.js +16 -16
- package/src/classes/3dsHandler.ts +347 -337
- package/src/classes/BaseInlineCheckout.ts +424 -415
- package/src/classes/errorResponse.ts +16 -16
- package/src/classes/liteCheckout.ts +589 -591
- package/src/data/api.ts +20 -20
- package/src/data/businessApi.ts +18 -18
- package/src/data/cardApi.ts +91 -87
- package/src/data/checkoutApi.ts +84 -84
- package/src/data/customerApi.ts +31 -31
- package/src/data/openPayApi.ts +12 -12
- package/src/data/paymentMethodApi.ts +37 -37
- package/src/data/skyflowApi.ts +20 -20
- package/src/helpers/constants.ts +63 -63
- package/src/helpers/mercadopago.ts +15 -15
- package/src/helpers/skyflow.ts +91 -91
- package/src/helpers/utils.ts +120 -120
- package/src/helpers/validations.ts +55 -55
- package/src/index.ts +12 -12
- package/src/shared/catalog/paymentMethodsCatalog.ts +247 -247
- package/src/shared/constants/messages.ts +10 -10
- package/src/shared/constants/paymentMethodAPM.ts +63 -63
- package/src/shared/constants/tonderUrl.ts +8 -8
- package/src/types/card.ts +35 -35
- package/src/types/checkout.ts +123 -123
- package/src/types/commons.ts +143 -142
- package/src/types/customer.ts +22 -22
- package/src/types/liteInlineCheckout.ts +216 -216
- package/src/types/paymentMethod.ts +23 -23
- package/src/types/requests.ts +114 -114
- package/src/types/responses.ts +192 -192
- package/src/types/skyflow.ts +17 -17
- package/src/types/transaction.ts +101 -101
- package/src/types/validations.d.ts +11 -11
- package/tests/classes/liteCheckout.test.ts +57 -57
- package/tests/methods/createOrder.test.ts +141 -141
- package/tests/methods/createPayment.test.ts +121 -121
- package/tests/methods/customerRegister.test.ts +118 -118
- package/tests/methods/getBusiness.test.ts +114 -114
- package/tests/methods/getCustomerCards.test.ts +112 -112
- package/tests/methods/registerCustomerCard.test.ts +117 -117
- package/tests/methods/startCheckoutRouter.test.ts +119 -119
- package/tests/methods/startCheckoutRouterFull.test.ts +138 -138
- package/tests/utils/defaultMock.ts +21 -21
- package/tests/utils/mockClasses.ts +659 -659
- package/tsconfig.json +18 -18
package/src/types/requests.ts
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
import { SkyflowRecord } from "./skyflow";
|
|
2
|
-
import {IItem} from "./checkout";
|
|
3
|
-
|
|
4
|
-
export interface CreateOrderRequest {
|
|
5
|
-
business: string,
|
|
6
|
-
client: string,
|
|
7
|
-
billing_address_id?: number | null,
|
|
8
|
-
shipping_address_id?: number | null,
|
|
9
|
-
amount: number,
|
|
10
|
-
status?: string,
|
|
11
|
-
reference: string | number,
|
|
12
|
-
is_oneclick: boolean,
|
|
13
|
-
items: IItem[]
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type CreatePaymentRequest = {
|
|
17
|
-
business_pk?: string | number,
|
|
18
|
-
amount: number,
|
|
19
|
-
date?: string,
|
|
20
|
-
order_id?: string | number
|
|
21
|
-
client_id?: string | number
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type StartCheckoutRequestBase = {
|
|
25
|
-
name: any,
|
|
26
|
-
last_name: string,
|
|
27
|
-
email_client: any,
|
|
28
|
-
phone_number: any,
|
|
29
|
-
return_url?: string,
|
|
30
|
-
id_product: string,
|
|
31
|
-
quantity_product: number,
|
|
32
|
-
id_ship: string,
|
|
33
|
-
instance_id_ship: string,
|
|
34
|
-
amount: any,
|
|
35
|
-
title_ship: string,
|
|
36
|
-
description: string,
|
|
37
|
-
device_session_id: any,
|
|
38
|
-
token_id: string,
|
|
39
|
-
order_id: any,
|
|
40
|
-
business_id: any,
|
|
41
|
-
payment_id: any,
|
|
42
|
-
source: string,
|
|
43
|
-
browser_info?: any,
|
|
44
|
-
metadata: any,
|
|
45
|
-
currency: string,
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export type StartCheckoutRequestWithCard = StartCheckoutRequestBase & {
|
|
49
|
-
card: any,
|
|
50
|
-
payment_method?: never,
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export type StartCheckoutRequestWithPaymentMethod = StartCheckoutRequestBase & {
|
|
54
|
-
card?: never,
|
|
55
|
-
payment_method: string,
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type StartCheckoutRequest = StartCheckoutRequestWithCard | StartCheckoutRequestWithPaymentMethod;
|
|
59
|
-
|
|
60
|
-
export type StartCheckoutIdRequest = {
|
|
61
|
-
checkout_id: any
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface VaultRequest extends SkyflowRecord {
|
|
65
|
-
records: SkyflowRecord[],
|
|
66
|
-
continueOnError?: boolean,
|
|
67
|
-
byot?: "DISABLE" | "ENABLE" | "ENABLE_STRICT"
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export type RegisterCustomerCardRequest = {
|
|
71
|
-
skyflow_id: string;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type TokensSkyflowRequest = {
|
|
75
|
-
baseUrl: string;
|
|
76
|
-
apiKey: string;
|
|
77
|
-
vault_id: string,
|
|
78
|
-
vault_url: string,
|
|
79
|
-
data: {
|
|
80
|
-
[key: string]: any;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
export type TokensRequest = {
|
|
84
|
-
vault_id: string,
|
|
85
|
-
vault_url: string,
|
|
86
|
-
data: {
|
|
87
|
-
[key: string]: any;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type StartCheckoutFullRequest = {
|
|
92
|
-
order: {
|
|
93
|
-
items: IItem[];
|
|
94
|
-
};
|
|
95
|
-
total: number;
|
|
96
|
-
customer: {
|
|
97
|
-
name: string;
|
|
98
|
-
lastname: string;
|
|
99
|
-
email: string;
|
|
100
|
-
phone: string;
|
|
101
|
-
};
|
|
102
|
-
skyflowTokens: {
|
|
103
|
-
cardholder_name: string;
|
|
104
|
-
card_number: string;
|
|
105
|
-
cvv: string;
|
|
106
|
-
expiration_year: string;
|
|
107
|
-
expiration_month: string;
|
|
108
|
-
skyflow_id: string;
|
|
109
|
-
};
|
|
110
|
-
return_url: string;
|
|
111
|
-
isSandbox: boolean;
|
|
112
|
-
metadata: any;
|
|
113
|
-
currency: string;
|
|
114
|
-
payment_method?: string;
|
|
1
|
+
import { SkyflowRecord } from "./skyflow";
|
|
2
|
+
import {IItem} from "./checkout";
|
|
3
|
+
|
|
4
|
+
export interface CreateOrderRequest {
|
|
5
|
+
business: string,
|
|
6
|
+
client: string,
|
|
7
|
+
billing_address_id?: number | null,
|
|
8
|
+
shipping_address_id?: number | null,
|
|
9
|
+
amount: number,
|
|
10
|
+
status?: string,
|
|
11
|
+
reference: string | number,
|
|
12
|
+
is_oneclick: boolean,
|
|
13
|
+
items: IItem[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type CreatePaymentRequest = {
|
|
17
|
+
business_pk?: string | number,
|
|
18
|
+
amount: number,
|
|
19
|
+
date?: string,
|
|
20
|
+
order_id?: string | number
|
|
21
|
+
client_id?: string | number
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type StartCheckoutRequestBase = {
|
|
25
|
+
name: any,
|
|
26
|
+
last_name: string,
|
|
27
|
+
email_client: any,
|
|
28
|
+
phone_number: any,
|
|
29
|
+
return_url?: string,
|
|
30
|
+
id_product: string,
|
|
31
|
+
quantity_product: number,
|
|
32
|
+
id_ship: string,
|
|
33
|
+
instance_id_ship: string,
|
|
34
|
+
amount: any,
|
|
35
|
+
title_ship: string,
|
|
36
|
+
description: string,
|
|
37
|
+
device_session_id: any,
|
|
38
|
+
token_id: string,
|
|
39
|
+
order_id: any,
|
|
40
|
+
business_id: any,
|
|
41
|
+
payment_id: any,
|
|
42
|
+
source: string,
|
|
43
|
+
browser_info?: any,
|
|
44
|
+
metadata: any,
|
|
45
|
+
currency: string,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type StartCheckoutRequestWithCard = StartCheckoutRequestBase & {
|
|
49
|
+
card: any,
|
|
50
|
+
payment_method?: never,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type StartCheckoutRequestWithPaymentMethod = StartCheckoutRequestBase & {
|
|
54
|
+
card?: never,
|
|
55
|
+
payment_method: string,
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type StartCheckoutRequest = StartCheckoutRequestWithCard | StartCheckoutRequestWithPaymentMethod;
|
|
59
|
+
|
|
60
|
+
export type StartCheckoutIdRequest = {
|
|
61
|
+
checkout_id: any
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface VaultRequest extends SkyflowRecord {
|
|
65
|
+
records: SkyflowRecord[],
|
|
66
|
+
continueOnError?: boolean,
|
|
67
|
+
byot?: "DISABLE" | "ENABLE" | "ENABLE_STRICT"
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type RegisterCustomerCardRequest = {
|
|
71
|
+
skyflow_id: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type TokensSkyflowRequest = {
|
|
75
|
+
baseUrl: string;
|
|
76
|
+
apiKey: string;
|
|
77
|
+
vault_id: string,
|
|
78
|
+
vault_url: string,
|
|
79
|
+
data: {
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
export type TokensRequest = {
|
|
84
|
+
vault_id: string,
|
|
85
|
+
vault_url: string,
|
|
86
|
+
data: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export type StartCheckoutFullRequest = {
|
|
92
|
+
order: {
|
|
93
|
+
items: IItem[];
|
|
94
|
+
};
|
|
95
|
+
total: number;
|
|
96
|
+
customer: {
|
|
97
|
+
name: string;
|
|
98
|
+
lastname: string;
|
|
99
|
+
email: string;
|
|
100
|
+
phone: string;
|
|
101
|
+
};
|
|
102
|
+
skyflowTokens: {
|
|
103
|
+
cardholder_name: string;
|
|
104
|
+
card_number: string;
|
|
105
|
+
cvv: string;
|
|
106
|
+
expiration_year: string;
|
|
107
|
+
expiration_month: string;
|
|
108
|
+
skyflow_id: string;
|
|
109
|
+
};
|
|
110
|
+
return_url: string;
|
|
111
|
+
isSandbox: boolean;
|
|
112
|
+
metadata: any;
|
|
113
|
+
currency: string;
|
|
114
|
+
payment_method?: string;
|
|
115
115
|
}
|
package/src/types/responses.ts
CHANGED
|
@@ -1,193 +1,193 @@
|
|
|
1
|
-
import { Business } from "./commons";
|
|
2
|
-
|
|
3
|
-
export interface IErrorResponse extends Error {
|
|
4
|
-
code?: string;
|
|
5
|
-
body?: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface GetBusinessResponse extends Business { }
|
|
9
|
-
|
|
10
|
-
export type GetVaultTokenResponse = {
|
|
11
|
-
token: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type CustomerRegisterResponse = {
|
|
15
|
-
id: number | string;
|
|
16
|
-
email: string;
|
|
17
|
-
auth_token: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type CreateOrderResponse = {
|
|
21
|
-
id: number | string;
|
|
22
|
-
created: string;
|
|
23
|
-
amount: string;
|
|
24
|
-
status: string;
|
|
25
|
-
payment_method?: string;
|
|
26
|
-
reference?: string;
|
|
27
|
-
is_oneclick: boolean;
|
|
28
|
-
items: {
|
|
29
|
-
description: string;
|
|
30
|
-
product_reference: string;
|
|
31
|
-
quantity: string;
|
|
32
|
-
price_unit: string;
|
|
33
|
-
discount: string;
|
|
34
|
-
taxes: string;
|
|
35
|
-
amount_total: string;
|
|
36
|
-
}[];
|
|
37
|
-
billing_address?: string;
|
|
38
|
-
shipping_address?: string;
|
|
39
|
-
client: {
|
|
40
|
-
email: string;
|
|
41
|
-
name: string;
|
|
42
|
-
first_name: string;
|
|
43
|
-
last_name: string;
|
|
44
|
-
client_profile: {
|
|
45
|
-
gender: string;
|
|
46
|
-
date_birth?: string;
|
|
47
|
-
terms: boolean;
|
|
48
|
-
phone: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export type CreatePaymentResponse = {
|
|
54
|
-
pk: number | string;
|
|
55
|
-
order?: string;
|
|
56
|
-
amount: string;
|
|
57
|
-
status: string;
|
|
58
|
-
date: string;
|
|
59
|
-
paid_date?: string;
|
|
60
|
-
shipping_address: {
|
|
61
|
-
street: string;
|
|
62
|
-
number: string;
|
|
63
|
-
suburb: string;
|
|
64
|
-
city: {
|
|
65
|
-
name: string;
|
|
66
|
-
};
|
|
67
|
-
state: {
|
|
68
|
-
name: string;
|
|
69
|
-
country: {
|
|
70
|
-
name: string;
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
zip_code: string;
|
|
74
|
-
};
|
|
75
|
-
shipping_address_id?: string;
|
|
76
|
-
billing_address: {
|
|
77
|
-
street: string;
|
|
78
|
-
number: string;
|
|
79
|
-
suburb: string;
|
|
80
|
-
city: {
|
|
81
|
-
name: string;
|
|
82
|
-
};
|
|
83
|
-
state: {
|
|
84
|
-
name: string;
|
|
85
|
-
country: {
|
|
86
|
-
name: string;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
zip_code: string;
|
|
90
|
-
};
|
|
91
|
-
billing_address_id?: string;
|
|
92
|
-
client?: string;
|
|
93
|
-
customer_order_reference?: string;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type StartCheckoutResponse = {
|
|
97
|
-
status: number;
|
|
98
|
-
message: string;
|
|
99
|
-
psp_response: {
|
|
100
|
-
id: string;
|
|
101
|
-
authorization: number;
|
|
102
|
-
operation_type: string;
|
|
103
|
-
transaction_type: string;
|
|
104
|
-
status: string;
|
|
105
|
-
conciliated: boolean;
|
|
106
|
-
creation_date: string;
|
|
107
|
-
operation_date: string;
|
|
108
|
-
description: string;
|
|
109
|
-
error_message?: string;
|
|
110
|
-
order_id?: string;
|
|
111
|
-
card: {
|
|
112
|
-
type: string;
|
|
113
|
-
brand: string;
|
|
114
|
-
address?: string;
|
|
115
|
-
card_number: string;
|
|
116
|
-
holder_name: string;
|
|
117
|
-
expiration_year: string;
|
|
118
|
-
expiration_month: string;
|
|
119
|
-
allows_charges: boolean;
|
|
120
|
-
allows_payouts: boolean;
|
|
121
|
-
bank_name: string;
|
|
122
|
-
points_type: string;
|
|
123
|
-
points_card: boolean;
|
|
124
|
-
bank_code: number;
|
|
125
|
-
};
|
|
126
|
-
customer_id: string;
|
|
127
|
-
gateway_card_present: string;
|
|
128
|
-
amount: number;
|
|
129
|
-
fee: {
|
|
130
|
-
amount: number;
|
|
131
|
-
tax: number;
|
|
132
|
-
currency: string;
|
|
133
|
-
};
|
|
134
|
-
payment_method: {
|
|
135
|
-
type: string;
|
|
136
|
-
url: string;
|
|
137
|
-
};
|
|
138
|
-
currency: string;
|
|
139
|
-
method: string;
|
|
140
|
-
object: string;
|
|
141
|
-
};
|
|
142
|
-
is_route_finished: Boolean;
|
|
143
|
-
transaction_status: string;
|
|
144
|
-
transaction_id: number;
|
|
145
|
-
payment_id: number;
|
|
146
|
-
provider: string;
|
|
147
|
-
next_action: {
|
|
148
|
-
redirect_to_url: {
|
|
149
|
-
url: string;
|
|
150
|
-
return_url: string;
|
|
151
|
-
verify_transaction_status_url: string;
|
|
152
|
-
};
|
|
153
|
-
iframe_resources?: {
|
|
154
|
-
iframe: string;
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
actions: {
|
|
158
|
-
name: string;
|
|
159
|
-
url: string;
|
|
160
|
-
method: string;
|
|
161
|
-
}[];
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export type TokensResponse = {
|
|
165
|
-
vaultID: string;
|
|
166
|
-
responses: {
|
|
167
|
-
[key: string]: string;
|
|
168
|
-
}[];
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
export type GetCustomerCardsResponse = {
|
|
172
|
-
user_id: number;
|
|
173
|
-
cards: {
|
|
174
|
-
fields: {
|
|
175
|
-
card_scheme: string;
|
|
176
|
-
card_number: string;
|
|
177
|
-
cardholder_name: string;
|
|
178
|
-
cvv: string;
|
|
179
|
-
expiration_month: string;
|
|
180
|
-
expiration_year: string;
|
|
181
|
-
skyflow_id: string;
|
|
182
|
-
};
|
|
183
|
-
}[];
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
export type RegisterCustomerCardResponse = {
|
|
187
|
-
skyflow_id: string;
|
|
188
|
-
user_id: number;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
export type GetSecureTokenResponse = {
|
|
192
|
-
access: string
|
|
1
|
+
import { Business } from "./commons";
|
|
2
|
+
|
|
3
|
+
export interface IErrorResponse extends Error {
|
|
4
|
+
code?: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface GetBusinessResponse extends Business { }
|
|
9
|
+
|
|
10
|
+
export type GetVaultTokenResponse = {
|
|
11
|
+
token: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type CustomerRegisterResponse = {
|
|
15
|
+
id: number | string;
|
|
16
|
+
email: string;
|
|
17
|
+
auth_token: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type CreateOrderResponse = {
|
|
21
|
+
id: number | string;
|
|
22
|
+
created: string;
|
|
23
|
+
amount: string;
|
|
24
|
+
status: string;
|
|
25
|
+
payment_method?: string;
|
|
26
|
+
reference?: string;
|
|
27
|
+
is_oneclick: boolean;
|
|
28
|
+
items: {
|
|
29
|
+
description: string;
|
|
30
|
+
product_reference: string;
|
|
31
|
+
quantity: string;
|
|
32
|
+
price_unit: string;
|
|
33
|
+
discount: string;
|
|
34
|
+
taxes: string;
|
|
35
|
+
amount_total: string;
|
|
36
|
+
}[];
|
|
37
|
+
billing_address?: string;
|
|
38
|
+
shipping_address?: string;
|
|
39
|
+
client: {
|
|
40
|
+
email: string;
|
|
41
|
+
name: string;
|
|
42
|
+
first_name: string;
|
|
43
|
+
last_name: string;
|
|
44
|
+
client_profile: {
|
|
45
|
+
gender: string;
|
|
46
|
+
date_birth?: string;
|
|
47
|
+
terms: boolean;
|
|
48
|
+
phone: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type CreatePaymentResponse = {
|
|
54
|
+
pk: number | string;
|
|
55
|
+
order?: string;
|
|
56
|
+
amount: string;
|
|
57
|
+
status: string;
|
|
58
|
+
date: string;
|
|
59
|
+
paid_date?: string;
|
|
60
|
+
shipping_address: {
|
|
61
|
+
street: string;
|
|
62
|
+
number: string;
|
|
63
|
+
suburb: string;
|
|
64
|
+
city: {
|
|
65
|
+
name: string;
|
|
66
|
+
};
|
|
67
|
+
state: {
|
|
68
|
+
name: string;
|
|
69
|
+
country: {
|
|
70
|
+
name: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
zip_code: string;
|
|
74
|
+
};
|
|
75
|
+
shipping_address_id?: string;
|
|
76
|
+
billing_address: {
|
|
77
|
+
street: string;
|
|
78
|
+
number: string;
|
|
79
|
+
suburb: string;
|
|
80
|
+
city: {
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
state: {
|
|
84
|
+
name: string;
|
|
85
|
+
country: {
|
|
86
|
+
name: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
zip_code: string;
|
|
90
|
+
};
|
|
91
|
+
billing_address_id?: string;
|
|
92
|
+
client?: string;
|
|
93
|
+
customer_order_reference?: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export type StartCheckoutResponse = {
|
|
97
|
+
status: number;
|
|
98
|
+
message: string;
|
|
99
|
+
psp_response: {
|
|
100
|
+
id: string;
|
|
101
|
+
authorization: number;
|
|
102
|
+
operation_type: string;
|
|
103
|
+
transaction_type: string;
|
|
104
|
+
status: string;
|
|
105
|
+
conciliated: boolean;
|
|
106
|
+
creation_date: string;
|
|
107
|
+
operation_date: string;
|
|
108
|
+
description: string;
|
|
109
|
+
error_message?: string;
|
|
110
|
+
order_id?: string;
|
|
111
|
+
card: {
|
|
112
|
+
type: string;
|
|
113
|
+
brand: string;
|
|
114
|
+
address?: string;
|
|
115
|
+
card_number: string;
|
|
116
|
+
holder_name: string;
|
|
117
|
+
expiration_year: string;
|
|
118
|
+
expiration_month: string;
|
|
119
|
+
allows_charges: boolean;
|
|
120
|
+
allows_payouts: boolean;
|
|
121
|
+
bank_name: string;
|
|
122
|
+
points_type: string;
|
|
123
|
+
points_card: boolean;
|
|
124
|
+
bank_code: number;
|
|
125
|
+
};
|
|
126
|
+
customer_id: string;
|
|
127
|
+
gateway_card_present: string;
|
|
128
|
+
amount: number;
|
|
129
|
+
fee: {
|
|
130
|
+
amount: number;
|
|
131
|
+
tax: number;
|
|
132
|
+
currency: string;
|
|
133
|
+
};
|
|
134
|
+
payment_method: {
|
|
135
|
+
type: string;
|
|
136
|
+
url: string;
|
|
137
|
+
};
|
|
138
|
+
currency: string;
|
|
139
|
+
method: string;
|
|
140
|
+
object: string;
|
|
141
|
+
};
|
|
142
|
+
is_route_finished: Boolean;
|
|
143
|
+
transaction_status: string;
|
|
144
|
+
transaction_id: number;
|
|
145
|
+
payment_id: number;
|
|
146
|
+
provider: string;
|
|
147
|
+
next_action: {
|
|
148
|
+
redirect_to_url: {
|
|
149
|
+
url: string;
|
|
150
|
+
return_url: string;
|
|
151
|
+
verify_transaction_status_url: string;
|
|
152
|
+
};
|
|
153
|
+
iframe_resources?: {
|
|
154
|
+
iframe: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
actions: {
|
|
158
|
+
name: string;
|
|
159
|
+
url: string;
|
|
160
|
+
method: string;
|
|
161
|
+
}[];
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export type TokensResponse = {
|
|
165
|
+
vaultID: string;
|
|
166
|
+
responses: {
|
|
167
|
+
[key: string]: string;
|
|
168
|
+
}[];
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export type GetCustomerCardsResponse = {
|
|
172
|
+
user_id: number;
|
|
173
|
+
cards: {
|
|
174
|
+
fields: {
|
|
175
|
+
card_scheme: string;
|
|
176
|
+
card_number: string;
|
|
177
|
+
cardholder_name: string;
|
|
178
|
+
cvv: string;
|
|
179
|
+
expiration_month: string;
|
|
180
|
+
expiration_year: string;
|
|
181
|
+
skyflow_id: string;
|
|
182
|
+
};
|
|
183
|
+
}[];
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export type RegisterCustomerCardResponse = {
|
|
187
|
+
skyflow_id: string;
|
|
188
|
+
user_id: number;
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export type GetSecureTokenResponse = {
|
|
192
|
+
access: string
|
|
193
193
|
}
|
package/src/types/skyflow.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export type SkyflowRecord = {
|
|
2
|
-
method: string;
|
|
3
|
-
quorum?: boolean;
|
|
4
|
-
tableName: string;
|
|
5
|
-
fields?: {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
},
|
|
8
|
-
ID?: string,
|
|
9
|
-
tokenization?: boolean,
|
|
10
|
-
batchID?: string,
|
|
11
|
-
redaction?: "DEFAULT" | "REDACTED" | "MASKED" | "PLAIN_TEXT",
|
|
12
|
-
downloadURL?: boolean,
|
|
13
|
-
upsert?: string,
|
|
14
|
-
tokens?: {
|
|
15
|
-
[key: string]: string;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
export type SkyflowRecord = {
|
|
2
|
+
method: string;
|
|
3
|
+
quorum?: boolean;
|
|
4
|
+
tableName: string;
|
|
5
|
+
fields?: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
},
|
|
8
|
+
ID?: string,
|
|
9
|
+
tokenization?: boolean,
|
|
10
|
+
batchID?: string,
|
|
11
|
+
redaction?: "DEFAULT" | "REDACTED" | "MASKED" | "PLAIN_TEXT",
|
|
12
|
+
downloadURL?: boolean,
|
|
13
|
+
upsert?: string,
|
|
14
|
+
tokens?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
}
|
|
17
|
+
}
|