@adyen/adyen-web 5.22.0 → 5.24.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 (94) hide show
  1. package/dist/adyen.css +29 -20
  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 +29 -20
  6. package/dist/cjs/adyen.css.map +1 -1
  7. package/dist/cjs/index.js +1 -1
  8. package/dist/es/adyen.css +29 -20
  9. package/dist/es/adyen.css.map +1 -1
  10. package/dist/es/index.js +1 -1
  11. package/dist/es.modern/adyen.css +29 -20
  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 +41 -3
  15. package/dist/types/components/Ach/components/AchInput/types.d.ts +8 -4
  16. package/dist/types/components/Ach/types.d.ts +7 -0
  17. package/dist/types/components/BcmcMobile/BcmcMobile.d.ts +1 -0
  18. package/dist/types/components/Card/Bancontact.d.ts +13 -0
  19. package/dist/types/components/Card/Card.d.ts +29 -1
  20. package/dist/types/components/Card/ClickToPayHolder.d.ts +6 -0
  21. package/dist/types/components/Card/ClickToPayWrapper.d.ts +4 -0
  22. package/dist/types/components/Card/components/CardInput/defaultProps.d.ts +1 -0
  23. package/dist/types/components/Card/components/CardInput/types.d.ts +1 -0
  24. package/dist/types/components/Card/components/ClickToPay/ClickToPayComponent.d.ts +6 -0
  25. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCards.d.ts +7 -0
  26. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.d.ts +8 -0
  27. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPCardsList/index.d.ts +1 -0
  28. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/CtPEmptyCardsList.d.ts +6 -0
  29. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPEmptyCardsList/index.d.ts +1 -0
  30. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.d.ts +8 -0
  31. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/CtPSingleCard/index.d.ts +1 -0
  32. package/dist/types/components/Card/components/ClickToPay/components/CtPCards/index.d.ts +1 -0
  33. package/dist/types/components/Card/components/ClickToPay/components/CtPLoader/CtPLoader.d.ts +4 -0
  34. package/dist/types/components/Card/components/ClickToPay/components/CtPLoader/index.d.ts +1 -0
  35. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLogin.d.ts +4 -0
  36. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/CtPLoginInput.d.ts +18 -0
  37. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/index.d.ts +1 -0
  38. package/dist/types/components/Card/components/ClickToPay/components/CtPLogin/validate.d.ts +2 -0
  39. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.d.ts +4 -0
  40. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.d.ts +20 -0
  41. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.d.ts +7 -0
  42. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/index.d.ts +1 -0
  43. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.d.ts +2 -0
  44. package/dist/types/components/Card/components/ClickToPay/components/CtPOneTimePassword/index.d.ts +1 -0
  45. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/CtPLogoutLink.d.ts +4 -0
  46. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/CtPSection.d.ts +7 -0
  47. package/dist/types/components/Card/components/ClickToPay/components/CtPSection/index.d.ts +1 -0
  48. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayContext.d.ts +22 -0
  49. package/dist/types/components/Card/components/ClickToPay/context/ClickToPayProvider.d.ts +16 -0
  50. package/dist/types/components/Card/components/ClickToPay/context/useClickToPayContext.d.ts +3 -0
  51. package/dist/types/components/Card/components/ClickToPay/index.d.ts +1 -0
  52. package/dist/types/components/Card/components/ClickToPay/models/ShopperCard.d.ts +15 -0
  53. package/dist/types/components/Card/components/ClickToPay/services/ClickToPayService.d.ts +79 -0
  54. package/dist/types/components/Card/components/ClickToPay/services/sdks/AbstractSrcInitiator.d.ts +75 -0
  55. package/dist/types/components/Card/components/ClickToPay/services/sdks/MastercardSdk.d.ts +13 -0
  56. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrcSdkLoader.d.ts +15 -0
  57. package/dist/types/components/Card/components/ClickToPay/services/sdks/SrciError.d.ts +16 -0
  58. package/dist/types/components/Card/components/ClickToPay/services/sdks/VisaSdk.d.ts +13 -0
  59. package/dist/types/components/Card/components/ClickToPay/services/sdks/config.d.ts +31 -0
  60. package/dist/types/components/Card/components/ClickToPay/services/sdks/types.d.ts +53 -0
  61. package/dist/types/components/Card/components/ClickToPay/services/sdks/utils.d.ts +5 -0
  62. package/dist/types/components/Card/components/ClickToPay/services/types.d.ts +40 -0
  63. package/dist/types/components/Card/components/ClickToPay/services/utils.d.ts +9 -0
  64. package/dist/types/components/Card/components/ClickToPay/utils.d.ts +7 -0
  65. package/dist/types/components/Card/types.d.ts +30 -0
  66. package/dist/types/components/Dragonpay/Dragonpay.d.ts +1 -0
  67. package/dist/types/components/Dropin/Dropin.d.ts +1 -0
  68. package/dist/types/components/Pix/Pix.d.ts +1 -0
  69. package/dist/types/components/Swish/Swish.d.ts +1 -0
  70. package/dist/types/components/UIElement.d.ts +1 -0
  71. package/dist/types/components/WeChat/WeChat.d.ts +1 -0
  72. package/dist/types/components/index.d.ts +1 -0
  73. package/dist/types/components/internal/Button/types.d.ts +3 -1
  74. package/dist/types/components/internal/ContentSeparator/ContentSeparator.d.ts +2 -1
  75. package/dist/types/components/internal/FormFields/Field/types.d.ts +2 -1
  76. package/dist/types/components/internal/FormFields/Select/Select.d.ts +1 -1
  77. package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts +1 -1
  78. package/dist/types/components/internal/FormFields/Select/types.d.ts +4 -0
  79. package/dist/types/components/internal/Icon/Icon.d.ts +3 -1
  80. package/dist/types/components/internal/PayButton/PayButton.d.ts +7 -6
  81. package/dist/types/components/internal/PayButton/components/SecondaryButtonLabel.d.ts +6 -0
  82. package/dist/types/components/internal/PayButton/utils.d.ts +7 -0
  83. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProvider.d.ts +4 -2
  84. package/dist/types/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.d.ts +2 -2
  85. package/dist/types/components/internal/SecuredFields/lib/configuration/constants.d.ts +1 -1
  86. package/dist/types/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.d.ts +3 -1
  87. package/dist/types/components/types.d.ts +3 -1
  88. package/dist/types/components/utils.d.ts +2 -2
  89. package/dist/types/core/types.d.ts +6 -2
  90. package/dist/types/index.d.ts +1 -1
  91. package/dist/types/language/config.d.ts +33 -0
  92. package/dist/types/language/locales/index.d.ts +66 -0
  93. package/dist/types/types/index.d.ts +8 -0
  94. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ import { IdentityLookupParams } from '../types';
