@yosle/tropipayjs 0.1.22 → 0.1.24
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/.nvmrc +1 -1
- package/.vscode/launch.json +18 -18
- package/LICENSE +9 -9
- package/README.md +152 -152
- package/api/TropipayAPI.d.ts +2 -0
- package/docs/readme.md +3 -3
- package/globals.d.ts +75 -75
- package/index.d.ts +11 -6
- package/index.js +910 -870
- package/interfaces/countries/index.d.ts +1 -1
- package/interfaces/index.d.ts +9 -6
- package/jest.config.js +5 -5
- package/package.json +49 -49
- package/paymentcard/paymentcard.spec.d.ts +1 -1
- package/rollup.config.js +24 -24
- package/src/api/TropipayAPI.ts +383 -338
- package/src/config/TropipayConfig.ts +2 -2
- package/src/constants/TropipayConstants.ts +2 -2
- package/src/depositAccount/depositAccounts.ts +139 -139
- package/src/hooks/TropipayHooks.ts +154 -154
- package/src/index.ts +28 -28
- package/src/interfaces/depositaccounts/index.ts +70 -70
- package/src/interfaces/index.js +1 -1
- package/src/interfaces/index.ts +201 -197
- package/src/interfaces/mediation/index.ts +22 -22
- package/src/interfaces/paymentlink/index.d.ts +36 -36
- package/src/interfaces/paymentlink/index.js +2 -2
- package/src/interfaces/paymentlink/index.ts +91 -91
- package/src/mediationPaymentCard/MediationPaymentCard.ts +42 -42
- package/src/paymentcard/PaymentCard.ts +123 -123
- package/src/paymentcard/paymentcard.spec.ts +79 -79
- package/src/utils/TropipayUtils.ts +126 -126
- package/src/utils/errors.ts +92 -92
- package/tsconfig.json +96 -96
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
export interface DepositAccountConfig {
|
|
2
|
-
searchValue?: string;
|
|
3
|
-
alias: string;
|
|
4
|
-
userRelationTypeId: number;
|
|
5
|
-
beneficiaryType: BeneficiaryType;
|
|
6
|
-
searchBy?: number;
|
|
7
|
-
accountNumber?: string;
|
|
8
|
-
swift?: string;
|
|
9
|
-
type: DepositAccountType;
|
|
10
|
-
firstName?: string;
|
|
11
|
-
lastName?: string;
|
|
12
|
-
secondLastName?: string;
|
|
13
|
-
countryDestinationId?: number;
|
|
14
|
-
city?: string;
|
|
15
|
-
postalCode?: number;
|
|
16
|
-
address?: string;
|
|
17
|
-
documentNumber?: string;
|
|
18
|
-
phone?: string;
|
|
19
|
-
province?: string;
|
|
20
|
-
paymentType?: string;
|
|
21
|
-
documentTypeId?: number;
|
|
22
|
-
documentExpirationDate: string;
|
|
23
|
-
}
|
|
24
|
-
type INTERNAL = 1;
|
|
25
|
-
type EXTERNAL = 2;
|
|
26
|
-
|
|
27
|
-
export type BeneficiaryType = INTERNAL | EXTERNAL;
|
|
28
|
-
|
|
29
|
-
export const DepositAccountTypesList = {
|
|
30
|
-
/**
|
|
31
|
-
* Banco Metropolitano (Cuba) Bank Account
|
|
32
|
-
*/
|
|
33
|
-
BANMET_BANK_ACCOUNT: 0,
|
|
34
|
-
/**
|
|
35
|
-
* Banco Popular de Ahorro
|
|
36
|
-
*/
|
|
37
|
-
BPA_BANK_ACCOUNT: 1,
|
|
38
|
-
/**
|
|
39
|
-
* Banco de Credito y Comercio (Cuba) Bank Account
|
|
40
|
-
*/
|
|
41
|
-
BANDEC_BANK_ACCOUNT: 2,
|
|
42
|
-
/**
|
|
43
|
-
* Banco Metropilitano (Cuba) card
|
|
44
|
-
*/
|
|
45
|
-
BANMET_CARD: 3,
|
|
46
|
-
/**
|
|
47
|
-
* Banco Popular de Ahorro (Cuba) card
|
|
48
|
-
*/
|
|
49
|
-
BPA_CARD: 4,
|
|
50
|
-
/**
|
|
51
|
-
* Not available anymore
|
|
52
|
-
* @deprecated
|
|
53
|
-
*/
|
|
54
|
-
AIS_CUC_CARD: 5,
|
|
55
|
-
/**
|
|
56
|
-
* Not available
|
|
57
|
-
* @deprecated
|
|
58
|
-
*/
|
|
59
|
-
AIS_USD_CARD: 6,
|
|
60
|
-
/**
|
|
61
|
-
* For international bank accounts
|
|
62
|
-
*/
|
|
63
|
-
OTHER: 7,
|
|
64
|
-
/**
|
|
65
|
-
* Banco de Credito y comercio card
|
|
66
|
-
*/
|
|
67
|
-
BANDEC_CARD: 8,
|
|
68
|
-
} as const;
|
|
69
|
-
|
|
70
|
-
export type DepositAccountType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11;
|
|
1
|
+
export interface DepositAccountConfig {
|
|
2
|
+
searchValue?: string;
|
|
3
|
+
alias: string;
|
|
4
|
+
userRelationTypeId: number;
|
|
5
|
+
beneficiaryType: BeneficiaryType;
|
|
6
|
+
searchBy?: number;
|
|
7
|
+
accountNumber?: string;
|
|
8
|
+
swift?: string;
|
|
9
|
+
type: DepositAccountType;
|
|
10
|
+
firstName?: string;
|
|
11
|
+
lastName?: string;
|
|
12
|
+
secondLastName?: string;
|
|
13
|
+
countryDestinationId?: number;
|
|
14
|
+
city?: string;
|
|
15
|
+
postalCode?: number;
|
|
16
|
+
address?: string;
|
|
17
|
+
documentNumber?: string;
|
|
18
|
+
phone?: string;
|
|
19
|
+
province?: string;
|
|
20
|
+
paymentType?: string;
|
|
21
|
+
documentTypeId?: number;
|
|
22
|
+
documentExpirationDate: string;
|
|
23
|
+
}
|
|
24
|
+
type INTERNAL = 1;
|
|
25
|
+
type EXTERNAL = 2;
|
|
26
|
+
|
|
27
|
+
export type BeneficiaryType = INTERNAL | EXTERNAL;
|
|
28
|
+
|
|
29
|
+
export const DepositAccountTypesList = {
|
|
30
|
+
/**
|
|
31
|
+
* Banco Metropolitano (Cuba) Bank Account
|
|
32
|
+
*/
|
|
33
|
+
BANMET_BANK_ACCOUNT: 0,
|
|
34
|
+
/**
|
|
35
|
+
* Banco Popular de Ahorro
|
|
36
|
+
*/
|
|
37
|
+
BPA_BANK_ACCOUNT: 1,
|
|
38
|
+
/**
|
|
39
|
+
* Banco de Credito y Comercio (Cuba) Bank Account
|
|
40
|
+
*/
|
|
41
|
+
BANDEC_BANK_ACCOUNT: 2,
|
|
42
|
+
/**
|
|
43
|
+
* Banco Metropilitano (Cuba) card
|
|
44
|
+
*/
|
|
45
|
+
BANMET_CARD: 3,
|
|
46
|
+
/**
|
|
47
|
+
* Banco Popular de Ahorro (Cuba) card
|
|
48
|
+
*/
|
|
49
|
+
BPA_CARD: 4,
|
|
50
|
+
/**
|
|
51
|
+
* Not available anymore
|
|
52
|
+
* @deprecated
|
|
53
|
+
*/
|
|
54
|
+
AIS_CUC_CARD: 5,
|
|
55
|
+
/**
|
|
56
|
+
* Not available
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
59
|
+
AIS_USD_CARD: 6,
|
|
60
|
+
/**
|
|
61
|
+
* For international bank accounts
|
|
62
|
+
*/
|
|
63
|
+
OTHER: 7,
|
|
64
|
+
/**
|
|
65
|
+
* Banco de Credito y comercio card
|
|
66
|
+
*/
|
|
67
|
+
BANDEC_CARD: 8,
|
|
68
|
+
} as const;
|
|
69
|
+
|
|
70
|
+
export type DepositAccountType = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11;
|
package/src/interfaces/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,197 +1,201 @@
|
|
|
1
|
-
import { ServerMode } from "../constants/TropipayConstants";
|
|
2
|
-
|
|
3
|
-
export type AccountBalance = {
|
|
4
|
-
balance: number;
|
|
5
|
-
pendingIn: number;
|
|
6
|
-
pendingOut: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export interface TropipayConfig {
|
|
10
|
-
clientId: string;
|
|
11
|
-
clientSecret: string;
|
|
12
|
-
scopes?: string[];
|
|
13
|
-
serverMode?: ServerMode;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| "
|
|
21
|
-
| "
|
|
22
|
-
| "
|
|
23
|
-
| "
|
|
24
|
-
| "
|
|
25
|
-
| "
|
|
26
|
-
| "
|
|
27
|
-
| "
|
|
28
|
-
| "
|
|
29
|
-
| "
|
|
30
|
-
| "
|
|
31
|
-
| "
|
|
32
|
-
| "
|
|
33
|
-
| "
|
|
34
|
-
| "
|
|
35
|
-
| "
|
|
36
|
-
| "
|
|
37
|
-
| "
|
|
38
|
-
| "
|
|
39
|
-
| "
|
|
40
|
-
| "
|
|
41
|
-
| "
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
export type
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
1
|
+
import { ServerMode } from "../constants/TropipayConstants";
|
|
2
|
+
|
|
3
|
+
export type AccountBalance = {
|
|
4
|
+
balance: number;
|
|
5
|
+
pendingIn: number;
|
|
6
|
+
pendingOut: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export interface TropipayConfig {
|
|
10
|
+
clientId: string;
|
|
11
|
+
clientSecret: string;
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
serverMode?: ServerMode;
|
|
14
|
+
// Custom tropipay environment for testing
|
|
15
|
+
customTropipayUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type TropipayCredentials = { clientId: string; clientSecret: string };
|
|
19
|
+
export type HookEventType =
|
|
20
|
+
| "transaction_completed"
|
|
21
|
+
| "transaction_charged"
|
|
22
|
+
| "transaction_guarded"
|
|
23
|
+
| "user_signup"
|
|
24
|
+
| "user_kyc"
|
|
25
|
+
| "payment_in_state_change"
|
|
26
|
+
| "payment_out_state_change"
|
|
27
|
+
| "beneficiary_added"
|
|
28
|
+
| "beneficiary_updated"
|
|
29
|
+
| "beneficiary_deleted"
|
|
30
|
+
| "transaction_new"
|
|
31
|
+
| "transaction_preauthorized"
|
|
32
|
+
| "transaction_pendingin"
|
|
33
|
+
| "transaction_processing"
|
|
34
|
+
| "transaction_error"
|
|
35
|
+
| "transaction_bloqued"
|
|
36
|
+
| "transaction_guarded_send"
|
|
37
|
+
| "transaction_guarded_mediation"
|
|
38
|
+
| "user_after_update"
|
|
39
|
+
| "user_after_create"
|
|
40
|
+
| "userDetail_after_create"
|
|
41
|
+
| "userDetail_after_update"
|
|
42
|
+
| "tpv_callback_ok"
|
|
43
|
+
| "fraud_state_on_change";
|
|
44
|
+
|
|
45
|
+
export type HookTargetType = "web" | "email";
|
|
46
|
+
export interface UserHook {
|
|
47
|
+
event: HookEventType;
|
|
48
|
+
target: string;
|
|
49
|
+
value: string;
|
|
50
|
+
}
|
|
51
|
+
export interface UserHookSubscribed extends UserHook {
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface UserHook {
|
|
57
|
+
event: HookEventType;
|
|
58
|
+
target: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}
|
|
61
|
+
export interface UserHookSubscribed extends UserHook {
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface PaymentLinkPayload {
|
|
67
|
+
reference: string;
|
|
68
|
+
concept: string;
|
|
69
|
+
favorite: boolean;
|
|
70
|
+
amount: number;
|
|
71
|
+
currency: string;
|
|
72
|
+
description: string;
|
|
73
|
+
singleUse: boolean;
|
|
74
|
+
reasonId: number;
|
|
75
|
+
expirationDays: number;
|
|
76
|
+
lang: string;
|
|
77
|
+
urlSuccess: string;
|
|
78
|
+
urlFailed: string;
|
|
79
|
+
urlNotification: string;
|
|
80
|
+
serviceDate: string;
|
|
81
|
+
client?: {
|
|
82
|
+
name?: string;
|
|
83
|
+
lastName?: string;
|
|
84
|
+
address?: string;
|
|
85
|
+
phone?: string;
|
|
86
|
+
email?: string;
|
|
87
|
+
countryId?: number;
|
|
88
|
+
countryIso?: string;
|
|
89
|
+
city: string;
|
|
90
|
+
postCode: string;
|
|
91
|
+
termsAndConditions: boolean;
|
|
92
|
+
} | null;
|
|
93
|
+
directPayment: boolean;
|
|
94
|
+
paymentMethods?: string[];
|
|
95
|
+
imageBase?: string;
|
|
96
|
+
saveToken?: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface PaymentLink extends PaymentLinkPayload {
|
|
100
|
+
expirationDate: string;
|
|
101
|
+
hasClient: boolean;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
createdAt: string;
|
|
104
|
+
qrImage: string;
|
|
105
|
+
shortUrl: string;
|
|
106
|
+
paymentUrl: string;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface MediationPaymentCardConfig {
|
|
110
|
+
amount: number;
|
|
111
|
+
currency: "EUR" | "USD";
|
|
112
|
+
concept: string;
|
|
113
|
+
description: string;
|
|
114
|
+
reference: string;
|
|
115
|
+
singleUse: boolean;
|
|
116
|
+
lang: string;
|
|
117
|
+
productUrl?: string;
|
|
118
|
+
buyer: null | any;
|
|
119
|
+
seller: {
|
|
120
|
+
sellerId?: number;
|
|
121
|
+
type?: number;
|
|
122
|
+
email?: string;
|
|
123
|
+
};
|
|
124
|
+
feePercent?: number;
|
|
125
|
+
feeFixed?: number;
|
|
126
|
+
sendMail: boolean;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export type LoginResponse = {
|
|
130
|
+
access_token: string;
|
|
131
|
+
refresh_token: string;
|
|
132
|
+
token_type: "Bearer";
|
|
133
|
+
expires_in: number;
|
|
134
|
+
scope: string;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type LoginError = {
|
|
138
|
+
error: string;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type Country = {
|
|
142
|
+
id: number;
|
|
143
|
+
name: string;
|
|
144
|
+
sepaZone: boolean;
|
|
145
|
+
state: number;
|
|
146
|
+
slug: string;
|
|
147
|
+
slugn: number;
|
|
148
|
+
callingCode: number;
|
|
149
|
+
isDestination: boolean;
|
|
150
|
+
isRisky: boolean;
|
|
151
|
+
currentCurrency: string | null;
|
|
152
|
+
createdAt: string;
|
|
153
|
+
updatedAt: string;
|
|
154
|
+
isFavorite: boolean;
|
|
155
|
+
position: any;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export type Deposit = {
|
|
159
|
+
id: number;
|
|
160
|
+
accountNumber: string;
|
|
161
|
+
alias: string;
|
|
162
|
+
swift: string;
|
|
163
|
+
type: number;
|
|
164
|
+
country: number | null;
|
|
165
|
+
firstName: string;
|
|
166
|
+
default: null;
|
|
167
|
+
state: number;
|
|
168
|
+
userId: string;
|
|
169
|
+
countryDestinationId: number;
|
|
170
|
+
lastName: string;
|
|
171
|
+
documentNumber: number;
|
|
172
|
+
userRelationTypeId: number;
|
|
173
|
+
city: string;
|
|
174
|
+
postalCode: string;
|
|
175
|
+
address: string;
|
|
176
|
+
phone: string;
|
|
177
|
+
checked: boolean;
|
|
178
|
+
province: string;
|
|
179
|
+
beneficiaryType: number;
|
|
180
|
+
relatedUserId: null | string;
|
|
181
|
+
currency: string;
|
|
182
|
+
correspondent?: any;
|
|
183
|
+
location: any;
|
|
184
|
+
office: any;
|
|
185
|
+
officeValue: any;
|
|
186
|
+
paymentType: number;
|
|
187
|
+
paymentEntityBeneficiaryId: number;
|
|
188
|
+
paymentEntityAccountId: number;
|
|
189
|
+
verified: any;
|
|
190
|
+
paymentEntityInfo: any;
|
|
191
|
+
documentTypeId: any;
|
|
192
|
+
documentExpirationDate: Date;
|
|
193
|
+
createdAt: Date;
|
|
194
|
+
updatedAt: Date;
|
|
195
|
+
countryDestination: Country;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type AccountDeposits = {
|
|
199
|
+
count: number;
|
|
200
|
+
rows: Deposit[];
|
|
201
|
+
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export interface mediationPaymentCardConfig {
|
|
6
|
-
amount: number //5000,
|
|
7
|
-
currency: "EUR" | "USD",
|
|
8
|
-
concept: string //Celular,
|
|
9
|
-
description: string,
|
|
10
|
-
reference: string, //458424548,
|
|
11
|
-
singleUse: boolean,
|
|
12
|
-
lang: string// es,
|
|
13
|
-
productUrl?: string,
|
|
14
|
-
buyer: null | any //null,
|
|
15
|
-
seller: {
|
|
16
|
-
sellerId?: number,
|
|
17
|
-
type?: number,
|
|
18
|
-
email?: string
|
|
19
|
-
},
|
|
20
|
-
feePercent?: number,//in cents
|
|
21
|
-
feeFixed?: number,
|
|
22
|
-
sendMail: boolean
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export interface mediationPaymentCardConfig {
|
|
6
|
+
amount: number //5000,
|
|
7
|
+
currency: "EUR" | "USD",
|
|
8
|
+
concept: string //Celular,
|
|
9
|
+
description: string,
|
|
10
|
+
reference: string, //458424548,
|
|
11
|
+
singleUse: boolean,
|
|
12
|
+
lang: string// es,
|
|
13
|
+
productUrl?: string,
|
|
14
|
+
buyer: null | any //null,
|
|
15
|
+
seller: {
|
|
16
|
+
sellerId?: number,
|
|
17
|
+
type?: number,
|
|
18
|
+
email?: string
|
|
19
|
+
},
|
|
20
|
+
feePercent?: number,//in cents
|
|
21
|
+
feeFixed?: number,
|
|
22
|
+
sendMail: boolean
|
|
23
23
|
}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
export interface PaymentLinkPayload {
|
|
2
|
-
reference: string;
|
|
3
|
-
concept: string;
|
|
4
|
-
favorite: boolean;
|
|
5
|
-
amount: number;
|
|
6
|
-
currency: string;
|
|
7
|
-
description: string;
|
|
8
|
-
singleUse: boolean;
|
|
9
|
-
reasonId: number;
|
|
10
|
-
expirationDays: number;
|
|
11
|
-
lang: string;
|
|
12
|
-
urlSuccess: string;
|
|
13
|
-
urlFailed: string;
|
|
14
|
-
urlNotification: string;
|
|
15
|
-
serviceDate: string;
|
|
16
|
-
client: {
|
|
17
|
-
name: string;
|
|
18
|
-
lastName: string;
|
|
19
|
-
address: string;
|
|
20
|
-
phone: string;
|
|
21
|
-
email: string;
|
|
22
|
-
countryId: number;
|
|
23
|
-
termsAndConditions: boolean;
|
|
24
|
-
};
|
|
25
|
-
directPayment: boolean;
|
|
26
|
-
paymentMethods?: string[];
|
|
27
|
-
}
|
|
28
|
-
export interface PaymentLink extends PaymentLinkPayload {
|
|
29
|
-
expirationDate: string;
|
|
30
|
-
hasClient: boolean;
|
|
31
|
-
updatedAt: string;
|
|
32
|
-
createdAt: string;
|
|
33
|
-
qrImage: string;
|
|
34
|
-
shortUrl: string;
|
|
35
|
-
paymentUrl: string;
|
|
36
|
-
}
|
|
1
|
+
export interface PaymentLinkPayload {
|
|
2
|
+
reference: string;
|
|
3
|
+
concept: string;
|
|
4
|
+
favorite: boolean;
|
|
5
|
+
amount: number;
|
|
6
|
+
currency: string;
|
|
7
|
+
description: string;
|
|
8
|
+
singleUse: boolean;
|
|
9
|
+
reasonId: number;
|
|
10
|
+
expirationDays: number;
|
|
11
|
+
lang: string;
|
|
12
|
+
urlSuccess: string;
|
|
13
|
+
urlFailed: string;
|
|
14
|
+
urlNotification: string;
|
|
15
|
+
serviceDate: string;
|
|
16
|
+
client: {
|
|
17
|
+
name: string;
|
|
18
|
+
lastName: string;
|
|
19
|
+
address: string;
|
|
20
|
+
phone: string;
|
|
21
|
+
email: string;
|
|
22
|
+
countryId: number;
|
|
23
|
+
termsAndConditions: boolean;
|
|
24
|
+
};
|
|
25
|
+
directPayment: boolean;
|
|
26
|
+
paymentMethods?: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface PaymentLink extends PaymentLinkPayload {
|
|
29
|
+
expirationDate: string;
|
|
30
|
+
hasClient: boolean;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
createdAt: string;
|
|
33
|
+
qrImage: string;
|
|
34
|
+
shortUrl: string;
|
|
35
|
+
paymentUrl: string;
|
|
36
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=index.js.map
|