@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
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ export declare const CTP_IFRAME_NAME = "ctpIframe";
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates the payload for the /payments call
|
|
7
7
|
*/
|
|
8
|
-
declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard,
|
|
8
|
+
declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard, srciCheckoutResponse: SrciCheckoutResponse, environment: string): ClickToPayCheckoutPayload;
|
|
9
9
|
/**
|
|
10
10
|
* Creates the Shopper card list. The available cards are placed before the expired cards
|
|
11
11
|
*/
|
|
@@ -12,11 +12,6 @@ export interface CardElementProps extends UIElementProps {
|
|
|
12
12
|
* Configuration specific to brands
|
|
13
13
|
*/
|
|
14
14
|
brandsConfiguration?: CardBrandsConfiguration;
|
|
15
|
-
/**
|
|
16
|
-
* Flag indicating if merchant really intent to use Click to Pay
|
|
17
|
-
* Will be removed when we Click to Pay goes live
|
|
18
|
-
*/
|
|
19
|
-
useClickToPay: boolean;
|
|
20
15
|
/**
|
|
21
16
|
* Configuration for Click to Pay
|
|
22
17
|
*/
|
|
@@ -89,10 +84,16 @@ export interface CardElementProps extends UIElementProps {
|
|
|
89
84
|
onBinLookup?: (event: CbObjOnBinLookup) => void;
|
|
90
85
|
[key: string]: any;
|
|
91
86
|
}
|
|
92
|
-
export
|
|
93
|
-
export
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
export type ClickToPayScheme = 'mc' | 'visa';
|
|
88
|
+
export type ClickToPayConfiguration = {
|
|
89
|
+
/**
|
|
90
|
+
* Shopper email used to be recognized with the Network schemes
|
|
91
|
+
*/
|
|
92
|
+
shopperEmail?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Shopper telephone number used to be recognized with the Network schemes
|
|
95
|
+
*/
|
|
96
|
+
telephoneNumber?: string;
|
|
96
97
|
/**
|
|
97
98
|
* Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
|
|
98
99
|
*/
|
|
@@ -102,11 +103,16 @@ export declare type ClickToPayConfiguration = {
|
|
|
102
103
|
* defined during the creation of the Checkout.
|
|
103
104
|
* Format: ISO language_country pair (e.g., en_US )
|
|
104
105
|
*
|
|
105
|
-
* @
|
|
106
|
+
* @defaultValue en_US
|
|
106
107
|
*/
|
|
107
108
|
locale?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
|
|
111
|
+
* @defaultValue false
|
|
112
|
+
*/
|
|
113
|
+
disableOtpAutoFocus?: boolean;
|
|
108
114
|
};
|
|
109
|
-
export
|
|
115
|
+
export type SocialSecurityMode = 'show' | 'hide' | 'auto';
|
|
110
116
|
/** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
|
|
111
117
|
export interface CardConfiguration {
|
|
112
118
|
visaSrciDpaId?: string;
|
|
@@ -27,6 +27,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
|
|
|
27
27
|
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
28
28
|
onSubmit?: (state: any, element: UIElement<any>) => void;
|
|
29
29
|
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
30
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
30
31
|
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
31
32
|
onError?: (error: any, element?: UIElement<any>) => void;
|
|
32
33
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
@@ -52,6 +52,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
|
|
|
52
52
|
onValid?: (state: any, element: UIElement<any>) => void;
|
|
53
53
|
beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
|
|
54
54
|
onComplete?: (state: any, element: UIElement<any>) => void;
|
|
55
|
+
onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
|
|
55
56
|
onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
|
|
56
57
|
onError?: (error: any, element?: UIElement<any>) => void;
|
|
57
58
|
onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
|
|
@@ -2,7 +2,7 @@ import { PaymentMethod, StoredPaymentMethod, Order, OrderStatus } from '../../ty
|
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
3
|
import { UIElementProps, UIElementStatus } from '../types';
|
|
4
4
|
import { PaymentMethodsConfiguration } from '../../core/types';
|
|
5
|
-
export
|
|
5
|
+
export type InstantPaymentTypes = 'paywithgoogle' | 'googlepay' | 'applepay';
|
|
6
6
|
export interface DropinElementProps extends UIElementProps {
|
|
7
7
|
/**
|
|
8
8
|
* Configure each payment method displayed on the Drop-in
|
|
@@ -7,7 +7,6 @@ declare class DuitNowElement 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 DuitNowElement 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;
|
|
@@ -10,5 +10,5 @@ interface EcontextInputProps {
|
|
|
10
10
|
onSubmit?(state: any, component: any): void;
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
}
|
|
13
|
-
export default function EcontextInput({ personalDetailsRequired, data, onChange, showPayButton, payButton }: EcontextInputProps): h.JSX.Element;
|
|
13
|
+
export default function EcontextInput({ personalDetailsRequired, data, onChange, showPayButton, payButton, ...props }: EcontextInputProps): h.JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Language from '../../../language/Language';
|
|
2
2
|
import { SFPState } from '../../internal/SecuredFields/SFP/types';
|
|
3
|
-
export
|
|
3
|
+
export type GiftcardFieldsProps = {
|
|
4
4
|
setRootNode: (input: HTMLElement) => void;
|
|
5
5
|
i18n: Language;
|
|
6
6
|
pinRequired: boolean;
|
|
@@ -9,7 +9,7 @@ export declare type GiftcardFieldsProps = {
|
|
|
9
9
|
focusedElement: any;
|
|
10
10
|
setFocusOn: any;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type GiftcardFieldProps = {
|
|
13
13
|
i18n: Language;
|
|
14
14
|
classNameModifiers?: Array<string>;
|
|
15
15
|
sfpState: any;
|
|
@@ -6,7 +6,7 @@ declare global {
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
/** sdkData present in Klarna `action`objects. */
|
|
9
|
-
export
|
|
9
|
+
export type KlarnaSdkData = {
|
|
10
10
|
/**
|
|
11
11
|
* Klarna client_token
|
|
12
12
|
* @see https://developers.klarna.com/documentation/klarna-payments/single-call-descriptions/create-session/
|
|
@@ -28,7 +28,7 @@ export interface KlarnaWidgetProps extends KlarnaPaymentsShared {
|
|
|
28
28
|
onComplete: (detailsData: any) => void;
|
|
29
29
|
onError: (error: any) => void;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type KlarnaPaymentsProps = UIElementProps & KlarnaPaymentsShared & {
|
|
32
32
|
useKlarnaWidget: boolean;
|
|
33
33
|
};
|
|
34
34
|
export interface KlarnaWidgetAuthorizeResponse {
|
|
@@ -7,7 +7,6 @@ declare class PayNowElement 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 PayNowElement 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;
|
|
@@ -11,7 +11,7 @@ declare class PaypalElement extends UIElement<PayPalElementProps> {
|
|
|
11
11
|
private resolve;
|
|
12
12
|
private reject;
|
|
13
13
|
constructor(props: PayPalElementProps);
|
|
14
|
-
|
|
14
|
+
formatProps(props: PayPalElementProps): PayPalElementProps;
|
|
15
15
|
/**
|
|
16
16
|
* Formats the component data output
|
|
17
17
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const INTEGRATION_DATE = "2020-02-01";
|
|
2
2
|
declare const PAYPAL_JS_URL = "https://www.paypal.com/sdk/js";
|
|
3
|
-
declare const ADYEN_CLIENTID_TEST = "
|
|
3
|
+
declare const ADYEN_CLIENTID_TEST = "AXy9hIzWB6h_LjZUHjHmsbsiicSIbL4GKOrcgomEedVjduUinIU4C2llxkW5p0OG0zTNgviYFceaXEnj";
|
|
4
4
|
declare const ADYEN_CLIENTID_LIVE = "AU0Z-TP9t5_9196agaBN6ZD3UAwypdP1IX8ZYH3PcNNAQMXUTDQlChruXqQEhyI6-NKBKowN6ydkj477";
|
|
5
5
|
declare const SUPPORTED_COLORS_FOR_CREDIT: string[];
|
|
6
6
|
declare const SUPPORTED_LOCALES: readonly ["en_US", "en_AU", "en_GB", "fr_CA", "es_ES", "it_IT", "fr_FR", "de_DE", "pt_BR", "zh_CN", "da_DK", "zh_HK", "id_ID", "he_IL", "ja_JP", "ko_KR", "nl_NL", "no_NO", "pl_PL", "pt_PT", "ru_RU", "sv_SE", "th_TH", "zh_TW"];
|
|
@@ -11,9 +11,9 @@ declare global {
|
|
|
11
11
|
* The intent for the transaction. This determines whether the funds are captured immediately, or later.
|
|
12
12
|
* @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
|
|
13
13
|
*/
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
interface PayPalStyles {
|
|
14
|
+
export type Intent = 'sale' | 'capture' | 'authorize' | 'order' | 'tokenize';
|
|
15
|
+
export type FundingSource = 'paypal' | 'credit';
|
|
16
|
+
export interface PayPalStyles {
|
|
17
17
|
/**
|
|
18
18
|
* @see {@link https://developer.paypal.com/docs/checkout/integration-features/customize-button/#color}
|
|
19
19
|
*/
|
|
@@ -68,7 +68,10 @@ interface PayPalCommonProps {
|
|
|
68
68
|
*/
|
|
69
69
|
cspNonce?: string;
|
|
70
70
|
/**
|
|
71
|
+
* Determines whether the funds are captured immediately on checkout or if the buyer authorizes the funds to be captured later.
|
|
71
72
|
* @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
|
|
73
|
+
*
|
|
74
|
+
* If set, it will override the intent passed inside the 'configuration' object
|
|
72
75
|
*/
|
|
73
76
|
intent?: Intent;
|
|
74
77
|
/**
|
|
@@ -152,5 +155,5 @@ export interface PaypalSettings {
|
|
|
152
155
|
'enable-funding': string;
|
|
153
156
|
components: string;
|
|
154
157
|
}
|
|
155
|
-
export
|
|
158
|
+
export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number];
|
|
156
159
|
export {};
|
|
@@ -7,7 +7,6 @@ declare class PromptPayElement 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 PromptPayElement 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;
|
|
@@ -7,7 +7,6 @@ declare class SwishElement 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 SwishElement 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;
|
|
@@ -2,6 +2,7 @@ import { h } from 'preact';
|
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
3
|
import { ErrorCodeObject } from './components/utils';
|
|
4
4
|
import Language from '../../language';
|
|
5
|
+
import { ActionHandledReturnObject } from '../types';
|
|
5
6
|
export interface ThreeDS2ChallengeProps {
|
|
6
7
|
token?: string;
|
|
7
8
|
dataKey?: string;
|
|
@@ -14,6 +15,7 @@ export interface ThreeDS2ChallengeProps {
|
|
|
14
15
|
loadingContext?: string;
|
|
15
16
|
useOriginalFlow?: boolean;
|
|
16
17
|
i18n?: Language;
|
|
18
|
+
onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
|
|
17
19
|
}
|
|
18
20
|
declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeProps> {
|
|
19
21
|
static type: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
3
|
import { ErrorCodeObject } from './components/utils';
|
|
4
|
+
import { ActionHandledReturnObject } from '../types';
|
|
4
5
|
export interface ThreeDS2DeviceFingerprintProps {
|
|
5
6
|
dataKey: string;
|
|
6
7
|
token: string;
|
|
@@ -13,6 +14,7 @@ export interface ThreeDS2DeviceFingerprintProps {
|
|
|
13
14
|
loadingContext?: string;
|
|
14
15
|
clientKey?: string;
|
|
15
16
|
elementRef?: UIElement;
|
|
17
|
+
onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
|
|
16
18
|
}
|
|
17
19
|
declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintProps> {
|
|
18
20
|
static type: string;
|
|
@@ -6,11 +6,14 @@ declare class PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props,
|
|
|
6
6
|
static defaultProps: {
|
|
7
7
|
onComplete: () => void;
|
|
8
8
|
onError: () => void;
|
|
9
|
+
onActionHandled: () => void;
|
|
9
10
|
};
|
|
10
11
|
constructor(props: any);
|
|
11
12
|
setStatusComplete(resultObj: any): void;
|
|
12
13
|
setStatusError(errorInfoObj: any): void;
|
|
13
|
-
render(
|
|
14
|
+
render({ onActionHandled }: {
|
|
15
|
+
onActionHandled: any;
|
|
16
|
+
}, { challengeData }: {
|
|
14
17
|
challengeData: any;
|
|
15
18
|
}): h.JSX.Element;
|
|
16
19
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ChallengeData, ThreeDS2FlowObject } from '../../types';
|
|
2
2
|
import { ChallengeResolveData } from '../utils';
|
|
3
3
|
import { ThreeDS2ChallengeProps } from '../../ThreeDS2Challenge';
|
|
4
|
+
import { ActionHandledReturnObject } from '../../../types';
|
|
4
5
|
export interface DoChallenge3DS2Props extends ChallengeData {
|
|
5
6
|
onCompleteChallenge: (resolveObject: ThreeDS2FlowObject) => void;
|
|
6
7
|
onErrorChallenge: (rejectObject: ThreeDS2FlowObject) => void;
|
|
8
|
+
onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
|
|
7
9
|
}
|
|
8
10
|
export interface DoChallenge3DS2State {
|
|
9
11
|
base64URLencodedData?: string;
|
|
@@ -19,8 +19,9 @@ declare class DoFingerprint3DS2 extends Component<DoFingerprint3DS2Props, DoFing
|
|
|
19
19
|
get3DS2MethodPromise(): Promise<unknown>;
|
|
20
20
|
componentDidMount(): void;
|
|
21
21
|
componentWillUnmount(): void;
|
|
22
|
-
render({ threeDSMethodURL }: {
|
|
22
|
+
render({ threeDSMethodURL, onActionHandled }: {
|
|
23
23
|
threeDSMethodURL: any;
|
|
24
|
+
onActionHandled: any;
|
|
24
25
|
}, { base64URLencodedData }: {
|
|
25
26
|
base64URLencodedData: any;
|
|
26
27
|
}): h.JSX.Element;
|
package/dist/types/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.d.ts
CHANGED
|
@@ -9,10 +9,14 @@ declare class PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Pro
|
|
|
9
9
|
onError: () => void;
|
|
10
10
|
paymentData: string;
|
|
11
11
|
showSpinner: boolean;
|
|
12
|
+
onActionHandled: () => void;
|
|
12
13
|
};
|
|
13
14
|
componentDidMount(): void;
|
|
14
15
|
setStatusComplete(resultObj: ResultObject): void;
|
|
15
|
-
render(
|
|
16
|
+
render({ showSpinner, onActionHandled }: {
|
|
17
|
+
showSpinner: any;
|
|
18
|
+
onActionHandled: any;
|
|
19
|
+
}, { fingerPrintData }: {
|
|
16
20
|
fingerPrintData: any;
|
|
17
21
|
}): h.JSX.Element;
|
|
18
22
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ThreeDS2FlowObject, FingerPrintData } from '../../types';
|
|
2
2
|
import { ThreeDS2DeviceFingerprintProps } from '../../ThreeDS2DeviceFingerprint';
|
|
3
3
|
import { FingerprintResolveData } from '../utils';
|
|
4
|
+
import { ActionHandledReturnObject } from '../../../types';
|
|
4
5
|
export interface DoFingerprint3DS2Props extends FingerPrintData {
|
|
5
6
|
onCompleteFingerprint: (resolveObject: ThreeDS2FlowObject) => void;
|
|
6
7
|
onErrorFingerprint: (rejectObject: ThreeDS2FlowObject) => void;
|
|
7
8
|
showSpinner: boolean;
|
|
9
|
+
onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
|
|
8
10
|
}
|
|
9
11
|
export interface DoFingerprint3DS2State {
|
|
10
12
|
base64URLencodedData: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* https://docs.adyen.com/checkout/3d-secure/api-reference#threeds2result
|
|
4
4
|
* Indicates whether a transaction was authenticated, or whether additional verification is required.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type ResultValue = 'Y' | 'N' | 'U' | 'A' | 'C' | 'R';
|
|
7
7
|
export interface CReqData {
|
|
8
8
|
acsTransID: string;
|
|
9
9
|
messageVersion: string;
|
|
@@ -50,18 +50,18 @@ export interface FingerPrintData {
|
|
|
50
50
|
threeDSMethodNotificationURL: string;
|
|
51
51
|
postMessageDomain: string;
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type ThreeDS2FingerprintResponse = {
|
|
54
54
|
type: 'action' | 'completed';
|
|
55
55
|
action?: CheckoutRedirectAction | CheckoutThreeDS2Action;
|
|
56
56
|
details?: Record<string, string>;
|
|
57
57
|
};
|
|
58
|
-
|
|
58
|
+
type CheckoutRedirectAction = {
|
|
59
59
|
type: 'redirect';
|
|
60
60
|
data: Record<string, string>;
|
|
61
61
|
method: string;
|
|
62
62
|
paymentData: string;
|
|
63
63
|
};
|
|
64
|
-
|
|
64
|
+
type CheckoutThreeDS2Action = {
|
|
65
65
|
type: 'threeDS2';
|
|
66
66
|
token: string;
|
|
67
67
|
subtype: string;
|
|
@@ -42,6 +42,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
|
|
|
42
42
|
* @param options - CoreOptions
|
|
43
43
|
*/
|
|
44
44
|
updateParent(options?: CoreOptions): Promise<Core>;
|
|
45
|
+
setComponentRef: (ref: any) => void;
|
|
45
46
|
/**
|
|
46
47
|
* Get the current validation status of the element
|
|
47
48
|
*/
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { h, RefObject } from 'preact';
|
|
2
2
|
import { PayButtonFunctionProps } from '../../../types';
|
|
3
|
+
import { VpaInputDataState } from '../VpaInput/VpaInput';
|
|
3
4
|
import { UpiMode } from '../../types';
|
|
4
5
|
import './UPIComponent.scss';
|
|
6
|
+
type OnChangeProps = {
|
|
7
|
+
data: VpaInputDataState;
|
|
8
|
+
valid: any;
|
|
9
|
+
errors: any;
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
};
|
|
5
12
|
interface UPIComponentProps {
|
|
6
13
|
defaultMode: UpiMode;
|
|
7
14
|
showPayButton: boolean;
|
|
8
15
|
ref(ref: RefObject<typeof UPIComponent>): void;
|
|
9
16
|
payButton(props: PayButtonFunctionProps): h.JSX.Element;
|
|
10
|
-
onChange({ data
|
|
11
|
-
data: any;
|
|
12
|
-
valid: any;
|
|
13
|
-
errors: any;
|
|
14
|
-
isValid: any;
|
|
15
|
-
}): void;
|
|
17
|
+
onChange({ data, valid, errors, isValid }: OnChangeProps): void;
|
|
16
18
|
onUpdateMode(mode: UpiMode): void;
|
|
17
19
|
}
|
|
18
20
|
export default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton }: UPIComponentProps): h.JSX.Element;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './VpaInput.scss';
|
|
3
|
+
type OnChangeProps = {
|
|
4
|
+
data: VpaInputDataState;
|
|
5
|
+
valid: any;
|
|
6
|
+
errors: any;
|
|
7
|
+
isValid: boolean;
|
|
8
|
+
};
|
|
3
9
|
interface VpaInputProps {
|
|
4
10
|
data?: {};
|
|
5
11
|
disabled?: boolean;
|
|
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: VpaInputHandlers): void;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export interface VpaInputDataState {
|
|
16
|
+
virtualPaymentAddress?: string;
|
|
17
|
+
}
|
|
18
|
+
export type VpaInputHandlers = {
|
|
15
19
|
validateInput(): void;
|
|
16
20
|
};
|
|
17
21
|
declare const VpaInput: (props: VpaInputProps) => h.JSX.Element;
|
|
@@ -7,7 +7,6 @@ declare class WeChatPayElement 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 WeChatPayElement 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;
|
|
@@ -13,7 +13,6 @@ export interface QRLoaderContainerProps extends UIElementProps {
|
|
|
13
13
|
type?: string;
|
|
14
14
|
brandLogo?: string;
|
|
15
15
|
buttonLabel?: string;
|
|
16
|
-
shouldRedirectOnMobile?: boolean;
|
|
17
16
|
qrCodeImage?: string;
|
|
18
17
|
paymentData?: string;
|
|
19
18
|
introduction: string;
|
|
@@ -27,6 +26,7 @@ declare class QRLoaderContainer<T extends QRLoaderContainerProps = QRLoaderConta
|
|
|
27
26
|
paymentData: any;
|
|
28
27
|
onError: () => void;
|
|
29
28
|
onComplete: () => void;
|
|
29
|
+
onActionHandled: () => void;
|
|
30
30
|
};
|
|
31
31
|
formatData(): {
|
|
32
32
|
paymentMethod: any;
|
|
@@ -2,7 +2,7 @@ import { AddressField, AddressData } from '../../../types';
|
|
|
2
2
|
import Specifications from './Specifications';
|
|
3
3
|
import { ValidatorRules } from '../../../utils/Validator/types';
|
|
4
4
|
import { ValidationRuleResult } from '../../../utils/Validator/ValidationRuleResult';
|
|
5
|
-
export
|
|
5
|
+
export type StringObject = {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
8
8
|
export interface AddressProps {
|
|
@@ -18,6 +18,9 @@ export interface AddressProps {
|
|
|
18
18
|
visibility?: string;
|
|
19
19
|
overrideSchema?: AddressSpecifications;
|
|
20
20
|
iOSFocusedField?: string;
|
|
21
|
+
payButton?: (obj: any) => {};
|
|
22
|
+
showPayButton?: boolean;
|
|
23
|
+
setComponentRef?: (ref: any) => void;
|
|
21
24
|
}
|
|
22
25
|
export interface AddressStateError {
|
|
23
26
|
street?: ValidationRuleResult;
|
|
@@ -75,8 +78,8 @@ export interface StateFieldItem {
|
|
|
75
78
|
id: string;
|
|
76
79
|
name: string;
|
|
77
80
|
}
|
|
78
|
-
|
|
79
|
-
export
|
|
81
|
+
type AddressFieldsGroup = [AddressField, number][];
|
|
82
|
+
export type AddressSchema = (AddressField | AddressFieldsGroup)[];
|
|
80
83
|
export interface AddressSpecifications {
|
|
81
84
|
[key: string]: {
|
|
82
85
|
hasDataset?: boolean;
|
|
@@ -7,12 +7,12 @@ declare namespace Await {
|
|
|
7
7
|
countdownTime: number;
|
|
8
8
|
onError: () => void;
|
|
9
9
|
onComplete: () => void;
|
|
10
|
+
onActionHandled: () => void;
|
|
10
11
|
delay: number;
|
|
11
12
|
throttleTime: number;
|
|
12
13
|
throttleInterval: number;
|
|
13
14
|
showCountdownTimer: boolean;
|
|
14
15
|
classNameModifiers: any[];
|
|
15
|
-
shouldRedirectOnMobile: boolean;
|
|
16
16
|
url: any;
|
|
17
17
|
};
|
|
18
18
|
}
|