2
+ import { CustomSdkConfiguration, 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 customSdkConfiguration: CustomSdkConfiguration;
21
+ private readonly sdkUrl;
22
+ private scriptElement;
23
+ protected constructor(sdkUrl: string, customSdkConfiguration: CustomSdkConfiguration);
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 { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
+ declare class MastercardSdk extends AbstractSrcInitiator {
5
+ readonly schemeName = "mc";
6
+ constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
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,15 @@
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 customSdkConfiguration;
9
+ constructor(schemes: string[], { dpaLocale, dpaPresentationName }: {
10
+ dpaLocale?: string;
11
+ dpaPresentationName?: string;
12
+ });
13
+ load(environment: string): Promise<ISrcInitiator[]>;
14
+ }
15
+ 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 { CustomSdkConfiguration, SrciCompleteIdentityValidationResponse, SrciIdentityLookupResponse, SrcInitParams } from './types';
4
+ declare class VisaSdk extends AbstractSrcInitiator {
5
+ readonly schemeName = "visa";
6
+ constructor(environment: string, customSdkConfig: CustomSdkConfiguration);
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,31 @@
1
+ import { CustomSdkConfiguration } from './types';
2
+ declare const VISA_SDK_TEST = "https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
3
+ declare const VISA_SDK_PROD = "https://assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visaSdk.js";
4
+ declare const MC_SDK_TEST = "https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js";
5
+ declare const MC_SDK_PROD = "https://src.mastercard.com/sdk/srcsdk.mastercard.js";
6
+ declare const getVisaSetttings: ({ dpaLocale, dpaPresentationName }: CustomSdkConfiguration) => {
7
+ dpaTransactionOptions: {
8
+ dpaLocale: string;
9
+ payloadTypeIndicator: string;
10
+ };
11
+ dpaData: {
12
+ dpaPresentationName: string;
13
+ };
14
+ };
15
+ declare const getMastercardSettings: ({ dpaLocale, dpaPresentationName }: CustomSdkConfiguration) => {
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
+ dpaData: {
28
+ dpaPresentationName: string;
29
+ };
30
+ };
31
+ export { VISA_SDK_TEST, VISA_SDK_PROD, MC_SDK_TEST, MC_SDK_PROD, getVisaSetttings, getMastercardSettings };
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Type that represent the object which contains the customizable properties of the SDK initialization
3
+ */
4
+ export declare type CustomSdkConfiguration = {
5
+ dpaLocale: string;
6
+ dpaPresentationName: string;
7
+ };
8
+ /**
9
+ * Types used to define the interface with the SRCi SDK
10
+ */
11
+ export declare type SrciInitiateIdentityValidationResponse = {
12
+ maskedValidationChannel: string;
13
+ };
14
+ export declare type SrciCompleteIdentityValidationResponse = {
15
+ idToken: string;
16
+ };
17
+ export declare type SrciIsRecognizedResponse = {
18
+ recognized: boolean;
19
+ idTokens?: string[];
20
+ };
21
+ export declare type SrciCheckoutResponse = {
22
+ dcfActionCode: string;
23
+ encryptedPayload?: string;
24
+ idToken?: string;
25
+ };
26
+ export declare type SrciIdentityLookupResponse = {
27
+ consumerPresent: boolean;
28
+ };
29
+ export declare type SrcProfile = {
30
+ profiles: Array<{
31
+ maskedCards: SrcCard[];
32
+ }>;
33
+ srcCorrelationId: string;
34
+ };
35
+ export declare type SrcCard = {
36
+ srcDigitalCardId: string;
37
+ panLastFour: string;
38
+ dateOfCardLastUsed: string;
39
+ paymentCardDescriptor: string;
40
+ digitalCardData: {
41
+ descriptorName: string;
42
+ artUri: string;
43
+ };
44
+ tokenId?: string;
45
+ };
46
+ export declare type SrcCheckoutParams = {
47
+ srcCorrelationId: string;
48
+ srcDigitalCardId: string;
49
+ };
50
+ export interface SrcInitParams {
51
+ srcInitiatorId: string;
52
+ srciDpaId: string;
53
+ }
@@ -0,0 +1,5 @@
1
+ declare const SchemeNames: {
2
+ mc: string;
3
+ visa: string;
4
+ };
5
+ export { SchemeNames };
@@ -0,0 +1,40 @@
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
+ srcCorrelationId: string;
34
+ srcScheme: string;
35
+ };
36
+ export interface SrcProfileWithScheme extends SrcProfile {
37
+ scheme: ClickToPayScheme;
38
+ }
39
+ export declare type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
40
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ClickToPayCheckoutPayload, SrcProfileWithScheme } from './types';
2
+ import { SrciCheckoutResponse } from './sdks/types';
3
+ import ShopperCard from '../models/ShopperCard';
4
+ /**
5
+ * Creates the payload for the /payments call
6
+ */
7
+ declare function createCheckoutPayloadBasedOnScheme(card: ShopperCard, checkoutResponse: SrciCheckoutResponse, environment: string): ClickToPayCheckoutPayload;
8
+ declare function createShopperCardsList(srcProfiles: SrcProfileWithScheme[]): ShopperCard[];
9
+ 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,30 @@ 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 display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
98
+ */
99
+ merchantDisplayName: string;
100
+ /**
101
+ * Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
102
+ * defined during the creation of the Checkout.
103
+ * Format: ISO language_country pair (e.g., en_US )
104
+ *
105
+ * @default en_US
106
+ */
107
+ locale?: string;
108
+ };
83
109
  export declare type SocialSecurityMode = 'show' | 'hide' | 'auto';
