@adyen/adyen-web 5.20.0 → 5.23.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 (146) hide show
  1. package/dist/adyen.css +14 -5
  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 +14 -5
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +14 -5
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/ar.js +1 -1
  11. package/dist/es/cs-CZ.js +1 -1
  12. package/dist/es/da-DK.js +1 -1
  13. package/dist/es/de-DE.js +1 -1
  14. package/dist/es/el-GR.js +1 -1
  15. package/dist/es/es-ES.js +1 -1
  16. package/dist/es/fi-FI.js +1 -1
  17. package/dist/es/fr-FR.js +1 -1
  18. package/dist/es/hr-HR.js +1 -1
  19. package/dist/es/hu-HU.js +1 -1
  20. package/dist/es/index.js +1 -1
  21. package/dist/es/it-IT.js +1 -1
  22. package/dist/es/ja-JP.js +1 -1
  23. package/dist/es/ko-KR.js +1 -1
  24. package/dist/es/nl-NL.js +1 -1
  25. package/dist/es/no-NO.js +1 -1
  26. package/dist/es/pl-PL.js +1 -1
  27. package/dist/es/pt-BR.js +1 -1
  28. package/dist/es/pt-PT.js +1 -1
  29. package/dist/es/ro-RO.js +1 -1
  30. package/dist/es/ru-RU.js +1 -1
  31. package/dist/es/sk-SK.js +1 -1
  32. package/dist/es/sl-SI.js +1 -1
  33. package/dist/es/sv-SE.js +1 -1
  34. package/dist/es/zh-CN.js +1 -1
  35. package/dist/es/zh-TW.js +1 -1
  36. package/dist/es.modern/adyen.css +14 -5
  37. package/dist/es.modern/adyen.css.map +1 -1
  38. package/dist/es.modern/ar.js +1 -1
  39. package/dist/es.modern/cs-CZ.js +1 -1
  40. package/dist/es.modern/da-DK.js +1 -1
  41. package/dist/es.modern/de-DE.js +1 -1
  42. package/dist/es.modern/el-GR.js +1 -1
  43. package/dist/es.modern/es-ES.js +1 -1
  44. package/dist/es.modern/fi-FI.js +1 -1
  45. package/dist/es.modern/fr-FR.js +1 -1
  46. package/dist/es.modern/hr-HR.js +1 -1
  47. package/dist/es.modern/hu-HU.js +1 -1
  48. package/dist/es.modern/index.js +1 -1
  49. package/dist/es.modern/it-IT.js +1 -1
  50. package/dist/es.modern/ja-JP.js +1 -1
  51. package/dist/es.modern/ko-KR.js +1 -1
  52. package/dist/es.modern/nl-NL.js +1 -1
  53. package/dist/es.modern/no-NO.js +1 -1
  54. package/dist/es.modern/pl-PL.js +1 -1
  55. package/dist/es.modern/pt-BR.js +1 -1
  56. package/dist/es.modern/pt-PT.js +1 -1
  57. package/dist/es.modern/ro-RO.js +1 -1
  58. package/dist/es.modern/ru-RU.js +1 -1
  59. package/dist/es.modern/sk-SK.js +1 -1
  60. package/dist/es.modern/sl-SI.js +1 -1
  61. package/dist/es.modern/sv-SE.js +1 -1
  62. package/dist/es.modern/zh-CN.js +1 -1
  63. package/dist/es.modern/zh-TW.js +1 -1
  64. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
  65. package/dist/types/components/Card/Bancontact.d.ts +13 -0
  66. package/dist/types/components/Card/Card.d.ts +29 -1
  67. package/dist/types/components/Card/ClickToPayHolder.d.ts +6 -0
  68. package/dist/types/components/Card/ClickToPayWrapper.d.ts +4 -0
  69. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  70. package/dist/types/components/Card/components/CardInput/types.d.ts +1 -0
  71. package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +6 -0
  72. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +7 -0
  73. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +8 -0
  74. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/index.d.ts +1 -0
  75. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/CtPEmptyCardsList.d.ts +6 -0
  76. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/index.d.ts +1 -0
  77. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +8 -0
  78. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/index.d.ts +1 -0
  79. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/index.d.ts +1 -0
  80. package/dist/types/components/Card/components/ClickToPay/components/CtPLoader/CtPLoader.d.ts +4 -0
  81. package/dist/types/components/Card/components/ClickToPay/components/CtPLoader/index.d.ts +1 -0
  82. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLogin.d.ts +4 -0
  83. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +18 -0
  84. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/index.d.ts +1 -0
  85. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/validate.d.ts +2 -0
  86. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +4 -0
  87. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +20 -0
  88. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.d.ts +7 -0
  89. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/index.d.ts +1 -0
  90. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.d.ts +2 -0
  91. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/index.d.ts +1 -0
  92. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/CtPLogoutLink.d.ts +4 -0
  93. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/CtPSection.d.ts +7 -0
  94. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/index.d.ts +1 -0
  95. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +22 -0
  96. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +16 -0
  97. package/dist/types/components/Card/components/ClickToPay/context/useClickToPayContext.d.ts +3 -0
  98. package/dist/types/components/Card/components/ClickToPay/index.d.ts +1 -0
  99. package/dist/types/components/Card/components/ClickToPay/models/ShopperCard.d.ts +15 -0
  100. package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +79 -0
  101. package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +75 -0
  102. package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +13 -0
  103. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrcSdkLoader.d.ts +12 -0
  104. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +16 -0
  105. package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +13 -0
  106. package/dist/types/components/Card/components/ClickToPay/services/sdks/config.d.ts +28 -0
  107. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +46 -0
  108. package/dist/types/components/Card/components/ClickToPay/services/sdks/utils.d.ts +5 -0
  109. package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +39 -0
  110. package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +6 -0
  111. package/dist/types/components/Card/components/ClickToPay/utils.d.ts +7 -0
  112. package/dist/types/components/Card/types.d.ts +26 -0
  113. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
  114. package/dist/types/components/Dropin/Dropin.d.ts +1 -0
  115. package/dist/types/components/Giftcard/Giftcard.d.ts +1 -0
  116. package/dist/types/components/OnlineBankingCZ/index.d.ts +7 -0
  117. package/dist/types/components/OnlineBankingSK/index.d.ts +7 -0
  118. package/dist/types/components/Pix/Pix.d.ts +1 -0
  119. package/dist/types/components/Swish/Swish.d.ts +1 -0
  120. package/dist/types/components/UIElement.d.ts +1 -0
  121. package/dist/types/components/WeChat/WeChat.d.ts +1 -0
  122. package/dist/types/components/index.d.ts +5 -0
  123. package/dist/types/components/internal/Button/types.d.ts +3 -1
  124. package/dist/types/components/internal/ContentSeparator/ContentSeparator.d.ts +2 -1
  125. package/dist/types/components/internal/FormFields/Field/types.d.ts +2 -1
  126. package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
  127. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -1
  128. package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -0
  129. package/dist/types/components/internal/Icon/Icon.d.ts +3 -1
  130. package/dist/types/components/internal/IssuerList/types.d.ts +1 -0
  131. package/dist/types/components/internal/PayButton/PayButton.d.ts +7 -6
  132. package/dist/types/components/internal/PayButton/components/SecondaryButtonLabel.d.ts +6 -0
  133. package/dist/types/components/internal/PayButton/utils.d.ts +7 -0
  134. package/dist/types/components/internal/SecuredFields/lib/CSF/AbstractCSF.d.ts +2 -2
  135. package/dist/types/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.d.ts +8 -3
  136. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
  137. package/dist/types/components/types.d.ts +3 -1
  138. package/dist/types/components/utils.d.ts +2 -2
  139. package/dist/types/core/CheckoutSession/CheckoutSession.d.ts +2 -1
  140. package/dist/types/core/types.d.ts +6 -2
  141. package/dist/types/index.d.ts +2 -1
  142. package/dist/types/language/config.d.ts +34 -0
  143. package/dist/types/language/locales/index.d.ts +118 -0
  144. package/dist/types/language/utils.d.ts +8 -0
  145. package/dist/types/types/index.d.ts +13 -0
  146. package/package.json +1 -1
