@adyen/adyen-web 4.8.0 → 5.2.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/dist/adyen.css +5 -1
- package/dist/adyen.css.map +1 -1
- package/dist/adyen.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/adyen.css +5 -1
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +5 -1
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/it-IT.js +1 -1
- package/dist/types/components/ApplePay/ApplePay.d.ts +1 -4
- package/dist/types/components/ApplePay/defaultProps.d.ts +0 -2
- package/dist/types/components/ApplePay/types.d.ts +1 -4
- package/dist/types/components/BacsDD/components/types.d.ts +1 -1
- package/dist/types/components/BankTransfer/types.d.ts +1 -1
- package/dist/types/components/BaseElement.d.ts +2 -13
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +8 -1
- package/dist/types/components/Blik/components/BlikInput.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +14 -3
- package/dist/types/components/Card/Card.d.ts +9 -1
- package/dist/types/components/Card/components/CardInput/components/CardFields.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +6 -5
- package/dist/types/components/Card/components/CardInput/types.d.ts +4 -3
- package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +4 -2
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +9 -4
- package/dist/types/components/Dragonpay/types.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +0 -3
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodIcon.d.ts +3 -3
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodItem.d.ts +1 -0
- package/dist/types/components/Dropin/components/utils.d.ts +2 -0
- package/dist/types/components/Dropin/defaultProps.d.ts +0 -2
- package/dist/types/components/Dropin/types.d.ts +2 -1
- package/dist/types/components/Econtext/Econtext.d.ts +11 -1
- package/dist/types/components/Econtext/components/EcontextInput/EcontextInput.d.ts +14 -2
- package/dist/types/components/Giftcard/Giftcard.d.ts +3 -2
- package/dist/types/components/GooglePay/GooglePay.d.ts +0 -4
- package/dist/types/components/GooglePay/defaultProps.d.ts +0 -2
- package/dist/types/components/GooglePay/types.d.ts +1 -1
- package/dist/types/components/Klarna/constants.d.ts +0 -5
- package/dist/types/components/Klarna/types.d.ts +9 -3
- package/dist/types/components/MBWay/components/MBWayInput/types.d.ts +1 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -2
- package/dist/types/components/PayPal/types.d.ts +6 -1
- package/dist/types/components/Pix/Pix.d.ts +32 -2
- package/dist/types/components/Pix/PixInput/PixInput.d.ts +9 -0
- package/dist/types/components/Pix/PixInput/index.d.ts +1 -0
- package/dist/types/components/Pix/PixInput/utils.d.ts +3 -0
- package/dist/types/components/Pix/PixInput/validate.d.ts +2 -0
- package/dist/types/components/Pix/types.d.ts +19 -0
- package/dist/types/components/Redirect/components/RedirectShopper/RedirectShopper.d.ts +2 -3
- package/dist/types/components/Swish/Swish.d.ts +8 -1
- package/dist/types/components/UIElement.d.ts +34 -26
- package/dist/types/components/WeChat/WeChat.d.ts +8 -1
- package/dist/types/components/helpers/IssuerListContainer.d.ts +8 -8
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +5 -3
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/Await/types.d.ts +1 -1
- package/dist/types/components/internal/IssuerList/ContentSeparator/ContentSeparator.d.ts +4 -0
- package/dist/types/components/internal/IssuerList/ContentSeparator/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.d.ts +11 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.d.ts +10 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerList.d.ts +2 -7
- package/dist/types/components/internal/IssuerList/types.d.ts +16 -0
- package/dist/types/components/internal/PayButton/PayButton.d.ts +2 -2
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +6 -6
- package/dist/types/components/internal/QRLoader/types.d.ts +0 -1
- package/dist/types/components/internal/SecuredFields/SecuredFieldsProvider.d.ts +3 -3
- package/dist/types/components/internal/SecuredFields/defaultProps.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +11 -6
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractCSF.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractSecuredField.d.ts +4 -3
- package/dist/types/components/internal/SecuredFields/lib/core/SecuredField.d.ts +2 -2
- package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBrandFromBinLookup.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/utils/processBrand.d.ts +6 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +9 -4
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +4 -1
- package/dist/types/components/internal/SocialSecurityNumberBrazil/BrazilPersonalDetail.d.ts +2 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/constants.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/utils.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/validate.d.ts +0 -0
- package/dist/types/components/types.d.ts +48 -0
- package/dist/types/components/utils.d.ts +3 -0
- package/dist/types/core/CheckoutSession/CheckoutSession.d.ts +47 -0
- package/dist/types/core/CheckoutSession/index.d.ts +1 -0
- package/dist/types/core/CheckoutSession/utils.d.ts +2 -0
- package/dist/types/core/Errors/AdyenCheckoutError.d.ts +14 -0
- package/dist/types/core/RiskModule/RiskModule.d.ts +2 -1
- package/dist/types/core/Services/{collect-id.d.ts → analytics/collect-id.d.ts} +0 -0
- package/dist/types/core/Services/{log-event.d.ts → analytics/log-event.d.ts} +0 -0
- package/dist/types/core/Services/{post-telemetry.d.ts → analytics/post-telemetry.d.ts} +0 -0
- package/dist/types/core/Services/sessions/check-balance.d.ts +6 -0
- package/dist/types/core/Services/sessions/constants.d.ts +1 -0
- package/dist/types/core/Services/sessions/create-order.d.ts +6 -0
- package/dist/types/core/Services/sessions/make-payment.d.ts +6 -0
- package/dist/types/core/Services/sessions/setup-session.d.ts +6 -0
- package/dist/types/core/Services/sessions/submit-details.d.ts +6 -0
- package/dist/types/core/core.d.ts +14 -1
- package/dist/types/core/types.d.ts +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts +38 -0
- package/dist/types/utils/Script.d.ts +3 -1
- package/dist/types/utils/Storage.d.ts +10 -0
- package/dist/types/utils/hasOwnProperty.d.ts +1 -0
- package/package.json +5 -5
|
@@ -4,7 +4,7 @@ export declare type RtnType_noParamVoidFn = () => void;
|
|
|
4
4
|
export declare type RtnType_postMessageListener = (event: Event) => void;
|
|
5
5
|
export declare type RtnType_callbackFn = (feedbackObj: SFFeedbackObj) => void;
|
|
6
6
|
export declare type CVCPolicyType = 'required' | 'optional' | 'hidden';
|
|
7
|
-
export declare type DatePolicyType = 'required' | 'hidden';
|
|
7
|
+
export declare type DatePolicyType = 'required' | 'optional' | 'hidden';
|
|
8
8
|
/**
|
|
9
9
|
* Base interface, props common to both SFSetupObject & IframeConfigObject
|
|
10
10
|
*/
|
|
@@ -19,6 +19,7 @@ export interface SFInternalConfig {
|
|
|
19
19
|
isCreditCardType: boolean;
|
|
20
20
|
showWarnings: boolean;
|
|
21
21
|
cvcPolicy: CVCPolicyType;
|
|
22
|
+
expiryDatePolicy: DatePolicyType;
|
|
22
23
|
legacyInputMode: boolean;
|
|
23
24
|
minimumExpiryDate: string;
|
|
24
25
|
uid: string;
|
|
@@ -28,7 +29,7 @@ export interface SFInternalConfig {
|
|
|
28
29
|
* The object passed from createSecuredFields to a new instance of SecuredField.ts
|
|
29
30
|
*/
|
|
30
31
|
export interface SFSetupObject extends SFInternalConfig {
|
|
31
|
-
|
|
32
|
+
expiryDatePolicy: DatePolicyType;
|
|
32
33
|
iframeSrc: string;
|
|
33
34
|
loadingContext: string;
|
|
34
35
|
holderEl: HTMLElement;
|
|
@@ -76,7 +77,7 @@ declare abstract class AbstractSecuredField {
|
|
|
76
77
|
protected _hasError: boolean;
|
|
77
78
|
protected _isValid: boolean;
|
|
78
79
|
protected _cvcPolicy: CVCPolicyType;
|
|
79
|
-
protected
|
|
80
|
+
protected _expiryDatePolicy: DatePolicyType;
|
|
80
81
|
protected _iframeContentWindow: Window;
|
|
81
82
|
protected _isEncrypted: boolean;
|
|
82
83
|
protected _numKey: number;
|
|
@@ -23,8 +23,8 @@ declare class SecuredField extends AbstractSecuredField {
|
|
|
23
23
|
set isValid(value: boolean);
|
|
24
24
|
get cvcPolicy(): CVCPolicyType;
|
|
25
25
|
set cvcPolicy(value: CVCPolicyType);
|
|
26
|
-
get
|
|
27
|
-
set
|
|
26
|
+
get expiryDatePolicy(): DatePolicyType;
|
|
27
|
+
set expiryDatePolicy(value: DatePolicyType);
|
|
28
28
|
get iframeContentWindow(): Window;
|
|
29
29
|
set iframeContentWindow(value: Window);
|
|
30
30
|
get isEncrypted(): boolean;
|
package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBrandFromBinLookup.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SendBrandObject } from '../../types';
|
|
1
|
+
import { SendBrandObject, SendExpiryDateObject } from '../../types';
|
|
2
2
|
import { BinLookupResponse } from '../../../../../Card/types';
|
|
3
3
|
export declare function sendBrandToCardSF(brandObj: SendBrandObject): void;
|
|
4
|
+
export declare function sendExpiryDatePolicyToSF(expiryDateObj: SendExpiryDateObject): void;
|
|
4
5
|
export declare function handleBrandFromBinLookup(binLookupResponse: BinLookupResponse): void;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import { SFFeedbackObj } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* - If generic card type AND passed brand doesn't equal stored brand - send the new brand to the cvc input
|
|
4
|
+
* (so it can reassess what length it should be and if any value it contains is now valid)
|
|
5
|
+
*
|
|
6
|
+
* - Create object for onBrand callback aka SFPHandlers.handleOnBrand
|
|
7
|
+
*/
|
|
2
8
|
export declare function handleProcessBrand(pFeedbackObj: SFFeedbackObj): boolean;
|
|
@@ -4,11 +4,13 @@ import { BrandObject } from '../../../Card/types';
|
|
|
4
4
|
declare global {
|
|
5
5
|
interface Window {
|
|
6
6
|
_b$dl: boolean;
|
|
7
|
+
mockBinCount: number;
|
|
7
8
|
}
|
|
8
9
|
}
|
|
9
10
|
export interface BrandStorageObject {
|
|
10
11
|
brand: string;
|
|
11
|
-
cvcPolicy:
|
|
12
|
+
cvcPolicy: CVCPolicyType;
|
|
13
|
+
expiryDatePolicy: DatePolicyType;
|
|
12
14
|
showSocialSecurityNumber?: boolean;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
@@ -136,14 +138,14 @@ export interface CardObject {
|
|
|
136
138
|
pattern: RegExp;
|
|
137
139
|
securityCode?: string;
|
|
138
140
|
displayName?: string;
|
|
139
|
-
cvcPolicy?:
|
|
141
|
+
cvcPolicy?: CVCPolicyType;
|
|
140
142
|
}
|
|
141
143
|
export interface CbObjOnBrand {
|
|
142
144
|
type: string;
|
|
143
145
|
rootNode: HTMLElement;
|
|
144
146
|
brand: string;
|
|
145
147
|
cvcPolicy: CVCPolicyType;
|
|
146
|
-
|
|
148
|
+
expiryDatePolicy?: DatePolicyType;
|
|
147
149
|
cvcText: string;
|
|
148
150
|
showSocialSecurityNumber?: boolean;
|
|
149
151
|
brandImageUrl?: string;
|
|
@@ -224,7 +226,7 @@ export interface SFFeedbackObj {
|
|
|
224
226
|
code?: string;
|
|
225
227
|
cvcText?: string;
|
|
226
228
|
cvcPolicy?: CVCPolicyType;
|
|
227
|
-
|
|
229
|
+
expiryDatePolicy?: DatePolicyType;
|
|
228
230
|
showSocialSecurityNumber?: boolean;
|
|
229
231
|
maxLength?: number;
|
|
230
232
|
error?: string;
|
|
@@ -254,4 +256,7 @@ export interface SendBrandObject {
|
|
|
254
256
|
brand: string;
|
|
255
257
|
enableLuhnCheck: boolean;
|
|
256
258
|
}
|
|
259
|
+
export interface SendExpiryDateObject {
|
|
260
|
+
expiryDatePolicy: DatePolicyType;
|
|
261
|
+
}
|
|
257
262
|
export {};
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* @returns Number
|
|
5
5
|
*/
|
|
6
6
|
declare function generateRandomNumber(): number;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Recursively compare 2 objects
|
|
9
|
+
*/
|
|
10
|
+
declare function objectsDeepEqual(x: any, y: any): any;
|
|
8
11
|
/**
|
|
9
12
|
* Returns true if x is:
|
|
10
13
|
* null, undefined, false, 0, NaN, empty object or array, empty string
|
|
File without changes
|
|
File without changes
|
package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/utils.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Order, PaymentAction, PaymentAmount } from '../types';
|
|
2
|
+
import UIElement from './UIElement';
|
|
3
|
+
import Core from '../core';
|
|
4
|
+
import Analytics from '../core/Analytics';
|
|
5
|
+
import RiskElement from '../core/RiskModule';
|
|
6
|
+
export interface PaymentResponse {
|
|
7
|
+
action?: PaymentAction;
|
|
8
|
+
resultCode: string;
|
|
9
|
+
sessionData?: string;
|
|
10
|
+
order?: Order;
|
|
11
|
+
}
|
|
12
|
+
export interface RawPaymentResponse extends PaymentResponse {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}
|
|
15
|
+
export interface BaseElementProps {
|
|
16
|
+
_parentInstance?: Core;
|
|
17
|
+
order?: Order;
|
|
18
|
+
modules?: {
|
|
19
|
+
analytics: Analytics;
|
|
20
|
+
risk: RiskElement;
|
|
21
|
+
};
|
|
22
|
+
isDropin?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UIElementProps extends BaseElementProps {
|
|
25
|
+
session?: {
|
|
26
|
+
id: string;
|
|
27
|
+
data: string;
|
|
28
|
+
};
|
|
29
|
+
onChange?: (state: any, element: UIElement) => void;
|
|
30
|
+
onValid?: (state: any, element: UIElement) => void;
|
|
31
|
+
beforeSubmit?: (state: any, element: UIElement, actions: any) => Promise<void>;
|
|
32
|
+
onSubmit?: (state: any, element: UIElement) => void;
|
|
33
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
34
|
+
onAdditionalDetails?: (state: any, element: UIElement) => void;
|
|
35
|
+
onError?: (error: any, element?: UIElement) => void;
|
|
36
|
+
onPaymentCompleted?: (result: any, element: UIElement) => void;
|
|
37
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement) => void;
|
|
38
|
+
type?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
amount?: PaymentAmount;
|
|
42
|
+
/**
|
|
43
|
+
* Show/Hide pay button
|
|
44
|
+
* @defaultValue true
|
|
45
|
+
*/
|
|
46
|
+
showPayButton?: boolean;
|
|
47
|
+
setStatusAutomatically?: boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CheckoutSession, CheckoutSessionBalanceResponse, CheckoutSessionDetailsResponse, CheckoutSessionOrdersResponse, CheckoutSessionPaymentResponse, CheckoutSessionSetupResponse } from '../../types';
|
|
2
|
+
declare class Session {
|
|
3
|
+
private readonly session;
|
|
4
|
+
private readonly storage;
|
|
5
|
+
readonly clientKey: string;
|
|
6
|
+
readonly loadingContext: string;
|
|
7
|
+
constructor(rawSession: CheckoutSession, clientKey: string, loadingContext: string);
|
|
8
|
+
get id(): string;
|
|
9
|
+
get data(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Updates the session.data with the latest data blob
|
|
12
|
+
*/
|
|
13
|
+
private updateSessionData;
|
|
14
|
+
/**
|
|
15
|
+
* Fetches data from a session
|
|
16
|
+
*/
|
|
17
|
+
setupSession(options: any): Promise<CheckoutSessionSetupResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Submits a session payment
|
|
20
|
+
*/
|
|
21
|
+
submitPayment(data: any): Promise<CheckoutSessionPaymentResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Submits session payment additional details
|
|
24
|
+
*/
|
|
25
|
+
submitDetails(data: any): Promise<CheckoutSessionDetailsResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Checks the balance for a payment method
|
|
28
|
+
*/
|
|
29
|
+
checkBalance(data: any): Promise<CheckoutSessionBalanceResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates an order for the current session
|
|
32
|
+
*/
|
|
33
|
+
createOrder(): Promise<CheckoutSessionOrdersResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the stored session but only if the current id and the stored id match
|
|
36
|
+
*/
|
|
37
|
+
getStoredSession(): CheckoutSession;
|
|
38
|
+
/**
|
|
39
|
+
* Stores the session
|
|
40
|
+
*/
|
|
41
|
+
storeSession(): void;
|
|
42
|
+
/**
|
|
43
|
+
* Clears the stored session
|
|
44
|
+
*/
|
|
45
|
+
removeStoredSession(): void;
|
|
46
|
+
}
|
|
47
|
+
export default Session;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CheckoutSession';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare class AdyenCheckoutError extends Error {
|
|
2
|
+
protected static errorTypes: {
|
|
3
|
+
/** Network error. */
|
|
4
|
+
NETWORK_ERROR: string;
|
|
5
|
+
/** Shopper canceled the current transaction. */
|
|
6
|
+
CANCEL: string;
|
|
7
|
+
/** Implementation error. The method or parameter are incorrect or are not supported. */
|
|
8
|
+
IMPLEMENTATION_ERROR: string;
|
|
9
|
+
/** Generic error. */
|
|
10
|
+
ERROR: string;
|
|
11
|
+
};
|
|
12
|
+
constructor(type: keyof typeof AdyenCheckoutError.errorTypes, message?: string);
|
|
13
|
+
}
|
|
14
|
+
export default AdyenCheckoutError;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
import BaseElement
|
|
2
|
+
import BaseElement from '../../components/BaseElement';
|
|
3
|
+
import { BaseElementProps } from '../../components/types';
|
|
3
4
|
export interface RiskModuleOptions {
|
|
4
5
|
enabled: boolean;
|
|
5
6
|
onComplete: (data: any) => void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const API_VERSION = "v1";
|
|
@@ -2,7 +2,9 @@ import UIElement from '../components/UIElement';
|
|
|
2
2
|
import { PaymentAction } from '../types';
|
|
3
3
|
import { CoreOptions } from './types';
|
|
4
4
|
import { PaymentMethods, PaymentMethodOptions } from '../types';
|
|
5
|
+
import Session from './CheckoutSession';
|
|
5
6
|
declare class Core {
|
|
7
|
+
session: Session;
|
|
6
8
|
private paymentMethodsResponse;
|
|
7
9
|
modules: any;
|
|
8
10
|
options: CoreOptions;
|
|
@@ -14,6 +16,17 @@ declare class Core {
|
|
|
14
16
|
buildId: string;
|
|
15
17
|
};
|
|
16
18
|
constructor(options: CoreOptions);
|
|
19
|
+
initialize(): Promise<this>;
|
|
20
|
+
/**
|
|
21
|
+
* Submit data to payments using the onSubmit event or the session flow if available
|
|
22
|
+
* @param data -
|
|
23
|
+
*/
|
|
24
|
+
submitPayment(data: any): void;
|
|
25
|
+
/**
|
|
26
|
+
* Submits details using onAdditionalDetails or the session flow if available
|
|
27
|
+
* @param details -
|
|
28
|
+
*/
|
|
29
|
+
submitDetails(details: any): void;
|
|
17
30
|
/**
|
|
18
31
|
* Instantiates a new UIElement component ready to be mounted
|
|
19
32
|
* @param paymentMethod - name or class of the paymentMethod
|
|
@@ -34,7 +47,7 @@ declare class Core {
|
|
|
34
47
|
* @param options - props to update
|
|
35
48
|
* @returns this - the element instance
|
|
36
49
|
*/
|
|
37
|
-
update: (options?: CoreOptions) => this
|
|
50
|
+
update: (options?: CoreOptions) => Promise<this>;
|
|
38
51
|
/**
|
|
39
52
|
* Remove the reference of a component
|
|
40
53
|
* @param component - reference to the component to be removed
|
|
@@ -4,6 +4,7 @@ import { AnalyticsOptions } from './Analytics/types';
|
|
|
4
4
|
import { PaymentMethodsResponseObject } from './ProcessResponse/PaymentMethodsResponse/types';
|
|
5
5
|
import { RiskModuleOptions } from './RiskModule/RiskModule';
|
|
6
6
|
export interface CoreOptions {
|
|
7
|
+
session?: any;
|
|
7
8
|
/**
|
|
8
9
|
* Use test. When you're ready to accept live payments, change the value to one of our {@link https://docs.adyen.com/checkout/drop-in-web#testing-your-integration | live environments}.
|
|
9
10
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -134,6 +134,10 @@ export interface Order {
|
|
|
134
134
|
* The pspReference that belongs to the order.
|
|
135
135
|
*/
|
|
136
136
|
pspReference: string;
|
|
137
|
+
/**
|
|
138
|
+
* The remaining amount to complete the order.
|
|
139
|
+
*/
|
|
140
|
+
remainingAmount?: PaymentAmount;
|
|
137
141
|
}
|
|
138
142
|
export interface OrderStatus {
|
|
139
143
|
expiresAt: string;
|
|
@@ -170,3 +174,37 @@ export declare type PaymentMethodOptions<P extends keyof PaymentMethods> = Insta
|
|
|
170
174
|
* Visibility options for a fieldset
|
|
171
175
|
*/
|
|
172
176
|
export declare type FieldsetVisibility = 'editable' | 'hidden' | 'readOnly';
|
|
177
|
+
export declare type CheckoutSession = {
|
|
178
|
+
id: string;
|
|
179
|
+
sessionData: string;
|
|
180
|
+
};
|
|
181
|
+
export declare type CheckoutSessionSetupResponse = {
|
|
182
|
+
id: string;
|
|
183
|
+
sessionData: string;
|
|
184
|
+
amount: PaymentAmount;
|
|
185
|
+
expiresAt: string;
|
|
186
|
+
paymentMethods: any;
|
|
187
|
+
returnUrl: string;
|
|
188
|
+
};
|
|
189
|
+
export declare type CheckoutSessionPaymentResponse = {
|
|
190
|
+
sessionData: string;
|
|
191
|
+
status?: string;
|
|
192
|
+
resultCode?: string;
|
|
193
|
+
action?: PaymentAction;
|
|
194
|
+
};
|
|
195
|
+
export declare type CheckoutSessionDetailsResponse = {
|
|
196
|
+
sessionData: string;
|
|
197
|
+
status?: string;
|
|
198
|
+
resultCode?: string;
|
|
199
|
+
action?: PaymentAction;
|
|
200
|
+
};
|
|
201
|
+
export declare type CheckoutSessionBalanceResponse = {
|
|
202
|
+
sessionData: string;
|
|
203
|
+
balance?: PaymentAmount;
|
|
204
|
+
transactionLimit?: PaymentAmount;
|
|
205
|
+
};
|
|
206
|
+
export declare type CheckoutSessionOrdersResponse = {
|
|
207
|
+
sessionData: string;
|
|
208
|
+
orderData: string;
|
|
209
|
+
pspReference: string;
|
|
210
|
+
};
|
|
@@ -15,7 +15,9 @@ declare class Script {
|
|
|
15
15
|
private readonly script;
|
|
16
16
|
private readonly src;
|
|
17
17
|
private readonly node;
|
|
18
|
-
|
|
18
|
+
private readonly attributes;
|
|
19
|
+
private readonly dataAttributes;
|
|
20
|
+
constructor(src: any, node?: string, attributes?: Partial<HTMLScriptElement>, dataAttributes?: Record<string, string | undefined>);
|
|
19
21
|
load: () => Promise<any>;
|
|
20
22
|
remove: () => void;
|
|
21
23
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasOwnProperty(obj: any, prop: any): any;
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"./dist/adyen.css": "./dist/adyen.css",
|
|
23
23
|
"./package.json": "./package.json"
|
|
24
24
|
},
|
|
25
|
-
"version": "
|
|
25
|
+
"version": "5.2.0",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"homepage": "https://docs.adyen.com/checkout",
|
|
28
28
|
"repository": "github:Adyen/adyen-web",
|
|
@@ -50,20 +50,20 @@
|
|
|
50
50
|
"@rollup/plugin-eslint": "^8.0.1",
|
|
51
51
|
"@rollup/plugin-json": "^4.1.0",
|
|
52
52
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
53
|
-
"@rollup/plugin-replace": "^
|
|
53
|
+
"@rollup/plugin-replace": "^3.0.0",
|
|
54
54
|
"@testing-library/preact": "^2.0.1",
|
|
55
55
|
"@testing-library/preact-hooks": "^1.1.0",
|
|
56
56
|
"@types/jest": "^26.0.23",
|
|
57
57
|
"@typescript-eslint/eslint-plugin": "^4.28.3",
|
|
58
58
|
"@typescript-eslint/parser": "^4.28.3",
|
|
59
|
-
"autoprefixer": "^10.
|
|
59
|
+
"autoprefixer": "^10.3.6",
|
|
60
60
|
"cross-env": "^7.0.3",
|
|
61
61
|
"cssnano": "^5.0.6",
|
|
62
62
|
"dotenv": "^10.0.0",
|
|
63
63
|
"enzyme": "^3.11.0",
|
|
64
64
|
"enzyme-adapter-preact-pure": "^3.1.0",
|
|
65
65
|
"esbuild": "^0.12.15",
|
|
66
|
-
"eslint": "^7.
|
|
66
|
+
"eslint": "^7.32.0",
|
|
67
67
|
"eslint-plugin-import": "^2.23.4",
|
|
68
68
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
69
69
|
"eslint-plugin-react": "^7.20.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@types/applepayjs": "^3.0.2",
|
|
91
91
|
"@types/googlepay": "^0.6.2",
|
|
92
92
|
"classnames": "^2.3.1",
|
|
93
|
-
"core-js": "^3.
|
|
93
|
+
"core-js": "^3.18.1",
|
|
94
94
|
"preact": "^10.5.13"
|
|
95
95
|
},
|
|
96
96
|
"files": [
|