@adyen/adyen-web 5.42.0 → 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 (95) hide show
  1. package/dist/adyen.css +9 -9
  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 +9 -9
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +9 -9
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/index.js +1 -1
  11. package/dist/es.modern/adyen.css +9 -9
  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/ApplePay/types.d.ts +1 -1
  17. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
  18. package/dist/types/components/Card/Bancontact.d.ts +3 -1
  19. package/dist/types/components/Card/Card.d.ts +7 -6
  20. package/dist/types/components/Card/{ClickToPayWrapper.d.ts → components/ClickToPayWrapper.d.ts} +2 -2
  21. package/dist/types/components/Card/types.d.ts +2 -28
  22. package/dist/types/components/ClickToPay/ClickToPay.d.ts +71 -0
  23. package/dist/types/components/ClickToPay/ClickToPay.spec.d.ts +1 -0
  24. package/dist/types/components/ClickToPay/index.d.ts +1 -0
  25. package/dist/types/components/ClickToPay/types.d.ts +22 -0
  26. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
  27. package/dist/types/components/Dropin/Dropin.d.ts +5 -4
  28. package/dist/types/components/DuitNow/DuitNow.d.ts +1 -0
  29. package/dist/types/components/Giftcard/components/GiftcardFields.d.ts +1 -1
  30. package/dist/types/components/GooglePay/GooglePay.d.ts +1 -0
  31. package/dist/types/components/GooglePay/defaultProps.d.ts +1 -0
  32. package/dist/types/components/GooglePay/types.d.ts +7 -0
  33. package/dist/types/components/MealVoucherFR/components/MealVoucherFields.d.ts +1 -1
  34. package/dist/types/components/OnlineBankingIN/index.d.ts +2 -2
  35. package/dist/types/components/PayNow/PayNow.d.ts +1 -0
  36. package/dist/types/components/PromptPay/PromptPay.d.ts +1 -0
  37. package/dist/types/components/Swish/Swish.d.ts +1 -0
  38. package/dist/types/components/Twint/Twint.d.ts +2 -2
  39. package/dist/types/components/WalletIN/index.d.ts +2 -2
  40. package/dist/types/components/WeChat/WeChat.d.ts +1 -0
  41. package/dist/types/components/index.d.ts +4 -2
  42. package/dist/types/components/internal/Alert/Alert.d.ts +1 -1
  43. package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +1 -1
  44. package/dist/types/components/internal/ClickToPay/components/CtPLogin/validate.d.ts +2 -0
  45. package/dist/types/components/{Card/components/ClickToPay/components/CtPLogin → internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput}/validate.d.ts +1 -1
  46. package/dist/types/components/{Card/components → internal}/ClickToPay/context/ClickToPayContext.d.ts +7 -5
  47. package/dist/types/components/{Card/components → internal}/ClickToPay/context/ClickToPayProvider.d.ts +6 -5
  48. package/dist/types/components/{Card/components → internal}/ClickToPay/models/ShopperCard.d.ts +1 -1
  49. package/dist/types/components/{Card/components → internal}/ClickToPay/services/ClickToPayService.d.ts +1 -0
  50. package/dist/types/components/internal/ClickToPay/services/create-clicktopay-service.d.ts +7 -0
  51. package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +1 -1
  52. package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/SrciError.d.ts +2 -1
  53. package/dist/types/components/{Card/components → internal}/ClickToPay/services/types.d.ts +2 -1
  54. package/dist/types/components/internal/ClickToPay/types.d.ts +32 -0
  55. package/dist/types/components/types.d.ts +1 -0
  56. package/dist/types/utils/Formatters/formatters.d.ts +1 -1
  57. package/package.json +5 -2
  58. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.d.ts +0 -2
  59. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/CtPSectionTitle.d.ts +0 -0
  60. package/dist/types/components/Card/components/ClickToPay/services/create-clicktopay-service.d.ts +0 -7
  61. /package/dist/types/components/Card/{ClickToPayHolder.d.ts → components/ClickToPayHolder.d.ts} +0 -0
  62. /package/dist/types/components/{Card/components → internal}/ClickToPay/ClickToPayComponent.d.ts +0 -0
  63. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPBrand/CtPBrand.d.ts +0 -0
  64. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPBrand/index.d.ts +0 -0
  65. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/CtPCards.d.ts +0 -0
  66. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +0 -0
  67. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/CtPCardsList/index.d.ts +0 -0
  68. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +0 -0
  69. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/CtPSingleCard/index.d.ts +0 -0
  70. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPCards/index.d.ts +0 -0
  71. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPInfo/CtPInfo.d.ts +0 -0
  72. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.d.ts +0 -0
  73. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPInfo/CtPInfoModal/index.d.ts +0 -0
  74. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPInfo/index.d.ts +0 -0
  75. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPLoader/CtPLoader.d.ts +0 -0
  76. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPLoader/index.d.ts +0 -0
  77. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPLogin/CtPLogin.d.ts +0 -0
  78. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPLogin/index.d.ts +0 -0
  79. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +0 -0
  80. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +0 -0
  81. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.d.ts +0 -0
  82. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/index.d.ts +0 -0
  83. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPOneTimePassword/index.d.ts +0 -0
  84. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPSection/CtPLogoutLink.d.ts +0 -0
  85. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPSection/CtPSection.d.ts +0 -0
  86. /package/dist/types/components/{Card/components → internal}/ClickToPay/components/CtPSection/index.d.ts +0 -0
  87. /package/dist/types/components/{Card/components → internal}/ClickToPay/context/useClickToPayContext.d.ts +0 -0
  88. /package/dist/types/components/{Card/components → internal}/ClickToPay/index.d.ts +0 -0
  89. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/MastercardSdk.d.ts +0 -0
  90. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/SrcSdkLoader.d.ts +0 -0
  91. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/VisaSdk.d.ts +0 -0
  92. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/config.d.ts +0 -0
  93. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/types.d.ts +0 -0
  94. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/sdks/utils.d.ts +0 -0
  95. /package/dist/types/components/{Card/components → internal}/ClickToPay/services/utils.d.ts +0 -0
