@payfurl/client 4.9.10 → 4.10.0
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/CHANGELOG.md +109 -0
- package/README.md +183 -42
- package/dist/sdk/{CloseIcon-DhsqodgI.js → CloseIcon-B65NDIbM.js} +2 -2
- package/dist/sdk/{DefaultThreeDsProvider-qhlEMnGb.js → DefaultThreeDsProvider-CzqbXEws.js} +1 -1
- package/dist/sdk/{MetricsGlobalThreeDsProvider-BOEA6G5r.js → MetricsGlobalThreeDsProvider-B-EQQsEV.js} +18 -18
- package/dist/sdk/{PayWayAppleButton-ziK0EEr8.js → PayWayAppleButton-C-XfcgNS.js} +1 -1
- package/dist/sdk/{alerts-2ShoA1hc.js → alerts-BvNnAm_q.js} +1 -1
- package/dist/sdk/{cxpay-B2_DeDZt.js → cxpay-VbaQA3_P.js} +1 -1
- package/dist/sdk/{default-2G4dbyeg.js → default-Diji0SXY.js} +1 -1
- package/dist/sdk/{ecentric-kLMDhKl_.js → ecentric-BlNDCZo_.js} +18 -17
- package/dist/sdk/{epna-p_tBGPK3.js → epna-CxmJ_mqR.js} +1 -1
- package/dist/sdk/{flashbanc-ChTsnYMc.js → flashbanc-BAxvqtBB.js} +1 -1
- package/dist/sdk/{forter-BKH-4F0d.js → forter-R2alfHeE.js} +8 -8
- package/dist/sdk/{gpayments-Sa7Ek9FT.js → gpayments-B5KWQV4S.js} +13 -13
- package/dist/sdk/{metrics_global-CxURr43F.js → metrics_global-HMMDzPlb.js} +1 -1
- package/dist/sdk/{nmi-Bq5IGnP2.js → nmi-Ch7qQ6Av.js} +1 -1
- package/dist/sdk/{nuvei-BDdU_s1G.js → nuvei-DRmlfpTL.js} +4 -4
- package/dist/sdk/{payabli-4-XnuYBw.js → payabli-CiBJ1-vC.js} +1 -1
- package/dist/sdk/payfurl.d.ts +439 -0
- package/dist/sdk/payfurl.es.js +1524 -1527
- package/dist/sdk/payfurl.umd.js +8 -8
- package/dist/sdk/{payglocal-9n0hrZAf.js → payglocal-uAPlijwL.js} +38 -37
- package/dist/sdk/{payway_rest-vCmhadiN.js → payway_rest-CjgIP42z.js} +1 -1
- package/dist/sdk/redact-Bn_hfytX.js +46 -0
- package/dist/sdk/{skybank-BIJrZVJd.js → skybank-D7uRF17E.js} +1 -1
- package/dist/sdk/{strings-ahZ6LOKg.js → strings-BthDdeA6.js} +18 -14
- package/dist/sdk/style.css +1 -1
- package/package.json +9 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Et as e, Ot as t, Tt as n, Z as r, dt as i, h as a, n as o, vt as s, xt as c } from "./CloseIcon-
|
|
2
|
-
import { t as l } from "./DefaultThreeDsProvider-
|
|
1
|
+
import { Et as e, Ot as t, Tt as n, Z as r, dt as i, h as a, n as o, vt as s, xt as c } from "./CloseIcon-B65NDIbM.js";
|
|
2
|
+
import { t as l } from "./DefaultThreeDsProvider-CzqbXEws.js";
|
|
3
3
|
// src/sdk/3ds/nuvei.vue?vue&type=script&setup=true&lang.ts
|
|
4
4
|
var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
5
5
|
__name: "nuvei",
|
|
@@ -34,7 +34,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
34
34
|
}, document.head.appendChild(e);
|
|
35
35
|
});
|
|
36
36
|
function l() {
|
|
37
|
-
|
|
37
|
+
let e = window.SafeCharge({
|
|
38
38
|
env: a.env,
|
|
39
39
|
merchantId: a.merchantId,
|
|
40
40
|
merchantSiteId: a.merchantSiteId
|
|
@@ -72,7 +72,7 @@ var u = { class: "mask" }, d = /*#__PURE__*/ r(/* @__PURE__ */ n({
|
|
|
72
72
|
}
|
|
73
73
|
return (e, n) => (t(), c("div", u, [...n[0] ||= [s("div", { class: "wrapper" }, [s("div", { class: "container" })], -1)]]));
|
|
74
74
|
}
|
|
75
|
-
}), [["__scopeId", "data-v-
|
|
75
|
+
}), [["__scopeId", "data-v-299db412"]]), { hideSpinner: f } = o(), p = class extends l {
|
|
76
76
|
_paResPayload = null;
|
|
77
77
|
getType() {
|
|
78
78
|
return "Nuvei";
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
export declare type AddCardLeastCostOptionsType = {
|
|
2
|
+
threeDSEmail?: string;
|
|
3
|
+
clickToPayEnabled?: boolean;
|
|
4
|
+
clickToPayOptions?: ClickToPayOptionsType;
|
|
5
|
+
style?: string;
|
|
6
|
+
tokenAuthenticationEnabled?: boolean;
|
|
7
|
+
createNetworkToken?: boolean;
|
|
8
|
+
networkTokenOptions?: NetworkTokenOptionsType;
|
|
9
|
+
vault?: boolean;
|
|
10
|
+
verifyCard?: boolean;
|
|
11
|
+
metadata?: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export declare type AddCardOptionsType = {
|
|
17
|
+
threeDSEmail?: string;
|
|
18
|
+
amount?: number;
|
|
19
|
+
currency?: string;
|
|
20
|
+
clickToPayEnabled?: boolean;
|
|
21
|
+
clickToPayOptions?: ClickToPayOptionsType;
|
|
22
|
+
style?: string;
|
|
23
|
+
tokenAuthenticationEnabled?: boolean;
|
|
24
|
+
createNetworkToken?: boolean;
|
|
25
|
+
networkTokenOptions?: NetworkTokenOptionsType;
|
|
26
|
+
vault?: boolean;
|
|
27
|
+
verifyCard?: boolean;
|
|
28
|
+
metadata?: {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export declare type AddressInfoType = {
|
|
34
|
+
firstName: string;
|
|
35
|
+
lastName: string;
|
|
36
|
+
email: string;
|
|
37
|
+
phoneNumber: string;
|
|
38
|
+
streetAddress: string;
|
|
39
|
+
streetAddress2: string;
|
|
40
|
+
city: string;
|
|
41
|
+
country: string;
|
|
42
|
+
region: string;
|
|
43
|
+
postalCode: string;
|
|
44
|
+
state: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export declare type AddSavedPaymentMethodsOptionsType = {
|
|
48
|
+
amount: number;
|
|
49
|
+
currency: string;
|
|
50
|
+
tokenAuthenticationEnabled?: boolean;
|
|
51
|
+
networkTokenOptions?: NetworkTokenOptionsType;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export declare type ApplePayMerchantCapabilityType = "supports3DS" | "supportsCredit" | "supportsDebit" | "supportsEMV";
|
|
55
|
+
|
|
56
|
+
export declare type ApplePayOptionsType = {
|
|
57
|
+
lineItemLabel?: string;
|
|
58
|
+
/** @deprecated Derived server-side from the authenticated account. Ignored; removed next major. */
|
|
59
|
+
merchantIdentifier?: string;
|
|
60
|
+
/** @deprecated Ignored -- the SDK now sends window.location.hostname. Removed next major. */
|
|
61
|
+
domainName?: string;
|
|
62
|
+
/** @deprecated Derived server-side from the authenticated account. Ignored; removed next major. */
|
|
63
|
+
displayName?: string;
|
|
64
|
+
providerId?: string;
|
|
65
|
+
providerType?: string;
|
|
66
|
+
clientParameters?: {
|
|
67
|
+
[key: string]: string;
|
|
68
|
+
};
|
|
69
|
+
metadata?: {
|
|
70
|
+
[key: string]: string;
|
|
71
|
+
};
|
|
72
|
+
countryCode?: string;
|
|
73
|
+
merchantCapabilities?: ApplePayMerchantCapabilityType[];
|
|
74
|
+
supportedNetworks?: string[];
|
|
75
|
+
supportedCountries?: string[];
|
|
76
|
+
applePayVersion?: number;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare enum CardBrandType {
|
|
80
|
+
mastercard = "mastercard",
|
|
81
|
+
maestro = "maestro",
|
|
82
|
+
visa = "visa",
|
|
83
|
+
amex = "amex",
|
|
84
|
+
discover = "discover"
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare type CardDetailsType = {
|
|
88
|
+
bin?: string;
|
|
89
|
+
last4?: string;
|
|
90
|
+
expiryDate?: string;
|
|
91
|
+
cardholder?: string;
|
|
92
|
+
cardType?: string;
|
|
93
|
+
scheme?: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export declare type CheckoutOptionsType = {
|
|
97
|
+
taxAmount?: number;
|
|
98
|
+
shippingAmount?: number;
|
|
99
|
+
discountAmount?: number;
|
|
100
|
+
orderItems?: OrderItemType[];
|
|
101
|
+
customer?: CustomerInfoType;
|
|
102
|
+
billingAddress?: AddressInfoType;
|
|
103
|
+
metadata?: {
|
|
104
|
+
[key: string]: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export declare type ClickToPayOptionsType = {
|
|
109
|
+
dpaId: string;
|
|
110
|
+
dpaName?: string;
|
|
111
|
+
useFpan?: boolean;
|
|
112
|
+
cardBrands?: `${CardBrandType}`[];
|
|
113
|
+
dpaBillingPreference?: `${DpaBillingPreferenceType}`;
|
|
114
|
+
confirmPayment?: boolean;
|
|
115
|
+
locale?: string;
|
|
116
|
+
savedCardsOptions?: SavedCardsOptionsType;
|
|
117
|
+
saveCard?: boolean;
|
|
118
|
+
tokenAuthenticationEnabled?: boolean;
|
|
119
|
+
networkTokenOptions?: NetworkTokenOptionsType;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export declare type CustomerInfoType = {
|
|
123
|
+
firstName: string;
|
|
124
|
+
lastName: string;
|
|
125
|
+
email: string;
|
|
126
|
+
phoneNumber: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
declare enum DpaBillingPreferenceType {
|
|
130
|
+
NONE = "NONE",
|
|
131
|
+
FULL = "FULL",
|
|
132
|
+
POSTAL_COUNTRY = "POSTAL_COUNTRY"
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export declare type DropInApplePayOptionsType = {
|
|
136
|
+
providerId?: string;
|
|
137
|
+
providerType?: string;
|
|
138
|
+
lineItemLabel?: string;
|
|
139
|
+
/** @deprecated Derived server-side from the authenticated account. Ignored; removed next major. */
|
|
140
|
+
merchantIdentifier?: string;
|
|
141
|
+
/** @deprecated Ignored -- the SDK now sends window.location.hostname. Removed next major. */
|
|
142
|
+
domainName?: string;
|
|
143
|
+
/** @deprecated Derived server-side from the authenticated account. Ignored; removed next major. */
|
|
144
|
+
displayName?: string;
|
|
145
|
+
clientParameters?: {
|
|
146
|
+
[key: string]: string;
|
|
147
|
+
};
|
|
148
|
+
countryCode?: string;
|
|
149
|
+
merchantCapabilities?: ApplePayMerchantCapabilityType[];
|
|
150
|
+
supportedNetworks?: string[];
|
|
151
|
+
supportedCountries?: string[];
|
|
152
|
+
applePayVersion?: number;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare type DropInGooglePayOptionsType = {
|
|
156
|
+
providerId?: string;
|
|
157
|
+
gateway?: string;
|
|
158
|
+
googlePayGatewayMerchantId?: string;
|
|
159
|
+
googlePayMerchantId?: string;
|
|
160
|
+
googlePayMerchantName?: string;
|
|
161
|
+
buttonOptions?: GooglePayButtonOptionsType;
|
|
162
|
+
billingDetailsRequired?: boolean;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare type DropInOptionsType = {
|
|
166
|
+
paypalButtonStyle?: string;
|
|
167
|
+
paypalEnablePayIn4?: boolean;
|
|
168
|
+
cardProviderId?: string;
|
|
169
|
+
paypalProviderId?: string;
|
|
170
|
+
payToProviderId?: string;
|
|
171
|
+
threeDsProviderId?: string;
|
|
172
|
+
threeDSEmail?: string;
|
|
173
|
+
payToMaximumAmount?: number;
|
|
174
|
+
payToDescription?: string;
|
|
175
|
+
upiOptions?: UpiOptionsType;
|
|
176
|
+
googlePayOptions?: DropInGooglePayOptionsType;
|
|
177
|
+
applePayOptions?: DropInApplePayOptionsType;
|
|
178
|
+
clickToPayEnabled?: boolean;
|
|
179
|
+
clickToPayOptions?: ClickToPayOptionsType;
|
|
180
|
+
cardFormStyle?: string;
|
|
181
|
+
tokenAuthenticationEnabled?: boolean;
|
|
182
|
+
createNetworkToken?: boolean;
|
|
183
|
+
networkTokenOptions?: NetworkTokenOptionsType;
|
|
184
|
+
vault?: boolean;
|
|
185
|
+
allowedPaymentTypes?: `${PaymentType}`[];
|
|
186
|
+
metadata?: {
|
|
187
|
+
[key: string]: string;
|
|
188
|
+
};
|
|
189
|
+
verifyCard?: boolean;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export declare type DropInPayToOptionsType = {
|
|
193
|
+
providerId: string;
|
|
194
|
+
maximumAmount: number;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
declare enum Environment {
|
|
199
|
+
LOCAL = "local",
|
|
200
|
+
DEVELOPMENT = "development",
|
|
201
|
+
SANDBOX = "sandbox",
|
|
202
|
+
PRODUCTION = "production"
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export declare type EnvironmentName = `${Environment}`;
|
|
206
|
+
|
|
207
|
+
export declare type FailureResponseType = {
|
|
208
|
+
error: string;
|
|
209
|
+
errorDetails?: {
|
|
210
|
+
[key: string]: any;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
declare type FraudCheckResultType = {
|
|
215
|
+
decision: string;
|
|
216
|
+
transactionId: string;
|
|
217
|
+
providerId: string;
|
|
218
|
+
stopPaymentOnFailure: boolean;
|
|
219
|
+
managedOrderToken?: string;
|
|
220
|
+
threeDSServerTransID?: string;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
declare type GooglePayButtonColor = "default" | "black" | "white";
|
|
224
|
+
|
|
225
|
+
declare type GooglePayButtonOptionsType = {
|
|
226
|
+
buttonColor?: GooglePayButtonColor;
|
|
227
|
+
buttonType?: GooglePayButtonType;
|
|
228
|
+
buttonRadius?: number;
|
|
229
|
+
buttonSizeMode?: GooglePayButtonSizeMode;
|
|
230
|
+
buttonLocale?: string;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
declare type GooglePayButtonSizeMode = "static" | "fill";
|
|
234
|
+
|
|
235
|
+
declare type GooglePayButtonType = "book" | "buy" | "checkout" | "donate" | "order" | "pay" | "plain" | "subscribe";
|
|
236
|
+
|
|
237
|
+
export declare type GooglePayOptionsType = {
|
|
238
|
+
gateway?: string;
|
|
239
|
+
googlePayGatewayMerchantId?: string;
|
|
240
|
+
googlePayMerchantId?: string;
|
|
241
|
+
googlePayMerchantName?: string;
|
|
242
|
+
metadata?: {
|
|
243
|
+
[key: string]: string;
|
|
244
|
+
};
|
|
245
|
+
buttonOptions?: GooglePayButtonOptionsType;
|
|
246
|
+
billingDetailsRequired?: boolean;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export declare type IinDataType = {
|
|
250
|
+
scheme: string;
|
|
251
|
+
country: string;
|
|
252
|
+
issuer: string;
|
|
253
|
+
countryCode: string;
|
|
254
|
+
cardType: string;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export declare type NetworkTokenOptionsType = {
|
|
258
|
+
acquirerMerchantId?: string;
|
|
259
|
+
acquirerBIN?: string;
|
|
260
|
+
merchantCategoryCode?: string;
|
|
261
|
+
authenticationReasons?: string[];
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
export declare type OrderInfoType = {
|
|
265
|
+
orderNumber: string;
|
|
266
|
+
taxAmount: number;
|
|
267
|
+
shippingAmount: number;
|
|
268
|
+
discountAmount: number;
|
|
269
|
+
orderItems: OrderItemType[];
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
declare type OrderItemType = {
|
|
273
|
+
name: string;
|
|
274
|
+
quantity: number;
|
|
275
|
+
sku: string;
|
|
276
|
+
unitPrice: number;
|
|
277
|
+
totalAmount: number;
|
|
278
|
+
unitOfMeasure?: string;
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
declare const payfurl: PayfurlInterface;
|
|
282
|
+
export default payfurl;
|
|
283
|
+
|
|
284
|
+
export declare interface PayfurlInterface {
|
|
285
|
+
init(environment: EnvironmentName, publicKey: string, debug?: boolean): PayfurlInterface;
|
|
286
|
+
execute(): void;
|
|
287
|
+
addDropIn(dropinParentId: string, amount: number, currency: string, options?: DropInOptionsType): PayfurlInterface;
|
|
288
|
+
addCard(iframeParentId: string, providerId: string, options?: AddCardOptionsType): PayfurlInterface;
|
|
289
|
+
addCardLeastCost(iframeParentId: string, amount: number, currency: string, options?: AddCardLeastCostOptionsType): PayfurlInterface;
|
|
290
|
+
addThreeDsWithFullParameters(parentId: string, cardNumber: string, expiryDate: string, cardHolderName: string, email: string, amount: number, currency: string, ccv?: string, options?: {
|
|
291
|
+
requireChallenge?: boolean;
|
|
292
|
+
}): PayfurlInterface;
|
|
293
|
+
tokeniseWith3Ds(// +
|
|
294
|
+
parentId: string, providerId: string, cardNumber: string, expiryDate: string, cardHolderName: string, ccv: string, email: string, amount: number, currency: string, metadata?: {
|
|
295
|
+
[key: string]: string;
|
|
296
|
+
}, options?: {
|
|
297
|
+
requireChallenge?: boolean;
|
|
298
|
+
verify?: boolean;
|
|
299
|
+
createNetworkToken?: boolean;
|
|
300
|
+
vault?: boolean;
|
|
301
|
+
}): PayfurlInterface;
|
|
302
|
+
tokeniseCard(providerId: string, cardNumber: string, expiryDate: string, cardHolderName: string, ccv: string, metadata?: {
|
|
303
|
+
[key: string]: string;
|
|
304
|
+
}, threeDsServerTransId?: string, options?: {
|
|
305
|
+
verify?: boolean;
|
|
306
|
+
createNetworkToken?: boolean;
|
|
307
|
+
vault?: boolean;
|
|
308
|
+
amount?: number;
|
|
309
|
+
currency?: string;
|
|
310
|
+
}): PayfurlInterface;
|
|
311
|
+
addThreeDsWithToken(tokenId: string, email: string, amount: number, currency: string, ccv?: string, options?: {
|
|
312
|
+
requireChallenge?: boolean;
|
|
313
|
+
}): PayfurlInterface;
|
|
314
|
+
addPaypal(parentId: string, amount: number, currency: string, providerId?: string, options?: PaypalOptionsType): PayfurlInterface;
|
|
315
|
+
addPayTo(parentId: string, amount: number, providerId?: string, options?: PayToOptionsType): PayfurlInterface;
|
|
316
|
+
addGooglePay(parentId: string, amount: number, currency: string, providerId?: string, options?: GooglePayOptionsType): PayfurlInterface;
|
|
317
|
+
addApplePay(parentId: string, amount: number, currency: string, providerId: string, options: ApplePayOptionsType): PayfurlInterface;
|
|
318
|
+
addCheckout(parentId: string, amount: number, currency: string, providerType: string, providerId: string, options: CheckoutOptionsType, checkoutOptions: {
|
|
319
|
+
[key: string]: string;
|
|
320
|
+
}): PayfurlInterface;
|
|
321
|
+
addUpi(parentId: string, amount: number, providerId: string, options: UpiOptionsType): PayfurlInterface;
|
|
322
|
+
setAmount(amount: number): PayfurlInterface;
|
|
323
|
+
setCurrency(currency: string): PayfurlInterface;
|
|
324
|
+
onSuccess(f: (message: SuccessResponseType) => void): PayfurlInterface;
|
|
325
|
+
onFailure(f: (message: FailureResponseType) => void): PayfurlInterface;
|
|
326
|
+
successMessage(message: string): PayfurlInterface;
|
|
327
|
+
onLoaded(f: () => void): PayfurlInterface;
|
|
328
|
+
onValidationStatusChange(f: (status: string, message: string) => void): PayfurlInterface;
|
|
329
|
+
onValidate(f: () => boolean): PayfurlInterface;
|
|
330
|
+
setBillingAddress(address: AddressInfoType): PayfurlInterface;
|
|
331
|
+
setCustomerInfo(customer: CustomerInfoType): PayfurlInterface;
|
|
332
|
+
setOrderInfo(order: OrderInfoType): PayfurlInterface;
|
|
333
|
+
preloadClickToPay(options?: ClickToPayOptionsType): PayfurlInterface;
|
|
334
|
+
addSavedPaymentMethods(iframeParentId: string, customerId: string, options?: AddSavedPaymentMethodsOptionsType): PayfurlInterface;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare enum PaymentType {
|
|
338
|
+
card = "card",
|
|
339
|
+
paypal = "paypal",
|
|
340
|
+
applepay = "applepay",
|
|
341
|
+
googlepay = "googlepay",
|
|
342
|
+
upi = "upi",
|
|
343
|
+
payto = "payto",
|
|
344
|
+
payid = "payid",
|
|
345
|
+
shift = "shift",
|
|
346
|
+
pesapal = "pesapal",
|
|
347
|
+
paybyaccount = "paybyaccount",
|
|
348
|
+
payglocal = "payglocal",
|
|
349
|
+
zip = "zip",
|
|
350
|
+
dlocal = "dlocal"
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export declare type PaypalOptionsType = {
|
|
354
|
+
hideShipping?: boolean;
|
|
355
|
+
paypalButtonStyle?: any;
|
|
356
|
+
paypalEnablePayIn4?: boolean;
|
|
357
|
+
transfer?: {
|
|
358
|
+
account: string;
|
|
359
|
+
amount: number;
|
|
360
|
+
} | null;
|
|
361
|
+
metadata?: {
|
|
362
|
+
[key: string]: string;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export declare type PayToOptionsType = {
|
|
367
|
+
maximumAmount: number;
|
|
368
|
+
description: string;
|
|
369
|
+
metadata?: {
|
|
370
|
+
[key: string]: string;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
declare type SavedCardsOptionsType = {
|
|
375
|
+
align?: "left" | "center";
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
export declare type SuccessResponseType = {
|
|
379
|
+
token?: string;
|
|
380
|
+
transactionId?: string;
|
|
381
|
+
threeDSServerTransID?: string;
|
|
382
|
+
cardDetails?: CardDetailsType;
|
|
383
|
+
iinData?: IinDataType;
|
|
384
|
+
fraudCheckResult?: FraudCheckResultType;
|
|
385
|
+
clickToPayData?: {
|
|
386
|
+
billingAddress: {
|
|
387
|
+
line1: string;
|
|
388
|
+
city: string;
|
|
389
|
+
state: string;
|
|
390
|
+
countryCode: string;
|
|
391
|
+
zip: string;
|
|
392
|
+
};
|
|
393
|
+
panBin: string;
|
|
394
|
+
panLastFour: string;
|
|
395
|
+
scheme: string;
|
|
396
|
+
paymentCardType: string;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* The shape of `errorDetails` that the tokenise flow populates on `onFailure` when
|
|
402
|
+
* `POST /token/card` fails during `tokeniseWith3Ds`, the case PAY-4804 was raised for.
|
|
403
|
+
*
|
|
404
|
+
* `onFailure` is a single callback shared across every flow (tokenise, fraud, 3DS, ...),
|
|
405
|
+
* so its `errorDetails` is typed loosely as `{ [key: string]: any }` rather than tied to
|
|
406
|
+
* this shape. This type is exported for consumers who know they are handling a tokenise
|
|
407
|
+
* failure and want the concrete field names, e.g. `errorDetails as TokeniseErrorDetailsType`.
|
|
408
|
+
*
|
|
409
|
+
* Mirrors the whitelisted subset of the API's error envelope (`api/Models/Error.cs`).
|
|
410
|
+
* `code` and `isRetryable` are non-nullable value types in the API and are always
|
|
411
|
+
* serialised, so they are required here. The string fields may be `null` (a 400 from
|
|
412
|
+
* the controller pipeline, which writes nulls) or absent entirely (a 401 from
|
|
413
|
+
* `AuthFilter`, which omits nulls), so they are optional and nullable.
|
|
414
|
+
*
|
|
415
|
+
* `details`, `resource` and `chargeId` are deliberately excluded. See PAY-4804.
|
|
416
|
+
*/
|
|
417
|
+
export declare type TokeniseErrorDetailsType = {
|
|
418
|
+
code: number;
|
|
419
|
+
isRetryable: boolean;
|
|
420
|
+
message?: string | null;
|
|
421
|
+
gatewayCode?: string | null;
|
|
422
|
+
gatewayMessage?: string | null;
|
|
423
|
+
type?: string | null;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
export declare type UpiOptionsType = {
|
|
427
|
+
documentId: string;
|
|
428
|
+
name: string;
|
|
429
|
+
email: string;
|
|
430
|
+
subscriptionFrequencyUnit: string;
|
|
431
|
+
subscriptionFrequency: number;
|
|
432
|
+
subscriptionStartAt: string;
|
|
433
|
+
subscriptionEndAt: string;
|
|
434
|
+
metadata?: {
|
|
435
|
+
[key: string]: string;
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
|
|
439
|
+
export { }
|