@adyen/adyen-web 5.42.1 → 5.43.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.
Files changed (49) hide show
  1. package/dist/adyen.css +7 -7
  2. package/dist/adyen.css.map +1 -1
  3. package/dist/adyen.js +1 -1
  4. package/dist/adyen.js.map +1 -1
  5. package/dist/cjs/adyen.css +7 -7
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +7 -7
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/index.js +1 -1
  11. package/dist/es.modern/adyen.css +7 -7
  12. package/dist/es.modern/adyen.css.map +1 -1
  13. package/dist/es.modern/index.js +1 -1
  14. package/dist/types/components/Ach/Ach.d.ts +1 -0
  15. package/dist/types/components/AfterPay/AfterPayB2B.d.ts +1 -1
  16. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
  17. package/dist/types/components/Card/Bancontact.d.ts +3 -1
  18. package/dist/types/components/Card/Card.d.ts +7 -6
  19. package/dist/types/components/Card/components/ClickToPayWrapper.d.ts +1 -1
  20. package/dist/types/components/Card/types.d.ts +1 -0
  21. package/dist/types/components/ClickToPay/ClickToPay.d.ts +71 -0
  22. package/dist/types/components/ClickToPay/ClickToPay.spec.d.ts +1 -0
  23. package/dist/types/components/ClickToPay/index.d.ts +1 -0
  24. package/dist/types/components/ClickToPay/types.d.ts +22 -0
  25. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
  26. package/dist/types/components/Dropin/Dropin.d.ts +5 -4
  27. package/dist/types/components/DuitNow/DuitNow.d.ts +1 -0
  28. package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +1 -1
  29. package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +1 -1
  30. package/dist/types/components/OnlineBankingIN/index.d.ts +2 -2
  31. package/dist/types/components/PayNow/PayNow.d.ts +1 -0
  32. package/dist/types/components/PromptPay/PromptPay.d.ts +1 -0
  33. package/dist/types/components/Swish/Swish.d.ts +1 -0
  34. package/dist/types/components/Twint/Twint.d.ts +2 -2
  35. package/dist/types/components/WalletIN/index.d.ts +2 -2
  36. package/dist/types/components/WeChat/WeChat.d.ts +1 -0
  37. package/dist/types/components/index.d.ts +4 -2
  38. package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
  39. package/dist/types/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +1 -1
  40. package/dist/types/components/internal/ClickToPay/context/ClickToPayContext.d.ts +3 -1
  41. package/dist/types/components/internal/ClickToPay/context/ClickToPayProvider.d.ts +2 -1
  42. package/dist/types/components/internal/ClickToPay/services/ClickToPayService.d.ts +1 -0
  43. package/dist/types/components/internal/ClickToPay/services/create-clicktopay-service.d.ts +1 -2
  44. package/dist/types/components/internal/ClickToPay/services/sdks/SrciError.d.ts +1 -0
  45. package/dist/types/components/internal/ClickToPay/services/types.d.ts +1 -0
  46. package/dist/types/components/internal/ClickToPay/types.d.ts +5 -1
  47. package/dist/types/components/types.d.ts +1 -0
  48. package/dist/types/utils/Formatters/formatters.d.ts +1 -1
  49. package/package.json +5 -2