@@ -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;
@@ -23,7 +23,7 @@ export interface ApplePayElementProps extends UIElementProps {
23
23
  * Part of the 'ApplePayLineItem' object, which sets the label of the payment request
24
24
  * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaylineitem ApplePayLineItem docs}
25
25
  */
26
- totalPriceLabel: string;
26
+ totalPriceLabel?: string;
27
27
  /**
28
28
  * @default 'final'
29
29
  */
@@ -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
- import { ClickToPayProviderProps } from './components/ClickToPay/context/ClickToPayProvider';
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;
@@ -2,6 +2,7 @@ import { UIElementProps } from '../types';
2
2
  import { AddressData, BrowserInfo } from '../../types';
3
3
  import { CbObjOnBinValue, CbObjOnBrand, CbObjOnConfigSuccess, CbObjOnError, CbObjOnFieldValid, CbObjOnFocus, CbObjOnLoad, CbObjOnBinLookup } from '../internal/SecuredFields/lib/types';
4
4
  import { CVCPolicyType, DatePolicyType } from '../internal/SecuredFields/lib/types';
5
+ import { ClickToPayConfiguration } from '../internal/ClickToPay/types';
5
6
  export interface CardElementProps extends UIElementProps {
6
7
  /**
7
8
  * Only set for a stored card,
@@ -84,34 +85,6 @@ export interface CardElementProps extends UIElementProps {
84
85
  onBinLookup?: (event: CbObjOnBinLookup) => void;
85
86
  [key: string]: any;
86
87
  }
87
- export type ClickToPayScheme = 'mc' | 'visa';
88
- export type ClickToPayConfiguration = {
89
- /**
90
- * Shopper email used to be recognized with the Network schemes
91
- */
92
- shopperEmail?: string;
93
- /**
94
- * Shopper telephone number used to be recognized with the Network schemes
95
- */
96
- telephoneNumber?: string;
97
- /**
98
- * Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
99
- */
100
- merchantDisplayName: string;
101
- /**
102
- * Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
103
- * defined during the creation of the Checkout.
104
- * Format: ISO language_country pair (e.g., en_US )
105
- *
106
- * @defaultValue en_US
107
- */
108
- locale?: string;
109
- /**
110
- * Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
111
- * @defaultValue false
112
- */
113
- disableOtpAutoFocus?: boolean;
114
- };
115
88
  export type SocialSecurityMode = 'show' | 'hide' | 'auto';
