@adyen/adyen-web 5.63.0 → 5.64.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.js +1 -1
- package/dist/adyen.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/ANCV/ANCV.d.ts +2 -1
- package/dist/types/components/Card/Bancontact.d.ts +1 -0
- package/dist/types/components/Card/Card.d.ts +1 -4
- package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/types.d.ts +2 -2
- package/dist/types/components/Card/types.d.ts +5 -2
- package/dist/types/components/UIElement.d.ts +1 -1
- package/dist/types/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.d.ts +10 -0
- package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +2 -0
- package/dist/types/core/Analytics/constants.d.ts +1 -0
- package/dist/types/core/Analytics/types.d.ts +4 -5
- package/dist/types/core/Analytics/utils.d.ts +1 -1
- package/dist/types/core/Services/analytics/collect-id.d.ts +2 -2
- package/dist/types/core/Services/analytics/types.d.ts +5 -2
- package/package.json +1 -1
|
@@ -29,7 +29,8 @@ export declare class ANCVElement extends UIElement<ANCVProps> {
|
|
|
29
29
|
* @param order -
|
|
30
30
|
*/
|
|
31
31
|
protected handleOrder: ({ order }: PaymentResponse) => any;
|
|
32
|
-
createOrder: () =>
|
|
32
|
+
createOrder: () => void;
|
|
33
|
+
submit(): boolean;
|
|
33
34
|
payButton: (props: any) => h.JSX.Element;
|
|
34
35
|
get isValid(): boolean;
|
|
35
36
|
get displayName(): string;
|
|
@@ -74,6 +74,7 @@ declare class BancontactElement extends CardElement {
|
|
|
74
74
|
onBlur?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus | import("../types").ComponentFocusObject) => void;
|
|
75
75
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
76
76
|
onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
|
|
77
|
+
exposeExpiryDate?: boolean;
|
|
77
78
|
environment?: string;
|
|
78
79
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
79
80
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -28,10 +28,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
28
28
|
countryCode: any;
|
|
29
29
|
configuration: {
|
|
30
30
|
socialSecurityNumberMode: import("./types").SocialSecurityMode;
|
|
31
|
-
/**
|
|
32
|
-
* Click to Pay configuration
|
|
33
|
-
* - If email is set explicitly in the configuration, then it can override the one used in the session creation
|
|
34
|
-
*/
|
|
35
31
|
visaSrciDpaId?: string;
|
|
36
32
|
visaSrcInitiatorId?: string;
|
|
37
33
|
mcSrcClientId?: string;
|
|
@@ -84,6 +80,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
84
80
|
onBlur?: (event: CbObjOnFocus | ComponentFocusObject) => void;
|
|
85
81
|
onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
|
|
86
82
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
83
|
+
exposeExpiryDate?: boolean;
|
|
87
84
|
environment?: string;
|
|
88
85
|
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
89
86
|
onChange?: (state: any, element: UIElement<any>) => void;
|
|
@@ -3,10 +3,9 @@ import { BinLookupResponse, BrandConfiguration, CardBrandsConfiguration, CardCon
|
|
|
3
3
|
import { AddressData, PaymentAmount } from '../../../../types';
|
|
4
4
|
import { InstallmentOptions } from './components/types';
|
|
5
5
|
import { ValidationResult } from '../../../internal/PersonalDetails/types';
|
|
6
|
-
import { CVCPolicyType, DatePolicyType } from '../../../internal/SecuredFields/lib/types';
|
|
6
|
+
import { CVCPolicyType, DatePolicyType, CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
|
|
7
7
|
import Specifications from '../../../internal/Address/Specifications';
|
|
8
8
|
import { AddressSchema } from '../../../internal/Address/types';
|
|
9
|
-
import { CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
|
|
10
9
|
import { Resources } from '../../../../core/Context/Resources';
|
|
11
10
|
import { SRPanel } from '../../../../core/Errors/SRPanel';
|
|
12
11
|
import RiskElement from '../../../../core/RiskModule';
|
|
@@ -123,6 +122,7 @@ export interface CardInputProps {
|
|
|
123
122
|
trimTrailingSeparator?: boolean;
|
|
124
123
|
type?: string;
|
|
125
124
|
maskSecurityCode?: boolean;
|
|
125
|
+
exposeExpiryDate?: boolean;
|
|
126
126
|
disclaimerMessage?: DisclaimerMsgObject;
|
|
127
127
|
onErrorAnalytics?: (obj: FieldErrorAnalyticsObject) => {};
|
|
128
128
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComponentFocusObject, UIElementProps } from '../types';
|
|
2
2
|
import { AddressData, BrowserInfo } from '../../types';
|
|
3
|
-
import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
|
|
4
|
-
import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
|
|
3
|
+
import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup, CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
|
|
5
4
|
import { ClickToPayConfiguration } from '../internal/ClickToPay/types';
|
|
6
5
|
export interface CardElementProps extends UIElementProps {
|
|
7
6
|
/**
|
|
@@ -109,6 +108,10 @@ export interface CardElementProps extends UIElementProps {
|
|
|
109
108
|
*/
|
|
110
109
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
111
110
|
[key: string]: any;
|
|
111
|
+
/**
|
|
112
|
+
* Allows SF to return an unencrypted expiryDate
|
|
113
|
+
*/
|
|
114
|
+
exposeExpiryDate?: boolean;
|
|
112
115
|
}
|
|
113
116
|
export type SocialSecurityMode = 'show' | 'hide' | 'auto';
|
|
114
117
|
/** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
|
|
@@ -24,7 +24,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
|
|
|
24
24
|
* In some other cases e.g. 3DS2 components, this function is overridden to allow more specific analytics actions to be created
|
|
25
25
|
*/
|
|
26
26
|
protected submitAnalytics(analyticsObj: SendAnalyticsObject, uiElementProps?: any): void;
|
|
27
|
-
|
|
27
|
+
protected onSubmit(): void;
|
|
28
28
|
private onValid;
|
|
29
29
|
onComplete(state: any): void;
|
|
30
30
|
/**
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MutableRef } from 'preact/hooks';
|
|
2
|
+
import { OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError } from './types';
|
|
3
|
+
interface UseSRPanelForErrorsProps {
|
|
4
|
+
errors: OpenInvoiceStateError;
|
|
5
|
+
data: OpenInvoiceStateData;
|
|
6
|
+
props: OpenInvoiceProps;
|
|
7
|
+
isValidating: MutableRef<boolean>;
|
|
8
|
+
}
|
|
9
|
+
declare const useSRPanelForOpenInvoiceErrors: ({ errors, data, props, isValidating }: UseSRPanelForErrorsProps) => void;
|
|
10
|
+
export default useSRPanelForOpenInvoiceErrors;
|
|
@@ -50,6 +50,7 @@ export interface CSFSetupObject extends CSFCommonProps {
|
|
|
50
50
|
isKCP?: boolean;
|
|
51
51
|
i18n?: Language;
|
|
52
52
|
forceCompat: boolean;
|
|
53
|
+
exposeExpiryDate: boolean;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* The type for the this.config object created by CSF - properties that just need to be set once, at startup, and then don't change.
|
|
@@ -12,7 +12,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
|
|
|
12
12
|
export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
|
|
13
13
|
export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
|
|
14
14
|
export declare const GIFT_CARD = "giftcard";
|
|
15
|
-
export declare const SF_VERSION = "4.
|
|
15
|
+
export declare const SF_VERSION = "4.9.0";
|
|
16
16
|
export declare const DEFAULT_CARD_GROUP_TYPES: string[];
|
|
17
17
|
export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
|
|
18
18
|
export declare const CREDIT_CARD_SF_FIELDS: string[];
|
|
@@ -96,6 +96,7 @@ export interface CbObjOnFieldValid {
|
|
|
96
96
|
rootNode: HTMLElement;
|
|
97
97
|
blob?: string;
|
|
98
98
|
endDigits?: string;
|
|
99
|
+
expiryDate?: string;
|
|
99
100
|
issuerBin?: number;
|
|
100
101
|
}
|
|
101
102
|
export interface CbObjOnAutoComplete {
|
|
@@ -166,6 +167,7 @@ export interface SFFeedbackObj {
|
|
|
166
167
|
error?: string;
|
|
167
168
|
endDigits?: string;
|
|
168
169
|
issuerBin?: string;
|
|
170
|
+
expiryDate?: string;
|
|
169
171
|
type?: string;
|
|
170
172
|
binValue?: string;
|
|
171
173
|
focus?: boolean;
|
|
@@ -26,8 +26,11 @@ export interface AnalyticsData {
|
|
|
26
26
|
osVersion: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Use a checkoutAttemptId from a previous page
|
|
31
|
+
*/
|
|
32
|
+
checkoutAttemptId?: string;
|
|
29
33
|
}
|
|
30
|
-
export declare const ALLOWED_ANALYTICS_DATA: string[];
|
|
31
34
|
export interface AnalyticsOptions {
|
|
32
35
|
/**
|
|
33
36
|
* Enable/Disable all analytics
|
|
@@ -37,10 +40,6 @@ export interface AnalyticsOptions {
|
|
|
37
40
|
* Enable/Disable telemetry data
|
|
38
41
|
*/
|
|
39
42
|
telemetry?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Reuse a previous checkoutAttemptId from a previous page
|
|
42
|
-
*/
|
|
43
|
-
checkoutAttemptId?: string;
|
|
44
43
|
/**
|
|
45
44
|
* Data to be sent along with the event data
|
|
46
45
|
*/
|
|
@@ -19,4 +19,4 @@ export declare const getUTCTimestamp: () => number;
|
|
|
19
19
|
* All objects can also have a "metadata" object of key-value pairs
|
|
20
20
|
*/
|
|
21
21
|
export declare const createAnalyticsObject: (aObj: CreateAnalyticsObject) => AnalyticsObject;
|
|
22
|
-
export declare const processAnalyticsData: (analyticsData: AnalyticsData) =>
|
|
22
|
+
export declare const processAnalyticsData: (analyticsData: AnalyticsData) => AnalyticsData;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CollectIdProps } from './types';
|
|
1
|
+
import { CollectIdEvent, CollectIdProps } from './types';
|
|
2
2
|
export declare const FAILURE_MSG = "WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.";
|
|
3
3
|
/**
|
|
4
4
|
* Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response
|
|
5
5
|
* @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request
|
|
6
6
|
* @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)
|
|
7
7
|
*/
|
|
8
|
-
declare const collectId: ({ analyticsContext, clientKey, locale, analyticsPath }: CollectIdProps) => (event:
|
|
8
|
+
declare const collectId: ({ analyticsContext, clientKey, locale, analyticsPath }: CollectIdProps) => (event: CollectIdEvent) => Promise<string>;
|
|
9
9
|
export default collectId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnalyticsConfig } from '../../Analytics/types';
|
|
1
|
+
import { AnalyticsConfig, AnalyticsData, AnalyticsInitialEvent } from '../../Analytics/types';
|
|
2
2
|
import { PaymentAmount } from '../../../types';
|
|
3
3
|
export type CheckoutAttemptIdSession = {
|
|
4
4
|
id: string;
|
|
@@ -11,11 +11,14 @@ export type LogEventProps = Pick<AnalyticsConfig, 'loadingContext' | 'locale'>;
|
|
|
11
11
|
export type TelemetryEvent = {
|
|
12
12
|
version: string;
|
|
13
13
|
channel: 'Web';
|
|
14
|
+
platform: 'Web';
|
|
14
15
|
locale: string;
|
|
15
16
|
referrer: string;
|
|
16
17
|
screenWidth: number;
|
|
17
18
|
containerWidth: number;
|
|
18
19
|
component: string;
|
|
19
20
|
flavor: string;
|
|
21
|
+
buildType: string;
|
|
20
22
|
amount?: PaymentAmount;
|
|
21
|
-
};
|
|
23
|
+
} & AnalyticsInitialEvent & AnalyticsData;
|
|
24
|
+
export type CollectIdEvent = AnalyticsInitialEvent & AnalyticsData;
|
package/package.json
CHANGED