@@ -0,0 +1,79 @@
1
+ import { CallbackStateSubscriber, IClickToPayService, IdentityLookupParams, ClickToPayCheckoutPayload } from './types';
2
+ import { ISrcSdkLoader } from './sdks/SrcSdkLoader';
3
+ import { SrcInitParams } from './sdks/types';
4
+ import { ClickToPayScheme } from '../../../types';
5
+ import ShopperCard from '../models/ShopperCard';
6
+ export declare enum CtpState {
7
+ Idle = "Idle",
8
+ Loading = "Loading",
9
+ ShopperIdentified = "ShopperIdentified",
10
+ OneTimePassword = "OneTimePassword",
11
+ Ready = "Ready",
12
+ Login = "Login",
13
+ NotAvailable = "NotAvailable"
14
+ }
15
+ declare class ClickToPayService implements IClickToPayService {
16
+ private readonly sdkLoader;
17
+ private readonly schemesConfig;
18
+ private readonly shopperIdentity?;
19
+ private readonly environment;
20
+ /**
21
+ * Mandatory unique ID passed to all the networks (Click to Pay systems), used to track user journey
22
+ */
23
+ private readonly srciTransactionId;
24
+ private sdks;
25
+ private validationSchemeSdk;
26
+ private stateSubscriber;
27
+ state: CtpState;
28
+ shopperCards: ShopperCard[];
29
+ shopperValidationContact: string;
30
+ constructor(schemesConfig: Record<ClickToPayScheme, SrcInitParams>, sdkLoader: ISrcSdkLoader, environment: string, shopperIdentity?: IdentityLookupParams);
31
+ get schemes(): string[];
32
+ initialize(): Promise<void>;
33
+ /**
34
+ * Set the callback for notifying when the CtPState changes
35
+ */
36
+ subscribeOnStateChange(callback: CallbackStateSubscriber): void;
37
+ /**
38
+ * Initiates Consumer Identity validation with one Click to Pay System.
39
+ * The Click to Pay System sends a one-time-password (OTP) to the registered email address or mobile number.
40
+ **/
41
+ startIdentityValidation(): Promise<void>;
42
+ /**
43
+ * Completes the validation of the Shopper by evaluating the supplied OTP.
44
+ */
45
+ finishIdentityValidation(otpCode: string): Promise<void>;
46
+ /**
47
+ * This method performs checkout using the selected card
48
+ */
49
+ checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload>;
50
+ /**
51
+ * Call the 'unbindAppInstance()' method of each SRC SDK in order to remove the shopper cookies.
52
+ * Besides, it deletes all information stored about the shopper.
53
+ */
54
+ logout(): Promise<void>;
55
+ /**
56
+ * Call the 'identityLookup()' method of each SRC SDK in order to verify if the shopper has an account.
57
+ *
58
+ * Based on the responses from the Click to Pay Systems, we should do the validation process using the SDK that
59
+ * that responds faster with 'consumerPresent=true'
60
+ */
61
+ verifyIfShopperIsEnrolled(value: string, type?: 'email' | 'mobilePhone'): Promise<{
62
+ isEnrolled: boolean;
63
+ }>;
64
+ private setState;
65
+ private setSdkForPerformingShopperIdentityValidation;
66
+ /**
67
+ * Based on the given idToken, this method goes through each SRCi SDK and fetches the shopper
68
+ * profile with his cards
69
+ */
70
+ private getShopperProfile;
71
+ /**
72
+ * Calls the 'isRecognized()' method of each SRC SDK in order to verify if the shopper is
73
+ * recognized on the device. The shopper is recognized if he/she has the Cookies stored
74
+ * on their browser
75
+ */
76
+ private verifyIfShopperIsRecognized;
77
+ private initiateSdks;
78
+ }
79
+ export default ClickToPayService;
@@ -0,0 +1,75 @@
1
+ import { IdentityLookupParams } from '../types';
2
+ import { SrcCheckoutParams, SrciCheckoutResponse, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrciInitiateIdentityValidationResponse, SrciIsRecognizedResponse, SrcInitParams, SrcProfile } from './types';
3
+ import { ClickToPayScheme } from '../../../../types';
4
+ export interface ISrcInitiator {
5
+ schemeName: ClickToPayScheme;
6
+ loadSdkScript(): Promise<void>;
7
+ removeSdkScript(): void;
8
+ init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
9
+ isRecognized(): Promise<SrciIsRecognizedResponse>;
10
+ identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
+ initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse>;
12
+ completeIdentityValidation(validationData: string): Promise<SrciCompleteIdentityValidationResponse>;
13
+ getSrcProfile(idTokens: string[]): Promise<SrcProfile>;
14
+ checkout(params: SrcCheckoutParams): Promise<SrciCheckoutResponse>;
15
+ unbindAppInstance(): Promise<void>;
16
+ }
17
+ export default abstract class AbstractSrcInitiator implements ISrcInitiator {
18
+ schemeSdk: any;
19
+ abstract readonly schemeName: ClickToPayScheme;
20
+ protected readonly dpaLocale: string;
21
+ private readonly sdkUrl;
22
+ private scriptElement;
23
+ protected constructor(sdkUrl: string, dpaLocale: string);
24
+ loadSdkScript(): Promise<void>;
25
+ removeSdkScript(): void;
26
+ /**
27
+ * Verifies if SDK is already loaded on the window object.
28
+ * Example: Merchant can preload the SDK to speed up the loading time
29
+ */
30
+ protected abstract isSdkIsAvailableOnWindow(): boolean;
31
+ /**
32
+ * Assign SchemeSDK object to 'schemeSdk' property.
33
+ * Each scheme creates its own object reference on 'window' using different naming,
34
+ * therefore this method should be implemented by the subclass to assign the property
35
+ * accordingly
36
+ */
37
+ protected abstract assignSdkReference(): void;
38
+ /**
39
+ * Initializes the app with common state. The init method must be called before any other methods.
40
+ */
41
+ abstract init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
42
+ /**
43
+ * This method performs checkout using the specified card. If successful, the
44
+ * response contains summary checkout information.
45
+ */
46
+ checkout(params: SrcCheckoutParams): Promise<SrciCheckoutResponse>;
47
+ /**
48
+ * This method disassociates the Consumer application / Consumer Device from the Consumer’s SRC Profile.
49
+ */
50
+ unbindAppInstance(): Promise<void>;
51
+ /**
52
+ * Determines whether the consumer is recognized, e.g. by detecting the presence of a local cookie in
53
+ * the browser environment.
54
+ */
55
+ isRecognized(): Promise<SrciIsRecognizedResponse>;
56
+ /**
57
+ * Sends a validation code to the specified consumer.
58
+ * This method sends a one-time password (OTP) to the consumer to start validation
59
+ */
60
+ initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse>;
61
+ /**
62
+ * Obtains the masked card and other account profile data associated with the userId.
63
+ */
64
+ getSrcProfile(idTokens: string[]): Promise<any>;
65
+ /**
66
+ * Obtains the user account associated with the consumer’s identity (an email address or phone
67
+ * number).
68
+ */
69
+ abstract identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
70
+ /**
71
+ * This method completes the identity validation by receiving the one-time password (OTP) sent to the
72
+ * consumer to start validation.
73
+ */
74
+ abstract completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
75
+ }
@@ -0,0 +1,13 @@
1
+ import { IdentityLookupParams } from '../types';
2
+ import AbstractSrcInitiator from './AbstractSrcInitiator';
3
+ import { SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
+ declare class MastercardSdk extends AbstractSrcInitiator {
5
+ readonly schemeName = "mc";
6
+ constructor(environment: string, locale: string);
7
+ protected isSdkIsAvailableOnWindow(): boolean;
8
+ protected assignSdkReference(): void;
9
+ init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
10
+ identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
+ completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
12
+ }
13
+ export default MastercardSdk;
@@ -0,0 +1,12 @@
1
+ import { ISrcInitiator } from './AbstractSrcInitiator';
2
+ export interface ISrcSdkLoader {
3
+ load(environment: string): Promise<ISrcInitiator[]>;
4
+ schemes: string[];
5
+ }
6
+ declare class SrcSdkLoader implements ISrcSdkLoader {
7
+ readonly schemes: string[];
8
+ private readonly locale;
9
+ constructor(schemes: string[], locale?: string);
10
+ load(environment: string): Promise<ISrcInitiator[]>;
11
+ }
12
+ export default SrcSdkLoader;
@@ -0,0 +1,16 @@
1
+ declare type MastercardError = {
2
+ message: string;
3
+ reason: string;
4
+ };
5
+ declare type VisaError = {
6
+ error: {
7
+ message: string;
8
+ reason: string;
9
+ };
10
+ };
11
+ declare class SrciError extends Error {
12
+ reason: string;
13
+ message: string;
14
+ constructor(schemeError: VisaError | MastercardError);
15
+ }
16
+ export default SrciError;
@@ -0,0 +1,13 @@
1
+ import { IdentityLookupParams } from '../types';
2
+ import AbstractSrcInitiator from './AbstractSrcInitiator';
3
+ import { SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
+ declare class VisaSdk extends AbstractSrcInitiator {
5
+ readonly schemeName = "visa";
6
+ constructor(environment: string, locale: string);
7
+ protected isSdkIsAvailableOnWindow(): boolean;
8
+ protected assignSdkReference(): void;
9
+ init(params: SrcInitParams, srciTransactionId: string): Promise<void>;
10
+ identityLookup(params: IdentityLookupParams): Promise<SrciIdentityLookupResponse>;
11
+ completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;
12
+ }
13
+ export default VisaSdk;
@@ -0,0 +1,28 @@
1
+ declare const VISA_SDK_TEST = "https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
2
+ declare const VISA_SDK_PROD = "https://assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
3
+ declare const MC_SDK_TEST = "https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js";
4
+ declare const MC_SDK_PROD = "https://src.mastercard.com/sdk/srcsdk.mastercard.js";
5
+ declare const getVisaSetttings: ({ dpaLocale }: {
6
+ dpaLocale?: string;
7
+ }) => {
8
+ dpaTransactionOptions: {
9
+ dpaLocale: string;
10
+ payloadTypeIndicator: string;
11
+ };
12
+ };
13
+ declare const getMastercardSettings: ({ dpaLocale }: {
14
+ dpaLocale?: string;
15
+ }) => {
16
+ dpaTransactionOptions: {
17
+ dpaLocale: string;
18
+ paymentOptions: {
19
+ dynamicDataType: string;
20
+ };
21
+ consumerNameRequested: boolean;
22
+ customInputData: {
23
+ 'com.mastercard.dcfExperience': string;
24
+ };
25
+ confirmPayment: boolean;
26
+ };
27
+ };
28
+ export { VISA_SDK_TEST, VISA_SDK_PROD, MC_SDK_TEST, MC_SDK_PROD, getVisaSetttings, getMastercardSettings };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Types used to define the interface with the SRCi SDK
3
+ */
4
+ export declare type SrciInitiateIdentityValidationResponse = {
5
+ maskedValidationChannel: string;
6
+ };
7
+ export declare type SrciCompleteIdentityValidationResponse = {
8
+ idToken: string;
9
+ };
10
+ export declare type SrciIsRecognizedResponse = {
11
+ recognized: boolean;
12
+ idTokens?: string[];
13
+ };
14
+ export declare type SrciCheckoutResponse = {
15
+ dcfActionCode: string;
16
+ encryptedPayload?: string;
17
+ idToken?: string;
18
+ };
19
+ export declare type SrciIdentityLookupResponse = {
20
+ consumerPresent: boolean;
21
+ };
22
+ export declare type SrcProfile = {
23
+ profiles: Array<{
24
+ maskedCards: SrcCard[];
25
+ }>;
26
+ srcCorrelationId: string;
27
+ };
28
+ export declare type SrcCard = {
29
+ srcDigitalCardId: string;
30
+ panLastFour: string;
31
+ dateOfCardLastUsed: string;
32
+ paymentCardDescriptor: string;
33
+ digitalCardData: {
34
+ descriptorName: string;
35
+ artUri: string;
36
+ };
37
+ tokenId?: string;
38
+ };
39
+ export declare type SrcCheckoutParams = {
40
+ srcCorrelationId: string;
41
+ srcDigitalCardId: string;
42
+ };
43
+ export interface SrcInitParams {
44
+ srcInitiatorId: string;
45
+ srciDpaId: string;
46
+ }
@@ -0,0 +1,5 @@
1
+ declare const SchemeNames: {
2
+ mc: string;
3
+ visa: string;
4
+ };
5
+ export { SchemeNames };
@@ -0,0 +1,39 @@
1
+ import { CtpState } from './ClickToPayService';
2
+ import { SrcProfile } from './sdks/types';
3
+ import { ClickToPayScheme } from '../../../types';
4
+ import ShopperCard from '../models/ShopperCard';
5
+ export interface IClickToPayService {
6
+ state: CtpState;
7
+ shopperCards: ShopperCard[];
8
+ shopperValidationContact: string;
9
+ schemes: string[];
10
+ initialize(): Promise<void>;
11
+ checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload>;
12
+ logout(): Promise<void>;
13
+ verifyIfShopperIsEnrolled(value: string, type?: string): Promise<{
14
+ isEnrolled: boolean;
15
+ }>;
16
+ subscribeOnStateChange(callback: CallbackStateSubscriber): void;
17
+ startIdentityValidation(): Promise<void>;
18
+ finishIdentityValidation(otpCode: string): Promise<void>;
19
+ }
20
+ export declare type CallbackStateSubscriber = (state: CtpState) => void;
21
+ export interface IdentityLookupParams {
22
+ value: string;
23
+ type?: 'email' | 'mobilePhone';
24
+ }
25
+ declare type MastercardCheckout = {
26
+ srcDigitalCardId: string;
27
+ srcCorrelationId: string;
28
+ srcScheme: string;
29
+ };
30
+ declare type VisaCheckout = {
31
+ srcCheckoutPayload?: string;
32
+ srcTokenReference?: string;
33
+ srcScheme: string;
34
+ };
35
+ export interface SrcProfileWithScheme extends SrcProfile {
36
+ scheme: ClickToPayScheme;
37
+ }
38
+ export declare type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
39
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ClickToPayCheckoutPayload, SrcProfileWithScheme } from './types';
2
+ import { SrciCheckoutResponse } from './sdks/types';
3
+ import ShopperCard from '../models/ShopperCard';
4
+ declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard, checkoutResponse: SrciCheckoutResponse, environment: string): ClickToPayCheckoutPayload;
5
+ declare function createShopperCardsList(srcProfiles: SrcProfileWithScheme[]): ShopperCard[];
6
+ export { createShopperCardsList, createCheckoutPayloadBasedOnScheme };
@@ -0,0 +1,7 @@
1
+ import { IClickToPayService } from './services/types';
2
+ import { CardConfiguration, ClickToPayConfiguration } from '../../types';
3
+ /**
4
+ * Creates the Click to Pay service in case the required configuration is provided
5
+ */
6
+ declare function createClickToPayService(configuration: CardConfiguration, clickToPayConfiguration: ClickToPayConfiguration | undefined, environment: string): IClickToPayService | null;
7
+ export { createClickToPayService };
@@ -12,6 +12,15 @@ export interface CardElementProps extends UIElementProps {
12
12
  * Configuration specific to brands
13
13
  */
14
14
  brandsConfiguration?: CardBrandsConfiguration;
15
+ /**
16
+ * Flag indicating if merchant really intent to use Click to Pay
17
+ * Will be removed when we Click to Pay goes live
18
+ */
19
+ useClickToPay: boolean;
20
+ /**
21
+ * Configuration for Click to Pay
22
+ */
23
+ clickToPayConfiguration?: ClickToPayConfiguration;
15
24
  /**
16
25
  * type will always be "card" (generic card, stored card)
17
26
  * except for a single branded card when it will be the same as the brand prop
@@ -80,9 +89,26 @@ export interface CardElementProps extends UIElementProps {
80
89
  onBinLookup?: (event: CbObjOnBinLookup) => void;
81
90
  [key: string]: any;
82
91
  }
92
+ export declare type ClickToPayScheme = 'mc' | 'visa';
93
+ export declare type ClickToPayConfiguration = {
94
+ shopperIdentityValue: string;
95
+ shopperIdentityType?: 'email' | 'mobilePhone';
96
+ /**
97
+ * Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
98
+ * defined during the creation of the Checkout.
99
+ * Format: ISO language_country pair (e.g., en_US )
100
+ *
101
+ * @default en_US
102
+ */
103
+ locale?: string;
104
+ };
83
105
  export declare type SocialSecurityMode = 'show' | 'hide' | 'auto';