116
89
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
117
90
  export interface CardConfiguration {
@@ -170,6 +143,7 @@ export interface BrandObject {
170
143
  supported: boolean;
171
144
  brandImageUrl?: string;
172
145
  panLength?: number;
146
+ paymentMethodVariant?: string;
173
147
  }
174
148
  export interface BinLookupResponseRaw {
175
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;
@@ -31,6 +31,7 @@ declare class GooglePay extends UIElement<GooglePayProps> {
31
31
  allowPrepaidCards: boolean;
32
32
  billingAddressRequired: boolean;
33
33
  billingAddressParameters: any;
34
+ assuranceDetailsRequired: boolean;
34
35
  emailRequired: boolean;
35
36
  shippingAddressRequired: boolean;
36
37
  shippingAddressParameters: any;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  allowPrepaidCards: boolean;
26
26
  billingAddressRequired: boolean;
27
27
  billingAddressParameters: any;
28
+ assuranceDetailsRequired: boolean;
28
29
  emailRequired: boolean;
29
30
  shippingAddressRequired: boolean;
30
31
  shippingAddressParameters: any;
@@ -47,6 +47,13 @@ export interface GooglePayProps extends UIElementProps {
47
47
  countryCode?: string;
48
48
  allowedAuthMethods?: google.payments.api.CardAuthMethod[];
49
49
  allowedCardNetworks?: google.payments.api.CardNetwork[];
50
+ /**
51
+ * Set to true to request assuranceDetails. This object provides information
52
+ * about the validation performed on the returned payment data.
53
+ *
54
+ * @defaultValue false
55
+ */
56
+ assuranceDetailsRequired?: boolean;
50
57
  /**
51
58
  * Set to false if you don't support credit cards.
52
59
  * @defaultValue true
@@ -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
  }
@@ -0,0 +1,2 @@
1
+ import { ValidatorRules } from '../../../../../utils/Validator/types';
2
+ export declare const loginValidationRules: ValidatorRules;
@@ -1,2 +1,2 @@
1
1
  import { ValidatorRules } from '../../../../../../utils/Validator/types';
2
- export declare const loginValidationRules: ValidatorRules;
2
+ export declare const otpValidationRules: ValidatorRules;
@@ -1,14 +1,15 @@
1
1
  import { CtpState } from '../services/ClickToPayService';
2
2
  import { ClickToPayCheckoutPayload, IClickToPayService } from '../services/types';
3
- import { PaymentAmount } from '../../../../../types';
4
3
  import ShopperCard from '../models/ShopperCard';
5
- import { UIElementStatus } from '../../../../types';
6
- import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
7
- import { ClickToPayConfiguration } from '../../../types';
4
+ import { ClickToPayConfiguration } from '../types';
5
+ import { UIElementStatus } from '../../../types';
6
+ import { PaymentAmount } from '../../../../types';
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 };
@@ -1,10 +1,11 @@
1
1
  import { h } from 'preact';
2
2
  import { ClickToPayCheckoutPayload, IClickToPayService } from '../services/types';
3
- import { PaymentAmount } from '../../../../../types';
4
- import { UIElementStatus } from '../../../../types';
5
- import AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';
6
- import { ClickToPayConfiguration } from '../../../types';
3
+ import { ClickToPayConfiguration } from '../types';
4
+ import AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';
5
+ import { UIElementStatus } from '../../../types';
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;
@@ -1,5 +1,5 @@
1
1
  import { SrcCard } from '../services/sdks/types';
2
- import { ClickToPayScheme } from '../../../types';
2
+ import { ClickToPayScheme } from '../types';
3
3
  declare class ShopperCard {
4
4
  dateOfCardLastUsed: string;
5
5
  panLastFour: string;
@@ -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
  /**
@@ -0,0 +1,7 @@
1
+ import { IClickToPayService } from './types';
2
+ import { CardConfiguration } from '../../../Card/types';
3
+ import { ClickToPayConfiguration } from '../types';
4
+ /**
5
+ * Creates the Click to Pay service in case the required configuration is provided
6
+ */
7
+ export default function createClickToPayService(configuration: CardConfiguration, clickToPayConfiguration: ClickToPayConfiguration | undefined, environment: string): IClickToPayService | null;
@@ -1,5 +1,5 @@
1
1
  import { CustomSdkConfiguration, SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrcIdentityLookupParams, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
2
- import { ClickToPayScheme } from '../../../../types';
2
+ import { ClickToPayScheme } from '../../types';
3
3
  export interface ISrcInitiator {
4
4
  schemeName: ClickToPayScheme;
5
5
  loadSdkScript(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { ClickToPayScheme } from '../../../../types';
1
+ import { ClickToPayScheme } from '../../types';
2
2
  type MastercardError = {
3
3
  message: string;
4
4
  reason: string;
@@ -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;
@@ -1,12 +1,13 @@
1
1
  import { CtpState } from './ClickToPayService';
2
2
  import { SrcInitParams, SrcProfile } from './sdks/types';
3
- import { ClickToPayScheme } from '../../../types';
4
3
  import ShopperCard from '../models/ShopperCard';
4
+ import { ClickToPayScheme } from '../types';
5
5
  export interface IClickToPayService {
6
6
  state: CtpState;
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>;
@@ -0,0 +1,32 @@
1
+ export type ClickToPayConfiguration = {
2
+ /**
3
+ * Shopper email used to be recognized with the Network schemes
4
+ */
5
+ shopperEmail?: string;
6
+ /**
7
+ * Shopper telephone number used to be recognized with the Network schemes
8
+ */
9
+ telephoneNumber?: string;
10
+ /**
11
+ * Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
12
+ */
13
+ merchantDisplayName?: string;
14
+ /**
15
+ * Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
16
+ * defined during the creation of the Checkout.
17
+ * Format: ISO language_country pair (e.g., en_US )
18
+ *
19
+ * @defaultValue en_US
20
+ */
21
+ locale?: string;
22
+ /**
23
+ * Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
24
+ * @defaultValue false
25
+ */
26
+ disableOtpAutoFocus?: boolean;
27
+ /**
28
+ * Callback triggered when the Click to Pay component is ready to be used
29
+ */
30
+ onReady?(): void;
31
+ };
32
+ export type ClickToPayScheme = 'mc' | 'visa';