@adyen/adyen-web 5.33.0 → 5.35.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 +6 -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 +6 -5
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +6 -5
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es.modern/adyen.css +6 -5
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/types/components/Ach/components/AchInput/types.d.ts +1 -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 +0 -1
- package/dist/types/components/Card/Bancontact.d.ts +6 -2
- package/dist/types/components/Card/Card.d.ts +9 -7
- 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 -1
- package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/DisclaimerMessage.d.ts +16 -0
- package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/index.d.ts +1 -0
- package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts +2 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +2 -2
- package/dist/types/components/Card/components/CardInput/types.d.ts +8 -2
- package/dist/types/components/Card/components/CardInput/utils.d.ts +1 -0
- 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/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 +14 -10
- package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +10 -10
- package/dist/types/components/Card/types.d.ts +17 -6
- package/dist/types/components/Dropin/types.d.ts +1 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +0 -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 +0 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -1
- package/dist/types/components/PayPal/types.d.ts +7 -4
- package/dist/types/components/Pix/PixInput/types.d.ts +1 -1
- package/dist/types/components/PromptPay/PromptPay.d.ts +0 -1
- package/dist/types/components/Swish/Swish.d.ts +0 -1
- package/dist/types/components/ThreeDS2/types.d.ts +4 -4
- 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 +0 -1
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +0 -1
- package/dist/types/components/internal/Address/types.d.ts +3 -3
- package/dist/types/components/internal/Await/Await.d.ts +0 -1
- package/dist/types/components/internal/Await/types.d.ts +0 -1
- package/dist/types/components/internal/Button/types.d.ts +1 -1
- 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/PersonalDetails/types.d.ts +1 -1
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +1 -1
- package/dist/types/components/internal/QRLoader/types.d.ts +1 -2
- package/dist/types/components/internal/SecuredFields/lib/CSF/utils/processErrors.d.ts +1 -1
- 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 -1
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +5 -5
- package/dist/types/components/types.d.ts +3 -3
- 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/isValidURL.d.ts +1 -0
- package/dist/types/utils/useForm/types.d.ts +2 -2
- package/package.json +10 -10
|
@@ -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,6 +7,7 @@ declare class BancontactElement extends CardElement {
|
|
|
7
7
|
onBinLookup: () => void;
|
|
8
8
|
showBrandsUnderCardNumber: boolean;
|
|
9
9
|
SRConfig: {};
|
|
10
|
+
_disableClickToPay: boolean;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
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
|
|
@@ -49,12 +50,15 @@ declare class BancontactElement extends CardElement {
|
|
|
49
50
|
installmentOptions: any;
|
|
50
51
|
enableStoreDetails: boolean;
|
|
51
52
|
clickToPayConfiguration: {
|
|
52
|
-
|
|
53
|
+
disableOtpAutoFocus: boolean;
|
|
54
|
+
shopperEmail: any;
|
|
55
|
+
telephoneNumber: any;
|
|
53
56
|
locale: string;
|
|
54
|
-
shopperIdentityType?: "email" | "mobilePhone";
|
|
55
57
|
merchantDisplayName: string;
|
|
56
58
|
};
|
|
57
59
|
brand?: string;
|
|
60
|
+
_disableClickToPay?: boolean;
|
|
61
|
+
fundingSource?: "debit" | "credit";
|
|
58
62
|
brands?: string[];
|
|
59
63
|
showBrandsUnderCardNumber?: boolean;
|
|
60
64
|
showBrandIcon?: boolean;
|
|
@@ -15,6 +15,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
15
15
|
onBinLookup: () => void;
|
|
16
16
|
showBrandsUnderCardNumber: boolean;
|
|
17
17
|
SRConfig: {};
|
|
18
|
+
_disableClickToPay: boolean;
|
|
18
19
|
};
|
|
19
20
|
setStatus(status: UIElementStatus, props?: any): this;
|
|
20
21
|
private setClickToPayRef;
|
|
@@ -29,11 +30,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
29
30
|
visaSrciDpaId?: string;
|
|
30
31
|
visaSrcInitiatorId?: string;
|
|
31
32
|
mcSrcClientId?: string;
|
|
32
|
-
mcDpaId?: string;
|
|
33
|
-
* this.props.brand is never set for the generic card only for a 'dedicated' single-branded card e.g. bcmc
|
|
34
|
-
* this.state.selectedBrandValue will be set when /binLookup detects a single brand &/or when /binLookup detects a dual-branded card and
|
|
35
|
-
* the shopper makes a brand selection
|
|
36
|
-
*/
|
|
33
|
+
mcDpaId?: string;
|
|
37
34
|
merchantIdentifier?: string;
|
|
38
35
|
merchantOrigin?: string;
|
|
39
36
|
gatewayMerchantId?: string;
|
|
@@ -60,12 +57,17 @@ export declare class CardElement extends UIElement<CardElementProps> {
|
|
|
60
57
|
* - If email is set explicitly in the configuration, then it can override the one used in the session creation
|
|
61
58
|
*/
|
|
62
59
|
clickToPayConfiguration: {
|
|
63
|
-
|
|
60
|
+
disableOtpAutoFocus: boolean;
|
|
61
|
+
shopperEmail: any;
|
|
62
|
+
telephoneNumber: any;
|
|
64
63
|
locale: string;
|
|
65
|
-
shopperIdentityType?: "email" | "mobilePhone";
|
|
66
64
|
merchantDisplayName: string;
|
|
67
65
|
};
|
|
68
66
|
brand?: string;
|
|
67
|
+
_disableClickToPay?: boolean;
|
|
68
|
+
fundingSource?: "debit" | "credit"; /**
|
|
69
|
+
* Reference to the 'ClickToPayComponent'
|
|
70
|
+
*/
|
|
69
71
|
brands?: string[];
|
|
70
72
|
showBrandsUnderCardNumber?: boolean;
|
|
71
73
|
showBrandIcon?: boolean;
|
|
@@ -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, setAddressRef, partialAddressSchema, amount, billingAddressRequired, billingAddressRequiredFields, billingAddressAllowedCountries, billingAddressValidationRules, brandsConfiguration, enableStoreDetails, hasCVC, hasHolderName, holderNameRequired, installmentOptions, placeholders, positionHolderNameOnTop, showBrandIcon, showBrandsUnderCardNumber, iOSFocusedField }: {
|
|
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, disclaimerMessage }: {
|
|
3
3
|
data: any;
|
|
4
4
|
valid: any;
|
|
5
5
|
errors: any;
|
|
@@ -49,4 +49,5 @@ export declare const CardFieldsWrapper: ({ data, valid, errors, handleChangeFor,
|
|
|
49
49
|
showBrandIcon: any;
|
|
50
50
|
showBrandsUnderCardNumber: any;
|
|
51
51
|
iOSFocusedField: any;
|
|
52
|
+
disclaimerMessage: any;
|
|
52
53
|
}) => h.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import { DisclaimerMsgObject } from '../../types';
|
|
3
|
+
import './DisclaimerMessage.scss';
|
|
4
|
+
interface DisclaimerMessageProps {
|
|
5
|
+
disclaimer: DisclaimerMsgObject;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Expects a config object with this shape:
|
|
9
|
+
* disclaimerMessage: {
|
|
10
|
+
* message: 'By continuing you accept the %{linkText} of MyStore',
|
|
11
|
+
* linkText: 'terms and conditions',
|
|
12
|
+
* link: 'https://www.adyen.com'
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export default function DisclaimerMessage({ disclaimer }: DisclaimerMessageProps): h.JSX.Element;
|
|
16
|
+
export {};
|
package/dist/types/components/Card/components/CardInput/components/DisclaimerMessage/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DisclaimerMessage';
|
package/dist/types/components/Card/components/CardInput/components/StoredCardFieldsWrapper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, amount, hasCVC, installmentOptions, lastFour, expiryMonth, expiryYear, mergedSRErrors, handleErrorPanelFocus, moveFocus, showPanel }: {
|
|
2
|
+
export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sfpState, setFocusOn, cvcPolicy, focusedElement, hasInstallments, handleInstallments, showAmountsInInstallments, amount, hasCVC, installmentOptions, lastFour, expiryMonth, expiryYear, mergedSRErrors, handleErrorPanelFocus, moveFocus, showPanel, disclaimerMessage }: {
|
|
3
3
|
collateErrors: any;
|
|
4
4
|
errorFieldId: any;
|
|
5
5
|
sfpState: any;
|
|
@@ -19,4 +19,5 @@ export declare const StoredCardFieldsWrapper: ({ collateErrors, errorFieldId, sf
|
|
|
19
19
|
handleErrorPanelFocus: any;
|
|
20
20
|
moveFocus: any;
|
|
21
21
|
showPanel: any;
|
|
22
|
+
disclaimerMessage: any;
|
|
22
23
|
}) => h.JSX.Element;
|
|
@@ -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;
|
|
@@ -36,9 +36,14 @@ export interface CardInputDataState {
|
|
|
36
36
|
socialSecurityNumber?: string;
|
|
37
37
|
taxNumber?: string;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
type Placeholders = {
|
|
40
40
|
holderName?: string;
|
|
41
41
|
};
|
|
42
|
+
export interface DisclaimerMsgObject {
|
|
43
|
+
message: string;
|
|
44
|
+
linkText: string;
|
|
45
|
+
link: string;
|
|
46
|
+
}
|
|
42
47
|
/**
|
|
43
48
|
* Should be the subset of the props sent to CardInput that are *actually* used by CardInput
|
|
44
49
|
* - either in the comp itself or are passed on to its children
|
|
@@ -66,7 +71,7 @@ export interface CardInputProps {
|
|
|
66
71
|
expiryMonth?: string;
|
|
67
72
|
expiryYear?: string;
|
|
68
73
|
forceCompat?: boolean;
|
|
69
|
-
fundingSource?:
|
|
74
|
+
fundingSource?: 'debit' | 'credit';
|
|
70
75
|
hasCVC?: boolean;
|
|
71
76
|
hasHolderName?: boolean;
|
|
72
77
|
holderNameRequired?: boolean;
|
|
@@ -108,6 +113,7 @@ export interface CardInputProps {
|
|
|
108
113
|
trimTrailingSeparator?: boolean;
|
|
109
114
|
type?: string;
|
|
110
115
|
maskSecurityCode?: boolean;
|
|
116
|
+
disclaimerMessage?: DisclaimerMsgObject;
|
|
111
117
|
}
|
|
112
118
|
export interface CardInputState {
|
|
113
119
|
dualBrandSelectElements: DualBrandSelectElement[];
|
|
@@ -31,6 +31,7 @@ export declare const extractPropsForCardFields: (props: CardInputProps) => {
|
|
|
31
31
|
lastFour: string;
|
|
32
32
|
expiryMonth: string;
|
|
33
33
|
expiryYear: string;
|
|
34
|
+
disclaimerMessage: import("./types").DisclaimerMsgObject;
|
|
34
35
|
};
|
|
35
36
|
export declare const extractPropsForSFP: (props: CardInputProps) => SFPProps;
|
|
36
37
|
export declare const handlePartialAddressMode: (addressMode: AddressModeOptions) => AddressSpecifications | null;
|
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;
|
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,41 +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
23
|
checkoutResponse: string;
|
|
24
24
|
checkoutResponseSignature: string;
|
|
25
25
|
idToken: string;
|
|
26
26
|
unbindAppInstance: boolean;
|
|
27
27
|
};
|
|
28
|
-
export
|
|
28
|
+
export type SrciIdentityLookupResponse = {
|
|
29
29
|
consumerPresent: boolean;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type SrcProfile = {
|
|
32
32
|
profiles: Array<{
|
|
33
33
|
maskedCards: SrcCard[];
|
|
34
34
|
}>;
|
|
35
35
|
srcCorrelationId: string;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
38
|
-
export
|
|
37
|
+
export type DigitalCardStatus = 'ACTIVE' | 'SUSPENDED' | 'EXPIRED' | 'PENDING';
|
|
38
|
+
export type SrcCard = {
|
|
39
39
|
srcDigitalCardId: string;
|
|
40
40
|
panLastFour: string;
|
|
41
41
|
dateOfCardLastUsed: string;
|
|
@@ -49,7 +49,7 @@ export declare type SrcCard = {
|
|
|
49
49
|
};
|
|
50
50
|
tokenId?: string;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type SrcCheckoutParams = {
|
|
53
53
|
srcCorrelationId: string;
|
|
54
54
|
srcDigitalCardId: string;
|
|
55
55
|
windowRef?: Window;
|
|
@@ -58,3 +58,7 @@ export interface SrcInitParams {
|
|
|
58
58
|
srcInitiatorId: string;
|
|
59
59
|
srciDpaId: string;
|
|
60
60
|
}
|
|
61
|
+
export interface SrcIdentityLookupParams {
|
|
62
|
+
identityValue: string;
|
|
63
|
+
type: 'email' | 'telephoneNumber';
|
|
64
|
+
}
|
|
@@ -10,28 +10,28 @@ export interface IClickToPayService {
|
|
|
10
10
|
initialize(): Promise<void>;
|
|
11
11
|
checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload>;
|
|
12
12
|
logout(): Promise<void>;
|
|
13
|
-
verifyIfShopperIsEnrolled(
|
|
13
|
+
verifyIfShopperIsEnrolled(shopperIdentity: IdentityLookupParams): Promise<{
|
|
14
14
|
isEnrolled: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
subscribeOnStateChange(callback: CallbackStateSubscriber): void;
|
|
17
17
|
startIdentityValidation(): Promise<void>;
|
|
18
18
|
finishIdentityValidation(otpCode: string): Promise<void>;
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type IdentityValidationData = {
|
|
21
21
|
maskedShopperContact: string;
|
|
22
22
|
selectedNetwork: string;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type CallbackStateSubscriber = (state: CtpState) => void;
|
|
25
25
|
export interface IdentityLookupParams {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
shopperEmail?: string;
|
|
27
|
+
telephoneNumber?: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type MastercardCheckout = {
|
|
30
30
|
srcDigitalCardId: string;
|
|
31
31
|
srcCorrelationId: string;
|
|
32
32
|
srcScheme: string;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type VisaCheckout = {
|
|
35
35
|
srcCheckoutPayload?: string;
|
|
36
36
|
srcTokenReference?: string;
|
|
37
37
|
srcCorrelationId: string;
|
|
@@ -40,9 +40,9 @@ export declare type VisaCheckout = {
|
|
|
40
40
|
export interface SrcProfileWithScheme extends SrcProfile {
|
|
41
41
|
scheme: ClickToPayScheme;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
43
|
+
export type CardTypes = {
|
|
44
44
|
availableCards: ShopperCard[];
|
|
45
45
|
expiredCards: ShopperCard[];
|
|
46
46
|
};
|
|
47
|
-
export
|
|
48
|
-
export
|
|
47
|
+
export type SchemesConfiguration = Partial<Record<ClickToPayScheme, SrcInitParams>>;
|
|
48
|
+
export type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
|