84
106
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
85
107
  export interface CardConfiguration {
108
+ visaSrciDpaId?: string;
109
+ visaSrcInitiatorId?: string;
110
+ mcSrcClientId?: string;
111
+ mcDpaId?: string;
86
112
  merchantIdentifier?: string;
87
113
  merchantOrigin?: string;
88
114
  gatewayMerchantId?: string;
@@ -35,6 +35,7 @@ export declare class DragonpayElement extends UIElement<DragonpayElementProps> {
35
35
  name?: string;
36
36
  icon?: string;
37
37
  amount?: import("../../types").PaymentAmount;
38
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
38
39
  showPayButton?: boolean;
39
40
  setStatusAutomatically?: boolean;
40
41
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -60,6 +60,7 @@ declare class DropinElement extends UIElement<DropinElementProps> {
60
60
  name?: string;
61
61
  icon?: string;
62
62
  amount?: import("../../types").PaymentAmount;
63
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
63
64
  showPayButton?: boolean;
64
65
  setStatusAutomatically?: boolean;
65
66
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -24,6 +24,7 @@ export declare class GiftcardElement extends UIElement {
24
24
  private handleBalanceCheck;
25
25
  private onOrderRequest;
26
26
  protected handleOrder: (order: Order) => any;
27
+ balanceCheck(): false | void;
27
28
  onBalanceCheck: () => false | void;
28
29
  payButton: (props: any) => h.JSX.Element;
29
30
  render(): h.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import IssuerListContainer from '../helpers/IssuerListContainer';
2
+ declare class OnlineBankingCZElement extends IssuerListContainer {
3
+ static type: string;
4
+ formatProps(props: any): any;
5
+ get icon(): string;
6
+ }
7
+ export default OnlineBankingCZElement;
@@ -0,0 +1,7 @@
1
+ import IssuerListContainer from '../helpers/IssuerListContainer';
2
+ declare class OnlineBankingSKElement extends IssuerListContainer {
3
+ static type: string;
4
+ formatProps(props: any): any;
5
+ get icon(): string;
6
+ }
7
+ export default OnlineBankingSKElement;
@@ -37,6 +37,7 @@ declare class PixElement extends QRLoaderContainer<PixProps> {
37
37
  name?: string;
38
38
  icon?: string;
39
39
  amount?: import("../../types").PaymentAmount;
40
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
40
41
  showPayButton?: boolean;
41
42
  setStatusAutomatically?: boolean;
42
43
  payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element;
@@ -25,6 +25,7 @@ declare class SwishElement extends QRLoaderContainer {
25
25
  name?: string;
26
26
  icon?: string;
27
27
  amount?: import("../../types").PaymentAmount;
28
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
28
29
  showPayButton?: boolean;
29
30
  setStatusAutomatically?: boolean;
30
31
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -18,6 +18,7 @@ export declare class UIElement<P extends UIElementProps = any> extends BaseEleme
18
18
  */
19
19
  submit(): void;
20
20
  showValidation(): this;
21
+ setElementStatus(status: UIElementStatus, props?: any): this;
21
22
  setStatus(status: UIElementStatus, props?: any): this;
22
23
  private submitPayment;
23
24
  private submitAdditionalDetails;
@@ -25,6 +25,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
25
25
  name?: string;
26
26
  icon?: string;
27
27
  amount?: import("../../types").PaymentAmount;
28
+ secondaryAmount?: import("../../types").PaymentAmountExtended;
28
29
  showPayButton?: boolean;
29
30
  setStatusAutomatically?: boolean;
30
31
  payButton?: (options: import("../types").PayButtonFunctionProps) => import("preact").JSX.Element;
@@ -51,6 +51,8 @@ import OnlineBankingINElement from './OnlineBankingIN';
51
51
  import RatePayDirectDebit from './RatePay/RatePayDirectDebit';
52
52
  import UPI from './UPI';
53
53
  import WalletINElement from './WalletIN';
54
+ import OnlineBankingCZElement from './OnlineBankingCZ';
55
+ import OnlineBankingSKElement from './OnlineBankingSK';
54
56
  /**
55
57
  * Maps each component with a Component element.
56
58
  */
@@ -99,6 +101,7 @@ declare const componentsMap: {
99
101
  doku_wallet: typeof Doku;
100
102
  donation: typeof Donation;
101
103
  dotpay: typeof Dotpay;
104
+ onlineBanking: typeof Dotpay;
102
105
  dragonpay_ebanking: typeof Dragonpay;
103
106
  dragonpay_otc_banking: typeof Dragonpay;
104
107
  dragonpay_otc_non_banking: typeof Dragonpay;
@@ -162,6 +165,8 @@ declare const componentsMap: {
162
165
  mealVoucher_FR_natixis: typeof MealVoucherFR;
163
166
  mealVoucher_FR_sodexo: typeof MealVoucherFR;
164
167
  mealVoucher_FR_groupeup: typeof MealVoucherFR;
168
+ onlineBanking_CZ: typeof OnlineBankingCZElement;
169
+ onlineBanking_SK: typeof OnlineBankingSKElement;
165
170
  default: any;
166
171
  };
167
172
  /**
@@ -1,12 +1,14 @@
1
+ export declare type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'action';
1
2
  export interface ButtonProps {
2
3
  status?: string;
3
4
  /**
4
5
  * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`
5
6
  */
6
7
  classNameModifiers?: string[];
7
- variant: 'primary' | 'secondary' | 'ghost' | 'action';
8
+ variant?: ButtonVariant;
8
9
  disabled?: boolean;
9
10
  label?: string;
11
+ secondaryLabel?: string;
10
12
  icon?: string;
11
13
  inline?: boolean;
12
14
  href?: string;
@@ -2,6 +2,7 @@ import { h } from 'preact';
2
2
  import './ContentSeparator.scss';
3
3
  interface ContentSeparatorProps {
4
4
  label?: string;
5
+ classNames?: string[];
5
6
  }
6
- declare function ContentSeparator({ label }: ContentSeparatorProps): h.JSX.Element;
7
+ declare function ContentSeparator({ label, classNames }: ContentSeparatorProps): h.JSX.Element;
7
8
  export default ContentSeparator;
@@ -1,4 +1,4 @@
1
- import { Component, ComponentChildren } from 'preact';
1
+ import { h, Component, ComponentChildren } from 'preact';
2
2
  export interface FieldProps {
3
3
  className?: string;
4
4
  classNameModifiers?: string[];
@@ -12,6 +12,7 @@ export interface FieldProps {
12
12
  isLoading?: boolean;
13
13
  isValid?: boolean;
14
14
  label?: string | Component;
15
+ labelEndAdornment?: string | h.JSX.Element;
15
16
  onBlur?: any;
16
17
  onFocus?: any;
17
18
  onFocusField?: any;
@@ -1,7 +1,7 @@
1
1
  import { h } from 'preact';
2
2
  import { SelectProps } from './types';
3
3
  import './Select.scss';
4
- declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId, isCollatingErrors }: SelectProps): h.JSX.Element;
4
+ declare function Select({ items, className, classNameModifiers, filterable, readonly, onChange, selected, name, isInvalid, isValid, placeholder, uniqueId, isCollatingErrors, isIconOnLeftSide }: SelectProps): h.JSX.Element;
5
5
  declare namespace Select {
6
6
  var defaultProps: {
7
7
  className: string;
@@ -1,4 +1,4 @@
1
1
  import { h } from 'preact';
2
2
  import { SelectItemProps } from '../types';
3
- declare const SelectListItem: ({ item, selected, ...props }: SelectItemProps) => h.JSX.Element;
3
+ declare const SelectListItem: ({ item, selected, isIconOnLeftSide, ...props }: SelectItemProps) => h.JSX.Element;
4
4
  export default SelectListItem;
@@ -19,6 +19,7 @@ export interface SelectProps {
19
19
  selected: string;
20
20
  uniqueId?: string;
21
21
  isCollatingErrors: boolean;
22
+ isIconOnLeftSide?: boolean;
22
23
  }
23
24
  export interface SelectButtonProps {
24
25
  active: SelectItem;
@@ -36,6 +37,7 @@ export interface SelectButtonProps {
36
37
  toggleList: (e: Event) => void;
37
38
  id?: string;
38
39
  ariaDescribedBy: string;
40
+ isIconOnLeftSide: boolean;
39
41
  }
40
42
  export interface SelectListProps {
41
43
  active: SelectItem;
@@ -46,10 +48,12 @@ export interface SelectListProps {
46
48
  selectListRef: any;
47
49
  showList: boolean;
48
50
  textFilter: string;
51
+ isIconOnLeftSide: boolean;
49
52
  }
50
53
  export interface SelectItemProps {
51
54
  item: SelectItem;
52
55
  selected: boolean;
56
+ isIconOnLeftSide: boolean;
53
57
  onKeyDown: (e: KeyboardEvent) => void;
54
58
  onSelect: (e: Event) => void;
55
59
  }
@@ -3,6 +3,8 @@ interface IconProps {
3
3
  type: string;
4
4
  className?: string;
5
5
  alt?: string;
6
+ height?: number;
7
+ width?: number;
6
8
  }
7
- declare const Icon: ({ type, className, alt }: IconProps) => h.JSX.Element;
9
+ declare const Icon: ({ type, className, alt, height, width }: IconProps) => h.JSX.Element;
8
10
  export default Icon;
@@ -8,6 +8,7 @@ export interface IssuerListProps {
8
8
  highlightedIds?: string[];
9
9
  placeholder?: string;
10
10
  issuer?: string;
11
+ termsAndConditionsUrl?: string;
11
12
  }
12
13
  export interface IssuerItem {
13
14
  id: string;
@@ -1,19 +1,20 @@
1
1
  import { h } from 'preact';
2
- import { PaymentAmount } from '../../../types';
3
- import Language from '../../../language/Language';
4
- export interface PayButtonProps {
2
+ import { ButtonProps } from '../Button/types';
3
+ import { payAmountLabel } from './utils';
4
+ import { PaymentAmountExtended } from '../../../types';
5
+ export interface PayButtonProps extends ButtonProps {
5
6
  /**
6
7
  * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`
7
8
  */
8
9
  classNameModifiers?: string[];
9
10
  label?: string;
10
- amount: PaymentAmount;
11
+ amount: PaymentAmountExtended;
12
+ secondaryAmount?: PaymentAmountExtended;
11
13
  status?: string;
12
14
  disabled?: boolean;
13
15
  icon?: string;
14
16
  onClick?(): void;
15
17
  }
16
- declare const payAmountLabel: (i18n: Language, amount: any) => string;
17
- declare const PayButton: ({ amount, classNameModifiers, label, ...props }: PayButtonProps) => h.JSX.Element;
18
+ declare const PayButton: ({ amount, secondaryAmount, classNameModifiers, label, ...props }: PayButtonProps) => h.JSX.Element;
18
19
  export default PayButton;
19
20
  export { payAmountLabel };
@@ -0,0 +1,6 @@
1
+ import { h } from 'preact';
2
+ import './SecondaryButtonLabel.scss';
3
+ declare const SecondaryButtonLabel: ({ label }: {
4
+ label: any;
5
+ }) => h.JSX.Element;
6
+ export default SecondaryButtonLabel;