@tonder.io/ionic-lite-sdk 0.0.35-beta.8 → 0.0.37-beta.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/.gitlab-ci.yml +28 -28
- package/README.md +532 -202
- package/dist/classes/BaseInlineCheckout.d.ts +21 -19
- package/dist/classes/errorResponse.d.ts +1 -1
- package/dist/classes/liteCheckout.d.ts +15 -43
- package/dist/data/api.d.ts +1 -1
- package/dist/data/businessApi.d.ts +1 -1
- package/dist/data/cardApi.d.ts +1 -1
- package/dist/data/checkoutApi.d.ts +2 -1
- package/dist/data/customerApi.d.ts +1 -1
- package/dist/data/paymentMethodApi.d.ts +2 -2
- package/dist/helpers/skyflow.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/types/card.d.ts +1 -0
- package/dist/types/checkout.d.ts +7 -1
- package/dist/types/commons.d.ts +8 -3
- package/dist/types/customer.d.ts +10 -0
- package/{src → dist}/types/liteInlineCheckout.d.ts +33 -73
- package/dist/types/responses.d.ts +3 -0
- package/jest.config.ts +14 -14
- package/package.json +41 -38
- package/rollup.config.js +16 -16
- package/src/classes/3dsHandler.ts +237 -237
- package/src/classes/BaseInlineCheckout.ts +385 -356
- package/src/classes/errorResponse.ts +16 -16
- package/src/classes/liteCheckout.ts +588 -598
- package/src/data/api.ts +20 -20
- package/src/data/businessApi.ts +18 -18
- package/src/data/cardApi.ts +85 -89
- package/src/data/checkoutApi.ts +84 -87
- 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 -10
- 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 -34
- package/src/types/checkout.ts +123 -117
- package/src/types/commons.ts +130 -125
- package/src/types/customer.ts +22 -12
- package/src/types/liteInlineCheckout.ts +216 -0
- package/src/types/paymentMethod.ts +23 -23
- package/src/types/requests.ts +114 -114
- package/src/types/responses.ts +193 -189
- 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 -142
- package/tests/methods/createPayment.test.ts +121 -122
- package/tests/methods/customerRegister.test.ts +118 -119
- package/tests/methods/getBusiness.test.ts +114 -115
- package/tests/methods/getCustomerCards.test.ts +112 -113
- 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/types/classes/liteCheckout.d.ts +29 -0
- package/types/classes/liteCheckout.js +225 -0
- package/types/classes/liteCheckout.js.map +1 -0
- package/types/helpers/utils.d.ts +3 -0
- package/types/helpers/utils.js +27 -0
- package/types/helpers/utils.js.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.js +6 -0
- package/types/index.js.map +1 -0
- package/.idea/aws.xml +0 -17
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/prettier.xml +0 -6
- package/.idea/vcs.xml +0 -6
- package/.idea/workspace.xml +0 -133
- package/src/types/index.d.ts +0 -10
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
const PAYMENT_METHOD_APM = Object.freeze({
|
|
2
|
-
SORIANA: "SORIANA",
|
|
3
|
-
OXXO: "OXXO",
|
|
4
|
-
SPEI: "SPEI",
|
|
5
|
-
CODI: "CODI",
|
|
6
|
-
MERCADOPAGO: "MERCADOPAGO",
|
|
7
|
-
PAYPAL: "PAYPAL",
|
|
8
|
-
COMERCIALMEXICANA: "COMERCIALMEXICANA",
|
|
9
|
-
BANCOMER: "BANCOMER",
|
|
10
|
-
WALMART: "WALMART",
|
|
11
|
-
BODEGA: "BODEGA",
|
|
12
|
-
SAMSCLUB: "SAMSCLUB",
|
|
13
|
-
SUPERAMA: "SUPERAMA",
|
|
14
|
-
CALIMAX: "CALIMAX",
|
|
15
|
-
EXTRA: "EXTRA",
|
|
16
|
-
CIRCULOK: "CIRCULOK",
|
|
17
|
-
SEVEN11: "7ELEVEN",
|
|
18
|
-
TELECOMM: "TELECOMM",
|
|
19
|
-
BANORTE: "BANORTE",
|
|
20
|
-
BENAVIDES: "BENAVIDES",
|
|
21
|
-
DELAHORRO: "DELAHORRO",
|
|
22
|
-
ELASTURIANO: "ELASTURIANO",
|
|
23
|
-
WALDOS: "WALDOS",
|
|
24
|
-
ALSUPER: "ALSUPER",
|
|
25
|
-
KIOSKO: "KIOSKO",
|
|
26
|
-
STAMARIA: "STAMARIA",
|
|
27
|
-
LAMASBARATA: "LAMASBARATA",
|
|
28
|
-
FARMROMA: "FARMROMA",
|
|
29
|
-
FARMUNION: "FARMUNION",
|
|
30
|
-
FARMATODO: "FARMATODO",
|
|
31
|
-
SFDEASIS: "SFDEASIS",
|
|
32
|
-
FARM911: "FARM911",
|
|
33
|
-
FARMECONOMICAS: "FARMECONOMICAS",
|
|
34
|
-
FARMMEDICITY: "FARMMEDICITY",
|
|
35
|
-
RIANXEIRA: "RIANXEIRA",
|
|
36
|
-
WESTERNUNION: "WESTERNUNION",
|
|
37
|
-
ZONAPAGO: "ZONAPAGO",
|
|
38
|
-
CAJALOSANDES: "CAJALOSANDES",
|
|
39
|
-
CAJAPAITA: "CAJAPAITA",
|
|
40
|
-
CAJASANTA: "CAJASANTA",
|
|
41
|
-
CAJASULLANA: "CAJASULLANA",
|
|
42
|
-
CAJATRUJILLO: "CAJATRUJILLO",
|
|
43
|
-
EDPYME: "EDPYME",
|
|
44
|
-
KASNET: "KASNET",
|
|
45
|
-
NORANDINO: "NORANDINO",
|
|
46
|
-
QAPAQ: "QAPAQ",
|
|
47
|
-
RAIZ: "RAIZ",
|
|
48
|
-
PAYSER: "PAYSER",
|
|
49
|
-
WUNION: "WUNION",
|
|
50
|
-
BANCOCONTINENTAL: "BANCOCONTINENTAL",
|
|
51
|
-
GMONEY: "GMONEY",
|
|
52
|
-
GOPAY: "GOPAY",
|
|
53
|
-
WU: "WU",
|
|
54
|
-
PUNTOSHEY: "PUNTOSHEY",
|
|
55
|
-
AMPM: "AMPM",
|
|
56
|
-
JUMBOMARKET: "JUMBOMARKET",
|
|
57
|
-
SMELPUEBLO: "SMELPUEBLO",
|
|
58
|
-
BAM: "BAM",
|
|
59
|
-
REFACIL: "REFACIL",
|
|
60
|
-
ACYVALORES: "ACYVALORES",
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
export { PAYMENT_METHOD_APM };
|
|
1
|
+
const PAYMENT_METHOD_APM = Object.freeze({
|
|
2
|
+
SORIANA: "SORIANA",
|
|
3
|
+
OXXO: "OXXO",
|
|
4
|
+
SPEI: "SPEI",
|
|
5
|
+
CODI: "CODI",
|
|
6
|
+
MERCADOPAGO: "MERCADOPAGO",
|
|
7
|
+
PAYPAL: "PAYPAL",
|
|
8
|
+
COMERCIALMEXICANA: "COMERCIALMEXICANA",
|
|
9
|
+
BANCOMER: "BANCOMER",
|
|
10
|
+
WALMART: "WALMART",
|
|
11
|
+
BODEGA: "BODEGA",
|
|
12
|
+
SAMSCLUB: "SAMSCLUB",
|
|
13
|
+
SUPERAMA: "SUPERAMA",
|
|
14
|
+
CALIMAX: "CALIMAX",
|
|
15
|
+
EXTRA: "EXTRA",
|
|
16
|
+
CIRCULOK: "CIRCULOK",
|
|
17
|
+
SEVEN11: "7ELEVEN",
|
|
18
|
+
TELECOMM: "TELECOMM",
|
|
19
|
+
BANORTE: "BANORTE",
|
|
20
|
+
BENAVIDES: "BENAVIDES",
|
|
21
|
+
DELAHORRO: "DELAHORRO",
|
|
22
|
+
ELASTURIANO: "ELASTURIANO",
|
|
23
|
+
WALDOS: "WALDOS",
|
|
24
|
+
ALSUPER: "ALSUPER",
|
|
25
|
+
KIOSKO: "KIOSKO",
|
|
26
|
+
STAMARIA: "STAMARIA",
|
|
27
|
+
LAMASBARATA: "LAMASBARATA",
|
|
28
|
+
FARMROMA: "FARMROMA",
|
|
29
|
+
FARMUNION: "FARMUNION",
|
|
30
|
+
FARMATODO: "FARMATODO",
|
|
31
|
+
SFDEASIS: "SFDEASIS",
|
|
32
|
+
FARM911: "FARM911",
|
|
33
|
+
FARMECONOMICAS: "FARMECONOMICAS",
|
|
34
|
+
FARMMEDICITY: "FARMMEDICITY",
|
|
35
|
+
RIANXEIRA: "RIANXEIRA",
|
|
36
|
+
WESTERNUNION: "WESTERNUNION",
|
|
37
|
+
ZONAPAGO: "ZONAPAGO",
|
|
38
|
+
CAJALOSANDES: "CAJALOSANDES",
|
|
39
|
+
CAJAPAITA: "CAJAPAITA",
|
|
40
|
+
CAJASANTA: "CAJASANTA",
|
|
41
|
+
CAJASULLANA: "CAJASULLANA",
|
|
42
|
+
CAJATRUJILLO: "CAJATRUJILLO",
|
|
43
|
+
EDPYME: "EDPYME",
|
|
44
|
+
KASNET: "KASNET",
|
|
45
|
+
NORANDINO: "NORANDINO",
|
|
46
|
+
QAPAQ: "QAPAQ",
|
|
47
|
+
RAIZ: "RAIZ",
|
|
48
|
+
PAYSER: "PAYSER",
|
|
49
|
+
WUNION: "WUNION",
|
|
50
|
+
BANCOCONTINENTAL: "BANCOCONTINENTAL",
|
|
51
|
+
GMONEY: "GMONEY",
|
|
52
|
+
GOPAY: "GOPAY",
|
|
53
|
+
WU: "WU",
|
|
54
|
+
PUNTOSHEY: "PUNTOSHEY",
|
|
55
|
+
AMPM: "AMPM",
|
|
56
|
+
JUMBOMARKET: "JUMBOMARKET",
|
|
57
|
+
SMELPUEBLO: "SMELPUEBLO",
|
|
58
|
+
BAM: "BAM",
|
|
59
|
+
REFACIL: "REFACIL",
|
|
60
|
+
ACYVALORES: "ACYVALORES",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export { PAYMENT_METHOD_APM };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const TONDER_URL_BY_MODE = Object.freeze({
|
|
2
|
-
production: "https://app.tonder.io",
|
|
3
|
-
sandbox: "https://sandbox.tonder.io",
|
|
4
|
-
stage: "https://stage.tonder.io",
|
|
5
|
-
development: "http://localhost:8000",
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export { TONDER_URL_BY_MODE };
|
|
1
|
+
const TONDER_URL_BY_MODE = Object.freeze({
|
|
2
|
+
production: "https://app.tonder.io",
|
|
3
|
+
sandbox: "https://sandbox.tonder.io",
|
|
4
|
+
stage: "https://stage.tonder.io",
|
|
5
|
+
development: "http://localhost:8000",
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { TONDER_URL_BY_MODE };
|
package/src/types/card.ts
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
export interface ICard {
|
|
2
|
-
fields: ICardSkyflowFields;
|
|
3
|
-
icon?: string;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export interface ICardSkyflowFields {
|
|
7
|
-
card_number: string;
|
|
8
|
-
expiration_month: string;
|
|
9
|
-
expiration_year: string;
|
|
10
|
-
skyflow_id: string;
|
|
11
|
-
card_scheme: string;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
export interface ICard {
|
|
2
|
+
fields: ICardSkyflowFields;
|
|
3
|
+
icon?: string;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ICardSkyflowFields {
|
|
7
|
+
card_number: string;
|
|
8
|
+
expiration_month: string;
|
|
9
|
+
expiration_year: string;
|
|
10
|
+
skyflow_id: string;
|
|
11
|
+
card_scheme: string;
|
|
12
|
+
cardholder_name: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ICustomerCardsResponse {
|
|
16
|
+
user_id: number;
|
|
17
|
+
cards: ICard[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ISaveCardResponse {
|
|
21
|
+
skyflow_id: string;
|
|
22
|
+
user_id: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ISaveCardSkyflowRequest {
|
|
26
|
+
skyflow_id: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ISaveCardRequest {
|
|
30
|
+
card_number: string;
|
|
31
|
+
cvv: string;
|
|
32
|
+
expiration_month: string;
|
|
33
|
+
expiration_year: string;
|
|
34
|
+
cardholder_name: string;
|
|
35
|
+
}
|
package/src/types/checkout.ts
CHANGED
|
@@ -1,118 +1,124 @@
|
|
|
1
|
-
import {ICustomer} from "./customer";
|
|
2
|
-
|
|
3
|
-
export interface IStartCheckoutRequestBase {
|
|
4
|
-
name: any;
|
|
5
|
-
last_name: string;
|
|
6
|
-
email_client: any;
|
|
7
|
-
phone_number: any;
|
|
8
|
-
return_url?: string;
|
|
9
|
-
id_product: string;
|
|
10
|
-
quantity_product: number;
|
|
11
|
-
id_ship: string;
|
|
12
|
-
instance_id_ship: string;
|
|
13
|
-
amount: any;
|
|
14
|
-
title_ship: string;
|
|
15
|
-
description: string;
|
|
16
|
-
device_session_id: any;
|
|
17
|
-
token_id: string;
|
|
18
|
-
order_id: any;
|
|
19
|
-
business_id: any;
|
|
20
|
-
payment_id: any;
|
|
21
|
-
source: string;
|
|
22
|
-
browser_info?: any;
|
|
23
|
-
metadata: any;
|
|
24
|
-
currency: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type IStartCheckoutRequestWithCard = IStartCheckoutRequestBase & {
|
|
28
|
-
card: any;
|
|
29
|
-
payment_method?: never;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type IStartCheckoutRequestWithPaymentMethod =
|
|
33
|
-
IStartCheckoutRequestBase & {
|
|
34
|
-
card?: never;
|
|
35
|
-
payment_method: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type IStartCheckoutRequest =
|
|
39
|
-
| IStartCheckoutRequestWithCard
|
|
40
|
-
| IStartCheckoutRequestWithPaymentMethod;
|
|
41
|
-
|
|
42
|
-
export interface IStartCheckoutIdRequest {
|
|
43
|
-
checkout_id: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface IStartCheckoutErrorResponse {
|
|
47
|
-
status: string;
|
|
48
|
-
message: string;
|
|
49
|
-
psp_response: [
|
|
50
|
-
{
|
|
51
|
-
status: number;
|
|
52
|
-
response: Object;
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
checkout_id: string;
|
|
56
|
-
is_route_finished: boolean;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface IStartCheckoutResponse {
|
|
60
|
-
status: string;
|
|
61
|
-
message: string;
|
|
62
|
-
psp_response: Record<string, any>;
|
|
63
|
-
checkout_id: string;
|
|
64
|
-
is_route_finished: Boolean;
|
|
65
|
-
transaction_status: string;
|
|
66
|
-
transaction_id: number;
|
|
67
|
-
payment_id: number;
|
|
68
|
-
provider: string;
|
|
69
|
-
next_action: {
|
|
70
|
-
redirect_to_url
|
|
71
|
-
url: string;
|
|
72
|
-
return_url: string;
|
|
73
|
-
verify_transaction_status_url: string;
|
|
74
|
-
};
|
|
75
|
-
iframe_resources?: {
|
|
76
|
-
iframe: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
actions: IStartCheckoutActionResponse[];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export interface IStartCheckoutActionResponse {
|
|
83
|
-
name: string;
|
|
84
|
-
url: string;
|
|
85
|
-
method: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
export interface IItem {
|
|
90
|
-
description: string;
|
|
91
|
-
quantity: number;
|
|
92
|
-
price_unit: number;
|
|
93
|
-
discount: number;
|
|
94
|
-
taxes: number;
|
|
95
|
-
product_reference: string | number;
|
|
96
|
-
name: string;
|
|
97
|
-
amount_total: number;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export interface IProcessPaymentRequest {
|
|
101
|
-
customer: ICustomer;
|
|
102
|
-
cart: {
|
|
103
|
-
total: string | number;
|
|
104
|
-
items: IItem[];
|
|
105
|
-
};
|
|
106
|
-
metadata?: Record<string, any>;
|
|
107
|
-
currency?: string;
|
|
108
|
-
payment_method?: string;
|
|
109
|
-
card?: ICardFields | string;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1
|
+
import {ICustomer} from "./customer";
|
|
2
|
+
|
|
3
|
+
export interface IStartCheckoutRequestBase {
|
|
4
|
+
name: any;
|
|
5
|
+
last_name: string;
|
|
6
|
+
email_client: any;
|
|
7
|
+
phone_number: any;
|
|
8
|
+
return_url?: string;
|
|
9
|
+
id_product: string;
|
|
10
|
+
quantity_product: number;
|
|
11
|
+
id_ship: string;
|
|
12
|
+
instance_id_ship: string;
|
|
13
|
+
amount: any;
|
|
14
|
+
title_ship: string;
|
|
15
|
+
description: string;
|
|
16
|
+
device_session_id: any;
|
|
17
|
+
token_id: string;
|
|
18
|
+
order_id: any;
|
|
19
|
+
business_id: any;
|
|
20
|
+
payment_id: any;
|
|
21
|
+
source: string;
|
|
22
|
+
browser_info?: any;
|
|
23
|
+
metadata: any;
|
|
24
|
+
currency: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type IStartCheckoutRequestWithCard = IStartCheckoutRequestBase & {
|
|
28
|
+
card: any;
|
|
29
|
+
payment_method?: never;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type IStartCheckoutRequestWithPaymentMethod =
|
|
33
|
+
IStartCheckoutRequestBase & {
|
|
34
|
+
card?: never;
|
|
35
|
+
payment_method: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type IStartCheckoutRequest =
|
|
39
|
+
| IStartCheckoutRequestWithCard
|
|
40
|
+
| IStartCheckoutRequestWithPaymentMethod;
|
|
41
|
+
|
|
42
|
+
export interface IStartCheckoutIdRequest {
|
|
43
|
+
checkout_id: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface IStartCheckoutErrorResponse {
|
|
47
|
+
status: string;
|
|
48
|
+
message: string;
|
|
49
|
+
psp_response: [
|
|
50
|
+
{
|
|
51
|
+
status: number;
|
|
52
|
+
response: Object;
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
checkout_id: string;
|
|
56
|
+
is_route_finished: boolean;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface IStartCheckoutResponse {
|
|
60
|
+
status: string;
|
|
61
|
+
message: string;
|
|
62
|
+
psp_response: Record<string, any>;
|
|
63
|
+
checkout_id: string;
|
|
64
|
+
is_route_finished: Boolean;
|
|
65
|
+
transaction_status: string;
|
|
66
|
+
transaction_id: number;
|
|
67
|
+
payment_id: number;
|
|
68
|
+
provider: string;
|
|
69
|
+
next_action: {
|
|
70
|
+
redirect_to_url?: {
|
|
71
|
+
url: string;
|
|
72
|
+
return_url: string;
|
|
73
|
+
verify_transaction_status_url: string;
|
|
74
|
+
};
|
|
75
|
+
iframe_resources?: {
|
|
76
|
+
iframe: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
actions: IStartCheckoutActionResponse[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface IStartCheckoutActionResponse {
|
|
83
|
+
name: string;
|
|
84
|
+
url: string;
|
|
85
|
+
method: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export interface IItem {
|
|
90
|
+
description: string;
|
|
91
|
+
quantity: number;
|
|
92
|
+
price_unit: number;
|
|
93
|
+
discount: number;
|
|
94
|
+
taxes: number;
|
|
95
|
+
product_reference: string | number;
|
|
96
|
+
name: string;
|
|
97
|
+
amount_total: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface IProcessPaymentRequest {
|
|
101
|
+
customer: ICustomer;
|
|
102
|
+
cart: {
|
|
103
|
+
total: string | number;
|
|
104
|
+
items: IItem[];
|
|
105
|
+
};
|
|
106
|
+
metadata?: Record<string, any>;
|
|
107
|
+
currency?: string;
|
|
108
|
+
payment_method?: string;
|
|
109
|
+
card?: ICardFields | string;
|
|
110
|
+
isSandbox?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* @deprecated This property is deprecated and will be removed in a future release.
|
|
113
|
+
* Use the `returnUrl` field when creating the instance of LiteCheckout or InlineCheckout.
|
|
114
|
+
*/
|
|
115
|
+
returnUrl?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface ICardFields {
|
|
119
|
+
card_number: string;
|
|
120
|
+
cvv: string;
|
|
121
|
+
expiration_month: string;
|
|
122
|
+
expiration_year: string;
|
|
123
|
+
cardholder_name: string;
|
|
118
124
|
}
|