@@ -9,6 +9,7 @@ export declare class AchElement extends UIElement<AchElementProps> {
9
9
  hasHolderName?: boolean;
10
10
  enableStoreDetails: boolean;
11
11
  bankAccountNumber: string;
12
+ environment?: string;
12
13
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
13
14
  onChange?: (state: any, element: UIElement<any>) => void;
14
15
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -1,5 +1,5 @@
1
1
  import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';
2
- import { OpenInvoiceContainerProps } from "../helpers/OpenInvoiceContainer/OpenInvoiceContainer";
2
+ import { OpenInvoiceContainerProps } from '../helpers/OpenInvoiceContainer/OpenInvoiceContainer';
3
3
  export default class AfterPayB2B extends OpenInvoiceContainer {
4
4
  static type: string;
5
5
  protected static defaultProps: OpenInvoiceContainerProps;
@@ -12,6 +12,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -48,7 +48,8 @@ declare class BancontactElement extends CardElement {
48
48
  shopperEmail: any;
49
49
  telephoneNumber: any;
50
50
  locale: string;
51
- merchantDisplayName: string;
51
+ merchantDisplayName?: string;
52
+ onReady?(): void;
52
53
  };
53
54
  brand?: string;
54
55
  _disableClickToPay?: boolean;
@@ -66,6 +67,7 @@ declare class BancontactElement extends CardElement {
66
67
  onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
67
68
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
68
69
  onBinLookup?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinLookup) => void;
70
+ environment?: string;
69
71
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
70
72
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
71
73
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -33,7 +33,9 @@ export declare class CardElement extends UIElement<CardElementProps> {
33
33
  merchantIdentifier?: string;
34
34
  merchantOrigin?: string;
35
35
  gatewayMerchantId?: string;
36
- publicKeyId?: string;
36
+ publicKeyId?: string; /**
37
+ * Formats the component data output
38
+ */
37
39
  region?: string;
38
40
  merchantName?: string;
39
41
  merchantId?: string;
@@ -55,7 +57,8 @@ export declare class CardElement extends UIElement<CardElementProps> {
55
57
  shopperEmail: any;
56
58
  telephoneNumber: any;
57
59
  locale: string;
58
- merchantDisplayName: string;
60
+ merchantDisplayName?: string;
61
+ onReady?(): void;
59
62
  };
60
63
  brand?: string;
61
64
  _disableClickToPay?: boolean;
@@ -73,6 +76,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
73
76
  onFocus?: (event: import("../internal/SecuredFields/lib/types").CbObjOnFocus) => void;
74
77
  onBinValue?: (event: import("../internal/SecuredFields/lib/types").CbObjOnBinValue) => void;
75
78
  onBinLookup?: (event: CbObjOnBinLookup) => void;
79
+ environment?: string;
76
80
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
77
81
  onChange?: (state: any, element: UIElement<any>) => void;
78
82
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -88,10 +92,7 @@ export declare class CardElement extends UIElement<CardElementProps> {
88
92
  amount?: import("../../types").PaymentAmount;
89
93
  secondaryAmount?: import("../../types").PaymentAmountExtended;
90
94
  showPayButton?: boolean;
91
- setStatusAutomatically?: boolean; /**
92
- * Click to Pay configuration
93
- * - If email is set explicitly in the configuration, then it can override the one used in the session creation
94
- */
95
+ setStatusAutomatically?: boolean;
95
96
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
96
97
  loadingContext?: string;
97
98
  createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>;
@@ -1,4 +1,4 @@
1
1
  import { ClickToPayProviderProps } from '../../internal/ClickToPay/context/ClickToPayProvider';
2
2
  import { h } from 'preact';
3
- declare const ClickToPayWrapper: ({ amount, configuration, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, ...props }: ClickToPayProviderProps) => h.JSX.Element;
3
+ declare const ClickToPayWrapper: ({ amount, configuration, clickToPayService, setClickToPayRef, onSetStatus, onSubmit, onError, isStandaloneComponent, ...props }: ClickToPayProviderProps) => h.JSX.Element;
4
4
  export default ClickToPayWrapper;
@@ -143,6 +143,7 @@ export interface BrandObject {
143
143
  supported: boolean;
144
144
  brandImageUrl?: string;
145
145
  panLength?: number;
146
+ paymentMethodVariant?: string;
146
147
  }
147
148
  export interface BinLookupResponseRaw {
148
149
  requestId: string;
@@ -0,0 +1,71 @@
1
+ import { h } from 'preact';
2
+ import UIElement from '../UIElement';
3
+ import { ClickToPayElementProps, ClickToPayPaymentData } from './types';
4
+ export declare class ClickToPayElement extends UIElement<ClickToPayElementProps> {
5
+ static type: string;
6
+ private readonly clickToPayService;
7
+ private readonly ctpConfiguration;
8
+ constructor(props: any);
9
+ get isValid(): boolean;
10
+ get browserInfo(): import("../../types").BrowserInfo;
11
+ formatData(): ClickToPayPaymentData;
12
+ protected formatProps(props: ClickToPayElementProps): {
13
+ disableOtpAutoFocus: boolean;
14
+ shopperEmail: any;
15
+ telephoneNumber: any;
16
+ locale: string;
17
+ environment?: string;
18
+ session?: import("../../core/CheckoutSession/CheckoutSession").default;
19
+ onChange?: (state: any, element: UIElement<any>) => void;
20
+ onValid?: (state: any, element: UIElement<any>) => void;
21
+ beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
22
+ onSubmit?: (state: any, element: UIElement<any>) => void;
23
+ onComplete?: (state: any, element: UIElement<any>) => void;
24
+ onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
25
+ onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
26
+ onError?: (error: any, element?: UIElement<any>) => void;
27
+ onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
28
+ beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
29
+ isInstantPayment?: boolean;
30
+ type?: string;
31
+ name?: string;
32
+ icon?: string;
33
+ amount?: import("../../types").PaymentAmount;
34
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
35
+ showPayButton?: boolean;
36
+ setStatusAutomatically?: boolean;
37
+ payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
38
+ loadingContext?: string;
39
+ createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>;
40
+ clientKey?: string;
41
+ elementRef?: any;
42
+ i18n?: import("../../language").default;
43
+ _parentInstance?: import("../../core/core").default;
44
+ order?: import("../../types").Order;
45
+ modules?: {
46
+ srPanel?: import("../../core/Errors/SRPanel").SRPanel;
47
+ analytics?: import("../../core/Analytics/Analytics").default;
48
+ resources?: import("../../core/Context/Resources").Resources;
49
+ risk?: import("../../core/RiskModule").default;
50
+ };
51
+ isDropin?: boolean;
52
+ merchantDisplayName?: string;
53
+ onReady?(): void;
54
+ configuration?: {
55
+ mcDpaId?: string;
56
+ mcSrcClientId?: string;
57
+ visaSrcInitiatorId?: string;
58
+ visaSrciDpaId?: string;
59
+ };
60
+ };
61
+ /**
62
+ * Method used to let the merchant know if the shopper have a valid CtP accoubt
63
+ *
64
+ * Resolves Promise if the Shopper has cookies OR has valid CtP account
65
+ * Rejects Promise if account isn't found or if Login screen is triggered
66
+ */
67
+ isAvailable(): Promise<void>;
68
+ private handleClickToPaySubmit;
69
+ render(): h.JSX.Element;
70
+ }
71
+ export default ClickToPayElement;
@@ -0,0 +1 @@
1
+ export { default } from './ClickToPay';
@@ -0,0 +1,22 @@
1
+ import { UIElementProps } from '../types';
2
+ import { BrowserInfo } from '../../types';
3
+ import { ClickToPayConfiguration } from '../internal/ClickToPay/types';
4
+ import { ClickToPayCheckoutPayload } from '../internal/ClickToPay/services/types';
5
+ export type ClickToPayElementProps = UIElementProps & ClickToPayConfiguration & {
6
+ /**
7
+ * ClickToPay configuration sent by the /paymentMethods response
8
+ */
9
+ configuration?: {
10
+ mcDpaId?: string;
11
+ mcSrcClientId?: string;
12
+ visaSrcInitiatorId?: string;
13
+ visaSrciDpaId?: string;
14
+ };
15
+ };
16
+ export type ClickToPayPaymentData = {
17
+ paymentMethod: ClickToPayCheckoutPayload & {
18
+ type: string;
19
+ };
20
+ origin: string;
21
+ browserInfo: BrowserInfo;
22
+ };
@@ -21,6 +21,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
21
21
  loadingContext?: string;
22
22
  reference?: string;
23
23
  i18n?: import("../../language").default;
24
+ environment?: string;
24
25
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
25
26
  onChange?: (state: any, element: UIElement<any>) => void;
26
27
  onValid?: (state: any, element: UIElement<any>) => void;
@@ -47,16 +47,17 @@ declare class DropinElement extends UIElement<DropinElementProps> {
47
47
  onSelect?: (paymentMethod: UIElement<any>) => void;
48
48
  showRemovePaymentMethodButton?: boolean;
49
49
  onDisableStoredPaymentMethod?: (storedPaymentMethod: any, resolve: any, reject: any) => void;
50
+ environment?: string;
50
51
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
51
52
  onChange?: (state: any, element: UIElement<any>) => void;
52
53
  onValid?: (state: any, element: UIElement<any>) => void;
53
- beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>;
54
+ beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>; /**
55
+ * Calls the onSubmit event with the state of the activePaymentMethod
56
+ */
54
57
  onComplete?: (state: any, element: UIElement<any>) => void;
55
58
  onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void;
56
59
  onAdditionalDetails?: (state: any, element: UIElement<any>) => void;
57
- onError?: (error: any, element?: UIElement<any>) => void; /**
58
- * Creates the Drop-in elements
59
- */
60
+ onError?: (error: any, element?: UIElement<any>) => void;
60
61
  onPaymentCompleted?: (result: any, element: UIElement<any>) => void;
61
62
  beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void;
62
63
  isInstantPayment?: boolean;
@@ -12,6 +12,7 @@ declare class DuitNowElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -1,3 +1,3 @@
1
1
  import { h } from 'preact';
2
- import { GiftcardFieldsProps } from "./types";
2
+ import { GiftcardFieldsProps } from './types';
3
3
  export declare const GiftCardFields: (props: GiftcardFieldsProps) => h.JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { h } from 'preact';
2
- import { GiftcardFieldsProps } from "../../Giftcard/components/types";
2
+ import { GiftcardFieldsProps } from '../../Giftcard/components/types';
3
3
  export declare const MealVoucherFields: (props: GiftcardFieldsProps) => h.JSX.Element;
@@ -3,8 +3,8 @@ declare class OnlineBankingINElement extends IssuerListContainer {
3
3
  static type: string;
4
4
  formatProps(props: any): any;
5
5
  /**
6
- * Formats the component data output
7
- */
6
+ * Formats the component data output
7
+ */
8
8
  formatData(): {
9
9
  browserInfo: import("../../types").BrowserInfo;
10
10
  paymentMethod: {
@@ -12,6 +12,7 @@ declare class PayNowElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -12,6 +12,7 @@ declare class PromptPayElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -12,6 +12,7 @@ declare class SwishElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -1,5 +1,5 @@
1
- import RedirectElement from "../Redirect";
2
- import { h } from "preact";
1
+ import RedirectElement from '../Redirect';
2
+ import { h } from 'preact';
3
3
  /**
4
4
  * TwintElement
5
5
  */
@@ -3,8 +3,8 @@ declare class WalletINElement extends IssuerListContainer {
3
3
  static type: string;
4
4
  formatProps(props: any): any;
5
5
  /**
6
- * Formats the component data output
7
- */
6
+ * Formats the component data output
7
+ */
8
8
  formatData(): {
9
9
  browserInfo: import("../../types").BrowserInfo;
10
10
  paymentMethod: {
@@ -12,6 +12,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
12
12
  introduction: string;
13
13
  instructions?: string;
14
14
  copyBtn?: boolean;
15
+ environment?: string;
15
16
  session?: import("../../core/CheckoutSession/CheckoutSession").default;
16
17
  onChange?: (state: any, element: import("../UIElement").UIElement<any>) => void;
17
18
  onValid?: (state: any, element: import("../UIElement").UIElement<any>) => void;
@@ -4,6 +4,7 @@ import ApplePay from './ApplePay';
4
4
  import Atome from './Atome';
5
5
  import { BillDeskOnline, BillDeskWallet } from './BillDesk';
6
6
  import Card from './Card';
7
+ import ClickToPay from './ClickToPay';
7
8
  import Bancontact from './Card/Bancontact';
8
9
  import Donation from './Donation';
9
10
  import Giropay from './Giropay';
@@ -55,8 +56,8 @@ import WalletINElement from './WalletIN';
55
56
  import OnlineBankingCZElement from './OnlineBankingCZ';
56
57
  import OnlineBankingSKElement from './OnlineBankingSK';
57
58
  import PayByBank from './PayByBank';
58
- import PromptPay from "./PromptPay";
59
- import Duitnow from "./DuitNow";
59
+ import PromptPay from './PromptPay';
60
+ import Duitnow from './DuitNow';
60
61
  /**
61
62
  * Maps each component with a Component element.
62
63
  */
@@ -107,6 +108,7 @@ declare const componentsMap: {
107
108
  /** Wallets */
108
109
  amazonpay: typeof AmazonPay;
109
110
  applepay: typeof ApplePay;
111
+ clicktopay: typeof ClickToPay;
110
112
  googlepay: typeof GooglePay;
111
113
  paypal: typeof PayPal;
112
114
  paywithgoogle: typeof GooglePay;
@@ -5,7 +5,7 @@ interface AlertProps {
5
5
  children: ComponentChildren;
6
6
  classNames?: string[];
7
7
  icon?: string;
8
- type?: typeof ALERT_TYPES[number];
8
+ type?: (typeof ALERT_TYPES)[number];
9
9
  }
10
10
  export default function Alert({ children, classNames, type, icon }: AlertProps): h.JSX.Element;
11
11
  export {};
@@ -8,7 +8,7 @@ type OnChangeProps = {
8
8
  interface CtPLoginInputProps {
9
9
  disabled: boolean;
10
10
  errorMessage?: string;
11
- onPressEnter(): void;
11
+ onPressEnter(): Promise<void>;
12
12
  onChange({ data, valid, errors, isValid }: OnChangeProps): void;
13
13
  onSetInputHandlers(handlers: CtPLoginInputHandlers): void;
14
14
  }
@@ -6,9 +6,10 @@ import { UIElementStatus } from '../../../types';
6
6
  import { PaymentAmount } from '../../../../types';
7
7
  import AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';
8
8
  export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout' | 'startIdentityValidation' | 'finishIdentityValidation' | 'verifyIfShopperIsEnrolled'> {
9
+ isStandaloneComponent: boolean;
9
10
  isCtpPrimaryPaymentMethod: boolean;
10
11
  setIsCtpPrimaryPaymentMethod(isPrimary: boolean): void;
11
- logoutShopper(): void;
12
+ logoutShopper(): Promise<void>;
12
13
  ctpState: CtpState;
13
14
  cards: ShopperCard[];
14
15
  schemes: string[];
@@ -20,6 +21,7 @@ export interface IClickToPayContext extends Pick<IClickToPayService, 'checkout'
20
21
  onSubmit(payload: ClickToPayCheckoutPayload): void;
21
22
  onSetStatus(status: UIElementStatus): void;
22
23
  onError(error: AdyenCheckoutError): void;
24
+ onReady(): void;
23
25
  }
24
26
  declare const ClickToPayContext: import("preact").Context<IClickToPayContext>;
25
27
  export { ClickToPayContext };
@@ -5,6 +5,7 @@ import AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';
5
5
  import { UIElementStatus } from '../../../types';
6
6
  import { PaymentAmount } from '../../../../types';
7
7
  export type ClickToPayProviderProps = {
8
+ isStandaloneComponent: boolean;
8
9
  clickToPayService: IClickToPayService | null;
9
10
  configuration: ClickToPayConfiguration;
10
11
  amount: PaymentAmount;
@@ -14,5 +15,5 @@ export type ClickToPayProviderProps = {
14
15
  onSetStatus(status: UIElementStatus): void;
15
16
  onError(error: AdyenCheckoutError): void;
16
17
  };
17
- declare const ClickToPayProvider: ({ clickToPayService, amount, configuration, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
18
+ declare const ClickToPayProvider: ({ isStandaloneComponent, clickToPayService, amount, configuration, children, setClickToPayRef, onSubmit, onSetStatus, onError }: ClickToPayProviderProps) => h.JSX.Element;
18
19
  export default ClickToPayProvider;
@@ -26,6 +26,7 @@ declare class ClickToPayService implements IClickToPayService {
26
26
  shopperCards: ShopperCard[];
27
27
  identityValidationData: IdentityValidationData;
28
28
  constructor(schemesConfig: SchemesConfiguration, sdkLoader: ISrcSdkLoader, environment: string, shopperIdentity?: IdentityLookupParams);
29
+ get shopperAccountFound(): boolean;
29
30
  get schemes(): string[];
30
31
  initialize(): Promise<void>;
31
32
  /**
@@ -4,5 +4,4 @@ import { ClickToPayConfiguration } from '../types';
4
4
  /**
5
5
  * Creates the Click to Pay service in case the required configuration is provided
6
6
  */
7
- declare function createClickToPayService(configuration: CardConfiguration, clickToPayConfiguration: ClickToPayConfiguration | undefined, environment: string): IClickToPayService | null;
8
- export { createClickToPayService };
7
+ export default function createClickToPayService(configuration: CardConfiguration, clickToPayConfiguration: ClickToPayConfiguration | undefined, environment: string): IClickToPayService | null;
@@ -15,5 +15,6 @@ declare class SrciError extends Error {
15
15
  source: string;
16
16
  scheme: ClickToPayScheme;
17
17
  constructor(schemeError: VisaError | MastercardError, source: string, scheme: ClickToPayScheme);
18
+ toString(): string;
18
19
  }
19
20
  export default SrciError;
@@ -7,6 +7,7 @@ export interface IClickToPayService {
7
7
  shopperCards: ShopperCard[];
8
8
  identityValidationData: IdentityValidationData;
9
9
  schemes: string[];
10
+ shopperAccountFound: boolean;
10
11
  initialize(): Promise<void>;
11
12
  checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload>;
12
13
  logout(): Promise<void>;
@@ -10,7 +10,7 @@ export type ClickToPayConfiguration = {
10
10
  /**
11
11
  * Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
12
12
  */
13
- merchantDisplayName: string;
13
+ merchantDisplayName?: string;
14
14
  /**
15
15
  * Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
16
16
  * defined during the creation of the Checkout.
@@ -24,5 +24,9 @@ export type ClickToPayConfiguration = {
24
24
  * @defaultValue false
25
25
  */
26
26
  disableOtpAutoFocus?: boolean;
27
+ /**
28
+ * Callback triggered when the Click to Pay component is ready to be used
29
+ */
30
+ onReady?(): void;
27
31
  };
28
32
  export type ClickToPayScheme = 'mc' | 'visa';
@@ -83,6 +83,7 @@ export interface ActionHandledReturnObject {
83
83
  actionDescription: ActionDescriptionType;
84
84
  }
85
85
  export interface UIElementProps extends BaseElementProps {
86
+ environment?: string;
86
87
  session?: Session;
87
88
  onChange?: (state: any, element: UIElement) => void;
88
89
  onValid?: (state: any, element: UIElement) => void;
@@ -1,2 +1,2 @@
1
- import { FormatterFn } from "./types";
1
+ import { FormatterFn } from './types';
2
2
  export declare const digitsOnlyFormatter: FormatterFn;
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "./dist/es/adyen.css": "./dist/es/adyen.css",
25
25
  "./package.json": "./package.json"
26
26
  },
27
- "version": "5.42.1",
27
+ "version": "5.43.0",
28
28
  "license": "MIT",
29
29
  "homepage": "https://docs.adyen.com/checkout",
30
30
  "repository": "github:Adyen/adyen-web",
@@ -44,9 +44,12 @@
44
44
  "size-only": "node ./scripts/size",
45
45
  "type-check": "tsc --noEmit",
46
46
  "type-check-generate": "tsc --emitDeclarationOnly",
47
+ "format": "npm run lint:fix && npm run prettier:fix && npm run styles:fix",
47
48
  "lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet",
48
49
  "lint-styles": "stylelint '**/*.scss'",
50
+ "styles:fix": "npm run lint-styles -- --fix",
49
51
  "lint:fix": "npm run lint -- --fix",
52
+ "prettier:fix": "prettier \"src/**/*.{js,ts,tsx}\" \"package.json\" --write --loglevel silent",
50
53
  "prepublishOnly": "npm run build",
51
54
  "prepare": "cd ../.. && husky install packages/lib/.husky"
52
55
  },
@@ -68,7 +71,7 @@
68
71
  "@testing-library/preact": "3.2.3",
69
72
  "@testing-library/preact-hooks": "1.1.0",
70
73
  "@testing-library/user-event": "14.4.3",
71
- "@types/jest": "29.5.0",
74
+ "@types/jest": "29.5.1",
72
75
  "@typescript-eslint/eslint-plugin": "5.56.0",
73
76
  "@typescript-eslint/parser": "5.56.0",
74
77
  "autoprefixer": "10.4.14",