UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

75 lines (74 loc) 3.41 kB
import { h } from 'preact'; import UIElement from '../UIElement'; import { ClickToPayElementProps, ClickToPayPaymentData } from './types'; export declare class ClickToPayElement extends UIElement<ClickToPayElementProps> { static type: string; private readonly clickToPayService; private readonly ctpConfiguration; constructor(props: any); get isValid(): boolean; get browserInfo(): import("../../types").BrowserInfo; formatData(): ClickToPayPaymentData; protected formatProps(props: ClickToPayElementProps): { disableOtpAutoFocus: boolean; shopperEmail: any; telephoneNumber: any; locale: string; environment?: string; session?: import("../../core/CheckoutSession/CheckoutSession").default; onChange?: (state: any, element: UIElement<any>) => void; onValid?: (state: any, element: UIElement<any>) => void; beforeSubmit?: (state: any, element: UIElement<any>, actions: any) => Promise<void>; onSubmit?: (state: any, element: UIElement<any>) => void; onComplete?: (state: any, element: UIElement<any>) => void; onActionHandled?: (rtnObj: import("../types").ActionHandledReturnObject) => void; onAdditionalDetails?: (state: any, element: UIElement<any>) => void; onError?: (error: any, element?: UIElement<any>) => void; onPaymentCompleted?: (result: any, element: UIElement<any>) => void; beforeRedirect?: (resolve: any, reject: any, redirectData: any, element: UIElement<any>) => void; isInstantPayment?: boolean; type?: string; name?: string; icon?: string; amount?: import("../../types").PaymentAmount; secondaryAmount?: import("../../types").PaymentAmountExtended; brand?: string; showPayButton?: boolean; setStatusAutomatically?: boolean; payButton?: (options: import("../types").PayButtonFunctionProps) => h.JSX.Element; loadingContext?: string; createFromAction?: (action: import("../../types").PaymentAction, props: object) => UIElement<any>; clientKey?: string; paymentMethodType?: string; elementRef?: any; i18n?: import("../../language").default; _parentInstance?: import("../../core/core").default; order?: import("../../types").Order; modules?: { srPanel?: import("../../core/Errors/SRPanel").SRPanel; analytics?: import("../types").AnalyticsModule; resources?: import("../../core/Context/Resources").Resources; risk?: import("../../core/RiskModule").default; }; isDropin?: boolean; merchantDisplayName?: string; onReady?(): void; onTimeout?(error: import("../internal/ClickToPay/errors/TimeoutError").default): void; configuration?: { mcDpaId?: string; mcSrcClientId?: string; visaSrcInitiatorId?: string; visaSrciDpaId?: string; }; }; /** * Method used to let the merchant know if the shopper have a valid CtP accoubt * * Resolves Promise if the Shopper has cookies OR has valid CtP account * Rejects Promise if account isn't found or if Login screen is triggered */ isAvailable(): Promise<void>; private handleClickToPaySubmit; render(): h.JSX.Element; } export default ClickToPayElement;