@adyen/adyen-web
Version:
[](https://www.npmjs.com/package/@adyen/adyen-web)
83 lines (82 loc) • 3.46 kB
TypeScript
import { h } from 'preact';
import UIElement from '../UIElement';
import { CashAppPayElementData, CashAppPayElementProps } from './types';
export declare class CashAppPay extends UIElement<CashAppPayElementProps> {
static type: string;
private readonly cashAppService;
protected static defaultProps: {
onClick: (actions: any) => void;
showPayButton: boolean;
enableStoreDetails: boolean;
storePaymentMethod: boolean;
};
constructor(props: any);
formatProps(props: CashAppPayElementProps): {
enableStoreDetails: boolean;
storePaymentMethod?: boolean;
onClick?(actions: {
resolve: () => void;
reject: () => void;
}): void;
referenceId?: string;
redirectURL?: string;
button?: {
shape?: "round" | "semiround";
size?: "small" | "medium";
theme?: "dark" | "light";
width?: "full" | "static";
};
configuration?: {
clientId: string;
scopeId: string;
};
storedPaymentMethodId?: string;
cashtag?: 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;
};
formatData(): CashAppPayElementData;
get displayName(): string;
get additionalInfo(): "" | "Cash App Pay";
submit: () => void;
get isValid(): boolean;
private handleOnChangeStoreDetails;
private handleAuthorize;
render(): h.JSX.Element;
}
export default CashAppPay;