@adyen/adyen-web 5.32.0 → 5.34.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/README.md +5 -1
- package/dist/adyen.css +5 -5
- 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 -5
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +5 -5
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +5 -5
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/Ach.d.ts +1 -0
- package/dist/types/components/Ach/components/AchInput/types.d.ts +2 -1
- package/dist/types/components/AmazonPay/types.d.ts +9 -9
- package/dist/types/components/ApplePay/types.d.ts +2 -2
- package/dist/types/components/Atome/config.d.ts +1 -1
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +6 -4
- package/dist/types/components/Card/Card.d.ts +6 -8
- package/dist/types/components/Card/ClickToPayHolder.d.ts +1 -1
- package/dist/types/components/Card/ClickToPayWrapper.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/CardFieldsWrapper.d.ts +2 -2
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
- package/dist/types/components/Card/components/CardInput/types.d.ts +3 -4
- package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPBrand/CtPBrand.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +11 -7
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +11 -7
- package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +2 -0
- package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +4 -2
- package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/{utils.d.ts → services/create-clicktopay-service.d.ts} +2 -2
- package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +3 -4
- package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +2 -3
- package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +2 -2
- package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +2 -3
- package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +18 -12
- package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +10 -10
- package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +17 -11
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
- package/dist/types/components/Dropin/Dropin.d.ts +1 -0
- package/dist/types/components/Dropin/types.d.ts +1 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +1 -1
- package/dist/types/components/Econtext/components/EcontextInput/EcontextInput.d.ts +1 -1
- package/dist/types/components/Giftcard/components/types.d.ts +2 -2
- package/dist/types/components/Klarna/types.d.ts +2 -2
- package/dist/types/components/Oxxo/types.d.ts +1 -1
- package/dist/types/components/PayNow/PayNow.d.ts +1 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -1
- package/dist/types/components/PayPal/config.d.ts +1 -1
- package/dist/types/components/PayPal/types.d.ts +7 -4
- package/dist/types/components/Pix/Pix.d.ts +1 -0
- package/dist/types/components/Pix/PixInput/types.d.ts +1 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +1 -1
- package/dist/types/components/Swish/Swish.d.ts +1 -1
- package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +2 -0
- package/dist/types/components/ThreeDS2/ThreeDS2DeviceFingerprint.d.ts +2 -0
- package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +4 -1
- package/dist/types/components/ThreeDS2/components/Challenge/types.d.ts +2 -0
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.d.ts +2 -1
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts +5 -1
- package/dist/types/components/ThreeDS2/components/DeviceFingerprint/types.d.ts +2 -0
- package/dist/types/components/ThreeDS2/types.d.ts +4 -4
- package/dist/types/components/UIElement.d.ts +1 -0
- package/dist/types/components/UPI/components/UPIComponent/UPIComponent.d.ts +8 -6
- package/dist/types/components/UPI/components/VpaInput/VpaInput.d.ts +11 -7
- package/dist/types/components/UPI/types.d.ts +1 -1
- package/dist/types/components/WeChat/WeChat.d.ts +1 -1
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +1 -1
- package/dist/types/components/internal/Address/types.d.ts +6 -3
- package/dist/types/components/internal/Await/Await.d.ts +1 -1
- package/dist/types/components/internal/Await/types.d.ts +2 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -1
- package/dist/types/components/internal/CompanyDetails/types.d.ts +1 -0
- package/dist/types/components/internal/IbanInput/utils.d.ts +1 -1
- package/dist/types/components/internal/Modal/Modal.d.ts +2 -2
- package/dist/types/components/internal/Modal/useModal.d.ts +2 -2
- package/dist/types/components/internal/Modal/useTrapFocus.d.ts +1 -1
- package/dist/types/components/internal/OpenInvoice/types.d.ts +3 -2
- package/dist/types/components/internal/PersonalDetails/types.d.ts +4 -1
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +2 -2
- package/dist/types/components/internal/QRLoader/types.d.ts +3 -2
- package/dist/types/components/internal/SecuredFields/lib/CSF/utils/processErrors.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -5
- package/dist/types/components/types.d.ts +12 -2
- package/dist/types/core/Analytics/Analytics.d.ts +2 -1
- package/dist/types/core/Analytics/EventsQueue.d.ts +1 -1
- package/dist/types/core/RiskModule/RiskModule.d.ts +1 -1
- package/dist/types/core/Services/analytics/post-telemetry.d.ts +3 -1
- package/dist/types/core/Services/analytics/types.d.ts +2 -2
- package/dist/types/core/Services/data-set.d.ts +1 -1
- package/dist/types/core/Services/http.d.ts +1 -1
- package/dist/types/core/types.d.ts +1 -1
- package/dist/types/language/Language.d.ts +3 -3
- package/dist/types/language/types.d.ts +2 -2
- package/dist/types/language/utils.d.ts +4 -3
- package/dist/types/types/index.d.ts +13 -13
- package/dist/types/utils/Formatters/types.d.ts +1 -1
- package/dist/types/utils/Validator/types.d.ts +9 -9
- package/dist/types/utils/useForm/types.d.ts +2 -2
- package/package.json +14 -14
|
@@ -14,6 +14,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
|
|
|
14
14
|
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
15
15
|
onSubmit?: (state: any, element: UIElement<any>) => void;
|
|
16
16
|
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
17
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
17
18
|
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
18
19
|
onError?: (error: any, element?: UIElement<any>) => void;
|
|
19
20
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
@@ -17,7 +17,7 @@ export interface ACHInputDataState {
|
|
|
17
17
|
holderName?: string;
|
|
18
18
|
billingAddress?: object;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type Placeholders = {
|
|
21
21
|
holderName?: string;
|
|
22
22
|
};
|
|
23
23
|
export interface ACHInputProps {
|
|
@@ -53,5 +53,6 @@ export interface ACHInputProps {
|
|
|
53
53
|
styles?: StylesObject;
|
|
54
54
|
type?: string;
|
|
55
55
|
forceCompat?: boolean;
|
|
56
|
+
setComponentRef?: (ref: any) => void;
|
|
56
57
|
}
|
|
57
58
|
export {};
|
|
@@ -7,14 +7,14 @@ declare global {
|
|
|
7
7
|
amazon: object;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
10
|
+
type ButtonColor = 'Gold' | 'LightGray' | 'DarkGray';
|
|
11
|
+
type Placement = 'Home' | 'Product' | 'Cart' | 'Checkout' | 'Other';
|
|
12
|
+
type ProductType = 'PayOnly' | 'PayAndShip';
|
|
13
|
+
type ChargePermissionType = 'OneTime' | 'Recurring';
|
|
14
|
+
type FrequencyUnit = 'Year' | 'Month' | 'Week' | 'Day' | 'Variable';
|
|
15
|
+
export type Currency = 'EUR' | 'GBP' | 'USD';
|
|
16
|
+
export type Region = 'EU' | 'UK' | 'US';
|
|
17
|
+
export type SupportedLocale = typeof SUPPORTED_LOCALES_EU[number] | typeof SUPPORTED_LOCALES_US[number];
|
|
18
18
|
export interface RecurringMetadata {
|
|
19
19
|
frequency: {
|
|
20
20
|
unit: string;
|
|
@@ -169,7 +169,7 @@ export interface ChargeAmount {
|
|
|
169
169
|
amount: string;
|
|
170
170
|
currencyCode: Currency;
|
|
171
171
|
}
|
|
172
|
-
export
|
|
172
|
+
export type LedgerCurrencies = {
|
|
173
173
|
[key in Region]: Currency;
|
|
174
174
|
};
|
|
175
175
|
export interface PayloadJSON {
|
|
@@ -6,8 +6,8 @@ declare global {
|
|
|
6
6
|
ApplePaySession: ApplePaySession;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
export
|
|
9
|
+
type Initiative = 'web' | 'messaging';
|
|
10
|
+
export type ApplePayButtonType = 'plain' | 'buy' | 'donate' | 'check-out' | 'book' | 'subscribe' | 'add-money' | 'contribute' | 'order' | 'reload' | 'rent' | 'support' | 'tip' | 'top-up';
|
|
11
11
|
export interface ApplePayElementProps extends UIElementProps {
|
|
12
12
|
/**
|
|
13
13
|
* The Apple Pay version number your website supports.
|
|
@@ -10,7 +10,7 @@ export declare const BILLING_ADDRESS_SPECIFICATION: {
|
|
|
10
10
|
[x: string]: {
|
|
11
11
|
hasDataset?: boolean;
|
|
12
12
|
labels?: import("../internal/Address/types").StringObject;
|
|
13
|
-
optionalFields?: ("
|
|
13
|
+
optionalFields?: ("city" | "postalCode" | "street" | "stateOrProvince" | "country" | "houseNumberOrName")[];
|
|
14
14
|
placeholders?: import("../internal/Address/types").StringObject;
|
|
15
15
|
schema?: import("../internal/Address/types").AddressSchema;
|
|
16
16
|
} | {
|
|
@@ -7,7 +7,6 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
7
7
|
type?: string;
|
|
8
8
|
brandLogo?: string;
|
|
9
9
|
buttonLabel: string;
|
|
10
|
-
shouldRedirectOnMobile: boolean;
|
|
11
10
|
qrCodeImage?: string;
|
|
12
11
|
paymentData?: string;
|
|
13
12
|
introduction: string;
|
|
@@ -19,6 +18,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
19
18
|
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
20
19
|
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
20
|
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
22
22
|
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
23
23
|
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
24
24
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -6,8 +6,8 @@ declare class BancontactElement extends CardElement {
|
|
|
6
6
|
brands: string[];
|
|
7
7
|
onBinLookup: () => void;
|
|
8
8
|
showBrandsUnderCardNumber: boolean;
|
|
9
|
-
useClickToPay: boolean;
|
|
10
9
|
SRConfig: {};
|
|
10
|
+
_disableClickToPay: boolean;
|
|
11
11
|
};
|
|
12
12
|
/**
|
|
13
13
|
* Now that the Bancontact (BCMC) Card component can accept a number dual branded with Visa (which requires a CVC) it has to be handled differently
|
|
@@ -50,13 +50,14 @@ declare class BancontactElement extends CardElement {
|
|
|
50
50
|
installmentOptions: any;
|
|
51
51
|
enableStoreDetails: boolean;
|
|
52
52
|
clickToPayConfiguration: {
|
|
53
|
-
|
|
53
|
+
disableOtpAutoFocus: boolean;
|
|
54
|
+
shopperEmail: any;
|
|
55
|
+
telephoneNumber: any;
|
|
54
56
|
locale: string;
|
|
55
|
-
shopperIdentityType?: "email" | "mobilePhone";
|
|
56
57
|
merchantDisplayName: string;
|
|
57
58
|
};
|
|
58
59
|
brand?: string;
|
|
59
|
-
|
|
60
|
+
_disableClickToPay?: boolean;
|
|
60
61
|
brands?: string[];
|
|
61
62
|
showBrandsUnderCardNumber?: boolean;
|
|
62
63
|
showBrandIcon?: boolean;
|
|
@@ -76,6 +77,7 @@ declare class BancontactElement extends CardElement {
|
|
|
76
77
|
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
77
78
|
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
78
79
|
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
80
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
79
81
|
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
80
82
|
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
81
83
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
@@ -14,11 +14,10 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
14
14
|
protected static defaultProps: {
|
|
15
15
|
onBinLookup: () => void;
|
|
16
16
|
showBrandsUnderCardNumber: boolean;
|
|
17
|
-
useClickToPay: boolean;
|
|
18
17
|
SRConfig: {};
|
|
18
|
+
_disableClickToPay: boolean;
|
|
19
19
|
};
|
|
20
20
|
setStatus(status: UIElementStatus, props?: any): this;
|
|
21
|
-
setComponentRef: (ref: any) => void;
|
|
22
21
|
private setClickToPayRef;
|
|
23
22
|
formatProps(props: CardElementProps): {
|
|
24
23
|
holderNameRequired: boolean;
|
|
@@ -28,9 +27,6 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
28
27
|
countryCode: any;
|
|
29
28
|
configuration: {
|
|
30
29
|
socialSecurityNumberMode: import("./types").SocialSecurityMode;
|
|
31
|
-
/**
|
|
32
|
-
* Formats the component data output
|
|
33
|
-
*/
|
|
34
30
|
visaSrciDpaId?: string;
|
|
35
31
|
visaSrcInitiatorId?: string;
|
|
36
32
|
mcSrcClientId?: string;
|
|
@@ -61,13 +57,14 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
61
57
|
* - If email is set explicitly in the configuration, then it can override the one used in the session creation
|
|
62
58
|
*/
|
|
63
59
|
clickToPayConfiguration: {
|
|
64
|
-
|
|
60
|
+
disableOtpAutoFocus: boolean;
|
|
61
|
+
shopperEmail: any;
|
|
62
|
+
telephoneNumber: any;
|
|
65
63
|
locale: string;
|
|
66
|
-
shopperIdentityType?: "email" | "mobilePhone";
|
|
67
64
|
merchantDisplayName: string;
|
|
68
65
|
};
|
|
69
66
|
brand?: string;
|
|
70
|
-
|
|
67
|
+
_disableClickToPay?: boolean;
|
|
71
68
|
brands?: string[];
|
|
72
69
|
showBrandsUnderCardNumber?: boolean;
|
|
73
70
|
showBrandIcon?: boolean;
|
|
@@ -87,6 +84,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
87
84
|
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
88
85
|
onSubmit?: (state: any, element: UIElement<any>) => void;
|
|
89
86
|
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
87
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
90
88
|
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
91
89
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
92
90
|
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ClickToPayProviderProps } from './components/ClickToPay/context/ClickToPayProvider';
|
|
2
2
|
import { h } from 'preact';
|
|
3
|
-
declare const ClickToPayWrapper: ({ amount, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, ...props }: ClickToPayProviderProps) => h.JSX.Element;
|
|
3
|
+
declare const ClickToPayWrapper: ({ amount, configuration, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, ...props }: ClickToPayProviderProps) => h.JSX.Element;
|
|
4
4
|
export default ClickToPayWrapper;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './AvailableBrands.scss';
|
|
3
3
|
import { BrandConfiguration } from '../../../../types';
|
|
4
|
-
|
|
4
|
+
type AvailableBrands = Array<BrandConfiguration>;
|
|
5
5
|
interface PaymentMethodBrandsProps {
|
|
6
6
|
brands: AvailableBrands;
|
|
7
7
|
activeBrand: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress,
|
|
2
|
+
export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor, sfpState, setFocusOn, collateErrors, errorFieldId, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, brandsIcons, mergedSRErrors, moveFocus, showPanel, handleErrorPanelFocus, formData, formErrors, formValid, expiryDatePolicy, dualBrandSelectElements, extensions, selectedBrandValue, showKCP, showBrazilianSSN, socialSecurityNumber, handleOnStoreDetails, billingAddress, handleAddress, setAddressRef, partialAddressSchema, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField }: {
|
|
3
3
|
data: any;
|
|
4
4
|
valid: any;
|
|
5
5
|
errors: any;
|
|
@@ -31,7 +31,7 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
|
|
|
31
31
|
handleOnStoreDetails: any;
|
|
32
32
|
billingAddress: any;
|
|
33
33
|
handleAddress: any;
|
|
34
|
-
|
|
34
|
+
setAddressRef: any;
|
|
35
35
|
partialAddressSchema: any;
|
|
36
36
|
amount: any;
|
|
37
37
|
billingAddressRequired: any;
|
|
@@ -118,8 +118,8 @@ export interface KCPProps {
|
|
|
118
118
|
value: string;
|
|
119
119
|
disabled?: boolean;
|
|
120
120
|
}
|
|
121
|
-
export
|
|
122
|
-
export
|
|
121
|
+
export type RtnType_ParamBooleanFn = (tn: any) => boolean;
|
|
122
|
+
export type RtnType_ParamVoidFn = (e: any) => void;
|
|
123
123
|
export interface StoredCardFieldsProps {
|
|
124
124
|
brand: string;
|
|
125
125
|
errors: any;
|
|
@@ -8,6 +8,7 @@ import { ValidationRuleResult } from '../../../../utils/Validator/ValidationRule
|
|
|
8
8
|
import Specifications from '../../../internal/Address/Specifications';
|
|
9
9
|
import { AddressSchema, StringObject } from '../../../internal/Address/types';
|
|
10
10
|
import { CbObjOnError, StylesObject } from '../../../internal/SecuredFields/lib/types';
|
|
11
|
+
import { ComponentMethodsRef } from '../../../types';
|
|
11
12
|
export interface CardInputValidState {
|
|
12
13
|
holderName?: boolean;
|
|
13
14
|
billingAddress?: boolean;
|
|
@@ -35,7 +36,7 @@ export interface CardInputDataState {
|
|
|
35
36
|
socialSecurityNumber?: string;
|
|
36
37
|
taxNumber?: string;
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
type Placeholders = {
|
|
39
40
|
holderName?: string;
|
|
40
41
|
};
|
|
41
42
|
/**
|
|
@@ -124,12 +125,10 @@ export interface CardInputState {
|
|
|
124
125
|
issuingCountryCode: string;
|
|
125
126
|
showSocialSecurityNumber?: boolean;
|
|
126
127
|
}
|
|
127
|
-
export interface CardInputRef {
|
|
128
|
+
export interface CardInputRef extends ComponentMethodsRef {
|
|
128
129
|
sfp?: any;
|
|
129
130
|
setFocusOn?: (who: any) => void;
|
|
130
|
-
showValidation?: (who: any) => void;
|
|
131
131
|
processBinLookupResponse?: (binLookupResponse: BinLookupResponse, isReset: boolean) => void;
|
|
132
|
-
setStatus?: any;
|
|
133
132
|
updateStyles?: (stylesObj: StylesObject) => void;
|
|
134
133
|
handleUnsupportedCard?: (errObj: CbObjOnError) => boolean;
|
|
135
134
|
}
|
package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
+
type OnChangeProps = {
|
|
3
|
+
data: CtPLoginInputDataState;
|
|
4
|
+
valid: any;
|
|
5
|
+
errors: any;
|
|
6
|
+
isValid: boolean;
|
|
7
|
+
};
|
|
2
8
|
interface CtPLoginInputProps {
|
|
3
9
|
disabled: boolean;
|
|
4
10
|
errorMessage?: string;
|
|
5
11
|
onPressEnter(): void;
|
|
6
|
-
onChange({ data
|
|
7
|
-
data: any;
|
|
8
|
-
valid: any;
|
|
9
|
-
errors: any;
|
|
10
|
-
isValid: any;
|
|
11
|
-
}): void;
|
|
12
|
+
onChange({ data, valid, errors, isValid }: OnChangeProps): void;
|
|
12
13
|
onSetInputHandlers(handlers: CtPLoginInputHandlers): void;
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
+
interface CtPLoginInputDataState {
|
|
16
|
+
shopperLogin?: string;
|
|
17
|
+
}
|
|
18
|
+
export type CtPLoginInputHandlers = {
|
|
15
19
|
validateInput(): void;
|
|
16
20
|
};
|
|
17
21
|
declare const CtPLoginInput: (props: CtPLoginInputProps) => h.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './CtPOneTimePassword.scss';
|
|
3
|
-
|
|
3
|
+
type CtPOneTimePasswordProps = {
|
|
4
4
|
onDisplayCardComponent?(): void;
|
|
5
5
|
};
|
|
6
6
|
declare const CtPOneTimePassword: ({ onDisplayCardComponent }: CtPOneTimePasswordProps) => h.JSX.Element;
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './CtPOneTimePasswordInput.scss';
|
|
3
|
+
type OnChangeProps = {
|
|
4
|
+
data: CtPOneTimePasswordInputDataState;
|
|
5
|
+
valid: any;
|
|
6
|
+
errors: any;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
};
|
|
3
9
|
interface CtPOneTimePasswordInputProps {
|
|
4
10
|
hideResendOtpButton: boolean;
|
|
5
11
|
disabled: boolean;
|
|
@@ -7,15 +13,13 @@ interface CtPOneTimePasswordInputProps {
|
|
|
7
13
|
errorMessage?: string;
|
|
8
14
|
onSetInputHandlers(handlers: CtPOneTimePasswordInputHandlers): void;
|
|
9
15
|
onPressEnter(): Promise<void>;
|
|
10
|
-
onChange({ data
|
|
11
|
-
data: any;
|
|
12
|
-
valid: any;
|
|
13
|
-
errors: any;
|
|
14
|
-
isValid: any;
|
|
15
|
-
}): void;
|
|
16
|
+
onChange({ data, valid, errors, isValid }: OnChangeProps): void;
|
|
16
17
|
onResendCode(): void;
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
interface CtPOneTimePasswordInputDataState {
|
|
20
|
+
otp?: string;
|
|
21
|
+
}
|
|
22
|
+
export type CtPOneTimePasswordInputHandlers = {
|
|
19
23
|
validateInput(): void;
|
|
20
24
|
};
|
|
21
25
|
declare const CtPOneTimePasswordInput: (props: CtPOneTimePasswordInputProps) => h.JSX.Element;
|
|
@@ -4,6 +4,7 @@ import { PaymentAmount } from '../../../../../types';
|
|
|
4
4
|
import ShopperCard from '../models/ShopperCard';
|
|
5
5
|
import { UIElementStatus } from '../../../../types';
|
|
6
6
|
import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
|
|
7
|
+
import { ClickToPayConfiguration } from '../../../types';
|
|
7
8
|
export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout' | 'startIdentityValidation' | 'finishIdentityValidation' | 'verifyIfShopperIsEnrolled'> {
|
|
8
9
|
isCtpPrimaryPaymentMethod: boolean;
|
|
9
10
|
setIsCtpPrimaryPaymentMethod(isPrimary: boolean): void;
|
|
@@ -14,6 +15,7 @@ export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout'
|
|
|
14
15
|
otpMaskedContact: string;
|
|
15
16
|
otpNetwork: string;
|
|
16
17
|
amount: PaymentAmount;
|
|
18
|
+
configuration: ClickToPayConfiguration;
|
|
17
19
|
status: UIElementStatus;
|
|
18
20
|
onSubmit(payload: ClickToPayCheckoutPayload): void;
|
|
19
21
|
onSetStatus(status: UIElementStatus): void;
|
|
@@ -3,8 +3,10 @@ import { ClickToPayCheckoutPayload, IClickToPayService } from '../services/types
|
|
|
3
3
|
import { PaymentAmount } from '../../../../../types';
|
|
4
4
|
import { UIElementStatus } from '../../../../types';
|
|
5
5
|
import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
|
|
6
|
-
|
|
6
|
+
import { ClickToPayConfiguration } from '../../../types';
|
|
7
|
+
export type ClickToPayProviderProps = {
|
|
7
8
|
clickToPayService: IClickToPayService | null;
|
|
9
|
+
configuration: ClickToPayConfiguration;
|
|
8
10
|
amount: PaymentAmount;
|
|
9
11
|
children: any;
|
|
10
12
|
setClickToPayRef(ref: any): void;
|
|
@@ -12,5 +14,5 @@ export declare type ClickToPayProviderProps = {
|
|
|
12
14
|
onSetStatus(status: UIElementStatus): void;
|
|
13
15
|
onError(error: AdyenCheckoutError): void;
|
|
14
16
|
};
|
|
15
|
-
declare const ClickToPayProvider: ({ clickToPayService, amount, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
|
|
17
|
+
declare const ClickToPayProvider: ({ clickToPayService, amount, configuration, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
|
|
16
18
|
export default ClickToPayProvider;
|
|
@@ -56,7 +56,7 @@ declare class ClickToPayService implements IClickToPayService {
|
|
|
56
56
|
* Based on the responses from the Click to Pay Systems, we should do the validation process using the SDK that
|
|
57
57
|
* that responds faster with 'consumerPresent=true'
|
|
58
58
|
*/
|
|
59
|
-
verifyIfShopperIsEnrolled(
|
|
59
|
+
verifyIfShopperIsEnrolled(shopperIdentity: IdentityLookupParams): Promise<{
|
|
60
60
|
isEnrolled: boolean;
|
|
61
61
|
}>;
|
|
62
62
|
private setState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IClickToPayService } from './
|
|
2
|
-
import { CardConfiguration, ClickToPayConfiguration } from '
|
|
1
|
+
import { IClickToPayService } from './types';
|
|
2
|
+
import { CardConfiguration, ClickToPayConfiguration } from '../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Creates the Click to Pay service in case the required configuration is provided
|
|
5
5
|
*/
|
package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CustomSdkConfiguration, SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
|
|
1
|
+
import { CustomSdkConfiguration, SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
|
|
3
2
|
import { ClickToPayScheme } from '../../../../types';
|
|
4
3
|
export interface ISrcInitiator {
|
|
5
4
|
schemeName: ClickToPayScheme;
|
|
@@ -7,7 +6,7 @@ export interface ISrcInitiator {
|
|
|
7
6
|
removeSdkScript(): void;
|
|
8
7
|
init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
|
|
9
8
|
isRecognized(): Promise<SrciIsRecognizedResponse>;
|
|
10
|
-
identityLookup(params:
|
|
9
|
+
identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
|
|
11
10
|
initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse>;
|
|
12
11
|
completeIdentityValidation(validationData: string): Promise<SrciCompleteIdentityValidationResponse>;
|
|
13
12
|
getSrcProfile(idTokens: string[]): Promise<SrcProfile>;
|
|
@@ -66,7 +65,7 @@ export default abstract class AbstractSrcInitiator implements ISrcInitiator {
|
|
|
66
65
|
* Obtains the user account associated with the consumer’s identity (an email address or phone
|
|
67
66
|
* number).
|
|
68
67
|
*/
|
|
69
|
-
abstract identityLookup(params:
|
|
68
|
+
abstract identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
|
|
70
69
|
/**
|
|
71
70
|
* This method completes the identity validation by receiving the one-time password (OTP) sent to the
|
|
72
71
|
* consumer to start validation.
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { IdentityLookupParams } from '../types';
|
|
2
1
|
import AbstractSrcInitiator from './AbstractSrcInitiator';
|
|
3
|
-
import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
|
|
2
|
+
import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrcInitParams } from './types';
|
|
4
3
|
declare class MastercardSdk extends AbstractSrcInitiator {
|
|
5
4
|
readonly schemeName = "mc";
|
|
6
5
|
constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
|
|
7
6
|
protected isSdkIsAvailableOnWindow(): boolean;
|
|
8
7
|
protected assignSdkReference(): void;
|
|
9
8
|
init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
|
|
10
|
-
identityLookup(
|
|
9
|
+
identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
|
|
11
10
|
completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
|
|
12
11
|
}
|
|
13
12
|
export default MastercardSdk;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { IdentityLookupParams } from '../types';
|
|
2
1
|
import AbstractSrcInitiator from './AbstractSrcInitiator';
|
|
3
|
-
import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
|
|
2
|
+
import { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrcInitParams } from './types';
|
|
4
3
|
declare class VisaSdk extends AbstractSrcInitiator {
|
|
5
4
|
readonly schemeName = "visa";
|
|
6
5
|
constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
|
|
7
6
|
protected isSdkIsAvailableOnWindow(): boolean;
|
|
8
7
|
protected assignSdkReference(): void;
|
|
9
8
|
init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
|
|
10
|
-
identityLookup(
|
|
9
|
+
identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;
|
|
11
10
|
completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
|
|
12
11
|
}
|
|
13
12
|
export default VisaSdk;
|
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type that represent the object which contains the customizable properties of the SDK initialization
|
|
3
3
|
*/
|
|
4
|
-
export
|
|
4
|
+
export type CustomSdkConfiguration = {
|
|
5
5
|
dpaLocale: string;
|
|
6
6
|
dpaPresentationName: string;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Types used to define the interface with the SRCi SDK
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type SrciInitiateIdentityValidationResponse = {
|
|
12
12
|
maskedValidationChannel: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type SrciCompleteIdentityValidationResponse = {
|
|
15
15
|
idToken: string;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type SrciIsRecognizedResponse = {
|
|
18
18
|
recognized: boolean;
|
|
19
19
|
idTokens?: string[];
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type SrciCheckoutResponse = {
|
|
22
22
|
dcfActionCode: string;
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
checkoutResponse: string;
|
|
24
|
+
checkoutResponseSignature: string;
|
|
25
|
+
idToken: string;
|
|
26
|
+
unbindAppInstance: boolean;
|
|
25
27
|
};
|
|
26
|
-
export
|
|
28
|
+
export type SrciIdentityLookupResponse = {
|
|
27
29
|
consumerPresent: boolean;
|
|
28
30
|
};
|
|
29
|
-
export
|
|
31
|
+
export type SrcProfile = {
|
|
30
32
|
profiles: Array<{
|
|
31
33
|
maskedCards: SrcCard[];
|
|
32
34
|
}>;
|
|
33
35
|
srcCorrelationId: string;
|
|
34
36
|
};
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
+
export type DigitalCardStatus = 'ACTIVE' | 'SUSPENDED' | 'EXPIRED' | 'PENDING';
|
|
38
|
+
export type SrcCard = {
|
|
37
39
|
srcDigitalCardId: string;
|
|
38
40
|
panLastFour: string;
|
|
39
41
|
dateOfCardLastUsed: string;
|
|
@@ -47,7 +49,7 @@ export declare type SrcCard = {
|
|
|
47
49
|
};
|
|
48
50
|
tokenId?: string;
|
|
49
51
|
};
|
|
50
|
-
export
|
|
52
|
+
export type SrcCheckoutParams = {
|
|
51
53
|
srcCorrelationId: string;
|
|
52
54
|
srcDigitalCardId: string;
|
|
53
55
|
windowRef?: Window;
|
|
@@ -56,3 +58,7 @@ export interface SrcInitParams {
|
|
|
56
58
|
srcInitiatorId: string;
|
|
57
59
|
srciDpaId: string;
|
|
58
60
|
}
|
|
61
|
+
export interface SrcIdentityLookupParams {
|
|
62
|
+
identityValue: string;
|
|
63
|
+
type: 'email' | 'telephoneNumber';
|
|
64
|
+
}
|