84
110
  /** If the merchant wishes to set any of these properties in their local config they should do so via a "configuration" object */
85
111
  export interface CardConfiguration {
112
+ visaSrciDpaId?: string;
113
+ visaSrcInitiatorId?: string;
114
+ mcSrcClientId?: string;
115
+ mcDpaId?: string;
86
116
  merchantIdentifier?: string;
87
117
  merchantOrigin?: string;
88
118
  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;
@@ -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;
@@ -101,6 +101,7 @@ declare const componentsMap: {
101
101
  doku_wallet: typeof Doku;
102
102
  donation: typeof Donation;
103
103
  dotpay: typeof Dotpay;
104
+ onlineBanking: typeof Dotpay;
104
105
  dragonpay_ebanking: typeof Dragonpay;
105
106
  dragonpay_otc_banking: typeof Dragonpay;
106
107
  dragonpay_otc_non_banking: typeof Dragonpay;
@@ -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;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import Language from '../../../language';
2
+ import { PaymentAmountExtended } from '../../../types';
3
+ export declare const PAY_BTN_DIVIDER = "/ ";
4
+ declare const amountLabel: (i18n: any, amount: PaymentAmountExtended) => any;
5
+ declare const payAmountLabel: (i18n: Language, amount: PaymentAmountExtended) => string;
6
+ declare const secondaryAmountLabel: (i18n: Language, secondaryAmount: PaymentAmountExtended) => string;
7
+ export { payAmountLabel, amountLabel, secondaryAmountLabel };
@@ -7,8 +7,10 @@ import { BinLookupResponse } from '../../../Card/types';
7
7
  * Initialises & handles the client-side part of SecuredFields
8
8
  */
9
9
  declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
10
- private invalidOriginErrorTimeout;
11
- private invalidOriginTimeoutMS;
10
+ private csfLoadFailTimeout;
11
+ private csfLoadFailTimeoutMS;
12
+ private csfConfigFailTimeout;
13
+ private csfConfigFailTimeoutMS;
12
14
  private numCharsInField;
13
15
  private rootNode;
14
16
  private numDateFields;
@@ -1,7 +1,7 @@
1
1
  import { CbObjOnError, CbObjOnFocus, CbObjOnBrand, CbObjOnAllValid, CbObjOnFieldValid, CbObjOnAutoComplete, CbObjOnConfigSuccess, CbObjOnLoad } from '../lib/types';
2
2
  /**
3
- * Emits the onLoad event
4
- * Here we can assume CSF is loaded and ready to be used
3
+ * Emits the onLoad event
4
+ * Here we can assume all securedFields iframes have fired their 'load' event
5
5
  */
6
6
  declare function handleOnLoad(cbObj: CbObjOnLoad): void;
7
7
  /**
@@ -11,7 +11,7 @@ export declare const ENCRYPTED_BANK_LOCATION_FIELD = "encryptedBankLocationId";
11
11
  export declare const ENCRYPTED_SECURITY_CODE_3_DIGITS = "encryptedSecurityCode3digits";
12
12
  export declare const ENCRYPTED_SECURITY_CODE_4_DIGITS = "encryptedSecurityCode4digits";
13
13
  export declare const GIFT_CARD = "giftcard";
14
- export declare const SF_VERSION = "4.1.1";
14
+ export declare const SF_VERSION = "4.2.1";
15
15
  export declare const DEFAULT_CARD_GROUP_TYPES: string[];
16
16
  export declare const NON_CREDIT_CARD_TYPE_SECURED_FIELDS: string[];
17
17
  export declare const CREDIT_CARD_SF_FIELDS: string[];
@@ -66,10 +66,12 @@ export interface AriaConfigObject {
66
66
  }
67
67
  declare abstract class AbstractSecuredField {
68
68
  config: SFInternalConfig;
69
- protected fieldType: string;
69
+ fieldType: string;
70
70
  protected iframeSrc: string;
71
71
  protected loadingContext: string;
72
72
  protected holderEl: HTMLElement;
73
+ protected iframeRef: HTMLElement;
74
+ loadToConfigTimeout: number;
73
75
  protected _errorType: string;
74
76
  protected _hasError: boolean;
75
77
  protected _isValid: boolean;
@@ -1,4 +1,4 @@
1
- import { Order, PaymentAction, PaymentAmount } from '../types';
1
+ import { Order, PaymentAction, PaymentAmount, PaymentAmountExtended } from '../types';
2
2
  import UIElement from './UIElement';
3
3
  import Core from '../core';
4
4
  import Analytics from '../core/Analytics';
@@ -30,6 +30,7 @@ export interface IUIElement {
30
30
  type: string;
31
31
  elementRef: any;
32
32
  submit(): void;
33
+ setElementStatus(status: UIElementStatus, props: any): UIElement;
33
34
  setStatus(status: UIElementStatus, props?: {
34
35
  message?: string;
35
36
  [key: string]: any;
@@ -56,6 +57,7 @@ export interface UIElementProps extends BaseElementProps {
56
57
  name?: string;
57
58
  icon?: string;
58
59
  amount?: PaymentAmount;
60
+ secondaryAmount?: PaymentAmountExtended;
59
61
  /**
60
62
  * Show/Hide pay button
61
63
  * @defaultValue true
@@ -1,3 +1,3 @@
1
- import { PaymentResponse, RawPaymentResponse } from './types';
1
+ import { PaymentResponse, RawPaymentResponse, UIElementStatus } from './types';
2
2
  export declare function getSanitizedResponse(response: RawPaymentResponse): PaymentResponse;
3
- export declare function resolveFinalResult(result: PaymentResponse): string[];
3
+ export declare function resolveFinalResult(result: PaymentResponse): [status: UIElementStatus, statusProps?: any];