@payconductor/react 1.0.10 → 1.0.12
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/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +89 -87
- package/dist/index.es.js.map +1 -1
- package/dist/payconductor/hooks/use-tokenize.d.ts +0 -0
- package/dist/payconductor/iframe/types.d.ts +129 -37
- package/dist/payconductor/three-ds/providers/index.d.ts +1 -1
- package/dist/payconductor/tokenizer/index.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/payconductor/tokenizer/{tokenizer.d.ts → handler.d.ts} +0 -0
|
@@ -21,7 +21,7 @@ export declare enum PaymentStatus {
|
|
|
21
21
|
Pending = "pending",
|
|
22
22
|
Failed = "failed"
|
|
23
23
|
}
|
|
24
|
-
export declare enum
|
|
24
|
+
export declare enum ChargeStatusDetail {
|
|
25
25
|
ThreeDsAwaitingChallenge = "ThreeDsAwaitingChallenge"
|
|
26
26
|
}
|
|
27
27
|
export declare enum ThreeDsAuthenticationStatus {
|
|
@@ -59,7 +59,8 @@ export declare enum IntegrationProvider {
|
|
|
59
59
|
PagSmileA55 = "PagSmileA55",
|
|
60
60
|
Avantti = "Avantti",
|
|
61
61
|
MonsterGateway = "MonsterGateway",
|
|
62
|
-
SAC = "SAC"
|
|
62
|
+
SAC = "SAC",
|
|
63
|
+
Lyra = "Lyra"
|
|
63
64
|
}
|
|
64
65
|
export declare enum CardBrand {
|
|
65
66
|
Visa = "Visa",
|
|
@@ -105,7 +106,9 @@ export declare enum CurrencyType {
|
|
|
105
106
|
export declare enum DeviceType {
|
|
106
107
|
Android = "android",
|
|
107
108
|
IOS = "ios",
|
|
108
|
-
Web = "web"
|
|
109
|
+
Web = "web",
|
|
110
|
+
Chrome = "chrome",
|
|
111
|
+
Safari = "safari"
|
|
109
112
|
}
|
|
110
113
|
export declare enum InputStyleKey {
|
|
111
114
|
Padding = "padding",
|
|
@@ -125,6 +128,7 @@ export declare enum OutgoingMessage {
|
|
|
125
128
|
export declare enum IncomingMessage {
|
|
126
129
|
Ready = "Ready",
|
|
127
130
|
Error = "Error",
|
|
131
|
+
CheckoutSessionCreated = "CheckoutSessionCreated",
|
|
128
132
|
PaymentComplete = "PaymentComplete",
|
|
129
133
|
PaymentFailed = "PaymentFailed",
|
|
130
134
|
PaymentPending = "PaymentPending",
|
|
@@ -165,8 +169,21 @@ export type PaymentMethodConfig = {
|
|
|
165
169
|
amount: number;
|
|
166
170
|
}[];
|
|
167
171
|
};
|
|
172
|
+
export type PaymentMethodsWalletsConfig = {
|
|
173
|
+
googlePay?: {
|
|
174
|
+
gateway: string;
|
|
175
|
+
gatewayMerchantId: string;
|
|
176
|
+
merchantName: string;
|
|
177
|
+
};
|
|
178
|
+
applePay?: {
|
|
179
|
+
gateway: string;
|
|
180
|
+
merchantId: string;
|
|
181
|
+
merchantName: string;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
168
184
|
export type PaymentMethodsResponse = {
|
|
169
185
|
methods: PaymentMethod[];
|
|
186
|
+
wallets: PaymentMethodsWalletsConfig;
|
|
170
187
|
config: PaymentMethodsConfig;
|
|
171
188
|
};
|
|
172
189
|
export type PayConductorTheme = {
|
|
@@ -220,7 +237,6 @@ export type PayConductorTheme = {
|
|
|
220
237
|
export declare const defaultTheme: PayConductorTheme;
|
|
221
238
|
export type PayConductorConfig = {
|
|
222
239
|
publicKey: string;
|
|
223
|
-
orderId?: string;
|
|
224
240
|
theme?: PayConductorTheme;
|
|
225
241
|
locale?: string;
|
|
226
242
|
paymentMethods?: PaymentMethod[] | "all";
|
|
@@ -231,6 +247,7 @@ export type PayConductorConfig = {
|
|
|
231
247
|
height?: string;
|
|
232
248
|
/** Required when NuPay is an available payment method */
|
|
233
249
|
nuPayConfig?: NuPayData;
|
|
250
|
+
orderId?: string;
|
|
234
251
|
};
|
|
235
252
|
export type BillingDetails = {
|
|
236
253
|
name: string;
|
|
@@ -266,10 +283,40 @@ export type PaymentMethodResult = {
|
|
|
266
283
|
};
|
|
267
284
|
billingDetails?: BillingDetails;
|
|
268
285
|
};
|
|
286
|
+
export type ThreeDSecureBrowserData = {
|
|
287
|
+
ip?: string;
|
|
288
|
+
userAgent?: string;
|
|
289
|
+
acceptHeader?: string;
|
|
290
|
+
language?: string;
|
|
291
|
+
colorDepth?: string;
|
|
292
|
+
screenHeight?: string;
|
|
293
|
+
screenWidth?: string;
|
|
294
|
+
timeZoneOffset?: string;
|
|
295
|
+
javaEnabled: boolean;
|
|
296
|
+
javaScriptEnabled: boolean;
|
|
297
|
+
};
|
|
298
|
+
export type ThreeDSecureInternalInput = {
|
|
299
|
+
type: "internal";
|
|
300
|
+
authToken?: string;
|
|
301
|
+
dsTransactionId?: string;
|
|
302
|
+
providerTransactionId?: string;
|
|
303
|
+
browser?: ThreeDSecureBrowserData;
|
|
304
|
+
};
|
|
305
|
+
export type ThreeDSecureExternalInput = {
|
|
306
|
+
type: "external";
|
|
307
|
+
status: string;
|
|
308
|
+
eci: string;
|
|
309
|
+
version: string;
|
|
310
|
+
cavv: string;
|
|
311
|
+
providerTransactionId: string;
|
|
312
|
+
directoryTransactionId: string;
|
|
313
|
+
browser?: ThreeDSecureBrowserData;
|
|
314
|
+
};
|
|
315
|
+
export type ThreeDSecureInput = ThreeDSecureInternalInput | ThreeDSecureExternalInput;
|
|
269
316
|
export type PaymentResult = {
|
|
270
317
|
orderId: string;
|
|
271
318
|
status: PaymentStatus;
|
|
272
|
-
statusDetail?:
|
|
319
|
+
statusDetail?: ChargeStatusDetail | string;
|
|
273
320
|
amount: number;
|
|
274
321
|
currency: CurrencyType | string;
|
|
275
322
|
message?: string;
|
|
@@ -286,6 +333,36 @@ export type PaymentResult = {
|
|
|
286
333
|
publicKey?: string;
|
|
287
334
|
dsTransactionId?: string;
|
|
288
335
|
version?: string;
|
|
336
|
+
card?: {
|
|
337
|
+
number: string;
|
|
338
|
+
expMonth: string;
|
|
339
|
+
expYear: string;
|
|
340
|
+
holderName: string;
|
|
341
|
+
};
|
|
342
|
+
customer?: {
|
|
343
|
+
name: string;
|
|
344
|
+
email: string;
|
|
345
|
+
document?: string;
|
|
346
|
+
phones?: Array<{
|
|
347
|
+
countryCode: string;
|
|
348
|
+
areaCode: string;
|
|
349
|
+
number: string;
|
|
350
|
+
type?: string;
|
|
351
|
+
}>;
|
|
352
|
+
};
|
|
353
|
+
amount?: number;
|
|
354
|
+
currency?: string;
|
|
355
|
+
installments?: number;
|
|
356
|
+
billingAddress?: {
|
|
357
|
+
street: string;
|
|
358
|
+
number: string;
|
|
359
|
+
complement?: string;
|
|
360
|
+
district?: string;
|
|
361
|
+
state: string;
|
|
362
|
+
country: string;
|
|
363
|
+
city: string;
|
|
364
|
+
zipCode: string;
|
|
365
|
+
};
|
|
289
366
|
};
|
|
290
367
|
};
|
|
291
368
|
export interface MessagePayload {
|
|
@@ -298,39 +375,8 @@ export interface MessagePayload {
|
|
|
298
375
|
field?: string;
|
|
299
376
|
};
|
|
300
377
|
}
|
|
301
|
-
export type ThreeDSecureBrowserData = {
|
|
302
|
-
ip?: string;
|
|
303
|
-
userAgent?: string;
|
|
304
|
-
acceptHeader?: string;
|
|
305
|
-
language?: string;
|
|
306
|
-
colorDepth?: string;
|
|
307
|
-
screenHeight?: string;
|
|
308
|
-
screenWidth?: string;
|
|
309
|
-
timeZoneOffset?: string;
|
|
310
|
-
javaEnabled: boolean;
|
|
311
|
-
javaScriptEnabled: boolean;
|
|
312
|
-
};
|
|
313
|
-
export type ThreeDSecureInternalInput = {
|
|
314
|
-
type: "internal";
|
|
315
|
-
authToken?: string;
|
|
316
|
-
dsTransactionId?: string;
|
|
317
|
-
providerTransactionId?: string;
|
|
318
|
-
browser?: ThreeDSecureBrowserData;
|
|
319
|
-
};
|
|
320
|
-
export type ThreeDSecureExternalInput = {
|
|
321
|
-
type: "external";
|
|
322
|
-
status: string;
|
|
323
|
-
eci: string;
|
|
324
|
-
version: string;
|
|
325
|
-
cavv: string;
|
|
326
|
-
providerTransactionId: string;
|
|
327
|
-
directoryTransactionId: string;
|
|
328
|
-
browser?: ThreeDSecureBrowserData;
|
|
329
|
-
};
|
|
330
|
-
export type ThreeDSecureInput = ThreeDSecureInternalInput | ThreeDSecureExternalInput;
|
|
331
378
|
export type CardTokenData = {
|
|
332
379
|
token: string;
|
|
333
|
-
firstSixCardNumber?: string;
|
|
334
380
|
};
|
|
335
381
|
export type CardFullData = {
|
|
336
382
|
number: string;
|
|
@@ -369,4 +415,50 @@ export type NuPayPaymentData = {
|
|
|
369
415
|
export type PicPayPaymentData = {
|
|
370
416
|
paymentMethod: PaymentMethod.PicPay;
|
|
371
417
|
};
|
|
372
|
-
export type
|
|
418
|
+
export type GooglePayToken = {
|
|
419
|
+
signature: string;
|
|
420
|
+
intermediateSigningKey: {
|
|
421
|
+
signedKey: string;
|
|
422
|
+
signatures: string[];
|
|
423
|
+
};
|
|
424
|
+
protocolVersion: string;
|
|
425
|
+
signedMessage: string;
|
|
426
|
+
};
|
|
427
|
+
export type ApplePayToken = {
|
|
428
|
+
version: string;
|
|
429
|
+
data: string;
|
|
430
|
+
signature: string;
|
|
431
|
+
header: {
|
|
432
|
+
ephemeralPublicKey: string;
|
|
433
|
+
publicKeyHash: string;
|
|
434
|
+
transactionId: string;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
export type GooglePayPaymentData = {
|
|
438
|
+
paymentMethod: PaymentMethod.GooglePay;
|
|
439
|
+
googlePay: {
|
|
440
|
+
signature: string;
|
|
441
|
+
intermediateSigningKey: {
|
|
442
|
+
signedKey: string;
|
|
443
|
+
signatures: string[];
|
|
444
|
+
};
|
|
445
|
+
protocolVersion: string;
|
|
446
|
+
signedMessage: string;
|
|
447
|
+
};
|
|
448
|
+
installments?: number;
|
|
449
|
+
};
|
|
450
|
+
export type ApplePayPaymentData = {
|
|
451
|
+
paymentMethod: PaymentMethod.ApplePay;
|
|
452
|
+
applePay: {
|
|
453
|
+
version: string;
|
|
454
|
+
data: string;
|
|
455
|
+
signature: string;
|
|
456
|
+
header: {
|
|
457
|
+
ephemeralPublicKey: string;
|
|
458
|
+
publicKeyHash: string;
|
|
459
|
+
transactionId: string;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
installments?: number;
|
|
463
|
+
};
|
|
464
|
+
export type PaymentConfirmData = PixPaymentData | CreditCardPaymentData | BankSlipPaymentData | NuPayPaymentData | PicPayPaymentData | GooglePayPaymentData | ApplePayPaymentData;
|
|
@@ -2,5 +2,5 @@ import { AbstractThreeDSProvider, ThreeDSecureData, ThreeDSecureOptions } from '
|
|
|
2
2
|
import { IntegrationProvider } from '../../iframe/types';
|
|
3
3
|
|
|
4
4
|
type ThreeDSProviderConstructor = new (data: ThreeDSecureData, options: ThreeDSecureOptions) => AbstractThreeDSProvider;
|
|
5
|
-
export declare const threeDSProviders: Partial<Record<IntegrationProvider
|
|
5
|
+
export declare const threeDSProviders: Partial<Record<IntegrationProvider, ThreeDSProviderConstructor>>;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PayConductorTokenizerSDK } from './
|
|
1
|
+
export { PayConductorTokenizerSDK } from './handler';
|
package/package.json
CHANGED
|
File without changes
|