UNPKG

react-payline

Version:

_This is an unofficial repository_

35 lines (34 loc) 1.73 kB
import React from 'react'; export declare type StateType = 'ACTIVE_WAITING' | 'BROWSER_NOT_SUPPORTED' | 'MANAGE_WEB_WALLET' | 'PAYMENT_CANCELED_WITH_RETRY' | 'PAYMENT_CANCELED' | 'PAYMENT_FAILURE_WITH_RETRY' | 'PAYMENT_FAILURE' | 'PAYMENT_METHOD_NEEDS_MORE_INFOS' | 'PAYMENT_METHODS_LIST_SHORTCUT' | 'PAYMENT_METHODS_LIST' | 'PAYMENT_ONHOLD_PARTNER' | 'PAYMENT_REDIRECT_NO_RESPONSE' | 'PAYMENT_SUCCESS_FORCE_TICKET_DISPLAY' | 'PAYMENT_SUCCESS' | 'PAYMENT_TRANSITIONAL_SHORTCUT' | 'TOKEN_EXPIRED'; export declare type WillInitHandler = () => void; export declare type WillShowHandler = () => void; export declare type FinalStateHasBeenReachedHandler = (data: { state: StateType; }) => false | void; export declare type DidShowStateHandler = (data: { state: StateType; }) => void; export declare type WillDisplayMessageHandler = (data: { id: string; type: 'success' | 'info' | 'error' | 'warn'; key: string; message: string; }) => boolean | void; export declare type WillRemoveMessageHandler = (data: { id: string; }) => boolean | void; export declare type BeforePaymentHandler = () => boolean | void; export interface PaylineWidgetProps extends React.HTMLAttributes<HTMLDivElement> { token: string; template?: string; embeddedRedirectionAllowed?: boolean; partnerReturnUrl?: string; onWillInit?: WillInitHandler; onWillShow?: WillShowHandler; onFinalStateHasBeenReached?: FinalStateHasBeenReachedHandler; onDidShowState?: DidShowStateHandler; onWillDisplayMessage?: WillDisplayMessageHandler; onWillRemoveMessage?: WillRemoveMessageHandler; onBeforePayment?: BeforePaymentHandler; } export declare const PaylineWidget: React.ComponentType<PaylineWidgetProps>;