@adyen/adyen-web 5.28.3 → 5.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adyen.css +11 -9
- 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 +11 -9
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +11 -9
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/ar.js +1 -1
- package/dist/es/cs-CZ.js +1 -1
- package/dist/es/da-DK.js +1 -1
- package/dist/es/de-DE.js +1 -1
- package/dist/es/el-GR.js +1 -1
- package/dist/es/es-ES.js +1 -1
- package/dist/es/fi-FI.js +1 -1
- package/dist/es/fr-FR.js +1 -1
- package/dist/es/hr-HR.js +1 -1
- package/dist/es/hu-HU.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/it-IT.js +1 -1
- package/dist/es/ja-JP.js +1 -1
- package/dist/es/ko-KR.js +1 -1
- package/dist/es/nl-NL.js +1 -1
- package/dist/es/no-NO.js +1 -1
- package/dist/es/pl-PL.js +1 -1
- package/dist/es/pt-BR.js +1 -1
- package/dist/es/pt-PT.js +1 -1
- package/dist/es/ro-RO.js +1 -1
- package/dist/es/ru-RU.js +1 -1
- package/dist/es/sk-SK.js +1 -1
- package/dist/es/sl-SI.js +1 -1
- package/dist/es/sv-SE.js +1 -1
- package/dist/es/zh-CN.js +1 -1
- package/dist/es/zh-TW.js +1 -1
- package/dist/es.modern/adyen.css +11 -9
- package/dist/es.modern/adyen.css.map +1 -1
- package/dist/es.modern/ar.js +1 -1
- package/dist/es.modern/cs-CZ.js +1 -1
- package/dist/es.modern/da-DK.js +1 -1
- package/dist/es.modern/de-DE.js +1 -1
- package/dist/es.modern/el-GR.js +1 -1
- package/dist/es.modern/es-ES.js +1 -1
- package/dist/es.modern/fi-FI.js +1 -1
- package/dist/es.modern/fr-FR.js +1 -1
- package/dist/es.modern/hr-HR.js +1 -1
- package/dist/es.modern/hu-HU.js +1 -1
- package/dist/es.modern/index.js +1 -1
- package/dist/es.modern/it-IT.js +1 -1
- package/dist/es.modern/ja-JP.js +1 -1
- package/dist/es.modern/ko-KR.js +1 -1
- package/dist/es.modern/nl-NL.js +1 -1
- package/dist/es.modern/no-NO.js +1 -1
- package/dist/es.modern/pl-PL.js +1 -1
- package/dist/es.modern/pt-BR.js +1 -1
- package/dist/es.modern/pt-PT.js +1 -1
- package/dist/es.modern/ro-RO.js +1 -1
- package/dist/es.modern/ru-RU.js +1 -1
- package/dist/es.modern/sk-SK.js +1 -1
- package/dist/es.modern/sl-SI.js +1 -1
- package/dist/es.modern/sv-SE.js +1 -1
- package/dist/es.modern/zh-CN.js +1 -1
- package/dist/es.modern/zh-TW.js +1 -1
- package/dist/types/components/BaseElement.d.ts +7 -3
- package/dist/types/components/Blik/Blik.d.ts +5 -0
- package/dist/types/components/Card/components/CardInput/types.d.ts +1 -0
- package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +2 -2
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +2 -2
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +3 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/CtPEmptyCardsList.d.ts +2 -4
- package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +2 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +4 -1
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +2 -0
- package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.d.ts +2 -1
- package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +3 -2
- package/dist/types/components/Card/components/ClickToPay/context/useClickToPayContext.d.ts +2 -2
- package/dist/types/components/Card/components/ClickToPay/models/ShopperCard.d.ts +5 -0
- package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +5 -7
- package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +1 -1
- package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +4 -1
- package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +4 -0
- package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +13 -5
- package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +3 -0
- package/dist/types/components/Dropin/Dropin.d.ts +12 -4
- package/dist/types/components/Dropin/types.d.ts +1 -1
- package/dist/types/components/DuitNow/DuitNow.d.ts +46 -0
- package/dist/types/components/DuitNow/config.d.ts +7 -0
- package/dist/types/components/DuitNow/index.d.ts +1 -0
- package/dist/types/components/Giftcard/Giftcard.d.ts +2 -2
- package/dist/types/components/PayNow/PayNow.d.ts +46 -0
- package/dist/types/components/PayNow/config.d.ts +7 -0
- package/dist/types/components/PayNow/index.d.ts +1 -0
- package/dist/types/components/PromptPay/PromptPay.d.ts +46 -0
- package/dist/types/components/PromptPay/config.d.ts +7 -0
- package/dist/types/components/PromptPay/index.d.ts +1 -0
- package/dist/types/components/ThreeDS2/ThreeDS2Challenge.d.ts +4 -3
- package/dist/types/components/ThreeDS2/ThreeDS2DeviceFingerprint.d.ts +3 -2
- package/dist/types/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.d.ts +1 -2
- package/dist/types/components/ThreeDS2/components/Challenge/types.d.ts +1 -1
- package/dist/types/components/ThreeDS2/components/utils.d.ts +2 -2
- package/dist/types/components/ThreeDS2/config.d.ts +3 -3
- package/dist/types/components/ThreeDS2/types.d.ts +6 -0
- package/dist/types/components/UIElement.d.ts +15 -6
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/internal/FormFields/InputBase.d.ts +6 -1
- package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -1
- package/dist/types/components/internal/FormFields/Select/types.d.ts +1 -4
- package/dist/types/components/internal/FormFields/index.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/SFP/types.d.ts +1 -0
- package/dist/types/components/internal/SecuredFields/lib/CSF/AbstractCSF.d.ts +1 -1
- package/dist/types/components/internal/SecuredFields/lib/CSF/extensions/handleConfig.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/CSF/types.d.ts +21 -10
- package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +18 -10
- package/dist/types/components/internal/SecuredFields/lib/securedField/SecuredField.d.ts +2 -2
- package/dist/types/components/types.d.ts +31 -0
- package/dist/types/core/RiskModule/RiskModule.d.ts +2 -1
- package/dist/types/core/types.d.ts +2 -1
- package/dist/types/language/config.d.ts +17 -7
- package/dist/types/language/locales/index.d.ts +784 -364
- package/dist/types/types/index.d.ts +2 -2
- package/dist/types/utils/Script.d.ts +8 -3
- package/dist/types/utils/get-process-message-handler.d.ts +2 -1
- package/dist/types/utils/promise-util.d.ts +9 -0
- package/package.json +15 -11
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import QRLoaderContainer from '../helpers/QRLoaderContainer';
|
|
2
|
+
declare class DuitNowElement extends QRLoaderContainer {
|
|
3
|
+
static type: string;
|
|
4
|
+
formatProps(props: any): {
|
|
5
|
+
delay: number;
|
|
6
|
+
countdownTime: number;
|
|
7
|
+
type?: string;
|
|
8
|
+
brandLogo?: string;
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
shouldRedirectOnMobile?: boolean;
|
|
11
|
+
qrCodeImage?: string;
|
|
12
|
+
paymentData?: string;
|
|
13
|
+
instructions?: string;
|
|
14
|
+
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
15
|
+
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
16
|
+
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
18
|
+
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
|
+
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
20
|
+
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
|
+
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
22
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
23
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
24
|
+
isInstantPayment?: boolean;
|
|
25
|
+
name?: string;
|
|
26
|
+
icon?: string;
|
|
27
|
+
amount?: import("../../types").PaymentAmount;
|
|
28
|
+
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
29
|
+
showPayButton?: boolean;
|
|
30
|
+
setStatusAutomatically?: boolean;
|
|
31
|
+
payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
|
|
32
|
+
loadingContext?: string;
|
|
33
|
+
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
34
|
+
clientKey?: string;
|
|
35
|
+
elementRef?: any;
|
|
36
|
+
i18n?: import("../../language").default;
|
|
37
|
+
_parentInstance?: import("../../core/core").default;
|
|
38
|
+
order?: import("../../types").Order;
|
|
39
|
+
modules?: {
|
|
40
|
+
analytics: import("../../core/Analytics/Analytics").default;
|
|
41
|
+
risk: import("../../core/RiskModule").default;
|
|
42
|
+
};
|
|
43
|
+
isDropin?: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export default DuitNowElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DuitNow';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
|
-
import {
|
|
3
|
+
import { PaymentResponse } from '../types';
|
|
4
4
|
export declare class GiftcardElement extends UIElement {
|
|
5
5
|
static type: string;
|
|
6
6
|
protected static defaultProps: {
|
|
@@ -23,7 +23,7 @@ export declare class GiftcardElement extends UIElement {
|
|
|
23
23
|
get displayName(): any;
|
|
24
24
|
private handleBalanceCheck;
|
|
25
25
|
private onOrderRequest;
|
|
26
|
-
protected handleOrder: (order:
|
|
26
|
+
protected handleOrder: ({ order }: PaymentResponse) => any;
|
|
27
27
|
balanceCheck(): false | void;
|
|
28
28
|
onBalanceCheck: () => false | void;
|
|
29
29
|
payButton: (props: any) => h.JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import QRLoaderContainer from '../helpers/QRLoaderContainer';
|
|
2
|
+
declare class PayNowElement extends QRLoaderContainer {
|
|
3
|
+
static type: string;
|
|
4
|
+
formatProps(props: any): {
|
|
5
|
+
delay: number;
|
|
6
|
+
countdownTime: number;
|
|
7
|
+
type?: string;
|
|
8
|
+
brandLogo?: string;
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
shouldRedirectOnMobile?: boolean;
|
|
11
|
+
qrCodeImage?: string;
|
|
12
|
+
paymentData?: string;
|
|
13
|
+
instructions?: string;
|
|
14
|
+
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
15
|
+
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
16
|
+
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
18
|
+
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
|
+
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
20
|
+
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
|
+
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
22
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
23
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
24
|
+
isInstantPayment?: boolean;
|
|
25
|
+
name?: string;
|
|
26
|
+
icon?: string;
|
|
27
|
+
amount?: import("../../types").PaymentAmount;
|
|
28
|
+
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
29
|
+
showPayButton?: boolean;
|
|
30
|
+
setStatusAutomatically?: boolean;
|
|
31
|
+
payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
|
|
32
|
+
loadingContext?: string;
|
|
33
|
+
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
34
|
+
clientKey?: string;
|
|
35
|
+
elementRef?: any;
|
|
36
|
+
i18n?: import("../../language").default;
|
|
37
|
+
_parentInstance?: import("../../core/core").default;
|
|
38
|
+
order?: import("../../types").Order;
|
|
39
|
+
modules?: {
|
|
40
|
+
analytics: import("../../core/Analytics/Analytics").default;
|
|
41
|
+
risk: import("../../core/RiskModule").default;
|
|
42
|
+
};
|
|
43
|
+
isDropin?: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export default PayNowElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PayNow';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import QRLoaderContainer from '../helpers/QRLoaderContainer';
|
|
2
|
+
declare class PromptPayElement extends QRLoaderContainer {
|
|
3
|
+
static type: string;
|
|
4
|
+
formatProps(props: any): {
|
|
5
|
+
delay: number;
|
|
6
|
+
countdownTime: number;
|
|
7
|
+
type?: string;
|
|
8
|
+
brandLogo?: string;
|
|
9
|
+
buttonLabel?: string;
|
|
10
|
+
shouldRedirectOnMobile?: boolean;
|
|
11
|
+
qrCodeImage?: string;
|
|
12
|
+
paymentData?: string;
|
|
13
|
+
instructions?: string;
|
|
14
|
+
session?: import("../../core/CheckoutSession/CheckoutSession").default;
|
|
15
|
+
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
16
|
+
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
18
|
+
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
|
+
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
20
|
+
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
|
+
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
22
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
23
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
24
|
+
isInstantPayment?: boolean;
|
|
25
|
+
name?: string;
|
|
26
|
+
icon?: string;
|
|
27
|
+
amount?: import("../../types").PaymentAmount;
|
|
28
|
+
secondaryAmount?: import("../../types").PaymentAmountExtended;
|
|
29
|
+
showPayButton?: boolean;
|
|
30
|
+
setStatusAutomatically?: boolean;
|
|
31
|
+
payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
|
|
32
|
+
loadingContext?: string;
|
|
33
|
+
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
34
|
+
clientKey?: string;
|
|
35
|
+
elementRef?: any;
|
|
36
|
+
i18n?: import("../../language").default;
|
|
37
|
+
_parentInstance?: import("../../core/core").default;
|
|
38
|
+
order?: import("../../types").Order;
|
|
39
|
+
modules?: {
|
|
40
|
+
analytics: import("../../core/Analytics/Analytics").default;
|
|
41
|
+
risk: import("../../core/RiskModule").default;
|
|
42
|
+
};
|
|
43
|
+
isDropin?: boolean;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export default PromptPayElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PromptPay';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorCodeObject } from './components/utils';
|
|
4
4
|
import Language from '../../language';
|
|
5
|
+
import { ThreeDS2ChallengeRejectObject } from './types';
|
|
5
6
|
export interface ThreeDS2ChallengeProps {
|
|
6
7
|
token?: string;
|
|
7
8
|
dataKey?: string;
|
|
8
9
|
notificationURL?: string;
|
|
9
|
-
onError?: (error: string |
|
|
10
|
+
onError?: (error: string | ErrorCodeObject | ThreeDS2ChallengeRejectObject) => void;
|
|
10
11
|
paymentData?: string;
|
|
11
12
|
size?: string;
|
|
12
13
|
challengeWindowSize?: '01' | '02' | '03' | '04' | '05';
|
|
@@ -14,7 +15,6 @@ export interface ThreeDS2ChallengeProps {
|
|
|
14
15
|
loadingContext?: string;
|
|
15
16
|
useOriginalFlow?: boolean;
|
|
16
17
|
i18n?: Language;
|
|
17
|
-
threeDS2MDFlowUnloadListener?: any;
|
|
18
18
|
}
|
|
19
19
|
declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeProps> {
|
|
20
20
|
static type: string;
|
|
@@ -23,6 +23,7 @@ declare class ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeProps> {
|
|
|
23
23
|
size: string;
|
|
24
24
|
type: string;
|
|
25
25
|
};
|
|
26
|
+
onComplete(state: any): void;
|
|
26
27
|
render(): h.JSX.Element;
|
|
27
28
|
}
|
|
28
29
|
export default ThreeDS2Challenge;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import UIElement from '../UIElement';
|
|
3
|
-
import {
|
|
3
|
+
import { ErrorCodeObject } from './components/utils';
|
|
4
4
|
export interface ThreeDS2DeviceFingerprintProps {
|
|
5
5
|
dataKey: string;
|
|
6
6
|
token: string;
|
|
7
7
|
notificationURL: string;
|
|
8
|
-
onError: (error?: string |
|
|
8
|
+
onError: (error?: string | ErrorCodeObject) => void;
|
|
9
9
|
paymentData: string;
|
|
10
10
|
showSpinner: boolean;
|
|
11
11
|
type: string;
|
|
@@ -21,6 +21,7 @@ declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerpr
|
|
|
21
21
|
type: string;
|
|
22
22
|
};
|
|
23
23
|
private callSubmit3DS2Fingerprint;
|
|
24
|
+
onComplete(state: any): void;
|
|
24
25
|
render(): h.JSX.Element;
|
|
25
26
|
}
|
|
26
27
|
export default ThreeDS2DeviceFingerprint;
|
|
@@ -8,9 +8,8 @@ declare class PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props,
|
|
|
8
8
|
onError: () => void;
|
|
9
9
|
};
|
|
10
10
|
constructor(props: any);
|
|
11
|
-
remove3DS2MDFlowUnloadListener(): void;
|
|
12
11
|
setStatusComplete(resultObj: any): void;
|
|
13
|
-
setStatusError(
|
|
12
|
+
setStatusError(errorInfoObj: any): void;
|
|
14
13
|
render(props: any, { challengeData }: {
|
|
15
14
|
challengeData: any;
|
|
16
15
|
}): h.JSX.Element;
|
|
@@ -4,7 +4,6 @@ import { ThreeDS2ChallengeProps } from '../../ThreeDS2Challenge';
|
|
|
4
4
|
export interface DoChallenge3DS2Props extends ChallengeData {
|
|
5
5
|
onCompleteChallenge: (resolveObject: ThreeDS2FlowObject) => void;
|
|
6
6
|
onErrorChallenge: (rejectObject: ThreeDS2FlowObject) => void;
|
|
7
|
-
threeDS2MDFlowUnloadListener?: (event: any) => any;
|
|
8
7
|
}
|
|
9
8
|
export interface DoChallenge3DS2State {
|
|
10
9
|
base64URLencodedData?: string;
|
|
@@ -16,4 +15,5 @@ export interface PrepareChallenge3DS2Props extends ThreeDS2ChallengeProps {
|
|
|
16
15
|
export interface PrepareChallenge3DS2State {
|
|
17
16
|
challengeData?: ChallengeData;
|
|
18
17
|
status?: string;
|
|
18
|
+
errorInfo?: string;
|
|
19
19
|
}
|
|
@@ -12,7 +12,7 @@ export interface ChallengeResolveData {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface ErrorCodeObject {
|
|
16
16
|
errorCode: string;
|
|
17
17
|
message: string;
|
|
18
18
|
}
|
|
@@ -67,7 +67,7 @@ export declare const createFingerprintResolveData: (dataKey: string, resultObj:
|
|
|
67
67
|
export declare const createOldFingerprintResolveData: (dataKey: string, resultObj: ResultObject, paymentData: string) => any;
|
|
68
68
|
export declare const createChallengeResolveData: (dataKey: string, transStatus: string, authorisationToken: string) => ChallengeResolveData;
|
|
69
69
|
export declare const createOldChallengeResolveData: (dataKey: string, transStatus: string, authorisationToken: string) => any;
|
|
70
|
-
export declare const handleErrorCode: (errorCode: string, errorDescription?: string) =>
|
|
70
|
+
export declare const handleErrorCode: (errorCode: string, errorDescription?: string) => ErrorCodeObject;
|
|
71
71
|
/**
|
|
72
72
|
*
|
|
73
73
|
* Takes a string and encodes it as a base64url string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ThreeDS2FlowObject } from './types';
|
|
1
|
+
import { ThreeDS2FlowObject, ThreeDS2ChallengeRejectObject } from './types';
|
|
2
2
|
export declare const DEFAULT_CHALLENGE_WINDOW_SIZE = "02";
|
|
3
3
|
export declare const THREEDS_METHOD_TIMEOUT = 10000;
|
|
4
4
|
export declare const CHALLENGE_TIMEOUT = 600000;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const CHALLENGE_UNKNOWN_ERROR_REJECT_OBJECT: ThreeDS2ChallengeRejectObject;
|
|
6
|
+
export declare const CHALLENGE_TIMEOUT_REJECT_OBJECT: ThreeDS2FlowObject;
|
|
7
7
|
export declare const FAILED_METHOD_STATUS_RESOLVE_OBJECT: ThreeDS2FlowObject;
|
|
8
8
|
export declare const FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT: ThreeDS2FlowObject;
|
|
9
9
|
export declare const ERRORS: {
|
|
@@ -29,6 +29,12 @@ export interface ThreeDS2FlowObject {
|
|
|
29
29
|
errorCode?: string;
|
|
30
30
|
threeDSServerTransID?: string;
|
|
31
31
|
}
|
|
32
|
+
export interface ThreeDS2ChallengeRejectObject {
|
|
33
|
+
type: 'challengeError';
|
|
34
|
+
comment?: string;
|
|
35
|
+
extraInfo?: string;
|
|
36
|
+
eventDataRaw?: string;
|
|
37
|
+
}
|
|
32
38
|
export interface ThreeDS2Token {
|
|
33
39
|
acsTransID?: string;
|
|
34
40
|
acsURL?: string;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import BaseElement from './BaseElement';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PaymentAction } from '../types';
|
|
4
|
+
import { PaymentResponse } from './types';
|
|
5
|
+
import { IUIElement, PayButtonFunctionProps, RawPaymentResponse, UIElementProps } from './types';
|
|
5
6
|
import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';
|
|
6
7
|
import { UIElementStatus } from './types';
|
|
8
|
+
import { CoreOptions } from '../core/types';
|
|
9
|
+
import Core from '../core';
|
|
7
10
|
export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> implements IUIElement {
|
|
8
11
|
protected componentRef: any;
|
|
9
|
-
elementRef:
|
|
12
|
+
elementRef: UIElement;
|
|
10
13
|
constructor(props: P);
|
|
11
14
|
setState(newState: object): void;
|
|
12
15
|
protected onChange(): object;
|
|
@@ -25,14 +28,20 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
|
|
|
25
28
|
protected handleError: (error: AdyenCheckoutError) => void;
|
|
26
29
|
protected handleAdditionalDetails: (state: any) => any;
|
|
27
30
|
handleAction(action: PaymentAction, props?: {}): UIElement | null;
|
|
28
|
-
protected handleOrder: (
|
|
29
|
-
protected handleFinalResult: (result:
|
|
31
|
+
protected handleOrder: (response: PaymentResponse) => void;
|
|
32
|
+
protected handleFinalResult: (result: PaymentResponse) => PaymentResponse;
|
|
30
33
|
/**
|
|
31
34
|
* Handles a session /payments or /payments/details response.
|
|
32
35
|
* The component will handle automatically actions, orders, and final results.
|
|
33
36
|
* @param rawResponse -
|
|
34
37
|
*/
|
|
35
|
-
protected handleResponse(rawResponse:
|
|
38
|
+
protected handleResponse(rawResponse: RawPaymentResponse): void;
|
|
39
|
+
/**
|
|
40
|
+
* Call update on parent instance
|
|
41
|
+
* This function exist to make safe access to the protect _parentInstance
|
|
42
|
+
* @param options - CoreOptions
|
|
43
|
+
*/
|
|
44
|
+
updateParent(options?: CoreOptions): Promise<Core>;
|
|
36
45
|
/**
|
|
37
46
|
* Get the current validation status of the element
|
|
38
47
|
*/
|
|
@@ -19,6 +19,7 @@ import SecuredFields from './SecuredFields';
|
|
|
19
19
|
import Sepa from './Sepa';
|
|
20
20
|
import { ThreeDS2DeviceFingerprint, ThreeDS2Challenge } from './ThreeDS2';
|
|
21
21
|
import WeChat from './WeChat';
|
|
22
|
+
import PayNow from './PayNow';
|
|
22
23
|
import BcmcMobile from './BcmcMobile';
|
|
23
24
|
import { MolPayEBankingMY, MolPayEBankingTH, MolPayEBankingVN } from './MolPayEBanking';
|
|
24
25
|
import Dragonpay from './Dragonpay';
|
|
@@ -54,6 +55,8 @@ import WalletINElement from './WalletIN';
|
|
|
54
55
|
import OnlineBankingCZElement from './OnlineBankingCZ';
|
|
55
56
|
import OnlineBankingSKElement from './OnlineBankingSK';
|
|
56
57
|
import PayByBank from './PayByBank';
|
|
58
|
+
import PromptPay from "./PromptPay";
|
|
59
|
+
import Duitnow from "./DuitNow";
|
|
57
60
|
/**
|
|
58
61
|
* Maps each component with a Component element.
|
|
59
62
|
*/
|
|
@@ -183,6 +186,9 @@ declare const componentsMap: {
|
|
|
183
186
|
swish: typeof Swish;
|
|
184
187
|
wechatpay: typeof WeChat;
|
|
185
188
|
wechatpayQR: typeof WeChat;
|
|
189
|
+
promptpay: typeof PromptPay;
|
|
190
|
+
paynow: typeof PayNow;
|
|
191
|
+
duitnow: typeof Duitnow;
|
|
186
192
|
/** QRLoader */
|
|
187
193
|
/** Await */
|
|
188
194
|
blik: typeof Blik;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
|
|
2
|
+
export interface InputBaseProps {
|
|
3
|
+
/** Callback used to return the input element reference to parent component (Ex: Used to trigger focus programmatically) */
|
|
4
|
+
onCreateRef?(reference: HTMLInputElement): void;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
declare function InputBase({ onCreateRef, ...props }: InputBaseProps): h.JSX.Element;
|
|
3
8
|
declare namespace InputBase {
|
|
4
9
|
var defaultProps: {
|
|
5
10
|
type: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { SelectProps } from './types';
|
|
3
3
|
import './Select.scss';
|
|
4
|
-
declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId, isCollatingErrors
|
|
4
|
+
declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId, isCollatingErrors }: SelectProps): h.JSX.Element;
|
|
5
5
|
declare namespace Select {
|
|
6
6
|
var defaultProps: {
|
|
7
7
|
className: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { SelectItemProps } from '../types';
|
|
3
|
-
declare const SelectListItem: ({ item, selected,
|
|
3
|
+
declare const SelectListItem: ({ item, selected, ...props }: SelectItemProps) => h.JSX.Element;
|
|
4
4
|
export default SelectListItem;
|
|
@@ -3,6 +3,7 @@ export interface SelectItem {
|
|
|
3
3
|
icon?: string;
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
|
6
|
+
secondaryText?: string;
|
|
6
7
|
selectedOptionName?: string;
|
|
7
8
|
}
|
|
8
9
|
export interface SelectProps {
|
|
@@ -19,7 +20,6 @@ export interface SelectProps {
|
|
|
19
20
|
selected: string;
|
|
20
21
|
uniqueId?: string;
|
|
21
22
|
isCollatingErrors: boolean;
|
|
22
|
-
isIconOnLeftSide?: boolean;
|
|
23
23
|
}
|
|
24
24
|
export interface SelectButtonProps {
|
|
25
25
|
active: SelectItem;
|
|
@@ -37,7 +37,6 @@ export interface SelectButtonProps {
|
|
|
37
37
|
toggleList: (e: Event) => void;
|
|
38
38
|
id?: string;
|
|
39
39
|
ariaDescribedBy: string;
|
|
40
|
-
isIconOnLeftSide: boolean;
|
|
41
40
|
}
|
|
42
41
|
export interface SelectListProps {
|
|
43
42
|
active: SelectItem;
|
|
@@ -48,12 +47,10 @@ export interface SelectListProps {
|
|
|
48
47
|
selectListRef: any;
|
|
49
48
|
showList: boolean;
|
|
50
49
|
textFilter: string;
|
|
51
|
-
isIconOnLeftSide: boolean;
|
|
52
50
|
}
|
|
53
51
|
export interface SelectItemProps {
|
|
54
52
|
item: SelectItem;
|
|
55
53
|
selected: boolean;
|
|
56
|
-
isIconOnLeftSide: boolean;
|
|
57
54
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
58
55
|
onSelect: (e: Event) => void;
|
|
59
56
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import './FormFields.scss';
|
|
3
|
-
|
|
3
|
+
import { InputBaseProps } from './InputBase';
|
|
4
|
+
export declare const renderFormField: (type: any, props: InputBaseProps) => h.JSX.Element;
|
|
4
5
|
export default renderFormField;
|
|
@@ -11,7 +11,7 @@ declare abstract class AbstractCSF {
|
|
|
11
11
|
protected validateForm: () => void;
|
|
12
12
|
protected handleBrandFromBinLookup: typeof handleBrandFromBinLookup;
|
|
13
13
|
protected callbacksHandler: (callbacksObj: object) => void;
|
|
14
|
-
protected configHandler: () => void;
|
|
14
|
+
protected configHandler: (props: CSFSetupObject) => void;
|
|
15
15
|
protected createCardSecuredFields: (securedFields: HTMLElement[]) => Promise<any>;
|
|
16
16
|
protected createNonCardSecuredFields: (securedFields: HTMLElement[]) => Promise<any>;
|
|
17
17
|
protected createSecuredFields: typeof createSecuredFields;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { CSFSetupObject } from '../types';
|
|
1
2
|
/**
|
|
2
3
|
* Parses this.props to set 'config' type vars on this (CSFComp)
|
|
3
4
|
* - properties that just need to be set once, at startup, and then don't change
|
|
4
5
|
*
|
|
5
6
|
* See interface ConfigObject in types.ts
|
|
6
7
|
*/
|
|
7
|
-
export declare function handleConfig(): void;
|
|
8
|
+
export declare function handleConfig(props: CSFSetupObject): void;
|
|
@@ -17,37 +17,48 @@ export interface CSFReturnObject {
|
|
|
17
17
|
sfIsOptionalOrHidden: (f: string) => boolean;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
|
-
* Base interface for
|
|
20
|
+
* Base interface for CSFSetupObject & CSFConfigObject
|
|
21
|
+
*
|
|
22
|
+
* These are the props that are passed from SFP when CSF is initialised but which also end up
|
|
23
|
+
* as props in CSF->this.config: CSFConfigObject
|
|
21
24
|
*/
|
|
22
25
|
interface CSFCommonProps {
|
|
26
|
+
allowedDOMAccess?: boolean | string;
|
|
27
|
+
autoFocus?: boolean | string;
|
|
28
|
+
keypadFix?: boolean | string;
|
|
23
29
|
loadingContext: string;
|
|
24
30
|
cardGroupTypes?: string[];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
trimTrailingSeparator?: boolean;
|
|
28
|
-
showWarnings?: boolean;
|
|
29
|
-
keypadFix?: boolean;
|
|
30
|
-
isKCP?: boolean;
|
|
31
|
+
trimTrailingSeparator?: boolean | string;
|
|
32
|
+
showWarnings?: boolean | string;
|
|
31
33
|
iframeUIConfig?: object;
|
|
32
34
|
legacyInputMode?: boolean;
|
|
33
35
|
minimumExpiryDate?: string;
|
|
34
36
|
implementationType?: 'components' | 'custom';
|
|
35
37
|
isCollatingErrors?: boolean;
|
|
38
|
+
maskSecurityCode: boolean;
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* The object sent when SecuredFieldsProvider initialises CSF
|
|
42
|
+
*
|
|
43
|
+
* The properties defined here are ones that will not end up on CSF->this.config
|
|
39
44
|
*/
|
|
40
45
|
export interface CSFSetupObject extends CSFCommonProps {
|
|
41
46
|
type: string;
|
|
42
47
|
clientKey: string;
|
|
43
48
|
rootNode: string | HTMLElement;
|
|
44
49
|
callbacks?: object;
|
|
50
|
+
isKCP?: boolean;
|
|
45
51
|
i18n?: Language;
|
|
46
52
|
forceCompat: boolean;
|
|
47
53
|
}
|
|
48
54
|
/**
|
|
49
|
-
* The type for the config object created by CSF
|
|
50
|
-
*
|
|
55
|
+
* The type for the this.config object created by CSF - properties that just need to be set once, at startup, and then don't change.
|
|
56
|
+
*
|
|
57
|
+
* The CSFConfigObject provides the source for many of the properties that are written into the
|
|
58
|
+
* SecuredFieldInitObj used by createSecuredFields.ts to initialise a new SecuredField.ts
|
|
59
|
+
*
|
|
60
|
+
* Properties defined directly in *this* interface c.f. CSFCommonProps are ones that are not part of the CSFSetupObject
|
|
61
|
+
* and which are generated/calculated in handleConfig.ts
|
|
51
62
|
*/
|
|
52
63
|
export interface CSFConfigObject extends CSFCommonProps {
|
|
53
64
|
iframeSrc: string;
|
package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { CVCPolicyType, DatePolicyType, RtnType_callbackFn, RtnType_noParamVoidFn, RtnType_postMessageListener, StylesObject } from '../types';
|
|
2
2
|
import { ENCRYPTED_BANK_ACCNT_NUMBER_FIELD, ENCRYPTED_BANK_LOCATION_FIELD, ENCRYPTED_CARD_NUMBER, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR, ENCRYPTED_PWD_FIELD, ENCRYPTED_SECURITY_CODE, ENCRYPTED_SECURITY_CODE_3_DIGITS, ENCRYPTED_SECURITY_CODE_4_DIGITS } from '../configuration/constants';
|
|
3
3
|
/**
|
|
4
|
-
* Base interface, props common to both
|
|
4
|
+
* Base interface, props common to both SecuredFieldInitObj & IframeConfigObject
|
|
5
|
+
*
|
|
6
|
+
* These are the props that are passed from CSF.createSecuredFields when SecuredField.ts is initialised
|
|
7
|
+
* but which also end up as props in the IframeConfigObject
|
|
5
8
|
*/
|
|
6
9
|
export interface SFInternalConfig {
|
|
7
10
|
fieldType: string;
|
|
8
11
|
extraFieldData: string;
|
|
12
|
+
uid: string;
|
|
13
|
+
cvcPolicy: CVCPolicyType;
|
|
14
|
+
expiryDatePolicy: DatePolicyType;
|
|
9
15
|
txVariant: string;
|
|
10
16
|
cardGroupTypes: string[];
|
|
11
17
|
iframeUIConfig: IframeUIConfigObject;
|
|
@@ -13,26 +19,28 @@ export interface SFInternalConfig {
|
|
|
13
19
|
trimTrailingSeparator: boolean;
|
|
14
20
|
isCreditCardType: boolean;
|
|
15
21
|
showWarnings: boolean;
|
|
16
|
-
cvcPolicy: CVCPolicyType;
|
|
17
|
-
expiryDatePolicy: DatePolicyType;
|
|
18
22
|
legacyInputMode: boolean;
|
|
19
23
|
minimumExpiryDate: string;
|
|
20
|
-
uid: string;
|
|
21
24
|
implementationType: string;
|
|
22
|
-
bundleType: string;
|
|
23
25
|
isCollatingErrors: boolean;
|
|
26
|
+
maskSecurityCode: boolean;
|
|
24
27
|
}
|
|
25
28
|
/**
|
|
26
|
-
* The object
|
|
29
|
+
* The object sent when createSecuredFields initialises a new instance of SecuredField.ts
|
|
30
|
+
*
|
|
31
|
+
* Properties defined directly in *this* interface c.f. SFInternalConfig are ones
|
|
32
|
+
* that are needed by SecuredField.ts but are *not* required in the IframeConfigObject
|
|
27
33
|
*/
|
|
28
|
-
export interface
|
|
29
|
-
expiryDatePolicy: DatePolicyType;
|
|
34
|
+
export interface SecuredFieldInitObj extends SFInternalConfig {
|
|
30
35
|
iframeSrc: string;
|
|
31
36
|
loadingContext: string;
|
|
32
37
|
holderEl: HTMLElement;
|
|
33
38
|
}
|
|
34
39
|
/**
|
|
35
|
-
* Object sent via postMessage to a SecuredField iframe
|
|
40
|
+
* Object sent via postMessage to a SecuredField iframe in order to configure that iframe
|
|
41
|
+
*
|
|
42
|
+
* Properties defined directly in *this* interface are ones that are calculated by SecuredField.ts
|
|
43
|
+
* instead of just being read directly from the SecuredFieldInitObj
|
|
36
44
|
*/
|
|
37
45
|
export interface IframeConfigObject extends SFInternalConfig {
|
|
38
46
|
numKey: number;
|
|
@@ -65,7 +73,7 @@ export interface AriaConfigObject {
|
|
|
65
73
|
error?: object;
|
|
66
74
|
}
|
|
67
75
|
declare abstract class AbstractSecuredField {
|
|
68
|
-
|
|
76
|
+
sfConfig: SFInternalConfig;
|
|
69
77
|
fieldType: string;
|
|
70
78
|
protected iframeSrc: string;
|
|
71
79
|
protected loadingContext: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import AbstractSecuredField, {
|
|
1
|
+
import AbstractSecuredField, { SecuredFieldInitObj } from './AbstractSecuredField';
|
|
2
2
|
import { CVCPolicyType, DatePolicyType, RtnType_noParamVoidFn, RtnType_postMessageListener, RtnType_callbackFn } from '../types';
|
|
3
3
|
import Language from '../../../../../language/Language';
|
|
4
4
|
declare class SecuredField extends AbstractSecuredField {
|
|
5
|
-
constructor(pSetupObj:
|
|
5
|
+
constructor(pSetupObj: SecuredFieldInitObj, i18n: Language);
|
|
6
6
|
init(i18n: Language): SecuredField;
|
|
7
7
|
iframeOnLoadListenerFn(): void;
|
|
8
8
|
postMessageListenerFn(event: MessageEvent): void;
|