@adyen/adyen-web 6.45.1 → 6.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +2 -2
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +1846 -1889
- package/dist/es/components/ANCV/components/ANCVInput.js +1 -1
- package/dist/es/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es/components/Ach/Ach.js +1 -1
- package/dist/es/components/Ach/Ach.js.map +1 -1
- package/dist/es/components/Ach/components/AchComponent.js +1 -1
- package/dist/es/components/Ach/components/AchComponent.js.map +1 -1
- package/dist/es/components/AmazonPay/AmazonPay.js +1 -1
- package/dist/es/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es/components/BacsDD/BacsDD.js +1 -1
- package/dist/es/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es/components/BacsDD/components/BacsInput.js +1 -1
- package/dist/es/components/BacsDD/components/BacsInput.js.map +1 -1
- package/dist/es/components/BankTransfer/BankTransfer.js +1 -1
- package/dist/es/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es/components/BankTransfer/components/BankTransferInput/BankTransferInput.js +1 -1
- package/dist/es/components/BankTransfer/components/BankTransferInput/BankTransferInput.js.map +1 -1
- package/dist/es/components/Blik/Blik.js +1 -1
- package/dist/es/components/Blik/Blik.js.map +1 -1
- package/dist/es/components/Blik/components/BlikInput.js +1 -1
- package/dist/es/components/Blik/components/BlikInput.js.map +1 -1
- package/dist/es/components/Card/Card.js +1 -1
- package/dist/es/components/Card/Card.js.map +1 -1
- package/dist/es/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es/components/CashAppPay/CashAppPay.js +1 -1
- package/dist/es/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCard.js +1 -1
- package/dist/es/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es/components/Donation/Donation.js +1 -1
- package/dist/es/components/Donation/Donation.js.map +1 -1
- package/dist/es/components/Donation/components/DonationComponent.js +1 -1
- package/dist/es/components/Donation/components/DonationComponent.js.map +1 -1
- package/dist/es/components/Dropin/Dropin.js +1 -1
- package/dist/es/components/Dropin/Dropin.js.map +1 -1
- package/dist/es/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es/components/Giropay/Giropay.js +1 -1
- package/dist/es/components/Giropay/Giropay.js.map +1 -1
- package/dist/es/components/MBWay/MBWay.js +1 -1
- package/dist/es/components/MBWay/MBWay.js.map +1 -1
- package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
- package/dist/es/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
- package/dist/es/components/Multibanco/Multibanco.js +1 -1
- package/dist/es/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es/components/PayTo/components/BSBInput.js +1 -1
- package/dist/es/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es/components/PayTo/components/PayToNameFields.js +1 -1
- package/dist/es/components/PayTo/components/PayToNameFields.js.map +1 -1
- package/dist/es/components/PayTo/components/PayToPhone.js +1 -1
- package/dist/es/components/PayTo/components/PayToPhone.js.map +1 -1
- package/dist/es/components/Pix/Pix.js +1 -1
- package/dist/es/components/Pix/Pix.js.map +1 -1
- package/dist/es/components/Pix/components/PixInput/PixInput.js +1 -1
- package/dist/es/components/Pix/components/PixInput/PixInput.js.map +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js +1 -1
- package/dist/es/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js.map +1 -1
- package/dist/es/components/Redirect/Redirect.js +1 -1
- package/dist/es/components/Redirect/Redirect.js.map +1 -1
- package/dist/es/components/Sepa/Sepa.js.map +1 -1
- package/dist/es/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es/components/Trustly/Trustly.js +1 -1
- package/dist/es/components/Trustly/Trustly.js.map +1 -1
- package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
- package/dist/es/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
- package/dist/es/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es/components/internal/IbanInput/IbanInput.js +1 -1
- package/dist/es/components/internal/IbanInput/IbanInput.js.map +1 -1
- package/dist/es/components/internal/IbanInput/validate.js +1 -1
- package/dist/es/components/internal/IbanInput/validate.js.map +1 -1
- package/dist/es/components/internal/OpenInvoice/OpenInvoice.js +1 -1
- package/dist/es/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es/components/internal/PhoneInput/PhoneInputForm.js +1 -1
- package/dist/es/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
- package/dist/es/components/internal/RedirectButton/RedirectButton.js +1 -1
- package/dist/es/components/internal/RedirectButton/RedirectButton.js.map +1 -1
- package/dist/es/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es/components/internal/UIElement/utils.js +1 -1
- package/dist/es/components/internal/UIElement/utils.js.map +1 -1
- package/dist/es/core/config.js +1 -1
- package/dist/es/index.d.ts +1846 -1889
- package/dist/es/utils/Validator/Validator.js +1 -1
- package/dist/es/utils/Validator/Validator.js.map +1 -1
- package/dist/es/utils/useForm/reducer.js +1 -1
- package/dist/es/utils/useForm/reducer.js.map +1 -1
- package/dist/es/utils/useForm/useForm.js +1 -1
- package/dist/es/utils/useForm/useForm.js.map +1 -1
- package/dist/es/utils/useForm/useFormWithA11y.js +1 -1
- package/dist/es/utils/useForm/useFormWithA11y.js.map +1 -1
- package/dist/es-legacy/components/ANCV/components/ANCVInput.js +1 -1
- package/dist/es-legacy/components/ANCV/components/ANCVInput.js.map +1 -1
- package/dist/es-legacy/components/Ach/Ach.js +1 -1
- package/dist/es-legacy/components/Ach/Ach.js.map +1 -1
- package/dist/es-legacy/components/Ach/components/AchComponent.js +1 -1
- package/dist/es-legacy/components/Ach/components/AchComponent.js.map +1 -1
- package/dist/es-legacy/components/AmazonPay/AmazonPay.js +1 -1
- package/dist/es-legacy/components/AmazonPay/AmazonPay.js.map +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js +1 -1
- package/dist/es-legacy/components/BacsDD/BacsDD.js.map +1 -1
- package/dist/es-legacy/components/BacsDD/components/BacsInput.js +1 -1
- package/dist/es-legacy/components/BacsDD/components/BacsInput.js.map +1 -1
- package/dist/es-legacy/components/BankTransfer/BankTransfer.js +1 -1
- package/dist/es-legacy/components/BankTransfer/BankTransfer.js.map +1 -1
- package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/BankTransferInput.js +1 -1
- package/dist/es-legacy/components/BankTransfer/components/BankTransferInput/BankTransferInput.js.map +1 -1
- package/dist/es-legacy/components/Blik/Blik.js +1 -1
- package/dist/es-legacy/components/Blik/Blik.js.map +1 -1
- package/dist/es-legacy/components/Blik/components/BlikInput.js +1 -1
- package/dist/es-legacy/components/Blik/components/BlikInput.js.map +1 -1
- package/dist/es-legacy/components/Card/Card.js +1 -1
- package/dist/es-legacy/components/Card/Card.js.map +1 -1
- package/dist/es-legacy/components/Card/components/CardInput/types.js.map +1 -1
- package/dist/es-legacy/components/CashAppPay/CashAppPay.js +1 -1
- package/dist/es-legacy/components/CashAppPay/CashAppPay.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCard.js.map +1 -1
- package/dist/es-legacy/components/CustomCard/CustomCardInput/CustomCardInput.js.map +1 -1
- package/dist/es-legacy/components/Donation/Donation.js +1 -1
- package/dist/es-legacy/components/Donation/Donation.js.map +1 -1
- package/dist/es-legacy/components/Donation/components/DonationComponent.js +1 -1
- package/dist/es-legacy/components/Donation/components/DonationComponent.js.map +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js +1 -1
- package/dist/es-legacy/components/Dropin/Dropin.js.map +1 -1
- package/dist/es-legacy/components/Dropin/components/DropinComponent.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/Giftcard.js.map +1 -1
- package/dist/es-legacy/components/Giftcard/components/GiftcardComponent.js.map +1 -1
- package/dist/es-legacy/components/Giropay/Giropay.js +1 -1
- package/dist/es-legacy/components/Giropay/Giropay.js.map +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js +1 -1
- package/dist/es-legacy/components/MBWay/MBWay.js.map +1 -1
- package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js +1 -1
- package/dist/es-legacy/components/MBWay/components/MBWayInput/MBWayInput.js.map +1 -1
- package/dist/es-legacy/components/Multibanco/Multibanco.js +1 -1
- package/dist/es-legacy/components/Multibanco/Multibanco.js.map +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js +1 -1
- package/dist/es-legacy/components/PayByBankPix/PayByBankPix.js.map +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js +1 -1
- package/dist/es-legacy/components/PayByBankUS/PayByBankUS.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/BSBInput.js +1 -1
- package/dist/es-legacy/components/PayTo/components/BSBInput.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToNameFields.js +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToNameFields.js.map +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToPhone.js +1 -1
- package/dist/es-legacy/components/PayTo/components/PayToPhone.js.map +1 -1
- package/dist/es-legacy/components/Pix/Pix.js +1 -1
- package/dist/es-legacy/components/Pix/Pix.js.map +1 -1
- package/dist/es-legacy/components/Pix/components/PixInput/PixInput.js +1 -1
- package/dist/es-legacy/components/Pix/components/PixInput/PixInput.js.map +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.js.map +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js +1 -1
- package/dist/es-legacy/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.js.map +1 -1
- package/dist/es-legacy/components/Redirect/Redirect.js +1 -1
- package/dist/es-legacy/components/Redirect/Redirect.js.map +1 -1
- package/dist/es-legacy/components/Sepa/Sepa.js.map +1 -1
- package/dist/es-legacy/components/ThreeDS2/ThreeDS2DeviceFingerprint.js.map +1 -1
- package/dist/es-legacy/components/Trustly/Trustly.js +1 -1
- package/dist/es-legacy/components/Trustly/Trustly.js.map +1 -1
- package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js +1 -1
- package/dist/es-legacy/components/helpers/IssuerListContainer/IssuerListContainer.js.map +1 -1
- package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js +1 -1
- package/dist/es-legacy/components/helpers/QRLoaderContainer/QRLoaderContainer.js.map +1 -1
- package/dist/es-legacy/components/internal/BaseElement/BaseElement.js.map +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js +1 -1
- package/dist/es-legacy/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.js.map +1 -1
- package/dist/es-legacy/components/internal/IbanInput/IbanInput.js +1 -1
- package/dist/es-legacy/components/internal/IbanInput/IbanInput.js.map +1 -1
- package/dist/es-legacy/components/internal/IbanInput/validate.js +1 -1
- package/dist/es-legacy/components/internal/IbanInput/validate.js.map +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js +1 -1
- package/dist/es-legacy/components/internal/OpenInvoice/OpenInvoice.js.map +1 -1
- package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js +1 -1
- package/dist/es-legacy/components/internal/PhoneInput/PhoneInputForm.js.map +1 -1
- package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js +1 -1
- package/dist/es-legacy/components/internal/RedirectButton/RedirectButton.js.map +1 -1
- package/dist/es-legacy/components/internal/SecuredFields/SFP/SecuredFieldsProvider.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/UIElement.js.map +1 -1
- package/dist/es-legacy/components/internal/UIElement/utils.js +1 -1
- package/dist/es-legacy/components/internal/UIElement/utils.js.map +1 -1
- package/dist/es-legacy/core/config.js +1 -1
- package/dist/es-legacy/utils/Validator/Validator.js +1 -1
- package/dist/es-legacy/utils/Validator/Validator.js.map +1 -1
- package/dist/es-legacy/utils/useForm/reducer.js +1 -1
- package/dist/es-legacy/utils/useForm/reducer.js.map +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js +1 -1
- package/dist/es-legacy/utils/useForm/useForm.js.map +1 -1
- package/dist/es-legacy/utils/useForm/useFormWithA11y.js +1 -1
- package/dist/es-legacy/utils/useForm/useFormWithA11y.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="applepayjs" />
|
|
2
2
|
/// <reference types="googlepay" />
|
|
3
3
|
import * as preact from 'preact';
|
|
4
|
-
import {
|
|
4
|
+
import { h, TargetedMouseEvent, Ref, RefObject, Component, ComponentChildren, FunctionComponent, ComponentChild, TargetedKeyboardEvent } from 'preact';
|
|
5
5
|
import { OrderResponseBody, OnShippingAddressChangeData, OnShippingOptionsChangeData, OnInitActions } from '@paypal/paypal-js';
|
|
6
6
|
|
|
7
7
|
interface ILanguageService {
|
|
@@ -264,1903 +264,1505 @@ interface InstallmentOptions {
|
|
|
264
264
|
[key: string]: InstallmentOption;
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'action' | 'link' | 'iconOnly';
|
|
268
|
+
interface ButtonProps {
|
|
269
|
+
status?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Class name modifiers will be used as: `adyen-checkout__button--${modifier}`
|
|
272
|
+
*/
|
|
273
|
+
classNameModifiers?: string[];
|
|
274
|
+
variant?: ButtonVariant;
|
|
275
|
+
disabled?: boolean;
|
|
276
|
+
label?: string | h.JSX.Element;
|
|
277
|
+
onClickCompletedLabel?: string | h.JSX.Element;
|
|
278
|
+
id?: string;
|
|
279
|
+
ariaLabel?: string;
|
|
280
|
+
ariaLabelledBy?: string;
|
|
281
|
+
ariaDescribedBy?: string;
|
|
282
|
+
ariaExpanded?: boolean;
|
|
283
|
+
ariaControls?: string;
|
|
284
|
+
secondaryLabel?: string;
|
|
285
|
+
icon?: string;
|
|
286
|
+
onClickCompletedIcon?: string;
|
|
287
|
+
inline?: boolean;
|
|
288
|
+
href?: string;
|
|
289
|
+
target?: string;
|
|
290
|
+
rel?: string;
|
|
291
|
+
onClick?: (e: TargetedMouseEvent<HTMLButtonElement | HTMLAnchorElement>, callbacks?: {
|
|
292
|
+
complete?: () => void;
|
|
293
|
+
}) => void;
|
|
294
|
+
onKeyDown?: (event: KeyboardEvent) => void;
|
|
295
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
296
|
+
onMouseEnter?: (event: MouseEvent) => void;
|
|
297
|
+
onMouseLeave?: (event: MouseEvent) => void;
|
|
298
|
+
onFocus?: (event: FocusEvent) => void;
|
|
299
|
+
onBlur?: (event: FocusEvent) => void;
|
|
270
300
|
}
|
|
271
301
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
302
|
+
interface PayButtonProps extends ButtonProps {
|
|
303
|
+
/**
|
|
304
|
+
* Class name modifiers will be used as: `adyen-checkout__image--${modifier}`
|
|
305
|
+
*/
|
|
306
|
+
classNameModifiers?: string[];
|
|
307
|
+
/**
|
|
308
|
+
* Custom amount that can be passed to the button.
|
|
309
|
+
* This is useful when the amount is not available in the amount provider, such as Giftcard scenario where
|
|
310
|
+
* we need to display the remaining amount
|
|
311
|
+
*/
|
|
312
|
+
customAmount?: PaymentAmount;
|
|
282
313
|
label?: string;
|
|
314
|
+
status?: string;
|
|
315
|
+
disabled?: boolean;
|
|
316
|
+
icon?: string;
|
|
317
|
+
showReview?: boolean;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
type AchForm = {
|
|
321
|
+
selectedAccountType: string;
|
|
322
|
+
ownerName: string;
|
|
323
|
+
routingNumber: string;
|
|
324
|
+
accountNumber: string;
|
|
325
|
+
accountNumberVerification: string;
|
|
283
326
|
};
|
|
327
|
+
type AchFormPrefillData = Partial<Pick<AchForm, 'ownerName'>>;
|
|
284
328
|
|
|
285
|
-
|
|
286
|
-
info = "info",
|
|
287
|
-
error = "error",
|
|
288
|
-
log = "log"
|
|
289
|
-
}
|
|
290
|
-
declare abstract class AbstractAnalyticsEvent {
|
|
291
|
-
private readonly timestamp;
|
|
292
|
-
private readonly id;
|
|
329
|
+
interface AchConfiguration extends UIElementProps {
|
|
293
330
|
/**
|
|
294
|
-
*
|
|
295
|
-
* @private
|
|
331
|
+
* Pre-fill ACH form with shopper data
|
|
296
332
|
*/
|
|
297
|
-
|
|
298
|
-
abstract getEventCategory(): AnalyticsEventCategory;
|
|
299
|
-
protected constructor(component: string);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
* SecuredFieldsProvider:
|
|
304
|
-
* Initialises & handles the client-side part of SecuredFields
|
|
305
|
-
*/
|
|
306
|
-
declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
307
|
-
private readonly csfLoadFailTimeout;
|
|
308
|
-
private readonly csfLoadFailTimeoutMS;
|
|
309
|
-
private readonly csfConfigFailTimeout;
|
|
310
|
-
private readonly csfConfigFailTimeoutMS;
|
|
311
|
-
private numCharsInField;
|
|
312
|
-
private rootNode;
|
|
313
|
-
private numDateFields;
|
|
314
|
-
private csf;
|
|
315
|
-
private readonly handleOnLoad;
|
|
316
|
-
private readonly handleOnConfigSuccess;
|
|
317
|
-
private readonly handleOnFieldValid;
|
|
318
|
-
private readonly handleOnAllValid;
|
|
319
|
-
private readonly handleOnBrand;
|
|
320
|
-
private readonly handleFocus;
|
|
321
|
-
private readonly handleOnError;
|
|
322
|
-
private readonly handleOnAutoComplete;
|
|
323
|
-
private readonly handleOnNoDataRequired;
|
|
324
|
-
private readonly handleOnTouchstartIOS;
|
|
325
|
-
private readonly handleKeyDown;
|
|
326
|
-
state: SFPState;
|
|
327
|
-
props: SFPProps;
|
|
328
|
-
private issuingCountryCode;
|
|
329
|
-
constructor(props: SFPProps);
|
|
330
|
-
static readonly defaultProps: {
|
|
331
|
-
type: string;
|
|
332
|
-
keypadFix: boolean;
|
|
333
|
-
rootNode: any;
|
|
334
|
-
loadingContext: any;
|
|
335
|
-
brands: any[];
|
|
336
|
-
showWarnings: boolean;
|
|
337
|
-
autoFocus: boolean;
|
|
338
|
-
trimTrailingSeparator: boolean;
|
|
339
|
-
onChange: () => void;
|
|
340
|
-
onLoad: () => void;
|
|
341
|
-
onConfigSuccess: () => void;
|
|
342
|
-
onAllValid: () => void;
|
|
343
|
-
onFieldValid: () => void;
|
|
344
|
-
onBrand: () => void;
|
|
345
|
-
onError: () => void;
|
|
346
|
-
onBinValue: () => void;
|
|
347
|
-
onFocus: () => void;
|
|
348
|
-
onAutoComplete: () => void;
|
|
349
|
-
handleKeyDown: () => void;
|
|
350
|
-
styles: {};
|
|
351
|
-
};
|
|
352
|
-
componentDidMount(): void;
|
|
353
|
-
componentDidUpdate(): void;
|
|
354
|
-
componentWillUnmount(): void;
|
|
355
|
-
private initializeCSF;
|
|
356
|
-
private checkForKCPFields;
|
|
357
|
-
getChildContext(): object;
|
|
358
|
-
handleUnsupportedCard(errObj: CardErrorData): boolean;
|
|
359
|
-
setFocusOn(frame: SFFieldType): void;
|
|
360
|
-
updateStyles(stylesObj: StylesObject): void;
|
|
361
|
-
sfIsOptionalOrHidden(fieldType: string): boolean;
|
|
362
|
-
destroy(): void;
|
|
363
|
-
getRootNode(): HTMLElement;
|
|
364
|
-
showValidation(): void;
|
|
333
|
+
data?: AchFormPrefillData;
|
|
365
334
|
/**
|
|
366
|
-
*
|
|
335
|
+
* Adds placeholder text to the input fields
|
|
367
336
|
*/
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
implementationType?: 'components' | 'custom';
|
|
390
|
-
keypadFix?: boolean;
|
|
391
|
-
koreanAuthenticationRequired?: boolean;
|
|
392
|
-
legacyInputMode?: boolean;
|
|
393
|
-
loadingContext: string;
|
|
394
|
-
minimumExpiryDate?: string;
|
|
395
|
-
onAdditionalSFConfig?: () => void;
|
|
396
|
-
onAdditionalSFRemoved?: () => void;
|
|
397
|
-
onAllValid?: (obj: CardAllValidData) => void;
|
|
398
|
-
onAutoComplete?: (obj: CardAutoCompleteData) => void;
|
|
399
|
-
onBinValue?: (obj: CardBinValueData) => void;
|
|
400
|
-
onBrand?: (obj: CardBrandData) => void;
|
|
401
|
-
onChange?: (state: SFPState, eventDetails?: OnChangeEventDetails) => void;
|
|
402
|
-
onConfigSuccess?: (cbObj: CardConfigSuccessData) => void;
|
|
403
|
-
onError?: (error: AdyenCheckoutError) => void;
|
|
404
|
-
onFieldValid?: (fieldObj: CardFieldValidData) => void;
|
|
405
|
-
onFocus?: (obj: CardFocusData) => void;
|
|
406
|
-
onLoad?: (cbObj: CardLoadData) => void;
|
|
407
|
-
onStateUpdate?: (obj: SFPState) => void;
|
|
408
|
-
onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;
|
|
409
|
-
handleKeyDown?: (event: KeyboardEvent) => void;
|
|
410
|
-
rootNode?: HTMLElement;
|
|
411
|
-
showWarnings?: boolean;
|
|
412
|
-
styles?: StylesObject;
|
|
413
|
-
trimTrailingSeparator?: boolean;
|
|
414
|
-
type: string;
|
|
415
|
-
render?: (helpers: {
|
|
416
|
-
setRootNode: (input: HTMLElement) => void;
|
|
417
|
-
setFocusOn: (fieldName: string) => void;
|
|
418
|
-
}, state: SFPState) => ComponentChildren;
|
|
419
|
-
resources?: Resources;
|
|
420
|
-
maskSecurityCode?: boolean;
|
|
421
|
-
exposeExpiryDate?: boolean;
|
|
422
|
-
disableIOSArrowKeys?: (obj: TouchStartEventObj) => void | null;
|
|
423
|
-
placeholders?: Placeholders;
|
|
424
|
-
showContextualElement?: boolean;
|
|
425
|
-
}
|
|
426
|
-
type SFPErrorMap = Partial<Record<SFFieldType, string>>;
|
|
427
|
-
interface SFPState {
|
|
428
|
-
status?: string;
|
|
429
|
-
brand?: string;
|
|
430
|
-
errors?: SFPErrorMap;
|
|
431
|
-
valid: SFPValid;
|
|
432
|
-
data: object;
|
|
433
|
-
cvcPolicy?: CVCPolicyType;
|
|
434
|
-
isSfpValid?: boolean;
|
|
435
|
-
autoCompleteName?: string;
|
|
436
|
-
billingAddress?: AddressData;
|
|
437
|
-
detectedUnsupportedBrands?: string[];
|
|
438
|
-
hasKoreanFields?: boolean;
|
|
439
|
-
showSocialSecurityNumber?: boolean;
|
|
440
|
-
expiryDatePolicy?: DatePolicyType;
|
|
441
|
-
socialSecurityNumber?: string;
|
|
337
|
+
placeholders?: AchPlaceholders;
|
|
338
|
+
/**
|
|
339
|
+
* Set to false to hide the "Account Holder Name" field if you want to pass the data yourself
|
|
340
|
+
* @default true
|
|
341
|
+
*/
|
|
342
|
+
hasHolderName?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Enables storing the payment method using the Checkbox
|
|
345
|
+
* @default false
|
|
346
|
+
*/
|
|
347
|
+
enableStoreDetails?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* storedPaymentMethodId coming from a stored ACH in /paymentMethods response
|
|
350
|
+
* @internal
|
|
351
|
+
*/
|
|
352
|
+
storedPaymentMethodId?: string;
|
|
353
|
+
/**
|
|
354
|
+
* bankAccountNumber coming from a stored ACH in /paymentMethods response
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
bankAccountNumber?: string;
|
|
442
358
|
}
|
|
443
|
-
interface
|
|
444
|
-
|
|
445
|
-
|
|
359
|
+
interface AchPlaceholders {
|
|
360
|
+
accountTypeSelector?: string;
|
|
361
|
+
ownerName?: string;
|
|
362
|
+
routingNumber?: string;
|
|
363
|
+
accountNumber?: string;
|
|
364
|
+
accountNumberVerification?: string;
|
|
446
365
|
}
|
|
447
|
-
interface SFPValid {
|
|
448
|
-
encryptedCardNumber?: boolean;
|
|
449
|
-
encryptedExpiryMonth?: boolean;
|
|
450
|
-
encryptedExpiryYear?: boolean;
|
|
451
|
-
encryptedSecurityCode?: boolean;
|
|
452
|
-
encryptedPassword?: boolean;
|
|
453
|
-
encryptedPin?: boolean;
|
|
454
|
-
}
|
|
455
|
-
interface OnChangeEventDetails {
|
|
456
|
-
event: string;
|
|
457
|
-
fieldType?: string;
|
|
458
|
-
}
|
|
459
|
-
type SecuredFieldsProviderRef = RefObject<SecuredFieldsProvider>;
|
|
460
366
|
|
|
461
|
-
|
|
462
|
-
declare const
|
|
463
|
-
declare const REQUIRED = "required";
|
|
464
|
-
declare const OPTIONAL = "optional";
|
|
465
|
-
declare const HIDDEN = "hidden";
|
|
466
|
-
declare const BEST_GUESS_MODE = "best-guess";
|
|
467
|
-
declare const BIN_LOOKUP_MODE = "bin-lookup";
|
|
367
|
+
declare const SUPPORTED_LOCALES_EU: readonly ["en_GB", "de_DE", "fr_FR", "it_IT", "es_ES"];
|
|
368
|
+
declare const SUPPORTED_LOCALES_US: readonly ["en_US"];
|
|
468
369
|
|
|
469
|
-
declare
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
370
|
+
declare enum TxVariants {
|
|
371
|
+
/** internal */
|
|
372
|
+
address = "address",
|
|
373
|
+
bankTransfer_IBAN = "bankTransfer_IBAN",
|
|
374
|
+
bankTransfer_BE = "bankTransfer_BE",
|
|
375
|
+
bankTransfer_NL = "bankTransfer_NL",
|
|
376
|
+
bankTransfer_PL = "bankTransfer_PL",
|
|
377
|
+
bankTransfer_FR = "bankTransfer_FR",
|
|
378
|
+
bankTransfer_CH = "bankTransfer_CH",
|
|
379
|
+
bankTransfer_IE = "bankTransfer_IE",
|
|
380
|
+
bankTransfer_GB = "bankTransfer_GB",
|
|
381
|
+
bankTransfer_DE = "bankTransfer_DE",
|
|
382
|
+
bankTransfer_AE = "bankTransfer_AE",
|
|
383
|
+
bankTransfer_AT = "bankTransfer_AT",
|
|
384
|
+
bankTransfer_AU = "bankTransfer_AU",
|
|
385
|
+
bankTransfer_BG = "bankTransfer_BG",
|
|
386
|
+
bankTransfer_CA = "bankTransfer_CA",
|
|
387
|
+
bankTransfer_EE = "bankTransfer_EE",
|
|
388
|
+
bankTransfer_ES = "bankTransfer_ES",
|
|
389
|
+
bankTransfer_FI = "bankTransfer_FI",
|
|
390
|
+
bankTransfer_HK = "bankTransfer_HK",
|
|
391
|
+
bankTransfer_HU = "bankTransfer_HU",
|
|
392
|
+
bankTransfer_IT = "bankTransfer_IT",
|
|
393
|
+
bankTransfer_JP = "bankTransfer_JP",
|
|
394
|
+
bankTransfer_LU = "bankTransfer_LU",
|
|
395
|
+
bankTransfer_NZ = "bankTransfer_NZ",
|
|
396
|
+
bankTransfer_PT = "bankTransfer_PT",
|
|
397
|
+
bankTransfer_SG = "bankTransfer_SG",
|
|
398
|
+
bankTransfer_SK = "bankTransfer_SK",
|
|
399
|
+
bankTransfer_US = "bankTransfer_US",
|
|
400
|
+
donation = "donation",
|
|
401
|
+
personal_details = "personal_details",
|
|
402
|
+
dropin = "dropin",
|
|
403
|
+
/** internal */
|
|
404
|
+
/** Card */
|
|
405
|
+
bcmc = "bcmc",
|
|
406
|
+
card = "card",
|
|
407
|
+
scheme = "scheme",
|
|
408
|
+
storedCard = "storedCard",
|
|
409
|
+
customCard = "customcard",
|
|
410
|
+
/** Card */
|
|
411
|
+
/** ThreeDS */
|
|
412
|
+
threeDS2Challenge = "threeDS2Challenge",
|
|
413
|
+
threeDS2Fingerprint = "threeDS2Fingerprint",
|
|
414
|
+
threeDS2DeviceFingerprint = "threeDS2DeviceFingerprint",
|
|
415
|
+
/** ThreeDS */
|
|
416
|
+
/** Direct debit */
|
|
417
|
+
ach = "ach",
|
|
418
|
+
directdebit_GB = "directdebit_GB",
|
|
419
|
+
sepadirectdebit = "sepadirectdebit",
|
|
420
|
+
eft_directdebit_CA = "eft_directdebit_CA",
|
|
421
|
+
/** Direct debit */
|
|
422
|
+
/** Open Invoice */
|
|
423
|
+
affirm = "affirm",
|
|
424
|
+
afterpay = "afterpay",
|
|
425
|
+
afterpay_default = "afterpay_default",
|
|
426
|
+
afterpay_b2b = "afterpay_b2b",
|
|
427
|
+
atome = "atome",
|
|
428
|
+
facilypay_3x = "facilypay_3x",
|
|
429
|
+
facilypay_4x = "facilypay_4x",
|
|
430
|
+
facilypay_6x = "facilypay_6x",
|
|
431
|
+
facilypay_10x = "facilypay_10x",
|
|
432
|
+
facilypay_12x = "facilypay_12x",
|
|
433
|
+
ratepay = "ratepay",
|
|
434
|
+
ratepay_directdebit = "ratepay_directdebit",
|
|
435
|
+
/** Open Invoice */
|
|
436
|
+
/** Wallets */
|
|
437
|
+
amazonpay = "amazonpay",
|
|
438
|
+
applepay = "applepay",
|
|
439
|
+
cashapp = "cashapp",
|
|
440
|
+
clicktopay = "clicktopay",
|
|
441
|
+
googlepay = "googlepay",
|
|
442
|
+
paypal = "paypal",
|
|
443
|
+
fastlane = "fastlane",
|
|
444
|
+
paywithgoogle = "paywithgoogle",
|
|
445
|
+
/** Wallets */
|
|
446
|
+
/** Voucher */
|
|
447
|
+
boletobancario = "boletobancario",
|
|
448
|
+
boletobancario_itau = "boletobancario_itau",
|
|
449
|
+
boletobancario_santander = "boletobancario_santander",
|
|
450
|
+
primeiropay_boleto = "primeiropay_boleto",
|
|
451
|
+
doku = "doku",
|
|
452
|
+
doku_alfamart = "doku_alfamart",
|
|
453
|
+
doku_permata_lite_atm = "doku_permata_lite_atm",
|
|
454
|
+
doku_indomaret = "doku_indomaret",
|
|
455
|
+
doku_atm_mandiri_va = "doku_atm_mandiri_va",
|
|
456
|
+
doku_sinarmas_va = "doku_sinarmas_va",
|
|
457
|
+
doku_mandiri_va = "doku_mandiri_va",
|
|
458
|
+
doku_cimb_va = "doku_cimb_va",
|
|
459
|
+
doku_danamon_va = "doku_danamon_va",
|
|
460
|
+
doku_bri_va = "doku_bri_va",
|
|
461
|
+
doku_bni_va = "doku_bni_va",
|
|
462
|
+
doku_bca_va = "doku_bca_va",
|
|
463
|
+
doku_wallet = "doku_wallet",
|
|
464
|
+
oxxo = "oxxo",
|
|
465
|
+
/** Voucher */
|
|
466
|
+
/** issuerList */
|
|
467
|
+
billdesk_online = "billdesk_online",
|
|
468
|
+
billdesk_wallet = "billdesk_wallet",
|
|
469
|
+
dotpay = "dotpay",
|
|
470
|
+
eps = "eps",
|
|
471
|
+
iris = "iris",
|
|
472
|
+
molpay_ebanking_fpx_MY = "molpay_ebanking_fpx_MY",
|
|
473
|
+
molpay_ebanking_TH = "molpay_ebanking_TH",
|
|
474
|
+
molpay_ebanking_VN = "molpay_ebanking_VN",
|
|
475
|
+
onlineBanking_CZ = "onlineBanking_CZ",
|
|
476
|
+
onlinebanking_IN = "onlinebanking_IN",
|
|
477
|
+
onlineBanking_PL = "onlineBanking_PL",
|
|
478
|
+
onlineBanking_SK = "onlineBanking_SK",
|
|
479
|
+
paybybank = "paybybank",
|
|
480
|
+
payu_IN_cashcard = "payu_IN_cashcard",
|
|
481
|
+
payu_IN_nb = "payu_IN_nb",
|
|
482
|
+
wallet_IN = "wallet_IN",
|
|
483
|
+
/** issuerList */
|
|
484
|
+
/** Dragonpay */
|
|
485
|
+
dragonpay = "dragonpay",
|
|
486
|
+
dragonpay_ebanking = "dragonpay_ebanking",
|
|
487
|
+
dragonpay_otc_banking = "dragonpay_otc_banking",
|
|
488
|
+
dragonpay_otc_non_banking = "dragonpay_otc_non_banking",
|
|
489
|
+
dragonpay_otc_philippines = "dragonpay_otc_philippines",
|
|
490
|
+
/** Dragonpay */
|
|
491
|
+
/** Econtext */
|
|
492
|
+
econtext = "econtext",
|
|
493
|
+
econtext_atm = "econtext_atm",
|
|
494
|
+
econtext_online = "econtext_online",
|
|
495
|
+
econtext_seven_eleven = "econtext_seven_eleven",
|
|
496
|
+
econtext_stores = "econtext_stores",
|
|
497
|
+
/** Econtext */
|
|
498
|
+
/** Redirect */
|
|
499
|
+
giropay = "giropay",
|
|
500
|
+
multibanco = "multibanco",
|
|
501
|
+
redirect = "redirect",
|
|
502
|
+
twint = "twint",
|
|
503
|
+
vipps = "vipps",
|
|
504
|
+
trustly = "trustly",
|
|
505
|
+
paybybank_AIS_DD = "paybybank_AIS_DD",
|
|
506
|
+
riverty = "riverty",
|
|
507
|
+
paybybank_pix = "paybybank_pix",
|
|
508
|
+
/** Redirect */
|
|
509
|
+
/** Klarna */
|
|
510
|
+
klarna = "klarna",
|
|
511
|
+
klarna_account = "klarna_account",
|
|
512
|
+
klarna_paynow = "klarna_paynow",
|
|
513
|
+
klarna_b2b = "klarna_b2b",
|
|
514
|
+
/** Klarna */
|
|
515
|
+
/** QRLoader */
|
|
516
|
+
bcmc_mobile = "bcmc_mobile",
|
|
517
|
+
bcmc_mobile_QR = "bcmc_mobile_QR",
|
|
518
|
+
pix = "pix",
|
|
519
|
+
swish = "swish",
|
|
520
|
+
wechatpay = "wechatpay",
|
|
521
|
+
wechatpayQR = "wechatpayQR",
|
|
522
|
+
promptpay = "promptpay",
|
|
523
|
+
paynow = "paynow",
|
|
524
|
+
duitnow = "duitnow",
|
|
525
|
+
/** QRLoader */
|
|
526
|
+
/** Await */
|
|
527
|
+
blik = "blik",
|
|
528
|
+
mbway = "mbway",
|
|
529
|
+
ancv = "ancv",
|
|
530
|
+
payto = "payto",
|
|
531
|
+
upi = "upi",// also QR
|
|
532
|
+
upi_qr = "upi_qr",// also QR
|
|
533
|
+
upi_intent = "upi_intent",// also QR
|
|
534
|
+
/** Await */
|
|
535
|
+
/** Giftcard */
|
|
536
|
+
giftcard = "giftcard",
|
|
537
|
+
mealVoucher_FR = "mealVoucher_FR",
|
|
538
|
+
mealVoucher_FR_natixis = "mealVoucher_FR_natixis",
|
|
539
|
+
mealVoucher_FR_sodexo = "mealVoucher_FR_sodexo",
|
|
540
|
+
mealVoucher_FR_groupeup = "mealVoucher_FR_groupeup"
|
|
541
|
+
/** Giftcard */
|
|
603
542
|
}
|
|
604
543
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
onError?: (error: any) => void;
|
|
609
|
-
node?: string;
|
|
610
|
-
}
|
|
611
|
-
interface RiskModuleProps extends BaseElementProps {
|
|
612
|
-
risk: RiskModuleOptions;
|
|
613
|
-
loadingContext: string;
|
|
614
|
-
}
|
|
615
|
-
declare class RiskElement extends BaseElement<RiskModuleProps> {
|
|
616
|
-
static readonly type = "risk";
|
|
617
|
-
static readonly defaultProps: {
|
|
618
|
-
risk: {
|
|
619
|
-
enabled: boolean;
|
|
620
|
-
onComplete: () => void;
|
|
621
|
-
onError: () => void;
|
|
622
|
-
node: string;
|
|
623
|
-
};
|
|
624
|
-
};
|
|
625
|
-
private nodeRiskContainer;
|
|
626
|
-
constructor(checkout: ICore, props?: any);
|
|
544
|
+
declare class AmazonPayElement extends UIElement<AmazonPayConfiguration> {
|
|
545
|
+
static readonly type = TxVariants.amazonpay;
|
|
546
|
+
protected static readonly defaultProps: Partial<AmazonPayConfiguration>;
|
|
627
547
|
formatProps(props: any): any;
|
|
628
|
-
onComplete: (result: any) => void;
|
|
629
|
-
onError: (error: any) => void;
|
|
630
|
-
get isValid(): any;
|
|
631
|
-
get data(): any;
|
|
632
|
-
get enabled(): boolean;
|
|
633
|
-
cleanUp: () => void;
|
|
634
|
-
componentWillUnmount(): void;
|
|
635
|
-
render(): h.JSX.Element;
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
interface DisclaimerMsgObject {
|
|
639
|
-
message: string;
|
|
640
|
-
linkText: string;
|
|
641
|
-
link: string;
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
interface AnalyticsOptions {
|
|
645
548
|
/**
|
|
646
|
-
*
|
|
647
|
-
*/
|
|
648
|
-
enabled?: boolean;
|
|
649
|
-
/**
|
|
650
|
-
* A wrapper to pass data needed when analytics is setup
|
|
549
|
+
* Formats the component data output
|
|
651
550
|
*/
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
checkoutAttemptId?: string;
|
|
663
|
-
};
|
|
664
|
-
}
|
|
665
|
-
interface ApplicationInfo {
|
|
666
|
-
externalPlatform: {
|
|
667
|
-
name: string;
|
|
668
|
-
version: string;
|
|
669
|
-
integrator: string;
|
|
670
|
-
};
|
|
671
|
-
merchantApplication: {
|
|
672
|
-
name: string;
|
|
673
|
-
version: string;
|
|
674
|
-
};
|
|
675
|
-
merchantDevice?: {
|
|
676
|
-
os: string;
|
|
677
|
-
osVersion: string;
|
|
678
|
-
};
|
|
551
|
+
formatData(): AmazonPayElementData;
|
|
552
|
+
protected beforeRender(configSetByMerchant?: AmazonPayConfiguration): void;
|
|
553
|
+
getShopperDetails(): void | Promise<{
|
|
554
|
+
declineFlowUrl?: string;
|
|
555
|
+
} & Record<string, unknown>>;
|
|
556
|
+
handleDeclineFlow(): void;
|
|
557
|
+
get isValid(): boolean;
|
|
558
|
+
get browserInfo(): BrowserInfo;
|
|
559
|
+
submit(): void;
|
|
560
|
+
protected componentToRender(): h.JSX.Element;
|
|
679
561
|
}
|
|
680
562
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
customerContextId: string;
|
|
692
|
-
}>;
|
|
693
|
-
triggerAuthenticationFlow: (customerContextId: string, options?: AuthenticationFlowOptions) => Promise<FastlaneAuthenticatedCustomerResult>;
|
|
694
|
-
getSession: () => Promise<{
|
|
695
|
-
sessionId: string;
|
|
696
|
-
}>;
|
|
697
|
-
};
|
|
698
|
-
profile: {
|
|
699
|
-
showShippingAddressSelector: () => Promise<FastlaneShippingAddressSelectorResult>;
|
|
700
|
-
};
|
|
701
|
-
setLocale: (locale: string) => void;
|
|
702
|
-
ConsentComponent: () => Promise<{
|
|
703
|
-
getRenderState: () => Promise<FastlaneConsentRenderState>;
|
|
704
|
-
}>;
|
|
705
|
-
FastlaneWatermarkComponent: (options: {
|
|
706
|
-
includeAdditionalInfo: boolean;
|
|
707
|
-
}) => Promise<{
|
|
708
|
-
render: (container: any) => null;
|
|
709
|
-
}>;
|
|
563
|
+
type ButtonColor = 'Gold' | 'LightGray' | 'DarkGray';
|
|
564
|
+
type Placement = 'Home' | 'Product' | 'Cart' | 'Checkout' | 'Other';
|
|
565
|
+
type ProductType = 'PayOnly' | 'PayAndShip';
|
|
566
|
+
type ChargePermissionType = 'OneTime' | 'Recurring';
|
|
567
|
+
type FrequencyUnit = 'Year' | 'Month' | 'Week' | 'Day' | 'Variable';
|
|
568
|
+
type Currency = 'EUR' | 'GBP' | 'USD';
|
|
569
|
+
type Region = 'EU' | 'UK' | 'US';
|
|
570
|
+
type SupportedLocale = (typeof SUPPORTED_LOCALES_EU)[number] | (typeof SUPPORTED_LOCALES_US)[number];
|
|
571
|
+
interface AmazonPayButtonInstance {
|
|
572
|
+
onClick(handler: () => void): void;
|
|
710
573
|
}
|
|
711
|
-
interface
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
574
|
+
interface AmazonWindowObject {
|
|
575
|
+
Pay: {
|
|
576
|
+
renderButton(selector: string, settings: AmazonPayButtonSettings): AmazonPayButtonInstance;
|
|
577
|
+
initCheckout(options: AmazonPayButtonSettings & {
|
|
578
|
+
createCheckoutSessionConfig: CheckoutSessionConfig;
|
|
579
|
+
}): void;
|
|
580
|
+
signout(): void;
|
|
581
|
+
bindChangeAction(selector: string, options: ChangeActionOptions): void;
|
|
582
|
+
};
|
|
717
583
|
}
|
|
718
|
-
interface
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
584
|
+
interface RecurringMetadata {
|
|
585
|
+
frequency: {
|
|
586
|
+
unit: string;
|
|
587
|
+
value: FrequencyUnit;
|
|
588
|
+
};
|
|
589
|
+
amount: {
|
|
590
|
+
amount: string;
|
|
591
|
+
currencyCode: Currency;
|
|
722
592
|
};
|
|
723
593
|
}
|
|
724
|
-
interface
|
|
594
|
+
interface AmazonPayBackendConfiguration {
|
|
595
|
+
merchantId?: string;
|
|
596
|
+
publicKeyId?: string;
|
|
597
|
+
region?: Region;
|
|
598
|
+
storeId?: string;
|
|
725
599
|
}
|
|
726
|
-
interface
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
600
|
+
interface AmazonPayConfiguration extends UIElementProps {
|
|
601
|
+
addressDetails?: AddressDetails;
|
|
602
|
+
amazonPayToken?: string;
|
|
603
|
+
amazonCheckoutSessionId?: string;
|
|
604
|
+
amount?: PaymentAmount;
|
|
605
|
+
buttonColor?: ButtonColor;
|
|
606
|
+
cancelUrl?: string;
|
|
607
|
+
chargePermissionType?: ChargePermissionType;
|
|
608
|
+
clientKey?: string;
|
|
609
|
+
configuration?: AmazonPayBackendConfiguration;
|
|
610
|
+
currency?: Currency;
|
|
611
|
+
deliverySpecifications?: DeliverySpecifications;
|
|
612
|
+
design?: string;
|
|
613
|
+
environment?: string;
|
|
614
|
+
loadingContext?: string;
|
|
615
|
+
locale?: string;
|
|
616
|
+
merchantMetadata?: MerchantMetadata;
|
|
617
|
+
onSubmit?(state: SubmitData, element: AmazonPayElement, actions: {
|
|
618
|
+
resolve: (response: CheckoutAdvancedFlowResponse) => void;
|
|
619
|
+
reject: () => void;
|
|
620
|
+
}): void;
|
|
621
|
+
payButton?: (props: PayButtonProps) => h.JSX.Element;
|
|
622
|
+
placement?: Placement;
|
|
623
|
+
productType?: ProductType;
|
|
624
|
+
recurringMetadata?: RecurringMetadata;
|
|
625
|
+
returnUrl?: string;
|
|
626
|
+
showChangePaymentDetailsButton?: boolean;
|
|
627
|
+
showOrderButton?: boolean;
|
|
628
|
+
showSignOutButton?: boolean;
|
|
629
|
+
signature?: string;
|
|
630
|
+
onClick?: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
631
|
+
onError?: (error: AdyenCheckoutError, component: UIElement) => void;
|
|
632
|
+
onSignOut?: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
633
|
+
/**
|
|
634
|
+
* Used for analytics
|
|
635
|
+
*/
|
|
636
|
+
expressPage?: 'cart' | 'minicart' | 'pdp' | 'checkout';
|
|
637
|
+
/**
|
|
638
|
+
* Used for analytics
|
|
639
|
+
* @defaultValue false
|
|
640
|
+
*/
|
|
641
|
+
isExpress?: boolean;
|
|
732
642
|
}
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
643
|
+
interface AmazonPayComponentProps extends AmazonPayConfiguration {
|
|
644
|
+
showSignOutButton?: boolean;
|
|
645
|
+
amazonCheckoutSessionId?: string;
|
|
646
|
+
showOrderButton?: boolean;
|
|
647
|
+
showChangePaymentDetailsButton?: boolean;
|
|
648
|
+
setComponentRef: (ref: ComponentMethodsRef & {
|
|
649
|
+
getSubmitFunction?: () => () => void;
|
|
650
|
+
}) => void;
|
|
739
651
|
}
|
|
740
|
-
interface
|
|
741
|
-
|
|
742
|
-
|
|
652
|
+
interface AmazonPayButtonProps {
|
|
653
|
+
amazonRef: AmazonWindowObject;
|
|
654
|
+
buttonColor?: ButtonColor;
|
|
655
|
+
cancelUrl?: string;
|
|
656
|
+
chargePermissionType?: ChargePermissionType;
|
|
657
|
+
clientKey?: string;
|
|
658
|
+
configuration?: AmazonPayBackendConfiguration;
|
|
659
|
+
currency?: Currency;
|
|
660
|
+
deliverySpecifications?: DeliverySpecifications;
|
|
661
|
+
design?: string;
|
|
662
|
+
environment?: string;
|
|
663
|
+
locale?: string;
|
|
664
|
+
onClick: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
665
|
+
onError?: (error: AdyenCheckoutError, component: UIElement) => void;
|
|
666
|
+
placement?: Placement;
|
|
667
|
+
productType?: ProductType;
|
|
668
|
+
recurringMetadata?: RecurringMetadata;
|
|
669
|
+
ref: RefObject<{
|
|
670
|
+
initCheckout(): void;
|
|
671
|
+
}>;
|
|
672
|
+
returnUrl?: string;
|
|
673
|
+
showPayButton: boolean;
|
|
743
674
|
}
|
|
744
|
-
interface
|
|
745
|
-
|
|
746
|
-
|
|
675
|
+
interface SignOutButtonProps {
|
|
676
|
+
amazonRef: AmazonWindowObject;
|
|
677
|
+
onSignOut: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
747
678
|
}
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
addressLine2: string;
|
|
752
|
-
adminArea1: string;
|
|
753
|
-
adminArea2: string;
|
|
754
|
-
postalCode: string;
|
|
755
|
-
countryCode: string;
|
|
756
|
-
phone: {
|
|
757
|
-
nationalNumber: string;
|
|
758
|
-
countryCode: string;
|
|
759
|
-
};
|
|
679
|
+
interface ChangePaymentDetailsButtonProps {
|
|
680
|
+
amazonCheckoutSessionId: string;
|
|
681
|
+
amazonRef: AmazonWindowObject;
|
|
760
682
|
}
|
|
761
|
-
interface
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
lastName: string;
|
|
765
|
-
fullName: string;
|
|
766
|
-
};
|
|
767
|
-
address: FastlaneAddress;
|
|
768
|
-
phoneNumber: {
|
|
769
|
-
nationalNumber: string;
|
|
770
|
-
countryCode: string;
|
|
771
|
-
};
|
|
683
|
+
interface ChangeActionOptions {
|
|
684
|
+
amazonCheckoutSessionId: string;
|
|
685
|
+
changeAction: 'changeAddress' | 'changePayment';
|
|
772
686
|
}
|
|
773
|
-
interface
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
};
|
|
687
|
+
interface OrderButtonProps {
|
|
688
|
+
amazonCheckoutSessionId: string;
|
|
689
|
+
clientKey: string;
|
|
690
|
+
chargePermissionType?: ChargePermissionType;
|
|
691
|
+
onError: (error: AdyenCheckoutError, component: UIElement) => void;
|
|
692
|
+
recurringMetadata: RecurringMetadata;
|
|
693
|
+
ref: RefObject<{
|
|
694
|
+
createOrder(): void;
|
|
695
|
+
}>;
|
|
696
|
+
region: Region;
|
|
697
|
+
returnUrl: string;
|
|
698
|
+
publicKeyId: string;
|
|
786
699
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
email: string;
|
|
792
|
-
tokenId: string;
|
|
793
|
-
lastFour: string;
|
|
794
|
-
brand: string;
|
|
795
|
-
};
|
|
796
|
-
};
|
|
797
|
-
type FastlaneCardComponentConfiguration = {
|
|
798
|
-
paymentType: 'card';
|
|
799
|
-
configuration: {
|
|
800
|
-
fastlaneConfiguration?: FastlaneSignupConfiguration;
|
|
700
|
+
interface AmazonPayElementData {
|
|
701
|
+
paymentMethod: {
|
|
702
|
+
type: string;
|
|
703
|
+
checkoutSessionId?: string;
|
|
801
704
|
};
|
|
802
|
-
|
|
803
|
-
type FastlaneSignupConfiguration = FastlaneConsentRenderState & {
|
|
804
|
-
fastlaneSessionId?: string;
|
|
805
|
-
telephoneNumber?: string;
|
|
806
|
-
};
|
|
807
|
-
interface FastlaneData {
|
|
808
|
-
consentShown: boolean;
|
|
809
|
-
fastlaneSessionId: string;
|
|
810
|
-
consentGiven: boolean;
|
|
811
|
-
consentVersion?: string;
|
|
812
|
-
telephoneNumber?: string;
|
|
813
|
-
}
|
|
814
|
-
type FastlanePaymentMethodConfiguration = FastlaneComponentConfiguration | FastlaneCardComponentConfiguration;
|
|
815
|
-
interface FastlaneSDKConfiguration {
|
|
816
|
-
clientKey: string;
|
|
817
|
-
environment: CoreConfiguration['environment'];
|
|
818
|
-
locale?: 'en-US' | 'es-US' | 'fr-RS' | 'zh-US';
|
|
819
|
-
analytics?: Pick<AnalyticsOptions, 'enabled'>;
|
|
820
|
-
/**
|
|
821
|
-
* Used to force the Fastlane SDK to return the consent details in case the shopper is not recognized.
|
|
822
|
-
* Use-case: Developer is testing the flow in another country outside US, which would not get consent details.
|
|
823
|
-
*
|
|
824
|
-
* This configuration should not be used for 'live' environment
|
|
825
|
-
*/
|
|
826
|
-
forceConsentDetails?: boolean;
|
|
705
|
+
browserInfo: BrowserInfo;
|
|
827
706
|
}
|
|
828
|
-
interface
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
*/
|
|
832
|
-
tokenId: string;
|
|
833
|
-
/**
|
|
834
|
-
* Fastlane session ID
|
|
835
|
-
*/
|
|
836
|
-
fastlaneSessionId: string;
|
|
837
|
-
/**
|
|
838
|
-
* Initial last four digits displayed once the Component is rendered
|
|
839
|
-
*/
|
|
840
|
-
lastFour: string;
|
|
841
|
-
/**
|
|
842
|
-
* Initial brand displayed once the Component is rendered
|
|
843
|
-
*/
|
|
844
|
-
brand: string;
|
|
707
|
+
interface AmazonPayButtonSettings {
|
|
708
|
+
buttonColor?: ButtonColor;
|
|
709
|
+
design?: string;
|
|
845
710
|
/**
|
|
846
|
-
*
|
|
711
|
+
* Amazon Pay merchant account identifier
|
|
847
712
|
*/
|
|
848
|
-
|
|
713
|
+
merchantId: string;
|
|
849
714
|
/**
|
|
850
|
-
*
|
|
851
|
-
* @internal
|
|
715
|
+
* Sets button to Sandbox environment
|
|
852
716
|
*/
|
|
853
|
-
|
|
717
|
+
sandbox: boolean;
|
|
854
718
|
/**
|
|
855
|
-
*
|
|
856
|
-
* @internal
|
|
719
|
+
* Product type selected for checkout
|
|
857
720
|
*/
|
|
858
|
-
|
|
859
|
-
}
|
|
860
|
-
|
|
861
|
-
interface IAnalytics {
|
|
862
|
-
checkoutAttemptId?: string;
|
|
863
|
-
setUp({ sessionId, checkoutStage, locale }: {
|
|
864
|
-
sessionId?: string;
|
|
865
|
-
checkoutStage?: 'precheckout' | 'checkout';
|
|
866
|
-
locale?: string;
|
|
867
|
-
}): Promise<void>;
|
|
868
|
-
sendFlavor(flavor: 'dropin' | 'components'): Promise<void>;
|
|
869
|
-
sendAnalytics(event: AbstractAnalyticsEvent): void;
|
|
870
|
-
flush(): void;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'action' | 'link' | 'iconOnly';
|
|
874
|
-
interface ButtonProps {
|
|
875
|
-
status?: string;
|
|
721
|
+
productType: ProductType;
|
|
876
722
|
/**
|
|
877
|
-
*
|
|
723
|
+
* Placement of the Amazon Pay button on your website
|
|
878
724
|
*/
|
|
879
|
-
|
|
880
|
-
variant?: ButtonVariant;
|
|
881
|
-
disabled?: boolean;
|
|
882
|
-
label?: string | h.JSX.Element;
|
|
883
|
-
onClickCompletedLabel?: string | h.JSX.Element;
|
|
884
|
-
id?: string;
|
|
885
|
-
ariaLabel?: string;
|
|
886
|
-
ariaLabelledBy?: string;
|
|
887
|
-
ariaDescribedBy?: string;
|
|
888
|
-
ariaExpanded?: boolean;
|
|
889
|
-
ariaControls?: string;
|
|
890
|
-
secondaryLabel?: string;
|
|
891
|
-
icon?: string;
|
|
892
|
-
onClickCompletedIcon?: string;
|
|
893
|
-
inline?: boolean;
|
|
894
|
-
href?: string;
|
|
895
|
-
target?: string;
|
|
896
|
-
rel?: string;
|
|
897
|
-
onClick?: (e: TargetedMouseEvent<HTMLButtonElement | HTMLAnchorElement>, callbacks?: {
|
|
898
|
-
complete?: () => void;
|
|
899
|
-
}) => void;
|
|
900
|
-
onKeyDown?: (event: KeyboardEvent) => void;
|
|
901
|
-
buttonRef?: Ref<HTMLButtonElement>;
|
|
902
|
-
onMouseEnter?: (event: MouseEvent) => void;
|
|
903
|
-
onMouseLeave?: (event: MouseEvent) => void;
|
|
904
|
-
onFocus?: (event: FocusEvent) => void;
|
|
905
|
-
onBlur?: (event: FocusEvent) => void;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
interface PayButtonProps extends ButtonProps {
|
|
725
|
+
placement: Placement;
|
|
909
726
|
/**
|
|
910
|
-
*
|
|
727
|
+
* Language used to render the button and text on Amazon Pay hosted pages. Please note that supported language(s) is dependent on the region that your Amazon Pay account was registered for
|
|
911
728
|
*/
|
|
912
|
-
|
|
729
|
+
checkoutLanguage: SupportedLocale;
|
|
913
730
|
/**
|
|
914
|
-
*
|
|
915
|
-
* This is useful when the amount is not available in the amount provider, such as Giftcard scenario where
|
|
916
|
-
* we need to display the remaining amount
|
|
731
|
+
* Ledger currency provided during registration for the given merchant identifier
|
|
917
732
|
*/
|
|
918
|
-
|
|
919
|
-
label?: string;
|
|
920
|
-
status?: string;
|
|
921
|
-
disabled?: boolean;
|
|
922
|
-
icon?: string;
|
|
923
|
-
showReview?: boolean;
|
|
733
|
+
ledgerCurrency: Currency;
|
|
924
734
|
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
updateStyles?: (stylesObj: StylesObject) => void;
|
|
931
|
-
handleUnsupportedCard?: (errObj: CardErrorData) => boolean;
|
|
735
|
+
interface MerchantMetadata {
|
|
736
|
+
customInformation?: string;
|
|
737
|
+
merchantReferenceId?: string;
|
|
738
|
+
merchantStoreName?: string;
|
|
739
|
+
noteToBuyer?: string;
|
|
932
740
|
}
|
|
933
|
-
interface
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
741
|
+
interface AddressDetails {
|
|
742
|
+
name?: string;
|
|
743
|
+
addressLine1?: string;
|
|
744
|
+
addressLine2?: string;
|
|
745
|
+
addressLine3?: string;
|
|
746
|
+
city?: string;
|
|
747
|
+
districtOrCounty?: string;
|
|
748
|
+
stateOrRegion?: string;
|
|
749
|
+
postalCode?: string;
|
|
750
|
+
countryCode?: string;
|
|
751
|
+
phoneNumber?: string;
|
|
940
752
|
}
|
|
941
|
-
interface
|
|
942
|
-
|
|
753
|
+
interface ChargeAmount {
|
|
754
|
+
amount: string;
|
|
755
|
+
currencyCode: Currency;
|
|
943
756
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
757
|
+
type LedgerCurrencies = {
|
|
758
|
+
[key in Region]: Currency;
|
|
759
|
+
};
|
|
760
|
+
interface PayloadJSON {
|
|
761
|
+
addressDetails?: AddressDetails;
|
|
762
|
+
chargePermissionType?: ChargePermissionType;
|
|
763
|
+
deliverySpecifications?: DeliverySpecifications;
|
|
764
|
+
merchantMetadata?: MerchantMetadata;
|
|
765
|
+
paymentDetails?: {
|
|
766
|
+
chargeAmount: ChargeAmount;
|
|
767
|
+
paymentIntent: 'Confirm';
|
|
768
|
+
presentmentCurrency: Currency;
|
|
769
|
+
totalOrderAmount: ChargeAmount;
|
|
770
|
+
};
|
|
771
|
+
recurringMetadata?: RecurringMetadata;
|
|
772
|
+
storeId: string;
|
|
773
|
+
webCheckoutDetails: {
|
|
774
|
+
checkoutCancelUrl?: string;
|
|
775
|
+
checkoutMode?: 'ProcessOrder';
|
|
776
|
+
checkoutResultReturnUrl?: string;
|
|
777
|
+
checkoutReviewReturnUrl?: string;
|
|
778
|
+
};
|
|
948
779
|
}
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
780
|
+
interface CheckoutDetailsRequest {
|
|
781
|
+
checkoutSessionId: string;
|
|
782
|
+
getDeliveryAddress?: boolean;
|
|
783
|
+
getDeclineFlowUrl?: boolean;
|
|
784
|
+
publicKeyId: string;
|
|
785
|
+
region: Region;
|
|
952
786
|
}
|
|
953
|
-
interface
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
787
|
+
interface UpdateAmazonCheckoutSessionRequest {
|
|
788
|
+
amount: PaymentAmount;
|
|
789
|
+
chargePermissionType?: ChargePermissionType;
|
|
790
|
+
checkoutCancelUrl?: string;
|
|
791
|
+
checkoutResultReturnUrl: string;
|
|
792
|
+
checkoutSessionId: string;
|
|
793
|
+
publicKeyId: string;
|
|
794
|
+
recurringMetadata?: RecurringMetadata;
|
|
795
|
+
region: Region;
|
|
957
796
|
}
|
|
958
|
-
interface
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
moveFocus?: boolean;
|
|
963
|
-
id?: string;
|
|
964
|
-
ariaAttributes?: AriaAttributes;
|
|
797
|
+
interface CheckoutSessionConfig {
|
|
798
|
+
payloadJSON: string;
|
|
799
|
+
signature: string;
|
|
800
|
+
publicKeyId: string;
|
|
965
801
|
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
errorMessage: string;
|
|
970
|
-
error: string;
|
|
802
|
+
interface DeliverySpecifications {
|
|
803
|
+
specialRestrictions?: string[];
|
|
804
|
+
addressRestrictions?: AddressRestrictions;
|
|
971
805
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
* Expects a string or string array of message to add to the panel to be read out
|
|
976
|
-
* For testing purposes can be made visible
|
|
977
|
-
*/
|
|
978
|
-
declare class SRPanel extends BaseElement<SRPanelProps> {
|
|
979
|
-
static readonly type = "srPanel";
|
|
980
|
-
static readonly defaultProps: Partial<SRPanelProps>;
|
|
981
|
-
private readonly srPanelContainer;
|
|
982
|
-
private readonly id;
|
|
983
|
-
private readonly showPanel;
|
|
984
|
-
private readonly _enabled;
|
|
985
|
-
private readonly _moveFocus;
|
|
986
|
-
private componentRef;
|
|
987
|
-
constructor(checkout: ICore, props?: SRPanelProps);
|
|
988
|
-
setComponentRef: (ref: any) => void;
|
|
989
|
-
get enabled(): boolean;
|
|
990
|
-
get moveFocus(): boolean;
|
|
991
|
-
setAriaProps(ariaAttributes: AriaAttributes): void;
|
|
992
|
-
setMessages: (messages: string[] | string | null) => void;
|
|
993
|
-
render(): h.JSX.Element;
|
|
806
|
+
interface AddressRestrictions {
|
|
807
|
+
type?: 'Allowed' | 'NotAllowed';
|
|
808
|
+
restrictions?: Restrictions;
|
|
994
809
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
srPanel?: SRPanel;
|
|
1000
|
-
analytics?: IAnalytics;
|
|
1001
|
-
resources?: Resources;
|
|
1002
|
-
risk?: RiskElement;
|
|
810
|
+
interface Restrictions {
|
|
811
|
+
[key: string]: {
|
|
812
|
+
zipCodes?: string[];
|
|
813
|
+
statesOrRegions?: string[];
|
|
1003
814
|
};
|
|
1004
|
-
/**
|
|
1005
|
-
* Identifies if the Element is the DropIn element
|
|
1006
|
-
*/
|
|
1007
|
-
isDropin?: boolean;
|
|
1008
815
|
}
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
render(): ComponentChild | Error;
|
|
1019
|
-
mount(domNode: HTMLElement | string): IBaseElement;
|
|
1020
|
-
update(props: Partial<P>): IBaseElement;
|
|
1021
|
-
unmount(): IBaseElement;
|
|
1022
|
-
remove(): void;
|
|
1023
|
-
activate(): void;
|
|
816
|
+
|
|
817
|
+
interface ANCVConfiguration extends UIElementProps {
|
|
818
|
+
paymentData?: string;
|
|
819
|
+
data: ANCVDataState;
|
|
820
|
+
onOrderRequest?: onOrderRequestCallbackType;
|
|
821
|
+
onOrderUpdated?: onOrderUpdatedCallbackType;
|
|
822
|
+
}
|
|
823
|
+
interface ANCVDataState {
|
|
824
|
+
beneficiaryId: string;
|
|
1024
825
|
}
|
|
1025
826
|
|
|
1026
|
-
type
|
|
1027
|
-
type
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
827
|
+
type Initiative = 'web' | 'messaging';
|
|
828
|
+
type ApplePayPaymentOrderDetails = {
|
|
829
|
+
orderTypeIdentifier: string;
|
|
830
|
+
orderIdentifier: string;
|
|
831
|
+
webServiceURL: string;
|
|
832
|
+
authenticationToken: string;
|
|
833
|
+
};
|
|
834
|
+
type ApplePayPaymentAuthorizationResult = ApplePayJS.ApplePayPaymentAuthorizationResult & {
|
|
835
|
+
orderDetails?: ApplePayPaymentOrderDetails;
|
|
836
|
+
};
|
|
837
|
+
type ApplePayButtonType = 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'plain' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';
|
|
838
|
+
type ApplePayButtonStyle = 'black' | 'white' | 'white-outline';
|
|
839
|
+
interface ApplePayConfiguration extends UIElementProps {
|
|
1036
840
|
/**
|
|
1037
|
-
*
|
|
1038
|
-
* @
|
|
841
|
+
* Enables the ApplePay Express Flow & also used for analytics
|
|
842
|
+
* @defaultValue false
|
|
843
|
+
*/
|
|
844
|
+
isExpress?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* Used for analytics
|
|
847
|
+
*/
|
|
848
|
+
expressPage?: 'cart' | 'minicart' | 'pdp' | 'checkout';
|
|
849
|
+
/**
|
|
850
|
+
* The Apple Pay version number your website supports.
|
|
851
|
+
* @default highest supported version by the shopper device
|
|
852
|
+
* @see {@link https://developer.apple.com/documentation/applepayontheweb/apple-pay-on-the-web-version-history Apple Pay on the Web Version History}
|
|
1039
853
|
*/
|
|
1040
|
-
|
|
854
|
+
version?: number;
|
|
1041
855
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1044
|
-
* @internal
|
|
856
|
+
* Part of the 'ApplePayLineItem' object, which sets the label of the payment request
|
|
857
|
+
* @see {@link https://developer.apple.com/documentation/applepayontheweb/applepaylineitem ApplePayLineItem docs}
|
|
1045
858
|
*/
|
|
1046
|
-
|
|
859
|
+
totalPriceLabel?: string;
|
|
1047
860
|
/**
|
|
1048
|
-
*
|
|
1049
|
-
* @internal
|
|
861
|
+
* @default 'final'
|
|
1050
862
|
*/
|
|
1051
|
-
|
|
863
|
+
totalPriceStatus?: ApplePayJS.ApplePayLineItemType;
|
|
1052
864
|
/**
|
|
1053
|
-
*
|
|
1054
|
-
* @internal
|
|
865
|
+
* ApplePay configuration sent by the /paymentMethods response
|
|
1055
866
|
*/
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
amount?: PaymentAmount;
|
|
1061
|
-
secondaryAmount?: PaymentAmount;
|
|
867
|
+
configuration?: {
|
|
868
|
+
merchantName?: string;
|
|
869
|
+
merchantId?: string;
|
|
870
|
+
};
|
|
1062
871
|
/**
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
872
|
+
* Used to override the domain name for the Apple Pay button. Useful when using ApplePay within cross-domain iframe
|
|
873
|
+
* For more context: https://github.com/Adyen/adyen-web/pull/3340
|
|
1065
874
|
*/
|
|
1066
|
-
|
|
1067
|
-
/** @internal */
|
|
1068
|
-
payButton?: (options: PayButtonProps) => h.JSX.Element;
|
|
1069
|
-
/** @internal */
|
|
1070
|
-
loadingContext?: string;
|
|
1071
|
-
/** @internal */
|
|
1072
|
-
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
1073
|
-
/** @internal */
|
|
875
|
+
domainName?: string;
|
|
1074
876
|
clientKey?: string;
|
|
1075
|
-
|
|
1076
|
-
elementRef?: UIElement;
|
|
1077
|
-
/** @internal */
|
|
1078
|
-
i18n?: Language;
|
|
877
|
+
initiative?: Initiative;
|
|
1079
878
|
/**
|
|
1080
|
-
*
|
|
1081
|
-
* @internal
|
|
879
|
+
* A set of line items that explain recurring payments and/or additional charges.
|
|
1082
880
|
*/
|
|
1083
|
-
|
|
881
|
+
lineItems?: ApplePayJS.ApplePayLineItem[];
|
|
1084
882
|
/**
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
* @
|
|
883
|
+
* The payment capabilities supported by the merchant.
|
|
884
|
+
* The value must at least contain ApplePayMerchantCapability.supports3DS.
|
|
885
|
+
* @default ['supports3DS']
|
|
1088
886
|
*/
|
|
1089
|
-
|
|
887
|
+
merchantCapabilities?: ApplePayJS.ApplePayMerchantCapability[];
|
|
1090
888
|
/**
|
|
1091
|
-
*
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
|
|
1096
|
-
interface ComponentMethodsRef {
|
|
1097
|
-
showValidation?: () => void;
|
|
1098
|
-
setStatus?(status: UIElementStatus): void;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
declare enum TxVariants {
|
|
1102
|
-
/** internal */
|
|
1103
|
-
address = "address",
|
|
1104
|
-
bankTransfer_IBAN = "bankTransfer_IBAN",
|
|
1105
|
-
bankTransfer_BE = "bankTransfer_BE",
|
|
1106
|
-
bankTransfer_NL = "bankTransfer_NL",
|
|
1107
|
-
bankTransfer_PL = "bankTransfer_PL",
|
|
1108
|
-
bankTransfer_FR = "bankTransfer_FR",
|
|
1109
|
-
bankTransfer_CH = "bankTransfer_CH",
|
|
1110
|
-
bankTransfer_IE = "bankTransfer_IE",
|
|
1111
|
-
bankTransfer_GB = "bankTransfer_GB",
|
|
1112
|
-
bankTransfer_DE = "bankTransfer_DE",
|
|
1113
|
-
bankTransfer_AE = "bankTransfer_AE",
|
|
1114
|
-
bankTransfer_AT = "bankTransfer_AT",
|
|
1115
|
-
bankTransfer_AU = "bankTransfer_AU",
|
|
1116
|
-
bankTransfer_BG = "bankTransfer_BG",
|
|
1117
|
-
bankTransfer_CA = "bankTransfer_CA",
|
|
1118
|
-
bankTransfer_EE = "bankTransfer_EE",
|
|
1119
|
-
bankTransfer_ES = "bankTransfer_ES",
|
|
1120
|
-
bankTransfer_FI = "bankTransfer_FI",
|
|
1121
|
-
bankTransfer_HK = "bankTransfer_HK",
|
|
1122
|
-
bankTransfer_HU = "bankTransfer_HU",
|
|
1123
|
-
bankTransfer_IT = "bankTransfer_IT",
|
|
1124
|
-
bankTransfer_JP = "bankTransfer_JP",
|
|
1125
|
-
bankTransfer_LU = "bankTransfer_LU",
|
|
1126
|
-
bankTransfer_NZ = "bankTransfer_NZ",
|
|
1127
|
-
bankTransfer_PT = "bankTransfer_PT",
|
|
1128
|
-
bankTransfer_SG = "bankTransfer_SG",
|
|
1129
|
-
bankTransfer_SK = "bankTransfer_SK",
|
|
1130
|
-
bankTransfer_US = "bankTransfer_US",
|
|
1131
|
-
donation = "donation",
|
|
1132
|
-
personal_details = "personal_details",
|
|
1133
|
-
dropin = "dropin",
|
|
1134
|
-
/** internal */
|
|
1135
|
-
/** Card */
|
|
1136
|
-
bcmc = "bcmc",
|
|
1137
|
-
card = "card",
|
|
1138
|
-
scheme = "scheme",
|
|
1139
|
-
storedCard = "storedCard",
|
|
1140
|
-
customCard = "customcard",
|
|
1141
|
-
/** Card */
|
|
1142
|
-
/** ThreeDS */
|
|
1143
|
-
threeDS2Challenge = "threeDS2Challenge",
|
|
1144
|
-
threeDS2Fingerprint = "threeDS2Fingerprint",
|
|
1145
|
-
threeDS2DeviceFingerprint = "threeDS2DeviceFingerprint",
|
|
1146
|
-
/** ThreeDS */
|
|
1147
|
-
/** Direct debit */
|
|
1148
|
-
ach = "ach",
|
|
1149
|
-
directdebit_GB = "directdebit_GB",
|
|
1150
|
-
sepadirectdebit = "sepadirectdebit",
|
|
1151
|
-
eft_directdebit_CA = "eft_directdebit_CA",
|
|
1152
|
-
/** Direct debit */
|
|
1153
|
-
/** Open Invoice */
|
|
1154
|
-
affirm = "affirm",
|
|
1155
|
-
afterpay = "afterpay",
|
|
1156
|
-
afterpay_default = "afterpay_default",
|
|
1157
|
-
afterpay_b2b = "afterpay_b2b",
|
|
1158
|
-
atome = "atome",
|
|
1159
|
-
facilypay_3x = "facilypay_3x",
|
|
1160
|
-
facilypay_4x = "facilypay_4x",
|
|
1161
|
-
facilypay_6x = "facilypay_6x",
|
|
1162
|
-
facilypay_10x = "facilypay_10x",
|
|
1163
|
-
facilypay_12x = "facilypay_12x",
|
|
1164
|
-
ratepay = "ratepay",
|
|
1165
|
-
ratepay_directdebit = "ratepay_directdebit",
|
|
1166
|
-
/** Open Invoice */
|
|
1167
|
-
/** Wallets */
|
|
1168
|
-
amazonpay = "amazonpay",
|
|
1169
|
-
applepay = "applepay",
|
|
1170
|
-
cashapp = "cashapp",
|
|
1171
|
-
clicktopay = "clicktopay",
|
|
1172
|
-
googlepay = "googlepay",
|
|
1173
|
-
paypal = "paypal",
|
|
1174
|
-
fastlane = "fastlane",
|
|
1175
|
-
paywithgoogle = "paywithgoogle",
|
|
1176
|
-
/** Wallets */
|
|
1177
|
-
/** Voucher */
|
|
1178
|
-
boletobancario = "boletobancario",
|
|
1179
|
-
boletobancario_itau = "boletobancario_itau",
|
|
1180
|
-
boletobancario_santander = "boletobancario_santander",
|
|
1181
|
-
primeiropay_boleto = "primeiropay_boleto",
|
|
1182
|
-
doku = "doku",
|
|
1183
|
-
doku_alfamart = "doku_alfamart",
|
|
1184
|
-
doku_permata_lite_atm = "doku_permata_lite_atm",
|
|
1185
|
-
doku_indomaret = "doku_indomaret",
|
|
1186
|
-
doku_atm_mandiri_va = "doku_atm_mandiri_va",
|
|
1187
|
-
doku_sinarmas_va = "doku_sinarmas_va",
|
|
1188
|
-
doku_mandiri_va = "doku_mandiri_va",
|
|
1189
|
-
doku_cimb_va = "doku_cimb_va",
|
|
1190
|
-
doku_danamon_va = "doku_danamon_va",
|
|
1191
|
-
doku_bri_va = "doku_bri_va",
|
|
1192
|
-
doku_bni_va = "doku_bni_va",
|
|
1193
|
-
doku_bca_va = "doku_bca_va",
|
|
1194
|
-
doku_wallet = "doku_wallet",
|
|
1195
|
-
oxxo = "oxxo",
|
|
1196
|
-
/** Voucher */
|
|
1197
|
-
/** issuerList */
|
|
1198
|
-
billdesk_online = "billdesk_online",
|
|
1199
|
-
billdesk_wallet = "billdesk_wallet",
|
|
1200
|
-
dotpay = "dotpay",
|
|
1201
|
-
eps = "eps",
|
|
1202
|
-
iris = "iris",
|
|
1203
|
-
molpay_ebanking_fpx_MY = "molpay_ebanking_fpx_MY",
|
|
1204
|
-
molpay_ebanking_TH = "molpay_ebanking_TH",
|
|
1205
|
-
molpay_ebanking_VN = "molpay_ebanking_VN",
|
|
1206
|
-
onlineBanking_CZ = "onlineBanking_CZ",
|
|
1207
|
-
onlinebanking_IN = "onlinebanking_IN",
|
|
1208
|
-
onlineBanking_PL = "onlineBanking_PL",
|
|
1209
|
-
onlineBanking_SK = "onlineBanking_SK",
|
|
1210
|
-
paybybank = "paybybank",
|
|
1211
|
-
payu_IN_cashcard = "payu_IN_cashcard",
|
|
1212
|
-
payu_IN_nb = "payu_IN_nb",
|
|
1213
|
-
wallet_IN = "wallet_IN",
|
|
1214
|
-
/** issuerList */
|
|
1215
|
-
/** Dragonpay */
|
|
1216
|
-
dragonpay = "dragonpay",
|
|
1217
|
-
dragonpay_ebanking = "dragonpay_ebanking",
|
|
1218
|
-
dragonpay_otc_banking = "dragonpay_otc_banking",
|
|
1219
|
-
dragonpay_otc_non_banking = "dragonpay_otc_non_banking",
|
|
1220
|
-
dragonpay_otc_philippines = "dragonpay_otc_philippines",
|
|
1221
|
-
/** Dragonpay */
|
|
1222
|
-
/** Econtext */
|
|
1223
|
-
econtext = "econtext",
|
|
1224
|
-
econtext_atm = "econtext_atm",
|
|
1225
|
-
econtext_online = "econtext_online",
|
|
1226
|
-
econtext_seven_eleven = "econtext_seven_eleven",
|
|
1227
|
-
econtext_stores = "econtext_stores",
|
|
1228
|
-
/** Econtext */
|
|
1229
|
-
/** Redirect */
|
|
1230
|
-
giropay = "giropay",
|
|
1231
|
-
multibanco = "multibanco",
|
|
1232
|
-
redirect = "redirect",
|
|
1233
|
-
twint = "twint",
|
|
1234
|
-
vipps = "vipps",
|
|
1235
|
-
trustly = "trustly",
|
|
1236
|
-
paybybank_AIS_DD = "paybybank_AIS_DD",
|
|
1237
|
-
riverty = "riverty",
|
|
1238
|
-
paybybank_pix = "paybybank_pix",
|
|
1239
|
-
/** Redirect */
|
|
1240
|
-
/** Klarna */
|
|
1241
|
-
klarna = "klarna",
|
|
1242
|
-
klarna_account = "klarna_account",
|
|
1243
|
-
klarna_paynow = "klarna_paynow",
|
|
1244
|
-
klarna_b2b = "klarna_b2b",
|
|
1245
|
-
/** Klarna */
|
|
1246
|
-
/** QRLoader */
|
|
1247
|
-
bcmc_mobile = "bcmc_mobile",
|
|
1248
|
-
bcmc_mobile_QR = "bcmc_mobile_QR",
|
|
1249
|
-
pix = "pix",
|
|
1250
|
-
swish = "swish",
|
|
1251
|
-
wechatpay = "wechatpay",
|
|
1252
|
-
wechatpayQR = "wechatpayQR",
|
|
1253
|
-
promptpay = "promptpay",
|
|
1254
|
-
paynow = "paynow",
|
|
1255
|
-
duitnow = "duitnow",
|
|
1256
|
-
/** QRLoader */
|
|
1257
|
-
/** Await */
|
|
1258
|
-
blik = "blik",
|
|
1259
|
-
mbway = "mbway",
|
|
1260
|
-
ancv = "ancv",
|
|
1261
|
-
payto = "payto",
|
|
1262
|
-
upi = "upi",// also QR
|
|
1263
|
-
upi_qr = "upi_qr",// also QR
|
|
1264
|
-
upi_intent = "upi_intent",// also QR
|
|
1265
|
-
/** Await */
|
|
1266
|
-
/** Giftcard */
|
|
1267
|
-
giftcard = "giftcard",
|
|
1268
|
-
mealVoucher_FR = "mealVoucher_FR",
|
|
1269
|
-
mealVoucher_FR_natixis = "mealVoucher_FR_natixis",
|
|
1270
|
-
mealVoucher_FR_sodexo = "mealVoucher_FR_sodexo",
|
|
1271
|
-
mealVoucher_FR_groupeup = "mealVoucher_FR_groupeup"
|
|
1272
|
-
/** Giftcard */
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
type AchForm = {
|
|
1276
|
-
selectedAccountType: string;
|
|
1277
|
-
ownerName: string;
|
|
1278
|
-
routingNumber: string;
|
|
1279
|
-
accountNumber: string;
|
|
1280
|
-
accountNumberVerification: string;
|
|
1281
|
-
};
|
|
1282
|
-
type AchFormPrefillData = Partial<Pick<AchForm, 'ownerName'>>;
|
|
1283
|
-
|
|
1284
|
-
interface AchConfiguration extends UIElementProps {
|
|
889
|
+
* A value that indicates whether the shipping mode prevents the user from editing the shipping address.
|
|
890
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/shippingcontacteditingmode}
|
|
891
|
+
*/
|
|
892
|
+
shippingContactEditingMode?: ApplePayJS.ApplePayShippingContactEditingMode;
|
|
1285
893
|
/**
|
|
1286
|
-
*
|
|
894
|
+
* A set of shipping method objects that describe the available shipping methods.
|
|
1287
895
|
*/
|
|
1288
|
-
|
|
896
|
+
shippingMethods?: ApplePayJS.ApplePayShippingMethod[];
|
|
1289
897
|
/**
|
|
1290
|
-
*
|
|
898
|
+
* How the items are to be shipped.
|
|
1291
899
|
*/
|
|
1292
|
-
|
|
900
|
+
shippingType?: ApplePayJS.ApplePayShippingType;
|
|
1293
901
|
/**
|
|
1294
|
-
*
|
|
1295
|
-
* @default true
|
|
902
|
+
* A list of ISO 3166 country codes for limiting payments to cards from specific countries.
|
|
1296
903
|
*/
|
|
1297
|
-
|
|
904
|
+
supportedCountries?: string[];
|
|
1298
905
|
/**
|
|
1299
|
-
*
|
|
1300
|
-
* @default false
|
|
906
|
+
* The payment networks supported by the merchant.
|
|
1301
907
|
*/
|
|
1302
|
-
|
|
908
|
+
supportedNetworks?: string[];
|
|
1303
909
|
/**
|
|
1304
|
-
*
|
|
1305
|
-
* @
|
|
910
|
+
* ApplePayRecurringPaymentRequest - Represents a request to set up a recurring payment, typically a subscription.
|
|
911
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepayrecurringpaymentrequest}
|
|
1306
912
|
*/
|
|
1307
|
-
|
|
913
|
+
recurringPaymentRequest?: ApplePayJS.ApplePayRecurringPaymentRequest;
|
|
1308
914
|
/**
|
|
1309
|
-
*
|
|
1310
|
-
* @internal
|
|
915
|
+
* The billing information that you require from the user in order to process the transaction.
|
|
1311
916
|
*/
|
|
1312
|
-
|
|
1313
|
-
}
|
|
1314
|
-
interface AchPlaceholders {
|
|
1315
|
-
accountTypeSelector?: string;
|
|
1316
|
-
ownerName?: string;
|
|
1317
|
-
routingNumber?: string;
|
|
1318
|
-
accountNumber?: string;
|
|
1319
|
-
accountNumberVerification?: string;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
declare const SUPPORTED_LOCALES_EU: readonly ["en_GB", "de_DE", "fr_FR", "it_IT", "es_ES"];
|
|
1323
|
-
declare const SUPPORTED_LOCALES_US: readonly ["en_US"];
|
|
1324
|
-
|
|
1325
|
-
declare class AmazonPayElement extends UIElement<AmazonPayConfiguration> {
|
|
1326
|
-
static readonly type = TxVariants.amazonpay;
|
|
1327
|
-
protected static readonly defaultProps: Partial<AmazonPayConfiguration>;
|
|
1328
|
-
protected componentRef: AmazonPayComponentRef | undefined;
|
|
1329
|
-
formatProps(props: AmazonPayConfiguration): AmazonPayConfiguration;
|
|
917
|
+
requiredBillingContactFields?: ApplePayJS.ApplePayContactField[];
|
|
1330
918
|
/**
|
|
1331
|
-
*
|
|
919
|
+
* The shipping information that you require from the user in order to fulfill the order.
|
|
1332
920
|
*/
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
921
|
+
requiredShippingContactFields?: ApplePayJS.ApplePayContactField[];
|
|
922
|
+
/**
|
|
923
|
+
* Billing contact information for the user.
|
|
924
|
+
*/
|
|
925
|
+
billingContact?: ApplePayJS.ApplePayPaymentContact;
|
|
926
|
+
/**
|
|
927
|
+
* Shipping contact information for the user.
|
|
928
|
+
*/
|
|
929
|
+
shippingContact?: ApplePayJS.ApplePayPaymentContact;
|
|
930
|
+
/**
|
|
931
|
+
* It can be used to render the Apple Pay Code in a new window rather than as an overlay modal
|
|
932
|
+
* Recommended to be used in case of using Apple Pay within an iframe, where the modal may not be presented correctly over the parent website
|
|
933
|
+
*
|
|
934
|
+
* @defaultValue 'modal'
|
|
935
|
+
*/
|
|
936
|
+
renderApplePayCodeAs?: ApplePayWebConfiguration['renderApplePayCodeAs'];
|
|
937
|
+
/**
|
|
938
|
+
* Optional user-defined data.
|
|
939
|
+
*/
|
|
940
|
+
applicationData?: string;
|
|
941
|
+
/**
|
|
942
|
+
* Called when the shopper clicks the Apple Pay button
|
|
1344
943
|
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
type Currency = 'EUR' | 'GBP' | 'USD';
|
|
1351
|
-
type Region = 'EU' | 'UK' | 'US';
|
|
1352
|
-
type SupportedLocale = (typeof SUPPORTED_LOCALES_EU)[number] | (typeof SUPPORTED_LOCALES_US)[number];
|
|
1353
|
-
interface AmazonPayButtonInstance {
|
|
1354
|
-
onClick(handler: () => void): void;
|
|
1355
|
-
}
|
|
1356
|
-
interface AmazonWindowObject {
|
|
1357
|
-
Pay: {
|
|
1358
|
-
renderButton(selector: string, settings: AmazonPayButtonSettings): AmazonPayButtonInstance;
|
|
1359
|
-
initCheckout(options: AmazonPayButtonSettings & {
|
|
1360
|
-
createCheckoutSessionConfig: CheckoutSessionConfig;
|
|
1361
|
-
}): void;
|
|
1362
|
-
signout(): void;
|
|
1363
|
-
bindChangeAction(selector: string, options: ChangeActionOptions): void;
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
interface RecurringMetadata {
|
|
1367
|
-
frequency: {
|
|
1368
|
-
unit: string;
|
|
1369
|
-
value: FrequencyUnit;
|
|
1370
|
-
};
|
|
1371
|
-
amount: {
|
|
1372
|
-
amount: string;
|
|
1373
|
-
currencyCode: Currency;
|
|
1374
|
-
};
|
|
1375
|
-
}
|
|
1376
|
-
interface AmazonPayBackendConfiguration {
|
|
1377
|
-
merchantId?: string;
|
|
1378
|
-
publicKeyId?: string;
|
|
1379
|
-
region?: Region;
|
|
1380
|
-
storeId?: string;
|
|
1381
|
-
}
|
|
1382
|
-
interface AmazonPayConfiguration extends UIElementProps {
|
|
1383
|
-
addressDetails?: AddressDetails;
|
|
1384
|
-
amazonPayToken?: string;
|
|
1385
|
-
amazonCheckoutSessionId?: string;
|
|
1386
|
-
amount?: PaymentAmount;
|
|
1387
|
-
buttonColor?: ButtonColor;
|
|
1388
|
-
cancelUrl?: string;
|
|
1389
|
-
chargePermissionType?: ChargePermissionType;
|
|
1390
|
-
checkoutMode?: string;
|
|
1391
|
-
clientKey?: string;
|
|
1392
|
-
configuration?: AmazonPayBackendConfiguration;
|
|
1393
|
-
currency?: Currency;
|
|
1394
|
-
deliverySpecifications?: DeliverySpecifications;
|
|
1395
|
-
design?: string;
|
|
1396
|
-
environment?: string;
|
|
1397
|
-
loadingContext?: string;
|
|
1398
|
-
locale?: string;
|
|
1399
|
-
merchantMetadata?: MerchantMetadata;
|
|
1400
|
-
onSubmit?(state: SubmitData, element: AmazonPayElement, actions: {
|
|
1401
|
-
resolve: (response: CheckoutAdvancedFlowResponse) => void;
|
|
1402
|
-
reject: () => void;
|
|
1403
|
-
}): void;
|
|
1404
|
-
payButton?: (props: PayButtonProps) => h.JSX.Element;
|
|
1405
|
-
placement?: Placement;
|
|
1406
|
-
productType?: ProductType;
|
|
1407
|
-
recurringMetadata?: RecurringMetadata;
|
|
1408
|
-
returnUrl?: string;
|
|
1409
|
-
showChangePaymentDetailsButton?: boolean;
|
|
1410
|
-
showOrderButton?: boolean;
|
|
1411
|
-
showSignOutButton?: boolean;
|
|
1412
|
-
signature?: string;
|
|
1413
|
-
onClick?: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
1414
|
-
onError?: (error: AdyenCheckoutError, component: UIElement) => void;
|
|
1415
|
-
onSignOut?: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
944
|
+
* @param resolve - Must be called if the button should be displayed
|
|
945
|
+
* @param reject - Must be called if the button should not be displayed
|
|
946
|
+
* @returns
|
|
947
|
+
*/
|
|
948
|
+
onClick?: (resolve: () => void, reject: () => void) => void;
|
|
1416
949
|
/**
|
|
1417
|
-
*
|
|
950
|
+
* A callback function the Apple Pay SDK calls when the Apple Pay code modal or window closes.
|
|
1418
951
|
*/
|
|
1419
|
-
|
|
952
|
+
onApplePayCodeClose?: ApplePayWebConfiguration['onApplePayCodeClose'];
|
|
1420
953
|
/**
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
954
|
+
* Callback called when ApplePay authorize the payment.
|
|
955
|
+
* Must be resolved/rejected with the action object.
|
|
956
|
+
*
|
|
957
|
+
* @param data - Authorization event from ApplePay, along with formatted billingAddress and deliveryAddress
|
|
958
|
+
* @param actions - Object to continue/stop with the payment flow
|
|
959
|
+
*
|
|
960
|
+
* @remarks
|
|
961
|
+
* If actions.resolve() is called, the payment flow will be triggered.
|
|
962
|
+
* If actions.reject() is called, the overlay will display an error
|
|
1423
963
|
*/
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
placement?: Placement;
|
|
1451
|
-
productType?: ProductType;
|
|
1452
|
-
recurringMetadata?: RecurringMetadata;
|
|
1453
|
-
ref: RefObject<{
|
|
1454
|
-
initCheckout(): void;
|
|
1455
|
-
}>;
|
|
1456
|
-
returnUrl?: string;
|
|
1457
|
-
showPayButton: boolean;
|
|
1458
|
-
}
|
|
1459
|
-
interface SignOutButtonProps {
|
|
1460
|
-
amazonRef: AmazonWindowObject;
|
|
1461
|
-
onSignOut: (resolve: (value?: unknown) => void, reject: () => void) => Promise<void>;
|
|
1462
|
-
}
|
|
1463
|
-
interface ChangePaymentDetailsButtonProps {
|
|
1464
|
-
amazonCheckoutSessionId: string;
|
|
1465
|
-
amazonRef: AmazonWindowObject;
|
|
1466
|
-
}
|
|
1467
|
-
interface ChangeActionOptions {
|
|
1468
|
-
amazonCheckoutSessionId: string;
|
|
1469
|
-
changeAction: 'changeAddress' | 'changePayment';
|
|
1470
|
-
}
|
|
1471
|
-
interface OrderButtonProps {
|
|
1472
|
-
amazonCheckoutSessionId: string;
|
|
1473
|
-
clientKey: string;
|
|
1474
|
-
chargePermissionType?: ChargePermissionType;
|
|
1475
|
-
onError: (error: AdyenCheckoutError, component: UIElement) => void;
|
|
1476
|
-
recurringMetadata: RecurringMetadata;
|
|
1477
|
-
ref: RefObject<{
|
|
1478
|
-
createOrder(): void;
|
|
1479
|
-
}>;
|
|
1480
|
-
region: Region;
|
|
1481
|
-
returnUrl: string;
|
|
1482
|
-
publicKeyId: string;
|
|
1483
|
-
}
|
|
1484
|
-
interface AmazonPayElementData {
|
|
1485
|
-
paymentMethod: {
|
|
1486
|
-
type: string;
|
|
1487
|
-
checkoutSessionId?: string;
|
|
1488
|
-
};
|
|
1489
|
-
browserInfo: BrowserInfo;
|
|
1490
|
-
}
|
|
1491
|
-
interface AmazonPayButtonSettings {
|
|
1492
|
-
buttonColor?: ButtonColor;
|
|
1493
|
-
design?: string;
|
|
964
|
+
onAuthorized?: (data: {
|
|
965
|
+
authorizedEvent: ApplePayJS.ApplePayPaymentAuthorizedEvent;
|
|
966
|
+
billingAddress?: Partial<AddressData>;
|
|
967
|
+
deliveryAddress?: Partial<AddressData>;
|
|
968
|
+
}, actions: {
|
|
969
|
+
resolve: () => void;
|
|
970
|
+
reject: (error?: ApplePayJS.ApplePayError) => void;
|
|
971
|
+
}) => void;
|
|
972
|
+
/**
|
|
973
|
+
* Collect the order tracking details if available.
|
|
974
|
+
* This callback is invoked when a successfull payment is resolved
|
|
975
|
+
*
|
|
976
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentorderdetails}
|
|
977
|
+
* @param resolve - Must be called with the orderDetails fields
|
|
978
|
+
* @param reject - Must be called if something failed during the order creation. Calling 'reject' won't cancel the payment flow
|
|
979
|
+
*/
|
|
980
|
+
onOrderTrackingRequest?: (resolve: (orderDetails: ApplePayPaymentOrderDetails) => void, reject: () => void) => void;
|
|
981
|
+
/**
|
|
982
|
+
* An event handler the system calls when it displays the payment sheet
|
|
983
|
+
*
|
|
984
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/onvalidatemerchant}
|
|
985
|
+
* @param resolve - Must be called with an opaque message session object
|
|
986
|
+
* @param reject - Must be called if something failed during the merchant validation
|
|
987
|
+
* @param validationURL - The URL your server must use to validate itself and obtain a merchant session object.
|
|
988
|
+
*/
|
|
989
|
+
onValidateMerchant?: (resolve: (merchantSession: unknown) => void, reject: (error?: string) => void, validationURL: string) => Promise<void>;
|
|
1494
990
|
/**
|
|
1495
|
-
*
|
|
991
|
+
* An event handler to call when the user selects a new payment method.
|
|
992
|
+
*
|
|
993
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/onpaymentmethodselected}
|
|
994
|
+
* @param resolve - Completes the selection of a payment method with an update.
|
|
995
|
+
* @param reject - Completes the selection of a payment method with no update.
|
|
996
|
+
* @param event - The event parameter contains the paymentMethod attribute.
|
|
1496
997
|
*/
|
|
1497
|
-
|
|
998
|
+
onPaymentMethodSelected?: (resolve: (paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => void, reject: (paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => void, event: ApplePayJS.ApplePayPaymentMethodSelectedEvent) => void;
|
|
1498
999
|
/**
|
|
1499
|
-
*
|
|
1000
|
+
* An event handler to call when the user selects a shipping contact in the payment sheet.
|
|
1001
|
+
*
|
|
1002
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/onshippingcontactselected}
|
|
1003
|
+
* @param resolve - Completes the selection of a shipping contact with an update.
|
|
1004
|
+
* @param reject - Completes the selection of a shipping contact with no update.
|
|
1005
|
+
* @param event - The event parameter contains the shippingContact attribute.
|
|
1500
1006
|
*/
|
|
1501
|
-
|
|
1007
|
+
onShippingContactSelected?: (resolve: (shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => void, reject: (shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => void, event: ApplePayJS.ApplePayShippingContactSelectedEvent) => void;
|
|
1502
1008
|
/**
|
|
1503
|
-
*
|
|
1009
|
+
* Completes the selection of a shipping method with an update.
|
|
1010
|
+
*
|
|
1011
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/completeshippingmethodselection}
|
|
1012
|
+
* @param resolve - Completes the selection of a shipping method with an update.
|
|
1013
|
+
* @param reject - Completes the selection of a shipping method with no update.
|
|
1014
|
+
* @param event - The event parameter contains the shippingMethod attribute.
|
|
1504
1015
|
*/
|
|
1505
|
-
|
|
1016
|
+
onShippingMethodSelected?: (resolve: (shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => void, reject: (shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => void, event: ApplePayJS.ApplePayShippingMethodSelectedEvent) => void;
|
|
1506
1017
|
/**
|
|
1507
|
-
*
|
|
1018
|
+
* The initial coupon code for the payment request.
|
|
1019
|
+
* @see {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/couponcode couponCode docs}
|
|
1508
1020
|
*/
|
|
1509
|
-
|
|
1021
|
+
couponCode?: ApplePayJS.ApplePayPaymentRequest['couponCode'];
|
|
1510
1022
|
/**
|
|
1511
|
-
*
|
|
1023
|
+
* A Boolean value that determines whether the payment sheet displays the coupon code field.
|
|
1024
|
+
* @see {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/supportscouponcode supportsCouponCode docs}
|
|
1512
1025
|
*/
|
|
1513
|
-
|
|
1026
|
+
supportsCouponCode?: ApplePayJS.ApplePayPaymentRequest['supportsCouponCode'];
|
|
1514
1027
|
/**
|
|
1515
|
-
*
|
|
1028
|
+
* An event handler called by the system when the user enters or updates a coupon code.
|
|
1029
|
+
*
|
|
1030
|
+
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/oncouponcodechanged}
|
|
1031
|
+
* @param resolve - Completes the change of a coupon code with an update.
|
|
1032
|
+
* @param reject - Completes the change of a coupon code with no update.
|
|
1033
|
+
* @param event - The event parameter contains the couponCode attribute.
|
|
1516
1034
|
*/
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
}
|
|
1525
|
-
interface AddressDetails {
|
|
1526
|
-
name?: string;
|
|
1527
|
-
addressLine1?: string;
|
|
1528
|
-
addressLine2?: string;
|
|
1529
|
-
addressLine3?: string;
|
|
1530
|
-
city?: string;
|
|
1531
|
-
districtOrCounty?: string;
|
|
1532
|
-
stateOrRegion?: string;
|
|
1533
|
-
postalCode?: string;
|
|
1534
|
-
countryCode?: string;
|
|
1535
|
-
phoneNumber?: string;
|
|
1536
|
-
}
|
|
1537
|
-
interface ChargeAmount {
|
|
1538
|
-
amount: string;
|
|
1539
|
-
currencyCode: Currency;
|
|
1035
|
+
onCouponCodeChanged?: (resolve: (update: ApplePayJS.ApplePayCouponCodeUpdate) => void, reject: (update: ApplePayJS.ApplePayCouponCodeUpdate) => void, event: ApplePayJS.ApplePayCouponCodeChangedEvent) => void;
|
|
1036
|
+
buttonColor?: ApplePayButtonStyle;
|
|
1037
|
+
buttonType?: ApplePayButtonType;
|
|
1038
|
+
/**
|
|
1039
|
+
* Used to tweak the text of the button types that contain text ('Continue with', 'Book with', etc)
|
|
1040
|
+
*/
|
|
1041
|
+
buttonLocale?: string;
|
|
1540
1042
|
}
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
chargePermissionType?: ChargePermissionType;
|
|
1547
|
-
deliverySpecifications?: DeliverySpecifications;
|
|
1548
|
-
merchantMetadata?: MerchantMetadata;
|
|
1549
|
-
paymentDetails?: {
|
|
1550
|
-
chargeAmount: ChargeAmount;
|
|
1551
|
-
paymentIntent: 'Confirm';
|
|
1552
|
-
presentmentCurrency: Currency;
|
|
1553
|
-
totalOrderAmount: ChargeAmount;
|
|
1554
|
-
};
|
|
1555
|
-
recurringMetadata?: RecurringMetadata;
|
|
1556
|
-
storeId: string;
|
|
1557
|
-
webCheckoutDetails: {
|
|
1558
|
-
checkoutCancelUrl?: string;
|
|
1559
|
-
checkoutMode?: 'ProcessOrder';
|
|
1560
|
-
checkoutResultReturnUrl?: string;
|
|
1561
|
-
checkoutReviewReturnUrl?: string;
|
|
1043
|
+
interface ApplePayElementData {
|
|
1044
|
+
paymentMethod: {
|
|
1045
|
+
type: string;
|
|
1046
|
+
applePayToken: string;
|
|
1047
|
+
isExpress?: boolean;
|
|
1562
1048
|
};
|
|
1049
|
+
billingAddress?: AddressData;
|
|
1050
|
+
deliveryAddress?: AddressData;
|
|
1563
1051
|
}
|
|
1564
|
-
interface
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
region?: Region;
|
|
1570
|
-
}
|
|
1571
|
-
interface UpdateAmazonCheckoutSessionRequest {
|
|
1572
|
-
amount: PaymentAmount;
|
|
1573
|
-
chargePermissionType?: ChargePermissionType;
|
|
1574
|
-
checkoutCancelUrl?: string;
|
|
1575
|
-
checkoutResultReturnUrl: string;
|
|
1576
|
-
checkoutSessionId: string;
|
|
1577
|
-
publicKeyId: string;
|
|
1578
|
-
recurringMetadata?: RecurringMetadata;
|
|
1579
|
-
region: Region;
|
|
1580
|
-
}
|
|
1581
|
-
interface CheckoutSessionConfig {
|
|
1582
|
-
payloadJSON: string;
|
|
1583
|
-
signature: string;
|
|
1584
|
-
publicKeyId: string;
|
|
1585
|
-
}
|
|
1586
|
-
interface DeliverySpecifications {
|
|
1587
|
-
specialRestrictions?: string[];
|
|
1588
|
-
addressRestrictions?: AddressRestrictions;
|
|
1052
|
+
interface ApplePaySessionRequest {
|
|
1053
|
+
displayName: string;
|
|
1054
|
+
domainName: string;
|
|
1055
|
+
initiative: Initiative;
|
|
1056
|
+
merchantIdentifier: string;
|
|
1589
1057
|
}
|
|
1590
|
-
interface
|
|
1591
|
-
|
|
1592
|
-
|
|
1058
|
+
interface ApplePayWebConfiguration {
|
|
1059
|
+
renderApplePayCodeAs?: 'modal' | 'window';
|
|
1060
|
+
onApplePayCodeClose?(): void;
|
|
1593
1061
|
}
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1062
|
+
|
|
1063
|
+
interface BankTransferResultProps {
|
|
1064
|
+
paymentMethodType?: string;
|
|
1065
|
+
reference?: string;
|
|
1066
|
+
totalAmount?: {
|
|
1067
|
+
value: number;
|
|
1068
|
+
currency: string;
|
|
1598
1069
|
};
|
|
1070
|
+
beneficiary?: string;
|
|
1071
|
+
iban?: string;
|
|
1072
|
+
bic?: string;
|
|
1073
|
+
accountNumber?: string;
|
|
1074
|
+
sortCode?: string;
|
|
1075
|
+
routingNumber?: string;
|
|
1076
|
+
branchCode?: string;
|
|
1077
|
+
bankCode?: string;
|
|
1078
|
+
onActionHandled?: (actionHandledObj: ActionHandledReturnObject) => void;
|
|
1599
1079
|
}
|
|
1600
1080
|
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1081
|
+
type BankTransferConfiguration = UIElementProps & BankTransferResultProps & {
|
|
1082
|
+
/**
|
|
1083
|
+
* Show/hide email address field
|
|
1084
|
+
* @default true
|
|
1085
|
+
*/
|
|
1086
|
+
showEmailAddress?: boolean;
|
|
1087
|
+
};
|
|
1088
|
+
interface BankTransferState extends UIElementProps {
|
|
1089
|
+
data: {
|
|
1090
|
+
shopperEmail?: string;
|
|
1091
|
+
};
|
|
1092
|
+
isValid: boolean;
|
|
1606
1093
|
}
|
|
1607
|
-
interface
|
|
1608
|
-
|
|
1094
|
+
interface BankTransferSchema {
|
|
1095
|
+
shopperEmail?: string;
|
|
1609
1096
|
}
|
|
1610
1097
|
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
authenticationToken: string;
|
|
1617
|
-
};
|
|
1618
|
-
type ApplePayPaymentAuthorizationResult = ApplePayJS.ApplePayPaymentAuthorizationResult & {
|
|
1619
|
-
orderDetails?: ApplePayPaymentOrderDetails;
|
|
1620
|
-
};
|
|
1621
|
-
type ApplePayButtonType = 'add-money' | 'book' | 'buy' | 'check-out' | 'continue' | 'contribute' | 'donate' | 'order' | 'pay' | 'plain' | 'reload' | 'rent' | 'set-up' | 'subscribe' | 'support' | 'tip' | 'top-up';
|
|
1622
|
-
type ApplePayButtonStyle = 'black' | 'white' | 'white-outline';
|
|
1623
|
-
interface ApplePayConfiguration extends UIElementProps {
|
|
1098
|
+
interface VoucherDetail {
|
|
1099
|
+
label: string;
|
|
1100
|
+
value: string;
|
|
1101
|
+
}
|
|
1102
|
+
interface VoucherProps {
|
|
1624
1103
|
/**
|
|
1625
|
-
*
|
|
1626
|
-
* @defaultValue false
|
|
1104
|
+
* Payment method used to generate the voucher.
|
|
1627
1105
|
*/
|
|
1628
|
-
|
|
1106
|
+
paymentMethodType: string;
|
|
1629
1107
|
/**
|
|
1630
|
-
*
|
|
1108
|
+
* Payment method image to be displayed on the voucher.
|
|
1631
1109
|
*/
|
|
1632
|
-
|
|
1110
|
+
imageUrl?: string;
|
|
1633
1111
|
/**
|
|
1634
|
-
*
|
|
1635
|
-
* @default highest supported version by the shopper device
|
|
1636
|
-
* @see {@link https://developer.apple.com/documentation/applepayontheweb/apple-pay-on-the-web-version-history Apple Pay on the Web Version History}
|
|
1112
|
+
* If applicable, it will render an issuer image next to the payment method image.
|
|
1637
1113
|
*/
|
|
1638
|
-
|
|
1114
|
+
issuerImageUrl?: string;
|
|
1639
1115
|
/**
|
|
1640
|
-
*
|
|
1641
|
-
* @see {@link https://developer.apple.com/documentation/applepayontheweb/applepaylineitem ApplePayLineItem docs}
|
|
1116
|
+
* Voucher instructions URL.
|
|
1642
1117
|
*/
|
|
1643
|
-
|
|
1118
|
+
instructionsUrl?: string;
|
|
1644
1119
|
/**
|
|
1645
|
-
*
|
|
1120
|
+
* Download URL for the voucher. It will display a button allowing the shopper to download it.
|
|
1646
1121
|
*/
|
|
1647
|
-
|
|
1122
|
+
downloadUrl?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Text that will be displayed on the above Download button.
|
|
1125
|
+
*/
|
|
1126
|
+
downloadButtonText?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Introduction text on the voucher.
|
|
1129
|
+
*/
|
|
1130
|
+
introduction?: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Payment reference.
|
|
1133
|
+
*/
|
|
1134
|
+
reference?: string;
|
|
1135
|
+
/**
|
|
1136
|
+
* URL to a barcode image representing the payment reference.
|
|
1137
|
+
*/
|
|
1138
|
+
barcode?: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* Total amount displayed on the voucher.
|
|
1141
|
+
*/
|
|
1142
|
+
amount?: string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Any additional surcharge to the amount.
|
|
1145
|
+
*/
|
|
1146
|
+
surcharge?: string;
|
|
1147
|
+
/**
|
|
1148
|
+
* List of details that will be rendered on the voucher.
|
|
1149
|
+
*/
|
|
1150
|
+
voucherDetails?: VoucherDetail[];
|
|
1648
1151
|
/**
|
|
1649
|
-
*
|
|
1152
|
+
* Additional CSS classes.
|
|
1650
1153
|
*/
|
|
1651
|
-
|
|
1652
|
-
merchantName?: string;
|
|
1653
|
-
merchantId?: string;
|
|
1654
|
-
};
|
|
1154
|
+
className?: string;
|
|
1655
1155
|
/**
|
|
1656
|
-
*
|
|
1657
|
-
* For more context: https://github.com/Adyen/adyen-web/pull/3340
|
|
1156
|
+
* Show/Hide a button to copy the payment reference. It will only show if a reference is available.
|
|
1658
1157
|
*/
|
|
1659
|
-
|
|
1660
|
-
clientKey?: string;
|
|
1661
|
-
initiative?: Initiative;
|
|
1158
|
+
copyBtn?: boolean;
|
|
1662
1159
|
/**
|
|
1663
|
-
*
|
|
1160
|
+
* Show/Hide payment reference value.
|
|
1161
|
+
* @default true
|
|
1664
1162
|
*/
|
|
1665
|
-
|
|
1163
|
+
showReferenceValue?: boolean;
|
|
1666
1164
|
/**
|
|
1667
|
-
*
|
|
1668
|
-
* The value must at least contain ApplePayMerchantCapability.supports3DS.
|
|
1669
|
-
* @default ['supports3DS']
|
|
1165
|
+
* Label for the payment reference.
|
|
1670
1166
|
*/
|
|
1671
|
-
|
|
1167
|
+
paymentReferenceLabel?: string;
|
|
1168
|
+
onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
|
|
1169
|
+
}
|
|
1170
|
+
interface VoucherConfiguration extends UIElementProps {
|
|
1171
|
+
reference?: string;
|
|
1172
|
+
url?: string;
|
|
1173
|
+
paymentMethodType?: string;
|
|
1174
|
+
}
|
|
1175
|
+
type CommonVoucherProps = Pick<VoucherProps, 'paymentMethodType' | 'introduction' | 'imageUrl' | 'amount' | 'reference' | 'onActionHandled'>;
|
|
1176
|
+
|
|
1177
|
+
interface BoletoConfiguration extends VoucherConfiguration {
|
|
1672
1178
|
/**
|
|
1673
|
-
*
|
|
1674
|
-
*
|
|
1179
|
+
* Set to false if you have already collected the shopper's first name, last name, and CPF/CNPJ (socialSecurityNumber).
|
|
1180
|
+
* @default true
|
|
1675
1181
|
*/
|
|
1676
|
-
|
|
1182
|
+
personalDetailsRequired?: boolean;
|
|
1677
1183
|
/**
|
|
1678
|
-
*
|
|
1184
|
+
* Set this to false if you have already collected the shopper's street, house number or name, city, postal code, and state or province.
|
|
1185
|
+
* @default true
|
|
1679
1186
|
*/
|
|
1680
|
-
|
|
1187
|
+
billingAddressRequired?: boolean;
|
|
1681
1188
|
/**
|
|
1682
|
-
*
|
|
1189
|
+
* Set this to false if you have already collected the shopper's email address.
|
|
1190
|
+
* @default true
|
|
1683
1191
|
*/
|
|
1684
|
-
|
|
1192
|
+
showEmailAddress?: boolean;
|
|
1685
1193
|
/**
|
|
1686
|
-
*
|
|
1194
|
+
* Object to pre-fill shopper details on the form
|
|
1687
1195
|
*/
|
|
1688
|
-
|
|
1196
|
+
data?: BoletoInputDataState;
|
|
1197
|
+
}
|
|
1198
|
+
interface BoletoElementProps {
|
|
1199
|
+
type: string;
|
|
1200
|
+
i18n: Language;
|
|
1201
|
+
loadingContext: string;
|
|
1202
|
+
reference?: string;
|
|
1203
|
+
}
|
|
1204
|
+
interface BoletoInputDataState {
|
|
1205
|
+
firstName?: string;
|
|
1206
|
+
lastName?: string;
|
|
1207
|
+
billingAddress?: AddressData;
|
|
1208
|
+
socialSecurityNumber?: string;
|
|
1209
|
+
shopperEmail?: string;
|
|
1210
|
+
}
|
|
1211
|
+
interface BoletoInputValidState {
|
|
1212
|
+
firstName?: boolean;
|
|
1213
|
+
lastName?: boolean;
|
|
1214
|
+
shopperEmail?: boolean;
|
|
1215
|
+
socialSecurityNumber?: boolean;
|
|
1216
|
+
billingAddress?: boolean;
|
|
1217
|
+
}
|
|
1218
|
+
interface BoletoInputErrorState {
|
|
1219
|
+
firstName?: boolean;
|
|
1220
|
+
lastName?: boolean;
|
|
1221
|
+
shopperEmail?: boolean;
|
|
1222
|
+
socialSecurityNumber?: boolean;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
interface CashAppPayConfiguration extends UIElementProps {
|
|
1689
1226
|
/**
|
|
1690
|
-
*
|
|
1227
|
+
* Indicates that the payment must be stored (Ex: in case there is no checkbox but merchant wants to store it)
|
|
1691
1228
|
*/
|
|
1692
|
-
|
|
1229
|
+
storePaymentMethod?: boolean;
|
|
1693
1230
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepayrecurringpaymentrequest}
|
|
1231
|
+
* Enables storing the payment method using the Checkbox
|
|
1696
1232
|
*/
|
|
1697
|
-
|
|
1233
|
+
enableStoreDetails?: boolean;
|
|
1698
1234
|
/**
|
|
1699
|
-
*
|
|
1235
|
+
* Callback triggered before starting the CashAppPay flow. Use case: Validate customer data, check product availability
|
|
1700
1236
|
*/
|
|
1701
|
-
|
|
1237
|
+
onClick?(actions: {
|
|
1238
|
+
resolve: () => void;
|
|
1239
|
+
reject: () => void;
|
|
1240
|
+
}): void;
|
|
1702
1241
|
/**
|
|
1703
|
-
*
|
|
1242
|
+
* A reference to your system (for example, a cart or checkout identifier). Maximum length 1024 characters.
|
|
1243
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#parameters-3
|
|
1704
1244
|
*/
|
|
1705
|
-
|
|
1245
|
+
referenceId?: string;
|
|
1706
1246
|
/**
|
|
1707
|
-
*
|
|
1247
|
+
* The destination for the customer after approving (or declining) in Cash App for mobile redirect flow.
|
|
1248
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#customerrequest
|
|
1249
|
+
* @defaultValue window.location.ref
|
|
1708
1250
|
*/
|
|
1709
|
-
|
|
1251
|
+
redirectURL?: string;
|
|
1710
1252
|
/**
|
|
1711
|
-
*
|
|
1253
|
+
* Button customization
|
|
1254
|
+
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/use-cases#customize-the-cash-app-pay-button
|
|
1712
1255
|
*/
|
|
1713
|
-
|
|
1256
|
+
button?: {
|
|
1257
|
+
shape?: 'semiround' | 'round';
|
|
1258
|
+
size?: 'medium' | 'small';
|
|
1259
|
+
theme?: 'dark' | 'light';
|
|
1260
|
+
width?: 'static' | 'full';
|
|
1261
|
+
};
|
|
1714
1262
|
/**
|
|
1715
|
-
*
|
|
1716
|
-
* Recommended to be used in case of using Apple Pay within an iframe, where the modal may not be presented correctly over the parent website
|
|
1717
|
-
*
|
|
1718
|
-
* @defaultValue 'modal'
|
|
1263
|
+
* CashAppPay configuration sent by the /paymentMethods response
|
|
1719
1264
|
*/
|
|
1720
|
-
|
|
1265
|
+
configuration?: {
|
|
1266
|
+
clientId: string;
|
|
1267
|
+
scopeId: string;
|
|
1268
|
+
};
|
|
1721
1269
|
/**
|
|
1722
|
-
*
|
|
1270
|
+
* If payment is tokenized, then API will return its ID
|
|
1271
|
+
* @internal
|
|
1723
1272
|
*/
|
|
1724
|
-
|
|
1273
|
+
storedPaymentMethodId?: string;
|
|
1725
1274
|
/**
|
|
1726
|
-
*
|
|
1727
|
-
|
|
1728
|
-
* @param resolve - Must be called if the button should be displayed
|
|
1729
|
-
* @param reject - Must be called if the button should not be displayed
|
|
1730
|
-
* @returns
|
|
1275
|
+
* If payment is tokenized, then API will return this value
|
|
1276
|
+
* @internal
|
|
1731
1277
|
*/
|
|
1732
|
-
|
|
1278
|
+
cashtag?: string;
|
|
1279
|
+
}
|
|
1280
|
+
type CashAppPayElementData = {
|
|
1281
|
+
paymentMethod: {
|
|
1282
|
+
type: string;
|
|
1283
|
+
grantId?: string;
|
|
1284
|
+
storedPaymentMethodId?: string;
|
|
1285
|
+
};
|
|
1286
|
+
storePaymentMethod?: boolean;
|
|
1287
|
+
};
|
|
1288
|
+
type CashAppPayEventData = {
|
|
1289
|
+
cashTag?: string;
|
|
1290
|
+
customerId?: string;
|
|
1291
|
+
grantId?: string;
|
|
1292
|
+
onFileGrantId?: string;
|
|
1293
|
+
};
|
|
1294
|
+
|
|
1295
|
+
interface TimeoutErrorProps {
|
|
1296
|
+
source: string;
|
|
1297
|
+
scheme: string;
|
|
1298
|
+
isTimeoutTriggeredBySchemeSdk: boolean;
|
|
1299
|
+
}
|
|
1300
|
+
declare class TimeoutError extends Error {
|
|
1301
|
+
scheme: string;
|
|
1302
|
+
source: string;
|
|
1303
|
+
isTimeoutTriggeredBySchemeSdk: boolean;
|
|
1304
|
+
/** Currently populated only by Visa SDK if available */
|
|
1305
|
+
correlationId?: string;
|
|
1306
|
+
constructor(options: TimeoutErrorProps);
|
|
1307
|
+
setCorrelationId(correlationId: string): void;
|
|
1308
|
+
toString(): string;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
type ClickToPayProps = {
|
|
1733
1312
|
/**
|
|
1734
|
-
*
|
|
1313
|
+
* Shopper email used to be recognized with the Network schemes
|
|
1735
1314
|
*/
|
|
1736
|
-
|
|
1315
|
+
shopperEmail?: string;
|
|
1737
1316
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
* Must be resolved/rejected with the action object.
|
|
1740
|
-
*
|
|
1741
|
-
* @param data - Authorization event from ApplePay, along with formatted billingAddress and deliveryAddress
|
|
1742
|
-
* @param actions - Object to continue/stop with the payment flow
|
|
1743
|
-
*
|
|
1744
|
-
* @remarks
|
|
1745
|
-
* If actions.resolve() is called, the payment flow will be triggered.
|
|
1746
|
-
* If actions.reject() is called, the overlay will display an error
|
|
1317
|
+
* Shopper telephone number used to be recognized with the Network schemes
|
|
1747
1318
|
*/
|
|
1748
|
-
|
|
1749
|
-
authorizedEvent: ApplePayJS.ApplePayPaymentAuthorizedEvent;
|
|
1750
|
-
billingAddress?: Partial<AddressData>;
|
|
1751
|
-
deliveryAddress?: Partial<AddressData>;
|
|
1752
|
-
}, actions: {
|
|
1753
|
-
resolve: () => void;
|
|
1754
|
-
reject: (error?: ApplePayJS.ApplePayError) => void;
|
|
1755
|
-
}) => void;
|
|
1319
|
+
telephoneNumber?: string;
|
|
1756
1320
|
/**
|
|
1757
|
-
*
|
|
1758
|
-
* This callback is invoked when a successfull payment is resolved
|
|
1759
|
-
*
|
|
1760
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentorderdetails}
|
|
1761
|
-
* @param resolve - Must be called with the orderDetails fields
|
|
1762
|
-
* @param reject - Must be called if something failed during the order creation. Calling 'reject' won't cancel the payment flow
|
|
1321
|
+
* Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
|
|
1763
1322
|
*/
|
|
1764
|
-
|
|
1323
|
+
merchantDisplayName?: string;
|
|
1765
1324
|
/**
|
|
1766
|
-
*
|
|
1325
|
+
* Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
|
|
1326
|
+
* defined during the creation of the Checkout.
|
|
1327
|
+
* Format: ISO language_country pair (e.g., en_US )
|
|
1767
1328
|
*
|
|
1768
|
-
*
|
|
1769
|
-
* @param resolve - Must be called with an opaque message session object
|
|
1770
|
-
* @param reject - Must be called if something failed during the merchant validation
|
|
1771
|
-
* @param validationURL - The URL your server must use to validate itself and obtain a merchant session object.
|
|
1329
|
+
* @defaultValue en_US
|
|
1772
1330
|
*/
|
|
1773
|
-
|
|
1331
|
+
locale?: string;
|
|
1774
1332
|
/**
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
1777
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/onpaymentmethodselected}
|
|
1778
|
-
* @param resolve - Completes the selection of a payment method with an update.
|
|
1779
|
-
* @param reject - Completes the selection of a payment method with no update.
|
|
1780
|
-
* @param event - The event parameter contains the paymentMethod attribute.
|
|
1333
|
+
* Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
|
|
1334
|
+
* @defaultValue false
|
|
1781
1335
|
*/
|
|
1782
|
-
|
|
1336
|
+
disableOtpAutoFocus?: boolean;
|
|
1783
1337
|
/**
|
|
1784
|
-
*
|
|
1785
|
-
*
|
|
1786
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/onshippingcontactselected}
|
|
1787
|
-
* @param resolve - Completes the selection of a shipping contact with an update.
|
|
1788
|
-
* @param reject - Completes the selection of a shipping contact with no update.
|
|
1789
|
-
* @param event - The event parameter contains the shippingContact attribute.
|
|
1338
|
+
* Callback triggered when the Click to Pay component is ready to be used
|
|
1790
1339
|
*/
|
|
1791
|
-
|
|
1340
|
+
onReady?(): void;
|
|
1792
1341
|
/**
|
|
1793
|
-
*
|
|
1794
|
-
*
|
|
1795
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/completeshippingmethodselection}
|
|
1796
|
-
* @param resolve - Completes the selection of a shipping method with an update.
|
|
1797
|
-
* @param reject - Completes the selection of a shipping method with no update.
|
|
1798
|
-
* @param event - The event parameter contains the shippingMethod attribute.
|
|
1342
|
+
* Callback triggered when a timeout happens within Click to Pay service.
|
|
1343
|
+
* Ex: Network schemes took too long to initialize
|
|
1799
1344
|
*/
|
|
1800
|
-
|
|
1345
|
+
onTimeout?(error: TimeoutError): void;
|
|
1346
|
+
};
|
|
1347
|
+
type ClickToPayScheme = 'mc' | 'visa';
|
|
1348
|
+
|
|
1349
|
+
declare enum AnalyticsEventCategory {
|
|
1350
|
+
info = "info",
|
|
1351
|
+
error = "error",
|
|
1352
|
+
log = "log"
|
|
1353
|
+
}
|
|
1354
|
+
declare abstract class AbstractAnalyticsEvent {
|
|
1355
|
+
private readonly timestamp;
|
|
1356
|
+
private readonly id;
|
|
1801
1357
|
/**
|
|
1802
|
-
*
|
|
1803
|
-
* @
|
|
1358
|
+
* Component tx variant or identifier
|
|
1359
|
+
* @private
|
|
1804
1360
|
*/
|
|
1805
|
-
|
|
1361
|
+
private readonly component;
|
|
1362
|
+
abstract getEventCategory(): AnalyticsEventCategory;
|
|
1363
|
+
protected constructor(component: string);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
interface AnalyticsOptions {
|
|
1806
1367
|
/**
|
|
1807
|
-
*
|
|
1808
|
-
* @see {@link https://developer.apple.com/documentation/applepayontheweb/applepaypaymentrequest/supportscouponcode supportsCouponCode docs}
|
|
1368
|
+
* Enable/Disable all analytics
|
|
1809
1369
|
*/
|
|
1810
|
-
|
|
1370
|
+
enabled?: boolean;
|
|
1811
1371
|
/**
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
* {@link https://developer.apple.com/documentation/applepayontheweb/applepaysession/oncouponcodechanged}
|
|
1815
|
-
* @param resolve - Completes the change of a coupon code with an update.
|
|
1816
|
-
* @param reject - Completes the change of a coupon code with no update.
|
|
1817
|
-
* @param event - The event parameter contains the couponCode attribute.
|
|
1372
|
+
* A wrapper to pass data needed when analytics is setup
|
|
1818
1373
|
*/
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1374
|
+
analyticsData?: {
|
|
1375
|
+
/**
|
|
1376
|
+
* Relates to PMs used within Plugins
|
|
1377
|
+
* https://docs.adyen.com/development-resources/application-information/?tab=integrator_built_2#application-information-fields
|
|
1378
|
+
* @internal
|
|
1379
|
+
*/
|
|
1380
|
+
applicationInfo?: ApplicationInfo;
|
|
1381
|
+
/**
|
|
1382
|
+
* Use a checkoutAttemptId from a previous page
|
|
1383
|
+
*/
|
|
1384
|
+
checkoutAttemptId?: string;
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
interface ApplicationInfo {
|
|
1388
|
+
externalPlatform: {
|
|
1389
|
+
name: string;
|
|
1390
|
+
version: string;
|
|
1391
|
+
integrator: string;
|
|
1392
|
+
};
|
|
1393
|
+
merchantApplication: {
|
|
1394
|
+
name: string;
|
|
1395
|
+
version: string;
|
|
1396
|
+
};
|
|
1397
|
+
merchantDevice?: {
|
|
1398
|
+
os: string;
|
|
1399
|
+
osVersion: string;
|
|
1400
|
+
};
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
interface IAnalytics {
|
|
1404
|
+
checkoutAttemptId?: string;
|
|
1405
|
+
setUp({ sessionId, checkoutStage, locale }: {
|
|
1406
|
+
sessionId?: string;
|
|
1407
|
+
checkoutStage?: 'precheckout' | 'checkout';
|
|
1408
|
+
locale?: string;
|
|
1409
|
+
}): Promise<void>;
|
|
1410
|
+
sendFlavor(flavor: 'dropin' | 'components'): Promise<void>;
|
|
1411
|
+
sendAnalytics(event: AbstractAnalyticsEvent): void;
|
|
1412
|
+
flush(): void;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
type MastercardCheckout = {
|
|
1416
|
+
srcDigitalCardId: string;
|
|
1417
|
+
srcCorrelationId: string;
|
|
1418
|
+
srcScheme: string;
|
|
1419
|
+
};
|
|
1420
|
+
type VisaCheckout = {
|
|
1421
|
+
srcCheckoutPayload?: string;
|
|
1422
|
+
srcTokenReference?: string;
|
|
1423
|
+
srcCorrelationId: string;
|
|
1424
|
+
srcScheme: string;
|
|
1425
|
+
};
|
|
1426
|
+
type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
|
|
1427
|
+
|
|
1428
|
+
type ClickToPayConfiguration = UIElementProps & ClickToPayProps & {
|
|
1822
1429
|
/**
|
|
1823
|
-
*
|
|
1430
|
+
* ClickToPay configuration sent by the /paymentMethods response
|
|
1824
1431
|
*/
|
|
1825
|
-
|
|
1432
|
+
configuration?: {
|
|
1433
|
+
mcDpaId?: string;
|
|
1434
|
+
mcSrcClientId?: string;
|
|
1435
|
+
visaSrcInitiatorId?: string;
|
|
1436
|
+
visaSrciDpaId?: string;
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
type ClickToPayPaymentData = {
|
|
1440
|
+
paymentMethod: ClickToPayCheckoutPayload & {
|
|
1441
|
+
type: string;
|
|
1442
|
+
};
|
|
1443
|
+
origin: string;
|
|
1444
|
+
browserInfo: BrowserInfo;
|
|
1445
|
+
};
|
|
1446
|
+
|
|
1447
|
+
interface TouchStartEventObj {
|
|
1448
|
+
fieldType: string;
|
|
1449
|
+
name?: string;
|
|
1826
1450
|
}
|
|
1827
|
-
|
|
1828
|
-
|
|
1451
|
+
|
|
1452
|
+
type PlaceholderKeys$1 = 'cardNumber' | 'securityCode' | 'expiryDate';
|
|
1453
|
+
type Placeholders$1 = Partial<Record<PlaceholderKeys$1, string>>;
|
|
1454
|
+
type GiftcardFieldsProps = {
|
|
1455
|
+
setRootNode: (input: HTMLElement) => void;
|
|
1456
|
+
i18n: Language;
|
|
1457
|
+
pinRequired: boolean;
|
|
1458
|
+
sfpState: SFPState;
|
|
1459
|
+
getCardErrorMessage: any;
|
|
1460
|
+
focusedElement: any;
|
|
1461
|
+
setFocusOn: any;
|
|
1462
|
+
label?: string;
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
/**
|
|
1466
|
+
* SecuredFieldsProvider:
|
|
1467
|
+
* Initialises & handles the client-side part of SecuredFields
|
|
1468
|
+
*/
|
|
1469
|
+
declare class SecuredFieldsProvider extends Component<SFPProps, SFPState> {
|
|
1470
|
+
private csfLoadFailTimeout;
|
|
1471
|
+
private readonly csfLoadFailTimeoutMS;
|
|
1472
|
+
private readonly csfConfigFailTimeout;
|
|
1473
|
+
private readonly csfConfigFailTimeoutMS;
|
|
1474
|
+
private numCharsInField;
|
|
1475
|
+
private rootNode;
|
|
1476
|
+
private numDateFields;
|
|
1477
|
+
private csf;
|
|
1478
|
+
private readonly handleOnLoad;
|
|
1479
|
+
private readonly handleOnConfigSuccess;
|
|
1480
|
+
private readonly handleOnFieldValid;
|
|
1481
|
+
private readonly handleOnAllValid;
|
|
1482
|
+
private readonly handleOnBrand;
|
|
1483
|
+
private readonly handleFocus;
|
|
1484
|
+
private readonly handleOnError;
|
|
1485
|
+
private readonly handleOnAutoComplete;
|
|
1486
|
+
private readonly handleOnNoDataRequired;
|
|
1487
|
+
private readonly handleOnTouchstartIOS;
|
|
1488
|
+
private readonly handleKeyDown;
|
|
1489
|
+
state: SFPState;
|
|
1490
|
+
props: SFPProps;
|
|
1491
|
+
private issuingCountryCode;
|
|
1492
|
+
constructor(props: SFPProps);
|
|
1493
|
+
static readonly defaultProps: {
|
|
1829
1494
|
type: string;
|
|
1830
|
-
|
|
1831
|
-
|
|
1495
|
+
keypadFix: boolean;
|
|
1496
|
+
rootNode: any;
|
|
1497
|
+
loadingContext: any;
|
|
1498
|
+
brands: any[];
|
|
1499
|
+
showWarnings: boolean;
|
|
1500
|
+
autoFocus: boolean;
|
|
1501
|
+
trimTrailingSeparator: boolean;
|
|
1502
|
+
onChange: () => void;
|
|
1503
|
+
onLoad: () => void;
|
|
1504
|
+
onConfigSuccess: () => void;
|
|
1505
|
+
onAllValid: () => void;
|
|
1506
|
+
onFieldValid: () => void;
|
|
1507
|
+
onBrand: () => void;
|
|
1508
|
+
onError: () => void;
|
|
1509
|
+
onBinValue: () => void;
|
|
1510
|
+
onFocus: () => void;
|
|
1511
|
+
onAutoComplete: () => void;
|
|
1512
|
+
handleKeyDown: () => void;
|
|
1513
|
+
styles: {};
|
|
1832
1514
|
};
|
|
1515
|
+
componentDidMount(): void;
|
|
1516
|
+
componentDidUpdate(): void;
|
|
1517
|
+
componentWillUnmount(): void;
|
|
1518
|
+
private initializeCSF;
|
|
1519
|
+
private checkForKCPFields;
|
|
1520
|
+
getChildContext(): object;
|
|
1521
|
+
handleUnsupportedCard(errObj: CardErrorData): boolean;
|
|
1522
|
+
setFocusOn(frame: SFFieldType): void;
|
|
1523
|
+
updateStyles(stylesObj: StylesObject): void;
|
|
1524
|
+
sfIsOptionalOrHidden(fieldType: string): boolean;
|
|
1525
|
+
destroy(): void;
|
|
1526
|
+
getRootNode(): HTMLElement;
|
|
1527
|
+
showValidation(): void;
|
|
1528
|
+
/**
|
|
1529
|
+
* Map SF errors to ValidationRuleResult-like objects, for CardInput component
|
|
1530
|
+
*/
|
|
1531
|
+
mapErrorsToValidationRuleResult(): SFStateErrorObj;
|
|
1532
|
+
processBinLookupResponse(binLookupResponse: BinLookupResponse, resetObject: SingleBrandResetObject): void;
|
|
1533
|
+
private setRootNode;
|
|
1534
|
+
render(props: any, state: SFPState): any;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
type Placeholders = CardPlaceholders | Placeholders$1;
|
|
1538
|
+
/**
|
|
1539
|
+
* Should be the only props that can be sent to SFP (from CardInput, SecuredFieldsInput, GiftcardComponent)
|
|
1540
|
+
*/
|
|
1541
|
+
interface SFPProps {
|
|
1542
|
+
ref?: Ref<SecuredFieldsProvider>;
|
|
1543
|
+
autoFocus?: boolean;
|
|
1544
|
+
brands?: string[];
|
|
1545
|
+
brandsConfiguration?: CardBrandsConfiguration;
|
|
1546
|
+
clientKey: string;
|
|
1547
|
+
componentType: string;
|
|
1548
|
+
countryCode?: string;
|
|
1549
|
+
forceCompat?: boolean;
|
|
1550
|
+
hasKoreanFields?: boolean;
|
|
1551
|
+
i18n?: Language;
|
|
1552
|
+
implementationType?: 'components' | 'custom';
|
|
1553
|
+
keypadFix?: boolean;
|
|
1554
|
+
koreanAuthenticationRequired?: boolean;
|
|
1555
|
+
legacyInputMode?: boolean;
|
|
1556
|
+
loadingContext: string;
|
|
1557
|
+
minimumExpiryDate?: string;
|
|
1558
|
+
onAdditionalSFConfig?: () => void;
|
|
1559
|
+
onAdditionalSFRemoved?: () => void;
|
|
1560
|
+
onAllValid?: (obj: CardAllValidData) => void;
|
|
1561
|
+
onAutoComplete?: (obj: CardAutoCompleteData) => void;
|
|
1562
|
+
onBinValue?: (obj: CardBinValueData) => void;
|
|
1563
|
+
onBrand?: (obj: CardBrandData) => void;
|
|
1564
|
+
onChange?: (state: SFPState, eventDetails?: OnChangeEventDetails) => void;
|
|
1565
|
+
onConfigSuccess?: (cbObj: CardConfigSuccessData) => void;
|
|
1566
|
+
onError?: (error: AdyenCheckoutError) => void;
|
|
1567
|
+
onFieldValid?: (fieldObj: CardFieldValidData) => void;
|
|
1568
|
+
onFocus?: (obj: CardFocusData) => void;
|
|
1569
|
+
onLoad?: (cbObj: CardLoadData) => void;
|
|
1570
|
+
onStateUpdate?: (obj: SFPState) => void;
|
|
1571
|
+
onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;
|
|
1572
|
+
handleKeyDown?: (event: KeyboardEvent) => void;
|
|
1573
|
+
rootNode?: HTMLElement;
|
|
1574
|
+
showWarnings?: boolean;
|
|
1575
|
+
styles?: StylesObject;
|
|
1576
|
+
trimTrailingSeparator?: boolean;
|
|
1577
|
+
type: string;
|
|
1578
|
+
render?: (helpers: {
|
|
1579
|
+
setRootNode: (input: HTMLElement) => void;
|
|
1580
|
+
setFocusOn: (fieldName: string) => void;
|
|
1581
|
+
}, state: SFPState) => ComponentChildren;
|
|
1582
|
+
resources?: Resources;
|
|
1583
|
+
maskSecurityCode?: boolean;
|
|
1584
|
+
exposeExpiryDate?: boolean;
|
|
1585
|
+
disableIOSArrowKeys?: (obj: TouchStartEventObj) => void | null;
|
|
1586
|
+
placeholders?: Placeholders;
|
|
1587
|
+
showContextualElement?: boolean;
|
|
1588
|
+
}
|
|
1589
|
+
type SFPErrorMap = Partial<Record<SFFieldType, string>>;
|
|
1590
|
+
interface SFPState {
|
|
1591
|
+
status?: string;
|
|
1592
|
+
brand?: string;
|
|
1593
|
+
errors?: SFPErrorMap;
|
|
1594
|
+
valid: SFPValid;
|
|
1595
|
+
data: object;
|
|
1596
|
+
cvcPolicy?: CVCPolicyType;
|
|
1597
|
+
isSfpValid?: boolean;
|
|
1598
|
+
autoCompleteName?: string;
|
|
1833
1599
|
billingAddress?: AddressData;
|
|
1834
|
-
|
|
1600
|
+
detectedUnsupportedBrands?: string[];
|
|
1601
|
+
hasKoreanFields?: boolean;
|
|
1602
|
+
showSocialSecurityNumber?: boolean;
|
|
1603
|
+
expiryDatePolicy?: DatePolicyType;
|
|
1604
|
+
socialSecurityNumber?: string;
|
|
1835
1605
|
}
|
|
1836
|
-
interface
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
initiative: Initiative;
|
|
1840
|
-
merchantIdentifier: string;
|
|
1606
|
+
interface SingleBrandResetObject {
|
|
1607
|
+
brand: string;
|
|
1608
|
+
cvcPolicy: CVCPolicyType;
|
|
1841
1609
|
}
|
|
1842
|
-
interface
|
|
1843
|
-
|
|
1844
|
-
|
|
1610
|
+
interface SFPValid {
|
|
1611
|
+
encryptedCardNumber?: boolean;
|
|
1612
|
+
encryptedExpiryMonth?: boolean;
|
|
1613
|
+
encryptedExpiryYear?: boolean;
|
|
1614
|
+
encryptedSecurityCode?: boolean;
|
|
1615
|
+
encryptedPassword?: boolean;
|
|
1616
|
+
encryptedPin?: boolean;
|
|
1845
1617
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
reference?: string;
|
|
1850
|
-
totalAmount?: {
|
|
1851
|
-
value: number;
|
|
1852
|
-
currency: string;
|
|
1853
|
-
};
|
|
1854
|
-
beneficiary?: string;
|
|
1855
|
-
iban?: string;
|
|
1856
|
-
bic?: string;
|
|
1857
|
-
accountNumber?: string;
|
|
1858
|
-
sortCode?: string;
|
|
1859
|
-
routingNumber?: string;
|
|
1860
|
-
branchCode?: string;
|
|
1861
|
-
bankCode?: string;
|
|
1862
|
-
onActionHandled?: (actionHandledObj: ActionHandledReturnObject) => void;
|
|
1618
|
+
interface OnChangeEventDetails {
|
|
1619
|
+
event: string;
|
|
1620
|
+
fieldType?: string;
|
|
1863
1621
|
}
|
|
1864
1622
|
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1623
|
+
/** A list of all the data-cse attributes that relate to securedFields (as found in card, giftcard) */
|
|
1624
|
+
declare const ALL_SECURED_FIELDS: readonly ["encryptedCardNumber", "encryptedExpiryDate", "encryptedExpiryMonth", "encryptedExpiryYear", "encryptedSecurityCode", "encryptedPassword"];
|
|
1625
|
+
declare const REQUIRED = "required";
|
|
1626
|
+
declare const OPTIONAL = "optional";
|
|
1627
|
+
declare const HIDDEN = "hidden";
|
|
1628
|
+
declare const BEST_GUESS_MODE = "best-guess";
|
|
1629
|
+
declare const BIN_LOOKUP_MODE = "bin-lookup";
|
|
1630
|
+
|
|
1631
|
+
declare global {
|
|
1632
|
+
interface Window {
|
|
1633
|
+
_b$dl: boolean;
|
|
1634
|
+
mockBinCount: number;
|
|
1635
|
+
}
|
|
1877
1636
|
}
|
|
1878
|
-
|
|
1879
|
-
|
|
1637
|
+
type SFFieldType = (typeof ALL_SECURED_FIELDS)[number];
|
|
1638
|
+
type BrandModeType = typeof BIN_LOOKUP_MODE | typeof BEST_GUESS_MODE;
|
|
1639
|
+
interface StylesObject {
|
|
1640
|
+
base?: StyleDefinitions;
|
|
1641
|
+
error?: StyleDefinitions;
|
|
1642
|
+
validated?: StyleDefinitions;
|
|
1643
|
+
placeholder?: StyleDefinitions;
|
|
1880
1644
|
}
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1645
|
+
interface StyleDefinitions {
|
|
1646
|
+
background?: string;
|
|
1647
|
+
caretColor?: string;
|
|
1648
|
+
color?: string;
|
|
1649
|
+
display?: string;
|
|
1650
|
+
font?: string;
|
|
1651
|
+
fontFamily?: string;
|
|
1652
|
+
fontSize?: string;
|
|
1653
|
+
fontSizeAdjust?: string;
|
|
1654
|
+
fontSmoothing?: string;
|
|
1655
|
+
fontStretch?: string;
|
|
1656
|
+
fontStyle?: string;
|
|
1657
|
+
fontVariant?: string;
|
|
1658
|
+
fontVariantAlternates?: string;
|
|
1659
|
+
fontVariantCaps?: string;
|
|
1660
|
+
fontVariantEastAsian?: string;
|
|
1661
|
+
fontVariantLigatures?: string;
|
|
1662
|
+
fontVariantNumeric?: string;
|
|
1663
|
+
fontWeight?: string;
|
|
1664
|
+
letterSpacing?: string;
|
|
1665
|
+
lineHeight?: string;
|
|
1666
|
+
mozOsxFontSmoothing?: string;
|
|
1667
|
+
mozTransition?: string;
|
|
1668
|
+
outline?: string;
|
|
1669
|
+
opacity?: string;
|
|
1670
|
+
padding?: string;
|
|
1671
|
+
textAlign?: string;
|
|
1672
|
+
textShadow?: string;
|
|
1673
|
+
transition?: string;
|
|
1674
|
+
webkitFontSmoothing?: string;
|
|
1675
|
+
webkitTransition?: string;
|
|
1676
|
+
wordSpacing?: string;
|
|
1885
1677
|
}
|
|
1886
|
-
interface
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
paymentMethodType: string;
|
|
1891
|
-
/**
|
|
1892
|
-
* Payment method image to be displayed on the voucher.
|
|
1893
|
-
*/
|
|
1894
|
-
imageUrl?: string;
|
|
1895
|
-
/**
|
|
1896
|
-
* If applicable, it will render an issuer image next to the payment method image.
|
|
1897
|
-
*/
|
|
1898
|
-
issuerImageUrl?: string;
|
|
1899
|
-
/**
|
|
1900
|
-
* Voucher instructions URL.
|
|
1901
|
-
*/
|
|
1902
|
-
instructionsUrl?: string;
|
|
1903
|
-
/**
|
|
1904
|
-
* Download URL for the voucher. It will display a button allowing the shopper to download it.
|
|
1905
|
-
*/
|
|
1906
|
-
downloadUrl?: string;
|
|
1907
|
-
/**
|
|
1908
|
-
* Text that will be displayed on the above Download button.
|
|
1909
|
-
*/
|
|
1910
|
-
downloadButtonText?: string;
|
|
1911
|
-
/**
|
|
1912
|
-
* Introduction text on the voucher.
|
|
1913
|
-
*/
|
|
1914
|
-
introduction?: string;
|
|
1915
|
-
/**
|
|
1916
|
-
* Payment reference.
|
|
1917
|
-
*/
|
|
1918
|
-
reference?: string;
|
|
1919
|
-
/**
|
|
1920
|
-
* URL to a barcode image representing the payment reference.
|
|
1921
|
-
*/
|
|
1922
|
-
barcode?: string;
|
|
1923
|
-
/**
|
|
1924
|
-
* Total amount displayed on the voucher.
|
|
1925
|
-
*/
|
|
1926
|
-
amount?: string;
|
|
1927
|
-
/**
|
|
1928
|
-
* Any additional surcharge to the amount.
|
|
1929
|
-
*/
|
|
1930
|
-
surcharge?: string;
|
|
1931
|
-
/**
|
|
1932
|
-
* List of details that will be rendered on the voucher.
|
|
1933
|
-
*/
|
|
1934
|
-
voucherDetails?: VoucherDetail[];
|
|
1935
|
-
/**
|
|
1936
|
-
* Additional CSS classes.
|
|
1937
|
-
*/
|
|
1938
|
-
className?: string;
|
|
1939
|
-
/**
|
|
1940
|
-
* Show/Hide a button to copy the payment reference. It will only show if a reference is available.
|
|
1941
|
-
*/
|
|
1942
|
-
copyBtn?: boolean;
|
|
1943
|
-
/**
|
|
1944
|
-
* Show/Hide payment reference value.
|
|
1945
|
-
* @default true
|
|
1946
|
-
*/
|
|
1947
|
-
showReferenceValue?: boolean;
|
|
1948
|
-
/**
|
|
1949
|
-
* Label for the payment reference.
|
|
1950
|
-
*/
|
|
1951
|
-
paymentReferenceLabel?: string;
|
|
1952
|
-
onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;
|
|
1678
|
+
interface CardAllValidData {
|
|
1679
|
+
type: string;
|
|
1680
|
+
allValid: boolean;
|
|
1681
|
+
rootNode: HTMLElement;
|
|
1953
1682
|
}
|
|
1954
|
-
interface
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1683
|
+
interface CardAutoCompleteData {
|
|
1684
|
+
fieldType: string;
|
|
1685
|
+
name: string;
|
|
1686
|
+
value: string;
|
|
1687
|
+
action: string;
|
|
1958
1688
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
billingAddressRequired?: boolean;
|
|
1972
|
-
/**
|
|
1973
|
-
* Set this to false if you have already collected the shopper's email address.
|
|
1974
|
-
* @default true
|
|
1975
|
-
*/
|
|
1976
|
-
showEmailAddress?: boolean;
|
|
1977
|
-
/**
|
|
1978
|
-
* Object to pre-fill shopper details on the form
|
|
1979
|
-
*/
|
|
1980
|
-
data?: BoletoInputDataState;
|
|
1689
|
+
interface CardBinLookupData {
|
|
1690
|
+
type?: string;
|
|
1691
|
+
detectedBrands?: string[] | null;
|
|
1692
|
+
supportedBrands?: string[] | null;
|
|
1693
|
+
brands?: string[];
|
|
1694
|
+
issuingCountryCode?: string;
|
|
1695
|
+
healthcare?: Record<string, boolean>[];
|
|
1696
|
+
supportedBrandsRaw?: BrandObject[];
|
|
1697
|
+
rootNode?: HTMLElement;
|
|
1698
|
+
isReset?: boolean;
|
|
1699
|
+
dualBrandingType?: string;
|
|
1700
|
+
paymentMethodVariants?: (string | undefined)[];
|
|
1981
1701
|
}
|
|
1982
|
-
interface
|
|
1702
|
+
interface CardBinValueData {
|
|
1983
1703
|
type: string;
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1704
|
+
binValue: string;
|
|
1705
|
+
uuid?: string;
|
|
1706
|
+
encryptedBin?: string;
|
|
1987
1707
|
}
|
|
1988
|
-
interface
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1708
|
+
interface CardBrandData {
|
|
1709
|
+
type: string;
|
|
1710
|
+
rootNode: HTMLElement;
|
|
1711
|
+
brand: string;
|
|
1712
|
+
cvcPolicy: CVCPolicyType;
|
|
1713
|
+
expiryDatePolicy?: DatePolicyType;
|
|
1714
|
+
cvcText: string;
|
|
1715
|
+
showSocialSecurityNumber?: boolean;
|
|
1716
|
+
brandImageUrl?: string;
|
|
1717
|
+
mode?: BrandModeType;
|
|
1718
|
+
}
|
|
1719
|
+
interface CardConfigSuccessData {
|
|
1720
|
+
iframesConfigured: boolean;
|
|
1721
|
+
type: string;
|
|
1722
|
+
rootNode: HTMLElement;
|
|
1994
1723
|
}
|
|
1995
|
-
interface
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
1724
|
+
interface CardErrorData {
|
|
1725
|
+
fieldType: string;
|
|
1726
|
+
error: string;
|
|
1727
|
+
type: string;
|
|
1728
|
+
rootNode?: HTMLElement;
|
|
1729
|
+
detectedBrands?: string[];
|
|
1730
|
+
errorI18n?: string;
|
|
1731
|
+
errorText?: string;
|
|
2001
1732
|
}
|
|
2002
|
-
interface
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
1733
|
+
interface CardFieldValidData {
|
|
1734
|
+
fieldType: string;
|
|
1735
|
+
encryptedFieldName: string;
|
|
1736
|
+
uid: string;
|
|
1737
|
+
valid: boolean;
|
|
1738
|
+
type: string;
|
|
1739
|
+
rootNode: HTMLElement;
|
|
1740
|
+
blob?: string;
|
|
1741
|
+
endDigits?: string;
|
|
1742
|
+
expiryDate?: string;
|
|
1743
|
+
issuerBin?: number;
|
|
2007
1744
|
}
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
*/
|
|
2017
|
-
enableStoreDetails?: boolean;
|
|
2018
|
-
/**
|
|
2019
|
-
* Callback triggered before starting the CashAppPay flow. Use case: Validate customer data, check product availability
|
|
2020
|
-
*/
|
|
2021
|
-
onClick?(actions: {
|
|
2022
|
-
resolve: () => void;
|
|
2023
|
-
reject: () => void;
|
|
2024
|
-
}): void;
|
|
2025
|
-
/**
|
|
2026
|
-
* A reference to your system (for example, a cart or checkout identifier). Maximum length 1024 characters.
|
|
2027
|
-
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#parameters-3
|
|
2028
|
-
*/
|
|
2029
|
-
referenceId?: string;
|
|
2030
|
-
/**
|
|
2031
|
-
* The destination for the customer after approving (or declining) in Cash App for mobile redirect flow.
|
|
2032
|
-
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference#customerrequest
|
|
2033
|
-
* @defaultValue window.location.ref
|
|
2034
|
-
*/
|
|
2035
|
-
redirectURL?: string;
|
|
2036
|
-
/**
|
|
2037
|
-
* Button customization
|
|
2038
|
-
* https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/use-cases#customize-the-cash-app-pay-button
|
|
2039
|
-
*/
|
|
2040
|
-
button?: {
|
|
2041
|
-
shape?: 'semiround' | 'round';
|
|
2042
|
-
size?: 'medium' | 'small';
|
|
2043
|
-
theme?: 'dark' | 'light';
|
|
2044
|
-
width?: 'static' | 'full';
|
|
2045
|
-
};
|
|
2046
|
-
/**
|
|
2047
|
-
* CashAppPay configuration sent by the /paymentMethods response
|
|
2048
|
-
*/
|
|
2049
|
-
configuration?: {
|
|
2050
|
-
clientId: string;
|
|
2051
|
-
scopeId: string;
|
|
2052
|
-
};
|
|
2053
|
-
/**
|
|
2054
|
-
* If payment is tokenized, then API will return its ID
|
|
2055
|
-
* @internal
|
|
2056
|
-
*/
|
|
2057
|
-
storedPaymentMethodId?: string;
|
|
2058
|
-
/**
|
|
2059
|
-
* If payment is tokenized, then API will return this value
|
|
2060
|
-
* @internal
|
|
2061
|
-
*/
|
|
2062
|
-
cashtag?: string;
|
|
1745
|
+
interface CardFocusData {
|
|
1746
|
+
action: string;
|
|
1747
|
+
focus: boolean;
|
|
1748
|
+
numChars: number;
|
|
1749
|
+
fieldType: string;
|
|
1750
|
+
rootNode: HTMLElement;
|
|
1751
|
+
type: string;
|
|
1752
|
+
currentFocusObject: string;
|
|
2063
1753
|
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
type: string;
|
|
2067
|
-
grantId?: string;
|
|
2068
|
-
storedPaymentMethodId?: string;
|
|
2069
|
-
};
|
|
2070
|
-
storePaymentMethod?: boolean;
|
|
2071
|
-
};
|
|
2072
|
-
type CashAppPayEventData = {
|
|
2073
|
-
cashTag?: string;
|
|
2074
|
-
customerId?: string;
|
|
2075
|
-
grantId?: string;
|
|
2076
|
-
onFileGrantId?: string;
|
|
2077
|
-
};
|
|
2078
|
-
|
|
2079
|
-
interface TimeoutErrorProps {
|
|
2080
|
-
source: string;
|
|
2081
|
-
scheme: string;
|
|
2082
|
-
isTimeoutTriggeredBySchemeSdk: boolean;
|
|
1754
|
+
interface CardLoadData {
|
|
1755
|
+
iframesLoaded: boolean;
|
|
2083
1756
|
}
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
toString(): string;
|
|
1757
|
+
type CVCPolicyType = typeof REQUIRED | typeof OPTIONAL | typeof HIDDEN;
|
|
1758
|
+
type DatePolicyType = typeof REQUIRED | typeof OPTIONAL | typeof HIDDEN;
|
|
1759
|
+
interface BrandConfiguration {
|
|
1760
|
+
name?: string;
|
|
1761
|
+
icon?: string;
|
|
1762
|
+
}
|
|
1763
|
+
interface CardBrandsConfiguration {
|
|
1764
|
+
[key: string]: BrandConfiguration;
|
|
2093
1765
|
}
|
|
2094
|
-
|
|
2095
|
-
type ClickToPayProps = {
|
|
2096
|
-
/**
|
|
2097
|
-
* Shopper email used to be recognized with the Network schemes
|
|
2098
|
-
*/
|
|
2099
|
-
shopperEmail?: string;
|
|
2100
|
-
/**
|
|
2101
|
-
* Shopper telephone number used to be recognized with the Network schemes
|
|
2102
|
-
*/
|
|
2103
|
-
telephoneNumber?: string;
|
|
2104
|
-
/**
|
|
2105
|
-
* Used to display the merchant name in case the DCF appears (ex: first time doing transaction in the device),
|
|
2106
|
-
*/
|
|
2107
|
-
merchantDisplayName?: string;
|
|
2108
|
-
/**
|
|
2109
|
-
* Used to ensure the correct language and user experience if DCF screen is displayed. As a fallback, it uses the main locale
|
|
2110
|
-
* defined during the creation of the Checkout.
|
|
2111
|
-
* Format: ISO language_country pair (e.g., en_US )
|
|
2112
|
-
*
|
|
2113
|
-
* @defaultValue en_US
|
|
2114
|
-
*/
|
|
2115
|
-
locale?: string;
|
|
2116
|
-
/**
|
|
2117
|
-
* Disable autofocus on the One Time Password input field when it is either displayed or when the OTP is resent
|
|
2118
|
-
* @defaultValue false
|
|
2119
|
-
*/
|
|
2120
|
-
disableOtpAutoFocus?: boolean;
|
|
2121
|
-
/**
|
|
2122
|
-
* Callback triggered when the Click to Pay component is ready to be used
|
|
2123
|
-
*/
|
|
2124
|
-
onReady?(): void;
|
|
2125
|
-
/**
|
|
2126
|
-
* Callback triggered when a timeout happens within Click to Pay service.
|
|
2127
|
-
* Ex: Network schemes took too long to initialize
|
|
2128
|
-
*/
|
|
2129
|
-
onTimeout?(error: TimeoutError): void;
|
|
2130
|
-
};
|
|
2131
|
-
type ClickToPayScheme = 'mc' | 'visa';
|
|
2132
|
-
|
|
2133
|
-
type MastercardCheckout = {
|
|
2134
|
-
srcDigitalCardId: string;
|
|
2135
|
-
srcCorrelationId: string;
|
|
2136
|
-
srcScheme: string;
|
|
2137
|
-
};
|
|
2138
|
-
type VisaCheckout = {
|
|
2139
|
-
srcCheckoutPayload?: string;
|
|
2140
|
-
srcTokenReference?: string;
|
|
2141
|
-
srcCorrelationId: string;
|
|
2142
|
-
srcScheme: string;
|
|
2143
|
-
};
|
|
2144
|
-
type ClickToPayCheckoutPayload = VisaCheckout | MastercardCheckout;
|
|
2145
|
-
|
|
2146
|
-
type ClickToPayConfiguration = UIElementProps & ClickToPayProps & {
|
|
2147
|
-
/**
|
|
2148
|
-
* ClickToPay configuration sent by the /paymentMethods response
|
|
2149
|
-
*/
|
|
2150
|
-
configuration?: {
|
|
2151
|
-
mcDpaId?: string;
|
|
2152
|
-
mcSrcClientId?: string;
|
|
2153
|
-
visaSrcInitiatorId?: string;
|
|
2154
|
-
visaSrciDpaId?: string;
|
|
2155
|
-
};
|
|
2156
|
-
};
|
|
2157
|
-
type ClickToPayPaymentData = {
|
|
2158
|
-
paymentMethod: ClickToPayCheckoutPayload & {
|
|
2159
|
-
type: string;
|
|
2160
|
-
};
|
|
2161
|
-
origin: string;
|
|
2162
|
-
browserInfo: BrowserInfo;
|
|
2163
|
-
};
|
|
2164
1766
|
|
|
2165
1767
|
declare enum ErrorEventCode {
|
|
2166
1768
|
/** Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined (meaning the containing element is not in the DOM */
|
|
@@ -2327,9 +1929,12 @@ type CheckoutThreeDS2Action = {
|
|
|
2327
1929
|
subtype: string;
|
|
2328
1930
|
authorisationToken: string;
|
|
2329
1931
|
};
|
|
2330
|
-
|
|
2331
|
-
data:
|
|
2332
|
-
|
|
1932
|
+
interface FingerprintResolveData {
|
|
1933
|
+
data: {
|
|
1934
|
+
[key: string]: string;
|
|
1935
|
+
paymentData: string;
|
|
1936
|
+
};
|
|
1937
|
+
}
|
|
2333
1938
|
interface ChallengeResolveData {
|
|
2334
1939
|
data: {
|
|
2335
1940
|
details: {
|
|
@@ -2378,8 +1983,8 @@ type ThreeDS2ConfigProps = {
|
|
|
2378
1983
|
};
|
|
2379
1984
|
type ThreeDS2ActionProps = CardConfiguration & Pick<ThreeDS2ConfigProps, 'isMDFlow' | 'on3DS2RedirectFlowComplete' | 'usePasskeyIFrameAttributes'>;
|
|
2380
1985
|
|
|
2381
|
-
type CoreCallbacks = Pick<CoreConfiguration, 'beforeRedirect' | 'beforeSubmit' | 'onSubmit' | 'onAdditionalDetails' | 'onPaymentFailed' | 'onPaymentCompleted' | 'onChange' | 'onActionHandled' | 'onError' | 'onEnterKeyPressed'>;
|
|
2382
|
-
type CustomCardConfiguration = CoreCallbacks & {
|
|
1986
|
+
type CoreCallbacks$1 = Pick<CoreConfiguration, 'beforeRedirect' | 'beforeSubmit' | 'onSubmit' | 'onAdditionalDetails' | 'onPaymentFailed' | 'onPaymentCompleted' | 'onChange' | 'onActionHandled' | 'onError' | 'onEnterKeyPressed'>;
|
|
1987
|
+
type CustomCardConfiguration = CoreCallbacks$1 & {
|
|
2383
1988
|
/**
|
|
2384
1989
|
* Automatically shift the focus from one field to another. Usually happens from a valid Expiry Date field to the Security Code field,
|
|
2385
1990
|
* but some BINS also allow us to know that the PAN is complete, in which case we can shift focus to the date field
|
|
@@ -2595,9 +2200,9 @@ interface BankDetailsSchema {
|
|
|
2595
2200
|
}
|
|
2596
2201
|
interface OpenInvoiceProps extends UIElementProps {
|
|
2597
2202
|
allowedCountries?: string[];
|
|
2598
|
-
consentCheckboxLabel
|
|
2203
|
+
consentCheckboxLabel: any;
|
|
2599
2204
|
countryCode?: string;
|
|
2600
|
-
data
|
|
2205
|
+
data: {
|
|
2601
2206
|
companyDetails?: CompanyDetailsSchema;
|
|
2602
2207
|
personalDetails?: PersonalDetailsSchema | null;
|
|
2603
2208
|
billingAddress?: AddressData;
|
|
@@ -2785,6 +2390,39 @@ declare class Atome extends OpenInvoiceContainer {
|
|
|
2785
2390
|
formatProps(props: OpenInvoiceConfiguration): any;
|
|
2786
2391
|
}
|
|
2787
2392
|
|
|
2393
|
+
interface RiskModuleOptions {
|
|
2394
|
+
enabled: boolean;
|
|
2395
|
+
onComplete?: (data: any) => void;
|
|
2396
|
+
onError?: (error: any) => void;
|
|
2397
|
+
node?: string;
|
|
2398
|
+
}
|
|
2399
|
+
interface RiskModuleProps extends BaseElementProps {
|
|
2400
|
+
risk: RiskModuleOptions;
|
|
2401
|
+
loadingContext: string;
|
|
2402
|
+
}
|
|
2403
|
+
declare class RiskElement extends BaseElement<RiskModuleProps> {
|
|
2404
|
+
static readonly type = "risk";
|
|
2405
|
+
static readonly defaultProps: {
|
|
2406
|
+
risk: {
|
|
2407
|
+
enabled: boolean;
|
|
2408
|
+
onComplete: () => void;
|
|
2409
|
+
onError: () => void;
|
|
2410
|
+
node: string;
|
|
2411
|
+
};
|
|
2412
|
+
};
|
|
2413
|
+
private nodeRiskContainer;
|
|
2414
|
+
constructor(checkout: ICore, props?: any);
|
|
2415
|
+
formatProps(props: any): any;
|
|
2416
|
+
onComplete: (result: any) => void;
|
|
2417
|
+
onError: (error: any) => void;
|
|
2418
|
+
get isValid(): any;
|
|
2419
|
+
get data(): any;
|
|
2420
|
+
get enabled(): boolean;
|
|
2421
|
+
cleanUp: () => void;
|
|
2422
|
+
componentWillUnmount(): void;
|
|
2423
|
+
render(): h.JSX.Element;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2788
2426
|
interface IssuerListState {
|
|
2789
2427
|
data: {
|
|
2790
2428
|
issuer?: string | null;
|
|
@@ -2819,7 +2457,7 @@ interface IssuerListData {
|
|
|
2819
2457
|
};
|
|
2820
2458
|
}
|
|
2821
2459
|
|
|
2822
|
-
declare class IssuerListContainer<TProps extends IssuerListConfiguration = IssuerListConfiguration, TData
|
|
2460
|
+
declare class IssuerListContainer<TProps extends IssuerListConfiguration = IssuerListConfiguration, TData = IssuerListData> extends UIElement<TProps> {
|
|
2823
2461
|
protected static readonly defaultProps: {
|
|
2824
2462
|
showImage: boolean;
|
|
2825
2463
|
issuers: any[];
|
|
@@ -2891,7 +2529,7 @@ declare class BillDeskOnlineElement extends IssuerListContainer {
|
|
|
2891
2529
|
}) => void;
|
|
2892
2530
|
environment?: string;
|
|
2893
2531
|
session?: Session;
|
|
2894
|
-
onComplete?: (state:
|
|
2532
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
2895
2533
|
isInstantPayment?: boolean;
|
|
2896
2534
|
isStoredPaymentMethod?: boolean;
|
|
2897
2535
|
oneClick?: boolean;
|
|
@@ -2906,7 +2544,7 @@ declare class BillDeskOnlineElement extends IssuerListContainer {
|
|
|
2906
2544
|
loadingContext?: string;
|
|
2907
2545
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
2908
2546
|
clientKey?: string;
|
|
2909
|
-
elementRef?:
|
|
2547
|
+
elementRef?: any;
|
|
2910
2548
|
i18n?: Language;
|
|
2911
2549
|
label?: string;
|
|
2912
2550
|
paymentMethodType?: string;
|
|
@@ -2959,7 +2597,7 @@ declare class BillDeskWalletElement extends IssuerListContainer {
|
|
|
2959
2597
|
}) => void;
|
|
2960
2598
|
environment?: string;
|
|
2961
2599
|
session?: Session;
|
|
2962
|
-
onComplete?: (state:
|
|
2600
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
2963
2601
|
isInstantPayment?: boolean;
|
|
2964
2602
|
isStoredPaymentMethod?: boolean;
|
|
2965
2603
|
oneClick?: boolean;
|
|
@@ -2974,7 +2612,7 @@ declare class BillDeskWalletElement extends IssuerListContainer {
|
|
|
2974
2612
|
loadingContext?: string;
|
|
2975
2613
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
2976
2614
|
clientKey?: string;
|
|
2977
|
-
elementRef?:
|
|
2615
|
+
elementRef?: any;
|
|
2978
2616
|
i18n?: Language;
|
|
2979
2617
|
label?: string;
|
|
2980
2618
|
paymentMethodType?: string;
|
|
@@ -3046,7 +2684,7 @@ declare class CashAppPay extends UIElement<CashAppPayConfiguration> {
|
|
|
3046
2684
|
}) => void;
|
|
3047
2685
|
environment?: string;
|
|
3048
2686
|
session?: Session;
|
|
3049
|
-
onComplete?: (state:
|
|
2687
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
3050
2688
|
isInstantPayment?: boolean;
|
|
3051
2689
|
isStoredPaymentMethod?: boolean;
|
|
3052
2690
|
oneClick?: boolean;
|
|
@@ -3061,7 +2699,7 @@ declare class CashAppPay extends UIElement<CashAppPayConfiguration> {
|
|
|
3061
2699
|
loadingContext?: string;
|
|
3062
2700
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
3063
2701
|
clientKey?: string;
|
|
3064
|
-
elementRef?:
|
|
2702
|
+
elementRef?: any;
|
|
3065
2703
|
i18n?: Language;
|
|
3066
2704
|
label?: string;
|
|
3067
2705
|
paymentMethodType?: string;
|
|
@@ -3125,7 +2763,7 @@ declare class ClickToPayElement extends UIElement<ClickToPayConfiguration> {
|
|
|
3125
2763
|
}) => void;
|
|
3126
2764
|
environment?: string;
|
|
3127
2765
|
session?: Session;
|
|
3128
|
-
onComplete?: (state:
|
|
2766
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
3129
2767
|
isInstantPayment?: boolean;
|
|
3130
2768
|
isStoredPaymentMethod?: boolean;
|
|
3131
2769
|
oneClick?: boolean;
|
|
@@ -3140,7 +2778,7 @@ declare class ClickToPayElement extends UIElement<ClickToPayConfiguration> {
|
|
|
3140
2778
|
loadingContext?: string;
|
|
3141
2779
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
3142
2780
|
clientKey?: string;
|
|
3143
|
-
elementRef?:
|
|
2781
|
+
elementRef?: any;
|
|
3144
2782
|
i18n?: Language;
|
|
3145
2783
|
label?: string;
|
|
3146
2784
|
paymentMethodType?: string;
|
|
@@ -3166,6 +2804,12 @@ declare class ClickToPayElement extends UIElement<ClickToPayConfiguration> {
|
|
|
3166
2804
|
protected componentToRender(): h.JSX.Element;
|
|
3167
2805
|
}
|
|
3168
2806
|
|
|
2807
|
+
interface DisclaimerMsgObject {
|
|
2808
|
+
message: string;
|
|
2809
|
+
linkText: string;
|
|
2810
|
+
link: string;
|
|
2811
|
+
}
|
|
2812
|
+
|
|
3169
2813
|
declare class BancontactElement extends CardElement {
|
|
3170
2814
|
static readonly type: TxVariants;
|
|
3171
2815
|
constructor(checkout: ICore, props?: CardConfiguration);
|
|
@@ -3187,7 +2831,7 @@ declare class BancontactElement extends CardElement {
|
|
|
3187
2831
|
cvcPolicy: CVCPolicyType;
|
|
3188
2832
|
autoFocus?: boolean;
|
|
3189
2833
|
billingAddressAllowedCountries?: string[];
|
|
3190
|
-
billingAddressMode?:
|
|
2834
|
+
billingAddressMode?: "full" | "partial" | "none";
|
|
3191
2835
|
billingAddressRequired?: boolean;
|
|
3192
2836
|
billingAddressRequiredFields?: string[];
|
|
3193
2837
|
brands?: string[];
|
|
@@ -3278,7 +2922,7 @@ declare class BancontactElement extends CardElement {
|
|
|
3278
2922
|
}) => void;
|
|
3279
2923
|
environment?: string;
|
|
3280
2924
|
session?: Session;
|
|
3281
|
-
onComplete?: (state:
|
|
2925
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
3282
2926
|
isInstantPayment?: boolean;
|
|
3283
2927
|
isStoredPaymentMethod?: boolean;
|
|
3284
2928
|
oneClick?: boolean;
|
|
@@ -3291,13 +2935,93 @@ declare class BancontactElement extends CardElement {
|
|
|
3291
2935
|
loadingContext?: string;
|
|
3292
2936
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
3293
2937
|
clientKey?: string;
|
|
3294
|
-
elementRef?:
|
|
2938
|
+
elementRef?: any;
|
|
3295
2939
|
i18n?: Language;
|
|
3296
2940
|
label?: string;
|
|
3297
2941
|
paymentMethodType?: string;
|
|
3298
2942
|
originalAction?: PaymentAction;
|
|
3299
2943
|
};
|
|
3300
|
-
onBrand: (event: any) => void;
|
|
2944
|
+
onBrand: (event: any) => void;
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2947
|
+
interface CampaignContentProps {
|
|
2948
|
+
logoUrl?: string;
|
|
2949
|
+
nonprofitDescription?: string;
|
|
2950
|
+
nonprofitName?: string;
|
|
2951
|
+
causeName?: string;
|
|
2952
|
+
nonprofitUrl?: string;
|
|
2953
|
+
bannerUrl?: string;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
type Donation = RoundupDonation | FixedAmountsDonation;
|
|
2957
|
+
type DonationType = 'roundup' | 'fixedAmounts';
|
|
2958
|
+
interface RoundupDonation {
|
|
2959
|
+
type: 'roundup';
|
|
2960
|
+
currency: string;
|
|
2961
|
+
maxRoundupAmount: number;
|
|
2962
|
+
}
|
|
2963
|
+
interface FixedAmountsDonation {
|
|
2964
|
+
type: 'fixedAmounts';
|
|
2965
|
+
currency: string;
|
|
2966
|
+
values: Array<number>;
|
|
2967
|
+
}
|
|
2968
|
+
interface DonationAmount {
|
|
2969
|
+
currency: string;
|
|
2970
|
+
value: number;
|
|
2971
|
+
}
|
|
2972
|
+
interface DonationPayload {
|
|
2973
|
+
data: {
|
|
2974
|
+
amount: DonationAmount;
|
|
2975
|
+
};
|
|
2976
|
+
isValid?: boolean;
|
|
2977
|
+
}
|
|
2978
|
+
interface DonationComponentProps extends CampaignContentProps {
|
|
2979
|
+
donation: Donation;
|
|
2980
|
+
/**
|
|
2981
|
+
* The original transaction amount.
|
|
2982
|
+
*/
|
|
2983
|
+
commercialTxAmount: number;
|
|
2984
|
+
termsAndConditionsUrl?: string;
|
|
2985
|
+
causeName?: string;
|
|
2986
|
+
showCancelButton?: boolean;
|
|
2987
|
+
onDonate: (payload: DonationPayload) => void;
|
|
2988
|
+
onCancel?: (payload: DonationPayload) => void;
|
|
2989
|
+
onChange?: (payload: DonationPayload) => void;
|
|
2990
|
+
onAmountSelected: (payload: DonationPayload) => void;
|
|
2991
|
+
}
|
|
2992
|
+
|
|
2993
|
+
declare class DonationElement extends UIElement<DonationConfiguration> {
|
|
2994
|
+
static readonly type = TxVariants.donation;
|
|
2995
|
+
private readonly isInServiceMode;
|
|
2996
|
+
constructor(checkout: ICore, props: DonationProps);
|
|
2997
|
+
/**
|
|
2998
|
+
* Type guard to determine if props are for "service" mode.
|
|
2999
|
+
*
|
|
3000
|
+
* The "service" mode is used in the /sessions flow:
|
|
3001
|
+
* - if the /payments response mandates it, we consult the /sessions/donationCampaigns endpoint on behalf of the merchant, and mount any found Donation Campaigns.
|
|
3002
|
+
*
|
|
3003
|
+
* The opposite of this mode is the "direct" mode, used in the Advanced flow:
|
|
3004
|
+
* - the merchant makes their own call to the /donationCampaigns endpoint and provides the Donation Campaign directly to the component.
|
|
3005
|
+
*/
|
|
3006
|
+
private static isServiceMode;
|
|
3007
|
+
static readonly defaultProps: {
|
|
3008
|
+
onCancel: () => void;
|
|
3009
|
+
onDonate: () => void;
|
|
3010
|
+
};
|
|
3011
|
+
private initialiseServiceMode;
|
|
3012
|
+
/**
|
|
3013
|
+
* Returns the component payment data ready to submit to the Checkout API
|
|
3014
|
+
*/
|
|
3015
|
+
get data(): any;
|
|
3016
|
+
/**
|
|
3017
|
+
* Returns whether the component state is valid or not
|
|
3018
|
+
*/
|
|
3019
|
+
get isValid(): any;
|
|
3020
|
+
setState(newState: any): void;
|
|
3021
|
+
donate(): void;
|
|
3022
|
+
cancel(): void;
|
|
3023
|
+
amountSelected(state: DonationPayload): void;
|
|
3024
|
+
protected componentToRender(): h.JSX.Element;
|
|
3301
3025
|
}
|
|
3302
3026
|
|
|
3303
3027
|
interface RedirectConfiguration extends UIElementProps {
|
|
@@ -3980,25 +3704,13 @@ declare class PaypalElement extends UIElement<PayPalConfiguration> {
|
|
|
3980
3704
|
protected componentToRender(): h.JSX.Element | null;
|
|
3981
3705
|
}
|
|
3982
3706
|
|
|
3983
|
-
/**
|
|
3984
|
-
* Methods that CustomCardInput exposes to the CustomCard element through the ref
|
|
3985
|
-
*/
|
|
3986
|
-
interface CustomCardInputRef extends ComponentMethodsRef {
|
|
3987
|
-
processBinLookupResponse(binLookupResponse: BinLookupResponse, isReset?: boolean): void;
|
|
3988
|
-
dualBrandingChangeHandler(event: Event | string): void;
|
|
3989
|
-
setFocusOn(frame: SFFieldType): void;
|
|
3990
|
-
updateStyles(stylesObj: StylesObject): void;
|
|
3991
|
-
handleUnsupportedCard(errObj: CardErrorData): boolean;
|
|
3992
|
-
}
|
|
3993
|
-
|
|
3994
3707
|
declare class CustomCard extends UIElement<CustomCardConfiguration> {
|
|
3995
3708
|
static readonly type = TxVariants.customCard;
|
|
3996
|
-
protected componentRef: CustomCardInputRef | undefined;
|
|
3997
3709
|
protected static readonly defaultProps: {
|
|
3998
3710
|
onBinLookup: () => void;
|
|
3999
3711
|
brandsConfiguration: {};
|
|
4000
3712
|
};
|
|
4001
|
-
private
|
|
3713
|
+
private brand;
|
|
4002
3714
|
formatProps(props: CustomCardConfiguration): {
|
|
4003
3715
|
type: TxVariants;
|
|
4004
3716
|
onPaymentCompleted?: (data: PaymentCompletedData, component?: UIElement) => void;
|
|
@@ -4043,10 +3755,7 @@ declare class CustomCard extends UIElement<CustomCardConfiguration> {
|
|
|
4043
3755
|
* Formats the component data output
|
|
4044
3756
|
*/
|
|
4045
3757
|
formatData(): {
|
|
4046
|
-
paymentMethod:
|
|
4047
|
-
brand: any;
|
|
4048
|
-
type: string;
|
|
4049
|
-
};
|
|
3758
|
+
paymentMethod: any;
|
|
4050
3759
|
browserInfo: BrowserInfo;
|
|
4051
3760
|
origin: string;
|
|
4052
3761
|
};
|
|
@@ -4059,17 +3768,11 @@ declare class CustomCard extends UIElement<CustomCardConfiguration> {
|
|
|
4059
3768
|
onBinValue: (callbackObj: CardBinValueData) => void;
|
|
4060
3769
|
get isValid(): boolean;
|
|
4061
3770
|
get browserInfo(): BrowserInfo;
|
|
4062
|
-
private
|
|
3771
|
+
private onFocus;
|
|
4063
3772
|
protected onEnterKeyPressed: (activeElement: Element, component: UIElement) => void;
|
|
4064
3773
|
protected componentToRender(): h.JSX.Element;
|
|
4065
3774
|
}
|
|
4066
3775
|
|
|
4067
|
-
interface IbanData {
|
|
4068
|
-
ownerName?: string;
|
|
4069
|
-
ibanNumber?: string;
|
|
4070
|
-
countryCode?: string;
|
|
4071
|
-
}
|
|
4072
|
-
|
|
4073
3776
|
interface SepaElementData {
|
|
4074
3777
|
paymentMethod: {
|
|
4075
3778
|
type: string;
|
|
@@ -4078,7 +3781,6 @@ interface SepaElementData {
|
|
|
4078
3781
|
};
|
|
4079
3782
|
}
|
|
4080
3783
|
interface SepaConfiguration extends UIElementProps {
|
|
4081
|
-
data?: IbanData;
|
|
4082
3784
|
}
|
|
4083
3785
|
|
|
4084
3786
|
declare class SepaElement extends UIElement<SepaConfiguration> {
|
|
@@ -4087,9 +3789,7 @@ declare class SepaElement extends UIElement<SepaConfiguration> {
|
|
|
4087
3789
|
/**
|
|
4088
3790
|
* Formats props on construction time
|
|
4089
3791
|
*/
|
|
4090
|
-
formatProps(props:
|
|
4091
|
-
holderName: boolean;
|
|
4092
|
-
};
|
|
3792
|
+
formatProps(props: any): any;
|
|
4093
3793
|
/**
|
|
4094
3794
|
* Formats the component data output
|
|
4095
3795
|
*/
|
|
@@ -4204,7 +3904,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
4204
3904
|
}) => void;
|
|
4205
3905
|
environment?: string;
|
|
4206
3906
|
session?: Session;
|
|
4207
|
-
onComplete?: (state:
|
|
3907
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4208
3908
|
isInstantPayment?: boolean;
|
|
4209
3909
|
isStoredPaymentMethod?: boolean;
|
|
4210
3910
|
oneClick?: boolean;
|
|
@@ -4218,7 +3918,7 @@ declare class WeChatPayElement extends QRLoaderContainer {
|
|
|
4218
3918
|
loadingContext?: string;
|
|
4219
3919
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4220
3920
|
clientKey?: string;
|
|
4221
|
-
elementRef?:
|
|
3921
|
+
elementRef?: any;
|
|
4222
3922
|
i18n?: Language;
|
|
4223
3923
|
label?: string;
|
|
4224
3924
|
paymentMethodType?: string;
|
|
@@ -4279,7 +3979,7 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
4279
3979
|
}) => void;
|
|
4280
3980
|
environment?: string;
|
|
4281
3981
|
session?: Session;
|
|
4282
|
-
onComplete?: (state:
|
|
3982
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4283
3983
|
isInstantPayment?: boolean;
|
|
4284
3984
|
isStoredPaymentMethod?: boolean;
|
|
4285
3985
|
oneClick?: boolean;
|
|
@@ -4293,7 +3993,7 @@ declare class PayNowElement extends QRLoaderContainer {
|
|
|
4293
3993
|
loadingContext?: string;
|
|
4294
3994
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4295
3995
|
clientKey?: string;
|
|
4296
|
-
elementRef?:
|
|
3996
|
+
elementRef?: any;
|
|
4297
3997
|
i18n?: Language;
|
|
4298
3998
|
label?: string;
|
|
4299
3999
|
paymentMethodType?: string;
|
|
@@ -4355,7 +4055,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
4355
4055
|
}) => void;
|
|
4356
4056
|
environment?: string;
|
|
4357
4057
|
session?: Session;
|
|
4358
|
-
onComplete?: (state:
|
|
4058
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4359
4059
|
isInstantPayment?: boolean;
|
|
4360
4060
|
isStoredPaymentMethod?: boolean;
|
|
4361
4061
|
oneClick?: boolean;
|
|
@@ -4369,7 +4069,7 @@ declare class BCMCMobileElement extends QRLoaderContainer {
|
|
|
4369
4069
|
loadingContext?: string;
|
|
4370
4070
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4371
4071
|
clientKey?: string;
|
|
4372
|
-
elementRef?:
|
|
4072
|
+
elementRef?: any;
|
|
4373
4073
|
i18n?: Language;
|
|
4374
4074
|
label?: string;
|
|
4375
4075
|
paymentMethodType?: string;
|
|
@@ -4448,7 +4148,7 @@ declare class DragonpayElement extends UIElement<DragonpayConfiguraton> {
|
|
|
4448
4148
|
}) => void;
|
|
4449
4149
|
environment?: string;
|
|
4450
4150
|
session?: Session;
|
|
4451
|
-
onComplete?: (state:
|
|
4151
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4452
4152
|
isInstantPayment?: boolean;
|
|
4453
4153
|
isStoredPaymentMethod?: boolean;
|
|
4454
4154
|
oneClick?: boolean;
|
|
@@ -4461,7 +4161,7 @@ declare class DragonpayElement extends UIElement<DragonpayConfiguraton> {
|
|
|
4461
4161
|
payButton?: (options: PayButtonProps) => h.JSX.Element;
|
|
4462
4162
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4463
4163
|
clientKey?: string;
|
|
4464
|
-
elementRef?:
|
|
4164
|
+
elementRef?: any;
|
|
4465
4165
|
label?: string;
|
|
4466
4166
|
paymentMethodType?: string;
|
|
4467
4167
|
originalAction?: PaymentAction;
|
|
@@ -4581,7 +4281,7 @@ declare class EPSElement extends IssuerListContainer {
|
|
|
4581
4281
|
}) => void;
|
|
4582
4282
|
environment?: string;
|
|
4583
4283
|
session?: Session;
|
|
4584
|
-
onComplete?: (state:
|
|
4284
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4585
4285
|
isInstantPayment?: boolean;
|
|
4586
4286
|
isStoredPaymentMethod?: boolean;
|
|
4587
4287
|
oneClick?: boolean;
|
|
@@ -4596,7 +4296,7 @@ declare class EPSElement extends IssuerListContainer {
|
|
|
4596
4296
|
loadingContext?: string;
|
|
4597
4297
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4598
4298
|
clientKey?: string;
|
|
4599
|
-
elementRef?:
|
|
4299
|
+
elementRef?: any;
|
|
4600
4300
|
i18n?: Language;
|
|
4601
4301
|
label?: string;
|
|
4602
4302
|
paymentMethodType?: string;
|
|
@@ -4690,7 +4390,7 @@ declare class Giftcard extends Component<Readonly<GiftcardComponentProps>> {
|
|
|
4690
4390
|
* Maps string error codes from SecuredFields to validation rule objects
|
|
4691
4391
|
*/
|
|
4692
4392
|
mapErrorsToValidationObjects: () => SFStateErrorObj;
|
|
4693
|
-
private
|
|
4393
|
+
private updateTransformedErrors;
|
|
4694
4394
|
onChange: (sfpState: any) => void;
|
|
4695
4395
|
handleFocus: (e: any) => void;
|
|
4696
4396
|
setBalance: ({ balance, transactionLimit }: {
|
|
@@ -4733,14 +4433,14 @@ declare class GiftcardElement extends UIElement<GiftCardConfiguration> {
|
|
|
4733
4433
|
get icon(): string;
|
|
4734
4434
|
get displayName(): string;
|
|
4735
4435
|
private setBalanceCheckError;
|
|
4736
|
-
private
|
|
4737
|
-
private
|
|
4436
|
+
private handleBalanceCheck;
|
|
4437
|
+
private onOrderRequest;
|
|
4738
4438
|
balanceCheck(): void;
|
|
4739
|
-
private
|
|
4439
|
+
private onBalanceCheck;
|
|
4740
4440
|
/**
|
|
4741
4441
|
* Check if it should call onRequiringConfirmation
|
|
4742
4442
|
*/
|
|
4743
|
-
private
|
|
4443
|
+
private handleOnRequiringConfirmation;
|
|
4744
4444
|
submit(): void;
|
|
4745
4445
|
private makeSubmitCall;
|
|
4746
4446
|
protected payButton: (props: PayButtonProps) => h.JSX.Element;
|
|
@@ -4842,7 +4542,7 @@ declare class PayuNetCashcardElement extends IssuerListContainer {
|
|
|
4842
4542
|
}) => void;
|
|
4843
4543
|
environment?: string;
|
|
4844
4544
|
session?: Session;
|
|
4845
|
-
onComplete?: (state:
|
|
4545
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4846
4546
|
isInstantPayment?: boolean;
|
|
4847
4547
|
isStoredPaymentMethod?: boolean;
|
|
4848
4548
|
oneClick?: boolean;
|
|
@@ -4857,7 +4557,7 @@ declare class PayuNetCashcardElement extends IssuerListContainer {
|
|
|
4857
4557
|
loadingContext?: string;
|
|
4858
4558
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4859
4559
|
clientKey?: string;
|
|
4860
|
-
elementRef?:
|
|
4560
|
+
elementRef?: any;
|
|
4861
4561
|
i18n?: Language;
|
|
4862
4562
|
label?: string;
|
|
4863
4563
|
paymentMethodType?: string;
|
|
@@ -4910,7 +4610,7 @@ declare class PayuNetBankingElement extends IssuerListContainer {
|
|
|
4910
4610
|
}) => void;
|
|
4911
4611
|
environment?: string;
|
|
4912
4612
|
session?: Session;
|
|
4913
|
-
onComplete?: (state:
|
|
4613
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4914
4614
|
isInstantPayment?: boolean;
|
|
4915
4615
|
isStoredPaymentMethod?: boolean;
|
|
4916
4616
|
oneClick?: boolean;
|
|
@@ -4925,7 +4625,7 @@ declare class PayuNetBankingElement extends IssuerListContainer {
|
|
|
4925
4625
|
loadingContext?: string;
|
|
4926
4626
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
4927
4627
|
clientKey?: string;
|
|
4928
|
-
elementRef?:
|
|
4628
|
+
elementRef?: any;
|
|
4929
4629
|
i18n?: Language;
|
|
4930
4630
|
label?: string;
|
|
4931
4631
|
paymentMethodType?: string;
|
|
@@ -4991,7 +4691,7 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
4991
4691
|
}) => void;
|
|
4992
4692
|
environment?: string;
|
|
4993
4693
|
session?: Session;
|
|
4994
|
-
onComplete?: (state:
|
|
4694
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
4995
4695
|
isInstantPayment?: boolean;
|
|
4996
4696
|
isStoredPaymentMethod?: boolean;
|
|
4997
4697
|
oneClick?: boolean;
|
|
@@ -5005,7 +4705,7 @@ declare class SwishElement extends QRLoaderContainer {
|
|
|
5005
4705
|
loadingContext?: string;
|
|
5006
4706
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5007
4707
|
clientKey?: string;
|
|
5008
|
-
elementRef?:
|
|
4708
|
+
elementRef?: any;
|
|
5009
4709
|
i18n?: Language;
|
|
5010
4710
|
label?: string;
|
|
5011
4711
|
paymentMethodType?: string;
|
|
@@ -5081,7 +4781,7 @@ declare class MBWayElement extends UIElement<AwaitConfiguration> {
|
|
|
5081
4781
|
/**
|
|
5082
4782
|
* Formats the component data output
|
|
5083
4783
|
*/
|
|
5084
|
-
formatData():
|
|
4784
|
+
formatData(): object;
|
|
5085
4785
|
get isValid(): boolean;
|
|
5086
4786
|
get displayName(): string;
|
|
5087
4787
|
protected componentToRender(): h.JSX.Element;
|
|
@@ -5380,7 +5080,7 @@ declare class OnlineBankingINElement extends IssuerListContainer {
|
|
|
5380
5080
|
}) => void;
|
|
5381
5081
|
environment?: string;
|
|
5382
5082
|
session?: Session;
|
|
5383
|
-
onComplete?: (state:
|
|
5083
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5384
5084
|
isInstantPayment?: boolean;
|
|
5385
5085
|
isStoredPaymentMethod?: boolean;
|
|
5386
5086
|
oneClick?: boolean;
|
|
@@ -5395,7 +5095,7 @@ declare class OnlineBankingINElement extends IssuerListContainer {
|
|
|
5395
5095
|
loadingContext?: string;
|
|
5396
5096
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5397
5097
|
clientKey?: string;
|
|
5398
|
-
elementRef?:
|
|
5098
|
+
elementRef?: any;
|
|
5399
5099
|
i18n?: Language;
|
|
5400
5100
|
label?: string;
|
|
5401
5101
|
paymentMethodType?: string;
|
|
@@ -5577,7 +5277,7 @@ declare class WalletINElement extends IssuerListContainer {
|
|
|
5577
5277
|
}) => void;
|
|
5578
5278
|
environment?: string;
|
|
5579
5279
|
session?: Session;
|
|
5580
|
-
onComplete?: (state:
|
|
5280
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5581
5281
|
isInstantPayment?: boolean;
|
|
5582
5282
|
isStoredPaymentMethod?: boolean;
|
|
5583
5283
|
oneClick?: boolean;
|
|
@@ -5592,7 +5292,7 @@ declare class WalletINElement extends IssuerListContainer {
|
|
|
5592
5292
|
loadingContext?: string;
|
|
5593
5293
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5594
5294
|
clientKey?: string;
|
|
5595
|
-
elementRef?:
|
|
5295
|
+
elementRef?: any;
|
|
5596
5296
|
i18n?: Language;
|
|
5597
5297
|
label?: string;
|
|
5598
5298
|
paymentMethodType?: string;
|
|
@@ -5660,7 +5360,7 @@ declare class OnlineBankingCZElement extends IssuerListContainer {
|
|
|
5660
5360
|
}) => void;
|
|
5661
5361
|
environment?: string;
|
|
5662
5362
|
session?: Session;
|
|
5663
|
-
onComplete?: (state:
|
|
5363
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5664
5364
|
isInstantPayment?: boolean;
|
|
5665
5365
|
isStoredPaymentMethod?: boolean;
|
|
5666
5366
|
oneClick?: boolean;
|
|
@@ -5675,7 +5375,7 @@ declare class OnlineBankingCZElement extends IssuerListContainer {
|
|
|
5675
5375
|
loadingContext?: string;
|
|
5676
5376
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5677
5377
|
clientKey?: string;
|
|
5678
|
-
elementRef?:
|
|
5378
|
+
elementRef?: any;
|
|
5679
5379
|
i18n?: Language;
|
|
5680
5380
|
label?: string;
|
|
5681
5381
|
paymentMethodType?: string;
|
|
@@ -5733,7 +5433,7 @@ declare class OnlineBankingSKElement extends IssuerListContainer {
|
|
|
5733
5433
|
}) => void;
|
|
5734
5434
|
environment?: string;
|
|
5735
5435
|
session?: Session;
|
|
5736
|
-
onComplete?: (state:
|
|
5436
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5737
5437
|
isInstantPayment?: boolean;
|
|
5738
5438
|
isStoredPaymentMethod?: boolean;
|
|
5739
5439
|
oneClick?: boolean;
|
|
@@ -5748,7 +5448,7 @@ declare class OnlineBankingSKElement extends IssuerListContainer {
|
|
|
5748
5448
|
loadingContext?: string;
|
|
5749
5449
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5750
5450
|
clientKey?: string;
|
|
5751
|
-
elementRef?:
|
|
5451
|
+
elementRef?: any;
|
|
5752
5452
|
i18n?: Language;
|
|
5753
5453
|
label?: string;
|
|
5754
5454
|
paymentMethodType?: string;
|
|
@@ -5815,7 +5515,7 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
5815
5515
|
}) => void;
|
|
5816
5516
|
environment?: string;
|
|
5817
5517
|
session?: Session;
|
|
5818
|
-
onComplete?: (state:
|
|
5518
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5819
5519
|
isInstantPayment?: boolean;
|
|
5820
5520
|
isStoredPaymentMethod?: boolean;
|
|
5821
5521
|
oneClick?: boolean;
|
|
@@ -5829,7 +5529,7 @@ declare class PromptPayElement extends QRLoaderContainer {
|
|
|
5829
5529
|
loadingContext?: string;
|
|
5830
5530
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5831
5531
|
clientKey?: string;
|
|
5832
|
-
elementRef?:
|
|
5532
|
+
elementRef?: any;
|
|
5833
5533
|
i18n?: Language;
|
|
5834
5534
|
label?: string;
|
|
5835
5535
|
paymentMethodType?: string;
|
|
@@ -5890,7 +5590,7 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
5890
5590
|
}) => void;
|
|
5891
5591
|
environment?: string;
|
|
5892
5592
|
session?: Session;
|
|
5893
|
-
onComplete?: (state:
|
|
5593
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
5894
5594
|
isInstantPayment?: boolean;
|
|
5895
5595
|
isStoredPaymentMethod?: boolean;
|
|
5896
5596
|
oneClick?: boolean;
|
|
@@ -5904,7 +5604,7 @@ declare class DuitNowElement extends QRLoaderContainer {
|
|
|
5904
5604
|
loadingContext?: string;
|
|
5905
5605
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
5906
5606
|
clientKey?: string;
|
|
5907
|
-
elementRef?:
|
|
5607
|
+
elementRef?: any;
|
|
5908
5608
|
i18n?: Language;
|
|
5909
5609
|
label?: string;
|
|
5910
5610
|
paymentMethodType?: string;
|
|
@@ -5931,21 +5631,201 @@ declare class Riverty extends RedirectElement {
|
|
|
5931
5631
|
browserInfo: BrowserInfo;
|
|
5932
5632
|
};
|
|
5933
5633
|
}
|
|
5934
|
-
|
|
5935
|
-
declare class PayByBankUS extends RedirectElement {
|
|
5936
|
-
static readonly type: TxVariants;
|
|
5937
|
-
protected formatProps(props: any): any;
|
|
5938
|
-
formatData(): {
|
|
5939
|
-
paymentMethod: {
|
|
5940
|
-
storedPaymentMethodId: string;
|
|
5941
|
-
type: string;
|
|
5942
|
-
};
|
|
5943
|
-
browserInfo: BrowserInfo;
|
|
5944
|
-
};
|
|
5945
|
-
get displayName(): string;
|
|
5946
|
-
get additionalInfo(): string;
|
|
5947
|
-
get brands(): PaymentMethodBrand[];
|
|
5948
|
-
protected componentToRender(): h.JSX.Element;
|
|
5634
|
+
|
|
5635
|
+
declare class PayByBankUS extends RedirectElement {
|
|
5636
|
+
static readonly type: TxVariants;
|
|
5637
|
+
protected formatProps(props: any): any;
|
|
5638
|
+
formatData(): {
|
|
5639
|
+
paymentMethod: {
|
|
5640
|
+
storedPaymentMethodId: string;
|
|
5641
|
+
type: string;
|
|
5642
|
+
};
|
|
5643
|
+
browserInfo: BrowserInfo;
|
|
5644
|
+
};
|
|
5645
|
+
get displayName(): string;
|
|
5646
|
+
get additionalInfo(): string;
|
|
5647
|
+
get brands(): PaymentMethodBrand[];
|
|
5648
|
+
protected componentToRender(): h.JSX.Element;
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
/**
|
|
5652
|
+
* PayPal Fastlane Reference:
|
|
5653
|
+
* https://developer.paypal.com/docs/checkout/fastlane/reference/#link-customizeyourintegration
|
|
5654
|
+
*/
|
|
5655
|
+
/**
|
|
5656
|
+
* Fastlane object available in the window
|
|
5657
|
+
*/
|
|
5658
|
+
interface FastlaneWindowInstance {
|
|
5659
|
+
identity: {
|
|
5660
|
+
lookupCustomerByEmail: (email: string) => Promise<{
|
|
5661
|
+
customerContextId: string;
|
|
5662
|
+
}>;
|
|
5663
|
+
triggerAuthenticationFlow: (customerContextId: string, options?: AuthenticationFlowOptions) => Promise<FastlaneAuthenticatedCustomerResult>;
|
|
5664
|
+
getSession: () => Promise<{
|
|
5665
|
+
sessionId: string;
|
|
5666
|
+
}>;
|
|
5667
|
+
};
|
|
5668
|
+
profile: {
|
|
5669
|
+
showShippingAddressSelector: () => Promise<FastlaneShippingAddressSelectorResult>;
|
|
5670
|
+
};
|
|
5671
|
+
setLocale: (locale: string) => void;
|
|
5672
|
+
ConsentComponent: () => Promise<{
|
|
5673
|
+
getRenderState: () => Promise<FastlaneConsentRenderState>;
|
|
5674
|
+
}>;
|
|
5675
|
+
FastlaneWatermarkComponent: (options: {
|
|
5676
|
+
includeAdditionalInfo: boolean;
|
|
5677
|
+
}) => Promise<{
|
|
5678
|
+
render: (container: any) => null;
|
|
5679
|
+
}>;
|
|
5680
|
+
}
|
|
5681
|
+
interface FastlaneConsentRenderState {
|
|
5682
|
+
showConsent: boolean;
|
|
5683
|
+
defaultToggleState?: boolean;
|
|
5684
|
+
termsAndConditionsLink?: string;
|
|
5685
|
+
termsAndConditionsVersion?: string;
|
|
5686
|
+
privacyPolicyLink?: string;
|
|
5687
|
+
}
|
|
5688
|
+
interface FastlaneOptions {
|
|
5689
|
+
intendedExperience: 'externalProcessorCustomConsent';
|
|
5690
|
+
metadata?: {
|
|
5691
|
+
geoLocOverride?: string;
|
|
5692
|
+
};
|
|
5693
|
+
}
|
|
5694
|
+
interface AuthenticationFlowOptions {
|
|
5695
|
+
}
|
|
5696
|
+
interface CardPaymentSource {
|
|
5697
|
+
brand: string;
|
|
5698
|
+
expiry: string;
|
|
5699
|
+
lastDigits: string;
|
|
5700
|
+
name: string;
|
|
5701
|
+
billingAddress: FastlaneAddress;
|
|
5702
|
+
}
|
|
5703
|
+
/**
|
|
5704
|
+
* External types
|
|
5705
|
+
*/
|
|
5706
|
+
interface FastlaneShippingAddressSelectorResult {
|
|
5707
|
+
selectionChanged: boolean;
|
|
5708
|
+
selectedAddress: FastlaneShipping;
|
|
5709
|
+
}
|
|
5710
|
+
interface FastlaneAuthenticatedCustomerSucceeded {
|
|
5711
|
+
authenticationState: 'succeeded';
|
|
5712
|
+
profileData: FastlaneProfile;
|
|
5713
|
+
}
|
|
5714
|
+
interface FastlaneAuthenticatedCustomerFailed {
|
|
5715
|
+
authenticationState: 'failed' | 'canceled' | 'not_found';
|
|
5716
|
+
profileData: undefined;
|
|
5717
|
+
}
|
|
5718
|
+
type FastlaneAuthenticatedCustomerResult = FastlaneAuthenticatedCustomerSucceeded | FastlaneAuthenticatedCustomerFailed;
|
|
5719
|
+
interface FastlaneAddress {
|
|
5720
|
+
addressLine1: string;
|
|
5721
|
+
addressLine2: string;
|
|
5722
|
+
adminArea1: string;
|
|
5723
|
+
adminArea2: string;
|
|
5724
|
+
postalCode: string;
|
|
5725
|
+
countryCode: string;
|
|
5726
|
+
phone: {
|
|
5727
|
+
nationalNumber: string;
|
|
5728
|
+
countryCode: string;
|
|
5729
|
+
};
|
|
5730
|
+
}
|
|
5731
|
+
interface FastlaneShipping {
|
|
5732
|
+
name: {
|
|
5733
|
+
firstName: string;
|
|
5734
|
+
lastName: string;
|
|
5735
|
+
fullName: string;
|
|
5736
|
+
};
|
|
5737
|
+
address: FastlaneAddress;
|
|
5738
|
+
phoneNumber: {
|
|
5739
|
+
nationalNumber: string;
|
|
5740
|
+
countryCode: string;
|
|
5741
|
+
};
|
|
5742
|
+
}
|
|
5743
|
+
interface FastlaneProfile {
|
|
5744
|
+
name: {
|
|
5745
|
+
firstName: string;
|
|
5746
|
+
lastName: string;
|
|
5747
|
+
fullName: string;
|
|
5748
|
+
};
|
|
5749
|
+
shippingAddress: FastlaneShipping;
|
|
5750
|
+
card?: {
|
|
5751
|
+
id: string;
|
|
5752
|
+
paymentSource: {
|
|
5753
|
+
card: CardPaymentSource;
|
|
5754
|
+
};
|
|
5755
|
+
};
|
|
5756
|
+
}
|
|
5757
|
+
type FastlaneComponentConfiguration = {
|
|
5758
|
+
paymentType: 'fastlane';
|
|
5759
|
+
configuration: {
|
|
5760
|
+
fastlaneSessionId: string;
|
|
5761
|
+
email: string;
|
|
5762
|
+
tokenId: string;
|
|
5763
|
+
lastFour: string;
|
|
5764
|
+
brand: string;
|
|
5765
|
+
};
|
|
5766
|
+
};
|
|
5767
|
+
type FastlaneCardComponentConfiguration = {
|
|
5768
|
+
paymentType: 'card';
|
|
5769
|
+
configuration: {
|
|
5770
|
+
fastlaneConfiguration?: FastlaneSignupConfiguration;
|
|
5771
|
+
};
|
|
5772
|
+
};
|
|
5773
|
+
type FastlaneSignupConfiguration = FastlaneConsentRenderState & {
|
|
5774
|
+
fastlaneSessionId?: string;
|
|
5775
|
+
telephoneNumber?: string;
|
|
5776
|
+
};
|
|
5777
|
+
interface FastlaneData {
|
|
5778
|
+
consentShown: boolean;
|
|
5779
|
+
fastlaneSessionId: string;
|
|
5780
|
+
consentGiven: boolean;
|
|
5781
|
+
consentVersion?: string;
|
|
5782
|
+
telephoneNumber?: string;
|
|
5783
|
+
}
|
|
5784
|
+
type FastlanePaymentMethodConfiguration = FastlaneComponentConfiguration | FastlaneCardComponentConfiguration;
|
|
5785
|
+
interface FastlaneSDKConfiguration {
|
|
5786
|
+
clientKey: string;
|
|
5787
|
+
environment: CoreConfiguration['environment'];
|
|
5788
|
+
locale?: 'en-US' | 'es-US' | 'fr-RS' | 'zh-US';
|
|
5789
|
+
analytics?: Pick<AnalyticsOptions, 'enabled'>;
|
|
5790
|
+
/**
|
|
5791
|
+
* Used to force the Fastlane SDK to return the consent details in case the shopper is not recognized.
|
|
5792
|
+
* Use-case: Developer is testing the flow in another country outside US, which would not get consent details.
|
|
5793
|
+
*
|
|
5794
|
+
* This configuration should not be used for 'live' environment
|
|
5795
|
+
*/
|
|
5796
|
+
forceConsentDetails?: boolean;
|
|
5797
|
+
}
|
|
5798
|
+
interface FastlaneConfiguration extends UIElementProps {
|
|
5799
|
+
/**
|
|
5800
|
+
* Card token ID, used to process the payment
|
|
5801
|
+
*/
|
|
5802
|
+
tokenId: string;
|
|
5803
|
+
/**
|
|
5804
|
+
* Fastlane session ID
|
|
5805
|
+
*/
|
|
5806
|
+
fastlaneSessionId: string;
|
|
5807
|
+
/**
|
|
5808
|
+
* Initial last four digits displayed once the Component is rendered
|
|
5809
|
+
*/
|
|
5810
|
+
lastFour: string;
|
|
5811
|
+
/**
|
|
5812
|
+
* Initial brand displayed once the Component is rendered
|
|
5813
|
+
*/
|
|
5814
|
+
brand: string;
|
|
5815
|
+
/**
|
|
5816
|
+
* Shopper's email (it will be used in the future to re-authenticate using Fastlane SDK within the Component)
|
|
5817
|
+
*/
|
|
5818
|
+
email: string;
|
|
5819
|
+
/**
|
|
5820
|
+
* Used internally by Drop-in. Displays the brand images inside the Drop-in payment method header
|
|
5821
|
+
* @internal
|
|
5822
|
+
*/
|
|
5823
|
+
keepBrandsVisible?: boolean;
|
|
5824
|
+
/**
|
|
5825
|
+
* Property returned by the backend. Contains the list of brands supported by Fastlane component
|
|
5826
|
+
* @internal
|
|
5827
|
+
*/
|
|
5828
|
+
brands?: string[];
|
|
5949
5829
|
}
|
|
5950
5830
|
|
|
5951
5831
|
declare class Fastlane extends UIElement<FastlaneConfiguration> {
|
|
@@ -6171,7 +6051,7 @@ declare class PayToElement extends UIElement<PayToConfiguration> {
|
|
|
6171
6051
|
}) => void;
|
|
6172
6052
|
environment?: string;
|
|
6173
6053
|
session?: Session;
|
|
6174
|
-
onComplete?: (state:
|
|
6054
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
6175
6055
|
isInstantPayment?: boolean;
|
|
6176
6056
|
isStoredPaymentMethod?: boolean;
|
|
6177
6057
|
oneClick?: boolean;
|
|
@@ -6186,7 +6066,7 @@ declare class PayToElement extends UIElement<PayToConfiguration> {
|
|
|
6186
6066
|
loadingContext?: string;
|
|
6187
6067
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
6188
6068
|
clientKey?: string;
|
|
6189
|
-
elementRef?:
|
|
6069
|
+
elementRef?: any;
|
|
6190
6070
|
i18n?: Language;
|
|
6191
6071
|
label?: string;
|
|
6192
6072
|
paymentMethodType?: string;
|
|
@@ -6688,85 +6568,164 @@ interface IDropin {
|
|
|
6688
6568
|
closeActivePaymentMethod: () => void;
|
|
6689
6569
|
}
|
|
6690
6570
|
|
|
6691
|
-
interface
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6571
|
+
interface SFError {
|
|
6572
|
+
isValid?: boolean;
|
|
6573
|
+
errorMessage?: string;
|
|
6574
|
+
errorI18n?: string;
|
|
6575
|
+
error: string;
|
|
6576
|
+
rootNode: HTMLElement;
|
|
6577
|
+
detectedBrands?: string[];
|
|
6578
|
+
}
|
|
6579
|
+
interface SFStateErrorObj {
|
|
6580
|
+
[key: string]: SFError;
|
|
6698
6581
|
}
|
|
6699
6582
|
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
interface RoundupDonation {
|
|
6703
|
-
type: 'roundup';
|
|
6704
|
-
currency: string;
|
|
6705
|
-
maxRoundupAmount: number;
|
|
6583
|
+
interface ValidationRuleErrorObj {
|
|
6584
|
+
[key: string]: ValidationRuleResult;
|
|
6706
6585
|
}
|
|
6707
|
-
interface
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6586
|
+
interface AriaAttributes {
|
|
6587
|
+
'aria-relevant'?: 'additions' | 'all' | 'removals' | 'text' | 'additions text';
|
|
6588
|
+
'aria-live'?: 'off' | 'polite' | 'assertive';
|
|
6589
|
+
'aria-atomic'?: 'true' | 'false';
|
|
6711
6590
|
}
|
|
6712
|
-
interface
|
|
6713
|
-
|
|
6714
|
-
|
|
6591
|
+
interface SRPanelProps extends BaseElementProps {
|
|
6592
|
+
enabled?: boolean;
|
|
6593
|
+
node?: string;
|
|
6594
|
+
showPanel?: boolean;
|
|
6595
|
+
moveFocus?: boolean;
|
|
6596
|
+
id?: string;
|
|
6597
|
+
ariaAttributes?: AriaAttributes;
|
|
6715
6598
|
}
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6599
|
+
type SRPanelConfig = Pick<SRPanelProps, 'enabled' | 'node' | 'showPanel' | 'moveFocus' | 'id' | 'ariaAttributes'>;
|
|
6600
|
+
interface GenericError {
|
|
6601
|
+
isValid: boolean;
|
|
6602
|
+
errorMessage: string;
|
|
6603
|
+
error: string;
|
|
6721
6604
|
}
|
|
6722
|
-
|
|
6723
|
-
|
|
6605
|
+
|
|
6606
|
+
/**
|
|
6607
|
+
* A panel meant to hold messages that will be read out by ScreenReaders on an aria-live="polite" basis
|
|
6608
|
+
* Expects a string or string array of message to add to the panel to be read out
|
|
6609
|
+
* For testing purposes can be made visible
|
|
6610
|
+
*/
|
|
6611
|
+
declare class SRPanel extends BaseElement<SRPanelProps> {
|
|
6612
|
+
static readonly type = "srPanel";
|
|
6613
|
+
static readonly defaultProps: Partial<SRPanelProps>;
|
|
6614
|
+
private readonly srPanelContainer;
|
|
6615
|
+
private readonly id;
|
|
6616
|
+
private readonly showPanel;
|
|
6617
|
+
private readonly _enabled;
|
|
6618
|
+
private readonly _moveFocus;
|
|
6619
|
+
private componentRef;
|
|
6620
|
+
constructor(checkout: ICore, props?: SRPanelProps);
|
|
6621
|
+
setComponentRef: (ref: any) => void;
|
|
6622
|
+
get enabled(): boolean;
|
|
6623
|
+
get moveFocus(): boolean;
|
|
6624
|
+
setAriaProps(ariaAttributes: AriaAttributes): void;
|
|
6625
|
+
setMessages: (messages: string[] | string | null) => void;
|
|
6626
|
+
render(): h.JSX.Element;
|
|
6627
|
+
}
|
|
6628
|
+
|
|
6629
|
+
interface BaseElementProps {
|
|
6630
|
+
order?: Order;
|
|
6631
|
+
modules?: {
|
|
6632
|
+
srPanel?: SRPanel;
|
|
6633
|
+
analytics?: IAnalytics;
|
|
6634
|
+
resources?: Resources;
|
|
6635
|
+
risk?: RiskElement;
|
|
6636
|
+
};
|
|
6724
6637
|
/**
|
|
6725
|
-
*
|
|
6638
|
+
* Identifies if the Element is the DropIn element
|
|
6726
6639
|
*/
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6640
|
+
isDropin?: boolean;
|
|
6641
|
+
}
|
|
6642
|
+
interface IBaseElement {
|
|
6643
|
+
data: object;
|
|
6644
|
+
state: any;
|
|
6645
|
+
props: any;
|
|
6646
|
+
_id: string;
|
|
6647
|
+
_component: any;
|
|
6648
|
+
render(): ComponentChild | Error;
|
|
6649
|
+
mount(domNode: HTMLElement | string): IBaseElement;
|
|
6650
|
+
update(props: any): IBaseElement;
|
|
6651
|
+
unmount(): IBaseElement;
|
|
6652
|
+
remove(): void;
|
|
6653
|
+
activate(): void;
|
|
6736
6654
|
}
|
|
6737
6655
|
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6656
|
+
type CoreCallbacks = Pick<CoreConfiguration, 'beforeRedirect' | 'beforeSubmit' | 'onSubmit' | 'onReview' | 'onAdditionalDetails' | 'onPaymentFailed' | 'onPaymentCompleted' | 'onOrderUpdated' | 'onPaymentMethodsRequest' | 'onChange' | 'onActionHandled' | 'onError' | 'onEnterKeyPressed' | 'donation'>;
|
|
6657
|
+
type StatusFromAction = 'redirect' | 'loading' | 'custom';
|
|
6658
|
+
type UIElementProps = {
|
|
6659
|
+
paymentMethodId?: string;
|
|
6660
|
+
storedPaymentMethodId?: string;
|
|
6661
|
+
} & BaseElementProps & CoreCallbacks & {
|
|
6662
|
+
environment?: string;
|
|
6663
|
+
session?: Session;
|
|
6664
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
6665
|
+
isInstantPayment?: boolean;
|
|
6742
6666
|
/**
|
|
6743
|
-
*
|
|
6744
|
-
*
|
|
6745
|
-
* The "service" mode is used in the /sessions flow:
|
|
6746
|
-
* - if the /payments response mandates it, we consult the /sessions/donationCampaigns endpoint on behalf of the merchant, and mount any found Donation Campaigns.
|
|
6747
|
-
*
|
|
6748
|
-
* The opposite of this mode is the "direct" mode, used in the Advanced flow:
|
|
6749
|
-
* - the merchant makes their own call to the /donationCampaigns endpoint and provides the Donation Campaign directly to the component.
|
|
6667
|
+
* Flags if the element is Stored payment method
|
|
6668
|
+
* @internal
|
|
6750
6669
|
*/
|
|
6751
|
-
|
|
6752
|
-
static readonly defaultProps: {
|
|
6753
|
-
onCancel: () => void;
|
|
6754
|
-
onDonate: () => void;
|
|
6755
|
-
};
|
|
6756
|
-
private initialiseServiceMode;
|
|
6670
|
+
isStoredPaymentMethod?: boolean;
|
|
6757
6671
|
/**
|
|
6758
|
-
*
|
|
6672
|
+
* Flag if the element is Stored payment method.
|
|
6673
|
+
* Perhaps can be deprecated and we use the one above?
|
|
6674
|
+
* @internal
|
|
6759
6675
|
*/
|
|
6760
|
-
|
|
6676
|
+
oneClick?: boolean;
|
|
6761
6677
|
/**
|
|
6762
|
-
*
|
|
6678
|
+
* Stored payment method id
|
|
6679
|
+
* @internal
|
|
6763
6680
|
*/
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6681
|
+
storedPaymentMethodId?: string;
|
|
6682
|
+
/**
|
|
6683
|
+
* Status set when creating the Component from action
|
|
6684
|
+
* @internal
|
|
6685
|
+
*/
|
|
6686
|
+
statusType?: StatusFromAction;
|
|
6687
|
+
type?: string;
|
|
6688
|
+
name?: string;
|
|
6689
|
+
icon?: string;
|
|
6690
|
+
amount?: PaymentAmount;
|
|
6691
|
+
secondaryAmount?: PaymentAmount;
|
|
6692
|
+
/**
|
|
6693
|
+
* Show/Hide pay button
|
|
6694
|
+
* @defaultValue true
|
|
6695
|
+
*/
|
|
6696
|
+
showPayButton?: boolean;
|
|
6697
|
+
/** @internal */
|
|
6698
|
+
payButton?: (options: PayButtonProps) => h.JSX.Element;
|
|
6699
|
+
/** @internal */
|
|
6700
|
+
loadingContext?: string;
|
|
6701
|
+
/** @internal */
|
|
6702
|
+
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
6703
|
+
/** @internal */
|
|
6704
|
+
clientKey?: string;
|
|
6705
|
+
/** @internal */
|
|
6706
|
+
elementRef?: any;
|
|
6707
|
+
/** @internal */
|
|
6708
|
+
i18n?: Language;
|
|
6709
|
+
/**
|
|
6710
|
+
* The shopper’s issuer account label. It can be available for stored payment method
|
|
6711
|
+
* @internal
|
|
6712
|
+
*/
|
|
6713
|
+
label?: string;
|
|
6714
|
+
/**
|
|
6715
|
+
* Returned after the payments call, when an action is returned. It represents the payment method tx variant
|
|
6716
|
+
* that was used for the payment
|
|
6717
|
+
* @internal
|
|
6718
|
+
*/
|
|
6719
|
+
paymentMethodType?: string;
|
|
6720
|
+
/**
|
|
6721
|
+
* Reference to the action object found in a /payments response. This, in most cases, is passed on to the onActionHandled callback
|
|
6722
|
+
*/
|
|
6723
|
+
originalAction?: PaymentAction;
|
|
6724
|
+
};
|
|
6725
|
+
type UIElementStatus = 'ready' | 'loading' | 'error' | 'success';
|
|
6726
|
+
interface ComponentMethodsRef {
|
|
6727
|
+
showValidation?: () => void;
|
|
6728
|
+
setStatus?(status: UIElementStatus): void;
|
|
6770
6729
|
}
|
|
6771
6730
|
|
|
6772
6731
|
type DonationConfiguration = UIElementProps & Omit<DonationComponentProps, 'onDonate' | 'onCancel'> & {
|
|
@@ -7008,20 +6967,21 @@ type BeforeSubmitActions = {
|
|
|
7008
6967
|
resolve: (data: PaymentData) => void;
|
|
7009
6968
|
reject: () => void;
|
|
7010
6969
|
};
|
|
7011
|
-
type OnChangeDataErrors = Record<string, {
|
|
7012
|
-
isValid: boolean;
|
|
7013
|
-
errorMessage: string;
|
|
7014
|
-
errorI18n: string;
|
|
7015
|
-
error?: string;
|
|
7016
|
-
rootNode?: HTMLElement;
|
|
7017
|
-
}>;
|
|
7018
6970
|
type OnChangeData = {
|
|
7019
6971
|
data: PaymentData;
|
|
7020
6972
|
isValid: boolean;
|
|
7021
6973
|
valid?: {
|
|
7022
6974
|
[fieldKey: string]: boolean;
|
|
7023
6975
|
};
|
|
7024
|
-
errors?:
|
|
6976
|
+
errors?: {
|
|
6977
|
+
[fieldKey: string]: {
|
|
6978
|
+
isValid: boolean;
|
|
6979
|
+
errorMessage: string;
|
|
6980
|
+
errorI18n: string;
|
|
6981
|
+
error: string;
|
|
6982
|
+
rootNode: HTMLElement;
|
|
6983
|
+
};
|
|
6984
|
+
};
|
|
7025
6985
|
};
|
|
7026
6986
|
interface CoreConfiguration {
|
|
7027
6987
|
/**
|
|
@@ -7252,12 +7212,12 @@ interface CoreConfiguration {
|
|
|
7252
7212
|
};
|
|
7253
7213
|
}
|
|
7254
7214
|
|
|
7255
|
-
declare abstract class BaseElement<P extends BaseElementProps
|
|
7215
|
+
declare abstract class BaseElement<P extends BaseElementProps> implements IBaseElement {
|
|
7256
7216
|
readonly _id: string;
|
|
7257
7217
|
readonly core: ICore;
|
|
7258
7218
|
props: P;
|
|
7259
|
-
state:
|
|
7260
|
-
_component:
|
|
7219
|
+
state: any;
|
|
7220
|
+
_component: any;
|
|
7261
7221
|
protected _node: HTMLElement;
|
|
7262
7222
|
protected static readonly defaultProps: {};
|
|
7263
7223
|
constructor(checkout: ICore, props?: P);
|
|
@@ -7271,10 +7231,10 @@ declare abstract class BaseElement<P extends BaseElementProps, S extends BaseEle
|
|
|
7271
7231
|
* Executed on the `data` getter.
|
|
7272
7232
|
* Returns the component data necessary for the /payments request
|
|
7273
7233
|
*/
|
|
7274
|
-
protected formatData():
|
|
7234
|
+
protected formatData(): any;
|
|
7275
7235
|
protected submitAnalytics(_analyticsObj?: AbstractAnalyticsEvent): any;
|
|
7276
7236
|
protected handleKeyDown(_e: TargetedKeyboardEvent<HTMLInputElement>): any;
|
|
7277
|
-
protected setState(newState:
|
|
7237
|
+
protected setState(newState: object): void;
|
|
7278
7238
|
/**
|
|
7279
7239
|
* Returns the component payment data ready to submit to the Checkout API
|
|
7280
7240
|
* Note: this does not ensure validity, check isValid first
|
|
@@ -7318,7 +7278,7 @@ declare abstract class UIElement<P extends UIElementProps = UIElementProps> exte
|
|
|
7318
7278
|
/**
|
|
7319
7279
|
* componentRef is a ref to the primary component inside the subclass that extends UIElement e.g. CardInput.tsx (which sits inside Card.tsx)
|
|
7320
7280
|
*/
|
|
7321
|
-
protected componentRef:
|
|
7281
|
+
protected componentRef: any;
|
|
7322
7282
|
protected resources: Resources;
|
|
7323
7283
|
/**
|
|
7324
7284
|
* elementRef is a ref to the subclass that extends UIElement e.g. Card.tsx or Dropin.tsx
|
|
@@ -7374,11 +7334,11 @@ declare abstract class UIElement<P extends UIElementProps = UIElementProps> exte
|
|
|
7374
7334
|
* - If Drop-in, will set status for Dropin component, and then it will propagate the new status for the active payment method component
|
|
7375
7335
|
* - If Component, it will set its own status
|
|
7376
7336
|
*/
|
|
7377
|
-
setElementStatus(status: UIElementStatus): this;
|
|
7337
|
+
setElementStatus(status: UIElementStatus, props?: any): this;
|
|
7378
7338
|
/**
|
|
7379
7339
|
* componentRef is a ref to the primary component inside that subclass e.g. CardInput.tsx
|
|
7380
7340
|
*/
|
|
7381
|
-
setStatus(status: UIElementStatus): this;
|
|
7341
|
+
setStatus(status: UIElementStatus, props?: any): this;
|
|
7382
7342
|
protected onChange(): void;
|
|
7383
7343
|
protected submitAnalytics(event: AbstractAnalyticsEvent): void;
|
|
7384
7344
|
submit(): void;
|
|
@@ -7386,7 +7346,7 @@ declare abstract class UIElement<P extends UIElementProps = UIElementProps> exte
|
|
|
7386
7346
|
protected makePaymentsCall(): Promise<CheckoutAdvancedFlowResponse | CheckoutSessionPaymentResponse>;
|
|
7387
7347
|
private submitUsingAdvancedFlow;
|
|
7388
7348
|
private submitUsingSessionsFlow;
|
|
7389
|
-
protected onComplete(state:
|
|
7349
|
+
protected onComplete(state: any): void;
|
|
7390
7350
|
protected handleError: (error: AdyenCheckoutError) => void;
|
|
7391
7351
|
protected handleAdditionalDetails(state: AdditionalDetailsData): void;
|
|
7392
7352
|
private makeAdditionalDetailsCall;
|
|
@@ -7724,7 +7684,7 @@ interface PaymentData extends PaymentMethodData {
|
|
|
7724
7684
|
orderData: string;
|
|
7725
7685
|
pspReference: string;
|
|
7726
7686
|
};
|
|
7727
|
-
clientStateDataIndicator
|
|
7687
|
+
clientStateDataIndicator: boolean;
|
|
7728
7688
|
sessionData?: string;
|
|
7729
7689
|
storePaymentMethod?: boolean;
|
|
7730
7690
|
billingAddress?: AddressData;
|
|
@@ -7834,7 +7794,7 @@ interface CardConfiguration extends UIElementProps {
|
|
|
7834
7794
|
*
|
|
7835
7795
|
* - merchant set config option
|
|
7836
7796
|
*/
|
|
7837
|
-
billingAddressMode?:
|
|
7797
|
+
billingAddressMode?: 'full' | 'partial' | 'none';
|
|
7838
7798
|
/**
|
|
7839
7799
|
* Show Address fields
|
|
7840
7800
|
* @defaultValue `false`
|
|
@@ -8244,14 +8204,13 @@ type DualBrandingChangeHandler = (brandValue: string) => void;
|
|
|
8244
8204
|
declare class CardElement extends UIElement<CardConfiguration> {
|
|
8245
8205
|
static readonly type: TxVariants;
|
|
8246
8206
|
private readonly clickToPayService;
|
|
8247
|
-
protected componentRef: CardInputRef | undefined;
|
|
8248
8207
|
/**
|
|
8249
8208
|
* Reference to the 'ClickToPayComponent'
|
|
8250
8209
|
*/
|
|
8251
8210
|
private clickToPayRef;
|
|
8252
8211
|
constructor(checkout: ICore, props?: CardConfiguration);
|
|
8253
8212
|
protected static readonly defaultProps: any;
|
|
8254
|
-
setStatus(status: UIElementStatus): this;
|
|
8213
|
+
setStatus(status: UIElementStatus, props?: any): this;
|
|
8255
8214
|
private readonly setClickToPayRef;
|
|
8256
8215
|
protected getPaymentMethodConfigFromResponse(componentProps: CardConfiguration): RawPaymentMethod;
|
|
8257
8216
|
formatProps(props: CardConfiguration): CardConfiguration;
|
|
@@ -8260,11 +8219,11 @@ declare class CardElement extends UIElement<CardConfiguration> {
|
|
|
8260
8219
|
*/
|
|
8261
8220
|
formatData(): CardElementData;
|
|
8262
8221
|
protected beforeRender(configSetByMerchant?: CardConfiguration): void;
|
|
8263
|
-
updateStyles(stylesObj:
|
|
8264
|
-
setFocusOn(fieldName:
|
|
8265
|
-
onBrand: (event:
|
|
8222
|
+
updateStyles(stylesObj: any): this;
|
|
8223
|
+
setFocusOn(fieldName: any): this;
|
|
8224
|
+
onBrand: (event: any) => void;
|
|
8266
8225
|
processBinLookupResponse(binLookupResponse: BinLookupResponse | null, isReset?: boolean): this;
|
|
8267
|
-
handleUnsupportedCard(errObj:
|
|
8226
|
+
handleUnsupportedCard(errObj: any): this;
|
|
8268
8227
|
private readonly handleClickToPaySubmit;
|
|
8269
8228
|
onBinLookup(obj: CardBinLookupData): void;
|
|
8270
8229
|
private readonly onConfigSuccess;
|
|
@@ -8311,7 +8270,7 @@ declare class ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerpr
|
|
|
8311
8270
|
dataKey: string;
|
|
8312
8271
|
type: string;
|
|
8313
8272
|
};
|
|
8314
|
-
private
|
|
8273
|
+
private callSubmit3DS2Fingerprint;
|
|
8315
8274
|
protected beforeRender(): void;
|
|
8316
8275
|
protected onActionHandled: (rtnObj: ActionHandledReturnObject) => void;
|
|
8317
8276
|
/**
|
|
@@ -8380,7 +8339,7 @@ declare class PayMeElement extends QRLoaderContainer {
|
|
|
8380
8339
|
}) => void;
|
|
8381
8340
|
environment?: string;
|
|
8382
8341
|
session?: Session;
|
|
8383
|
-
onComplete?: (state:
|
|
8342
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
8384
8343
|
isInstantPayment?: boolean;
|
|
8385
8344
|
isStoredPaymentMethod?: boolean;
|
|
8386
8345
|
oneClick?: boolean;
|
|
@@ -8394,7 +8353,7 @@ declare class PayMeElement extends QRLoaderContainer {
|
|
|
8394
8353
|
loadingContext?: string;
|
|
8395
8354
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
8396
8355
|
clientKey?: string;
|
|
8397
|
-
elementRef?:
|
|
8356
|
+
elementRef?: any;
|
|
8398
8357
|
i18n?: Language;
|
|
8399
8358
|
label?: string;
|
|
8400
8359
|
paymentMethodType?: string;
|
|
@@ -8406,8 +8365,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8406
8365
|
static readonly type = TxVariants.dropin;
|
|
8407
8366
|
protected static readonly defaultProps: DropinConfiguration;
|
|
8408
8367
|
dropinRef: any;
|
|
8409
|
-
|
|
8410
|
-
private readonly paymentMethodsConfiguration;
|
|
8368
|
+
private paymentMethodsConfiguration;
|
|
8411
8369
|
/**
|
|
8412
8370
|
* Reference to the component created from `handleAction` (Ex.: ThreeDS2Challenge)
|
|
8413
8371
|
*/
|
|
@@ -8419,7 +8377,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8419
8377
|
constructor(checkout: ICore, props?: DropinConfiguration);
|
|
8420
8378
|
protected reportIntegrationFlavor(): void;
|
|
8421
8379
|
protected storeElementRefOnCore(): void;
|
|
8422
|
-
formatProps(props:
|
|
8380
|
+
formatProps(props: any): {
|
|
8423
8381
|
instantPaymentTypes: InstantPaymentTypes[];
|
|
8424
8382
|
paymentMethodsConfiguration?: PaymentMethodsConfiguration;
|
|
8425
8383
|
paymentMethodComponents?: NewableComponent[];
|
|
@@ -8472,7 +8430,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8472
8430
|
}) => void;
|
|
8473
8431
|
environment?: string;
|
|
8474
8432
|
session?: Session;
|
|
8475
|
-
onComplete?: (state:
|
|
8433
|
+
onComplete?: (state: any, element: UIElement) => void;
|
|
8476
8434
|
isInstantPayment?: boolean;
|
|
8477
8435
|
isStoredPaymentMethod?: boolean;
|
|
8478
8436
|
oneClick?: boolean;
|
|
@@ -8487,7 +8445,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8487
8445
|
loadingContext?: string;
|
|
8488
8446
|
createFromAction?: (action: PaymentAction, props: object) => UIElement;
|
|
8489
8447
|
clientKey?: string;
|
|
8490
|
-
elementRef?:
|
|
8448
|
+
elementRef?: any;
|
|
8491
8449
|
i18n?: Language;
|
|
8492
8450
|
label?: string;
|
|
8493
8451
|
paymentMethodType?: string;
|
|
@@ -8495,8 +8453,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8495
8453
|
};
|
|
8496
8454
|
get isValid(): boolean;
|
|
8497
8455
|
showValidation(): this;
|
|
8498
|
-
|
|
8499
|
-
setStatus(status: UIElementStatus, props?: Record<string, unknown>): this;
|
|
8456
|
+
setStatus(status: any, props?: {}): this;
|
|
8500
8457
|
get activePaymentMethod(): any;
|
|
8501
8458
|
get data(): any;
|
|
8502
8459
|
displayFinalAnimation(type: 'success' | 'error'): void;
|
|
@@ -8522,7 +8479,7 @@ declare class DropinElement extends UIElement<DropinConfiguration> implements ID
|
|
|
8522
8479
|
/**
|
|
8523
8480
|
* Creates the Drop-in elements
|
|
8524
8481
|
*/
|
|
8525
|
-
private
|
|
8482
|
+
private handleCreate;
|
|
8526
8483
|
handleAction(action: PaymentAction, props?: {}): this | null;
|
|
8527
8484
|
/**
|
|
8528
8485
|
* handleOrder is implemented so we don't trigger a callback like in the components
|
|
@@ -8857,4 +8814,4 @@ declare namespace AdyenCheckout {
|
|
|
8857
8814
|
}
|
|
8858
8815
|
|
|
8859
8816
|
export { ANCVElement as ANCV, AchElement as Ach, AddressElement as Address, AdyenCheckout, AdyenCheckoutError, Affirm, AfterPay, AfterPayB2B, AmazonPayElement as AmazonPay, ApplePayElement as ApplePay, Atome, BacsElement as BacsDirectDebit, BancontactElement as Bancontact, BankTransferElement as BankTransfer, BCMCMobileElement as BcmcMobile, BillDeskOnlineElement as BillDeskOnline, BillDeskWalletElement as BillDeskWallet, BlikElement as Blik, BoletoElement as Boleto, CardElement as Card, CashAppPay, ClickToPayElement as ClickToPay, Core, CustomCard, DokuElement as Doku, DonationElement as Donation, DotpayElement as Dotpay, DragonpayElement as Dragonpay, DropinElement as Dropin, DuitNowElement as DuitNow, EPSElement as EPS, EcontextElement as Econtext, FacilyPay10x as FacilPay10x, FacilyPay12x as FacilPay12x, FacilyPay3x as FacilPay3x, FacilyPay4x as FacilPay4x, FacilyPay6x as FacilPay6x, Fastlane, FastlaneSDK, GiftcardElement as Giftcard, GiropayElement as Giropay, GooglePay, Iris, IrisMode, KlarnaPayments as Klarna, MBWayElement as MBWay, MealVoucherFRElement as MealVoucherFR, MolPayEBankingMYElement as MolPayEBankingMY, MolPayEBankingTHElement as MolPayEBankingTH, MolPayEbankingVNElement as MolPayEBankingVN, MultibancoElement as Multibanco, OnlineBankingCZElement as OnlineBankingCZ, OnlineBankingFI, OnlineBankingINElement as OnlineBankingIN, OnlineBankingPL, OnlineBankingSKElement as OnlineBankingSK, OxxoElement as Oxxo, PayByBank, PayByBankPixElement as PayByBankPix, PayByBankUS, PayMeElement as PayMe, PayNowElement as PayNow, PaypalElement as PayPal, PayToElement as PayTo, PayuNetCashcardElement as PayuCashcard, PayuNetBankingElement as PayuNetBanking, PersonalDetailsElement as PersonalDetails, PixElement as Pix, PreAuthorizedDebitCanada, PromptPayElement as PromptPay, RatePay, RatePayDirectDebit, RedirectElement as Redirect, Riverty, SepaElement as SepaDirectDebit, SwishElement as Swish, ThreeDS2Challenge, ThreeDS2DeviceFingerprint, TrustlyElement as Trustly, TwintElement as Twint, UIElement, UPI, VippsElement as Vipps, WalletINElement as WalletIN, WeChatPayElement as WeChat, index_d as components, initializeFastlane };
|
|
8860
|
-
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps,
|
|
8817
|
+
export type { ANCVConfiguration, ANCVDataState, AchConfiguration, AchPlaceholders, ActionDescriptionType, ActionHandledReturnObject, AdditionalDetailsActions, AdditionalDetailsData, AddressData, AddressField, AmazonPayBackendConfiguration, AmazonPayButtonProps, AmazonPayButtonSettings, AmazonPayComponentProps, AmazonPayConfiguration, AmazonPayElementData, AmazonWindowObject, App, ApplePayButtonStyle, ApplePayButtonType, ApplePayConfiguration, ApplePayElementData, ApplePayPaymentAuthorizationResult, ApplePayPaymentOrderDetails, ApplePaySessionRequest, ApplePayWebConfiguration, AwaitComponentProps, AwaitConfiguration, BankDetailsSchema, BankTransferConfiguration, BankTransferSchema, BankTransferState, BeforeSubmitActions, BinLookupResponse, BinLookupResponseRaw, BoletoConfiguration, BoletoElementProps, BoletoInputDataState, BoletoInputErrorState, BoletoInputValidState, BrandConfiguration, BrandObject, BrowserInfo, CReqData, CardAllValidData, CardAutoCompleteData, CardBackendConfiguration, CardBinLookupData, CardBinValueData, CardBrandData, CardBrandsConfiguration, CardConfigSuccessData, CardConfiguration, CardElementData, CardErrorData, CardFieldValidData, CardFocusData, CardLoadData, CardPlaceholders, CashAppPayConfiguration, CashAppPayElementData, CashAppPayEventData, ChallengeData, ChallengeResolveData, ChallengeWindowSize, ChangeActionOptions, ChangePaymentDetailsButtonProps, ChargeAmount, CheckoutAdvancedFlowResponse, CheckoutDetailsRequest, CheckoutSession, CheckoutSessionConfig, ClickToPayConfiguration, ClickToPayPaymentData, ClickToPayProps, ClickToPayScheme, CommonVoucherProps, ComponentFocusObject, ComponentMethodsRef, CoreConfiguration, CoreModules, Currency, CustomCardConfiguration, CustomTranslations, DecodeObject, DeliverySpecifications, DokuVoucherResultProps, DonationCampaign, DonationCampaignOptions, DonationConfiguration, DonationOptions, DonationProps, DragonpayConfiguraton, DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps, DragonpayVoucherResultProps, DropinComponentProps, DropinComponentState, DropinConfiguration, DropinStatus, DropinStatusProps, DualBrandButtons, DualBrandSelectElement, DualBrandingChangeHandler, EcontextConfiguration, EcontextInputSchema, EcontextVoucherResultProps, ErrorCodeObject, ExtendedMerchantInfo, FastlaneAddress, FastlaneAuthenticatedCustomerResult, FastlaneConfiguration, FastlaneConsentRenderState, FastlaneData, FastlaneOptions, FastlanePaymentMethodConfiguration, FastlaneProfile, FastlaneSDKConfiguration, FastlaneShipping, FastlaneShippingAddressSelectorResult, FastlaneSignupConfiguration, FastlaneWindowInstance, FieldsetVisibility, FingerPrintData, FingerprintResolveData, FundingSource, FundingSourceKeys, GiftCardBalanceCheckErrorType, GiftCardConfiguration, GiftCardElementData, GiftCardValidationError, GooglePayConfiguration, GooglePaymentDataRequest, ICore, IDropin, InstantPaymentTypes, Intent, IrisConfiguration, IrisData, IrisState, IssuerListConfiguration, IssuerListData, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration, KlarnaSdkData, KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps, LedgerCurrencies, MandateFrequencyType, MandateType, OnChangeData, OpenInvoiceActiveFieldsets, OpenInvoiceConfiguration, OpenInvoiceFieldsetsRefs, OpenInvoiceProps, OpenInvoiceState, OpenInvoiceStateData, OpenInvoiceStateError, OpenInvoiceStateValid, OpenInvoiceVisibility, Order, OrderButtonProps, OrderStatus, PayPalConfiguration, PayToConfiguration, PayToData, PayToPlaceholdersType, PayloadJSON, PaymentAction, PaymentActionsType, PaymentAmount, PaymentCompletedData, PaymentData, PaymentFailedData, PaymentMethodBrand, PaymentMethodData, PaymentMethodDisplayMode, PaymentMethodGroup, PaymentMethodOptions, PaymentMethods, PaymentMethodsConfiguration, PaymentMethodsRequestData, PaymentMethodsResponse, PaymentResponseData, PersonalDetailsSchema, PixConfiguration, PixElementData, PostMsgParseErrorObject, PreAuthorizedDebitCanadaConfiguration, PreAuthorizedDebitCanadaPlaceholders, ProcessedPaymentStatusResponse, QRLoaderConfiguration, RawPaymentMethod, RawPaymentResponse, RawPaymentStatusResponse, RawStoredPaymentMethod, RecurringMetadata, RedirectConfiguration, Region, ResultCode, ResultObject, ResultValue, ReviewDetails, SepaConfiguration, SepaElementData, SessionsResponse, SignOutButtonProps, SocialSecurityMode, StatusFromAction, SubmitActions, SubmitData, SupportedLocale, SupportedPayPalFundingSources, ThreeDS2ActionProps, ThreeDS2ChallengeConfiguration, ThreeDS2ConfigProps, ThreeDS2DeviceFingerprintConfiguration, ThreeDS2FingerprintResponse, ThreeDS2FlowObject, ThreeDS2FlowProps, ThreeDS2Token, UIElementProps, UIElementStatus, UPIAppList, UPIConfiguration, UpdateAmazonCheckoutSessionRequest, UpiMode, UpiPaymentData, UpiType, ValidationError, VoucherConfiguration, VoucherDetail, VoucherProps, balanceCheckResponseType, onBalanceCheckCallbackType, onOrderCancelData, onOrderCancelInternalCallback, onOrderCancelType, onOrderRequestCallbackType, onOrderUpdatedCallbackType, onRequiringConfirmationCallbackType };
|