@payconductor/react 1.0.4 → 1.0.6
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 +14 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +914 -877
- package/dist/index.es.js.map +1 -1
- package/dist/payconductor/constants.d.ts +1 -1
- package/dist/payconductor/iframe/constants.d.ts +1 -1
- package/dist/payconductor/iframe/types.d.ts +86 -5
- package/dist/payconductor/internal.d.ts +1 -1
- package/dist/payconductor/payconductor.d.ts +3 -0
- package/dist/payconductor/three-ds/api.d.ts +12 -0
- package/dist/payconductor/three-ds/handler.d.ts +2 -1
- package/dist/payconductor/three-ds/providers/index.d.ts +1 -1
- package/dist/payconductor/three-ds/types.d.ts +5 -2
- package/dist/payconductor/tokenize/api.d.ts +4 -3
- package/dist/payconductor/tokenize/providers/index.d.ts +2 -1
- package/dist/payconductor/tokenize/types.d.ts +2 -15
- package/dist/payconductor/types.d.ts +0 -3
- package/package.json +1 -1
|
@@ -21,6 +21,87 @@ export declare enum PaymentStatus {
|
|
|
21
21
|
Pending = "pending",
|
|
22
22
|
Failed = "failed"
|
|
23
23
|
}
|
|
24
|
+
export declare enum StatusDetail {
|
|
25
|
+
ThreeDsAwaitingChallenge = "ThreeDsAwaitingChallenge"
|
|
26
|
+
}
|
|
27
|
+
export declare enum ThreeDsAuthenticationStatus {
|
|
28
|
+
Authenticated = "Authenticated",
|
|
29
|
+
NotAuthenticated = "NotAuthenticated",
|
|
30
|
+
NeedChallenge = "NeedChallenge"
|
|
31
|
+
}
|
|
32
|
+
export declare enum ThreeDSResultStatus {
|
|
33
|
+
Pending = "Pending",
|
|
34
|
+
Authenticated = "Authenticated",
|
|
35
|
+
Failed = "Failed",
|
|
36
|
+
NotEnrolled = "NotEnrolled"
|
|
37
|
+
}
|
|
38
|
+
export declare enum DocumentType {
|
|
39
|
+
Cpf = "Cpf",
|
|
40
|
+
Cnpj = "Cnpj"
|
|
41
|
+
}
|
|
42
|
+
export declare enum IntegrationProvider {
|
|
43
|
+
Asaas = "Asaas",
|
|
44
|
+
Sandbox = "Sandbox",
|
|
45
|
+
SandboxSplit = "SandboxSplit",
|
|
46
|
+
MercadoPago = "MercadoPago",
|
|
47
|
+
NuPay = "NuPay",
|
|
48
|
+
PicPay = "PicPay",
|
|
49
|
+
Woovi = "Woovi",
|
|
50
|
+
EfiBank = "EfiBank",
|
|
51
|
+
BrasPag = "BrasPag",
|
|
52
|
+
PagarMe = "PagarMe",
|
|
53
|
+
BancoDoBrasil = "BancoDoBrasil",
|
|
54
|
+
PagSeguro = "PagSeguro",
|
|
55
|
+
Ebanx = "Ebanx",
|
|
56
|
+
OnlyUp = "OnlyUp",
|
|
57
|
+
Barte = "Barte",
|
|
58
|
+
BarteSplit = "BarteSplit",
|
|
59
|
+
PagSmileA55 = "PagSmileA55",
|
|
60
|
+
Avantti = "Avantti",
|
|
61
|
+
MonsterGateway = "MonsterGateway",
|
|
62
|
+
SAC = "SAC"
|
|
63
|
+
}
|
|
64
|
+
export declare enum CardBrand {
|
|
65
|
+
Visa = "Visa",
|
|
66
|
+
Mastercard = "Mastercard",
|
|
67
|
+
AmericanExpress = "AmericanExpress",
|
|
68
|
+
DinersClub = "DinersClub",
|
|
69
|
+
Discover = "Discover",
|
|
70
|
+
JCB = "JCB",
|
|
71
|
+
UnionPay = "UnionPay",
|
|
72
|
+
Maestro = "Maestro",
|
|
73
|
+
Mir = "Mir",
|
|
74
|
+
Elo = "Elo",
|
|
75
|
+
Hiper = "Hiper",
|
|
76
|
+
Hipercard = "Hipercard",
|
|
77
|
+
Verve = "Verve",
|
|
78
|
+
Unknown = "Unknown"
|
|
79
|
+
}
|
|
80
|
+
export declare enum OrganizationEnvironment {
|
|
81
|
+
Production = "Production",
|
|
82
|
+
Sandbox = "Sandbox"
|
|
83
|
+
}
|
|
84
|
+
export declare enum CurrencyType {
|
|
85
|
+
USD = "USD",
|
|
86
|
+
EUR = "EUR",
|
|
87
|
+
BRL = "BRL",
|
|
88
|
+
ARS = "ARS",
|
|
89
|
+
CAD = "CAD",
|
|
90
|
+
COP = "COP",
|
|
91
|
+
GBP = "GBP",
|
|
92
|
+
JPY = "JPY",
|
|
93
|
+
MXN = "MXN",
|
|
94
|
+
MZN = "MZN",
|
|
95
|
+
CNY = "CNY",
|
|
96
|
+
SAR = "SAR",
|
|
97
|
+
ETH = "ETH",
|
|
98
|
+
BNB = "BNB",
|
|
99
|
+
BTC = "BTC",
|
|
100
|
+
USDT = "USDT",
|
|
101
|
+
USDC = "USDC",
|
|
102
|
+
DOGE = "DOGE",
|
|
103
|
+
SOL = "SOL"
|
|
104
|
+
}
|
|
24
105
|
export declare enum DeviceType {
|
|
25
106
|
Android = "android",
|
|
26
107
|
IOS = "ios",
|
|
@@ -188,16 +269,16 @@ export type PaymentMethodResult = {
|
|
|
188
269
|
export type PaymentResult = {
|
|
189
270
|
orderId: string;
|
|
190
271
|
status: PaymentStatus;
|
|
191
|
-
statusDetail?: string;
|
|
272
|
+
statusDetail?: StatusDetail | string;
|
|
192
273
|
amount: number;
|
|
193
|
-
currency: string;
|
|
274
|
+
currency: CurrencyType | string;
|
|
194
275
|
message?: string;
|
|
195
276
|
errorCode?: string;
|
|
196
277
|
errorMessage?: string;
|
|
197
278
|
threeDSecure?: {
|
|
198
|
-
status: string;
|
|
199
|
-
acquirer?: string;
|
|
200
|
-
environment?:
|
|
279
|
+
status: ThreeDsAuthenticationStatus | string;
|
|
280
|
+
acquirer?: IntegrationProvider | "PayConductor" | string;
|
|
281
|
+
environment?: OrganizationEnvironment;
|
|
201
282
|
authToken?: string;
|
|
202
283
|
threeDsUrl?: string;
|
|
203
284
|
creq?: string;
|
|
@@ -8,4 +8,4 @@ export declare function validatePayment(iframe: HTMLIFrameElement | Element | un
|
|
|
8
8
|
export declare function resetPayment(iframe: HTMLIFrameElement | Element | undefined, pendingMap: Map<string, PendingRequest> | null): Promise<void>;
|
|
9
9
|
export declare function sendConfig(iframe: HTMLIFrameElement | Element | undefined, pendingMap: Map<string, PendingRequest> | null, config: Pick<PayConductorConfig, "theme" | "locale" | "paymentMethods" | "defaultPaymentMethod" | "showPaymentButtons" | "nuPayConfig">): Promise<void>;
|
|
10
10
|
export declare function sendInit(iframe: HTMLIFrameElement | Element | undefined, pendingMap: Map<string, PendingRequest> | null, config: PayConductorConfig): Promise<void>;
|
|
11
|
-
export declare function handleMessageEvent(event: MessageEvent, pendingMap: Map<string, PendingRequest> | null, setError: (value: string | null) => void, onReady?: () => void, onError?: (error: Error) => void, onPaymentComplete?: (data: PaymentResult) => void, onPaymentFailed?: (data: PaymentResult) => void, onPaymentPending?: (data: PaymentResult) => void, onPaymentMethodSelected?: (method: PaymentMethod) => void): void;
|
|
11
|
+
export declare function handleMessageEvent(event: MessageEvent, pendingMap: Map<string, PendingRequest> | null, setError: (value: string | null) => void, onReady?: () => void, onError?: (error: Error) => void, onPaymentComplete?: (data: PaymentResult) => void, onPaymentFailed?: (data: PaymentResult) => void, onPaymentPending?: (data: PaymentResult) => void, onPaymentMethodSelected?: (method: PaymentMethod) => void, onThreeDSChallenge?: () => void, onThreeDSComplete?: () => void, onThreeDSFailed?: () => void): void;
|
|
@@ -9,6 +9,9 @@ export interface PayConductorEmbedProps extends Omit<PayConductorConfig, "orderI
|
|
|
9
9
|
onPaymentFailed?: (result: PaymentResult) => void;
|
|
10
10
|
onPaymentPending?: (result: PaymentResult) => void;
|
|
11
11
|
onPaymentMethodSelected?: (method: PaymentMethod) => void;
|
|
12
|
+
onThreeDSChallenge?: () => void;
|
|
13
|
+
onThreeDSComplete?: () => void;
|
|
14
|
+
onThreeDSFailed?: () => void;
|
|
12
15
|
}
|
|
13
16
|
declare function PayConductor(props: PayConductorEmbedProps): import("react/jsx-runtime").JSX.Element;
|
|
14
17
|
export default PayConductor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PayConductorThreeDSApiError extends Error {
|
|
2
|
+
readonly title?: unknown | undefined;
|
|
3
|
+
constructor(message: string, title?: unknown | undefined);
|
|
4
|
+
}
|
|
5
|
+
export declare class PayConductorThreeDSApi {
|
|
6
|
+
private readonly publicKey;
|
|
7
|
+
constructor(publicKey: string);
|
|
8
|
+
completeManualChallenge(orderId: string, providerTransactionId: string): Promise<void>;
|
|
9
|
+
private parseResponseError;
|
|
10
|
+
private get baseUrl();
|
|
11
|
+
private get headers();
|
|
12
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ThreeDSecureData, ThreeDSecureOptions, ThreeDSecureResult } from './types';
|
|
2
|
+
import { IntegrationProvider } from '../iframe/types';
|
|
2
3
|
|
|
3
4
|
export declare class PayConductor3DSSDK {
|
|
4
5
|
private readonly data;
|
|
5
6
|
private provider;
|
|
6
7
|
constructor(threeDSecure: ThreeDSecureData);
|
|
7
8
|
get needsChallenge(): boolean;
|
|
8
|
-
get acquirer():
|
|
9
|
+
get acquirer(): IntegrationProvider | "PayConductor" | undefined;
|
|
9
10
|
authenticate(options?: Omit<ThreeDSecureOptions, "threeDSecure">): Promise<ThreeDSecureResult>;
|
|
10
11
|
destroy(): void;
|
|
11
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbstractThreeDSProvider, ThreeDSecureData, ThreeDSecureOptions } from '../types';
|
|
2
|
-
import { IntegrationProvider } from '../../
|
|
2
|
+
import { IntegrationProvider } from '../../iframe/types';
|
|
3
3
|
|
|
4
4
|
type ThreeDSProviderConstructor = new (data: ThreeDSecureData, options: ThreeDSecureOptions) => AbstractThreeDSProvider;
|
|
5
5
|
export declare const threeDSProviders: Partial<Record<IntegrationProvider | "PayConductor", ThreeDSProviderConstructor>>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { IntegrationProvider, OrganizationEnvironment } from '../iframe/types';
|
|
2
|
+
|
|
1
3
|
export type ThreeDSecureData = {
|
|
4
|
+
orderId: string;
|
|
2
5
|
status?: string;
|
|
3
6
|
statusDetail?: string;
|
|
4
|
-
acquirer?:
|
|
5
|
-
environment?:
|
|
7
|
+
acquirer?: IntegrationProvider | "PayConductor";
|
|
8
|
+
environment?: OrganizationEnvironment;
|
|
6
9
|
authToken?: string;
|
|
7
10
|
threeDsUrl?: string;
|
|
8
11
|
creq?: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { CreateCustomerCard,
|
|
1
|
+
import { CreateCustomerCard, SaveTokensBody } from './types';
|
|
2
|
+
import { IntegrationProvider } from '../iframe/types';
|
|
2
3
|
|
|
3
|
-
export declare class
|
|
4
|
+
export declare class PayConductorTokenizeApiError extends Error {
|
|
4
5
|
readonly title?: unknown | undefined;
|
|
5
6
|
constructor(message: string, title?: unknown | undefined);
|
|
6
7
|
}
|
|
7
|
-
export declare class
|
|
8
|
+
export declare class PayConductorTokenizeApi {
|
|
8
9
|
private readonly publicKey;
|
|
9
10
|
constructor(publicKey: string);
|
|
10
11
|
getSettings(): Promise<{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AbstractTokenizeProvider, TokenizeProviderInput
|
|
1
|
+
import { AbstractTokenizeProvider, TokenizeProviderInput } from '../types';
|
|
2
|
+
import { IntegrationProvider } from '../../iframe/types';
|
|
2
3
|
|
|
3
4
|
type TokenizeProviderConstructor = new (input: TokenizeProviderInput) => AbstractTokenizeProvider;
|
|
4
5
|
export declare const tokenizeProviders: Partial<Record<IntegrationProvider, TokenizeProviderConstructor>>;
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Cnpj = "Cnpj"
|
|
4
|
-
}
|
|
5
|
-
export declare enum IntegrationProvider {
|
|
6
|
-
Asaas = "Asaas",
|
|
7
|
-
Sandbox = "Sandbox",
|
|
8
|
-
MercadoPago = "MercadoPago",
|
|
9
|
-
NuPay = "NuPay",
|
|
10
|
-
PicPay = "PicPay",
|
|
11
|
-
Woovi = "Woovi",
|
|
12
|
-
PagarMe = "PagarMe",
|
|
13
|
-
PagSeguro = "PagSeguro",
|
|
14
|
-
BancoDoBrasil = "BancoDoBrasil"
|
|
15
|
-
}
|
|
1
|
+
import { DocumentType, IntegrationProvider } from '../iframe/types';
|
|
2
|
+
|
|
16
3
|
export type CreateCustomerInput = {
|
|
17
4
|
documentNumber: string;
|
|
18
5
|
documentType: `${DocumentType}`;
|
|
@@ -4,9 +4,6 @@ export * from './iframe/types';
|
|
|
4
4
|
export type ConfirmPaymentOptions = {
|
|
5
5
|
orderId: string;
|
|
6
6
|
returnUrl?: string;
|
|
7
|
-
onThreeDSChallenge?: () => void;
|
|
8
|
-
onThreeDSComplete?: () => void;
|
|
9
|
-
onThreeDSError?: (error: Error) => void;
|
|
10
7
|
};
|
|
11
8
|
export type SubmitResult = {
|
|
12
9
|
error?: {
|