@adyen/adyen-web 4.8.0 → 5.2.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 +5 -1
- 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 -1
- package/dist/cjs/adyen.css.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/adyen.css +5 -1
- package/dist/es/adyen.css.map +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/it-IT.js +1 -1
- package/dist/types/components/ApplePay/ApplePay.d.ts +1 -4
- package/dist/types/components/ApplePay/defaultProps.d.ts +0 -2
- package/dist/types/components/ApplePay/types.d.ts +1 -4
- package/dist/types/components/BacsDD/components/types.d.ts +1 -1
- package/dist/types/components/BankTransfer/types.d.ts +1 -1
- package/dist/types/components/BaseElement.d.ts +2 -13
- package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +8 -1
- package/dist/types/components/Blik/components/BlikInput.d.ts +1 -1
- package/dist/types/components/Card/Bancontact.d.ts +14 -3
- package/dist/types/components/Card/Card.d.ts +9 -1
- package/dist/types/components/Card/components/CardInput/components/CardFields.d.ts +1 -1
- package/dist/types/components/Card/components/CardInput/components/types.d.ts +6 -5
- package/dist/types/components/Card/components/CardInput/types.d.ts +4 -3
- package/dist/types/components/Card/components/CardInput/validate.d.ts +1 -1
- package/dist/types/components/Card/types.d.ts +4 -2
- package/dist/types/components/Dragonpay/Dragonpay.d.ts +9 -4
- package/dist/types/components/Dragonpay/types.d.ts +1 -1
- package/dist/types/components/Dropin/Dropin.d.ts +0 -3
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodIcon.d.ts +3 -3
- package/dist/types/components/Dropin/components/PaymentMethod/PaymentMethodItem.d.ts +1 -0
- package/dist/types/components/Dropin/components/utils.d.ts +2 -0
- package/dist/types/components/Dropin/defaultProps.d.ts +0 -2
- package/dist/types/components/Dropin/types.d.ts +2 -1
- package/dist/types/components/Econtext/Econtext.d.ts +11 -1
- package/dist/types/components/Econtext/components/EcontextInput/EcontextInput.d.ts +14 -2
- package/dist/types/components/Giftcard/Giftcard.d.ts +3 -2
- package/dist/types/components/GooglePay/GooglePay.d.ts +0 -4
- package/dist/types/components/GooglePay/defaultProps.d.ts +0 -2
- package/dist/types/components/GooglePay/types.d.ts +1 -1
- package/dist/types/components/Klarna/constants.d.ts +0 -5
- package/dist/types/components/Klarna/types.d.ts +9 -3
- package/dist/types/components/MBWay/components/MBWayInput/types.d.ts +1 -1
- package/dist/types/components/PayPal/Paypal.d.ts +1 -2
- package/dist/types/components/PayPal/types.d.ts +6 -1
- package/dist/types/components/Pix/Pix.d.ts +32 -2
- package/dist/types/components/Pix/PixInput/PixInput.d.ts +9 -0
- package/dist/types/components/Pix/PixInput/index.d.ts +1 -0
- package/dist/types/components/Pix/PixInput/utils.d.ts +3 -0
- package/dist/types/components/Pix/PixInput/validate.d.ts +2 -0
- package/dist/types/components/Pix/types.d.ts +19 -0
- package/dist/types/components/Redirect/components/RedirectShopper/RedirectShopper.d.ts +2 -3
- package/dist/types/components/Swish/Swish.d.ts +8 -1
- package/dist/types/components/UIElement.d.ts +34 -26
- package/dist/types/components/WeChat/WeChat.d.ts +8 -1
- package/dist/types/components/helpers/IssuerListContainer.d.ts +8 -8
- package/dist/types/components/helpers/QRLoaderContainer.d.ts +5 -3
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/internal/Await/types.d.ts +1 -1
- package/dist/types/components/internal/IssuerList/ContentSeparator/ContentSeparator.d.ts +4 -0
- package/dist/types/components/internal/IssuerList/ContentSeparator/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.d.ts +11 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.d.ts +10 -0
- package/dist/types/components/internal/IssuerList/IssuerButtonGroup/index.d.ts +1 -0
- package/dist/types/components/internal/IssuerList/IssuerList.d.ts +2 -7
- package/dist/types/components/internal/IssuerList/types.d.ts +16 -0
- package/dist/types/components/internal/PayButton/PayButton.d.ts +2 -2
- package/dist/types/components/internal/QRLoader/QRLoader.d.ts +6 -6
- package/dist/types/components/internal/QRLoader/types.d.ts +0 -1
- package/dist/types/components/internal/SecuredFields/SecuredFieldsProvider.d.ts +3 -3
- package/dist/types/components/internal/SecuredFields/defaultProps.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +11 -6
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractCSF.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/AbstractSecuredField.d.ts +4 -3
- package/dist/types/components/internal/SecuredFields/lib/core/SecuredField.d.ts +2 -2
- package/dist/types/components/internal/SecuredFields/lib/core/utils/handleBrandFromBinLookup.d.ts +2 -1
- package/dist/types/components/internal/SecuredFields/lib/core/utils/processBrand.d.ts +6 -0
- package/dist/types/components/internal/SecuredFields/lib/types.d.ts +9 -4
- package/dist/types/components/internal/SecuredFields/lib/utilities/commonUtils.d.ts +4 -1
- package/dist/types/components/internal/SocialSecurityNumberBrazil/BrazilPersonalDetail.d.ts +2 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/constants.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/utils.d.ts +0 -0
- package/dist/types/components/{Boleto/components → internal}/SocialSecurityNumberBrazil/validate.d.ts +0 -0
- package/dist/types/components/types.d.ts +48 -0
- package/dist/types/components/utils.d.ts +3 -0
- package/dist/types/core/CheckoutSession/CheckoutSession.d.ts +47 -0
- package/dist/types/core/CheckoutSession/index.d.ts +1 -0
- package/dist/types/core/CheckoutSession/utils.d.ts +2 -0
- package/dist/types/core/Errors/AdyenCheckoutError.d.ts +14 -0
- package/dist/types/core/RiskModule/RiskModule.d.ts +2 -1
- package/dist/types/core/Services/{collect-id.d.ts → analytics/collect-id.d.ts} +0 -0
- package/dist/types/core/Services/{log-event.d.ts → analytics/log-event.d.ts} +0 -0
- package/dist/types/core/Services/{post-telemetry.d.ts → analytics/post-telemetry.d.ts} +0 -0
- package/dist/types/core/Services/sessions/check-balance.d.ts +6 -0
- package/dist/types/core/Services/sessions/constants.d.ts +1 -0
- package/dist/types/core/Services/sessions/create-order.d.ts +6 -0
- package/dist/types/core/Services/sessions/make-payment.d.ts +6 -0
- package/dist/types/core/Services/sessions/setup-session.d.ts +6 -0
- package/dist/types/core/Services/sessions/submit-details.d.ts +6 -0
- package/dist/types/core/core.d.ts +14 -1
- package/dist/types/core/types.d.ts +1 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types/index.d.ts +38 -0
- package/dist/types/utils/Script.d.ts +3 -1
- package/dist/types/utils/Storage.d.ts +10 -0
- package/dist/types/utils/hasOwnProperty.d.ts +1 -0
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIElementProps } from '../
|
|
1
|
+
import { UIElementProps } from '../types';
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
4
|
Klarna: any;
|
|
@@ -12,6 +12,12 @@ export declare type KlarnaSdkData = {
|
|
|
12
12
|
* @see https://developers.klarna.com/documentation/klarna-payments/single-call-descriptions/create-session/
|
|
13
13
|
* */
|
|
14
14
|
client_token: string;
|
|
15
|
+
/**
|
|
16
|
+
* `payment_method_category` specifies which of Klarna’s customer offerings (e.g. Pay now, Pay later or Slice it)
|
|
17
|
+
* that is being shown in the widget
|
|
18
|
+
* @see https://developers.klarna.com/documentation/klarna-payments/single-call-descriptions/create-session/
|
|
19
|
+
* */
|
|
20
|
+
payment_method_category: string;
|
|
15
21
|
};
|
|
16
22
|
interface KlarnaPaymentsShared {
|
|
17
23
|
sdkData: KlarnaSdkData;
|
|
@@ -22,9 +28,9 @@ export interface KlarnaWidgetProps extends KlarnaPaymentsShared {
|
|
|
22
28
|
onComplete: (detailsData: any) => void;
|
|
23
29
|
onError: (error: any) => void;
|
|
24
30
|
}
|
|
25
|
-
export
|
|
31
|
+
export declare type KlarnaPaymentsProps = UIElementProps & KlarnaPaymentsShared & {
|
|
26
32
|
useKlarnaWidget: boolean;
|
|
27
|
-
}
|
|
33
|
+
};
|
|
28
34
|
export interface KlarnaWidgetAuthorizeResponse {
|
|
29
35
|
approved: boolean;
|
|
30
36
|
show_form: boolean;
|
|
@@ -29,9 +29,8 @@ declare class PaypalElement extends UIElement<PayPalElementProps> {
|
|
|
29
29
|
* Paypal does not require any specific Dropin validation
|
|
30
30
|
*/
|
|
31
31
|
get isValid(): boolean;
|
|
32
|
-
handleCancel(
|
|
32
|
+
handleCancel(): void;
|
|
33
33
|
handleComplete(details: any): void;
|
|
34
|
-
handleError(data: any): void;
|
|
35
34
|
handleResolve(token: string): void;
|
|
36
35
|
handleReject(errorMessage: string): void;
|
|
37
36
|
startPayment(): Promise<never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PaymentAmount, PaymentMethod } from '../../types';
|
|
2
|
-
import UIElement
|
|
2
|
+
import UIElement from '../UIElement';
|
|
3
|
+
import { UIElementProps } from '../types';
|
|
3
4
|
import { SUPPORTED_LOCALES } from './config';
|
|
4
5
|
declare global {
|
|
5
6
|
interface Window {
|
|
@@ -56,6 +57,10 @@ interface PayPalCommonProps {
|
|
|
56
57
|
debug?: boolean;
|
|
57
58
|
environment?: string;
|
|
58
59
|
blockPayPalCreditButton?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* @see {@link https://developer.paypal.com/docs/business/javascript-sdk/javascript-sdk-configuration/#csp-nonce}
|
|
62
|
+
*/
|
|
63
|
+
cspNonce?: string;
|
|
59
64
|
/**
|
|
60
65
|
* @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/#intent}
|
|
61
66
|
*/
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import QRLoaderContainer from '../helpers/QRLoaderContainer';
|
|
2
|
-
|
|
2
|
+
import { h } from 'preact';
|
|
3
|
+
import { PixProps } from './types';
|
|
4
|
+
declare class PixElement extends QRLoaderContainer<PixProps> {
|
|
3
5
|
static type: string;
|
|
6
|
+
static defaultProps: {
|
|
7
|
+
qrCodeImage: string;
|
|
8
|
+
amount: any;
|
|
9
|
+
paymentData: any;
|
|
10
|
+
onError: () => void;
|
|
11
|
+
onComplete: () => void;
|
|
12
|
+
personalDetailsRequired: boolean;
|
|
13
|
+
};
|
|
14
|
+
get isValid(): boolean;
|
|
4
15
|
formatProps(props: any): {
|
|
16
|
+
personalDetailsRequired?: boolean;
|
|
5
17
|
delay: number;
|
|
6
18
|
countdownTime: number;
|
|
7
19
|
type?: string;
|
|
@@ -11,17 +23,24 @@ declare class PixElement extends QRLoaderContainer {
|
|
|
11
23
|
qrCodeImage?: string;
|
|
12
24
|
paymentData?: string;
|
|
13
25
|
instructions?: string;
|
|
26
|
+
session?: {
|
|
27
|
+
id: string;
|
|
28
|
+
data: string;
|
|
29
|
+
};
|
|
14
30
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
15
31
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
32
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
16
33
|
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
34
|
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
35
|
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
36
|
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
20
|
-
|
|
37
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
38
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
39
|
name?: string;
|
|
22
40
|
icon?: string;
|
|
23
41
|
amount?: import("../../types").PaymentAmount;
|
|
24
42
|
showPayButton?: boolean;
|
|
43
|
+
setStatusAutomatically?: boolean;
|
|
25
44
|
payButton?: (options: any) => any;
|
|
26
45
|
loadingContext?: string;
|
|
27
46
|
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
@@ -38,5 +57,16 @@ declare class PixElement extends QRLoaderContainer {
|
|
|
38
57
|
copyBtn: boolean;
|
|
39
58
|
introduction: string;
|
|
40
59
|
};
|
|
60
|
+
formatData(): {
|
|
61
|
+
socialSecurityNumber: any;
|
|
62
|
+
shopperName: {
|
|
63
|
+
firstName: any;
|
|
64
|
+
lastName: any;
|
|
65
|
+
};
|
|
66
|
+
paymentMethod: {
|
|
67
|
+
type: any;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
render(): h.JSX.Element;
|
|
41
71
|
}
|
|
42
72
|
export default PixElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PixInput';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { QRLoaderContainerProps } from '../helpers/QRLoaderContainer';
|
|
2
|
+
export interface PixProps extends QRLoaderContainerProps {
|
|
3
|
+
personalDetailsRequired?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface PixInputDataState {
|
|
6
|
+
firstName?: string;
|
|
7
|
+
lastName?: string;
|
|
8
|
+
socialSecurityNumber?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface PixInputValidState {
|
|
11
|
+
firstName?: boolean;
|
|
12
|
+
lastName?: boolean;
|
|
13
|
+
socialSecurityNumber?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface PixInputErrorState {
|
|
16
|
+
firstName?: boolean;
|
|
17
|
+
lastName?: boolean;
|
|
18
|
+
socialSecurityNumber?: boolean;
|
|
19
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { Component, h } from 'preact';
|
|
2
2
|
interface RedirectShopperProps {
|
|
3
|
-
beforeRedirect: (resolve: any, reject: any, url: any) => Promise<
|
|
3
|
+
beforeRedirect: (resolve: any, reject: any, url: any) => Promise<void>;
|
|
4
4
|
url: string;
|
|
5
5
|
method: 'GET' | 'POST';
|
|
6
6
|
data?: any;
|
|
7
7
|
}
|
|
8
8
|
declare class RedirectShopper extends Component<RedirectShopperProps> {
|
|
9
|
+
private postForm;
|
|
9
10
|
static defaultProps: {
|
|
10
11
|
beforeRedirect: (resolve: any) => any;
|
|
11
12
|
method: string;
|
|
12
|
-
data: {};
|
|
13
13
|
};
|
|
14
|
-
private postForm;
|
|
15
14
|
componentDidMount(): void;
|
|
16
15
|
render({ url, method, data }: {
|
|
17
16
|
url: any;
|
|
@@ -11,17 +11,24 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
11
11
|
qrCodeImage?: string;
|
|
12
12
|
paymentData?: string;
|
|
13
13
|
instructions: string;
|
|
14
|
+
session?: {
|
|
15
|
+
id: string;
|
|
16
|
+
data: string;
|
|
17
|
+
};
|
|
14
18
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
15
19
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
20
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
16
21
|
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
22
|
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
23
|
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
24
|
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
20
|
-
|
|
25
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
27
|
name?: string;
|
|
22
28
|
icon?: string;
|
|
23
29
|
amount?: import("../../types").PaymentAmount;
|
|
24
30
|
showPayButton?: boolean;
|
|
31
|
+
setStatusAutomatically?: boolean;
|
|
25
32
|
payButton?: (options: any) => any;
|
|
26
33
|
loadingContext?: string;
|
|
27
34
|
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
@@ -1,53 +1,61 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
import BaseElement
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onValid?: (state: any, element: UIElement) => void;
|
|
7
|
-
onSubmit?: (state: any, element: UIElement) => void;
|
|
8
|
-
onComplete?: (state: any, element: UIElement) => void;
|
|
9
|
-
onAdditionalDetails?: (state: any, element: UIElement) => void;
|
|
10
|
-
onError?: (error: any, element?: UIElement) => void;
|
|
11
|
-
/** Automatically set status through the payment flow */
|
|
12
|
-
setStatusAutomatically?: boolean;
|
|
13
|
-
type?: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
icon?: string;
|
|
16
|
-
amount?: PaymentAmount;
|
|
17
|
-
/**
|
|
18
|
-
* Show/Hide pay button
|
|
19
|
-
* @defaultValue true
|
|
20
|
-
*/
|
|
21
|
-
showPayButton?: boolean;
|
|
22
|
-
}
|
|
2
|
+
import BaseElement from './BaseElement';
|
|
3
|
+
import { Order, PaymentAction } from '../types';
|
|
4
|
+
import { UIElementProps } from './types';
|
|
5
|
+
import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';
|
|
23
6
|
export declare class UIElement<P extends UIElementProps = any> extends BaseElement<P> {
|
|
24
7
|
protected componentRef: any;
|
|
25
8
|
elementRef: any;
|
|
26
9
|
constructor(props: P);
|
|
27
10
|
setState(newState: object): void;
|
|
28
11
|
onChange(): object;
|
|
12
|
+
onSubmit(): void;
|
|
29
13
|
onValid(): {
|
|
30
14
|
data: any;
|
|
31
15
|
};
|
|
32
|
-
startPayment(): Promise<any>;
|
|
33
|
-
submit(): void;
|
|
34
16
|
onComplete(state: any): void;
|
|
17
|
+
/**
|
|
18
|
+
* Submit payment method data. If the form is not valid, it will trigger validation.
|
|
19
|
+
*/
|
|
20
|
+
submit(): void;
|
|
35
21
|
showValidation(): this;
|
|
36
|
-
setStatus(status: any): this;
|
|
37
|
-
|
|
22
|
+
setStatus(status: any, props?: any): this;
|
|
23
|
+
submitPayment(data: any): Promise<void>;
|
|
24
|
+
submitAdditionalDetails(data: any): Promise<void>;
|
|
25
|
+
protected handleError: (error: AdyenCheckoutError) => void;
|
|
26
|
+
protected handleAdditionalDetails: (state: any) => any;
|
|
27
|
+
handleAction(action: PaymentAction, props?: {}): UIElement;
|
|
28
|
+
protected handleOrder: (order: Order) => void;
|
|
29
|
+
protected handleFinalResult: (result: any) => any;
|
|
30
|
+
/**
|
|
31
|
+
* Handles a session /payments or /payments/details response.
|
|
32
|
+
* The component will handle automatically actions, orders, and final results.
|
|
33
|
+
* @param rawResponse -
|
|
34
|
+
*/
|
|
35
|
+
protected handleResponse(rawResponse: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get the current validation status of the element
|
|
38
|
+
*/
|
|
38
39
|
get isValid(): boolean;
|
|
39
40
|
/**
|
|
40
41
|
* Get the element icon URL for the current environment
|
|
41
42
|
*/
|
|
42
43
|
get icon(): string;
|
|
43
44
|
/**
|
|
44
|
-
* Get the element displayable name
|
|
45
|
+
* Get the element's displayable name
|
|
45
46
|
*/
|
|
46
47
|
get displayName(): string;
|
|
48
|
+
/**
|
|
49
|
+
* Get the element accessible name, used in the aria-label of the button that controls selected payment method
|
|
50
|
+
*/
|
|
51
|
+
get accessibleName(): string;
|
|
47
52
|
/**
|
|
48
53
|
* Return the type of an element
|
|
49
54
|
*/
|
|
50
55
|
get type(): string;
|
|
56
|
+
/**
|
|
57
|
+
* Get the payButton component for the current element
|
|
58
|
+
*/
|
|
51
59
|
payButton: (props: any) => h.JSX.Element;
|
|
52
60
|
}
|
|
53
61
|
export default UIElement;
|
|
@@ -11,17 +11,24 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
11
11
|
qrCodeImage?: string;
|
|
12
12
|
paymentData?: string;
|
|
13
13
|
instructions?: string;
|
|
14
|
+
session?: {
|
|
15
|
+
id: string;
|
|
16
|
+
data: string;
|
|
17
|
+
};
|
|
14
18
|
onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
15
19
|
onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
20
|
+
beforeSubmit?: (state: any, element: import("../UIElement").UIElement<any>, actions: any) => Promise<void>;
|
|
16
21
|
onSubmit?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
17
22
|
onComplete?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
18
23
|
onAdditionalDetails?: (state: any, element: import("../UIElement").UIElement<any>) => void;
|
|
19
24
|
onError?: (error: any, element?: import("../UIElement").UIElement<any>) => void;
|
|
20
|
-
|
|
25
|
+
onPaymentCompleted?: (result: any, element: import("../UIElement").UIElement<any>) => void;
|
|
26
|
+
beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: import("../UIElement").UIElement<any>) => void;
|
|
21
27
|
name?: string;
|
|
22
28
|
icon?: string;
|
|
23
29
|
amount?: import("../../types").PaymentAmount;
|
|
24
30
|
showPayButton?: boolean;
|
|
31
|
+
setStatusAutomatically?: boolean;
|
|
25
32
|
payButton?: (options: any) => any;
|
|
26
33
|
loadingContext?: string;
|
|
27
34
|
createFromAction?: (action: import("../../types").PaymentAction, props: object) => import("../UIElement").UIElement<any>;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
import UIElement
|
|
2
|
+
import UIElement from '../UIElement';
|
|
3
|
+
import { UIElementProps } from '../types';
|
|
3
4
|
import Language from '../../language/Language';
|
|
4
|
-
|
|
5
|
+
import { IssuerItem } from '../internal/IssuerList/types';
|
|
6
|
+
interface IssuerListContainerProps extends UIElementProps {
|
|
5
7
|
showImage?: boolean;
|
|
6
8
|
placeholder?: string;
|
|
7
9
|
issuers?: IssuerItem[];
|
|
10
|
+
highlightedIssuers: string[];
|
|
8
11
|
i18n: Language;
|
|
9
12
|
loadingContext: string;
|
|
10
13
|
}
|
|
11
|
-
interface IssuerItem {
|
|
12
|
-
id: string;
|
|
13
|
-
name: string;
|
|
14
|
-
}
|
|
15
14
|
interface IssuerListData {
|
|
16
15
|
paymentMethod: {
|
|
17
16
|
type: string;
|
|
18
17
|
issuer: string;
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
declare class IssuerListContainer extends UIElement<
|
|
22
|
-
constructor(props:
|
|
20
|
+
declare class IssuerListContainer extends UIElement<IssuerListContainerProps> {
|
|
21
|
+
constructor(props: IssuerListContainerProps);
|
|
23
22
|
protected static defaultProps: {
|
|
24
23
|
showImage: boolean;
|
|
25
24
|
onValid: () => void;
|
|
26
25
|
issuers: any[];
|
|
26
|
+
highlightedIssuers: any[];
|
|
27
27
|
loadingContext: string;
|
|
28
28
|
};
|
|
29
29
|
formatProps(props: any): any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
-
import UIElement
|
|
3
|
-
|
|
2
|
+
import UIElement from '../UIElement';
|
|
3
|
+
import { UIElementProps } from '../types';
|
|
4
|
+
export interface QRLoaderContainerProps extends UIElementProps {
|
|
4
5
|
/**
|
|
5
6
|
* Number of miliseconds that the component will wait in between status calls
|
|
6
7
|
*/
|
|
@@ -17,7 +18,7 @@ interface QRLoaderContainerProps extends UIElementProps {
|
|
|
17
18
|
paymentData?: string;
|
|
18
19
|
instructions?: string;
|
|
19
20
|
}
|
|
20
|
-
declare class QRLoaderContainer extends UIElement<
|
|
21
|
+
declare class QRLoaderContainer<T extends QRLoaderContainerProps = QRLoaderContainerProps> extends UIElement<T> {
|
|
21
22
|
protected static defaultProps: {
|
|
22
23
|
qrCodeImage: string;
|
|
23
24
|
amount: any;
|
|
@@ -29,6 +30,7 @@ declare class QRLoaderContainer extends UIElement<QRLoaderContainerProps> {
|
|
|
29
30
|
paymentMethod: any;
|
|
30
31
|
};
|
|
31
32
|
get isValid(): boolean;
|
|
33
|
+
renderQRCode(): h.JSX.Element;
|
|
32
34
|
render(): h.JSX.Element;
|
|
33
35
|
}
|
|
34
36
|
export default QRLoaderContainer;
|
|
@@ -44,7 +44,7 @@ import BacsDD from './BacsDD';
|
|
|
44
44
|
import Address from './Address';
|
|
45
45
|
import PersonalDetails from './PersonalDetails';
|
|
46
46
|
import Klarna from './Klarna';
|
|
47
|
-
import Twint from
|
|
47
|
+
import Twint from './Twint';
|
|
48
48
|
/**
|
|
49
49
|
* Maps each component with a Component element.
|
|
50
50
|
*/
|
|
@@ -19,7 +19,7 @@ export interface AwaitComponentProps {
|
|
|
19
19
|
shouldRedirectOnMobile?: boolean;
|
|
20
20
|
classNameModifiers?: string[];
|
|
21
21
|
clientKey: string;
|
|
22
|
-
onError: (error: any
|
|
22
|
+
onError: (error: any) => void;
|
|
23
23
|
onComplete: (status: any, component: any) => void;
|
|
24
24
|
brandLogo: string;
|
|
25
25
|
messageText: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ContentSeparator';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import './IssuerButton.scss';
|
|
3
|
+
interface IssuerButtonProps {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
selected: boolean;
|
|
7
|
+
onClick: (event: UIEvent) => void;
|
|
8
|
+
icon?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function IssuerButton({ name, id, icon, onClick, selected }: IssuerButtonProps): h.JSX.Element;
|
|
11
|
+
export default IssuerButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { h } from 'preact';
|
|
2
|
+
import './IssuerButtonGroup.scss';
|
|
3
|
+
import { IssuerItem } from '../types';
|
|
4
|
+
interface IssuerButtonGroupProps {
|
|
5
|
+
items: IssuerItem[];
|
|
6
|
+
selectedIssuerId: string;
|
|
7
|
+
onChange: (event: UIEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const IssuerButtonGroup: ({ items, selectedIssuerId, onChange }: IssuerButtonGroupProps) => h.JSX.Element;
|
|
10
|
+
export default IssuerButtonGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './IssuerButtonGroup';
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
|
+
import { IssuerListProps } from './types';
|
|
2
3
|
import './IssuerList.scss';
|
|
3
|
-
declare function IssuerList({ items, placeholder, issuer, ...props }:
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
items: any;
|
|
6
|
-
placeholder: any;
|
|
7
|
-
issuer: any;
|
|
8
|
-
}): h.JSX.Element;
|
|
4
|
+
declare function IssuerList({ items, placeholder, issuer, highlightedIds, ...props }: IssuerListProps): h.JSX.Element;
|
|
9
5
|
declare namespace IssuerList {
|
|
10
6
|
var defaultProps: {
|
|
11
7
|
onChange: () => void;
|
|
12
|
-
placeholder: string;
|
|
13
8
|
};
|
|
14
9
|
}
|
|
15
10
|
export default IssuerList;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PayButtonProps } from '../PayButton/PayButton';
|
|
2
|
+
import { ComponentChildren } from 'preact';
|
|
3
|
+
export interface IssuerListProps {
|
|
4
|
+
items: IssuerItem[];
|
|
5
|
+
showPayButton: boolean;
|
|
6
|
+
payButton(props: Partial<PayButtonProps>): ComponentChildren;
|
|
7
|
+
onChange(payload: any): void;
|
|
8
|
+
highlightedIds?: string[];
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
issuer?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IssuerItem {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
icon?: string;
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from 'preact';
|
|
2
2
|
import { PaymentAmount } from '../../../types';
|
|
3
|
-
import Language from
|
|
4
|
-
interface PayButtonProps {
|
|
3
|
+
import Language from '../../../language/Language';
|
|
4
|
+
export interface PayButtonProps {
|
|
5
5
|
/**
|
|
6
6
|
* Class name modifiers will be used as: `adyen-checkout__image--${modifier}`
|
|
7
7
|
*/
|
|
@@ -19,12 +19,12 @@ declare class QRLoader extends Component<QRLoaderProps, QRLoaderState> {
|
|
|
19
19
|
redirectToApp: (url: any, fallback?: () => void) => void;
|
|
20
20
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
21
21
|
componentWillUnmount(): void;
|
|
22
|
-
onTick
|
|
23
|
-
onTimeUp
|
|
24
|
-
onComplete
|
|
25
|
-
onError
|
|
26
|
-
checkStatus
|
|
27
|
-
render({ amount, url, brandLogo, countdownTime,
|
|
22
|
+
private onTick;
|
|
23
|
+
private onTimeUp;
|
|
24
|
+
private onComplete;
|
|
25
|
+
private onError;
|
|
26
|
+
private checkStatus;
|
|
27
|
+
render({ amount, url, brandLogo, countdownTime, type }: QRLoaderProps, { expired, completed, loading }: {
|
|
28
28
|
expired: any;
|
|
29
29
|
completed: any;
|
|
30
30
|
loading: any;
|
|
@@ -3,7 +3,7 @@ import { SFPProps } from './defaultProps';
|
|
|
3
3
|
import { StylesObject, CbObjOnError } from './lib/types';
|
|
4
4
|
import { AddressData } from '../../../types';
|
|
5
5
|
import { BinLookupResponse } from '../../Card/types';
|
|
6
|
-
import { CVCPolicyType } from './lib/core/AbstractSecuredField';
|
|
6
|
+
import { CVCPolicyType, DatePolicyType } from './lib/core/AbstractSecuredField';
|
|
7
7
|
export interface SFPState {
|
|
8
8
|
status?: string;
|
|
9
9
|
brand?: string;
|
|
@@ -17,7 +17,7 @@ export interface SFPState {
|
|
|
17
17
|
hasUnsupportedCard?: boolean;
|
|
18
18
|
hasKoreanFields?: boolean;
|
|
19
19
|
showSocialSecurityNumber?: boolean;
|
|
20
|
-
|
|
20
|
+
expiryDatePolicy?: DatePolicyType;
|
|
21
21
|
socialSecurityNumber?: string;
|
|
22
22
|
}
|
|
23
23
|
export interface SingleBrandResetObject {
|
|
@@ -31,7 +31,7 @@ export interface SingleBrandResetObject {
|
|
|
31
31
|
declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
32
32
|
private originKeyErrorTimeout;
|
|
33
33
|
private originKeyTimeoutMS;
|
|
34
|
-
private
|
|
34
|
+
private numCharsInField;
|
|
35
35
|
private rootNode;
|
|
36
36
|
private numDateFields;
|
|
37
37
|
private csf;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Language } from '../../../language/Language';
|
|
2
|
+
import { CVCPolicyType } from './lib/core/AbstractSecuredField';
|
|
2
3
|
export interface SFPProps {
|
|
3
4
|
/**
|
|
4
5
|
* CSF RELATED (±22)
|
|
@@ -44,7 +45,7 @@ export interface SFPProps {
|
|
|
44
45
|
billingAddressRequiredFields: string[];
|
|
45
46
|
brand: string;
|
|
46
47
|
createFromAction: () => {};
|
|
47
|
-
cvcPolicy:
|
|
48
|
+
cvcPolicy: CVCPolicyType;
|
|
48
49
|
data: object;
|
|
49
50
|
details: object[];
|
|
50
51
|
enableStoreDetails: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CVCPolicyType, DatePolicyType } from '../core/AbstractSecuredField';
|
|
1
2
|
export declare const ENCRYPTED_CARD_NUMBER = "encryptedCardNumber";
|
|
2
3
|
export declare const ENCRYPTED_EXPIRY_DATE = "encryptedExpiryDate";
|
|
3
4
|
export declare const ENCRYPTED_EXPIRY_MONTH = "encryptedExpiryMonth";
|
|
@@ -10,15 +11,19 @@ export declare const ENCRYPTED_PIN_FIELD = "encryptedPin";
|
|
|
10
11
|
export declare const GIFT_CARD = "giftcard";
|
|
11
12
|
export declare const ENCRYPTED_BANK_ACCNT_NUMBER_FIELD = "encryptedBankAccountNumber";
|
|
12
13
|
export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
|
|
13
|
-
export declare const SF_VERSION = "3.
|
|
14
|
+
export declare const SF_VERSION = "3.7.1";
|
|
14
15
|
export declare const DEFAULT_CARD_GROUP_TYPES: string[];
|
|
15
16
|
export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
|
|
16
17
|
export declare const CSF_FIELDS_ARRAY: string[];
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
18
|
+
export declare const REQUIRED = "required";
|
|
19
|
+
export declare const OPTIONAL = "optional";
|
|
20
|
+
export declare const HIDDEN = "hidden";
|
|
21
|
+
export declare const CVC_POLICY_REQUIRED: CVCPolicyType;
|
|
22
|
+
export declare const CVC_POLICY_OPTIONAL: CVCPolicyType;
|
|
23
|
+
export declare const CVC_POLICY_HIDDEN: CVCPolicyType;
|
|
24
|
+
export declare const DATE_POLICY_REQUIRED: DatePolicyType;
|
|
25
|
+
export declare const DATE_POLICY_OPTIONAL: DatePolicyType;
|
|
26
|
+
export declare const DATE_POLICY_HIDDEN: DatePolicyType;
|
|
22
27
|
export declare const DATA_ENCRYPTED_FIELD_ATTR = "data-cse";
|
|
23
28
|
export declare const DATA_INFO = "data-info";
|
|
24
29
|
export declare const DATA_UID = "data-uid";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject, SFFeedbackObj, SendBrandObject } from '../types';
|
|
1
|
+
import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject, SFFeedbackObj, SendBrandObject, SendExpiryDateObject } from '../types';
|
|
2
2
|
import { createSecuredFields } from './createSecuredFields';
|
|
3
3
|
import { handleProcessBrand } from './utils/processBrand';
|
|
4
4
|
import { handleBrandFromBinLookup } from './utils/handleBrandFromBinLookup';
|
|
@@ -29,6 +29,7 @@ declare abstract class AbstractCSF {
|
|
|
29
29
|
protected processAutoComplete: (pFeedbackObj: SFFeedbackObj) => void;
|
|
30
30
|
protected processBrand: typeof handleProcessBrand;
|
|
31
31
|
protected sendBrandToCardSF: (brandObj: SendBrandObject) => void;
|
|
32
|
+
protected sendExpiryDatePolicyToSF: (dateObj: SendExpiryDateObject) => void;
|
|
32
33
|
protected setFocusOnFrame: (pFieldType: string, doLog?: boolean) => void;
|
|
33
34
|
protected setupSecuredField: (pItem: HTMLElement) => void;
|
|
34
35
|
protected touchendListener: (e: Event) => void;
|